* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html,
body {
    height: 100%;
}

body {
    background: #eef2f5;
    color: #333;
    font-size: 14px;
    display: flex;
    flex-direction: column;
}

.main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 10px;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 0;
}

header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 12px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

header h1 {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.menu-toggle {
    background: rgba(255, 255, 255, .2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .3s;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, .3);
}

.menu-toggle i {
    color: white;
    font-size: 1.1rem;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 55px;
    left: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .15);
    z-index: 999;
    flex-direction: column;
    padding: 8px 0;
    min-width: 180px;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: #333;
    text-decoration: none;
    padding: 10px 15px;
    font-size: 1rem;
    transition: background .2s;
}

.mobile-menu a:hover {
    background: #f2f2f2;
}

.dashboard-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
}

/* 🔥 SIMETRÍA: ancho completo */
.servicios-wrapper {
    padding: 0 20px;
}

@media (max-width: 768px) {
    .servicios-wrapper {
        padding: 0 10px;
    }
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: .9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: .9rem;
    background: white;
    color: #333;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.servicios-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

@media (min-width: 768px) {
    .servicios-actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all .3s ease;
    font-size: .85rem;
    text-align: center;
    width: 100%;
    margin-bottom: 5px;
}

@media (min-width: 768px) {
    .btn {
        width: auto;
        margin-bottom: 0;
    }
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #219a52;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 15px;
}

@media (min-width: 768px) {
    .btn-container {
        flex-direction: row;
        justify-content: flex-end;
    }
}

/* 🔥 LISTA para servicios (sin tarjetas) */
.servicios-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.servicio-item {
    display: grid;
    grid-template-columns: 1fr 80px 100px 100px 40px;
    gap: 10px;
    padding: 10px 12px;
    background: #fafafa;
    border-bottom: 1px solid #ddd;
    align-items: center;
    font-size: .85rem;
}

.servicio-item:nth-child(even) {
    background: #f5f5f5;
}

.servicio-desc {
    line-height: 1.2;
}

.servicio-cant {
    font-weight: 600;
    color: #2c3e50;
}

.servicio-precio {
    font-weight: 600;
    color: #27ae60;
}

.servicio-subtotal {
    font-weight: 600;
    color: #2c3e50;
}

.servicio-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.delete-item-btn {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    transition: all .2s ease;
}

.delete-item-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.delete-item-btn i {
    pointer-events: none;
}

.servicio-total {
    background: #ecf0f1;
    padding: 12px;
    border-radius: 0 0 4px 4px;
    text-align: right;
    font-weight: bold;
    font-size: 1.1rem;
    border-top: 2px solid #3498db;
    margin-top: auto;
}

.empty-cart {
    text-align: center;
    color: #7f8c8d;
    font-size: .9rem;
    padding: 30px;
    background: white;
    border-radius: 4px;
    border: 2px dashed #ddd;
}

/* Móvil: ajustes */
@media (max-width: 768px) {
    .servicio-item {
        grid-template-columns: 1fr 60px 80px 80px 36px;
    }

    .servicios-wrapper {
        padding: 0 10px;
    }

    header h1 {
        font-size: 1.2rem;
    }

    .container {
        padding: 10px;
    }
}