@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&display=swap');

:root, [data-theme="dark"] {
    --font-primary: 'Cairo', sans-serif;
    
    --primary-hsl: 198, 93%, 60%; /* #38bdf8 */
    --primary: hsl(var(--primary-hsl));
    --primary-hover: hsl(200, 95%, 39%);
    --primary-light: rgba(56, 189, 248, 0.12);
    --primary-glow: hsla(var(--primary-hsl), 0.3);
    
    --secondary-hsl: 235, 90%, 74%; /* #818cf8 */
    --secondary: hsl(var(--secondary-hsl));

    --bg-app: #080f1d;
    --bg-surface: #0d1627;
    --bg-sidebar: #0d1627;
    --bg-header: rgba(13, 22, 39, 0.85);
    
    --border-color: #1e293b;
    --border-glow: hsla(198, 93%, 60%, 0.15);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-on-primary: #000000;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.35);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"][data-theme-profile="olive-gold"] {
    --primary-hsl: 45, 73%, 61%;
    --primary: hsl(var(--primary-hsl));
    --primary-hover: #f7d774;
    --primary-light: rgba(212, 175, 55, 0.13);
    --primary-glow: rgba(212, 175, 55, 0.26);

    --secondary-hsl: 151, 58%, 31%;
    --secondary: hsl(var(--secondary-hsl));

    --bg-app: #06140d;
    --bg-surface: #0b1f14;
    --bg-sidebar: #06120c;
    --bg-header: rgba(8, 28, 17, 0.88);

    --border-color: #21432d;
    --border-glow: rgba(212, 175, 55, 0.22);

    --text-primary: #fff8dc;
    --text-secondary: #d8e2c6;
    --text-muted: #a9b69d;
    --text-on-primary: #102015;
}

[data-theme="dark"][data-theme-profile="burgundy-gold"] {
    --primary-hsl: 38, 83%, 69%;
    --primary: hsl(var(--primary-hsl));
    --primary-hover: #ffd68a;
    --primary-light: rgba(242, 196, 109, 0.14);
    --primary-glow: rgba(242, 196, 109, 0.28);

    --secondary-hsl: 350, 64%, 36%;
    --secondary: hsl(var(--secondary-hsl));

    --bg-app: #160711;
    --bg-surface: #24101a;
    --bg-sidebar: #1b0912;
    --bg-header: rgba(36, 16, 26, 0.9);

    --border-color: #4b1f2f;
    --border-glow: rgba(242, 196, 109, 0.24);

    --text-primary: #fff3df;
    --text-secondary: #ecd0c4;
    --text-muted: #bd9388;
    --text-on-primary: #251108;
}

[data-theme="dark"][data-theme-profile="olive-gold"] .btn-primary,
[data-theme="dark"][data-theme-profile="olive-gold"] .btn-beauty-gradient,
[data-theme="dark"][data-theme-profile="olive-gold"] .menu-item.active a {
    background: linear-gradient(135deg, #0f5132 0%, #d4af37 58%, #f7d774 100%) !important;
    color: #102015 !important;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.24) !important;
}

[data-theme="dark"][data-theme-profile="burgundy-gold"] .btn-primary,
[data-theme="dark"][data-theme-profile="burgundy-gold"] .btn-beauty-gradient,
[data-theme="dark"][data-theme-profile="burgundy-gold"] .menu-item.active a {
    background: linear-gradient(135deg, #7f1d1d 0%, #f2c46d 62%, #ffd68a 100%) !important;
    color: #251108 !important;
    box-shadow: 0 8px 24px rgba(242, 196, 109, 0.25) !important;
}

[data-theme="dark"][data-theme-profile="olive-gold"] .sidebar-sub-item.active a,
[data-theme="dark"][data-theme-profile="olive-gold"] .sidebar-sub-item a:hover,
[data-theme="dark"][data-theme-profile="olive-gold"] .sidebar-group-btn:hover,
[data-theme="dark"][data-theme-profile="olive-gold"] .sidebar-group-btn.active-group {
    color: #d4af37 !important;
    background: rgba(212, 175, 55, 0.1) !important;
}

[data-theme="dark"][data-theme-profile="burgundy-gold"] .sidebar-sub-item.active a,
[data-theme="dark"][data-theme-profile="burgundy-gold"] .sidebar-sub-item a:hover,
[data-theme="dark"][data-theme-profile="burgundy-gold"] .sidebar-group-btn:hover,
[data-theme="dark"][data-theme-profile="burgundy-gold"] .sidebar-group-btn.active-group {
    color: #f2c46d !important;
    background: rgba(242, 196, 109, 0.11) !important;
}

[data-theme="dark"][data-theme-profile="olive-gold"] .premium-card::before {
    background: linear-gradient(90deg, #0f5132, #d4af37);
}

[data-theme="dark"][data-theme-profile="burgundy-gold"] .premium-card::before {
    background: linear-gradient(90deg, #7f1d1d, #f2c46d);
}

/* Light Mode Tokens Override */
[data-theme="light"] {
    --primary-hsl: 200, 95%, 39%; /* #0284c7 */
    --primary: hsl(var(--primary-hsl));
    --primary-hover: hsl(200, 95%, 32%);
    --primary-light: rgba(2, 132, 199, 0.1);
    --primary-glow: hsla(var(--primary-hsl), 0.2);
    
    --secondary-hsl: 243, 75%, 59%; /* #4f46e5 */
    --secondary: hsl(var(--secondary-hsl));
    
    --bg-app: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.9);
    
    --border-color: #cbd5e1;
    --border-glow: hsla(var(--primary-hsl), 0.1);
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-on-primary: #ffffff;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-primary);
}

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    direction: rtl;
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
}

/* Premium Card Wrapper */
.premium-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), hsl(320, 60%, 55%));
    opacity: 0;
    transition: var(--transition);
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-glow);
}

.premium-card:hover::before {
    opacity: 1;
}

/* Micro-animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-app);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Light mode hardening
   Several legacy views still ship dark inline colors. These overrides keep the
   light theme readable without changing each business screen individually. */
[data-theme="light"] body,
[data-theme="light"] .app-container,
[data-theme="light"] .app-content-wrapper {
    background: #f3f6fb !important;
    background-color: #f3f6fb !important;
    color: #0f172a !important;
}

[data-theme="light"] .app-header {
    background: rgba(255, 255, 255, 0.94) !important;
    border-bottom-color: #dbe3ee !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06) !important;
}

[data-theme="light"] .app-sidebar {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-left-color: #dbe3ee !important;
    color: #0f172a !important;
    box-shadow: -10px 0 28px rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] .brand-section,
[data-theme="light"] .user-badge {
    border-color: #dbe3ee !important;
}

[data-theme="light"] .user-badge {
    background: #f8fafc !important;
}

[data-theme="light"] .brand-name,
[data-theme="light"] .header-title,
[data-theme="light"] .sidebar-group-btn,
[data-theme="light"] .user-name {
    color: #0f172a !important;
}

[data-theme="light"] .user-role,
[data-theme="light"] .sidebar-sub-item a {
    color: #475569 !important;
}

[data-theme="light"] .sidebar-group-btn:hover,
[data-theme="light"] .sidebar-group-btn.active-group {
    background: #eef6ff !important;
    color: #0369a1 !important;
}

[data-theme="light"] .sidebar-group-btn .indicator {
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #dff3ff !important;
    border: 1px solid #bae6fd !important;
    color: #075985 !important;
    font-size: 0.95rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

[data-theme="light"] .sidebar-group-btn.active-group .indicator {
    background: #0ea5e9 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
}

[data-theme="light"] .sidebar-sub-item a:hover,
[data-theme="light"] .sidebar-sub-item.active a {
    background: rgba(14, 165, 233, 0.12) !important;
    color: #0369a1 !important;
}

[data-theme="light"] .menu-item a {
    color: #334155 !important;
}

[data-theme="light"] .menu-item a:hover,
[data-theme="light"] .menu-item.active a {
    background: rgba(14, 165, 233, 0.12) !important;
    color: #0369a1 !important;
}

[data-theme="light"] .premium-card,
[data-theme="light"] .stat-card {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-color: #dbe3ee !important;
    color: #0f172a !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

[data-theme="light"] .premium-card[style*="linear-gradient"] {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%) !important;
}

[data-theme="light"] .form-label,
[data-theme="light"] .text-muted,
[data-theme="light"] .text-secondary,
[data-theme="light"] .premium-card h1,
[data-theme="light"] .premium-card h2,
[data-theme="light"] .premium-card h3,
[data-theme="light"] .premium-card h4,
[data-theme="light"] .premium-card h5,
[data-theme="light"] .stat-card h1,
[data-theme="light"] .stat-card h2,
[data-theme="light"] .stat-card h3,
[data-theme="light"] .stat-card h4,
[data-theme="light"] .stat-card p,
[data-theme="light"] table,
[data-theme="light"] th,
[data-theme="light"] td {
    color: #0f172a;
}

[data-theme="light"] .premium-card p,
[data-theme="light"] .table th {
    color: #334155;
}

[data-theme="light"] .table-responsive {
    background: #ffffff !important;
    border-color: #dbe3ee !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06) !important;
}

[data-theme="light"] .table th {
    background: #f8fafc !important;
}

[data-theme="light"] .table td {
    border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .form-control,
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] .form-control::placeholder,
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
    color: #64748b !important;
}

[data-theme="light"] .sidebar-utils-btn,
[data-theme="light"] #sidebar-toggle {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

[data-theme="light"] pre,
[data-theme="light"] code {
    background-color: #f8fafc !important;
    border-color: #dbe3ee !important;
    color: #334155 !important;
}

/* Era Technology Powered-By Badge Footer */
.app-footer, .portal-footer {
    margin-top: auto;
    padding: 24px 20px 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-badge-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.25s ease;
}

.footer-badge-wrap:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-glow, var(--primary));
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.powered-by-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: -0.2px;
    opacity: 0.85;
    user-select: none;
}

.era-suite-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    opacity: 0.9;
    transition: all 0.2s ease;
}

.era-suite-link:hover {
    opacity: 1;
    transform: translateY(-1px) scale(1.03);
}

.era-suite-logo-img {
    height: 19px;
    width: auto;
    max-width: 125px;
    object-fit: contain;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
    vertical-align: middle;
}

/* ==========================================================================
   HairX AI Quiet Luxury Light Theme (Pure Light - No Dark Mode)
   Inspired by https://hairxai.com/
   Palette: Warm Ivory Linen (#f8f6f0), Crisp White (#ffffff), Warm Espresso (#33322e)
   ========================================================================== */

/* 1. Hide Theme Switcher button unconditionally when HairX AI profile is active */
[data-theme-profile="hairx-light"] #theme-toggle-btn {
    display: none !important;
}

/* 2. Token Overrides for HairX AI (Applied whether data-theme is light or default) */
[data-theme-profile="hairx-light"],
[data-theme="light"][data-theme-profile="hairx-light"],
[data-theme="dark"][data-theme-profile="hairx-light"] {
    --primary-hsl: 42, 10%, 20%;
    --primary: #33322e;
    --primary-hover: #1f1e1b;
    --primary-light: rgba(51, 50, 46, 0.08);
    --primary-glow: rgba(51, 50, 46, 0.15);

    --secondary-hsl: 35, 12%, 40%;
    --secondary: #66645d;

    --bg-app: #f8f6f0;
    --bg-surface: #ffffff;
    --bg-sidebar: #f2efe7;
    --bg-header: rgba(248, 246, 240, 0.94);

    --border-color: #e5e1d5;
    --border-glow: rgba(51, 50, 46, 0.12);

    --text-primary: #33322e;
    --text-secondary: #5c5952;
    --text-muted: #8c887e;
    --text-on-primary: #f8f6f0;

    --shadow-sm: 0 2px 6px rgba(50, 45, 35, 0.04);
    --shadow-md: 0 8px 24px rgba(50, 45, 35, 0.06);
    --shadow-lg: 0 16px 40px rgba(50, 45, 35, 0.09);
}

/* 3. Deep Surface & Container Overrides for HairX AI */
[data-theme-profile="hairx-light"] body,
[data-theme-profile="hairx-light"] .app-container,
[data-theme-profile="hairx-light"] .app-content-wrapper {
    background: #f8f6f0 !important;
    background-color: #f8f6f0 !important;
    color: #33322e !important;
}

[data-theme-profile="hairx-light"] .app-header {
    background: rgba(248, 246, 240, 0.94) !important;
    border-bottom: 1px solid #e5e1d5 !important;
    box-shadow: 0 4px 20px rgba(50, 45, 35, 0.04) !important;
    backdrop-filter: blur(16px);
}

[data-theme-profile="hairx-light"] .app-sidebar {
    background: #f2efe7 !important;
    background-color: #f2efe7 !important;
    border-left: 1px solid #e5e1d5 !important;
    color: #33322e !important;
    box-shadow: -8px 0 24px rgba(50, 45, 35, 0.04) !important;
}

[data-theme-profile="hairx-light"] .brand-section {
    border-bottom: 1px solid #e5e1d5 !important;
}

[data-theme-profile="hairx-light"] .user-badge {
    background: #e8e4da !important;
    border: 1px solid #ddd8cc !important;
    color: #33322e !important;
}

[data-theme-profile="hairx-light"] .brand-name,
[data-theme-profile="hairx-light"] .header-title,
[data-theme-profile="hairx-light"] .sidebar-group-btn,
[data-theme-profile="hairx-light"] .user-name {
    color: #33322e !important;
    font-weight: 700 !important;
}

[data-theme-profile="hairx-light"] .user-role {
    color: #66645d !important;
}

/* Sidebar Group Buttons in HairX Light */
[data-theme-profile="hairx-light"] .sidebar-group-btn {
    background: transparent !important;
    color: #33322e !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

[data-theme-profile="hairx-light"] .sidebar-group-btn:hover {
    background: #ece7dc !important;
    color: #1a1917 !important;
}

[data-theme-profile="hairx-light"] .sidebar-group-btn.active-group {
    background: #e8e3d6 !important;
    color: #1a1917 !important;
}

/* Sidebar Accordion Indicator (+ / −) */
[data-theme-profile="hairx-light"] .sidebar-group-btn .indicator {
    background: #e2ded3 !important;
    border: 1px solid #d5cfc2 !important;
    border-radius: 6px !important;
    color: #33322e !important;
    font-weight: 800 !important;
}

[data-theme-profile="hairx-light"] .sidebar-group-btn.active-group .indicator {
    background: #d8d3c5 !important;
    border-color: #c5bfae !important;
    color: #1f1e1b !important;
    font-weight: 800 !important;
}

/* Sidebar Utilities (فتح الكل / إغلاق الكل) */
[data-theme-profile="hairx-light"] .sidebar-utils-btn {
    background: #fdfbf7 !important;
    border: 1px solid #dcd7cb !important;
    border-radius: 8px !important;
    color: #33322e !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 3px rgba(50, 45, 35, 0.04) !important;
}

[data-theme-profile="hairx-light"] .sidebar-utils-btn:hover {
    background: #ece7dc !important;
    color: #1a1917 !important;
    border-color: #c9c3b4 !important;
}

/* Sidebar Navigation Items (Light & Elegant in HairX AI) */
[data-theme-profile="hairx-light"] .menu-item a,
[data-theme-profile="hairx-light"] .sidebar-sub-item a {
    color: #4a4740 !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

[data-theme-profile="hairx-light"] .menu-item a:hover,
[data-theme-profile="hairx-light"] .sidebar-sub-item a:hover {
    background: #ece7dc !important;
    color: #1a1917 !important;
}

[data-theme-profile="hairx-light"] .menu-item.active a,
[data-theme-profile="hairx-light"] .sidebar-sub-item.active a {
    background: #e5dfd2 !important;
    color: #1a1917 !important;
    font-weight: 800 !important;
    border-right: 3.5px solid #33322e !important;
    box-shadow: 0 2px 8px rgba(50, 45, 35, 0.08) !important;
}

/* Cards & Metrics */
[data-theme-profile="hairx-light"] .premium-card,
[data-theme-profile="hairx-light"] .stat-card {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #e5e1d5 !important;
    color: #33322e !important;
    box-shadow: 0 8px 24px rgba(50, 45, 35, 0.05) !important;
}

/* Global Headings & Titles in HairX AI */
[data-theme-profile="hairx-light"] h1,
[data-theme-profile="hairx-light"] h2,
[data-theme-profile="hairx-light"] h3,
[data-theme-profile="hairx-light"] h4,
[data-theme-profile="hairx-light"] h5,
[data-theme-profile="hairx-light"] h6,
[data-theme-profile="hairx-light"] .header-title,
[data-theme-profile="hairx-light"] .page-title,
[data-theme-profile="hairx-light"] .user-name {
    color: #33322e !important;
}

[data-theme-profile="hairx-light"] .premium-card::before {
    background: linear-gradient(90deg, #33322e, #8c887e) !important;
}

[data-theme-profile="hairx-light"] .premium-card p,
[data-theme-profile="hairx-light"] .stat-card p,
[data-theme-profile="hairx-light"] .form-label,
[data-theme-profile="hairx-light"] .text-secondary {
    color: #5c5952 !important;
}

[data-theme-profile="hairx-light"] .text-muted {
    color: #8c887e !important;
}

/* Hamburger & Header Controls (Hidden on desktop, visible on mobile <= 992px) */
@media (min-width: 993px) {
    #sidebar-toggle,
    [data-theme-profile="hairx-light"] #sidebar-toggle,
    [data-theme="light"] #sidebar-toggle {
        display: none !important;
    }
}

@media (max-width: 992px) {
    [data-theme-profile="hairx-light"] #sidebar-toggle,
    [data-theme="light"] #sidebar-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

[data-theme-profile="hairx-light"] #sidebar-toggle,
[data-theme="light"] #sidebar-toggle {
    background: #ffffff !important;
    border: 1.5px solid #dcd7cb !important;
    border-radius: 10px !important;
    color: #33322e !important;
    font-size: 1.25rem !important;
    box-shadow: 0 2px 8px rgba(51, 50, 46, 0.08) !important;
    cursor: pointer !important;
}

[data-theme-profile="hairx-light"] #sidebar-toggle:hover,
[data-theme="light"] #sidebar-toggle:hover {
    background: #ece8de !important;
    border-color: #33322e !important;
    color: #1a1917 !important;
}

[data-theme-profile="hairx-light"] .header-left button,
[data-theme-profile="hairx-light"] .header-right a {
    background: #ffffff !important;
    border: 1.5px solid #dcd7cb !important;
    color: #33322e !important;
}

/* Master Inline Style Neutralizers (Eliminates all accidental white text) */
[data-theme-profile="hairx-light"] [style*="color: #f8fafc"],
[data-theme-profile="hairx-light"] [style*="color:#f8fafc"],
[data-theme-profile="hairx-light"] [style*="color: #ffffff"]:not(.btn):not(.badge):not(.btn-beauty-gradient):not(.btn-primary),
[data-theme-profile="hairx-light"] [style*="color:#ffffff"]:not(.btn):not(.badge):not(.btn-beauty-gradient):not(.btn-primary),
[data-theme-profile="hairx-light"] [style*="color: #fff"]:not(.btn):not(.badge):not(.btn-beauty-gradient):not(.btn-primary),
[data-theme-profile="hairx-light"] [style*="color:#fff"]:not(.btn):not(.badge):not(.btn-beauty-gradient):not(.btn-primary),
[data-theme-profile="hairx-light"] [style*="color: #cbd5e1"]:not(.btn):not(.badge),
[data-theme-profile="hairx-light"] [style*="color:#cbd5e1"]:not(.btn):not(.badge),
[data-theme-profile="hairx-light"] [style*="color: #e2e8f0"]:not(.btn):not(.badge),
[data-theme-profile="hairx-light"] [style*="color:#e2e8f0"]:not(.btn):not(.badge) {
    color: #33322e !important;
}

/* Master Dark Background Neutralizers (Converts all hardcoded navy cards to light) */
[data-theme-profile="hairx-light"] [style*="background: #0d1627"],
[data-theme-profile="hairx-light"] [style*="background:#0d1627"],
[data-theme-profile="hairx-light"] [style*="background: #0f172a"]:not(button):not(.btn):not([class*="btn"]),
[data-theme-profile="hairx-light"] [style*="background:#0f172a"]:not(button):not(.btn):not([class*="btn"]),
[data-theme-profile="hairx-light"] [style*="background: #090e17"],
[data-theme-profile="hairx-light"] [style*="background:#090e17"] {
    background: #ffffff !important;
    border-color: #e5e1d5 !important;
    box-shadow: 0 4px 16px rgba(50, 45, 35, 0.05) !important;
}

/* Sub-containers & input backgrounds (Search bars, secondary card boxes) */
[data-theme-profile="hairx-light"] [style*="background: #1e293b"],
[data-theme-profile="hairx-light"] [style*="background:#1e293b"] {
    background: #f8f6f0 !important;
    border-color: #dcd7cb !important;
    color: #33322e !important;
}

/* Table & Grid Structures in HairX AI */
[data-theme-profile="hairx-light"] .customers-desktop-view,
[data-theme-profile="hairx-light"] .customers-mobile-view > div {
    background: #ffffff !important;
    border: 1px solid #e5e1d5 !important;
    box-shadow: 0 4px 16px rgba(50, 45, 35, 0.05) !important;
}

[data-theme-profile="hairx-light"] table {
    background: #ffffff !important;
}

[data-theme-profile="hairx-light"] thead tr,
[data-theme-profile="hairx-light"] .customers-desktop-view thead tr,
[data-theme-profile="hairx-light"] tr[style*="background: #0f172a"],
[data-theme-profile="hairx-light"] tr[style*="background:#0f172a"] {
    background: #ece8de !important;
    border-bottom: 1px solid #e5e1d5 !important;
}

[data-theme-profile="hairx-light"] th,
[data-theme-profile="hairx-light"] .customers-desktop-view th {
    color: #33322e !important;
    font-weight: 700 !important;
    border-bottom: 1px solid #e5e1d5 !important;
}

[data-theme-profile="hairx-light"] tbody tr {
    background: #ffffff !important;
    border-bottom: 1px solid #ede9df !important;
}

[data-theme-profile="hairx-light"] tbody tr:hover {
    background: #faf8f3 !important;
}

[data-theme-profile="hairx-light"] td,
[data-theme-profile="hairx-light"] .customers-desktop-view td {
    color: #33322e !important;
    border-bottom: 1px solid #ede9df !important;
}

/* High Contrast Accent Pills */
[data-theme-profile="hairx-light"] [style*="color: #38bdf8"],
[data-theme-profile="hairx-light"] [style*="color:#38bdf8"] {
    color: #0284c7 !important;
}
[data-theme-profile="hairx-light"] [style*="color: #34d399"],
[data-theme-profile="hairx-light"] [style*="color:#34d399"] {
    color: #047857 !important;
}
[data-theme-profile="hairx-light"] [style*="color: #fbbf24"],
[data-theme-profile="hairx-light"] [style*="color:#fbbf24"] {
    color: #b45309 !important;
}
[data-theme-profile="hairx-light"] [style*="color: #f87171"],
[data-theme-profile="hairx-light"] [style*="color:#f87171"] {
    color: #b91c1c !important;
}
[data-theme-profile="hairx-light"] [style*="color: #c084fc"],
[data-theme-profile="hairx-light"] [style*="color:#c084fc"] {
    color: #7c3aed !important;
}

/* Action Buttons (Quiet Luxury Dark Espresso with Crisp White Text) */
[data-theme-profile="hairx-light"] .btn-primary,
[data-theme-profile="hairx-light"] .btn-beauty-gradient {
    background: #33322e !important;
    color: #ffffff !important;
    border: 1px solid #33322e !important;
    box-shadow: 0 4px 14px rgba(51, 50, 46, 0.18) !important;
}

[data-theme-profile="hairx-light"] .btn-primary *,
[data-theme-profile="hairx-light"] .btn-beauty-gradient * {
    color: #ffffff !important;
}

[data-theme-profile="hairx-light"] .btn-primary:hover,
[data-theme-profile="hairx-light"] .btn-beauty-gradient:hover {
    background: #1f1e1b !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(51, 50, 46, 0.25) !important;
}

/* Forms, Inputs & Textareas */
[data-theme-profile="hairx-light"] .form-control,
[data-theme-profile="hairx-light"] input:not([type="checkbox"]):not([type="radio"]),
[data-theme-profile="hairx-light"] select,
[data-theme-profile="hairx-light"] textarea {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #dcd7cb !important;
    color: #33322e !important;
}

[data-theme-profile="hairx-light"] .form-control:focus,
[data-theme-profile="hairx-light"] input:focus,
[data-theme-profile="hairx-light"] select:focus,
[data-theme-profile="hairx-light"] textarea:focus {
    border-color: #33322e !important;
    box-shadow: 0 0 0 3px rgba(51, 50, 46, 0.1) !important;
}

[data-theme-profile="hairx-light"] .form-control::placeholder,
[data-theme-profile="hairx-light"] input::placeholder,
[data-theme-profile="hairx-light"] textarea::placeholder {
    color: #8c887e !important;
}

/* Modals & Popups */
[data-theme-profile="hairx-light"] .modal-content,
[data-theme-profile="hairx-light"] .dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #e5e1d5 !important;
    color: #33322e !important;
    box-shadow: 0 16px 48px rgba(50, 45, 35, 0.14) !important;
}

/* ==========================================================================
   Universal Autocomplete & Live Search Dropdown Overrides (HairX AI & Light)
   ========================================================================== */
[data-theme-profile="hairx-light"] #customer-search-dropdown,
[data-theme-profile="hairx-light"] #ci_autocomplete_results,
[data-theme-profile="hairx-light"] #consultation-service-autocomplete-dropdown,
[data-theme-profile="hairx-light"] #catalog-autocomplete-dropdown,
[data-theme-profile="hairx-light"] #pos-customer-dropdown,
[data-theme-profile="hairx-light"] #wallet-customer-dropdown,
[data-theme-profile="hairx-light"] .pos-autocomplete-dropdown,
[data-theme-profile="hairx-light"] .wallet-autocomplete-dropdown,
[data-theme-profile="hairx-light"] .app-search-dropdown,
[data-theme-profile="hairx-light"] .search-dropdown,
[data-theme-profile="hairx-light"] [id*="search-dropdown"],
[data-theme-profile="hairx-light"] [id*="autocomplete"],
[data-theme-profile="hairx-light"] [class*="autocomplete-dropdown"],
[data-theme="light"] #customer-search-dropdown,
[data-theme="light"] #ci_autocomplete_results,
[data-theme="light"] #consultation-service-autocomplete-dropdown,
[data-theme="light"] #catalog-autocomplete-dropdown,
[data-theme="light"] #pos-customer-dropdown,
[data-theme="light"] #wallet-customer-dropdown,
[data-theme="light"] .pos-autocomplete-dropdown,
[data-theme="light"] .wallet-autocomplete-dropdown,
[data-theme="light"] .app-search-dropdown,
[data-theme="light"] [id*="search-dropdown"],
[data-theme="light"] [id*="autocomplete"],
[data-theme="light"] [class*="autocomplete-dropdown"] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1.5px solid #dcd7cb !important;
    border-radius: 12px !important;
    box-shadow: 0 16px 40px rgba(50, 45, 35, 0.14) !important;
    color: #33322e !important;
    z-index: 10500 !important;
}

/* Dropdown Children & Result Items */
[data-theme-profile="hairx-light"] #customer-search-dropdown a,
[data-theme-profile="hairx-light"] #customer-search-dropdown div,
[data-theme-profile="hairx-light"] #ci_autocomplete_results a,
[data-theme-profile="hairx-light"] #ci_autocomplete_results div,
[data-theme-profile="hairx-light"] #consultation-service-autocomplete-dropdown a,
[data-theme-profile="hairx-light"] #consultation-service-autocomplete-dropdown div,
[data-theme-profile="hairx-light"] .pos-autocomplete-item,
[data-theme-profile="hairx-light"] .wallet-autocomplete-item,
[data-theme-profile="hairx-light"] .app-search-result-item,
[data-theme-profile="hairx-light"] [id*="autocomplete"] a,
[data-theme-profile="hairx-light"] [id*="autocomplete"] div,
[data-theme-profile="hairx-light"] [class*="autocomplete"] a,
[data-theme-profile="hairx-light"] [class*="autocomplete"] div,
[data-theme="light"] #customer-search-dropdown a,
[data-theme="light"] #customer-search-dropdown div,
[data-theme="light"] .pos-autocomplete-item,
[data-theme="light"] .wallet-autocomplete-item,
[data-theme="light"] .app-search-result-item,
[data-theme="light"] [id*="autocomplete"] a,
[data-theme="light"] [id*="autocomplete"] div {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #33322e !important;
    border-bottom: 1px solid #ede9df !important;
}

/* Hover & Active states */
[data-theme-profile="hairx-light"] #customer-search-dropdown a:hover,
[data-theme-profile="hairx-light"] #ci_autocomplete_results div:hover,
[data-theme-profile="hairx-light"] #consultation-service-autocomplete-dropdown a:hover,
[data-theme-profile="hairx-light"] .pos-autocomplete-item:hover,
[data-theme-profile="hairx-light"] .pos-autocomplete-item.active,
[data-theme-profile="hairx-light"] .wallet-autocomplete-item:hover,
[data-theme-profile="hairx-light"] .wallet-autocomplete-item.active,
[data-theme-profile="hairx-light"] .app-search-result-item:hover,
[data-theme-profile="hairx-light"] [id*="autocomplete"] a:hover,
[data-theme-profile="hairx-light"] [id*="autocomplete"] div:hover,
[data-theme="light"] #customer-search-dropdown a:hover,
[data-theme="light"] .pos-autocomplete-item:hover,
[data-theme="light"] .pos-autocomplete-item.active,
[data-theme="light"] .wallet-autocomplete-item:hover,
[data-theme="light"] .wallet-autocomplete-item.active,
[data-theme="light"] .app-search-result-item:hover,
[data-theme="light"] [id*="autocomplete"] a:hover,
[data-theme="light"] [id*="autocomplete"] div:hover {
    background: #faf8f3 !important;
    background-color: #faf8f3 !important;
}

/* Text and Titles inside Dropdowns */
[data-theme-profile="hairx-light"] #customer-search-dropdown strong,
[data-theme-profile="hairx-light"] #customer-search-dropdown b,
[data-theme-profile="hairx-light"] [id*="autocomplete"] strong,
[data-theme-profile="hairx-light"] .pos-autocomplete-item strong,
[data-theme-profile="hairx-light"] .wallet-autocomplete-item strong,
[data-theme="light"] #customer-search-dropdown strong,
[data-theme="light"] [id*="autocomplete"] strong,
[data-theme="light"] .pos-autocomplete-item strong,
[data-theme="light"] .wallet-autocomplete-item strong {
    color: #33322e !important;
    font-weight: 700 !important;
}

[data-theme-profile="hairx-light"] #customer-search-dropdown [style*="color: #94a3b8"],
[data-theme-profile="hairx-light"] [id*="autocomplete"] [style*="color: #94a3b8"],
[data-theme="light"] #customer-search-dropdown [style*="color: #94a3b8"],
[data-theme="light"] [id*="autocomplete"] [style*="color: #94a3b8"] {
    color: #66635a !important;
}

/* Select options dropdown native backgrounds */
[data-theme-profile="hairx-light"] select option,
[data-theme="light"] select option {
    background: #ffffff !important;
    color: #33322e !important;
}

/* Badges */
[data-theme-profile="hairx-light"] .badge {
    border: 1px solid rgba(51, 50, 46, 0.15) !important;
}

/* Footer Badge in HairX Light */
[data-theme-profile="hairx-light"] .footer-badge-wrap {
    background: #ece8de !important;
    border: 1px solid #ddd8cc !important;
}

[data-theme-profile="hairx-light"] .powered-by-label {
    color: #66645d !important;
}

[data-theme-profile="hairx-light"] .era-suite-logo-img {
    filter: invert(1) hue-rotate(180deg) brightness(0.2) !important;
}

/* ==========================================================================
   Comprehensive HairX Light Global Hardening & Dark Neutralizer
   ========================================================================== */

/* 1. Neutralize hardcoded dark hex backgrounds across all modules */
[data-theme-profile="hairx-light"] [style*="background: #0f172a"],
[data-theme-profile="hairx-light"] [style*="background:#0f172a"],
[data-theme-profile="hairx-light"] [style*="background: #1e293b"],
[data-theme-profile="hairx-light"] [style*="background:#1e293b"],
[data-theme-profile="hairx-light"] [style*="background: #0d1627"],
[data-theme-profile="hairx-light"] [style*="background:#0d1627"],
[data-theme-profile="hairx-light"] [style*="background: #131a29"],
[data-theme-profile="hairx-light"] [style*="background:#131a29"],
[data-theme-profile="hairx-light"] [style*="background: #0b0f19"],
[data-theme-profile="hairx-light"] [style*="background:#0b0f19"],
[data-theme-profile="hairx-light"] [style*="background-color: #0f172a"],
[data-theme-profile="hairx-light"] [style*="background-color:#0f172a"],
[data-theme-profile="hairx-light"] [style*="background-color: #1e293b"],
[data-theme-profile="hairx-light"] [style*="background-color:#1e293b"],
[data-theme-profile="hairx-light"] [style*="background-color: #131a29"],
[data-theme-profile="hairx-light"] [style*="background-color:#131a29"],
[data-theme-profile="hairx-light"] [style*="background-color: #0b0f19"],
[data-theme-profile="hairx-light"] [style*="background-color:#0b0f19"] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #33322e !important;
    border-color: #e5e1d5 !important;
}

/* 2. Queue & Reception Tables */
[data-theme-profile="hairx-light"] .queue-table-wrap,
[data-theme="light"] .queue-table-wrap {
    background: #ffffff !important;
    border: 1px solid #e5e1d5 !important;
}

/* 3. Dashboard Quick Action buttons (ensure readable dark text, not neon pastel) */
[data-theme-profile="hairx-light"] a.btn[style*="background:rgba"],
[data-theme-profile="hairx-light"] a.btn[style*="background: rgba"],
[data-theme="light"] a.btn[style*="background:rgba"],
[data-theme="light"] a.btn[style*="background: rgba"] {
    color: #1a1917 !important;
    border-color: rgba(51, 50, 46, 0.15) !important;
}

[data-theme-profile="hairx-light"] a.btn[style*="background:rgba"] span,
[data-theme-profile="hairx-light"] a.btn[style*="background: rgba"] span {
    color: #1a1917 !important;
}

[data-theme-profile="hairx-light"] a.btn[style*="background:rgba"] span:first-child,
[data-theme-profile="hairx-light"] a.btn[style*="background: rgba"] span:first-child {
    filter: none !important;
}

/* 4. Neutralize white-on-light or light-gray text inside any container */
[data-theme-profile="hairx-light"] [style*="color: #f8fafc"],
[data-theme-profile="hairx-light"] [style*="color:#f8fafc"],
[data-theme-profile="hairx-light"] [style*="color: #cbd5e1"],
[data-theme-profile="hairx-light"] [style*="color:#cbd5e1"] {
    color: #1a1917 !important;
}

[data-theme-profile="hairx-light"] [style*="color: #94a3b8"],
[data-theme-profile="hairx-light"] [style*="color:#94a3b8"],
[data-theme-profile="hairx-light"] [style*="color: #64748b"],
[data-theme-profile="hairx-light"] [style*="color:#64748b"] {
    color: #66635a !important;
}

/* 5. Reinforce Sidebar Dashboard & Active Items in ALL contexts */
[data-theme-profile="hairx-light"] .menu-item.active a,
[data-theme-profile="hairx-light"] .sidebar-sub-item.active a,
[data-theme="light"] .menu-item.active a,
[data-theme="light"] .sidebar-sub-item.active a {
    background: #e5dfd2 !important;
    color: #1a1917 !important;
    font-weight: 800 !important;
    border-right: 3.5px solid #33322e !important;
    box-shadow: 0 2px 8px rgba(50, 45, 35, 0.08) !important;
}

[data-theme-profile="hairx-light"] .menu-item.active a span,
[data-theme-profile="hairx-light"] .sidebar-sub-item.active a span,
[data-theme="light"] .menu-item.active a span,
[data-theme="light"] .sidebar-sub-item.active a span {
    color: #1a1917 !important;
}

[data-theme-profile="hairx-light"] .menu-item a,
[data-theme="light"] .menu-item a {
    color: #4a4740 !important;
}



