/* ============================================
   DENTAGEST \u2014 DESIGN SYSTEM v7
   Senior SaaS Product Design \u2014 Medical Grade
   Inspired: Linear + Stripe + Vercel + Doctolib
   ============================================ */

/* Google Fonts \u2014 Inter variable font */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* ============================================
   DARK THEME (Default) \u2014 Neutral dark slate
   Inspired by Vercel/Linear dark mode
   NO blue atmosphere. Blue = accent only.
   ============================================ */
:root {
    /* === APP BACKGROUNDS === */
    --app-bg: #0B1220;
    --sidebar-bg: #0F172A;
    --topbar-bg: #111C2E;
    --page-container-bg: #111827;
    --card-bg: #1B2638;
    --surface-secondary: #223049;

    /* === LEGACY COMPAT (keep for old refs) === */
    --primary-dark: #0F172A;
    --primary-darker: #0B1220;
    --primary-lighter: #1B2638;
    --primary-accent: #111C2E;

    /* === BORDERS === */
    --border-default: #2B3A52;
    --border-muted: #1F2A3D;
    --border-subtle: #162033;

    /* === SURFACES legacy === */
    --surface-0: #0B1220;
    --surface-1: #0F172A;
    --surface-2: #111827;
    --surface-3: #1B2638;
    --surface-4: #223049;
    --surface-overlay: rgba(9, 14, 28, 0.85);

    /* === BRAND BLUE \u2014 Accent only === */
    --brand-blue: #3B82F6;
    --brand-blue-light: #60A5FA;
    --brand-blue-dark: #2563EB;
    --brand-blue-subtle: #162742;

    /* === ACTIVE STATE === */
    --active-bg: #162742;
    --active-text: #60A5FA;
    --active-indicator: #3B82F6;

    /* === TEXT === */
    --text-primary: #F8FAFC;
    --text-secondary: #A8B3C7;
    --text-tertiary: #7B879A;
    --text-muted: #4B5A6F;

    /* === INPUT === */
    --input-bg: #111C2E;
    --input-border: #2B3A52;

    /* === STATUS \u2014 vivid on dark === */
    --success: #22C55E;
    --success-bg: rgba(34, 197, 94, 0.12);
    --warning: #F59E0B;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #F87171;
    --danger-bg: rgba(248, 113, 113, 0.12);
    --info: #3B82F6;
    --info-bg: rgba(59, 130, 246, 0.12);

    /* === TABS dark === */
    --tab-active-bg: #3B82F6;
    --tab-active-text: #FFFFFF;
    --tab-inactive-bg: transparent;
    --tab-inactive-text: #9FB0C9;

    /* === GLASSMORPHISM off === */
    --glass-bg: #1B2638;
    --glass-bg-strong: #223049;
    --glass-border: #2B3A52;
    --glass-border-strong: #33435A;
    --glass-blur: 0px;
    --glass-blur-strong: 0px;

    /* === SHADOWS \u2014 dark: minimal === */
    --shadow-sm: none;
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.20);
    --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-glow-blue: none;
    --shadow-glow-gold: none;
    --shadow-glow-soft: none;
    --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.04);

    /* === TYPOGRAPHY === */
    --font-heading: 'Inter', -apple-system, sans-serif;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.72rem;
    /* 11.5px */
    --font-size-sm: 0.8125rem;
    /* 13px */
    --font-size-base: 0.9375rem;
    /* 15px */
    --font-size-lg: 1.0625rem;
    /* 17px */
    --font-size-xl: 1.25rem;
    /* 20px */
    --font-size-2xl: 1.5rem;
    /* 24px */
    --font-size-3xl: 1.75rem;
    /* 28px */
    --font-size-4xl: 2.25rem;
    /* 36px */
    --font-size-5xl: 2.75rem;
    /* 44px */

    /* === SPACING SYSTEM (4/8/12/16/20/24/32/40) === */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --sp-8: 32px;
    --sp-10: 40px;
    /* Legacy compat */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 40px;

    /* === BORDER RADIUS SYSTEM \u2014 EXACT SPEC === */
    --radius-container: 24px;
    /* page section containers */
    --radius-card: 18px;
    /* all cards, stat cards */
    --radius-btn: 14px;
    /* all buttons */
    --radius-input: 14px;
    /* all inputs/selects */
    --radius-pill: 9999px;
    /* tabs, avatars, badges */
    --radius-icon: 14px;
    /* icon containers 44x44 */
    /* Legacy compat */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;

    /* === TRANSITIONS === */
    --transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* === LAYOUT DIMENSIONS \u2014 PREMIUM SPEC === */
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 64px;
    --header-height: 56px;
    --nav-item-height: 44px;
    --nav-icon-size: 20px;
    --btn-height: 40px;
    --input-height: 40px;
    --icon-container: 40px;
}

/* ============================================
   LIGHT THEME \u2014 Exact Color Spec
   Structural clarity + Medical trust
   ============================================ */
.light-theme {
    /* === APP BACKGROUNDS \u2014 Tout blanc comme Doctopus === */
    --app-bg: #F9FAFB;
    --sidebar-bg: #FFFFFF;
    --topbar-bg: #FFFFFF;
    --page-container-bg: #FFFFFF;
    --card-bg: #FFFFFF;
    --surface-secondary: #F9FAFB;

    /* === LEGACY COMPAT === */
    --primary-dark: #F9FAFB;
    --primary-darker: #F3F4F6;
    --primary-lighter: #FFFFFF;
    --primary-accent: #EFF6FF;

    /* === BORDERS \u2014 simple, discret === */
    --border-default: #E5E7EB;
    --border-muted: #F3F4F6;
    --border-subtle: #F9FAFB;

    /* === SURFACES legacy === */
    --surface-0: #FFFFFF;
    --surface-1: #FFFFFF;
    --surface-2: #F9FAFB;
    --surface-3: #F3F4F6;
    --surface-4: #E5E7EB;
    --surface-overlay: rgba(255, 255, 255, 0.98);

    /* === BRAND BLUE === */
    --brand-blue: #2563EB;
    --brand-blue-light: #3B82F6;
    --brand-blue-dark: #1D4ED8;
    --brand-blue-subtle: #EFF6FF;

    /* === ACTIVE STATE \u2014 Solid blue comme Doctopus === */
    --active-bg: #2563EB;
    --active-text: #FFFFFF;
    --active-indicator: #2563EB;

    /* === TEXT === */
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --text-muted: #D1D5DB;

    /* === INPUT === */
    --input-bg: #FFFFFF;
    --input-border: #D1D5DB;

    /* === STATUS === */
    --success: #059669;
    --success-bg: #ECFDF5;
    --warning: #D97706;
    --warning-bg: #FFFBEB;
    --danger: #DC2626;
    --danger-bg: #FEF2F2;
    --info: #2563EB;
    --info-bg: #EFF6FF;

    /* === TABS === */
    --tab-active-bg: #2563EB;
    --tab-active-text: #FFFFFF;
    --tab-inactive-bg: #FFFFFF;
    --tab-inactive-text: #6B7280;

    /* === OFF === */
    --glass-bg: #FFFFFF;
    --glass-bg-strong: #FFFFFF;
    --glass-border: #E5E7EB;
    --glass-border-strong: #D1D5DB;
    --glass-blur: 0px;
    --glass-blur-strong: 0px;

    /* === SHADOWS \u2014 quasi aucune comme Doctopus === */
    --shadow-sm: none;
    --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 8px 16px rgba(0, 0, 0, 0.08);
    --shadow-glow-blue: none;
    --shadow-glow-gold: none;
    --shadow-glow-soft: none;
    --shadow-inset: none;

    /* === STATUS COLORS === */
    --brand-gold: #D97706;
    --brand-gold-light: #F59E0B;
    --brand-gold-dark: #B45309;
    --brand-gold-subtle: #FFFBEB;
    --brand-teal: #0D9488;
    --brand-teal-light: #14B8A6;
    --brand-teal-dark: #0F766E;
    --brand-teal-subtle: #F0FDFA;
    --brand-purple: #7C3AED;
    --brand-purple-subtle: #F5F3FF;
}

/* ============================================
   LIGHT THEME \u2014 Structural Overrides
   Doctopus-style: flat, white, minimal
   ============================================ */

/* === APP BG — gris bleuté perceptible, contraste net avec sidebar+cards blanches === */
.light-theme .app-container,
.light-theme body {
    background: #F0F4FA;
}

/* === SIDEBAR — blanche pure, premium === */
.light-theme .sidebar {
    width: var(--sidebar-width);
    background: #FFFFFF;
    border-right: 1px solid #E4EAF4;
    box-shadow: 2px 0 8px rgba(15, 23, 42, 0.04);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.light-theme .sidebar-header {
    background: #FFFFFF;
    border-bottom: 1px solid #EEF2FA;
    padding: 0 16px;
    min-height: 56px;
    display: flex;
    align-items: center;
}

.light-theme .sidebar-footer {
    background: #FAFBFE;
    border-top: 1px solid #EEF2FA;
    padding: 12px 8px;
}

/* === HEADER — 56px, clean, Stripe === */
.light-theme .header {
    height: var(--header-height);
    background: #FFFFFF;
    border-bottom: 1px solid #E4EAF4;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0 24px;
}

/* === NAV ITEMS — premium lisibilité === */
.light-theme .nav-item {
    height: var(--nav-item-height);
    padding: 0 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #4B5563;
    border: none;
    gap: 10px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.light-theme .nav-item .nav-icon {
    width: 20px;
    height: 20px;
    color: #6B7280;
    flex-shrink: 0;
    stroke-width: 1.75;
}

.light-theme .nav-item:hover {
    background: #EEF3FC;
    color: #1E3A8A;
}

.light-theme .nav-item:hover .nav-icon {
    color: #2563EB;
}

/* === NAV ACTIVE — bleu plein assumé, lisible, identitaire === */
.light-theme .nav-item.active {
    background: #2563EB;
    color: #FFFFFF;
    border: none;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
    font-weight: 600;
}

.light-theme .nav-item.active .nav-icon {
    color: #FFFFFF;
}

.light-theme .nav-item.active .nav-text {
    font-weight: 600;
    color: #FFFFFF;
}

.light-theme .nav-item.active::before {
    display: none;
}

/* === SECTION LABEL === */
.light-theme .nav-section-label {
    font-size: 10px;
    font-weight: 700;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 8px 12px 4px;
}

/* === SIDEBAR TOGGLE === */
.light-theme .sidebar-toggle {
    width: 28px;
    height: 28px;
    background: #F1F4FA;
    border: 1px solid #E4EAF4;
    color: #6B7280;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.light-theme .sidebar-toggle:hover {
    background: #E4EAF4;
    color: #1D4ED8;
}

/* === SEARCH INPUT === */
.light-theme .search-input {
    height: 38px;
    background: #F5F7FC;
    border: 1px solid #DDE3EF;
    border-radius: 8px;
    color: #111827;
    font-size: 14px;
    padding: 0 14px;
}

.light-theme .search-input::placeholder {
    color: #9CA3AF;
}

.light-theme .search-input:focus {
    background: #FFFFFF;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: none;
}

/* === HEADER WIDGETS === */
.light-theme .header-date {
    height: 34px;
    background: #F5F7FC;
    border: 1px solid #DDE3EF;
    border-radius: 8px;
    color: #4B5563;
    font-size: 13px;
    padding: 0 12px;
}

.light-theme .notification-btn {
    width: 36px;
    height: 36px;
    background: #F5F7FC;
    border: 1px solid #DDE3EF;
    border-radius: 8px;
    color: #6B7280;
}

.light-theme .notification-btn:hover {
    background: #EEF3FC;
    color: #2563EB;
    border-color: #C7D7F8;
}

/* === CARDS — Flat, white, subtle border comme Doctopus === */
.light-theme .card {
    background: #FFFFFF;
    border: 1px solid #E8EDF5;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.light-theme .card::before {
    display: none;
}

.light-theme .card:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.10);
    border-color: #C7D7F8;
    transform: none;
}

.light-theme .card-header {
    background: #FFFFFF;
    border-bottom: 1px solid #EEF2FA;
    padding: 18px 20px 14px;
    border-radius: 12px 12px 0 0;
}

.light-theme .card-body {
    padding: 18px 20px;
}

.light-theme .card-footer {
    background: #F8FAFD;
    border-top: 1px solid #EEF2FA;
    padding: 12px 20px;
    border-radius: 0 0 12px 12px;
}

/* === STAT KPI CARDS — Flat, compact, Doctopus-style === */
.light-theme .stat-card {
    background: #FFFFFF;
    border: 1px solid #E8EDF5;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 20px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.light-theme .stat-card::after,
.light-theme .stat-card::before {
    display: none;
}

.light-theme .stat-card:hover {
    border-color: #C7D7F8;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.10);
    transform: none;
}

/* Icon container \u2014 44x44, 14px radius, tinted bg */
.light-theme .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-icon);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F8FAFC;
    flex-shrink: 0;
}

.light-theme .stat-icon.blue {
    background: #EFF6FF;
    color: #2563EB;
}

.light-theme .stat-icon.green {
    background: #F0FDF4;
    color: #10B981;
}

.light-theme .stat-icon.gold {
    background: #FFFBEB;
    color: #D97706;
}

.light-theme .stat-icon.red {
    background: #FEF2F2;
    color: #EF4444;
}

.light-theme .stat-icon.teal {
    background: #F0FDFA;
    color: #14B8A6;
}

/* Metric number \u2014 36-44px, 700 weight */
.light-theme .stat-value {
    font-size: clamp(2.25rem, 3vw, 2.75rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.035em;
    color: #0F172A;
}

/* Metric label \u2014 15-17px, 500 weight, secondary */
.light-theme .stat-label {
    font-size: 15px;
    font-weight: 500;
    color: #5F6F86;
}

/* === FORMS \u2014 44px height, 14px radius === */
.light-theme .form-input,
.light-theme .form-select,
.light-theme .form-textarea {
    height: var(--input-height);
    background: #FFFFFF;
    border: 1px solid #D8E1EC;
    border-radius: var(--radius-input);
    color: #0F172A;
    font-size: 15px;
    padding: 0 14px;
    box-shadow: none;
    transition: border var(--transition-fast);
    -webkit-appearance: none;
    appearance: none;
}

.light-theme .form-textarea {
    height: auto;
    min-height: 100px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.light-theme .form-input::placeholder,
.light-theme .form-textarea::placeholder {
    color: #94A3B8;
}

.light-theme .form-input:focus,
.light-theme .form-select:focus,
.light-theme .form-textarea:focus {
    background: #FFFFFF;
    border: 2px solid #2563EB;
    outline: none;
    box-shadow: none;
}

.light-theme .form-label {
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.light-theme .input-group-text {
    height: var(--input-height);
    background: #F3F6FA;
    border-color: #D8E1EC;
    border-radius: var(--radius-input);
    color: #64748B;
}

/* === BUTTONS \u2014 48px, 14px radius, exact === */
.light-theme .btn {
    height: var(--btn-height);
    padding: 0 20px;
    border-radius: var(--radius-btn);
    font-size: 15px;
    font-weight: 600;
    box-shadow: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.light-theme .btn::after {
    display: none;
}

/* Primary */
.light-theme .btn-primary {
    background: #2563EB;
    color: #FFFFFF;
    border: none;
}

.light-theme .btn-primary:hover:not(:disabled) {
    background: #1D4ED8;
    transform: translateY(-1px);
}

.light-theme .btn-primary:active:not(:disabled) {
    background: #1E40AF;
    transform: none;
}

/* Secondary */
.light-theme .btn-secondary {
    background: #FFFFFF;
    color: #111827;
    border: 1px solid #D1D5DB;
    font-weight: 500;
}

.light-theme .btn-secondary:hover:not(:disabled) {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

/* Danger */
.light-theme .btn-danger {
    background: #EF4444;
    color: #FFFFFF;
    border: none;
}

.light-theme .btn-danger:hover:not(:disabled) {
    background: #DC2626;
    transform: translateY(-1px);
}

/* Success */
.light-theme .btn-success {
    background: #10B981;
    color: #FFFFFF;
    border: none;
}

.light-theme .btn-success:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-1px);
}

/* Ghost */
.light-theme .btn-ghost {
    background: transparent;
    color: #6B7280;
    border: 1px solid transparent;
    font-weight: 500;
}

.light-theme .btn-ghost:hover:not(:disabled) {
    background: #F3F4F6;
    color: #111827;
    border-color: #E5E7EB;
}

.light-theme .tab.active {
    background: #2563EB;
    color: #FFFFFF;
    border-color: #2563EB;
    font-weight: 600;
}

.light-theme .tabs {
    border-bottom: 1px solid #E5E7EB;
    gap: 4px;
    padding: 0;
}

.light-theme .tab {
    height: 36px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
}

.light-theme .tab:hover {
    background: #F9FAFB;
    color: #111827;
    border-color: #D1D5DB;
}

/* === TABLES — Doctopus style: flat header, light rows === */
.light-theme .table-container {
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-card);
    background: #FFFFFF;
    overflow: hidden;
    box-shadow: none;
}

.light-theme .table th {
    background: #F9FAFB;
    color: #6B7280;
    border-bottom: 1px solid #E5E7EB;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 16px;
    white-space: nowrap;
}

.light-theme .table td {
    border-bottom: 1px solid #F3F4F6;
    color: #111827;
    padding: 0 16px;
    height: 52px;
    vertical-align: middle;
}

.light-theme .table tbody tr:last-child td {
    border-bottom: none;
}

.light-theme .table tbody tr:hover {
    background: #F9FAFB;
}

/* === BADGES \u2014 compact, clean, semantic === */
.light-theme .badge-primary {
    background: #EFF6FF;
    color: #1D4ED8;
    font-size: 12px;
}

.light-theme .badge-success {
    background: #F0FDF4;
    color: #059669;
    font-size: 12px;
}

.light-theme .badge-warning {
    background: #FFFBEB;
    color: #B45309;
    font-size: 12px;
}

.light-theme .badge-danger {
    background: #FEF2F2;
    color: #DC2626;
    font-size: 12px;
}

.light-theme .badge-neutral {
    background: #F3F6FA;
    color: #5F6F86;
    font-size: 12px;
}

.light-theme .badge-gold {
    background: #FFFBEB;
    color: #D97706;
    font-size: 12px;
}

/* === MODAL \u2014 18px radius, clean === */
.light-theme .modal-overlay {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.light-theme .modal-content {
    background: #FFFFFF;
    border: 1px solid #E6EBF2;
    border-radius: var(--radius-container);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
    backdrop-filter: none;
}

.light-theme .modal-header {
    background: #FFFFFF;
    border-bottom: 1px solid #EEF2F7;
    padding: 20px 24px;
    border-radius: var(--radius-container) var(--radius-container) 0 0;
}

.light-theme .modal-footer {
    background: #F8FAFC;
    border-top: 1px solid #EEF2F7;
    padding: 16px 24px;
    border-radius: 0 0 var(--radius-container) var(--radius-container);
}

.light-theme .modal-close {
    width: 32px;
    height: 32px;
    background: #F3F6FA;
    border: none;
    border-radius: 8px;
    color: #64748B;
}

.light-theme .modal-close:hover {
    background: #E6EBF2;
    color: #0F172A;
}

/* === TOAST \u2014 clean floating === */
.light-theme .toast {
    background: #FFFFFF;
    border: 1px solid #E6EBF2;
    border-radius: var(--radius-card);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
    color: #0F172A;
}

/* === DROPDOWN \u2014 shadow, clean === */
.light-theme .dropdown-menu {
    background: #FFFFFF;
    border: 1px solid #E6EBF2;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
    backdrop-filter: none;
}

.light-theme .dropdown-item {
    color: #0F172A;
    font-size: 14px;
}

.light-theme .dropdown-item:hover {
    background: #F7F9FC;
}

.light-theme .dropdown-divider {
    background: #EEF2F7;
}

/* === NOTIFICATION (unread) === */
.light-theme .notification-panel {
    background: #FFFFFF;
    border-left: 1px solid #E6EBF2;
}

.light-theme .notification-header {
    border-bottom-color: #E6EBF2;
}

.light-theme .notification-item:hover {
    background: #F7F9FC;
}

.light-theme .notification-item.unread {
    background: #EAF2FF;
}

/* === SCROLLBAR \u2014 subtle === */
.light-theme ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.light-theme ::-webkit-scrollbar-track {
    background: transparent;
}

.light-theme ::-webkit-scrollbar-thumb {
    background: #D8E1EC;
    border-radius: 9999px;
}

.light-theme ::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* === PROGRESS BARS === */
.light-theme .progress {
    background: #EEF2F7;
    border-radius: 9999px;
    height: 6px;
}

.light-theme .progress-bar {
    background: #2563EB;
    border-radius: 9999px;
}

/* === AVATAR \u2014 solid fill, no gradients === */
.light-theme .avatar {
    background: #2563EB;
    color: #FFFFFF;
    border-radius: 9999px;
    font-weight: 600;
}

/* === QUICK ADD === */
.light-theme .quick-add-option {
    background: #F7F9FC;
    border: 1px solid #E6EBF2;
    border-radius: var(--radius-btn);
    color: #374151;
    font-size: 15px;
    font-weight: 500;
}

.light-theme .quick-add-option:hover {
    background: #EAF2FF;
    border-color: #C0D4F8;
    color: #1D4ED8;
}

/* === SECTION LABEL === */
.light-theme .nav-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0 16px;
    margin-top: 12px;
}

/* === PAGE TITLE TYPOGRAPHY === */
.light-theme .page-title,
.light-theme .page-header-title {
    font-size: clamp(1.5rem, 2vw, 1.75rem);
    font-weight: 700;
    color: #0F172A;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.light-theme .page-subtitle {
    font-size: 15px;
    color: #5F6F86;
    font-weight: 400;
}

/* === USER PROFILE (SIDEBAR BOTTOM) === */
.light-theme .user-name {
    color: #0F172A;
    font-size: 15px;
    font-weight: 500;
}

.light-theme .user-role {
    color: #5F6F86;
    font-size: 13px;
}

.light-theme .user-email {
    color: #94A3B8;
    font-size: 13px;
}

/* === SKELETON === */
.light-theme .skeleton {
    background: linear-gradient(90deg, #EEF2F7 25%, #E6EBF2 50%, #EEF2F7 75%);
    background-size: 200% 100%;
    animation: shimmer 1.8s ease-in-out infinite;
}

/* ============================================
   LIGHT THEME — Medical Clean (Stripe / Doctolib)
   80% blanc | 15% gris | 5% bleu #2563EB
   ============================================ */
.light-theme {
    /* === FOND === */
    --primary-dark: #F8FAFC;
    --primary-darker: #F1F5F9;
    --primary-lighter: #FAFBFC;
    --primary-accent: #F0F9FF;

    /* === TEXTE — Contraste maximal === */
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --text-tertiary: #94A3B8;
    --text-muted: #CBD5E1;

    /* === BORDURES — Grises, solides, propres === */
    --border-default: #E5E7EB;
    --border-muted: #F1F5F9;
    --border-subtle: #F8FAFC;

    /* === SURFACES — Cards blanches sur fond grisé === */
    --surface-0: #FFFFFF;
    --surface-1: #FFFFFF;
    --surface-2: #F8FAFC;
    --surface-3: #F1F5F9;
    --surface-4: #E5E7EB;
    --surface-overlay: rgba(255, 255, 255, 0.98);

    /* === GLASSMORPHISM désactivé — surfaces opaques === */
    --glass-bg: #FFFFFF;
    --glass-bg-strong: #FFFFFF;
    --glass-border: #E5E7EB;
    --glass-border-strong: #CBD5E1;
    --glass-blur: 0px;
    --glass-blur-strong: 0px;

    /* === OMBRES très légères — style Stripe === */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.04);
    --shadow-glow-blue: 0 4px 12px rgba(37, 99, 235, 0.15);
    --shadow-glow-gold: 0 4px 12px rgba(217, 119, 6, 0.10);
    --shadow-glow-soft: 0 4px 12px rgba(37, 99, 235, 0.10);
    --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.8);

    /* === COULEURS PRINCIPALES — 2 couleurs seulement === */
    --brand-blue: #2563EB;
    --brand-blue-light: #3B82F6;
    --brand-blue-dark: #1D4ED8;
    --brand-blue-subtle: #EFF6FF;

    /* Turquoise médical — accent sanité */
    --brand-teal: #14B8A6;
    --brand-teal-light: #2DD4BF;
    --brand-teal-dark: #0D9488;
    --brand-teal-subtle: #F0FDFA;

    /* Ambre / gold — utilisable en statuts */
    --brand-gold: #D97706;
    --brand-gold-light: #F59E0B;
    --brand-gold-dark: #B45309;
    --brand-gold-subtle: #FFFBEB;

    /* === STATUS COLORS en clair === */
    --success: #10B981;
    --success-bg: #F0FDF4;
    --warning: #F59E0B;
    --warning-bg: #FFFBEB;
    --danger: #EF4444;
    --danger-bg: #FEF2F2;
    --info: #3B82F6;
    --info-bg: #EFF6FF;
}

/* ============================================
   LIGHT THEME — Overrides Structurels
   ============================================ */

/* === APP BG wins here — couleur principale perceptible === */
.light-theme .app-container {
    background: #F0F4FA;
}

/* === SIDEBAR — blanche pure, séparation nette avec le fond === */
.light-theme .sidebar {
    background: #FFFFFF;
    border-right: 1px solid #E4EAF4;
    box-shadow: 2px 0 8px rgba(15, 23, 42, 0.04);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.light-theme .sidebar-header {
    background: #FFFFFF;
    border-bottom: 1px solid #EEF2FA;
    min-height: 56px;
    padding: 0 16px;
}

.light-theme .sidebar-footer {
    background: #FAFBFE;
    border-top: 1px solid #EEF2FA;
    padding: 12px 8px;
}

/* === HEADER — 56px, shadow Stripe légère === */
.light-theme .header {
    background: #FFFFFF;
    border-bottom: 1px solid #E4EAF4;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* === NAV ITEMS — 44px, 10px radius, texte lisible === */
.light-theme .nav-item {
    color: #4B5563;
    font-size: 14px;
    font-weight: 500;
    padding: 0 12px;
    border-radius: 10px;
    gap: 10px;
    height: 44px;
    border: none;
}

.light-theme .nav-item .nav-icon {
    color: #6B7280;
    stroke-width: 1.75;
}

.light-theme .nav-item:hover {
    background: #EEF3FC;
    color: #1E3A8A;
}

.light-theme .nav-item:hover .nav-icon {
    color: #2563EB;
}

/* === NAV ACTIVE — bleu plein, ombre subtile, assumé === */
.light-theme .nav-item.active .nav-text {
    font-weight: 600;
    color: #FFFFFF;
}

.light-theme .nav-item.active {
    background: #2563EB;
    color: #FFFFFF;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
    border: none;
}

.light-theme .nav-item.active .nav-icon {
    color: #FFFFFF;
}

.light-theme .nav-item.active::before {
    display: none;
}

/* Sidebar toggle */
.light-theme .sidebar-toggle {
    width: 28px;
    height: 28px;
    background: #F1F4FA;
    border: 1px solid #E4EAF4;
    border-radius: 8px;
    color: #6B7280;
}

.light-theme .sidebar-toggle:hover {
    background: #DDE6F8;
    color: #1D4ED8;
}

/* Search */
.light-theme .search-input {
    background: #F5F7FC;
    border: 1px solid #DDE3EF;
    border-radius: 8px;
    color: #111827;
    font-size: 14px;
    height: 38px;
}

.light-theme .search-input::placeholder {
    color: #9CA3AF;
}

.light-theme .search-input:focus {
    background: #FFFFFF;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Header widgets */
.light-theme .header-date {
    background: #F5F7FC;
    border: 1px solid #DDE3EF;
    border-radius: 8px;
    color: #4B5563;
    font-size: 13px;
    height: 34px;
    padding: 0 12px;
}

.light-theme .notification-btn {
    background: #F5F7FC;
    border: 1px solid #DDE3EF;
    border-radius: 8px;
    color: #6B7280;
    width: 36px;
    height: 36px;
}

.light-theme .notification-btn:hover {
    background: #EEF3FC;
    color: #2563EB;
    border-color: #C7D7F8;
}

/* === CARDS — shadow Stripe précise, radius 12px === */
.light-theme .card {
    background: #FFFFFF;
    border: 1px solid #E8EDF5;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.light-theme .card:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.10);
    border-color: #C7D7F8;
    transform: none;
}

.light-theme .card-header {
    background: #FFFFFF;
    border-bottom: 1px solid #EEF2FA;
    padding: 18px 20px 14px;
}

.light-theme .card-body {
    padding: 18px 20px;
}

.light-theme .card-footer {
    background: #F8FAFD;
    border-top: 1px solid #EEF2FA;
    padding: 12px 20px;
}

/* === STAT CARDS — premium, compact, chiffres mis en avant === */
.light-theme .stat-card {
    background: #FFFFFF;
    border: 1px solid #E8EDF5;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 20px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    min-height: 140px;
}

/* Supprimer complètement les lignes colorées — elles font 'generic template' */
.light-theme .stat-card::after {
    display: none;
}

.light-theme .stat-card:hover {
    border-color: #C7D7F8;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.10);
    transform: none;
}

/* === FORMULAIRES — Radius 10px, focus ring discret === */
.light-theme .form-input,
.light-theme .form-select,
.light-theme .form-textarea {
    background: #FFFFFF;
    border: 1px solid #E5EAF2;
    border-radius: 10px;
    color: #0F172A;
    box-shadow: none;
    transition: border-color 150ms, box-shadow 150ms;
}

.light-theme .form-input::placeholder,
.light-theme .form-textarea::placeholder {
    color: #9CA3AF;
}

.light-theme .form-input:focus,
.light-theme .form-select:focus,
.light-theme .form-textarea:focus {
    background: #FFFFFF;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
    outline: none;
}

.light-theme .form-label {
    color: #374151;
    font-weight: 500;
    font-size: 0.875rem;
}

.light-theme .input-group-text {
    background: #F4F7FB;
    border-color: #E5EAF2;
    color: #6B7280;
}

/* === TABLES — Layout Stripe : radius 16px, th discret, rows respirées === */
.light-theme .table-container {
    border: 1px solid #E5EAF2;
    border-radius: 16px;
    background: #FFFFFF;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.light-theme .table th {
    background: #F8FAFB;
    color: #6B7280;
    border-bottom: 1px solid #E5EAF2;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 16px;
}

.light-theme .table td {
    border-bottom: 1px solid #F4F6FA;
    color: #111827;
    padding: 14px 16px;
}

.light-theme .table tbody tr:last-child td {
    border-bottom: none;
}

.light-theme .table tbody tr:hover {
    background: #F8FAFB;
}

/* === MODAL === */
.light-theme .modal-overlay {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.light-theme .modal-content {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.18), 0 8px 20px rgba(15, 23, 42, 0.10);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.light-theme .modal-close {
    background: #F1F5F9;
    border-color: #E2E8F0;
    color: #64748B;
}

/* === TOAST === */
.light-theme .toast {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
}

/* === DROPDOWN === */
.light-theme .dropdown-menu {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.light-theme .dropdown-item:hover {
    background: #F1F5F9;
    color: #0F172A;
}

.light-theme .dropdown-divider {
    background: #E2E8F0;
}

/* === QUICK ADD MENU === */
.light-theme .quick-add-option {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    color: #475569;
}

.light-theme .quick-add-option:hover {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: #1D4ED8;
}

/* === NOTIFICATION PANEL === */
.light-theme .notification-panel {
    background: #FFFFFF;
    border-left: 1px solid #E2E8F0;
}

.light-theme .notification-header {
    border-bottom-color: #E2E8F0;
}

.light-theme .notification-item:hover {
    background: #F8FAFC;
}

.light-theme .notification-item.unread {
    background: #EFF6FF;
}

/* === SCROLLBAR === */
.light-theme ::-webkit-scrollbar-thumb {
    background: #CBD5E1;
}

.light-theme ::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* === SKELETON === */
.light-theme .skeleton {
    background: linear-gradient(90deg, #F1F5F9 0%, #E8EEF6 40%, #EDF1F7 60%, #F1F5F9 100%);
    background-size: 200% 100%;
    animation: shimmer 1.8s ease-in-out infinite;
}

/* ============================================
   DARK THEME \u2014 Overrides Structurels
   Neutre, calme, professionnel. Sans neon, sans glow.
   Linear / Vercel / Stripe Night Mode quality
   ============================================ */

/* Fond de page dark : #0F172A Slate-950 */
body:not(.light-theme) .app-container {
    background: #0F172A;
}

/* SIDEBAR dark : #111827 \u2014 plus clair que le fond pour la s\u00e9paration */
body:not(.light-theme) .sidebar {
    background: #111827;
    border-right: 1px solid rgba(51, 65, 85, 0.8);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body:not(.light-theme) .sidebar-header {
    background: #111827;
    border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}

body:not(.light-theme) .sidebar-footer {
    background: #0F1A2E;
    border-top: 1px solid rgba(51, 65, 85, 0.5);
}

/* Logo / Clinic name dark — gradient text invisible sur fond sombre, on force en blanc */
body:not(.light-theme) .logo-title,
body:not(.light-theme) .app-name {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #F8FAFC;
    background-clip: unset;
    color: #F8FAFC;
}

body:not(.light-theme) .logo-subtitle,
body:not(.light-theme) .app-subtitle {
    color: #A8B3C7;
}

/* Header dark : #111827 comme sidebar \u2014 unifit\u00e9 */
body:not(.light-theme) .header {
    background: #111827;
    border-bottom: 1px solid rgba(51, 65, 85, 0.7);
    backdrop-filter: none;
}

/* Nav items dark */
body:not(.light-theme) .nav-item {
    color: #94A3B8;
}

body:not(.light-theme) .nav-item:hover {
    background: rgba(30, 41, 59, 0.8);
    color: #F1F5F9;
}

/* Nav actif dark : rgba bleu subtil \u2014 pas trop fort */
body:not(.light-theme) .nav-item.active {
    background: rgba(59, 130, 246, 0.14);
    color: #93C5FD;
    font-weight: 600;
}

body:not(.light-theme) .nav-item.active .nav-icon {
    color: #60A5FA;
}

body:not(.light-theme) .nav-item.active::before {
    background: #3B82F6;
    box-shadow: none;
}

/* Cards dark : #1E293B, border subtile */
body:not(.light-theme) .card {
    background: #1E293B;
    border: 1px solid rgba(148, 163, 184, 0.10);
    border-radius: 16px;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body:not(.light-theme) .card::before {
    display: none;
}

body:not(.light-theme) .card:hover {
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}

body:not(.light-theme) .card-header {
    background: #1E293B;
    border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}

body:not(.light-theme) .card-footer {
    background: #162032;
    border-top: 1px solid rgba(51, 65, 85, 0.5);
}

/* Stat cards dark \u2014 suprimer les lignes color\u00e9es */
body:not(.light-theme) .stat-card {
    background: #1E293B;
    border: 1px solid rgba(148, 163, 184, 0.10);
    border-radius: 16px;
    box-shadow: none;
    backdrop-filter: none;
}

body:not(.light-theme) .stat-card::after {
    display: none;
}

body:not(.light-theme) .stat-card:hover {
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

/* Bouton primaire dark \u2014 bleu calme */
body:not(.light-theme) .btn-primary {
    background: #2563EB;
    border: none;
    color: #FFFFFF;
    box-shadow: none;
    font-weight: 600;
}

body:not(.light-theme) .btn-primary:hover:not(:disabled) {
    background: #1D4ED8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.30);
    transform: translateY(-1px);
}

body:not(.light-theme) .btn::after {
    display: none;
}

/* Formulaires dark */
body:not(.light-theme) .form-input,
body:not(.light-theme) .form-select,
body:not(.light-theme) .form-textarea {
    background: #0F172A;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 10px;
    color: #F1F5F9;
}

body:not(.light-theme) .form-input:focus,
body:not(.light-theme) .form-select:focus,
body:not(.light-theme) .form-textarea:focus {
    background: #0F172A;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

body:not(.light-theme) .form-input::placeholder,
body:not(.light-theme) .form-textarea::placeholder {
    color: #475569;
}

/* Tables dark */
body:not(.light-theme) .table-container {
    background: #1E293B;
    border: 1px solid rgba(51, 65, 85, 0.7);
    border-radius: 16px;
    overflow: hidden;
}

body:not(.light-theme) .table th {
    background: #162032;
    color: #6B7280;
    border-bottom: 1px solid rgba(51, 65, 85, 0.7);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 16px;
}

body:not(.light-theme) .table td {
    border-bottom: 1px solid rgba(51, 65, 85, 0.35);
    color: #E2E8F0;
    padding: 14px 16px;
}

body:not(.light-theme) .table tbody tr:last-child td {
    border-bottom: none;
}

body:not(.light-theme) .table tbody tr:hover {
    background: #243248;
}

/* Modal dark */
body:not(.light-theme) .modal-overlay {
    background: rgba(9, 14, 28, 0.75);
    backdrop-filter: blur(6px);
}

body:not(.light-theme) .modal-content {
    background: #1E293B;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.50);
    backdrop-filter: none;
}

body:not(.light-theme) .modal-header {
    background: #1E293B;
    border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}

body:not(.light-theme) .modal-footer {
    background: #162032;
    border-top: 1px solid rgba(51, 65, 85, 0.5);
}

/* Dropdown dark */
body:not(.light-theme) .dropdown-menu {
    background: #1E293B;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.40);
    backdrop-filter: none;
}

body:not(.light-theme) .dropdown-item:hover {
    background: #243248;
    color: #F1F5F9;
}

/* Badges dark */
body:not(.light-theme) .badge-primary {
    background: rgba(59, 130, 246, 0.15);
    color: #93C5FD;
}

body:not(.light-theme) .badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #6EE7B7;
}

body:not(.light-theme) .badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #FCD34D;
}

body:not(.light-theme) .badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
}

body:not(.light-theme) .badge-neutral {
    background: rgba(100, 116, 139, 0.15);
    color: #94A3B8;
}

/* Scrollbar dark */
body:not(.light-theme) ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

body:not(.light-theme) ::-webkit-scrollbar-track {
    background: transparent;
}

body:not(.light-theme) ::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 9999px;
}

body:not(.light-theme) ::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Progressbar dark */
body:not(.light-theme) .progress {
    background: rgba(51, 65, 85, 0.5);
}

body:not(.light-theme) .progress-bar {
    background: #3B82F6;
}


.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    border-radius: var(--radius-sm);
}

.skeleton-text.short {
    width: 40%;
}

.skeleton-text.medium {
    width: 70%;
}

.skeleton-text.long {
    width: 100%;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}

.skeleton-card {
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    background: var(--surface-1);
    border: 1px solid var(--border-default);
}

.skeleton-card .skeleton-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.skeleton-card .skeleton-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Theme transition */
body,
.sidebar,
.header,
.main-content,
.modal-content {
    transition: background-color var(--transition-slow), color var(--transition-slow), border-color var(--transition-slow);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--primary-dark);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Headings use Outfit font */
h1,
h2,
h3,
h4,
h5,
h6,
.logo-title,
.card-title,
.stat-value,
.welcome-content h1,
.page-title {
    font-family: var(--font-heading);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(91, 141, 239, 0.2);
    border-radius: var(--radius-full);
    transition: background var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(91, 141, 239, 0.45);
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid var(--brand-blue);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--brand-blue);
    color: var(--text-primary);
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
    background: var(--app-bg);
    position: relative;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-default);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition-slow), transform var(--transition-slow);
    box-shadow: none;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .user-info {
    opacity: 0;
    visibility: hidden;
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

.sidebar-header {
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-muted);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.logo-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo-text {
    display: flex;
    flex-direction: column;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.logo-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-xl);
    font-weight: 800;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, var(--brand-blue-light) 0%, var(--brand-blue) 40%, var(--brand-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.sidebar-toggle:hover {
    background: var(--surface-3);
    color: var(--text-primary);
}

.sidebar-toggle svg {
    transition: transform var(--transition-base);
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    height: var(--nav-item-height);
    border-radius: 10px;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
    position: relative;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(91, 141, 239, 0.08);
    color: var(--text-primary);
    border-color: transparent;
}

.nav-item.active {
    background: var(--active-bg);
    color: var(--active-text);
    border-color: transparent;
    box-shadow: none;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--active-indicator);
    border-radius: 0 4px 4px 0;
    box-shadow: none;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke-width: 1.75;
}

.nav-text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.nav-badge {
    margin-left: auto;
    padding: 2px 8px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    background: var(--brand-blue);
    color: white;
    border-radius: var(--radius-full);
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.nav-badge.warning {
    background: var(--warning);
}

/* User Profile */
.sidebar-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-muted);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-gold) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-sm);
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.user-name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-slow);
}

.sidebar.collapsed~.main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-xl);
    z-index: 50;
    box-shadow: none;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.mobile-menu-btn:hover {
    background: var(--surface-2);
    color: var(--text-primary);
}

.search-box {
    position: relative;
    width: 320px;
}

.search-icon {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 9px var(--spacing-md) 9px 44px;
    background: var(--surface-2);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    transition: all var(--transition-base);
    font-family: var(--font-family);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    background: var(--surface-1);
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.18), var(--shadow-glow-soft);
    outline: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.header-date {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--surface-2);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.notification-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.notification-btn:hover {
    background: var(--surface-3);
    color: var(--text-primary);
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: var(--radius-full);
    display: none;
}

.notification-dot.active {
    display: block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.quick-add-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 9px var(--spacing-lg);
    background: var(--brand-blue);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
    box-shadow: none;
}

.quick-add-btn:hover {
    background: var(--brand-blue-dark);
    transform: translateY(-1px);
}

.quick-add-btn:active {
    transform: translateY(0);
}

/* Back to Admin Button */
.back-admin-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(201, 169, 98, 0.15);
    border: 1px solid rgba(201, 169, 98, 0.3);
    border-radius: var(--radius-md);
    color: var(--brand-gold);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.back-admin-btn:hover {
    background: var(--brand-gold);
    color: var(--primary-dark);
    border-color: var(--brand-gold);
}

/* Page Container */
.page-container {
    flex: 1;
    padding: var(--spacing-xl);
    overflow-y: auto;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 16, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeIn var(--transition-base);
}

.modal-content {
    position: relative;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 60px rgba(91, 141, 239, 0.08);
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp var(--transition-slow);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-3);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    font-size: var(--font-size-xl);
    cursor: pointer;
    transition: all var(--transition-base);
}

.modal-close:hover {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.3);
    color: var(--danger);
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.2);
}

/* Quick Add Menu */
.quick-add-menu {
    padding: var(--spacing-xl);
    width: 400px;
}

.quick-add-menu h3 {
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.quick-add-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.quick-add-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
    background: var(--surface-2);
    border: 1px solid var(--border-muted);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-heading);
    font-weight: 500;
}

.quick-add-option:hover {
    background: var(--surface-3);
    border-color: var(--brand-blue);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.quick-add-option svg {
    width: 32px;
    height: 32px;
}

.quick-add-option span {
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* ============================================
   NOTIFICATION PANEL
   ============================================ */
.notification-panel {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: 380px;
    max-height: calc(100vh - var(--header-height));
    background: var(--surface-1);
    border-left: 1px solid var(--border-default);
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    z-index: 90;
    display: flex;
    flex-direction: column;
}

.notification-panel.active {
    transform: translateX(0);
}

.notification-header {
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-default);
}

.notification-header h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--brand-blue);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: color var(--transition-base);
}

.mark-all-read:hover {
    color: var(--brand-blue-light);
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
}

.notification-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-base);
}

.notification-item:hover {
    background: var(--surface-2);
}

.notification-item.unread {
    background: rgba(79, 143, 186, 0.1);
}

.notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.notification-icon svg {
    width: 20px;
    height: 20px;
    color: var(--brand-blue);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.notification-message {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.notification-time {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: var(--spacing-xl);
    right: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    z-index: 2000;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--surface-1);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideInRight var(--transition-slow);
    max-width: 400px;
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.warning {
    border-left: 3px solid var(--warning);
}

.toast.error {
    border-left: 3px solid var(--danger);
}

.toast.info {
    border-left: 3px solid var(--info);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast.error .toast-icon {
    color: var(--danger);
}

.toast.info .toast-icon {
    color: var(--info);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.toast-message {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.toast-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: color var(--transition-base);
}

.toast-close:hover {
    color: var(--text-primary);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .search-box {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 var(--spacing-md);
    }

    .header-date {
        display: none;
    }

    .search-box {
        width: 160px;
    }

    .quick-add-btn span {
        display: none;
    }

    .quick-add-btn {
        padding: var(--spacing-sm);
    }

    .page-container {
        padding: var(--spacing-md);
    }

    .notification-panel {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .search-box {
        display: none;
    }

    .quick-add-menu {
        width: 100%;
        max-width: 340px;
    }
}

/* ============================================
   PHASE 1 REDESIGN - FIGMA-INSPIRED APP SHELL
   Scope: layout, dark sidebar, topbar, shared shell states.
   ============================================ */

body.light-theme {
    --app-bg: #F5F7FB;
    --sidebar-bg: #14182B;
    --topbar-bg: #FFFFFF;
    --page-container-bg: #F5F7FB;
    --card-bg: #FFFFFF;
    --surface-secondary: #F8FAFC;

    --primary-dark: #F5F7FB;
    --primary-darker: #EEF1F7;
    --primary-lighter: #FFFFFF;
    --primary-accent: #F3F1FF;

    --surface-0: #FFFFFF;
    --surface-1: #FFFFFF;
    --surface-2: #F8FAFC;
    --surface-3: #F1F4FA;
    --surface-4: #E7EAF3;
    --surface-overlay: rgba(255, 255, 255, 0.96);

    --glass-bg: #FFFFFF;
    --glass-bg-strong: #FFFFFF;
    --glass-border: #E7EAF3;
    --glass-border-strong: #D7DCE8;
    --glass-blur: 0px;
    --glass-blur-strong: 0px;

    --brand-blue: #7367F0;
    --brand-blue-light: #8B7CF6;
    --brand-blue-dark: #5E50E6;
    --brand-blue-subtle: #F0EEFF;

    --brand-teal: #00CFE8;
    --brand-teal-light: #4DE3F2;
    --brand-teal-dark: #00ADC2;
    --brand-teal-subtle: #EAFBFD;

    --brand-gold: #FF9F43;
    --brand-gold-light: #FFB976;
    --brand-gold-dark: #E8841E;
    --brand-gold-subtle: #FFF4E8;

    --success: #28C76F;
    --success-bg: #EAF9F0;
    --warning: #FF9F43;
    --warning-bg: #FFF4E8;
    --danger: #EA5455;
    --danger-bg: #FDEDED;
    --info: #00CFE8;
    --info-bg: #EAFBFD;

    --active-bg: #7367F0;
    --active-text: #FFFFFF;
    --active-indicator: #7367F0;

    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-tertiary: #98A2B3;
    --text-muted: #CBD5E1;

    --border-default: #E7EAF3;
    --border-muted: #EEF1F7;
    --border-subtle: #F6F8FC;
    --input-bg: #FFFFFF;
    --input-border: #DDE2EC;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
    --shadow-lg: 0 14px 34px rgba(15, 23, 42, 0.10);
    --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.16);
    --shadow-glow-blue: 0 8px 24px rgba(115, 103, 240, 0.18);
    --shadow-glow-gold: 0 8px 24px rgba(255, 159, 67, 0.16);
    --shadow-glow-soft: 0 8px 24px rgba(115, 103, 240, 0.10);
    --shadow-inset: none;

    --radius-container: 16px;
    --radius-card: 12px;
    --radius-btn: 8px;
    --radius-input: 8px;
    --radius-pill: 9999px;
    --radius-icon: 10px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;

    --sidebar-width: 254px;
    --sidebar-collapsed-width: 72px;
    --header-height: 64px;
    --nav-item-height: 42px;
}

body.light-theme,
body.light-theme .app-container {
    background: var(--app-bg);
    color: var(--text-primary);
}

body.light-theme .main-content {
    background: var(--app-bg);
}

body.light-theme .page-container {
    background: var(--app-bg);
    padding: 28px 32px;
}

body.light-theme .sidebar {
    background: var(--sidebar-bg);
    border-right: 0;
    box-shadow: 8px 0 28px rgba(20, 24, 43, 0.18);
}

body.light-theme .sidebar-header {
    min-height: 72px;
    padding: 0 18px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

body.light-theme .sidebar-footer {
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding: 14px 12px;
}

body.light-theme .logo {
    gap: 12px;
}

body.light-theme .logo-icon {
    width: 40px;
    height: 40px;
}

body.light-theme .logo-title,
body.light-theme .app-name {
    background: none;
    background-clip: unset;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #FFFFFF;
}

body.light-theme .logo-subtitle,
body.light-theme .app-subtitle {
    color: #8790B0;
    font-size: 10px;
    letter-spacing: 0.12em;
}

body.light-theme .sidebar-toggle {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    color: #AAB2D5;
}

body.light-theme .sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.11);
    color: #FFFFFF;
}

body.light-theme .sidebar-nav {
    padding: 18px 12px;
    gap: 6px;
}

body.light-theme .nav-item {
    height: var(--nav-item-height);
    padding: 0 12px;
    border-radius: 9px;
    color: #AAB2D5;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
}

body.light-theme .nav-item .nav-icon {
    color: #8790B0;
    stroke-width: 1.8;
}

body.light-theme .nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

body.light-theme .nav-item:hover .nav-icon {
    color: #FFFFFF;
}

body.light-theme .nav-item.active {
    background: var(--brand-blue);
    color: #FFFFFF;
    box-shadow: 0 10px 22px rgba(115, 103, 240, 0.30);
}

body.light-theme .nav-item.active::before {
    display: none;
}

body.light-theme .nav-item.active .nav-icon,
body.light-theme .nav-item.active .nav-text {
    color: #FFFFFF;
}

body.light-theme .nav-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #00CFE8;
    color: #111827;
    font-size: 11px;
    font-weight: 700;
}

body.light-theme .nav-badge.warning {
    background: #FF9F43;
    color: #111827;
}

body.light-theme .user-profile {
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .user-avatar {
    background: linear-gradient(135deg, #7367F0 0%, #00CFE8 100%);
    color: #FFFFFF;
}

body.light-theme .user-name {
    color: #FFFFFF;
}

body.light-theme .user-role {
    color: #8790B0;
}

body.light-theme .header {
    height: var(--header-height);
    background: #FFFFFF;
    border-bottom: 1px solid #E7EAF3;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    padding: 0 28px;
}

body.light-theme .header-left,
body.light-theme .header-right {
    gap: 14px;
}

body.light-theme .mobile-menu-btn {
    border: 1px solid #E7EAF3;
    background: #FFFFFF;
    color: #667085;
}

body.light-theme .mobile-menu-btn:hover {
    background: #F8FAFC;
    color: var(--brand-blue);
}

body.light-theme .search-box {
    width: min(360px, 34vw);
}

body.light-theme .search-input {
    height: 42px;
    padding-left: 42px;
    background: #F8FAFC;
    border: 1px solid #E1E6F0;
    border-radius: 10px;
    color: #1F2937;
    font-size: 13px;
}

body.light-theme .search-input::placeholder {
    color: #98A2B3;
}

body.light-theme .search-input:focus {
    background: #FFFFFF;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.12);
}

body.light-theme .search-icon {
    color: #98A2B3;
}

body.light-theme .header-date,
body.light-theme .notification-btn {
    height: 40px;
    background: #FFFFFF;
    border: 1px solid #E1E6F0;
    border-radius: 10px;
    color: #667085;
    box-shadow: var(--shadow-sm);
}

body.light-theme .header-date {
    padding: 0 12px;
    font-size: 13px;
}

body.light-theme .notification-btn {
    width: 40px;
}

body.light-theme .notification-btn:hover {
    background: var(--brand-blue-subtle);
    border-color: rgba(115, 103, 240, 0.30);
    color: var(--brand-blue);
}

body.light-theme .quick-add-btn {
    height: 40px;
    padding: 0 16px;
    background: var(--brand-blue);
    border-radius: 10px;
    box-shadow: 0 10px 22px rgba(115, 103, 240, 0.24);
}

body.light-theme .quick-add-btn:hover {
    background: var(--brand-blue-dark);
    box-shadow: 0 12px 26px rgba(115, 103, 240, 0.30);
}

body.light-theme .back-admin-btn {
    height: 40px;
    background: #FFF4E8;
    border-color: rgba(255, 159, 67, 0.35);
    border-radius: 10px;
    color: #B76A16;
}

body.light-theme .back-admin-btn:hover {
    background: #FF9F43;
    color: #FFFFFF;
}

@media (max-width: 1024px) {
    body.light-theme .sidebar {
        box-shadow: 16px 0 40px rgba(20, 24, 43, 0.24);
    }

    body.light-theme .main-content {
        margin-left: 0;
    }

    body.light-theme .search-box {
        width: 240px;
    }
}

@media (max-width: 768px) {
    body.light-theme .header {
        padding: 0 16px;
    }

    body.light-theme .page-container {
        padding: 18px 16px;
    }

    body.light-theme .header-right {
        gap: 8px;
    }

    body.light-theme .quick-add-btn {
        width: 40px;
        padding: 0;
    }
}

@media (max-width: 480px) {
    body.light-theme .sidebar {
        width: min(86vw, 300px);
    }
}
