/**
 * MedicalBeautyERP — Unified 60/30/10 Design System (Design Department Approved)
 * 60% White (#FFFFFF) | 30% Light Gray (#F8FAFC / #F1F5F9 / #E2E8F0) | 10% Rose (#E11D48)
 * Primary accent (--primary-color) is strictly reserved for primary CTAs, active nav item, and focus rings.
 */
:root {
    /* Core 60/30/10 Design Tokens (Customizable from Admin Color Studio) */
    --bg-base: #FFFFFF;
    --bg-page: #F8FAFC;
    --surface: #FFFFFF;
    --surface-secondary: #F1F5F9;
    --sidebar-bg: #FFFFFF;
    --sidebar-active-bg: #FFF1F2;
    --header-bg: #FFFFFF;
    --footer-bg: #FFFFFF;
    --border-color: #E2E8F0;
    --border-soft: #E2E8F0;
    --text-primary: #0F172A;
    --text-body: #334155;
    --text-secondary: #64748B;

    /* Primary Brand Accent (10% — customizable via Admin Settings) */
    --primary-color: #E11D48;
    --primary-hover: #BE123C;
    --primary-soft: #FFF1F2;
    --primary-soft-alt: #FFE4E6;
    --primary-border: #FECDD3;

    /* Form Inputs (Clean White & Slate, NO clashing sky-blue) */
    --input-bg: #FFFFFF;
    --input-bg-subtle: #F8FAFC;
    --input-border: #CBD5E1;

    /* Functional Status Colors */
    --success: #16A34A;
    --success-soft: #DCFCE7;
    --warning: #D97706;
    --warning-soft: #FEF3C7;
    --danger: #DC2626;
    --danger-soft: #FEE2E2;
    --neutral: #64748B;

    /* Legacy Token Aliases (Unified & Neutralized) */
    --cmp-bg: var(--bg-page);
    --cmp-surface: var(--surface);
    --cmp-surface-alt: var(--surface-secondary);
    --cmp-text: var(--text-primary);
    --cmp-text-secondary: var(--text-body);
    --cmp-text-muted: var(--text-secondary);
    --cmp-purple: var(--primary-color);
    --cmp-purple-hover: var(--primary-hover);
    --cmp-purple-soft: var(--primary-soft-alt);
    --cmp-green-bg: var(--success-soft);

    --brand-primary: var(--primary-color);
    --brand-primary-hover: var(--primary-hover);
    --brand-soft: var(--primary-soft);
    --theme-primary: var(--primary-color);
    --theme-primary-hover: var(--primary-hover);
    --theme-primary-50: var(--primary-soft);
    --theme-primary-100: var(--primary-soft-alt);
    --theme-primary-700: var(--primary-hover);
    --theme-secondary: var(--text-primary);
    --theme-bg: var(--bg-page);
    --theme-surface: var(--surface);
}

html:not(.dark),
html:not(.dark) body {
    background-color: var(--bg-page) !important;
    color: var(--text-primary) !important;
}

html:not(.dark) h1,
html:not(.dark) h2,
html:not(.dark) h3,
html:not(.dark) h4,
html:not(.dark) h5,
html:not(.dark) h6 {
    color: var(--text-primary);
}

html:not(.dark) .text-slate-900,
html:not(.dark) .text-slate-800 { color: var(--text-primary) !important; }
html:not(.dark) .text-slate-700,
html:not(.dark) .text-slate-600 { color: var(--text-body) !important; }
html:not(.dark) .text-slate-500,
html:not(.dark) .text-slate-400 { color: var(--text-secondary) !important; }

/* White Cards & Containers (preserve intentional status borders on .bg-white) */
html:not(.dark) :where(.bg-white),
html:not(.dark) .card,
html:not(.dark) .mini-app {
    background-color: var(--surface) !important;
}
html:not(.dark) .card,
html:not(.dark) .mini-app {
    border-color: var(--border-color);
}
/* Neutralize any leftover warm vanilla utility classes */
html:not(.dark) .bg-vanilla-50,
html:not(.dark) .bg-vanilla-100,
html:not(.dark) .bg-vanilla-200,
html:not(.dark) .bg-vanilla-300 {
    background-color: var(--bg-page, #F8FAFC) !important;
}
html:not(.dark) .border-vanilla-200,
html:not(.dark) .border-vanilla-300 {
    border-color: var(--border-color, #E2E8F0) !important;
}

/* White Sidebar: Calm Slate Hover + Single Active Rose Indicator */
html:not(.dark) aside#admin-sidebar,
html:not(.dark) #admin-sidebar,
html:not(.dark) aside#adminSidebar,
html:not(.dark) #adminSidebar {
    background: var(--sidebar-bg, #FFFFFF) !important;
    background-color: var(--sidebar-bg, #FFFFFF) !important;
    border-left: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}
html:not(.dark) header.sticky,
html:not(.dark) .pos-header,
html:not(.dark) .bayt-nav-bar {
    background-color: var(--header-bg, #FFFFFF) !important;
    border-color: var(--border-color, #E2E8F0) !important;
}
html:not(.dark) #admin-sidebar .nav-sub-link.bg-purple-50,
html:not(.dark) #admin-sidebar .nav-sub-link.bg-rose-50 {
    background-color: var(--sidebar-active-bg, var(--primary-soft)) !important;
    color: var(--primary-color) !important;
    font-weight: 800 !important;
    border-inline-start: 3px solid var(--primary-color) !important;
}
html:not(.dark) #admin-sidebar .nav-group-toggle,
html:not(.dark) #admin-sidebar a,
html:not(.dark) #admin-sidebar span {
    color: var(--text-body) !important;
}
html:not(.dark) #admin-sidebar .nav-group-toggle:hover,
html:not(.dark) #admin-sidebar .nav-sub-link:hover {
    background-color: var(--surface-secondary) !important;
    color: var(--text-primary) !important;
}
html:not(.dark) #admin-sidebar .nav-group-toggle.bg-slate-100\/80 {
    background-color: var(--surface-secondary) !important;
    color: var(--text-primary) !important;
    font-weight: 700 !important;
}
html:not(.dark) #admin-sidebar .nav-sub-link.bg-purple-50 span,
html:not(.dark) #admin-sidebar .nav-sub-link.bg-rose-50 span {
    color: var(--primary-color) !important;
}
html:not(.dark) #admin-sidebar .border-slate-200 {
    border-color: var(--border-color) !important;
}

/* Primary Buttons & Explicit Rose CTAs (Strict 10% Accent) */
.btn-primary, .bg-rose-600, .bg-rose-500, button.bg-purple-600, button.bg-purple-700 {
    background-color: var(--primary-color) !important;
    color: #FFFFFF !important;
}
.btn-primary:hover, .hover\:bg-rose-700:hover, button.bg-purple-600:hover, button.bg-purple-700:hover {
    background-color: var(--primary-hover) !important;
    color: #FFFFFF !important;
}
html:not(.dark) button.bg-white,
html:not(.dark) a.bg-white,
html:not(.dark) .btn.bg-white {
    background-color: #FFFFFF !important;
    color: #0F172A !important;
    border-color: #CBD5E1 !important;
}
html:not(.dark) button.bg-white:hover,
html:not(.dark) a.bg-white:hover,
html:not(.dark) .btn.bg-white:hover {
    background-color: #F8FAFC !important;
    color: #0F172A !important;
    border-color: #94A3B8 !important;
}
.bg-rose-50, .bg-rose-100 {
    background-color: var(--primary-soft) !important;
    color: var(--primary-color) !important;
}
.text-rose-600, .text-rose-700 {
    color: var(--primary-color) !important;
}
.border-rose-200, .border-rose-400, .border-rose-500, .border-rose-600 {
    border-color: var(--primary-border) !important;
}

/* Secondary / Decorative Purple & Indigo Badges -> Calm Neutral Slate (30% Gray) */
html:not(.dark) .bg-purple-50,
html:not(.dark) .bg-purple-100,
html:not(.dark) .bg-indigo-50,
html:not(.dark) .bg-indigo-100 {
    background-color: var(--surface-secondary) !important;
    color: var(--text-body) !important;
    border-color: var(--border-color) !important;
}
html:not(.dark) .text-purple-600,
html:not(.dark) .text-purple-700,
html:not(.dark) .text-purple-800,
html:not(.dark) .text-purple-900,
html:not(.dark) .text-indigo-600,
html:not(.dark) .text-indigo-700 {
    color: var(--text-body) !important;
}
html:not(.dark) .border-purple-200,
html:not(.dark) .border-purple-400,
html:not(.dark) .border-purple-500,
html:not(.dark) .border-indigo-200 {
    border-color: var(--border-color) !important;
}

/* Clean White/Slate Inputs with Rose Focus Ring */
html:not(.dark) input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="hidden"]):not(.bg-transparent),
html:not(.dark) select:not(.bg-transparent),
html:not(.dark) textarea {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}
html:not(.dark) input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="hidden"]):not(.bg-transparent):focus,
html:not(.dark) select:not(.bg-transparent):focus,
html:not(.dark) textarea:focus {
    background-color: #FFFFFF;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-soft-alt);
    outline: none;
}

/* Storefront Navigation & Hero — Crisp White & Subtle Gray */
html:not(.dark) .bayt-nav-bar {
    background-color: var(--surface) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}
html:not(.dark) .bayt-hero-banner {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%) !important;
    border: 1px solid var(--border-color) !important;
}
