/* ==========================================================================
   ILIASGESTION - Master Luxury Dark Mode Design System
   Obsidian Dark (#0B0F19) • Deep Slate (#111827 / #151E2E) • Hyper Blue & Indigo
   Zero-exception unified theming across Public, Student, and Admin panels
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Theme Custom Property Overrides
   -------------------------------------------------------------------------- */
:root[data-theme="dark"],
html[data-theme="dark"],
html.dark-theme,
body.dark-theme {
    /* Base Backgrounds (Obsidian & Midnight Slate) */
    --bg-base: #0B0F19 !important;
    --bg-subtle: #111827 !important;
    --bg-surface: #151E2E !important;
    --bg-card-glass: rgba(17, 24, 39, 0.85) !important;
    --bg-card-glass-elevated: rgba(21, 30, 46, 0.94) !important;
    --bg-card-hover: rgba(30, 41, 59, 0.96) !important;

    /* Typography Palette (High-Contrast Pearl & Slate) */
    --text-navy: #F8FAFC !important;
    --text-navy-light: #F1F5F9 !important;
    --text-body: #CBD5E1 !important;
    --text-secondary: #94A3B8 !important;
    --text-muted: #64748B !important;
    --text-dim: #475569 !important;

    /* Brand Colors (Vibrant for Deep Backgrounds) */
    --blue-primary: #3B82F6 !important;
    --blue-hover: #60A5FA !important;
    --blue-light: rgba(59, 130, 246, 0.16) !important;
    --blue-soft: rgba(59, 130, 246, 0.12) !important;
    --blue-border: rgba(59, 130, 246, 0.35) !important;

    --indigo-primary: #6366F1 !important;
    --indigo-hover: #818CF8 !important;
    --indigo-light: rgba(99, 102, 241, 0.16) !important;
    --indigo-soft: rgba(99, 102, 241, 0.12) !important;

    /* Semantic Accents */
    --emerald-light: rgba(16, 185, 129, 0.15) !important;
    --emerald-text: #34D399 !important;
    --rose-light: rgba(225, 29, 72, 0.15) !important;
    --rose-text: #FB7185 !important;
    --amber-light: rgba(217, 119, 6, 0.18) !important;
    --amber-text: #FBBF24 !important;
    --purple-light: rgba(139, 92, 246, 0.15) !important;
    --purple-text: #A78BFA !important;

    /* Borders & Dividers */
    --border-subtle: rgba(255, 255, 255, 0.08) !important;
    --border-glass: rgba(255, 255, 255, 0.12) !important;
    --border-light: rgba(255, 255, 255, 0.08) !important;
    --border-focus: rgba(96, 165, 250, 0.5) !important;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3B82F6 0%, #6366F1 100%) !important;
    --gradient-primary-hover: linear-gradient(135deg, #2563EB 0%, #4F46E5 100%) !important;
    --gradient-text: linear-gradient(135deg, #FFFFFF 15%, #93C5FD 70%, #A5B4FC 100%) !important;
    --gradient-card-elevated: linear-gradient(180deg, #151E2E 0%, #0F172A 100%) !important;

    /* Deep Night Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45) !important;
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.5) !important;
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.6) !important;
    --shadow-xl: 0 20px 35px rgba(0, 0, 0, 0.7) !important;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.45) !important;
    --shadow-card-hover: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
    --shadow-btn-primary: 0 8px 24px -2px rgba(59, 130, 246, 0.4) !important;
}

/* --------------------------------------------------------------------------
   2. Global Document & Smooth Transition
   -------------------------------------------------------------------------- */
html[data-theme="dark"],
html.dark-theme,
html[data-theme="dark"] body,
body.dark-theme {
    background-color: var(--bg-base) !important;
    color: var(--text-body) !important;
    color-scheme: dark !important;
}

/* --------------------------------------------------------------------------
   3. Theme Toggle Button Component (Universal)
   -------------------------------------------------------------------------- */
.theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1.5px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    padding: 0;
    user-select: none;
}

.theme-toggle-btn:hover {
    background: var(--bg-subtle);
    color: var(--blue-primary);
    border-color: var(--blue-border);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.2);
}

.theme-toggle-btn:active {
    transform: translateY(0);
}

.theme-toggle-btn i {
    font-size: 1.15rem;
    line-height: 1;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

/* Light mode icon display: show moon, hide sun */
html:not([data-theme="dark"]) .theme-toggle-btn .theme-icon-sun {
    display: none !important;
}
html:not([data-theme="dark"]) .theme-toggle-btn .theme-icon-moon {
    display: inline-flex !important;
}

/* Dark mode icon display: show glowing sun, hide moon */
html[data-theme="dark"] .theme-toggle-btn .theme-icon-moon {
    display: none !important;
}
html[data-theme="dark"] .theme-toggle-btn .theme-icon-sun {
    display: inline-flex !important;
    color: #FBBF24 !important;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
    animation: sunSpin 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes sunSpin {
    from { transform: rotate(-60deg) scale(0.6); opacity: 0; }
    to { transform: rotate(0deg) scale(1); opacity: 1; }
}

/* Floating Toggle Button (Fallback for pages without header) */
.theme-toggle-btn.theme-toggle-floating {
    position: fixed;
    bottom: 22px;
    left: 22px;
    z-index: 999999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* --------------------------------------------------------------------------
   4. Public & Student Portal Dark Theme
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .site-header-luxury,
html[data-theme="dark"] header.site-header-luxury {
    background: rgba(11, 15, 25, 0.88) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
}

html[data-theme="dark"] .brand-title {
    color: #FFFFFF !important;
}

html[data-theme="dark"] .brand-subtitle {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .nav-link-item {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .nav-link-item:hover {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .nav-link-item.active {
    color: #60A5FA !important;
    background: rgba(59, 130, 246, 0.16) !important;
}

/* Espace Concours Nav Link in Dark Mode */
html[data-theme="dark"] .nav-link-item.nav-link-concours,
html[data-theme="dark"] .nav-link-item[style*="color: #d97706"],
html[data-theme="dark"] .nav-link-item[style*="color:#d97706"],
html[data-theme="dark"] .nav-link-item[data-universe="concours"] {
    color: #F59E0B !important;
}

html[data-theme="dark"] .nav-link-item.nav-link-concours i,
html[data-theme="dark"] .nav-link-item[style*="color: #d97706"] i,
html[data-theme="dark"] .nav-link-item[style*="color:#d97706"] i,
html[data-theme="dark"] .nav-link-item[data-universe="concours"] i {
    color: #F59E0B !important;
}

html[data-theme="dark"] .nav-link-item.nav-link-concours:hover,
html[data-theme="dark"] .nav-link-item[style*="color: #d97706"]:hover,
html[data-theme="dark"] .nav-link-item[style*="color:#d97706"]:hover,
html[data-theme="dark"] .nav-link-item[data-universe="concours"]:hover {
    color: #FBBF24 !important;
    background: rgba(245, 158, 11, 0.12) !important;
}

html[data-theme="dark"] .nav-link-item.nav-link-concours:hover i,
html[data-theme="dark"] .nav-link-item[style*="color: #d97706"]:hover i,
html[data-theme="dark"] .nav-link-item[style*="color:#d97706"]:hover i,
html[data-theme="dark"] .nav-link-item[data-universe="concours"]:hover i {
    color: #FBBF24 !important;
}

html[data-theme="dark"] .nav-link-item.nav-link-concours.active,
html[data-theme="dark"] .nav-link-item[style*="color: #d97706"].active,
html[data-theme="dark"] .nav-link-item[style*="color:#d97706"].active,
html[data-theme="dark"] .nav-link-item[data-universe="concours"].active {
    color: #F59E0B !important;
    background: rgba(245, 158, 11, 0.18) !important;
}

html[data-theme="dark"] .btn-nav-login {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .btn-nav-login:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .btn-nav-profile-luxury {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--text-navy) !important;
}

html[data-theme="dark"] .btn-nav-profile-luxury:hover {
    border-color: var(--blue-border) !important;
    background: #1E293B !important;
}

html[data-theme="dark"] .btn-nav-logout-luxury {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-muted) !important;
}

html[data-theme="dark"] .btn-nav-logout-luxury:hover {
    background: rgba(225, 29, 72, 0.15) !important;
    color: #FB7185 !important;
    border-color: rgba(225, 29, 72, 0.3) !important;
}

/* ── Marquee Ticker Luxury (Under Hero) ── */
html[data-theme="dark"] .marquee-ticker-luxury {
    background: #0E1424 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .marquee-item-clean {
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .marquee-sep-clean {
    color: #475569 !important;
}

/* ── Hero Badges & Status Pills ── */
html[data-theme="dark"] .hero-pill-status,
html[data-theme="dark"] .profile-badge-pill {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #93C5FD !important;
}

html[data-theme="dark"] .metric-card-under {
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .metric-card-under:hover {
    background: #151E2E !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
}

/* ── Pricing & Subscription Cards ── */
html[data-theme="dark"] .pricing-card-white {
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-body) !important;
}

html[data-theme="dark"] .pricing-card-white:hover {
    background: #151E2E !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .pricing-card-white.featured-card-clean {
    background: #111827 !important;
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 1.5px #3B82F6, 0 16px 36px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .pricing-title-clean,
html[data-theme="dark"] .pricing-amount-num {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .course-desc-clean {
    color: #94A3B8 !important;
}

/* Schedule Card Block inside Pricing Cards */
html[data-theme="dark"] .course-schedule-card-block {
    background: #151E2E !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .course-schedule-card-block:hover {
    background: #1A2338 !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
}

html[data-theme="dark"] .featured-card-clean .course-schedule-card-block {
    background: rgba(37, 99, 235, 0.14) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
}

html[data-theme="dark"] .course-schedule-header {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .course-schedule-slot-item {
    background: #1A2338 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #F1F5F9 !important;
}

html[data-theme="dark"] .course-schedule-slot-item:hover {
    border-color: rgba(59, 130, 246, 0.4) !important;
    background: #202C45 !important;
}

html[data-theme="dark"] .course-schedule-slot-day {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .course-schedule-slot-time {
    background: rgba(59, 130, 246, 0.16) !important;
    color: #93C5FD !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

/* Feature Perks (Pills) inside Pricing Cards */
html[data-theme="dark"] .pill-item-light {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .pill-item-light:hover {
    background: #1A2338 !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .featured-card-clean .pill-item-light {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .featured-card-clean .pill-item-light:hover {
    background: #1A2338 !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
}

html[data-theme="dark"] .pill-icon-box {
    background: rgba(59, 130, 246, 0.16) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .btn-pricing-action {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
    border: none !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.45) !important;
}

html[data-theme="dark"] .btn-pricing-action:hover {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.6) !important;
    color: #FFFFFF !important;
    transform: translateY(-2px);
}

html[data-theme="dark"] .btn-pricing-action.btn-status-paid,
html[data-theme="dark"] .featured-card-clean .btn-pricing-action.btn-status-paid {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    border: none !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.45) !important;
}

html[data-theme="dark"] .btn-pricing-action.btn-status-paid:hover,
html[data-theme="dark"] .featured-card-clean .btn-pricing-action.btn-status-paid:hover {
    background: linear-gradient(135deg, #34D399 0%, #10B981 100%) !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.6) !important;
    transform: translateY(-2px);
}

html[data-theme="dark"] .btn-pricing-action.btn-status-pending,
html[data-theme="dark"] .featured-card-clean .btn-pricing-action.btn-status-pending,
html[data-theme="dark"] .btn-home-book-primary.btn-status-pending,
html[data-theme="dark"] .btn-buy-book.btn-status-pending {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
    border: none !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.45) !important;
}

html[data-theme="dark"] .btn-pricing-action.btn-status-pending:hover,
html[data-theme="dark"] .featured-card-clean .btn-pricing-action.btn-status-pending:hover,
html[data-theme="dark"] .btn-home-book-primary.btn-status-pending:hover,
html[data-theme="dark"] .btn-buy-book.btn-status-pending:hover {
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%) !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.6) !important;
    transform: translateY(-2px);
}

html[data-theme="dark"] .btn-all-courses-link {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .btn-all-courses-link:hover {
    background: #1E293B !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: #60A5FA !important;
}

/* ── Filières & Academic Tree Showcase ── */
html[data-theme="dark"] .universe-segmented-control {
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .universe-mode-btn {
    color: #94A3B8 !important;
    background: transparent !important;
}

html[data-theme="dark"] .universe-mode-btn:not(.active):hover {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .universe-mode-btn.active {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.45) !important;
}

html[data-theme="dark"] .universe-mode-btn.active:hover {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.6) !important;
}

html[data-theme="dark"] .universe-mode-btn.concours-btn.active {
    background: linear-gradient(135deg, #D97706 0%, #B45309 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: 0 4px 18px rgba(217, 119, 6, 0.45) !important;
}

html[data-theme="dark"] .universe-mode-btn.concours-btn.active:hover {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 24px rgba(217, 119, 6, 0.6) !important;
}

html[data-theme="dark"] .universe-mode-btn.courses-btn.active {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.45) !important;
}

html[data-theme="dark"] .universe-mode-btn.courses-btn.active:hover {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.6) !important;
}

html[data-theme="dark"] .universe-mode-btn.books-btn.active {
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: 0 4px 18px rgba(124, 58, 237, 0.45) !important;
}

html[data-theme="dark"] .universe-mode-btn.books-btn.active:hover {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 24px rgba(124, 58, 237, 0.6) !important;
}

html[data-theme="dark"] #coursesEmptyState,
html[data-theme="dark"] #booksEmptyState,
html[data-theme="dark"] .luxury-empty-state-card {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
html[data-theme="dark"] .luxury-empty-state-card h4 {
    color: #F8FAFC !important;
}
html[data-theme="dark"] .luxury-empty-state-card p {
    color: #94A3B8 !important;
}
html[data-theme="dark"] .course-filter-chip.active {
    background: #2563EB !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] .book-filter-chip.active {
    background: #7C3AED !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .tab-filiere-btn {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .tab-filiere-btn:hover {
    background: #1E293B !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .tab-filiere-btn.active {
    background: var(--gradient-primary) !important;
    border-color: transparent !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .showcase-meta-pill {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .showcase-meta-pill strong {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .tab-level-pill {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .tab-level-pill:hover {
    background: #1E293B !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .tab-level-pill.active {
    background: #2563EB !important;
    border-color: #2563EB !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .module-card-clean {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .module-card-clean:hover {
    background: #1E293B !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
}

html[data-theme="dark"] .module-card-clean.active {
    background: rgba(37, 99, 235, 0.22) !important;
    border-color: #3B82F6 !important;
}

html[data-theme="dark"] .pill-doc-counter,
html[data-theme="dark"] .hover-arrow-circle {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .concours-branch-card {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .concours-branch-card:hover {
    background: #1E293B !important;
    border-color: #D97706 !important;
}

html[data-theme="dark"] .concours-branch-card.active {
    background: rgba(217, 119, 6, 0.18) !important;
    border-color: #D97706 !important;
}

/* ── Search Capsule & Category Pills ── */
html[data-theme="dark"] .search-capsule {
    background: #111827 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .search-capsule:focus-within {
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

html[data-theme="dark"] .search-input-field,
html[data-theme="dark"] .search-capsule input,
html[data-theme="dark"] .search-capsule input[type="text"],
html[data-theme="dark"] .search-capsule input[type="search"],
html[data-theme="dark"] .search-input-group-luxury input,
html[data-theme="dark"] .search-input-group-luxury input[type="text"],
html[data-theme="dark"] .search-input-group-luxury input[type="search"] {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-width: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .search-input-field:focus,
html[data-theme="dark"] .search-capsule input:focus,
html[data-theme="dark"] .search-capsule input[type="text"]:focus,
html[data-theme="dark"] .search-capsule input[type="search"]:focus,
html[data-theme="dark"] .search-input-group-luxury input:focus,
html[data-theme="dark"] .search-input-group-luxury input[type="text"]:focus,
html[data-theme="dark"] .search-input-group-luxury input[type="search"]:focus {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-width: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .search-input-group-luxury {
    background: transparent !important;
    border: none !important;
}

html[data-theme="dark"] .category-pill-btn {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .category-pill-btn:hover {
    background: #1E293B !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .category-pill-btn .count-bubble {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .category-pill-btn.active {
    background: var(--gradient-primary) !important;
    border-color: transparent !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .category-pill-btn.active .count-bubble {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .active-breadcrumbs-ribbon {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}

/* ── Document Cards & Action Buttons ── */
html[data-theme="dark"] .document-card-white {
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .document-card-white:hover {
    background: #151E2E !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .document-card-white::after,
html[data-theme="dark"] .document-card-white:hover::after,
html[data-theme="dark"] .material-card::before,
html[data-theme="dark"] .material-card:hover::before {
    display: none !important;
    content: none !important;
}

html[data-theme="dark"] .btn-read-doc {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .btn-read-doc:hover {
    background: #2563EB !important;
    border-color: #2563EB !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .btn-dl-doc {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .btn-dl-doc:hover {
    background: #1E293B !important;
    color: #FFFFFF !important;
}

/* Corrigé type button in dark mode (normal & hover) */
html[data-theme="dark"] .corrige-accent .btn-read-doc {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #34D399 !important;
}

html[data-theme="dark"] .corrige-accent .btn-read-doc:hover {
    background: #10B981 !important;
    border-color: #10B981 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35) !important;
}

html[data-theme="dark"] .corrige-accent .btn-dl-doc:hover {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: rgba(16, 185, 129, 0.45) !important;
    color: #34D399 !important;
}

html[data-theme="dark"] .page-btn-luxury,
html[data-theme="dark"] .pagination-btn {
    background: #151E2E;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #CBD5E1;
}

html[data-theme="dark"] .page-btn-luxury:not(.active):not(.dots),
html[data-theme="dark"] .pagination-btn:not(.active):not(.dots) {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .page-btn-luxury:hover:not(.active):not(.dots),
html[data-theme="dark"] .pagination-btn:hover:not(.active):not(.dots) {
    background: #1E293B !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .page-btn-luxury.active,
html[data-theme="dark"] .pagination-btn.active {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
    border: 1px solid rgba(147, 197, 253, 0.45) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.55), 0 0 14px rgba(59, 130, 246, 0.4) !important;
    font-weight: 800 !important;
    cursor: default;
}

html[data-theme="dark"] .page-btn-luxury.dots,
html[data-theme="dark"] .pagination-dots {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #64748B !important;
}

html[data-theme="dark"] button.page-btn-luxury:disabled,
html[data-theme="dark"] button.page-btn-luxury[disabled] {
    opacity: 0.35 !important;
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: #64748B !important;
    cursor: not-allowed !important;
}

/* ── Luxury Executive Footer ── */
html[data-theme="dark"] .footer-luxury,
html[data-theme="dark"] footer.footer-luxury,
html[data-theme="dark"] .site-footer-luxury,
html[data-theme="dark"] footer {
    background: #080C14 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .footer-brand-title {
    color: #FFFFFF !important;
}

html[data-theme="dark"] .footer-brand-desc {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .footer-col-heading {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .footer-nav-anchor {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .footer-nav-anchor:hover {
    color: #60A5FA !important;
}

html[data-theme="dark"] .footer-bottom-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .footer-copyright-text {
    color: #64748B !important;
}

html[data-theme="dark"] .dev-credit-link {
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .dev-credit-link:hover {
    color: #60A5FA !important;
    text-decoration: underline !important;
}

html[data-theme="dark"] footer[style*="background: rgba(255, 255, 255"],
html[data-theme="dark"] footer[style*="background:rgba(255, 255, 255"] {
    background: rgba(11, 15, 25, 0.85) !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
    color: #64748B !important;
}

/* Cards, Showcases, Spotlights in Dark Mode */
html[data-theme="dark"] .spotlight-card,
html[data-theme="dark"] .course-card-luxury,
html[data-theme="dark"] .document-card-luxury,
html[data-theme="dark"] .filiere-card,
html[data-theme="dark"] .stat-pill,
html[data-theme="dark"] .concours-track-card,
html[data-theme="dark"] .catalog-card,
html[data-theme="dark"] .doc-item-row,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .checkout-card,
html[data-theme="dark"] .auth-card {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: var(--shadow-card) !important;
    color: var(--text-body) !important;
}

html[data-theme="dark"] .spotlight-card:hover,
html[data-theme="dark"] .course-card-luxury:hover,
html[data-theme="dark"] .document-card-luxury:hover,
html[data-theme="dark"] .filiere-card:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--blue-border) !important;
    box-shadow: var(--shadow-card-hover) !important;
}

html[data-theme="dark"] .search-luxury-box,
html[data-theme="dark"] .search-input-luxury {
    background: var(--bg-subtle) !important;
    border: 1.5px solid var(--border-subtle) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .category-tab-btn,
html[data-theme="dark"] .filiere-pill,
html[data-theme="dark"] .filter-chip {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-secondary) !important;
}

html[data-theme="dark"] .category-tab-btn.active,
html[data-theme="dark"] .filiere-pill.active,
html[data-theme="dark"] .filter-chip.active {
    background: var(--gradient-primary) !important;
    color: #FFFFFF !important;
    border-color: transparent !important;
}

html[data-theme="dark"] .site-footer-luxury {
    background: #080C14 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* --------------------------------------------------------------------------
   5. Admin Control Panel Dark Theme
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .admin-layout {
    background: var(--bg-base) !important;
}

html[data-theme="dark"] .admin-sidebar {
    background: #0E1424 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .sidebar-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .sidebar-link {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .sidebar-link.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.28) 0%, rgba(79, 70, 229, 0.22) 100%) !important;
    color: #60A5FA !important;
    border: 1px solid rgba(59, 130, 246, 0.35) !important;
}

html[data-theme="dark"] .sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: transparent !important;
}

html[data-theme="dark"] .sidebar-user {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .sidebar-user .user-name {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .sidebar-user .user-role {
    color: #64748B !important;
}

html[data-theme="dark"] .sidebar-btn-logout {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-muted) !important;
}

html[data-theme="dark"] .sidebar-btn-logout:hover {
    background: rgba(225, 29, 72, 0.2) !important;
    color: #FB7185 !important;
    border-color: rgba(225, 29, 72, 0.35) !important;
}

html[data-theme="dark"] .admin-topbar {
    background: rgba(14, 20, 36, 0.90) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
}

html[data-theme="dark"] .topbar-title {
    color: #FFFFFF !important;
}

html[data-theme="dark"] .topbar-sub {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .sidebar-toggle {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-secondary) !important;
}

/* Admin Cards, Metrics, Stats (Standardized Obsidian Luxury) */
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .comm-stat-card,
html[data-theme="dark"] .tt-stat-card {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .stat-card:hover,
html[data-theme="dark"] .comm-stat-card:hover,
html[data-theme="dark"] .tt-stat-card:hover {
    border-color: rgba(59, 130, 246, 0.35) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .stat-info h3,
html[data-theme="dark"] .comm-stat-value,
html[data-theme="dark"] .tt-stat-val {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .stat-info p,
html[data-theme="dark"] .comm-stat-label,
html[data-theme="dark"] .tt-stat-label {
    color: #94A3B8 !important;
}

/* Stat card icon glows in dark mode */
html[data-theme="dark"] .stat-icon.icon-blue,
html[data-theme="dark"] .comm-stat-icon.icon-blue,
html[data-theme="dark"] .tt-stat-icon.icon-blue {
    background: rgba(37, 99, 235, 0.18) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .stat-icon.icon-indigo,
html[data-theme="dark"] .comm-stat-icon.icon-indigo,
html[data-theme="dark"] .tt-stat-icon.icon-indigo {
    background: rgba(79, 70, 229, 0.18) !important;
    color: #818CF8 !important;
}

html[data-theme="dark"] .stat-icon.icon-emerald,
html[data-theme="dark"] .comm-stat-icon.icon-emerald,
html[data-theme="dark"] .tt-stat-icon.icon-emerald {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #34D399 !important;
}

html[data-theme="dark"] .stat-icon.icon-amber,
html[data-theme="dark"] .comm-stat-icon.icon-amber,
html[data-theme="dark"] .tt-stat-icon.icon-amber {
    background: rgba(217, 119, 6, 0.18) !important;
    color: #FBBF24 !important;
}

html[data-theme="dark"] .stat-icon.icon-purple,
html[data-theme="dark"] .comm-stat-icon.icon-purple,
html[data-theme="dark"] .tt-stat-icon.icon-purple {
    background: rgba(139, 92, 246, 0.18) !important;
    color: #A78BFA !important;
}

html[data-theme="dark"] .stat-icon.icon-rose,
html[data-theme="dark"] .comm-stat-icon.icon-rose,
html[data-theme="dark"] .tt-stat-icon.icon-rose {
    background: rgba(225, 29, 72, 0.18) !important;
    color: #FB7185 !important;
}

/* Other admin cards in dark mode */
html[data-theme="dark"] .action-card,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .table-card,
html[data-theme="dark"] .course-admin-card,
html[data-theme="dark"] .metric-box {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: var(--shadow-sm) !important;
    color: var(--text-body) !important;
}

html[data-theme="dark"] .action-card:hover,
html[data-theme="dark"] .course-admin-card:hover {
    border-color: var(--blue-border) !important;
    box-shadow: var(--shadow-md) !important;
}

html[data-theme="dark"] .stat-title,
html[data-theme="dark"] .stat-value,
html[data-theme="dark"] .card-title {
    color: var(--text-navy) !important;
}

/* Tables in Admin */
html[data-theme="dark"] .admin-table,
html[data-theme="dark"] table.data-table,
html[data-theme="dark"] table {
    border-color: var(--border-subtle) !important;
}

html[data-theme="dark"] thead tr,
html[data-theme="dark"] thead th,
html[data-theme="dark"] table:not(.doc-specs-table-luxury) th {
    background: #1A2338 !important;
    color: #94A3B8 !important;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.08) !important;
}

/* Document Page Technical Specifications (Fiche Technique) - Seamless Unified Card Appearance */
html[data-theme="dark"] .doc-section-card-luxury,
body.dark-theme .doc-section-card-luxury {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: var(--shadow-card) !important;
}

html[data-theme="dark"] .doc-specs-table-luxury,
html[data-theme="dark"] .doc-specs-table-luxury tbody,
html[data-theme="dark"] .doc-specs-table-luxury tr,
html[data-theme="dark"] .doc-specs-table-luxury th,
html[data-theme="dark"] .doc-specs-table-luxury td,
body.dark-theme .doc-specs-table-luxury,
body.dark-theme .doc-specs-table-luxury tbody,
body.dark-theme .doc-specs-table-luxury tr,
body.dark-theme .doc-specs-table-luxury th,
body.dark-theme .doc-specs-table-luxury td {
    background: transparent !important;
    background-color: transparent !important;
}

html[data-theme="dark"] .doc-specs-table-luxury tr,
body.dark-theme .doc-specs-table-luxury tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

html[data-theme="dark"] .doc-specs-table-luxury th,
body.dark-theme .doc-specs-table-luxury th {
    color: #94A3B8 !important;
    font-weight: 600 !important;
    border-bottom: none !important;
}

html[data-theme="dark"] .doc-specs-table-luxury td,
body.dark-theme .doc-specs-table-luxury td {
    color: #F8FAFC !important;
    font-weight: 700 !important;
    border-bottom: none !important;
}

html[data-theme="dark"] .doc-specs-table-luxury tr:last-child,
body.dark-theme .doc-specs-table-luxury tr:last-child {
    border-bottom: none !important;
}

html[data-theme="dark"] .doc-specs-table-luxury tr:hover,
html[data-theme="dark"] .doc-specs-table-luxury tr:hover th,
html[data-theme="dark"] .doc-specs-table-luxury tr:hover td,
body.dark-theme .doc-specs-table-luxury tr:hover,
body.dark-theme .doc-specs-table-luxury tr:hover th,
body.dark-theme .doc-specs-table-luxury tr:hover td {
    background: transparent !important;
    background-color: transparent !important;
}

html[data-theme="dark"] td {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: var(--text-body) !important;
}

html[data-theme="dark"] .admin-table tbody tr,
html[data-theme="dark"] table.data-table tbody tr,
html[data-theme="dark"] table tbody tr,
html[data-theme="dark"] tbody tr {
    background-color: transparent !important;
    background: transparent !important;
}

html[data-theme="dark"] .admin-table tbody tr:hover,
html[data-theme="dark"] table.data-table tbody tr:hover,
html[data-theme="dark"] table tbody tr:hover,
html[data-theme="dark"] tbody tr:hover {
    background-color: #151E2E !important;
    background: #151E2E !important;
}

html[data-theme="dark"] .admin-table tbody tr:hover td,
html[data-theme="dark"] table.data-table tbody tr:hover td,
html[data-theme="dark"] table tbody tr:hover td,
html[data-theme="dark"] tbody tr:hover td {
    background-color: #151E2E !important;
    background: #151E2E !important;
}

html[data-theme="dark"] .admin-table tbody tr:hover .table-title-cell,
html[data-theme="dark"] tbody tr:hover .table-title-cell {
    color: #FFFFFF !important;
}

html[data-theme="dark"] .sub-table th {
    background: #1A2338 !important;
    color: #94A3B8 !important;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .sub-table td {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: var(--text-body) !important;
}

html[data-theme="dark"] .sub-table tbody tr:hover,
html[data-theme="dark"] .sub-table tbody tr:hover td {
    background-color: #151E2E !important;
    background: #151E2E !important;
}

html[data-theme="dark"] .sub-table tr {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .sub-table td.sub-course-title {
    color: #F8FAFC !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

/* Form Controls & Inputs Across All Panels */
html[data-theme="dark"] input[type="text"]:not(.search-input-field):not(.auth-input-field),
html[data-theme="dark"] input[type="password"]:not(.auth-input-field),
html[data-theme="dark"] input[type="email"]:not(.auth-input-field),
html[data-theme="dark"] input[type="tel"]:not(.auth-input-field),
html[data-theme="dark"] input[type="search"]:not(.search-input-field),
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="time"],
html[data-theme="dark"] input[type="datetime-local"],
html[data-theme="dark"] input[type="file"],
html[data-theme="dark"] input[type="file"].form-input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-input,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-textarea,
html[data-theme="dark"] .form-control {
    background-color: #111827 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    color: #F8FAFC !important;
    box-shadow: none !important;
}

/* Universal Clean Luxury File Input - Dark Mode */
html[data-theme="dark"] input[type="file"],
html[data-theme="dark"] .form-input[type="file"] {
    background: #111827 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    color: #94A3B8 !important;
    box-shadow: none !important;
    padding: 7px 10px !important;
}

html[data-theme="dark"] input[type="file"]:hover,
html[data-theme="dark"] .form-input[type="file"]:hover {
    border-color: rgba(255, 255, 255, 0.22) !important;
    background: #151E2E !important;
}

html[data-theme="dark"] input[type="file"]:focus,
html[data-theme="dark"] .form-input[type="file"]:focus {
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.25) !important;
    background: #0B0F19 !important;
}

/* File Selector Button - Dark Mode (Mirroring Light Mode Luxury Aesthetics) */
html[data-theme="dark"] input[type="file"]::file-selector-button {
    background: rgba(37, 99, 235, 0.18) !important;
    color: #93C5FD !important;
    border: 1.5px solid rgba(59, 130, 246, 0.35) !important;
    border-radius: 8px !important;
    padding: 7px 18px !important;
    margin-right: 14px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] input[type="file"]::file-selector-button:hover {
    background: #2563EB !important;
    color: #FFFFFF !important;
    border-color: #3B82F6 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45) !important;
}

html[data-theme="dark"] input[type="file"]::file-selector-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2) !important;
}

/* WebKit vendor fallback - Dark Mode */
html[data-theme="dark"] input[type="file"]::-webkit-file-upload-button {
    background: rgba(37, 99, 235, 0.18) !important;
    color: #93C5FD !important;
    border: 1.5px solid rgba(59, 130, 246, 0.35) !important;
    border-radius: 8px !important;
    padding: 7px 18px !important;
    margin-right: 14px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] input[type="file"]::-webkit-file-upload-button:hover {
    background: #2563EB !important;
    color: #FFFFFF !important;
    border-color: #3B82F6 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45) !important;
}

html[data-theme="dark"] input[type="file"]::-webkit-file-upload-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2) !important;
}

/* Ensure drag-and-drop box file inputs remain invisible in dark mode */
html[data-theme="dark"] .pdf-upload-box input[type="file"] {
    position: absolute !important;
    inset: 0 !important;
    opacity: 0 !important;
    cursor: pointer !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #64748B !important;
}

html[data-theme="dark"] input:not(.search-input-field):not(.auth-input-field):focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] .form-input:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] .form-textarea:focus,
html[data-theme="dark"] .form-control:focus {
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
    background-color: #151E2E !important;
}

html[data-theme="dark"] select option {
    background-color: #111827 !important;
    color: #F8FAFC !important;
}

/* ── Authentication Controls (Student & Admin Login / Register) ── */
html[data-theme="dark"] .auth-input-group {
    background: #111827 !important;
    background-color: #111827 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

html[data-theme="dark"] .auth-input-group:focus-within {
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
    background: #111827 !important;
    background-color: #111827 !important;
}

html[data-theme="dark"] .admin-variant .auth-input-group:focus-within {
    border-color: #D97706 !important;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.25) !important;
    background: #111827 !important;
    background-color: #111827 !important;
}

html[data-theme="dark"] .auth-input-group input,
html[data-theme="dark"] .auth-input-field,
html[data-theme="dark"] .auth-input-group input[type="text"],
html[data-theme="dark"] .auth-input-group input[type="email"],
html[data-theme="dark"] .auth-input-group input[type="tel"],
html[data-theme="dark"] .auth-input-group input[type="password"] {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-width: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .auth-input-group input:focus,
html[data-theme="dark"] .auth-input-field:focus {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-width: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .auth-input-icon {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .auth-input-group:focus-within .auth-input-icon {
    color: #60A5FA !important;
}

html[data-theme="dark"] .admin-variant .auth-input-group:focus-within .auth-input-icon {
    color: #FBBF24 !important;
}

html[data-theme="dark"] .btn-toggle-eye {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    color: #94A3B8 !important;
    cursor: pointer;
}

html[data-theme="dark"] .btn-toggle-eye:hover {
    background: transparent !important;
    background-color: transparent !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .admin-variant .btn-toggle-eye:hover {
    color: #FBBF24 !important;
}

/* Browser Autofill Protection in Dark Mode */
html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover, 
html[data-theme="dark"] input:-webkit-autofill:focus,
html[data-theme="dark"] textarea:-webkit-autofill,
html[data-theme="dark"] select:-webkit-autofill {
    -webkit-text-fill-color: #F8FAFC !important;
    -webkit-box-shadow: 0 0 0px 1000px #111827 inset !important;
    box-shadow: 0 0 0px 1000px #111827 inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
    caret-color: #F8FAFC !important;
}

/* Auth Alerts & Links */
html[data-theme="dark"] .alert-luxury.alert-error {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #FCA5A5 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

html[data-theme="dark"] .alert-luxury.alert-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #6EE7B7 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

html[data-theme="dark"] .alert-luxury.alert-info {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #93C5FD !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

html[data-theme="dark"] .auth-footer-links {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .auth-link-accent {
    color: #60A5FA !important;
}

html[data-theme="dark"] .admin-variant .auth-link-accent {
    color: #FBBF24 !important;
}

html[data-theme="dark"] .auth-back-link {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .auth-back-link:hover {
    color: #60A5FA !important;
}

html[data-theme="dark"] .admin-variant .auth-back-link:hover {
    color: #FBBF24 !important;
}

html[data-theme="dark"] .auth-security-badge {
    border-top: 1px dashed rgba(255, 255, 255, 0.12) !important;
    color: #94A3B8 !important;
}

/* Buttons & Badges */
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn-outline {
    background: var(--bg-surface) !important;
    border: 1.5px solid var(--border-subtle) !important;
    color: var(--text-navy) !important;
}

html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .btn-outline:hover {
    background: var(--bg-subtle) !important;
    border-color: var(--blue-border) !important;
    color: var(--blue-primary) !important;
}

/* --------------------------------------------------------------------------
   6. Timetable (Emploi du Temps) Dark Mode
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .tt-stat-card {
    background: #111827 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .tt-stat-val {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .tt-stat-label {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .tt-toolbar {
    background: #111827 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .tt-filter-label {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .tt-filter-select {
    background: #151E2E !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .btn-jump {
    background: #151E2E !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .btn-jump:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: #3B82F6 !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .btn-jump.btn-jump-now {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    color: #F87171 !important;
}

html[data-theme="dark"] .tt-card-wrapper {
    background: #111827 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .tt-grid-matrix {
    background: #0E1424 !important;
}

html[data-theme="dark"] .tt-header-cell {
    background: #151E2E !important;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .tt-header-cell.tt-corner-cell {
    background: #1A2338 !important;
    border-right: 1.5px solid rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .tt-corner-badge {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #93C5FD !important;
}

html[data-theme="dark"] .tt-header-cell.is-today-header {
    background: rgba(37, 99, 235, 0.22) !important;
    border-bottom-color: #3B82F6 !important;
}

html[data-theme="dark"] .tt-day-title-text {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .tt-day-count-badge {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .tt-day-count-badge.is-today-count {
    background: rgba(59, 130, 246, 0.3) !important;
    color: #BFDBFE !important;
}

html[data-theme="dark"] .tt-ruler-track {
    background: #151E2E !important;
    border-right: 1.5px solid rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .tt-ruler-hour-text {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .tt-ruler-tick-line {
    background: #475569 !important;
}

html[data-theme="dark"] .tt-ruler-subtick {
    background: #334155 !important;
}

html[data-theme="dark"] .tt-day-track {
    background: #0E1424 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .tt-day-track.is-today-track {
    background: rgba(59, 130, 246, 0.04) !important;
}

html[data-theme="dark"] .tt-hour-line {
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .tt-half-hour-line {
    border-top: 1px dashed rgba(255, 255, 255, 0.03) !important;
}

html[data-theme="dark"] .tt-btn-edit-link {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #F1F5F9 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

html[data-theme="dark"] .tt-btn-edit-link:hover {
    background: #334155 !important;
    color: #FFFFFF !important;
}

/* --------------------------------------------------------------------------
   7. PDF Viewer & Document Reader Dark Mode
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .pdf-header {
    background: #111827 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="dark"] .pdf-title,
html[data-theme="dark"] .doc-title {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .btn-pdf-action,
html[data-theme="dark"] .btn-back,
html[data-theme="dark"] .btn-fullscreen,
html[data-theme="dark"] .btn-close-modal {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .btn-pdf-action:hover,
html[data-theme="dark"] .btn-back:hover,
html[data-theme="dark"] .btn-fullscreen:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: #3B82F6 !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .btn-close-modal:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #F87171 !important;
}

html[data-theme="dark"] .doc-icon-badge {
    background: rgba(59, 130, 246, 0.18) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .pill-sujet {
    background: rgba(37, 99, 235, 0.18) !important;
    color: #93C5FD !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
}

html[data-theme="dark"] .pill-solution {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #6EE7B7 !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
}

html[data-theme="dark"] .viewer-container {
    background: #0B0F19 !important;
}

html[data-theme="dark"] .loader-container {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .spinner {
    border-color: rgba(255, 255, 255, 0.12) !important;
    border-top-color: #3B82F6 !important;
}

/* --------------------------------------------------------------------------
   8. Modals, Popups, SweetAlerts & Dialogs
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .admin-modal,
html[data-theme="dark"] .modal-dialog .modal-content,
html[data-theme="dark"] .swal2-popup,
html[data-theme="dark"] .swal2-modal {
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #F8FAFC !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8) !important;
}

html[data-theme="dark"] .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .swal2-title {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .swal2-html-container {
    color: #CBD5E1 !important;
}

/* --------------------------------------------------------------------------
   9. Catch-All for Hardcoded Inline Backgrounds in Legacy PHP templates
   -------------------------------------------------------------------------- */
html[data-theme="dark"] [style*="background: #ffffff"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background: #FFFFFF"],
html[data-theme="dark"] [style*="background:#FFFFFF"],
html[data-theme="dark"] [style*="background: #fff;"],
html[data-theme="dark"] [style*="background:#fff;"],
html[data-theme="dark"] [style*="background: #FFF;"],
html[data-theme="dark"] [style*="background:#FFF;"],
html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background:white"],
html[data-theme="dark"] [style*="background: #FAFBFD"],
html[data-theme="dark"] [style*="background:#FAFBFD"],
html[data-theme="dark"] [style*="background: #FAFCFF"],
html[data-theme="dark"] [style*="background:#FAFCFF"],
html[data-theme="dark"] [style*="background: #F8FAFD"],
html[data-theme="dark"] [style*="background:#F8FAFD"],
html[data-theme="dark"] [style*="background: #F8FAFC"],
html[data-theme="dark"] [style*="background:#F8FAFC"],
html[data-theme="dark"] [style*="background: #f8fafc"],
html[data-theme="dark"] [style*="background:#f8fafc"],
html[data-theme="dark"] [style*="background: #f1f5f9"],
html[data-theme="dark"] [style*="background:#f1f5f9"],
html[data-theme="dark"] [style*="background: #F1F5F9"],
html[data-theme="dark"] [style*="background:#F1F5F9"],
html[data-theme="dark"] [style*="background: #FFFDF7"],
html[data-theme="dark"] [style*="background:#FFFDF7"],
html[data-theme="dark"] [style*="background-color: #ffffff"],
html[data-theme="dark"] [style*="background-color:#ffffff"],
html[data-theme="dark"] [style*="background-color: #FFFFFF"],
html[data-theme="dark"] [style*="background-color:#FFFFFF"],
html[data-theme="dark"] [style*="background-color: white"],
html[data-theme="dark"] [style*="background-color:white"] {
    background: var(--bg-surface) !important;
    border-color: var(--border-subtle) !important;
}

html[data-theme="dark"] [style*="color: #0F172A"],
html[data-theme="dark"] [style*="color:#0F172A"],
html[data-theme="dark"] [style*="color: #0f172a"],
html[data-theme="dark"] [style*="color:#0f172a"],
html[data-theme="dark"] [style*="color: #1E293B"],
html[data-theme="dark"] [style*="color:#1E293B"] {
    color: #F8FAFC !important;
}

html[data-theme="dark"] [style*="color: #334155"],
html[data-theme="dark"] [style*="color:#334155"],
html[data-theme="dark"] [style*="color: #475569"],
html[data-theme="dark"] [style*="color:#475569"] {
    color: #CBD5E1 !important;
}

html[data-theme="dark"] [style*="border: 1.5px solid #E2E8F0"],
html[data-theme="dark"] [style*="border: 1px solid #E2E8F0"],
html[data-theme="dark"] [style*="border: 1px solid #e2e8f0"],
html[data-theme="dark"] [style*="border-color: #E2E8F0"],
html[data-theme="dark"] [style*="border-color: #CBD5E1"] {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* --------------------------------------------------------------------------
   10. Component Refinements for Zero-Exception Theme Harmony
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .document-card-white,
html[data-theme="dark"] .pricing-card-white,
html[data-theme="dark"] .profile-card-white,
html[data-theme="dark"] .glass-card-white,
html[data-theme="dark"] .module-card-clean,
html[data-theme="dark"] .concours-branch-card,
html[data-theme="dark"] .terms-card-wrapper,
html[data-theme="dark"] .terms-agreement-card,
html[data-theme="dark"] .portal-hero-bento {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-body) !important;
}

html[data-theme="dark"] .document-card-white:hover,
html[data-theme="dark"] .pricing-card-white:hover,
html[data-theme="dark"] .profile-card-white:hover,
html[data-theme="dark"] .module-card-clean:hover,
html[data-theme="dark"] .concours-branch-card:hover {
    background: #151E2E !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .module-card-clean.active {
    background: rgba(37, 99, 235, 0.18) !important;
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 2.5px rgba(59, 130, 246, 0.35) !important;
}

html[data-theme="dark"] .module-card-clean.active .module-title-navy {
    color: #93C5FD !important;
}

html[data-theme="dark"] .module-title-navy,
html[data-theme="dark"] .branch-name-title,
html[data-theme="dark"] .card-title-link,
html[data-theme="dark"] .doc-title-h3 {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .module-icon-bubble {
    background: rgba(59, 130, 246, 0.16) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .module-card-clean:hover .module-icon-bubble {
    background: #3B82F6 !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .branch-icon-bubble {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #F59E0B !important;
}

html[data-theme="dark"] .concours-branch-card:hover .branch-icon-bubble,
html[data-theme="dark"] .concours-branch-card.active .branch-icon-bubble {
    background: #D97706 !important;
    color: #FFFFFF !important;
    transform: none !important;
}

html[data-theme="dark"] .concours-branch-card:hover .branch-icon-bubble i {
    color: #FFFFFF !important;
    transform: scale(1.14) rotate(8deg) !important;
}

html[data-theme="dark"] .terms-warning-box,
html[data-theme="dark"] .luxury-modal-content .terms-warning-box,
html[data-theme="dark"] .preview-pane-box .terms-warning-box {
    background: rgba(217, 119, 6, 0.15) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
}

html[data-theme="dark"] .terms-warning-box h4,
html[data-theme="dark"] .luxury-modal-content .terms-warning-box h4,
html[data-theme="dark"] .preview-pane-box .terms-warning-box h4 {
    color: #FBBF24 !important;
}

html[data-theme="dark"] .terms-warning-box p,
html[data-theme="dark"] .luxury-modal-content .terms-warning-box p,
html[data-theme="dark"] .preview-pane-box .terms-warning-box p,
html[data-theme="dark"] .terms-warning-box strong,
html[data-theme="dark"] .luxury-modal-content .terms-warning-box strong,
html[data-theme="dark"] .preview-pane-box .terms-warning-box strong {
    color: #FDE68A !important;
}

html[data-theme="dark"] .terms-ar-highlight,
html[data-theme="dark"] .luxury-modal-content .terms-ar-highlight,
html[data-theme="dark"] .preview-pane-box .terms-ar-highlight {
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    color: #FDE68A !important;
}

html[data-theme="dark"] .terms-ar-highlight strong,
html[data-theme="dark"] .terms-ar-highlight u,
html[data-theme="dark"] .terms-ar-highlight span,
html[data-theme="dark"] .terms-ar-highlight p,
html[data-theme="dark"] .luxury-modal-content .terms-ar-highlight strong,
html[data-theme="dark"] .luxury-modal-content .terms-ar-highlight u,
html[data-theme="dark"] .luxury-modal-content .terms-ar-highlight span,
html[data-theme="dark"] .preview-pane-box .terms-ar-highlight strong,
html[data-theme="dark"] .preview-pane-box .terms-ar-highlight u,
html[data-theme="dark"] .preview-pane-box .terms-ar-highlight span {
    color: #FBBF24 !important;
}

html[data-theme="dark"] .luxury-modal-header,
html[data-theme="dark"] .luxury-modal-content,
html[data-theme="dark"] .luxury-modal-footer {
    background: #111827 !important;
    color: #F8FAFC !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .luxury-modal-close {
    background: #1E293B !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .luxury-modal-close:hover {
    background: rgba(225, 29, 72, 0.2) !important;
    color: #FB7185 !important;
    border-color: rgba(225, 29, 72, 0.4) !important;
}

html[data-theme="dark"] .btn-ghost-white {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .btn-ghost-white:hover {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #FFFFFF !important;
}

/* Hero Rotating Universe Button in Dark Mode */
html[data-theme="dark"] .hero-random-space-btn[data-universe="concours"] {
    color: #F59E0B !important;
}
html[data-theme="dark"] .hero-random-space-btn[data-universe="concours"]:hover {
    color: #FBBF24 !important;
    border-color: rgba(245, 158, 11, 0.45) !important;
}

html[data-theme="dark"] .hero-random-space-btn[data-universe="courses"] {
    color: #60A5FA !important;
}
html[data-theme="dark"] .hero-random-space-btn[data-universe="courses"]:hover {
    color: #93C5FD !important;
    border-color: rgba(96, 165, 250, 0.45) !important;
}

html[data-theme="dark"] .hero-random-space-btn[data-universe="books"] {
    color: #A78BFA !important;
}
html[data-theme="dark"] .hero-random-space-btn[data-universe="books"]:hover {
    color: #C4B5FD !important;
    border-color: rgba(167, 139, 250, 0.45) !important;
}

html[data-theme="dark"] .pricing-card-white.featured-card-clean {
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 1.5px #3B82F6, 0 16px 36px rgba(0, 0, 0, 0.6) !important;
}

/* Ambient canvas & orbs glow */
html[data-theme="dark"] .ambient-orbs-wrap {
    opacity: 0.6;
}

html[data-theme="dark"] .ambient-orb-royal {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.24) 0%, rgba(99, 102, 241, 0.10) 50%, transparent 70%) !important;
}

html[data-theme="dark"] .ambient-orb-cyan {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.20) 0%, rgba(59, 130, 246, 0.08) 50%, transparent 70%) !important;
}

/* --------------------------------------------------------------------------
   11. Colored Status Badges & Alerts in Dark Mode
   -------------------------------------------------------------------------- */
html[data-theme="dark"] [style*="background: #fef2f2"],
html[data-theme="dark"] [style*="background:#fef2f2"],
html[data-theme="dark"] [style*="background: #FFF1F2"],
html[data-theme="dark"] [style*="background:#FFF1F2"] {
    background: rgba(225, 29, 72, 0.16) !important;
    border-color: rgba(225, 29, 72, 0.35) !important;
    color: #FDA4AF !important;
}

html[data-theme="dark"] [style*="background: #fffbeb"],
html[data-theme="dark"] [style*="background:#fffbeb"],
html[data-theme="dark"] [style*="background: #FFFBEB"],
html[data-theme="dark"] [style*="background:#FFFBEB"] {
    background: rgba(217, 119, 6, 0.16) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
    color: #FDE68A !important;
}

html[data-theme="dark"] [style*="background: #ecfdf5"],
html[data-theme="dark"] [style*="background:#ecfdf5"],
html[data-theme="dark"] [style*="background: #ECFDF5"],
html[data-theme="dark"] [style*="background:#ECFDF5"] {
    background: rgba(16, 185, 129, 0.16) !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
    color: #6EE7B7 !important;
}

html[data-theme="dark"] [style*="background: #eff6ff"],
html[data-theme="dark"] [style*="background:#eff6ff"],
html[data-theme="dark"] [style*="background: #EFF6FF"],
html[data-theme="dark"] [style*="background:#EFF6FF"] {
    background: rgba(59, 130, 246, 0.16) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    color: #93C5FD !important;
}

html[data-theme="dark"] [style*="linear-gradient(180deg, #ffffff"],
html[data-theme="dark"] [style*="linear-gradient(180deg, #FFFFFF"] {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* --------------------------------------------------------------------------
   12. Universal Zero-Exception Dark Overrides for Panels, Modals & Components
   -------------------------------------------------------------------------- */
/* Universal Luxury Custom Select System (Dropdowns & Floating Menus) */
html[data-theme="dark"] .luxury-select-trigger,
html[data-theme="dark"] .tt-filter-group .luxury-select-trigger,
html[data-theme="dark"] .panel-filter-form .luxury-select-trigger {
    background-color: #111827 !important;
    background: #111827 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    color: #F8FAFC !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .luxury-select-trigger:hover,
html[data-theme="dark"] .tt-filter-group .luxury-select-trigger:hover,
html[data-theme="dark"] .panel-filter-form .luxury-select-trigger:hover {
    background-color: #151E2E !important;
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
}

html[data-theme="dark"] .luxury-select-trigger.is-open,
html[data-theme="dark"] .luxury-select-trigger:focus-visible {
    background-color: #151E2E !important;
    background: #151E2E !important;
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

html[data-theme="dark"] .luxury-select-trigger.is-disabled {
    background-color: #0B0F19 !important;
    background: #0B0F19 !important;
    color: #64748B !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .luxury-select-dropdown {
    background-color: #111827 !important;
    background: #111827 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .luxury-select-options-list {
    background-color: transparent !important;
}

html[data-theme="dark"] .luxury-select-option {
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .luxury-select-option:hover,
html[data-theme="dark"] .luxury-select-option.is-focused {
    background-color: rgba(59, 130, 246, 0.18) !important;
    background: rgba(59, 130, 246, 0.18) !important;
    color: #93C5FD !important;
}

html[data-theme="dark"] .luxury-select-option.is-selected {
    background-color: rgba(59, 130, 246, 0.25) !important;
    background: rgba(59, 130, 246, 0.25) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
}

html[data-theme="dark"] .luxury-select-arrow {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .luxury-select-check {
    color: #60A5FA !important;
}

html[data-theme="dark"] .luxury-select-options-list::-webkit-scrollbar-track {
    background: transparent !important;
}

html[data-theme="dark"] .luxury-select-options-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15) !important;
}

/* Admin Panels, Action Cards, Headers & Bodies */
html[data-theme="dark"] .panel,
html[data-theme="dark"] .panel-body,
html[data-theme="dark"] .action-card,
html[data-theme="dark"] .action-card-body,
html[data-theme="dark"] .tabs-header-luxury,
html[data-theme="dark"] div#panel-manual {
    background-color: var(--bg-surface) !important;
    background: var(--bg-surface) !important;
    border-color: var(--border-subtle) !important;
    color: var(--text-body) !important;
}

html[data-theme="dark"] .panel-header,
html[data-theme="dark"] .action-card-header,
html[data-theme="dark"] .add-card-header,
html[data-theme="dark"] .backup-archives-header,
html[data-theme="dark"] [class*="panel-header"] {
    background-color: #151E2E !important;
    background: #151E2E !important;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .action-card-subtitle,
html[data-theme="dark"] .panel-subtitle {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .tab-btn-luxury {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .tab-btn-luxury.active {
    background: var(--gradient-primary) !important;
    color: #FFFFFF !important;
}

/* Course Cards & Form Controls (admin/courses.php / admin/live_courses.php) */
html[data-theme="dark"] .add-card,
html[data-theme="dark"] #form-container {
    background-color: #111827 !important;
    background: #111827 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .add-card-header {
    background-color: #151E2E !important;
    background: #151E2E !important;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .add-card-body {
    background-color: #111827 !important;
    background: #111827 !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .add-card-title {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .add-card-subtitle {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .add-card-body label,
html[data-theme="dark"] .add-card-body .form-label {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .course-form-grid .form-control,
html[data-theme="dark"] .price-input-group input,
html[data-theme="dark"] .form-field-icon-wrap input,
html[data-theme="dark"] .add-card-body textarea,
html[data-theme="dark"] .add-card-body input[type="text"],
html[data-theme="dark"] .add-card-body input[type="number"] {
    background-color: #151E2E !important;
    background: #151E2E !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .course-form-grid .form-control:focus,
html[data-theme="dark"] .price-input-group input:focus,
html[data-theme="dark"] .form-field-icon-wrap input:focus,
html[data-theme="dark"] .add-card-body textarea:focus,
html[data-theme="dark"] .add-card-body input:focus {
    background-color: #1A2338 !important;
    background: #1A2338 !important;
    border-color: #3B82F6 !important;
}

html[data-theme="dark"] .price-input-group .input-addon {
    background: #1E293B !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    border-left: none !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .form-actions-bar {
    border-top: 1.5px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .schedule-box-wrap,
html[data-theme="dark"] .form-group[style*="background: #F8FAFD"],
html[data-theme="dark"] .form-group[style*="background:#F8FAFD"] {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .btn-add-slot-schedule,
html[data-theme="dark"] button[onclick="addScheduleRow()"] {
    background: #1E293B !important;
    border-color: #3B82F6 !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .btn-add-slot-schedule:hover,
html[data-theme="dark"] button[onclick="addScheduleRow()"]:hover {
    background: #3B82F6 !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .courses-toolbar {
    background: #111827 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .courses-search-box input {
    background: #151E2E !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .courses-search-box input:focus {
    background: #1A2338 !important;
    border-color: #3B82F6 !important;
}

html[data-theme="dark"] .btn-clear-search {
    background: #1E293B !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .btn-clear-search:hover {
    background: #334155 !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .courses-count-badge {
    background: rgba(37, 99, 235, 0.18) !important;
    border: 1.5px solid rgba(59, 130, 246, 0.3) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .course-schedule-pill,
html[data-theme="dark"] .course-schedules-box [style*="background: #ffffff"],
html[data-theme="dark"] .course-schedules-box [style*="background:#ffffff"] {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .course-schedule-empty,
html[data-theme="dark"] .course-schedules-box [style*="background: #F8FAFC"],
html[data-theme="dark"] .course-schedules-box [style*="background:#F8FAFC"] {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .btn-set-featured,
html[data-theme="dark"] button[title*="offre vedette"] {
    background: #1E293B !important;
    border-color: #3B82F6 !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .course-card {
    background-color: #111827 !important;
    background: #111827 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-body) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .course-card:hover {
    background-color: #151E2E !important;
    background: #151E2E !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
}

html[data-theme="dark"] .course-card[style*="background: #FAFCFF"],
html[data-theme="dark"] .course-card[style*="background:#FAFCFF"],
html[data-theme="dark"] .course-card[style*="background: #FFFDF7"],
html[data-theme="dark"] .course-card[style*="background:#FFFDF7"] {
    background-color: #111827 !important;
    background: #111827 !important;
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 1.5px #3B82F6, 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .schedule-slot-row,
html[data-theme="dark"] div.schedule-slot-row {
    background-color: #151E2E !important;
    background: #151E2E !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .featured-card-clean .course-schedule-slot-item,
html[data-theme="dark"] .pricing-card-white.featured-card-clean .course-schedule-slot-item {
    background: #1A2338 !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    color: #F1F5F9 !important;
}

html[data-theme="dark"] .featured-card-clean .course-schedule-slot-item:hover,
html[data-theme="dark"] .pricing-card-white.featured-card-clean .course-schedule-slot-item:hover {
    background: #202C45 !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
}

/* Structure Pédagogique Components (admin/structure.php) */
html[data-theme="dark"] .luxury-cards-wrapper,
html[data-theme="dark"] .tree-modules-wrapper {
    background-color: var(--bg-surface) !important;
    background: var(--bg-surface) !important;
}

html[data-theme="dark"] .luxury-item-card,
html[data-theme="dark"] .tree-module-item {
    background-color: #151E2E !important;
    background: #151E2E !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-body) !important;
}

html[data-theme="dark"] .luxury-item-card:hover,
html[data-theme="dark"] .tree-module-item:hover {
    background-color: #1A2338 !important;
    background: #1A2338 !important;
    border-color: #3B82F6 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .luxury-item-name,
html[data-theme="dark"] .tree-filiere-title,
html[data-theme="dark"] .tree-niveau-title,
html[data-theme="dark"] .tree-module-name,
html[data-theme="dark"] .tree-module-title {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .tree-filiere-node {
    background-color: #111827 !important;
    background: #111827 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .tree-filiere-header {
    background-color: #151E2E !important;
    background: #151E2E !important;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .tree-niveaux-list {
    background-color: #0E1424 !important;
    background: #0E1424 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .tree-niveau-card {
    background-color: #111827 !important;
    background: #111827 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .tree-niveau-card::before {
    background: rgba(255, 255, 255, 0.15) !important;
}

html[data-theme="dark"] .tree-niveau-header {
    background: #151E2E !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .tree-filiere-title .filiere-icon,
html[data-theme="dark"] .luxury-item-icon {
    background: rgba(59, 130, 246, 0.16) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .luxury-item-icon.concours-icon {
    background: rgba(217, 119, 6, 0.16) !important;
    color: #FBBF24 !important;
}

html[data-theme="dark"] .niveau-icon-badge {
    background: rgba(99, 102, 241, 0.16) !important;
    color: #818CF8 !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}

html[data-theme="dark"] .module-icon-badge {
    background: rgba(59, 130, 246, 0.16) !important;
    color: #60A5FA !important;
    border: 1px solid rgba(59, 130, 246, 0.25) !important;
}

html[data-theme="dark"] .tree-badge-doc {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #93C5FD !important;
    border: 1px solid rgba(59, 130, 246, 0.25) !important;
}

html[data-theme="dark"] .tree-badge-doc.concours-doc-badge {
    background: rgba(217, 119, 6, 0.18) !important;
    color: #FBBF24 !important;
    border: 1px solid rgba(217, 119, 6, 0.3) !important;
}

html[data-theme="dark"] .filiere-count-badge {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #93C5FD !important;
    border: 1px solid rgba(59, 130, 246, 0.28) !important;
}

html[data-theme="dark"] .niveau-count-badge {
    background: rgba(99, 102, 241, 0.16) !important;
    color: #A5B4FC !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
}

html[data-theme="dark"] .tree-empty-nested {
    background: #0E1424 !important;
    background-color: #0E1424 !important;
    border: 1.5px dashed rgba(255, 255, 255, 0.14) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .tree-empty-nested span {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .stat-pill-module {
    background: rgba(16, 185, 129, 0.16) !important;
    color: #34D399 !important;
}

html[data-theme="dark"] .stat-pill-concours {
    background: rgba(217, 119, 6, 0.18) !important;
    color: #FBBF24 !important;
    border-color: rgba(217, 119, 6, 0.3) !important;
}

html[data-theme="dark"] .panel-empty-icon {
    background: #1E293B !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .panel-icon-trophy,
html[data-theme="dark"] .panel-empty-trophy {
    background: rgba(217, 119, 6, 0.2) !important;
    color: #FBBF24 !important;
}

html[data-theme="dark"] .btn-niveau-add {
    background: rgba(99, 102, 241, 0.16) !important;
    color: #A5B4FC !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}

html[data-theme="dark"] .btn-niveau-add:hover {
    background: #4F46E5 !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .icon-option {
    background-color: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .icon-option:hover {
    background-color: rgba(59, 130, 246, 0.2) !important;
    border-color: #3B82F6 !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .icon-selector-grid {
    background-color: #0E1424 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .slug-tag {
    background: #1E293B !important;
    color: #94A3B8 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Document Add & Edit Components (admin/add.php, admin/edit.php) */
html[data-theme="dark"] .context-radio-card {
    background-color: #111827 !important;
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #F8FAFC !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .context-radio-card:hover {
    background-color: #151E2E !important;
    background: #151E2E !important;
    border-color: #3B82F6 !important;
}

html[data-theme="dark"] .pdf-upload-box {
    background-color: #111827 !important;
    background: #111827 !important;
    border: 2px dashed rgba(59, 130, 246, 0.35) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .pdf-upload-box:hover {
    background-color: #151E2E !important;
    background: #151E2E !important;
    border-color: #3B82F6 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .pdf-upload-box.corrige-box {
    background-color: #111827 !important;
    background: #111827 !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
}

html[data-theme="dark"] .pdf-upload-box.corrige-box:hover {
    background-color: #151E2E !important;
    background: #151E2E !important;
    border-color: #10B981 !important;
}

html[data-theme="dark"] .pdf-upload-box .upload-icon {
    background: rgba(59, 130, 246, 0.16) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .pdf-upload-box.corrige-box .upload-icon {
    background: rgba(16, 185, 129, 0.16) !important;
    color: #34D399 !important;
}

html[data-theme="dark"] .pdf-upload-box .upload-title {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .pdf-upload-box .upload-desc {
    color: #94A3B8 !important;
}

html[data-theme="dark"] div#normal_section,
html[data-theme="dark"] div#concours_section,
html[data-theme="dark"] div#book_whop_section {
    background-color: #111827 !important;
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Terms & Policies Editor & Preview (admin/terms.php) */
html[data-theme="dark"] .terms-editor-card {
    background-color: #111827 !important;
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .terms-textarea-field {
    background-color: #0E1424 !important;
    background: #0E1424 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .terms-textarea-field:focus {
    background-color: #151E2E !important;
    background: #151E2E !important;
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25) !important;
}

html[data-theme="dark"] .preview-pane-box {
    background-color: #0E1424 !important;
    background: #0E1424 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .preview-pane-box h3 {
    color: #F8FAFC !important;
    border-left-color: #3B82F6 !important;
}

html[data-theme="dark"] .tab-toggle-pill {
    background-color: #0E1424 !important;
    background: #0E1424 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .tab-toggle-btn {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .tab-toggle-btn.active {
    background-color: #2563EB !important;
    background: #2563EB !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35) !important;
}

/* Modals & Action Menus in Admin */
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .modal-edit-card {
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7) !important;
}

html[data-theme="dark"] .actions-dropdown-menu {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .actions-dropdown-item {
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .actions-dropdown-item:hover {
    background: rgba(59, 130, 246, 0.18) !important;
    color: #93C5FD !important;
}

html[data-theme="dark"] .btn-dots-trigger {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .btn-dots-trigger:hover {
    background: #1E293B !important;
    color: #FFFFFF !important;
}

/* Admin Table Direct Download Badges Dark Mode */
html[data-theme="dark"] .btn-table-dl-sujet {
    background: rgba(37, 99, 235, 0.15) !important;
    color: #60A5FA !important;
    border-color: rgba(96, 165, 250, 0.3) !important;
}
html[data-theme="dark"] .btn-table-dl-sujet:hover {
    background: #2563EB !important;
    color: #FFFFFF !important;
    border-color: #2563EB !important;
}

html[data-theme="dark"] .btn-table-dl-corrige {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34D399 !important;
    border-color: rgba(52, 211, 153, 0.3) !important;
}
html[data-theme="dark"] .btn-table-dl-corrige:hover {
    background: #10B981 !important;
    color: #FFFFFF !important;
    border-color: #10B981 !important;
}

html[data-theme="dark"] .btn-table-dl-book {
    background: rgba(124, 58, 237, 0.15) !important;
    color: #A78BFA !important;
    border-color: rgba(167, 139, 250, 0.3) !important;
}
html[data-theme="dark"] .btn-table-dl-book:hover {
    background: #7C3AED !important;
    color: #FFFFFF !important;
    border-color: #7C3AED !important;
}

html[data-theme="dark"] .upload-file-chosen {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .pagination-container {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .sidebar-avatar-placeholder {
    background: rgba(59, 130, 246, 0.18) !important;
    border: 2px solid rgba(59, 130, 246, 0.35) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .btn-topbar-action {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #CBD5E1 !important;
}

/* Student Portal & Front Components */
html[data-theme="dark"] .faq-card-luxury,
html[data-theme="dark"] .courses-sort-select,
html[data-theme="dark"] .portal-sidebar-card,
html[data-theme="dark"] .live-banner-clean,
html[data-theme="dark"] .timetable-slot-clean,
html[data-theme="dark"] .step-card-luxury,
html[data-theme="dark"] .checkout-summary-card,
html[data-theme="dark"] .method-card-luxury,
html[data-theme="dark"] .rib-box-luxury,
html[data-theme="dark"] .receipt-dropzone-luxury,
html[data-theme="dark"] .auth-card-luxury,
html[data-theme="dark"] .doc-hero-luxury,
html[data-theme="dark"] .viewer-luxury-card,
html[data-theme="dark"] .split-pane-luxury,
html[data-theme="dark"] .related-card-item-luxury,
html[data-theme="dark"] .doc-404-luxury,
html[data-theme="dark"] .share-modal-card {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-body) !important;
}

html[data-theme="dark"] .live-banner-clean {
    border-left-width: 1px !important;
}

html[data-theme="dark"] .doc-hero-luxury::before {
    display: none !important;
    content: none !important;
}

html[data-theme="dark"] .doc-description-luxury {
    color: #94A3B8 !important;
}

/* ── Checkout Portal Dark Mode Refinements ── */
html[data-theme="dark"] .summary-student-data,
html[data-theme="dark"] .summary-course-box,
html[data-theme="dark"] .bank-voucher-luxury,
html[data-theme="dark"] .whop-checkout-box {
    background-color: #151E2E !important;
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .summary-student-data .student-label {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .summary-student-data .student-item {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .summary-student-data .student-item span {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .voucher-header-luxury {
    background: #1A2338 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .voucher-row-luxury {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .voucher-row-luxury span[style*="color: var(--text-navy)"] {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .rib-code-text {
    background: #0B0F19 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .whop-methods-badge-box {
    background: #0B0F19 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .badge-gpay {
    background: #151E2E !important;
    color: #F8FAFC !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

html[data-theme="dark"] .summary-pricing-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .summary-pricing-row span[style*="color: var(--text-navy)"] {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .summary-pricing-row.total-row {
    border-top: 1px dashed rgba(255, 255, 255, 0.15) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .summary-trust-col {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .trust-col-text strong {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .trust-col-text span {
    color: #94A3B8 !important;
}

/* ── Student Profile & Portal Dark Mode ── */
html[data-theme="dark"] .portal-stat-pill {
    background: #151E2E !important;
    background-color: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .portal-stat-pill:hover {
    background: #1A2338 !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
}

html[data-theme="dark"] .portal-stat-val {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .portal-stat-lbl {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .password-box-luxury {
    background: #151E2E !important;
    background-color: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .password-title-luxury {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .form-label-luxury {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .timetable-box-clean {
    background: #151E2E !important;
    background-color: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .timetable-title-clean {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .timetable-slot-clean {
    background: #0B0F19 !important;
    background-color: #0B0F19 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .timetable-slot-clean.today-active {
    background: #111D35 !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
}

html[data-theme="dark"] .slot-day-luxury {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .slot-time-luxury {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .portal-segmented-control {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .portal-segment-btn {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .portal-segment-btn.active {
    background: #2563EB !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .step-card-luxury:hover,
html[data-theme="dark"] .method-card-luxury:hover,
html[data-theme="dark"] .related-card-item-luxury:hover {
    background: #151E2E !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
}

html[data-theme="dark"] .method-radio-luxury {
    background: #1A2338 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

html[data-theme="dark"] .btn-doc-share,
html[data-theme="dark"] .share-channel-btn,
html[data-theme="dark"] .btn-split-luxury,
html[data-theme="dark"] .btn-fullscreen-luxury {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .share-modal-close:hover {
    background: #1E293B !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .pdf-modal-container,
html[data-theme="dark"] .pdf-modal-inner-box {
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .pdf-modal-iframe,
html[data-theme="dark"] #pdfIframe {
    background: #0B0F19 !important;
}

html[data-theme="dark"] .pdf-page-container {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .footer-meta-academic {
    color: #64748B !important;
}

html[data-theme="dark"] .hero-pill-status {
    background: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .metric-card-under {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Focus States for Inputs (Prevent Flash to White on Click) */
html[data-theme="dark"] .form-input-luxury:focus,
html[data-theme="dark"] .form-input:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] .form-textarea:focus,
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] input:not(.search-input-field):focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
    background-color: #151E2E !important;
    border-color: #3B82F6 !important;
    color: #FFFFFF !important;
}

/* High Contrast Hardcoded Text Overrides */
html[data-theme="dark"] [style*="color: #111827"],
html[data-theme="dark"] [style*="color:#111827"],
html[data-theme="dark"] [style*="color: #000000"],
html[data-theme="dark"] [style*="color:#000000"],
html[data-theme="dark"] [style*="color: #000"],
html[data-theme="dark"] [style*="color:#000"],
html[data-theme="dark"] [style*="color: black"],
html[data-theme="dark"] [style*="color:black"] {
    color: #F8FAFC !important;
}

/* ==========================================================================
   Courses FAQ Assistance Banner & Public Callouts
   ========================================================================== */
html[data-theme="dark"] .banner-assistance-luxury {
    background: linear-gradient(135deg, #111827 0%, #1E293B 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #F8FAFC !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .banner-assistance-luxury h3 {
    color: #FFFFFF !important;
}

html[data-theme="dark"] .banner-assistance-luxury p {
    color: #94A3B8 !important;
}

/* ==========================================================================
   Document Details, Breadcrumbs Ribbon & Dual-Viewer Tabs
   ========================================================================== */
html[data-theme="dark"] .doc-breadcrumbs-ribbon {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .doc-breadcrumbs-ribbon a {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .doc-breadcrumbs-ribbon a:hover {
    color: #60A5FA !important;
}

html[data-theme="dark"] .doc-breadcrumbs-ribbon .sep {
    color: #64748B !important;
}

html[data-theme="dark"] .doc-breadcrumbs-ribbon .current {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .viewer-tabs-group-luxury {
    background: #0E1424 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .viewer-tab-btn-luxury {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .viewer-tab-btn-luxury:hover {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .viewer-tab-btn-luxury.active {
    background: #1E293B !important;
    color: #60A5FA !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .viewer-tab-btn-luxury.tab-corrige.active {
    color: #34D399 !important;
}

html[data-theme="dark"] .viewer-tab-bar-luxury {
    background: #0E1424 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .viewer-content-area-luxury,
html[data-theme="dark"] .doc-iframe-luxury {
    background: #0B0F19 !important;
}

html[data-theme="dark"] .split-screen-grid-luxury {
    background: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .split-pane-header-luxury {
    background: #0E1424 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #F8FAFC !important;
}

/* ==========================================================================
   Custom Admin & Global Confirm / Alert Modals
   ========================================================================== */
html[data-theme="dark"] .custom-confirm-overlay,
html[data-theme="dark"] .custom-alert-overlay {
    background-color: rgba(11, 15, 25, 0.8) !important;
}

html[data-theme="dark"] .custom-confirm-card,
html[data-theme="dark"] .custom-alert-card {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75) !important;
}

html[data-theme="dark"] .custom-confirm-card h3,
html[data-theme="dark"] .custom-alert-card h3 {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .custom-confirm-card p,
html[data-theme="dark"] .custom-alert-card p {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .custom-confirm-card #custom-confirm-cancel {
    background: #1E293B !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #E2E8F0 !important;
}

html[data-theme="dark"] .custom-confirm-card #custom-confirm-cancel:hover {
    background: #334155 !important;
    color: #FFFFFF !important;
}

/* --------------------------------------------------------------------------
   Admin Students Management (students.php) Dark Mode
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .students-toolbar {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .students-search-box input {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .students-search-box input::placeholder {
    color: #64748B !important;
}

html[data-theme="dark"] .students-search-box input:focus {
    background: #111827 !important;
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.2) !important;
}

html[data-theme="dark"] .btn-clear-search {
    background: #1E293B !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .btn-clear-search:hover {
    background: #334155 !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .student-card {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .student-card:hover {
    border-color: rgba(59, 130, 246, 0.35) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .student-avatar-badge {
    border-color: #151E2E !important;
}

html[data-theme="dark"] .student-name {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .student-meta-item {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .student-meta-item a {
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .student-meta-item a:hover {
    color: #60A5FA !important;
}

html[data-theme="dark"] .student-date {
    color: #64748B !important;
}

html[data-theme="dark"] .badge-no-subs {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .btn-toggle-subs {
    background: rgba(59, 130, 246, 0.16) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .btn-toggle-subs:hover {
    background: rgba(59, 130, 246, 0.28) !important;
    border-color: #3B82F6 !important;
}

html[data-theme="dark"] .btn-toggle-subs.active {
    background: var(--gradient-primary) !important;
    color: #FFFFFF !important;
    border-color: transparent !important;
}

html[data-theme="dark"] .subs-collapsible {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .subs-table-wrapper {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .sub-table th {
    background: #151E2E !important;
    color: #94A3B8 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .sub-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .sub-table td.sub-course-title strong {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .sub-table tr {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .sub-table td.sub-course-title {
    color: #F8FAFC !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .sub-period-dates {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .period-divider {
    color: #475569 !important;
}

html[data-theme="dark"] .sub-receipt-link {
    background: rgba(59, 130, 246, 0.16) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .sub-receipt-link:hover {
    background: rgba(59, 130, 246, 0.28) !important;
    border-color: #3B82F6 !important;
}

html[data-theme="dark"] .btn-delete-student {
    background: rgba(225, 29, 72, 0.15) !important;
    border-color: rgba(225, 29, 72, 0.3) !important;
    color: #FB7185 !important;
}

html[data-theme="dark"] .btn-delete-student:hover {
    background: #E11D48 !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .btn-delete-sub {
    background: rgba(225, 29, 72, 0.15) !important;
    border-color: rgba(225, 29, 72, 0.3) !important;
    color: #FB7185 !important;
}

html[data-theme="dark"] .btn-delete-sub:hover {
    background: #DC2626 !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .btn-activate {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #34D399 !important;
}

html[data-theme="dark"] .btn-activate:hover {
    background: #10B981 !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .btn-cancel {
    background: rgba(217, 119, 6, 0.18) !important;
    border-color: rgba(217, 119, 6, 0.3) !important;
    color: #FBBF24 !important;
}

html[data-theme="dark"] .btn-cancel:hover {
    background: #D97706 !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .empty-state {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}

/* --------------------------------------------------------------------------
   Admin Live Sessions (.live-banner) Dark Mode
   -------------------------------------------------------------------------- */
html[data-theme="dark"] .live-banner {
    background: #151E2E !important;
    border: 1px solid rgba(244, 63, 94, 0.35) !important;
    border-left: 1px solid rgba(244, 63, 94, 0.35) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

html[data-theme="dark"] .live-banner h3,
html[data-theme="dark"] .live-session-title {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .live-banner .live-indicator {
    background: rgba(225, 29, 72, 0.18) !important;
    color: #FB7185 !important;
    border: 1px solid rgba(225, 29, 72, 0.35) !important;
}

html[data-theme="dark"] .btn-live-copy {
    background: rgba(99, 102, 241, 0.18) !important;
    color: #A5B4FC !important;
    border-color: rgba(99, 102, 241, 0.35) !important;
}

html[data-theme="dark"] .btn-live-copy:hover {
    background: rgba(99, 102, 241, 0.28) !important;
    border-color: #6366F1 !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .btn-live-details {
    background: #1E293B !important;
    color: #CBD5E1 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .btn-live-details:hover {
    background: #334155 !important;
    color: #FFFFFF !important;
}






/* ==========================================================================
   Luxury Dark Mode Overrides for Notification Center & Student Triage
   ========================================================================== */
html[data-theme="dark"] .admin-notif-btn {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}
html[data-theme="dark"] .admin-notif-btn:hover,
html[data-theme="dark"] .admin-notif-btn.is-active {
    background: #1E293B !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: #60A5FA !important;
}
html[data-theme="dark"] .admin-notif-badge {
    border-color: #0B0F19 !important;
}
html[data-theme="dark"] .admin-notif-dropdown {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6) !important;
}
html[data-theme="dark"] .admin-notif-header {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-theme="dark"] .admin-notif-header-title {
    color: #F8FAFC !important;
}
html[data-theme="dark"] .admin-notif-counter-pill {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #FBBF24 !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
}
html[data-theme="dark"] .admin-notif-body {
    background: #151E2E !important;
}
html[data-theme="dark"] .admin-notif-item {
    border-color: rgba(255, 255, 255, 0.06) !important;
}
html[data-theme="dark"] .admin-notif-item:hover {
    background: #1E293B !important;
}
html[data-theme="dark"] .notif-student-name {
    color: #F8FAFC !important;
}
html[data-theme="dark"] .notif-item-time {
    color: #64748B !important;
}
html[data-theme="dark"] .notif-item-course {
    color: #94A3B8 !important;
}
html[data-theme="dark"] .notif-badge-price {
    background: #111827 !important;
    color: #CBD5E1 !important;
}
html[data-theme="dark"] .notif-badge-receipt {
    background: rgba(59, 130, 246, 0.18) !important;
    color: #60A5FA !important;
}
html[data-theme="dark"] .notif-empty-title {
    color: #F8FAFC !important;
}
html[data-theme="dark"] .notif-empty-sub {
    color: #94A3B8 !important;
}
html[data-theme="dark"] .admin-notif-footer {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-theme="dark"] .admin-notif-footer-link {
    color: #60A5FA !important;
}

/* Dark Mode Overrides for Triage Tabs & Banner */
html[data-theme="dark"] .students-filter-tabs {
    border-color: transparent !important;
}
html[data-theme="dark"] .filter-tab-pill {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}
html[data-theme="dark"] .filter-tab-pill:hover {
    background: #1E293B !important;
    color: #F8FAFC !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}
html[data-theme="dark"] .filter-tab-pill.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #FFFFFF !important;
    border-color: transparent !important;
    box-shadow: none !important;
}
html[data-theme="dark"] .filter-tab-pill .tab-count {
    background: #111827 !important;
    color: #94A3B8 !important;
}
html[data-theme="dark"] .filter-tab-pill.filter-tab-pending:not(.active) {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
    color: #FBBF24 !important;
}
html[data-theme="dark"] .filter-tab-pill.filter-tab-pending:not(.active) i {
    color: #FBBF24 !important;
}
html[data-theme="dark"] .filter-tab-pill.filter-tab-pending:not(.active) .tab-count {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #FDE68A !important;
}

html[data-theme="dark"] .pending-notice-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.12) 100%) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .pending-notice-title {
    color: #FDE68A !important;
}
html[data-theme="dark"] .pending-notice-desc {
    color: #FCD34D !important;
}
html[data-theme="dark"] .pending-notice-btn {
    background: #D97706 !important;
    color: #FFFFFF !important;
}
html[data-theme="dark"] .pending-notice-btn:hover {
    background: #B45309 !important;
}

html[data-theme="dark"] .pending-notice-banner.pending-notice-books {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(109, 40, 217, 0.15) 100%) !important;
    border-color: rgba(124, 58, 237, 0.4) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}
html[data-theme="dark"] .pending-notice-banner.pending-notice-books .pending-notice-icon {
    background: #7C3AED !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4) !important;
}
html[data-theme="dark"] .pending-notice-banner.pending-notice-books .pending-notice-title {
    color: #EDE9FE !important;
}
html[data-theme="dark"] .pending-notice-banner.pending-notice-books .pending-notice-desc {
    color: #DDD6FE !important;
}
html[data-theme="dark"] .pending-notice-banner.pending-notice-books .pending-notice-btn {
    background: #7C3AED !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4) !important;
}
html[data-theme="dark"] .pending-notice-banner.pending-notice-books .pending-notice-btn:hover {
    background: #6D28D9 !important;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.5) !important;
}

/* ==========================================================================
   Google Meet Guests Modal — Dark Mode Support
   ========================================================================== */
html[data-theme="dark"] #meetGuestsModal.modal-overlay,
html[data-theme="dark"] .meet-guests-overlay {
    background: rgba(11, 15, 25, 0.75) !important;
}

html[data-theme="dark"] #meetGuestsModal .modal-card,
html[data-theme="dark"] #meetGuestsModal .meet-guests-modal-card,
html[data-theme="dark"] .meet-guests-modal-card {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #F8FAFC !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .meet-modal-header {
    background: linear-gradient(135deg, #1E293B 0%, #111827 100%) !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .meet-modal-title {
    color: #FFFFFF !important;
}

html[data-theme="dark"] .meet-modal-subtitle {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .meet-badge-direct {
    background: rgba(99, 102, 241, 0.18) !important;
    color: #C7D2FE !important;
    border-color: rgba(99, 102, 241, 0.35) !important;
}

html[data-theme="dark"] .meet-modal-icon-badge {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #A5B4FC !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .meet-modal-close-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .meet-modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #F87171 !important;
}

html[data-theme="dark"] .meet-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15) !important;
}

html[data-theme="dark"] .meet-field-label {
    color: #E2E8F0 !important;
}

html[data-theme="dark"] .meet-field-label i {
    color: #818CF8 !important;
}

html[data-theme="dark"] .meet-course-select {
    background: #0B1120 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .meet-guide-alert {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
}

html[data-theme="dark"] .meet-guide-icon {
    color: #34D399 !important;
}

html[data-theme="dark"] .meet-guide-content {
    color: #A7F3D0 !important;
}

html[data-theme="dark"] .meet-btn-sec {
    background: #1E293B !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #E2E8F0 !important;
}

html[data-theme="dark"] .meet-btn-sec:hover {
    background: #2D3748 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

html[data-theme="dark"] .meet-btn-cal {
    background: rgba(2, 132, 199, 0.15) !important;
    border-color: rgba(2, 132, 199, 0.3) !important;
    color: #38BDF8 !important;
}

html[data-theme="dark"] .meet-btn-cal:hover {
    background: rgba(2, 132, 199, 0.25) !important;
}

html[data-theme="dark"] .meet-emails-textarea {
    background: #0B1120 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .meet-students-section {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .meet-students-title {
    color: #E2E8F0 !important;
}

html[data-theme="dark"] .meet-students-title i {
    color: #818CF8 !important;
}

html[data-theme="dark"] .meet-search-input {
    background: #0B1120 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .meet-search-input:focus {
    border-color: #818CF8 !important;
}

html[data-theme="dark"] .meet-table-scroll-container {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: #0B1120 !important;
}

html[data-theme="dark"] .meet-students-table thead tr {
    background: #1E293B !important;
}

html[data-theme="dark"] .meet-students-table th {
    color: #94A3B8 !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .meet-students-table td {
    border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .meet-student-name {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .meet-student-email {
    color: #A5B4FC !important;
}

html[data-theme="dark"] .meet-modal-footer {
    background: #111827 !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .meet-footer-sync {
    color: #94A3B8 !important;
}

/* ==========================================================================
   Dark Mode Luxury Time Picker (Zero-Scroll Experience)
   ========================================================================== */
html[data-theme="dark"] .luxury-time-popover {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .ltp-header,
html[data-theme="dark"] .ltp-footer {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .ltp-title-wrap {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .ltp-section-label {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .ltp-duration-section {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

html[data-theme="dark"] .ltp-duration-section .ltp-section-label {
    color: #34D399 !important;
}

html[data-theme="dark"] .ltp-dur-pill {
    background: #111827 !important;
    color: #34D399 !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
}

html[data-theme="dark"] .ltp-dur-pill:hover {
    background: #10B981 !important;
    color: #FFFFFF !important;
    border-color: #10B981 !important;
}

html[data-theme="dark"] .ltp-preset-btn,
html[data-theme="dark"] .ltp-hour-btn,
html[data-theme="dark"] .ltp-min-btn {
    background: #1E293B !important;
    color: #F1F5F9 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .ltp-preset-btn:hover,
html[data-theme="dark"] .ltp-hour-btn:hover,
html[data-theme="dark"] .ltp-min-btn:hover {
    background: #2563EB !important;
    color: #FFFFFF !important;
    border-color: #3B82F6 !important;
}

html[data-theme="dark"] .ltp-preset-btn.active,
html[data-theme="dark"] .ltp-hour-btn.active,
html[data-theme="dark"] .ltp-min-btn.active {
    background: #2563EB !important;
    color: #FFFFFF !important;
    border-color: #3B82F6 !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5) !important;
}

html[data-theme="dark"] .ltp-preview-badge {
    background: rgba(37, 99, 235, 0.2) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .luxury-time-input {
    background: #151E2E !important;
    color: #F8FAFC !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

/* ==========================================================================
   Comments & Feedback System - Dark Mode Support
   ========================================================================== */
html[data-theme="dark"] .comments-section-luxury {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .comments-count-badge {
    background: rgba(37, 99, 235, 0.2) !important;
    color: #60A5FA !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
}

html[data-theme="dark"] .comments-subtitle {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .comment-box-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .comment-author-preview {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .comment-author-name {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .comment-author-note {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .avatar-teacher-placeholder,
body.dark-theme .avatar-teacher-placeholder {
    background: #FFFFFF !important;
    border: 2px solid rgba(59, 130, 246, 0.4) !important;
    color: #2563EB !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .avatar-teacher-placeholder i,
body.dark-theme .avatar-teacher-placeholder i {
    color: #2563EB !important;
}

html[data-theme="dark"] .badge-teacher {
    background: rgba(99, 102, 241, 0.18) !important;
    color: #A5B4FC !important;
    border-color: rgba(99, 102, 241, 0.35) !important;
}

html[data-theme="dark"] .badge-student {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #6EE7B7 !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
}

html[data-theme="dark"] .badge-guest {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #CBD5E1 !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
}

html[data-theme="dark"] .comment-input-label {
    color: #E2E8F0 !important;
}

html[data-theme="dark"] .comment-input-luxury,
html[data-theme="dark"] .comment-textarea-luxury {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .comment-input-luxury:focus,
html[data-theme="dark"] .comment-textarea-luxury:focus {
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
    background: #1A2436 !important;
}

html[data-theme="dark"] .comment-input-icon-wrap .input-icon {
    color: #64748B !important;
}

html[data-theme="dark"] .comment-guest-badge-notice {
    color: #34D399 !important;
}

html[data-theme="dark"] .comment-char-counter {
    color: #64748B !important;
}

html[data-theme="dark"] .comment-item-card {
    background: rgba(255, 255, 255, 0.025) !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .comment-item-card:hover {
    border-color: rgba(59, 130, 246, 0.35) !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

html[data-theme="dark"] .comment-user-name {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .comment-timestamp {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .comment-item-body {
    color: #E2E8F0 !important;
}

html[data-theme="dark"] .btn-delete-comment {
    color: #64748B !important;
}

html[data-theme="dark"] .btn-delete-comment:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    color: #F87171 !important;
}

html[data-theme="dark"] .btn-edit-comment {
    background: transparent !important;
    border-color: transparent !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .btn-edit-comment:hover {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.25) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .btn-edit-reply-bubble {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .btn-edit-reply-bubble:hover {
    background: rgba(2, 132, 199, 0.2) !important;
    border-color: rgba(2, 132, 199, 0.4) !important;
    color: #38BDF8 !important;
}

html[data-theme="dark"] .doc-comment-edit-box {
    background: rgba(15, 23, 42, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .comments-empty-state {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .comments-empty-state .empty-icon-wrap {
    background: rgba(37, 99, 235, 0.15) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .comments-empty-state .empty-title {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .comments-empty-state .empty-desc {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .comment-alert-box.is-success {
    background: rgba(5, 150, 105, 0.15) !important;
    color: #6EE7B7 !important;
    border-color: rgba(5, 150, 105, 0.35) !important;
}

html[data-theme="dark"] .comment-alert-box.is-error {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #FCA5A5 !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
}

/* Admin Notification Tabs & Comment Items in Dark Mode */
html[data-theme="dark"] .admin-notif-tabs {
    background: #0f172a !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .notif-tab-item {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .notif-tab-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .notif-tab-item.is-active {
    background: #1e293b !important;
    color: #60a5fa !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .notif-tab-count {
    background: #334155 !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .notif-tab-item.is-active .notif-tab-count {
    background: rgba(37, 99, 235, 0.25) !important;
    color: #93c5fd !important;
}

html[data-theme="dark"] .notif-tab-count.is-purple {
    background: rgba(124, 58, 237, 0.28) !important;
    color: #c4b5fd !important;
}

html[data-theme="dark"] .notif-tab-item.is-active#notifTabBtnBooks {
    color: #c4b5fd !important;
}

html[data-theme="dark"] .notif-tab-item.is-active#notifTabBtnBooks .notif-tab-count {
    background: rgba(124, 58, 237, 0.3) !important;
    color: #ede9fe !important;
}

html[data-theme="dark"] .nav-link-item.nav-link-books,
html[data-theme="dark"] .nav-link-item[data-universe="books"] {
    color: #c4b5fd !important;
}

html[data-theme="dark"] .nav-link-item.nav-link-books:hover,
html[data-theme="dark"] .nav-link-item[data-universe="books"]:hover {
    color: #ddd6fe !important;
    background: rgba(124, 58, 237, 0.15) !important;
}

html[data-theme="dark"] .nav-link-item.nav-link-books.active,
html[data-theme="dark"] .nav-link-item[data-universe="books"].active {
    color: #c4b5fd !important;
    background: rgba(124, 58, 237, 0.22) !important;
}

html[data-theme="dark"] .notif-tab-count.is-amber {
    background: rgba(217, 119, 6, 0.25) !important;
    color: #fcd34d !important;
}

html[data-theme="dark"] .notif-comment-item {
    background: #111827 !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .notif-comment-item:hover {
    background: #1e293b !important;
}

html[data-theme="dark"] .notif-comment-item.is-unanswered {
    background: transparent !important;
}

html[data-theme="dark"] .notif-comment-item.is-unanswered:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

html[data-theme="dark"] .notif-comment-text {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .notif-badge-unanswered {
    background: rgba(217, 119, 6, 0.2) !important;
    color: #fcd34d !important;
    border-color: rgba(217, 119, 6, 0.35) !important;
}

html[data-theme="dark"] .notif-badge-answered {
    background: rgba(5, 150, 105, 0.2) !important;
    color: #6ee7b7 !important;
    border-color: rgba(5, 150, 105, 0.35) !important;
}

html[data-theme="dark"] .notif-comment-reply-action {
    background: rgba(37, 99, 235, 0.18) !important;
    color: #93c5fd !important;
    border-color: rgba(37, 99, 235, 0.35) !important;
}

html[data-theme="dark"] .notif-comment-reply-action:hover {
    background: #2563eb !important;
    color: #ffffff !important;
}

/* Document Nested Replies & Teacher Inline Reply in Dark Mode */
html[data-theme="dark"] .btn-reply-comment {
    background: rgba(37, 99, 235, 0.15) !important;
    color: #93c5fd !important;
    border-color: rgba(37, 99, 235, 0.3) !important;
}

html[data-theme="dark"] .btn-reply-comment:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

html[data-theme="dark"] .comment-replies-wrap {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
    border-left-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .comment-reply-item {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .comment-reply-item.reply-teacher {
    background: rgba(37, 99, 235, 0.08) !important;
    border: 1px solid rgba(59, 130, 246, 0.25) !important;
}

html[data-theme="dark"] .comment-reply-item.reply-student {
    background: rgba(16, 185, 129, 0.06) !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

html[data-theme="dark"] .comment-reply-item.reply-guest {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
}

html[data-theme="dark"] .doc-inline-reply-box {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

html[data-theme="dark"] .doc-reply-form .reply-textarea {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .doc-reply-form .reply-textarea:focus {
    border-color: #3b82f6 !important;
    background: rgba(15, 23, 42, 0.95) !important;
}

html[data-theme="dark"] .btn-reply-cancel {
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #94a3b8 !important;
}

html[data-theme="dark"] .btn-reply-cancel:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .sidebar-badge-count.is-amber {
    background: #d97706 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .sidebar-link.active .sidebar-badge-count.is-amber {
    background: #d97706 !important;
    color: #ffffff !important;
}

/* ═══════════════════════════════════════════════════════════
   ADMIN COMMENTS MANAGEMENT PAGE - DARK MODE STYLES
   ═══════════════════════════════════════════════════════════ */
html[data-theme="dark"] .comm-stat-card {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .comm-stat-card:hover {
    border-color: rgba(59, 130, 246, 0.35) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .comm-stat-value {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .comm-stat-value.val-amber {
    color: #FBBF24 !important;
}

html[data-theme="dark"] .comm-stat-value.val-emerald {
    color: #34D399 !important;
}

html[data-theme="dark"] .comm-stat-label {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .comm-stat-icon.icon-blue {
    background: rgba(37, 99, 235, 0.18) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .comm-stat-icon.icon-amber {
    background: rgba(217, 119, 6, 0.18) !important;
    color: #FBBF24 !important;
}

html[data-theme="dark"] .comm-stat-icon.icon-emerald {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #34D399 !important;
}

html[data-theme="dark"] .comm-stat-icon.icon-purple {
    background: rgba(139, 92, 246, 0.18) !important;
    color: #A78BFA !important;
}

/* Toolbar & Filters in Dark Mode */
html[data-theme="dark"] .comm-toolbar-card {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .comm-filter-tab {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .comm-filter-tab:hover {
    background: #1E293B !important;
    color: #F8FAFC !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

html[data-theme="dark"] .comm-filter-tab.is-active {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
    border-color: #3B82F6 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4) !important;
}

html[data-theme="dark"] .comm-filter-tab .tab-badge {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .comm-filter-tab.is-active .tab-badge {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .tab-badge.tab-badge-amber {
    background: #d97706 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .comm-search-input {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .comm-search-input:focus {
    background: #0B0F19 !important;
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

html[data-theme="dark"] .comm-search-box i {
    color: #64748B !important;
}

/* Comment Cards in Dark Mode */
html[data-theme="dark"] .admin-comment-card {
    background: #151E2E !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .admin-comment-card:hover {
    border-color: rgba(59, 130, 246, 0.3) !important;
}

html[data-theme="dark"] .admin-comment-card.is-focused {
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35) !important;
}

html[data-theme="dark"] .comm-user-info-name {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .comm-user-info-sub {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .comm-doc-link-pill {
    background: rgba(37, 99, 235, 0.15) !important;
    color: #93C5FD !important;
    border-color: rgba(37, 99, 235, 0.3) !important;
}

html[data-theme="dark"] .comm-doc-link-pill:hover {
    background: #2563EB !important;
    color: #FFFFFF !important;
    border-color: #2563EB !important;
}

/* Comment Content in Dark Mode */
html[data-theme="dark"] .comment-card-content {
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #E2E8F0 !important;
}

/* Replies in Dark Mode */
html[data-theme="dark"] .comm-replies-list {
    border-left-color: rgba(59, 130, 246, 0.35) !important;
}

html[data-theme="dark"] .reply-bubble-item {
    background: rgba(37, 99, 235, 0.08) !important;
    border: 1px solid rgba(59, 130, 246, 0.25) !important;
}

html[data-theme="dark"] .reply-teacher-badge {
    background: rgba(37, 99, 235, 0.25) !important;
    color: #93C5FD !important;
}

html[data-theme="dark"] .reply-bubble-text {
    color: #F1F5F9 !important;
}

/* Reply Box & Textarea in Dark Mode */
html[data-theme="dark"] .admin-reply-box {
    background: #111827 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .reply-box-label {
    color: #E2E8F0 !important;
}

html[data-theme="dark"] .admin-reply-textarea {
    background: #0B0F19 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .admin-reply-textarea:focus {
    border-color: #3B82F6 !important;
    background: #070B12 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

html[data-theme="dark"] .reply-template-label {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .btn-template-pill {
    background: #1E293B !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .btn-template-pill:hover {
    background: rgba(37, 99, 235, 0.2) !important;
    color: #93C5FD !important;
    border-color: rgba(37, 99, 235, 0.4) !important;
}

html[data-theme="dark"] .btn-delete-comment-admin {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .btn-delete-comment-admin:hover {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #F87171 !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
}

/* Badges in Dark Mode */
html[data-theme="dark"] .badge-comm-student {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34D399 !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

html[data-theme="dark"] .badge-comm-guest {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #CBD5E1 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .badge-comm-answered {
    background: rgba(5, 150, 105, 0.2) !important;
    color: #6EE7B7 !important;
    border: 1px solid rgba(5, 150, 105, 0.35) !important;
}

html[data-theme="dark"] .badge-comm-unanswered {
    background: rgba(217, 119, 6, 0.2) !important;
    color: #FCD34D !important;
    border: 1px solid rgba(217, 119, 6, 0.35) !important;
}

/* Empty State in Dark Mode */
html[data-theme="dark"] .admin-comm-empty {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #94A3B8 !important;
}

html[data-theme="dark"] .admin-comm-empty .empty-icon-circle {
    background: rgba(37, 99, 235, 0.18) !important;
    color: #60A5FA !important;
}

html[data-theme="dark"] .admin-comm-empty h3 {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .admin-comm-empty p {
    color: #94A3B8 !important;
}

/* Progressive Disclosure & Comment Focus in Dark Mode */
html[data-theme="dark"] .btn-load-more-comments {
    background: #151E2E !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #94A3B8 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .btn-load-more-comments:hover {
    background: #2563EB !important;
    border-color: #2563EB !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
}

html[data-theme="dark"] .comment-targeted-highlight {
    animation: targetCommentPulseDark 2.5s ease;
}

@keyframes targetCommentPulseDark {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
    20%, 50% {
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.5);
        border-color: #3B82F6;
    }
}

/* ── Sponsored Ad Slots (Dark Mode Overrides) ── */
html[data-theme="dark"] .ad-native-wrapper,
html[data-theme="dark"] .ad-native-card,
body.dark-theme .ad-native-wrapper,
body.dark-theme .ad-native-card,
html[data-theme="dark"] .ad-sidebar-card,
body.dark-theme .ad-sidebar-card {
    background: #111827 !important;
    background-color: #111827 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="dark"] .ad-header-row,
body.dark-theme .ad-header-row {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
