        :root {
            --radius: 16px;
            --shadow: 0 14px 30px rgba(0, 0, 0, .18);
            --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        }

        body[data-theme="dark"] {
            --primary: #FF7A00;
            --primary-gradient: linear-gradient(135deg, #FF7A00 0%, #EA580C 100%);
            --whatsapp: #25D366;
            --blue: #22D3EE;
            --mail: #FFB000;
            --dark: #E5E7EB;
            --gray: #94A3B8;
            --gray-light: rgba(148, 163, 184, .18);
            --bg-light: #0B1220;
            --white: #0F172A;
            --card-accent: rgba(255, 122, 0, 0.1);
        }

        body[data-theme="light"] {
            --primary: #FF7A00;
            --primary-gradient: linear-gradient(135deg, #FF7A00 0%, #EA580C 100%);
            --whatsapp: #25D366;
            --blue: #007AFF;
            --mail: #FF9500;
            --dark: #0F172A;
            --gray: #475569;
            --gray-light: #cbd5e1;
            --bg-light: #f8fafc;
            --white: #FFFFFF;
            --card-accent: rgba(255, 122, 0, 0.05);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Plus Jakarta Sans', sans-serif;
        }

        body {
            background-color: var(--bg-light);
            color: var(--dark);
            min-height: 100vh;
            display: flex;
            overflow-x: hidden;
        }

        /* --- NAVIGATION --- */
        .sidebar {
            width: 260px;
            background: var(--bg-light);
            border-right: 1px solid var(--gray-light);
            padding: 2rem 1rem;
            display: flex;
            flex-direction: column;
            position: fixed;
            height: 100vh;
            z-index: 1000;
            transition: var(--transition);
        }

        .sidebar .menu {
            flex: 1;
            overflow-y: auto;
            margin: 1rem 0;
            padding-right: 4px;
        }

        .sidebar .menu::-webkit-scrollbar {
            width: 4px;
        }

        .sidebar .menu::-webkit-scrollbar-thumb {
            background: rgba(0,0,0,0.05);
            border-radius: 10px;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 2rem;
            padding-left: 0.5rem;
        }

.logo-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
}

.logo-icon i {
    display: none;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

        .logo-text {
            font-weight: 800;
            font-size: 1.4rem;
            letter-spacing: -0.5px;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .menu-item {
            display: flex;
            align-items: center;
            padding: 0.85rem 1.2rem;
            margin-bottom: 6px;
            border-radius: 14px;
            text-decoration: none;
            color: var(--gray);
            font-weight: 600;
            transition: var(--transition);
            cursor: pointer;
            position: relative;
            border: 1px solid transparent;
        }

        .menu-item i {
            width: 20px;
            margin-right: 14px;
            font-size: 1.2rem;
            transition: var(--transition);
        }

        .menu-item:hover {
            background: rgba(109, 40, 217, 0.05);
            color: var(--primary);
            transform: translateX(4px);
        }

        .menu-item.active {
            background: rgba(255, 122, 0, 0.08);
            color: var(--primary) !important;
            font-weight: 700;
            border-left: 3px solid var(--primary);
            border-radius: 0 14px 14px 0;
            margin-left: -1rem;
            padding-left: calc(1.2rem + 1rem - 3px);
            box-shadow: none;
        }

        .menu-item.active i {
            color: var(--primary) !important;
        }

        .mobile-nav {
            display: none;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(12px);
            border-top: 1px solid var(--gray-light);
            padding: 0.8rem 0.5rem;
            z-index: 2000;
            overflow-x: auto;
            white-space: nowrap;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            -ms-overflow-style: none;
            gap: 15px;
            box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.05);
            justify-content: flex-start;
        }

        .mobile-nav::-webkit-scrollbar {
            display: none;
        }

        .mobile-nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: var(--gray);
            font-size: 0.78rem;
            text-decoration: none;
            gap: 6px;
            cursor: pointer;
            flex-shrink: 0;
            min-width: 85px;
            padding: 10px 5px;
            transition: all 0.2s;
            border-radius: 12px;
            font-weight: 700;
        }

        .mobile-nav-item i {
            font-size: 1.6rem;
        }

        .mobile-nav-item.active {
            color: var(--primary);
        }

        /* --- PAGES LOGIC --- */
        .page {
            display: none;
            animation: fadeIn 0.3s ease;
        }

        .page.active {
            display: block;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* --- MAIN CONTENT --- */
        .main-content {
            flex: 1;
            margin-left: 260px;
            padding: 2rem 2.5rem;
            width: calc(100% - 260px);
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
        }

        .alert {
            padding: 1rem;
            border-radius: 12px;
            margin-bottom: 1.5rem;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 12px;
            font-weight: 600;
        }

        .alert-info {
            background: rgba(0, 122, 255, 0.08);
            color: #007AFF;
            border: 1px solid rgba(0, 122, 255, 0.15);
        }

        /* --- UI COMPONENTS --- */
        .kpi-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1.25rem;
            margin-bottom: 2rem;
        }

        .kpi-card {
            background: var(--white);
            padding: 1.5rem;
            border-radius: var(--radius);
            border: 1px solid var(--gray-light);
            box-shadow: 0 4px 15px rgba(15, 23, 42, 0.05);
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: var(--transition);
        }

        .kpi-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 10px 25px rgba(255, 122, 0, 0.1);
            border-color: rgba(255, 122, 0, 0.2);
        }

        .section-card {
            background: var(--white);
            border-radius: var(--radius);
            padding: 1.5rem;
            border: 1px solid var(--gray-light);
            box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
            margin-bottom: 1.5rem;
            position: relative;
            overflow: hidden;
        }

        .section-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: var(--primary-gradient);
            opacity: 0.8;
        }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid var(--bg-light);
        }

        .table-container {
            overflow-x: auto;
            width: 100%;
            border-radius: 8px;
            border: 1px solid var(--bg-light);
        }

        table {
            width: 100%;
            border-collapse: collapse;
            min-width: 800px;
        }

        th {
            text-align: left;
            padding: 1rem;
            color: var(--gray);
            font-size: 0.85rem;
            border-bottom: 1px solid var(--gray-light);
            background: var(--bg-light);
        }

        td {
            padding: 1rem;
            border-bottom: 1px solid var(--bg-light);
            font-size: 0.9rem;
        }

        .table-scroll-hint {
            position: relative;
        }

        .table-scroll-hint::after {
            content: "\f061";
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            background: var(--white);
            color: var(--primary);
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: grid;
            place-items: center;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s;
        }

        @media (max-width: 768px) {
            .table-scroll-hint::after {
                opacity: 0.8;
            }
        }

        .btn {
            border: none;
            padding: 0.7rem 1.25rem;
            border-radius: 10px;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .btn-primary {
            background: var(--primary-gradient);
            color: white;
            box-shadow: 0 4px 10px rgba(255, 122, 0, 0.2);
        }

        .btn-primary:hover {
            box-shadow: 0 6px 15px rgba(255, 122, 0, 0.3);
            transform: translateY(-1px);
        }

        .btn-outline {
            background: var(--white);
            border: 1px solid var(--gray);
            color: var(--gray);
        }

        .btn-white {
            background: var(--white);
            color: var(--primary);
            border: 1px solid var(--gray-light);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        }

        .btn-white:hover {
            background: var(--bg-light);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
        }

        .badge {
            padding: 4px 10px;
            border-radius: 99px;
            font-size: 0.75rem;
            font-weight: 700;
        }

        .badge-confirmed {
            background: #DCFCE7;
            color: #15803D;
        }

        .badge-pending {
            background: #FEF9C3;
            color: #854D0E;
        }

        .badge-cancelled {
            background: #FEE2E2;
            color: #B91C1C;
        }

        .badge-business {
            background: var(--primary) !important;
            color: white !important;
        }

        .badge-pro {
            background: var(--blue) !important;
            color: white !important;
        }

        /* Multicanal Selector */
        .channel-selector {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            margin: 10px 0;
        }

        .channel-opt {
            border: 1px solid var(--gray-light);
            padding: 10px;
            border-radius: 10px;
            text-align: center;
            cursor: pointer;
        }

        .channel-opt input {
            display: none;
        }

        .channel-opt:has(input:checked) {
            border-color: var(--primary);
            background: #F0FDF4;
            color: var(--primary);
        }

        /* Calendrier */
        .week-calendar {
            display: grid;
            grid-template-columns: 60px repeat(7, 1fr);
            background: var(--white);
            border: 1px solid var(--gray-light);
            border-radius: 12px;
            overflow: hidden;
        }

        .time-col {
            border-right: 1px solid var(--gray-light);
            width: 50px;
            flex-shrink: 0;
            background: var(--white);
        }

        .time-label {
            height: 60px;
            display: flex;
            align-items: flex-start;
            justify-content: center;
            font-size: 0.7rem;
            color: var(--gray);
            padding-top: 5px;
        }

        .day-col {
            border-right: 1px solid var(--gray-light);
            min-height: 820px;
            position: relative;
            background-image:
                linear-gradient(var(--gray-light) 1px, transparent 1px),
                linear-gradient(90deg, transparent, transparent),
                linear-gradient(var(--bg-light) 1px, transparent 1px);
            background-size: 100% 60px, 100% 100%, 100% 30px;
            background-position: 0 40px, 0 0, 0 40px;
        }

        .event-box {
            position: absolute;
            left: 4px;
            right: 4px;
            background: rgba(109, 40, 217, 0.08);
            border-left: 3px solid var(--primary);
            border-radius: 8px;
            padding: 8px;
            font-size: 0.72rem;
            cursor: pointer;
            z-index: 10;
            box-shadow: 0 4px 12px rgba(109, 40, 217, 0.06);
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            border-right: 1px solid rgba(109, 40, 217, 0.05);
            border-bottom: 1px solid rgba(109, 40, 217, 0.05);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            justify-content: center;
            touch-action: none;
        }

        .event-box.dragging-touch {
            opacity: 0.8;
            transform: scale(1.05);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
            transition: none !important;
            z-index: 2000;
        }

        .event-box-ghost {
            position: absolute;
            left: 4px;
            right: 4px;
            background: rgba(109, 40, 217, 0.04);
            border: 2px dashed var(--primary);
            border-radius: 8px;
            z-index: 5;
            pointer-events: none;
            display: none;
        }

        .event-box:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 15px rgba(109, 40, 217, 0.12);
            z-index: 11;
            background: rgba(109, 40, 217, 0.12);
        }

        /* Mobile Day Picker */
        .mobile-day-picker {
            display: flex;
            overflow-x: auto;
            gap: 10px;
            padding: 10px 5px;
            scrollbar-width: none;
            -ms-overflow-style: none;
            background: var(--white);
            border-bottom: 1px solid var(--gray-light);
            margin-bottom: 5px;
            border-radius: 12px;
        }

        .mobile-day-picker::-webkit-scrollbar {
            display: none;
        }

        .day-picker-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-width: 55px;
            height: 70px;
            border-radius: 16px;
            background: var(--bg-light);
            cursor: pointer;
            transition: all 0.2s;
            border: 1px solid transparent;
        }

        .day-picker-item.active {
            background: var(--primary);
            color: white;
            box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
            transform: scale(1.05);
        }

        .day-picker-item .day-name {
            font-size: 0.65rem;
            text-transform: uppercase;
            font-weight: 700;
            opacity: 0.7;
        }

        .day-picker-item.active .day-name {
            opacity: 1;
        }

        .day-picker-item .day-num {
            font-size: 1.1rem;
            font-weight: 900;
        }

        /* Month View Specifics */
        .month-day {
            min-height: 120px;
            border: 1px solid var(--bg-light);
            padding: 8px;
            position: relative;
            background: var(--white);
            transition: background 0.2s;
        }

        .month-day:hover {
            background: var(--bg-light);
        }

        .month-day.other-month {
            opacity: 0.3;
            background: #fdfdfd;
        }

        .month-apt-dot {
            font-size: 0.65rem;
            background: var(--primary-light);
            color: var(--primary);
            padding: 2px 6px;
            border-radius: 4px;
            margin-bottom: 3px;
            cursor: pointer;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            border-left: 2px solid var(--primary);
            font-weight: 500;
        }

        .month-apt-dot:hover {
            filter: brightness(0.95);
        }

        /* Current Time Indicator */
        .now-indicator {
            position: absolute;
            left: 0;
            right: 0;
            height: 2px;
            background: #ef4444;
            z-index: 100;
            pointer-events: none;
            display: flex;
            align-items: center;
        }

        .now-indicator::before {
            content: '';
            position: absolute;
            left: -4px;
            width: 8px;
            height: 8px;
            background: #ef4444;
            border-radius: 50%;
        }

        /* Modal Standard Close */
        .modal-close {
            position: absolute;
            top: 20px;
            right: 20px;
            cursor: pointer;
            color: var(--gray);
            font-size: 1.2rem;
            transition: var(--transition);
            width: 32px;
            height: 32px;
            display: grid;
            place-items: center;
            border-radius: 50%;
            background: var(--bg-light);
            z-index: 10;
        }

        .modal-close:hover {
            background: var(--gray-light);
            color: var(--dark);
        }

        /* Toggle */
        .mode-toggle {
            background: var(--bg-light);
            padding: 1rem;
            border-radius: 12px;
            margin-top: auto;
        }

        .toggle {
            width: 44px;
            height: 22px;
            position: relative;
            display: inline-block;
            cursor: pointer;
        }

        .toggle input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            inset: 0;
            background: #CBD5E1;
            border-radius: 34px;
            transition: .3s;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 3px;
            bottom: 3px;
            background: white;
            border-radius: 50%;
            transition: .3s;
        }

        input:checked+.slider {
            background: var(--primary);
        }

        input:checked+.slider:before {
            transform: translateX(22px);
        }

        /* Logic visibility */
        body.simple-mode .advanced {
            display: none !important;
        }

        @media (max-width: 1024px) {
            .sidebar {
                width: 80px;
                padding: 1.5rem 0.5rem;
                align-items: center;
            }

            .sidebar .logo-text,
            .sidebar .menu-item span,
            .mode-toggle-label {
                display: none;
            }

            .main-content {
                margin-left: 80px;
                width: calc(100% - 80px);
            }
        }

        @media (max-width: 768px) {
            .sidebar {
                display: none;
            }

            .mobile-nav {
                display: flex;
            }

            .main-content {
                margin-left: 0 !important;
                width: 100% !important;
                padding: 1rem 1rem 8rem 1rem;
            }

            .header {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }

            .header .btn {
                width: 100%;
                justify-content: center;
            }

            .kpi-container {
                grid-template-columns: 1fr 1fr 1fr;
            }

            .wizard-card {
                padding: 20px;
                border-radius: 0;
            }

            .cat-grid {
                grid-template-columns: 1fr 1fr 1fr;
            }

            .sync-panel {
                grid-template-columns: 1fr;
            }

            .login-card {
                grid-template-columns: 1fr;
                padding: 10px;
            }

            .login-hero {
                min-height: auto;
                padding: 15px;
            }

            /* Wizard stacking */
            #onboardingScreen .wizard-card {
                padding: 15px 15px 100px 15px !important;
                min-height: 100vh;
                display: flex;
                flex-direction: column;
                border-radius: 0;
            }

            #onboardingScreen div[style*="display:grid"],
            #onboardingScreen div[style*="display: grid"] {
                grid-template-columns: 1fr !important;
                gap: 12px !important;
            }

            #onboardingScreen div[style*="display:flex; justify-content: space-between"] {
                flex-direction: column-reverse !important;
                gap: 10px !important;
            }

            #onboardingScreen div[style*="display:flex; justify-content: space-between"] .btn {
                width: 100% !important;
            }

            .cat-grid {
                grid-template-columns: repeat(2, 1fr) !important;
            }

            /* Settings grids stacking */
            #settings .section-card>div[style*="grid-template-columns"] {
                grid-template-columns: 1fr !important;
            }

            #settings div[style*="display: flex; justify-content: space-between"] {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 10px !important;
            }

            /* Appointment Modal stacking */
            #aptModal .modal-content,
            .modal-content {
                width: 95% !important;
                padding: 20px 20px 80px 20px !important;
                max-height: 90vh;
                overflow-y: auto;
            }

            #aptModal div[style*="display:grid"] {
                grid-template-columns: 1fr !important;
                gap: 15px !important;
            }

            #aptModal .modal-footer,
            #aptModal div[style*="display:flex; gap:10px"] {
                flex-direction: column !important;
                gap: 10px !important;
            }

            #aptModal .btn {
                width: 100% !important;
            }

            .section-header {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 12px !important;
            }

            .section-header .btn {
                width: 100% !important;
            }

            .login-card {
                grid-template-columns: 1fr;
            }

            .login-hero,
            .login-form-container {
                padding: 30px 20px !important;
            }

            /* Pricing Responsiveness */
            .pricing-grid {
                grid-template-columns: 1fr !important;
                padding: 15px !important;
                gap: 15px !important;
            }

            .pricing-card {
                padding: 20px !important;
            }

            .pricing-card h3 {
                font-size: 1.2rem !important;
            }

            .pricing-card ul {
                margin-bottom: 20px !important;
            }

            #pricingModal .modal-content {
                width: 95% !important;
                max-height: 90vh;
                overflow-y: auto;
            }

            .mobile-day-picker {
                margin: 0 -1rem 10px -1rem;
                padding: 10px 1rem;
                border-radius: 0;
            }

            .login-hero h1 {
                font-size: 2rem !important;
            }

            .login-bullets {
                display: none !important;
            }

            .login-hero p {
                margin-bottom: 20px !important;
            }

            /* Agenda Mobile Optimization */
            .week-calendar {
                min-width: unset !important;
                border-radius: 12px !important;
            }

            #calendarGrid {
                min-width: 100% !important;
            }

            /* Day View tweaks */
            #calendarGrid[style*="grid-template-columns: 60px 1fr"] {
                min-width: 100% !important;
            }

            /* Week View tweaks - horizontal scroll is okay but headers should stick */
            #calendarGrid[style*="grid-template-columns: 60px repeat(7, 1fr)"] {
                min-width: 800px !important;
            }

            .event-box {
                padding: 4px !important;
                font-size: 0.7rem !important;
                border-radius: 4px !important;
            }

            .time-col {
                width: 45px !important;
            }

            .time-label {
                font-size: 0.6rem !important;
            }

            #agenda .header button.btn-primary.small {
                display: none !important;
            }

            #agenda .header h2 {
                font-size: 1.5rem !important;
            }
        }

        @media (max-width: 480px) {
            .kpi-container {
                grid-template-columns: 1fr;
            }

            .login-actions {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }

            .login-hero h1 {
                font-size: 1.6rem;
            }
        }

        /* --- FORMS / MODAL (added) --- */
        .form-label {
            display: block;
            font-size: 0.8rem;
            font-weight: 800;
            color: var(--gray);
            margin-bottom: 6px;
            text-transform: uppercase;
            letter-spacing: .04em;
        }

        .form-control {
            width: 100%;
            padding: 0.75rem 0.9rem;
            border-radius: 12px;
            border: 1px solid var(--gray-light);
            background: var(--white);
            outline: none;
            transition: var(--transition);
            font-weight: 600;
            color: var(--dark);
        }

        .form-control:focus,
        .select:focus {
            border-color: rgba(0, 209, 102, 0.55);
            box-shadow: 0 0 0 4px rgba(0, 209, 102, 0.12);
        }

        .select {
            width: 100%;
            padding: 0.75rem 2.2rem 0.75rem 0.9rem;
            border-radius: 12px;
            border: 1px solid var(--gray-light);
            background: var(--white);
            outline: none;
            transition: var(--transition);
            font-weight: 600;
            color: var(--dark);
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 0.8rem center;
            background-size: 1.1rem;
            cursor: pointer;
        }

        .select:hover {
            border-color: var(--gray);
        }

        .select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 4px rgba(0, 209, 102, 0.12);
        }

        .help {
            color: var(--gray);
            font-size: 0.85rem;
            margin-top: 6px;
        }

        .pill {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 10px;
            border-radius: 999px;
            font-size: 0.75rem;
            font-weight: 800;
            border: 1px solid var(--gray-light);
            background: var(--bg-light);
            color: var(--gray);
        }

        .pill-ok {
            border-color: rgba(0, 209, 102, .25);
            background: rgba(0, 209, 102, .08);
            color: #0F766E;
        }

        .pill-warn {
            border-color: rgba(255, 149, 0, .25);
            background: rgba(255, 149, 0, .10);
            color: #9A3412;
        }

        .pill-bad {
            border-color: rgba(239, 68, 68, .25);
            background: rgba(239, 68, 68, .10);
            color: #991B1B;
        }

        .modal {
            position: fixed;
            inset: 0;
            display: none;
            align-items: center;
            justify-content: center;
            background: rgba(15, 23, 42, .45);
            backdrop-filter: blur(6px);
            z-index: 3000;
            padding: 18px;
        }

        .modal.active {
            display: flex !important;
        }

        .modal-content {
            width: min(500px, 95%);
            background: var(--white);
            border-radius: 24px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 30px 70px rgba(2, 6, 23, .35);
            padding: 30px;
            animation: modalScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            position: relative;
        }

        @keyframes modalScale {
            from {
                opacity: 0;
                transform: scale(0.95);
            }

            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        /* --- INTEGRATIONS --- */
        .integration-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 24px;
            margin-top: 20px;
        }

        .integration-card {
            border: 1px solid var(--gray-light);
            background: var(--white);
            border-radius: 20px;
            padding: 24px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .integration-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
            border-color: var(--primary);
        }

        .integration-top {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .integration-info {
            flex: 1;
        }

        .integration-info h4 {
            margin: 0 0 4px 0;
            font-size: 1.1rem;
            font-weight: 700;
        }

        .integration-actions {
            margin-top: auto;
            border-top: 1px solid var(--gray-light);
            padding-top: 16px;
            display: flex;
            justify-content: flex-end;
        }

        .integration-ico {
            width: 52px;
            height: 52px;
            border-radius: 14px;
            display: grid;
            place-items: center;
            font-size: 24px;
            flex-shrink: 0;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        }

        .integration-footer-box {
            margin-top: 30px;
            padding: 25px;
            background: var(--bg-light);
            border-radius: 15px;
            border: 1px solid var(--gray-light);
        }

        .upgrade-banner {
            background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
            color: white;
            padding: 20px;
            border-radius: 15px;
            margin-bottom: 25px;
            display: none;
            /* Controlled via JS */
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
        }

        .upgrade-banner-content {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .upgrade-banner-content i {
            font-size: 2rem;
            opacity: 0.9;
        }

        .integration-ico.google {
            background: #fdf2f2;
            border: 1px solid #fee2e2;
            color: #ea4335;
        }

        .integration-ico.outlook {
            background: #f0f7ff;
            border: 1px solid #e0f2fe;
            color: #0078d4;
        }

        .integration-ico.icloud {
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            color: #1c1c1e;
        }

        .integration-ico.whatsapp {
            background: #f0fdf4;
            border: 1px solid #dcfce7;
            color: #22c55e;
        }

        .integration-ico.mail {
            background: #fffbe3;
            border: 1px solid #fef9c3;
            color: #ca8a04;
        }

        /* --- WIZARD --- */
        #onboardingScreen {
            position: fixed;
            inset: 0;
            background: var(--bg-light);
            z-index: 5000;
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .wizard-card {
            width: min(600px, 100%);
            background: var(--white);
            border-radius: 24px;
            box-shadow: 0 40px 100px rgba(0, 0, 0, 0.15);
            padding: 40px;
            position: relative;
            overflow: hidden;
        }

        .wizard-step {
            display: none;
        }

        .wizard-step.active {
            display: block;
            animation: fadeIn 0.4s ease-out;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .wizard-progress {
            display: flex;
            gap: 8px;
            margin-bottom: 30px;
        }

        .progress-dot {
            height: 6px;
            flex: 1;
            background: var(--gray-light);
            border-radius: 10px;
            transition: var(--transition);
        }

        .progress-dot.active {
            background: var(--primary);
        }

        /* --- PROMOTION WIZARD ENHANCEMENTS --- */
        .pw-progress {
            display: flex;
            justify-content: space-between;
            margin-bottom: 30px;
            position: relative;
        }

        .pw-progress::before {
            content: "";
            position: absolute;
            top: 50%;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--bg-light);
            z-index: 1;
            transform: translateY(-50%);
        }

        .pw-dot {
            width: 32px;
            height: 32px;
            background: var(--white);
            border: 2px solid var(--bg-light);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            font-weight: 700;
            z-index: 2;
            transition: var(--transition);
            color: var(--gray);
        }

        .pw-dot.active {
            border-color: var(--primary);
            color: var(--primary);
            background: var(--white);
            box-shadow: 0 0 10px rgba(255, 122, 0, 0.2);
        }

        .pw-dot.completed {
            background: var(--primary);
            border-color: var(--primary);
            color: white;
        }

        .wizard-step-container {
            display: none;
        }

        .wizard-step-container.active {
            display: block;
            animation: slideIn 0.3s ease-out;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateX(20px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .edu-box {
            background: #f8fafc;
            border-radius: 12px;
            padding: 15px;
            margin-bottom: 20px;
            border-left: 4px solid var(--primary);
        }

        .edu-box h5 {
            margin: 0 0 5px 0;
            font-size: 0.9rem;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .edu-box p {
            margin: 0;
            font-size: 0.8rem;
            line-height: 1.4;
            color: var(--gray);
        }

        .preview-box {
            background: #f0fdf4;
            border: 1px solid #dcfce7;
            border-radius: 16px;
            padding: 20px;
            position: relative;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }

        .preview-box::before {
            content: attr(data-title);
            position: absolute;
            top: -10px;
            right: 20px;
            background: #22c55e;
            color: white;
            padding: 2px 10px;
            border-radius: 10px;
            font-size: 0.7rem;
            font-weight: 800;
        }

        .tag-premium {
            background: linear-gradient(135deg, #FF7A00 0%, #FFB800 100%);
            color: white;
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 6px;
            font-weight: 800;
            text-transform: uppercase;
            margin-left: 5px;
        }

        .cat-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-top: 20px;
        }

        .cat-card {
            border: 2px solid var(--gray-light);
            padding: 20px;
            border-radius: 16px;
            text-align: center;
            cursor: pointer;
            transition: var(--transition);
        }

        .cat-card:hover {
            border-color: var(--primary);
            background: rgba(255, 122, 0, 0.05);
        }

        .cat-card.active {
            border-color: var(--primary);
            background: rgba(255, 122, 0, 0.1);
        }

        .cat-card i {
            font-size: 1.5rem;
            margin-bottom: 10px;
            color: var(--primary);
        }

        .service-list {
            max-height: 250px;
            overflow-y: auto;
            margin-top: 15px;
            border: 1px solid var(--gray-light);
            border-radius: 12px;
            padding: 10px;
        }

        .service-opt {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px;
            border-bottom: 1px solid var(--bg-light);
        }


        .integration-ico.mail {
            background: rgba(255, 149, 0, .10);
            border-color: rgba(255, 149, 0, .20);
            color: var(--mail);
        }

        .integration-ico.whatsapp {
            background: rgba(37, 211, 102, .08);
            border-color: rgba(37, 211, 102, .18);
            color: var(--whatsapp);
        }

        .integration-card h4 {
            font-size: 1.05rem;
            font-weight: 900;
            margin: 0;
        }

        .integration-card p {
            color: var(--gray);
            font-weight: 600;
            margin-top: 8px;
            font-size: .9rem;
        }

        .integration-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin-top: 12px;
        }

        .small {
            font-size: .82rem;
            color: var(--gray);
            font-weight: 650;
        }

        .divider {
            height: 1px;
            background: var(--bg-light);
            margin: 14px 0;
        }

        /* --- TWO-WAY SYNC PANEL --- */
        .sync-panel {
            display: flex;
            flex-direction: column;
            gap: 16px;
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid var(--bg-light);
        }

        .sync-box {
            background: #f8fafc;
            border-radius: 12px;
            padding: 16px;
        }

        .sync-box h5 {
            font-size: .75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .05em;
            color: var(--primary);
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .sync-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            padding: 8px 0;
            border-bottom: 1px dashed rgba(100, 116, 139, .25);
        }

        .sync-row:last-child {
            border-bottom: none;
        }

        .select {
            width: 100%;
            padding: 10px 12px;
            border-radius: 12px;
            border: 1px solid var(--gray-light);
            background: var(--white);
            font-weight: 700;
            color: var(--dark);
        }

        /* --- TOAST --- */
        .toast {
            position: fixed;
            right: 18px;
            bottom: 18px;
            z-index: 20000;
            background: rgba(15, 23, 42, .96);
            color: white;
            border: 1px solid rgba(255, 255, 255, .08);
            padding: 12px 14px;
            border-radius: 14px;
            box-shadow: 0 18px 40px rgba(2, 6, 23, .25);
            display: none;
            min-width: 260px;
        }

        .toast.show {
            display: block;
            animation: fadeIn .25s ease;
        }

        .toast .t-title {
            font-weight: 900;
            margin-bottom: 4px;
        }

        .toast .t-msg {
            opacity: .9;
            font-weight: 650;
            font-size: .9rem;
        }

        /* --- ADVANCED SECTION LABEL --- */
        .tag-advanced {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 8px;
            border-radius: 999px;
            font-size: .72rem;
            font-weight: 900;
            color: #7C3AED;
            background: rgba(139, 92, 246, .10);
            border: 1px solid rgba(139, 92, 246, .18);
            margin-left: 8px;
        }

        /* --- KPI VALUE (missing in base) --- */
        .kpi-info h3 {
            font-size: .85rem;
            color: var(--gray);
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: .05em;
            margin-bottom: 6px;
        }

        .kpi-info .value {
            font-size: 1.85rem;
            font-weight: 950;
            letter-spacing: -.04em;
        }


        /* --- LOGIN (enhanced) --- */
        .login-wrap {
            position: fixed;
            inset: 0;
            z-index: 9999;
            width: 100%;
            height: 100%;
            overflow-y: auto;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px;
            background:
                radial-gradient(circle at 10% 20%, rgba(255, 122, 0, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(37, 211, 102, 0.12) 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, rgba(0, 122, 255, 0.08) 0%, transparent 50%),
                var(--bg-light);
        }

        .login-wrap::before {
            content: "";
            position: absolute;
            width: 200%;
            height: 200%;
            background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 2000 2000' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
            opacity: 0.03;
            pointer-events: none;
        }

        .login-card {
            width: min(960px, 100%);
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0;
            padding: 0;
            border-radius: 32px;
            border: 1px solid rgba(255, 255, 255, 0.3);
            background: rgba(255, 255, 255, 0.7);
            box-shadow: 0 40px 100px -20px rgba(2, 6, 23, 0.15);
            backdrop-filter: blur(20px);
            overflow: hidden;
            animation: cardAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        }

        @keyframes cardAppear {
            from {
                opacity: 0;
                transform: scale(0.95) translateY(20px);
            }

            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .login-hero {
            padding: 64px 48px;
            background: linear-gradient(135deg, rgba(37, 211, 102, 0.1), rgba(0, 122, 255, 0.05));
            border-right: 1px solid rgba(15, 23, 42, 0.05);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .login-hero-top {
            animation: fadeInLeft 0.6s ease-out 0.2s both;
        }

        @keyframes fadeInLeft {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .login-form-container {
            padding: 48px;
            background: var(--white);
            display: flex;
            flex-direction: column;
            justify-content: center;
            position: relative;
        }

        .login-hero h1 {
            font-size: 2.8rem;
            font-weight: 950;
            letter-spacing: -0.05em;
            margin: 0 0 24px 0;
            line-height: 1.1;
            background: linear-gradient(135deg, var(--dark), var(--primary));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .login-hero p {
            font-size: 1.1rem;
            line-height: 1.6;
            margin-bottom: 48px;
            opacity: 0.8;
        }

        .login-bullets {
            display: grid;
            gap: 20px;
        }

        .login-bullets .b {
            display: flex;
            gap: 16px;
            align-items: center;
            padding: 20px;
            border-radius: 24px;
            background: var(--bg-light);
            border: 1px solid var(--gray-light);
            transition: all 0.3s ease;
            color: var(--dark);
        }

        .login-bullets .b:hover {
            background: var(--white);
            transform: translateX(8px);
            box-shadow: var(--shadow);
        }

        .login-form {
            border-radius: 18px;
            padding: 18px;
            border: 1px solid rgba(15, 23, 42, .06);
            background: rgba(255, 255, 255, .9);
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .login-form h2 {
            font-size: 1.25rem;
            font-weight: 950;
            margin: 0 0 6px;
        }

        .login-form .small {
            margin-bottom: 14px;
        }

        .login-actions {
            display: flex;
            gap: 10px;
            align-items: center;
            justify-content: space-between;
            margin-top: 12px;
            flex-wrap: wrap;
        }

        .link-btn {
            background: none;
            border: none;
            padding: 0;
            color: var(--primary);
            font-weight: 800;
            cursor: pointer;
        }

        .login-footer {
            margin-top: 12px;
            color: var(--gray);
            font-size: .82rem;
            font-weight: 650;
        }

        @media (max-width: 860px) {
            .login-card {
                grid-template-columns: 1fr;
            }

            .login-hero {
                min-height: 260px;
            }
        }


        /* === THEME PACK (Dark + Light) === */
        body[data-theme="dark"] .sidebar {
            background: rgba(15, 23, 42, .92);
            border-right: 1px solid rgba(148, 163, 184, .18);
        }

        body[data-theme="dark"] .content {
            background: transparent;
        }

        body[data-theme="dark"] .section-card,
        body[data-theme="dark"] .integration-card,
        body[data-theme="dark"] .kpi-card,
        body[data-theme="dark"] .stat-card,
        body[data-theme="dark"] .login-card,
        body[data-theme="dark"] .login-form-container,
        body[data-theme="dark"] .login-form {
            background: rgba(15, 23, 42, .92);
            border-color: rgba(148, 163, 184, .16);
            box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
        }

        body[data-theme="dark"] .login-hero {
            background: linear-gradient(135deg, rgba(255, 122, 0, .20), rgba(139, 92, 246, .16));
            border-color: rgba(148, 163, 184, .14);
        }

        body[data-theme="dark"] .table-container {
            border-color: rgba(148, 163, 184, .16);
        }

        body[data-theme="dark"] table th {
            background: rgba(255, 255, 255, .04);
            color: rgba(229, 231, 235, .92);
        }

        body[data-theme="dark"] table td {
            border-color: rgba(148, 163, 184, .14);
        }

        body[data-theme="dark"] .menu-item:hover,
        body[data-theme="dark"] .menu-item.active {
            background: rgba(255, 122, 0, .10);
            color: var(--primary);
        }

        body[data-theme="dark"] .menu-item.active {
            background: rgba(255, 122, 0, .14);
        }

        body[data-theme="dark"] .mobile-nav {
            background: rgba(15, 23, 42, .92);
            border-top-color: rgba(148, 163, 184, .18);
        }

        body[data-theme="dark"] .mobile-nav-item.active {
            color: var(--primary);
        }

        body[data-theme="dark"] .form-control,
        body[data-theme="dark"] .select {
            background: rgba(2, 6, 23, .40);
            border-color: rgba(148, 163, 184, .20);
            color: var(--dark);
        }

        body[data-theme="dark"] .form-control::placeholder {
            color: rgba(148, 163, 184, .75);
        }

        body[data-theme="dark"] .btn-outline {
            background: rgba(255, 255, 255, .03);
            border-color: rgba(148, 163, 184, .20);
            color: var(--dark);
        }

        body[data-theme="dark"] .btn-outline:hover {
            background: rgba(255, 255, 255, .05);
        }

        body[data-theme="dark"] .pill {
            background: rgba(255, 255, 255, .04);
            border-color: rgba(148, 163, 184, .20);
        }

        /* Light Theme Sidebar Fix & Premium Look */
        body[data-theme="light"] .sidebar {
            background: #F1F5F9;
            border-right: 1px solid rgba(2, 6, 23, 0.05);
            box-shadow: none;
        }

        body[data-theme="light"] .sidebar .logo-text {
            color: var(--dark);
        }

        body[data-theme="light"] .sidebar .menu-item {
            color: var(--gray);
        }

        body[data-theme="light"] .sidebar .menu-item:hover {
            background: rgba(255, 122, 0, 0.04);
            color: var(--primary);
        }

        body[data-theme="light"] .sidebar .menu-item.active {
            background: rgba(255, 122, 0, 0.08);
            color: var(--primary);
            box-shadow: none;
        }

        body[data-theme="light"] .mobile-nav {
            background: rgba(255, 255, 255, .98);
        }

        body[data-theme="light"] .mobile-nav-item {
            color: var(--gray);
        }

        body[data-theme="light"] .mobile-nav-item.active {
            color: var(--primary);
        }

        body[data-theme="light"] table th {
            background: #F3F4F6;
        }

        body[data-theme="light"] .btn-primary {
            background: var(--primary-gradient);
        }

        body[data-theme="light"] .section-card,
        body[data-theme="light"] .integration-card,
        body[data-theme="light"] .kpi-card,
        body[data-theme="light"] .stat-card {
            box-shadow: 0 10px 18px rgba(2, 6, 23, .06);
        }


        /* --- LOGIN FIX (overlay + hide app when logged out) --- */
        #loginScreen {
            position: fixed;
            inset: 0;
            z-index: 9999;
        }

        #appShell {
            display: none;
        }

        /* --- LOADING SPINNER --- */
        .spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255, 255, 255, .3);
            border-radius: 50%;
            border-top-color: #fff;
            animation: spin 1s ease-in-out infinite;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        .btn:disabled {
            opacity: 0.7;
            cursor: not-allowed;
        }

        /* Tabs Styling */
        .tab-btn {
            padding: 12px 20px;
            background: transparent;
            border: none;
            border-bottom: 2px solid transparent;
            color: var(--gray);
            font-weight: 600;
            font-size: 0.95rem;
            cursor: pointer;
            transition: var(--transition);
            position: relative;
        }

        .tab-btn:hover {
            color: var(--primary);
        }

        .tab-btn.active {
            color: var(--primary);
            border-bottom: 2px solid var(--primary);
        }

        /* Upsell Styling */
        .upsell-card {
            background: linear-gradient(135deg, rgba(109, 40, 217, 0.05) 0%, rgba(255, 122, 0, 0.05) 100%);
            border: 2px dashed rgba(109, 40, 217, 0.2);
            border-radius: 20px;
            padding: 40px;
            text-align: center;
            max-width: 600px;
            margin: 40px auto;
            animation: fadeIn 0.5s ease;
        }

        .upsell-card-icon {
            width: 80px;
            height: 80px;
            background: var(--primary-gradient);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 24px;
            font-size: 32px;
            color: white;
            box-shadow: 0 10px 20px rgba(109, 40, 217, 0.3);
        }

        body[data-theme="dark"] .service-card:hover,
        body[data-theme="dark"] .resource-card:hover {
            background: rgba(148, 163, 184, .12) !important;
        }

        /* --- SIMPLE MODE AUDIT --- */
        .simple-mode .menu-item[onclick="navigateTo('integrations')"],
        .simple-mode .menu-item[onclick="navigateTo('team')"],
        .simple-mode .menu-item[onclick="navigateTo('promotions')"],
        .simple-mode .menu-item[onclick="navigateTo('messages')"],
        .simple-mode .mobile-nav-item[onclick="navigateTo('team')"],
        .simple-mode .mobile-nav-item[onclick="navigateTo('promotions')"],
        .simple-mode .mobile-nav-item[onclick="navigateTo('integrations')"],
        .simple-mode .mobile-nav-item[onclick="navigateTo('messages')"] {
            display: none !important;
        }

        .simple-mode .tag-premium {
            display: none !important;
        }

        /* --- UTILITY CLASSES (MIGRATED FROM INLINE STYLES) --- */
        .d-none { display: none; }
        .d-flex { display: flex; }
        .d-grid { display: grid; }
        .flex-between { justify-content: space-between !important; }
        .flex-center { align-items: center !important; }
        .justify-center { justify-content: center !important; }
        .flex-column { flex-direction: column !important; }
        .flex-wrap { flex-wrap: wrap !important; }
        .flex-1 { flex: 1 !important; }
        
        .gap-4 { gap: 4px !important; }
        .gap-6 { gap: 6px !important; }
        .gap-8 { gap: 8px !important; }
        .gap-10 { gap: 10px !important; }
        .gap-12 { gap: 12px !important; }
        .gap-15 { gap: 15px !important; }
        .gap-20 { gap: 20px !important; }
        .gap-24 { gap: 24px !important; }

        .mt-5 { margin-top: 5px !important; }
        .mt-8 { margin-top: 8px !important; }
        .mt-10 { margin-top: 10px !important; }
        .mt-15 { margin-top: 15px !important; }
        .mt-20 { margin-top: 20px !important; }
        .mt-24 { margin-top: 24px !important; }
        .mt-30 { margin-top: 30px !important; }
        .mt-32 { margin-top: 32px !important; }

        .mb-0 { margin-bottom: 0 !important; }
        .mb-2 { margin-bottom: 2px !important; }
        .mb-4 { margin-bottom: 4px !important; }
        .mb-5 { margin-bottom: 5px !important; }
        .mb-8 { margin-bottom: 8px !important; }
        .mb-10 { margin-bottom: 10px !important; }
        .mb-12 { margin-bottom: 12px !important; }
        .mb-15 { margin-bottom: 15px !important; }
        .mb-16 { margin-bottom: 16px !important; }
        .mb-20 { margin-bottom: 20px !important; }
        .mb-24 { margin-bottom: 24px !important; }
        .mb-25 { margin-bottom: 25px !important; }
        .mb-30 { margin-bottom: 30px !important; }

        .p-10 { padding: 10px !important; }
        .p-12 { padding: 12px !important; }
        .p-15 { padding: 15px !important; }
        .p-20 { padding: 20px !important; }
        .p-25 { padding: 25px !important; }
        .p-30 { padding: 30px !important; }
        .pt-15 { padding-top: 15px !important; }
        .pt-20 { padding-top: 20px !important; }
        .pt-24 { padding-top: 24px !important; }
        .pt-25 { padding-top: 25px !important; }

        .text-center { text-align: center !important; }
        .text-right { text-align: right !important; }
        .text-primary { color: var(--primary) !important; }
        .text-gray { color: var(--gray) !important; }
        .text-white { color: white !important; }
        .text-dark { color: var(--dark) !important; }
        .text-blue { color: var(--blue) !important; }
        .text-mail { color: var(--mail) !important; }
        .text-whatsapp { color: var(--whatsapp) !important; }
        .text-red { color: #ef4444 !important; }

        .fw-600 { font-weight: 600 !important; }
        .fw-700 { font-weight: 700 !important; }
        .fw-800 { font-weight: 800 !important; }
        .fw-900 { font-weight: 900 !important; }
        .fw-950 { font-weight: 950 !important; }

        .fs-small { font-size: 0.8rem !important; }
        .fs-smaller { font-size: 0.7rem !important; }
        .fs-085 { font-size: 0.85rem !important; }
        .fs-09 { font-size: 0.9rem !important; }
        .fs-095 { font-size: 0.95rem !important; }
        .fs-11 { font-size: 1.1rem !important; }
        .fs-12 { font-size: 1.2rem !important; }
        .fs-14 { font-size: 1.4rem !important; }
        .fs-15 { font-size: 1.5rem !important; }
        .fs-20 { font-size: 20px !important; }
        .fs-24 { font-size: 24px !important; }
        .fs-32 { font-size: 32px !important; }

        .w-100 { width: 100% !important; }
        .w-64 { width: 64px !important; }
        .h-100 { height: 100% !important; }
        .h-64 { height: 64px !important; }
        .br-8 { border-radius: 8px !important; }
        .br-12 { border-radius: 12px !important; }
        .br-14 { border-radius: 14px !important; }
        .br-16 { border-radius: 16px !important; }
        .min-h-24 { min-height: 24px !important; }
        .min-h-40 { min-height: 40px !important; }

        /* Specific Component Helpers */
        .btn-large-responsive {
            width: 100%;
            height: 52px;
            font-size: 1rem;
            font-weight: 800;
            border-radius: 16px;
        }
        
        .progress-bar-fill {
            height: 100%;
            transition: width 0.3s ease;
        }

        .mr-4 { margin-right: 4px !important; }
        .mr-8 { margin-right: 8px !important; }
        .mr-10 { margin-right: 10px !important; }
        .mr-12 { margin-right: 12px !important; }
        .ml-4 { margin-left: 4px !important; }
        .ml-5 { margin-left: 5px !important; }
        .ml-8 { margin-left: 8px !important; }
        .ml-10 { margin-left: 10px !important; }

        .px-10 { padding-left: 10px !important; padding-right: 10px !important; }
        .px-12 { padding-left: 12px !important; padding-right: 12px !important; }
        .px-15 { padding-left: 15px !important; padding-right: 15px !important; }
        .px-20 { padding-left: 20px !important; padding-right: 20px !important; }
        .py-10 { padding-top: 10px !important; padding-bottom: 10px !important; }
        .py-12 { padding-top: 12px !important; padding-bottom: 12px !important; }

        .border-none { border: none !important; }
        .border-top-1-gray-light { border-top: 1px solid var(--gray-light) !important; }
        .h-1px { height: 1px !important; }
        .bg-white { background-color: var(--white) !important; }
        .bg-black { background-color: #000 !important; }
        .bg-gray-light { background-color: var(--gray-light) !important; }
        .bg-light { background-color: var(--bg-light) !important; }
        .d-block { display: block !important; }
        .border-dashed { border-style: dashed !important; }
        .ls-2 { letter-spacing: 2px !important; }
        .ls-05rem { letter-spacing: 0.5rem !important; }
        .px-15 { padding-left: 15px !important; padding-right: 15px !important; }
        .mr-10 { margin-right: 10px !important; }
        .ml-5 { margin-left: 5px !important; }
        .h-8 { height: 8px !important; }
        .h-44 { height: 44px !important; }
        .w-44 { width: 44px !important; }
        .br-4 { border-radius: 4px !important; }
        .br-50 { border-radius: 50% !important; }
        .overflow-hidden { overflow: hidden !important; }
        
        .grid-3-col { grid-template-columns: repeat(3, 1fr) !important; }
        .grid-1-2 { grid-template-columns: 1fr 2fr !important; }
        .grid-auto-200 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important; }
        
        .m-0 { margin: 0 !important; }
        .v-align-center { align-items: center !important; }
        
        .opacity-06 { opacity: 0.6 !important; }
        .h-1px { height: 1px !important; }
        
        .shadow-sm { box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important; }
        .border-2-white { border: 2px solid var(--white) !important; }
        
        .bg-gray-light-opacity-10 { background-color: rgba(148, 163, 184, 0.1) !important; }
        .border-1-gray-light { border: 1px solid var(--gray-light) !important; }
        .px-4 { padding-left: 4px !important; padding-right: 4px !important; }
        .py-4 { padding-top: 4px !important; padding-bottom: 4px !important; }
        .p-12-r-4 { padding: 4px 12px !important; }
        .fs-08 { font-size: 0.8rem !important; }
        .fs-12 { font-size: 1.2rem !important; }
        .w-auto { width: auto !important; }
        .grid-3-col { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; }
        .bg-primary-gradient { background: var(--primary-gradient) !important; }
        
        .p-20 { padding: 20px !important; }
        .h-auto { height: auto !important; }
        .mt-4 { margin-top: 4px !important; }
        .mb-24 { margin-bottom: 24px !important; }
        .mb-30 { margin-bottom: 30px !important; }
        .mb-0 { margin-bottom: 0 !important; }
        .ml-4 { margin-left: 4px !important; }
        .br-24 { border-radius: 24px !important; }
        .h-80 { height: 80px !important; }
        .w-80 { width: 80px !important; }
        .bg-primary { background-color: var(--primary) !important; }
        .bg-primary-light { background-color: rgba(109, 40, 217, 0.05) !important; }
        body[data-theme="dark"] .bg-primary-light { background-color: rgba(255, 122, 0, 0.1) !important; }
        .border-1-primary { border: 1px solid var(--primary) !important; }
        .border-1-primary-light { border: 1px solid rgba(109, 40, 217, 0.1) !important; }
        body[data-theme="dark"] .border-1-primary-light { border: 1px solid rgba(255, 122, 0, 0.2) !important; }
        .bg-blue-light-opacity-10 { background-color: rgba(59, 130, 246, 0.1) !important; }
        .bg-primary-gradient { background: var(--primary-gradient) !important; }
        .m-auto { margin: 0 auto !important; }
        .p-40 { padding: 40px !important; }
        .max-w-500 { max-width: 500px !important; }
        .lh-16 { line-height: 1.6 !important; }
        
        .btn-group-pill {
            display: flex !important;
            background: var(--bg-light) !important;
            padding: 2px !important;
            border-radius: 8px !important;
        }
        
        .btn-group-pill .btn {
            border: none !important;
            padding: 4px 12px !important;
        }
        
        .min-w-200 { min-width: 200px !important; }
        .min-w-140 { min-width: 140px !important; }
        .grid-1-2-2 { display: grid !important; grid-template-columns: 1fr 2fr 2fr !important; }
        .grid-1-1-1 { display: grid !important; grid-template-columns: 1fr 1fr 1fr !important; }
        .h-50 { height: 50px !important; }
        .w-50 { width: 50px !important; }
        .h-120 { height: 120px !important; }
        .br-10 { border-radius: 10px !important; }
        .br-15 { border-radius: 15px !important; }
        .bg-slate-100 { background-color: #f3f4f6 !important; }
        .bg-cover { background-size: cover !important; }
        .bg-center { background-position: center !important; }
        .pos-rel { position: relative !important; }
        .pos-abs { position: absolute !important; }
        .bottom-10 { bottom: 10px !important; }
        .right-10 { right: 10px !important; }
        .flex-column-gap-15 { display: flex !important; flex-direction: column !important; gap: 15px !important; }
        .flex-column-gap-12 { display: flex !important; flex-direction: column !important; gap: 12px !important; }
        .flex-center-center { display: flex !important; align-items: center !important; justify-content: center !important; }
        .justify-content-center { justify-content: center !important; }
        .align-items-center { align-items: center !important; }
        .divider-mb-20 { border-top: 1px solid var(--gray-light); margin: 20px 0; }
        .fs-07 { font-size: 0.7rem !important; }
        .grid-2-col { display: grid !important; grid-template-columns: 1fr 1fr !important; }
        .bg-whatsapp { background-color: #25D366 !important; }
        .bg-stripe { color: #6366f1 !important; }
        .ff-mono { font-family: monospace !important; }
        .border-primary-dashed { border: 1px dashed var(--primary) !important; }
        .max-w-400 { max-width: 400px !important; }
        .border-red { border-color: var(--sms) !important; }
        .text-whatsapp { color: #25D366 !important; }
        .fs-15rem { font-size: 1.5rem !important; }
        .fs-25rem { font-size: 2.5rem !important; }
        .p-40-20 { padding: 40px 20px !important; }
        .mt-15 { margin-top: 15px !important; }
        .mb-25 { margin-bottom: 25px !important; }
        .word-break-all { word-break: break-all !important; }
        .mt-8 { margin-top: 8px !important; }
        .mb-14 { margin-bottom: 14px !important; }
        .border-dashed-primary { border: 1px dashed var(--primary) !important; }
        .mt-20 { margin-top: 20px !important; }
        .mb-20 { margin-bottom: 20px !important; }
        .mb-12 { margin-bottom: 12px !important; }
        .p-15 { padding: 15px !important; }
        .br-12 { border-radius: 12px !important; }
        .max-w-280 { max-width: 280px !important; }
        .max-h-200 { max-height: 200px !important; overflow-y: auto !important; }
        .bg-f8fafc { background-color: #f8fafc !important; }
        .text-red { color: var(--red) !important; }
        .cursor-pointer { cursor: pointer !important; }
        .w-60 { width: 60px !important; }
        .mr-auto { margin-right: auto !important; }
        .text-white-important { color: white !important; }
        
        .tag-advanced {
            background: rgba(255, 255, 255, 0.2);
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 0.75rem;
            margin-left: 10px;
        }
        
        .btn-white {
            background: white !important;
            border: none !important;
        }

        .border-bottom-gray { border-bottom: 1px solid #e2e8f0 !important; }
        .fs-09rem { font-size: 0.9rem !important; }
        .opacity-09 { opacity: 0.9 !important; }
        .bg-light-gray { background-color: #f1f5f9 !important; }
        .border-light-gray { border: 1px solid #e2e8f0 !important; }
        .lh-16 { line-height: 1.6 !important; }
        .max-w-800 { max-width: 800px !important; }
        .bg-none { background: none !important; }
        .border-none { border: none !important; }
        .mt-14 { margin-top: 14px !important; }
        .text-primary-important { color: var(--primary) !important; }
        .fs-15rem { font-size: 1.5rem !important; }
        .ls-neg02em { letter-spacing: -0.02em !important; }
        .ls-neg03em { letter-spacing: -0.03em !important; }
        .fw-950 { font-weight: 950 !important; }
        .bg-eff6ff { background-color: #eff6ff !important; }
        .color-1e40af { color: #1e40af !important; }
        .h-36 { height: 36px !important; }
        .w-36 { width: 36px !important; }
        .v-hidden { visibility: hidden; }
        .white-important { color: white !important; }
        .lh-11 { line-height: 1.1 !important; }
        .ls-neg-03 { letter-spacing: -0.03em !important; }
        .ff-sans { font-family: sans-serif !important; }
        .resize-none { resize: none !important; }
        .h-1-4 { line-height: 1.4 !important; }
        .color-1f2937 { color: #1f2937 !important; }
        .fs-085 { font-size: 0.85rem !important; }
        .p-30 { padding: 30px !important; }
        .right-15 { right: 15px !important; }
        .fs-06 { font-size: 0.6rem !important; }
        .p-1-5 { padding: 1px 5px !important; }
        .bg-indigo-light { background: rgba(99, 102, 241, 0.1) !important; }
        .br-14 { border-radius: 14px !important; }
        .flex-0 { flex: 0 !important; }
        .flex-2 { flex: 2 !important; }
        .p-20-25 { padding: 20px 25px !important; }
        .p-25 { padding: 25px !important; }
        .grid-fit-300 { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important; }
        .p-15-20-10-20 { padding: 15px 20px 10px 20px !important; }
        .fs-11 { font-size: 11px !important; }
        .text-center-important { text-align: center !important; }
        .v-align-flex-end { align-items: flex-end !important; }
        .v-align-center-important { align-items: center !important; }
        .bg-black { background-color: #000 !important; }
        .shadow-apple { box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important; }
        .shadow-crown { box-shadow: 0 10px 20px rgba(251, 191, 36, 0.3) !important; }
        .fs-24 { font-size: 24px !important; }
        .fs-20 { font-size: 20px !important; }
        .text-slate-2a { color: #0f172a !important; }
        .text-slate-700 { color: #475569 !important; }
        .bg-amber-400 { background-color: #fbbf24 !important; }
        .bg-apple-gradient { background: linear-gradient(135deg, #0f172a 0%, #334155 100%) !important; }
        .border-none-important { border: none !important; }
        .pb-0 { padding-bottom: 0 !important; }
        .p-24 { padding: 24px !important; }
        .text-blue-600 { color: #2563eb !important; }
        .text-slate-900 { color: #0f172a !important; }
        .bg-eff6ff-important { background-color: #eff6ff !important; }
        .bg-amber-100 { background-color: #fef3c7 !important; }
        .text-amber-900 { color: #78350f !important; }
        .w-48 { width: 48px !important; }
        .h-48 { height: 48px !important; }
        .br-16 { border-radius: 16px !important; }
        .place-items-center { place-items: center !important; }
        .fs-12rem { font-size: 1.2rem !important; }
        .fs-14rem { font-size: 1.4rem !important; }
        .fs-095rem { font-size: 0.95rem !important; }
        .mt-32 { margin-top: 32px !important; }
        .mt-4 { margin-top: 4px !important; }
        .pt-24 { padding-top: 24px !important; }
        .border-top-1-gray-light { border-top: 1px solid #dae1e7 !important; }
        .ls-neg03 { letter-spacing: -0.03em !important; }
        .ls-005em { letter-spacing: 0.05em !important; }
        .fs-11rem { font-size: 1.1rem !important; }
        .text-underline-none { text-decoration: none !important; }
        .word-break-all { word-break: break-all !important; }
        .grid-1-1 { grid-template-columns: 1fr 1fr !important; }
        .p-10-15 { padding: 10px 15px !important; }
        .text-red-important { color: #ef4444 !important; }
        .border-red-important { border-color: #ef4444 !important; }
        .max-h-250 { max-height: 250px !important; }
        .mt-18 { margin-top: 18px !important; }
        /* --- KPI VALUE (missing in base) --- */
        .kpi-info h3 {
            font-size: .85rem;
            color: var(--gray);
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: .05em;
            margin-bottom: 6px;
        }

        .kpi-info .value {
            font-size: 1.85rem;
            font-weight: 950;
            letter-spacing: -.04em;
        }


        /* --- LOGIN (enhanced) --- */
        .login-wrap {
            position: fixed;
            inset: 0;
            z-index: 9999;
            width: 100%;
            height: 100%;
            overflow-y: auto;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px;
            background:
                radial-gradient(circle at 10% 20%, rgba(255, 122, 0, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(37, 211, 102, 0.12) 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, rgba(0, 122, 255, 0.08) 0%, transparent 50%),
                var(--bg-light);
        }

        .login-wrap::before {
            content: "";
            position: absolute;
            width: 200%;
            height: 200%;
            background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 2000 2000' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
            opacity: 0.03;
            pointer-events: none;
        }

        .login-card {
            width: min(960px, 100%);
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0;
            padding: 0;
            border-radius: 32px;
            border: 1px solid rgba(255, 255, 255, 0.3);
            background: rgba(255, 255, 255, 0.7);
            box-shadow: 0 40px 100px -20px rgba(2, 6, 23, 0.15);
            backdrop-filter: blur(20px);
            overflow: hidden;
            animation: cardAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1);
        }

        @keyframes cardAppear {
            from {
                opacity: 0;
                transform: scale(0.95) translateY(20px);
            }

            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .login-hero {
            padding: 64px 48px;
            background: linear-gradient(135deg, rgba(37, 211, 102, 0.1), rgba(0, 122, 255, 0.05));
            border-right: 1px solid rgba(15, 23, 42, 0.05);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .login-hero-top {
            animation: fadeInLeft 0.6s ease-out 0.2s both;
        }

        @keyframes fadeInLeft {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .login-form-container {
            padding: 48px;
            background: var(--white);
            display: flex;
            flex-direction: column;
            justify-content: center;
            position: relative;
        }

        .login-hero h1 {
            font-size: 2.8rem;
            font-weight: 950;
            letter-spacing: -0.05em;
            margin: 0 0 24px 0;
            line-height: 1.1;
            background: linear-gradient(135deg, var(--dark), var(--primary));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .login-hero p {
            font-size: 1.1rem;
            line-height: 1.6;
            margin-bottom: 48px;
            opacity: 0.8;
        }

        .login-bullets {
            display: grid;
            gap: 20px;
        }

        .login-bullets .b {
            display: flex;
            gap: 16px;
            align-items: center;
            padding: 20px;
            border-radius: 24px;
            background: var(--bg-light);
            border: 1px solid var(--gray-light);
            transition: all 0.3s ease;
            color: var(--dark);
        }

        .login-bullets .b:hover {
            background: var(--white);
            transform: translateX(8px);
            box-shadow: var(--shadow);
        }

        .login-form {
            border-radius: 18px;
            padding: 18px;
            border: 1px solid rgba(15, 23, 42, .06);
            background: rgba(255, 255, 255, .9);
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .login-form h2 {
            font-size: 1.25rem;
            font-weight: 950;
            margin: 0 0 6px;
        }

        .login-form .small {
            margin-bottom: 14px;
        }

        .login-actions {
            display: flex;
            gap: 10px;
            align-items: center;
            justify-content: space-between;
            margin-top: 12px;
            flex-wrap: wrap;
        }

        .link-btn {
            background: none;
            border: none;
            padding: 0;
            color: var(--primary);
            font-weight: 800;
            cursor: pointer;
        }

        .login-footer {
            margin-top: 12px;
            color: var(--gray);
            font-size: .82rem;
            font-weight: 650;
        }

        @media (max-width: 860px) {
            .login-card {
                grid-template-columns: 1fr;
            }

            .login-hero {
                min-height: 260px;
            }
        }


        /* Removed redundant theme pack block since it is consolidated above */


        /* --- LOGIN FIX (overlay + hide app when logged out) --- */
        #loginScreen {
            position: fixed;
            inset: 0;
            z-index: 9999;
        }

        #appShell {
            display: none;
        }

        /* --- LOADING SPINNER --- */
        .spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255, 255, 255, .3);
            border-radius: 50%;
            border-top-color: #fff;
            animation: spin 1s ease-in-out infinite;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        .btn:disabled {
            opacity: 0.7;
            cursor: not-allowed;
        }

        /* Tabs Styling */
        .tab-btn {
            padding: 12px 20px;
            background: transparent;
            border: none;
            border-bottom: 2px solid transparent;
            color: var(--gray);
            font-weight: 600;
            font-size: 0.95rem;
            cursor: pointer;
            transition: var(--transition);
            position: relative;
        }

        .tab-btn:hover {
            color: var(--primary);
        }

        .tab-btn.active {
            color: var(--primary);
            border-bottom: 2px solid var(--primary);
        }

        /* Upsell Styling */
        .upsell-card {
            background: linear-gradient(135deg, rgba(109, 40, 217, 0.05) 0%, rgba(255, 122, 0, 0.05) 100%);
            border: 2px dashed rgba(109, 40, 217, 0.2);
            border-radius: 20px;
            padding: 40px;
            text-align: center;
            max-width: 600px;
            margin: 40px auto;
            animation: fadeIn 0.5s ease;
        }

        .upsell-card-icon {
            width: 80px;
            height: 80px;
            background: var(--primary-gradient);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 24px;
            font-size: 32px;
            color: white;
            box-shadow: 0 10px 20px rgba(109, 40, 217, 0.3);
        }

        body[data-theme="dark"] .service-card:hover,
        body[data-theme="dark"] .resource-card:hover {
            background: rgba(148, 163, 184, .12) !important;
        }

        /* --- SIMPLE MODE AUDIT --- */
        .simple-mode .menu-item[onclick="navigateTo('integrations')"],
        .simple-mode .menu-item[onclick="navigateTo('team')"],
        .simple-mode .menu-item[onclick="navigateTo('promotions')"],
        .simple-mode .menu-item[onclick="navigateTo('messages')"],
        .simple-mode .mobile-nav-item[onclick="navigateTo('team')"],
        .simple-mode .mobile-nav-item[onclick="navigateTo('promotions')"],
        .simple-mode .mobile-nav-item[onclick="navigateTo('integrations')"],
        .simple-mode .mobile-nav-item[onclick="navigateTo('messages')"] {
            display: none !important;
        }

        .simple-mode .tag-premium {
            display: none !important;
        }

        /* --- RESOURCE MODAL REFINEMENTS --- */
        .label-caps {
            display: block;
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--gray);
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }

        .modal-tabs {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
        }

        .color-picker-wrapper {
            width: 42px;
            height: 42px;
            border-radius: 12px;
            overflow: hidden;
            border: 1.5px solid var(--gray-light);
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--white);
            transition: var(--transition);
        }

        .color-picker-wrapper:focus-within {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
        }

        .color-picker-wrapper input[type="color"] {
            width: 60px;
            height: 60px;
            border: none;
            padding: 0;
            cursor: pointer;
            background: none;
            transform: scale(1.5);
        }

        .border-top-light {
            border-top: 1px solid var(--gray-light);
        }

        .btn-delete-link {
            background: none;
            border: none;
            padding: 8px 0;
            text-decoration: none;
            cursor: pointer;
            font-weight: 600;
            transition: var(--transition);
            opacity: 0.7;
        }

        .btn-delete-link:hover {
            opacity: 1;
            text-decoration: underline;
        }

        .mb-20 { margin-bottom: 20px !important; }
        .mb-8 { margin-bottom: 8px !important; }
        .mb-12 { margin-bottom: 12px !important; }
        .gap-8 { gap: 8px !important; }
        .gap-12 { gap: 12px !important; }
        .fs-08rem { font-size: 0.8rem !important; }
        .fs-09rem { font-size: 0.9rem !important; }
        .pt-20 { padding-top: 20px !important; }
        .border-bottom-gray { border-bottom: 1px solid var(--gray-light); }
        .border-light { border: 1px solid var(--gray-light); }
        .bg-light { background: var(--bg-light); }
        .br-12 { border-radius: 12px; }
        .px-8 { padding-left: 8px; padding-right: 8px; }
        .py-4 { padding-top: 4px; padding-bottom: 4px; }
        .text-gray { color: var(--gray); }
        .label-caps {
            display: block;
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--gray);
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }
        .align-items-center { align-items: center; }
        .justify-content-between { justify-content: space-between; }
        .justify-content-end { justify-content: flex-end; }
        .flex-1 { flex: 1; }
        .max-w-400 { max-width: 400px; }
        .white-space-nowrap { white-space: nowrap; }

        .search-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }

        .search-icon {
            position: absolute;
            left: 12px;
            color: var(--gray);
            font-size: 0.9rem;
            pointer-events: none;
        }

        .search-wrapper .form-control {
            padding-left: 38px !important;
        }

        .bg-indigo-light { background-color: rgba(109, 40, 217, 0.08); }
        .border-primary-dashed { border: 2px dashed rgba(109, 40, 217, 0.3); }
        .border-1-gray-light { border: 1px solid var(--gray-light); }
        .br-14 { border-radius: 14px; }
        .br-16 { border-radius: 16px; }
        .ls-3 { letter-spacing: 3px; }
        .v-hidden { visibility: hidden; }
        .white-space-nowrap { white-space: nowrap; }

/* --- PILL CHECKBOXES --- */
.pill-checkbox {
    cursor: pointer;
}

.pill-checkbox input {
    display: none;
}

.pill-checkbox span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray);
    transition: var(--transition);
}

.pill-checkbox input:checked + span {
    background: rgba(255, 122, 0, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.1);
}

.pill-checkbox span i {
    font-size: 1rem;
    color: var(--gray);
}

.pill-checkbox input:checked + span i {
    color: var(--primary);
}

/* --- PORTFOLIO UPLOAD --- */
.portfolio-upload-zone {
    border: 2px dashed var(--gray-light);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background: var(--bg-light);
    transition: var(--transition);
    color: var(--gray);
}

.portfolio-upload-zone:hover {
    border-color: var(--primary);
    background: rgba(255, 122, 0, 0.02);
    color: var(--primary);
}

.portfolio-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
}

.portfolio-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--gray-light);
}

.portfolio-preview-item .remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 0.8rem;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* --- SETTINGS TABS --- */
.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--gray-light);
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    padding-bottom: 5px;
    position: sticky;
    top: 0;
    background: var(--bg-light);
    z-index: 10;
}

.settings-tabs::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.tab-btn {
    padding: 12px 20px;
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--gray);
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
    font-size: 0.95rem;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .settings-tabs {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}
