:root {
    --bg-color: #f3f4f6;
    /* Gray 100 to match pricing section */
    --card-bg: #ffffff;
    --primary-color: #1e3a8a;
    /* Blue 900 - Brand Primary */
    --primary-hover: #1e40af;
    /* Blue 800 - Hover */
    --text-color: #1f2937;
    --text-secondary: #6b7280;
    --success-color: #22c55e;
    /* Green 500 - Brand Accent */
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --border-radius: 9999px;
    /* Rounded-full style for buttons if possible, or keep consistent radius */
    --card-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body.dark-mode {
    --bg-color: #111827;
    --card-bg: #1f2937;
    --text-color: #f9fafb;
    --text-secondary: #9ca3af;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

/* Dark Mode specific adjustments */
body.dark-mode .service-item {
    background-color: #374151;
    /* Gray 700 */
    border-color: #4b5563;
    /* Gray 600 */
}

body.dark-mode .service-option {
    background-color: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

body.dark-mode .service-credentials {
    color: white !important;
}

body.dark-mode .btn-toggle-services {
    color: white !important;
    text-decoration: underline;
}

body.dark-mode .service-option.disabled {
    background-color: #1f2937;
    border-color: #374151;
    color: #6b7280;
}

body.dark-mode .service-option:hover {
    background-color: #4b5563;
}

body.dark-mode input,
body.dark-mode select {
    background-color: #374151;
    border-color: #4b5563;
    color: white;
}

body.dark-mode .modal-content {
    background-color: #1f2937;
    color: white;
}

body.dark-mode .close-modal {
    color: #d1d5db;
}

body.dark-mode .header-toolbar {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .btn-renew {
    background-color: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

body.dark-mode .btn-renew:hover {
    background-color: #4b5563;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    background-color: var(--primary-color);
    /* Fondo oscuro para el menú */
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--card-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.header-toolbar {
    display: flex;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.35rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.btn-toolbar {
    background: transparent;
    border: none;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-toolbar:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #4ade80;
    /* Tailwind green-400 */
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
}

.btn-toolbar span {
    font-size: 1.1rem;
}

h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    /* Texto blanco */
    margin: 0;
}

h2 {
    margin-top: 0;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 9999px;
    /* Pill shape */
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.client-card {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.client-card:hover {
    transform: translateY(-2px);
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.client-info h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.client-phone {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.btn-add-service {
    background: none;
    border: 1px solid #e5e7eb;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-add-service:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.services-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    /* Oculto por defecto */
    margin-top: 1rem;
    animation: fadeIn 0.3s ease-in-out;
}

.services-list.expanded {
    display: block;
    /* Mostrar cuando tenga la clase expanded */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-toggle-services {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    margin-top: 0.25rem;
    text-decoration: underline;
}

.service-item {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid #f3f4f6;
}

.service-item.expired {
    border-left: 4px solid var(--danger-color);
}

.service-item.active {
    border-left: 4px solid var(--success-color);
}

.service-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.service-credentials {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.service-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.5rem;
}

.renew-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-renew {
    background-color: white;
    border: 1px solid #d1d5db;
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.btn-renew:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: #eef2ff;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 2rem auto;
    padding: 2rem;
    padding-bottom: 4rem;
    border-radius: var(--card-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    flex-shrink: 0;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

/* Ensure footer stays at bottom */
.modal-footer {
    padding: 1rem 1.5rem;
    background-color: white;
    /* Match card bg usually, or slight contrast */
    border-top: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Layout: [Cancel] [Save] */
    gap: 1rem;
    flex-shrink: 0;
}

.close-modal {
    color: #9ca3af;
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #111827;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Service Grid Styles */
.service-grid-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 columnas */
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.service-option {
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.75rem 0.5rem;
    text-align: center;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    user-select: none;
}

.service-option:hover {
    border-color: var(--primary-color);
    background-color: #eef2ff;
}

.service-option.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.service-option.disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.7;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .container {
        padding: 1rem;
        max-width: 100%;
    }

    header {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .header-toolbar {
        flex-wrap: wrap;
        justify-content: center;
    }

    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0.5rem;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
        /* Prevent horizontal scroll */
    }

    header {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
        text-align: center;
        border-radius: 0;
        margin-bottom: 1rem;
    }

    .header-toolbar {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        background: transparent;
        border: none;
        padding: 0;
    }

    .btn-toolbar {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        background-color: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .btn-toolbar span {
        font-size: 1.2rem;
    }

    /* Show label on mobile for better UX if space permits, or hide if too crowded. 
       Currently hiding to save space as requested/implied by previous code */
    .btn-label {
        display: none;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .client-card {
        padding: 1rem;
        /* Ensure long words break */
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .modal-content {
        margin: 1rem auto;
        padding: 1.5rem;
        width: 95%;
        max-width: 95%;
    }

    .service-grid-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Admin Modal Styles */
.admin-tab {
    animation: fadeIn 0.3s ease-in-out;
}

.tab-btn.active {
    background: #0F766E !important;
    color: white !important;
    border-color: #0F766E !important;
}

#admin-services-list input {
    font-size: 0.9rem;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#admin-services-list .service-row {
    display: grid;
    grid-template-columns: 2fr 1fr 40px;
    gap: 10px;
    margin-bottom: 8px;
    align-items: center;
}


/* --- TOAST NOTIFICATIONS --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    /* Allow clicking through container */
}

.toast {
    background: white;
    color: #1f2937;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    max-width: 400px;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    /* Enable clicking on toast */
    border-left: 5px solid #3b82f6;
    /* Default info blue */
}

/* Toast Variants */
.toast-success {
    border-left-color: #22c55e;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-warning {
    border-left-color: #f59e0b;
}

.toast-info {
    border-left-color: #3b82f6;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    flex: 1;
    word-break: break-word;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.toast-close:hover {
    color: #111827;
}

@media (max-width: 600px) {
    #toast-container {
        top: auto;
        bottom: 20px;
        right: 0;
        left: 0;
        align-items: center;
        padding: 0 20px;
    }

    .toast {
        min-width: auto;
        width: 100%;
        transform: translateY(100%);
    }

    .toast.show {
        transform: translateY(0);
    }
}

/* --- IMPORTED STYLES FROM COSTOS.PHP --- */
:root {
    /* Merged variables */
    --primary: #0F766E;
    --primary-dark: #115E59;
    --accent: #10B981;
    --bg: #F3F4F6;
    --surface: #FFFFFF;
    --text-main: #1F2937;
    /* --text-secondary already exists but checking value: #6B7280 (same) */
    --border: #E5E7EB;
    --danger: #EF4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 16px;
}

/* Enhanced Modal Styles from costs.php */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    padding: 20px;
}

#modal-admin-costs {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    /* Ensure high z-index */
}

/* Specific selector to override conflicting styles */
div#modal-admin-costs .modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    padding: 0;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: fadeInScale 0.2s ease-out;
    max-height: 85vh;
    display: flex;
    /* Flex layout for body scroll */
    flex-direction: column;
    overflow: hidden;
    margin: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Modern Button Styles (Matches btn-toolbar) */
.btn-save {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 9999px;
    /* Pill/Circular */
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(15, 118, 110, 0.2);
}

.btn-save:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(15, 118, 110, 0.3);
}

.btn-save:active {
    transform: translateY(0);
}

.btn-cancel {
    background: white;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: 9999px;
    /* Pill/Circular */
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #111827;
}

.btn-force {
    grid-column: span 2;
    background-color: transparent;
    color: #ef4444;
    border: 1px dashed #fca5a5;
    padding: 0.75rem;
    border-radius: 9999px;
    /* Pill/Circular */
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.btn-force:hover {
    background-color: #fef2f2;
    border-color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}

.btn-close {
    background: #F3F4F6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 25px;
    background: #F9FAFB;
    border-top: 1px solid var(--border);
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Button overrides for this modal specifically if needed, 
   but generic classes are fine if scoped or unique */
.btn-logout {
    background: #FEF2F2;
    color: var(--danger);
    border: 1px solid #FECACA;
    padding: 8px 16px;
    border-radius: 9999px;
    /* Pill/Circular */
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #FEE2E2;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Form Styles */
.config-box {
    background: #F9FAFB;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 15px;
    margin-bottom: 25px;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.modern-input,
.modern-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-main);
    background: white;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.modern-input:focus,
.modern-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

/* Service Row Layout - using flex as requested by design */
#rowsContainer .service-row,
.service-list .service-row {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0 !important;
    background: transparent;
    /* Reset any previous bg */
}

.btn-remove {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    background: #FEF2F2;
    color: var(--danger);
    border: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-add {
    background: #ECFDF5;
    color: var(--primary);
    border: 1px dashed var(--primary);
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #E5E7EB;
    transition: .4s;
    border-radius: 34px;
}

.switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.switch input:checked+.slider {
    background-color: var(--primary);
}

.switch input:checked+.slider:before {
    transform: translateX(20px);
}

/* --- TOAST NOTIFICATIONS --- */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    /* Allow clicks through container */
}

.toast {
    background-color: white;
    color: #333;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.3s forwards;
    min-width: 300px;
    max-width: 400px;
    border-left: 6px solid #ccc;
    font-family: 'Inter', sans-serif;
    pointer-events: auto;
    /* Re-enable clicks on toasts */
    transition: all 0.3s ease;
}

.toast.success {
    border-left-color: #10B981;
    background-color: #ECFDF5;
    /* Soft Green */
    color: #065F46;
}

.toast.error {
    border-left-color: #EF4444;
    background-color: #FEF2F2;
    /* Soft Red */
    color: #991B1B;
}

.toast.info {
    border-left-color: #3B82F6;
    background-color: #EFF6FF;
    /* Soft Blue */
    color: #1E40AF;
}

.toast.warning {
    border-left-color: #F59E0B;
    background-color: #FFFBEB;
    /* Soft Yellow */
    color: #92400E;
}

.toast-icon {
    font-size: 1.4rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    margin-bottom: 2px;
    display: block;
}

.toast-message {
    font-size: 0.9rem;
    color: #555;
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutRight {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* --- GLOBAL SIDE PANEL STYLES --- */
.side-panel-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.4) !important;
    z-index: 5000 !important;
    /* Extremely high to top all modals */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.side-panel-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.side-panel {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 90% !important;
    max-width: 400px !important;
    height: 100% !important;
    background: #fff !important;
    z-index: 5001 !important;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15) !important;
    transform: translateX(100%) !important;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    display: flex !important;
    flex-direction: column !important;
}

/* RESPONSIVE: Full width on small screens */
@media (max-width: 600px) {
    .side-panel {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
    }
}

.side-panel.active {
    transform: translateX(0) !important;
}

.side-panel-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.side-panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color, #1e3a8a);
    margin: 0;
}

.side-panel-close {
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.side-panel-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.side-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* List Items - Mobile Optimized */
.panel-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    -webkit-tap-highlight-color: transparent;
}

.panel-item:active {
    transform: scale(0.98);
    background-color: #f9fafb;
}

.panel-item:hover {
    border-color: var(--primary-color, #1e3a8a);
    background: #f8fafc;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.panel-item-icon {
    margin-right: 1rem;
    color: var(--primary-color, #1e3a8a);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #eff6ff;
    border-radius: 10px;
    flex-shrink: 0;
}

.panel-item-info {
    flex: 1;
}

.panel-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.panel-item-price {
    font-size: 0.875rem;
    color: var(--success-color, #22c55e);
    font-weight: 500;
}

/* Hamburger Trigger Fix */
.service-selector-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #fff;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.service-selector-row:hover {
    border-color: var(--primary-color, #1e3a8a);
    background: #f9fafb;
}

.btn-hamburger {
    background: #eff6ff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    color: var(--primary-color, #1e3a8a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.selector-label {
    flex: 1;
    font-weight: 500;
    color: #374151;
    font-size: 0.95rem;
}