/* ==========================================================================
   AUTOGRADING THEME SYSTEM (LIGHT / DARK DUAL MODE ARCHITECTURE)
   Seamless, high-contrast, eye-comfort theming across the entire application:
   - Calm UI (Light Mode): Slate 50 canvas (#f8fafc), Deep Ink typography (#0f172a)
   - Spatial Dark Mode: Deep Obsidian/Navy (#0b0f19 / #151e32), High-contrast slate (#f8fafc)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CORE TOKENS BY THEME
   -------------------------------------------------------------------------- */

/* Light Theme Tokens */
:root,
[data-theme="light"],
html.theme-light,
body.theme-light {
  --theme-name: "light";
  --canvas-bg: #f8fafc;
  --card-bg: #ffffff;
  --card-bg-elevated: #ffffff;
  --surface-subtle: #f1f5f9;
  --surface-hover: #e2e8f0;
  --surface-active: #cbd5e1;

  --text-main: #082850;
  --text-secondary: #1e3a5f;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --border-color: #e2e8f0;
  --border-subtle: rgba(8, 40, 80, 0.06);
  --border-strong: #cbd5e1;

  --rail-bg: #ffffff;
  --rail-surface: #f8fafc;
  --rail-panel: #f1f5f9;
  --rail-border: #e2e8f0;
  --rail-text: #082850;
  --rail-text-secondary: #1e3a5f;

  --studio-bg: #f1f5f9;
  --studio-surface: #ffffff;
  --studio-border: #e2e8f0;
  --studio-text: #082850;

  --spatial-l0-canvas: #f8fafc;
  --spatial-l1-surface: #ffffff;
  --linear-border: rgba(203, 213, 225, 0.75);
  --linear-border-hover: rgba(0, 197, 223, 0.45);
  --linear-surface-subtle: #f8fafc;

  --glass-frosted-bg: rgba(255, 255, 255, 0.85);
  --glass-frosted-border: rgba(255, 255, 255, 0.75);
  --glass-specular-highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.9);

  --copilot-chip-bg: rgba(236, 254, 255, 0.9);
  --copilot-chip-border: rgba(165, 243, 252, 0.9);
  --copilot-chip-text: #0e7490;

  --tactile-border-color: #cbd5e1;
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --input-text: #082850;
  --input-placeholder: #94a3b8;
}

/* Dark Theme Tokens (chamnhanh.net Midnight Ink & Luminous Cyan) */
[data-theme="dark"],
html.theme-dark,
body.theme-dark {
  --theme-name: "dark";
  --canvas-bg: #051839;
  --card-bg: #09234e;
  --card-bg-elevated: #0d2c60;
  --surface-subtle: #071d42;
  --surface-hover: #103572;
  --surface-active: #15428c;

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-color: rgba(0, 197, 223, 0.16);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-strong: #17427f;

  --rail-bg: #051839;
  --rail-surface: #09234e;
  --rail-panel: #071d42;
  --rail-border: rgba(0, 197, 223, 0.15);
  --rail-text: #f8fafc;
  --rail-text-secondary: #cbd5e1;

  --studio-bg: #051839;
  --studio-surface: #09234e;
  --studio-border: rgba(0, 197, 223, 0.16);
  --studio-text: #f8fafc;

  --spatial-l0-canvas: #051839;
  --spatial-l1-surface: #09234e;
  --linear-border: rgba(0, 197, 223, 0.18);
  --linear-border-hover: rgba(0, 197, 223, 0.6);
  --linear-surface-subtle: #071d42;

  --glass-frosted-bg: rgba(9, 35, 78, 0.88);
  --glass-frosted-border: rgba(0, 197, 223, 0.2);
  --glass-specular-highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.15);

  --copilot-chip-bg: rgba(0, 197, 223, 0.15);
  --copilot-chip-border: rgba(0, 197, 223, 0.35);
  --copilot-chip-text: #38bdf8;

  --tactile-border-color: #17427f;
  --input-bg: #071d42;
  --input-border: rgba(0, 197, 223, 0.25);
  --input-text: #f8fafc;
  --input-placeholder: #64748b;

  --focus-ring-color: #22d3ee;
  --focus-ring: 0 0 0 3px rgba(34, 211, 238, 0.55);
  --focus-ring-offset-color: #051839;
  --btn-secondary-bg: rgba(0, 197, 223, 0.16);
  --btn-secondary-fg: #38bdf8;
  --btn-secondary-border: rgba(0, 197, 223, 0.4);
}

/* --------------------------------------------------------------------------
   2. GLOBAL LAYOUT & COMPONENT THEMING
   -------------------------------------------------------------------------- */

body {
  background-color: var(--canvas-bg);
  color: var(--text-main);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.app-cockpit-layout {
  background: var(--canvas-bg) !important;
  color: var(--text-main) !important;
}

[data-theme="dark"] .studio-topbar {
  background: rgba(15, 23, 42, 0.9) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="dark"] .cockpit-sidebar {
  background: var(--rail-bg) !important;
  border-right: 1px solid var(--rail-border) !important;
}

[data-theme="dark"] .bento-card {
  background: var(--card-bg) !important;
  border-color: var(--linear-border) !important;
  color: var(--text-main) !important;
}

[data-theme="dark"] .bento-card:hover {
  background: #1a253c !important;
  border-color: var(--linear-border-hover) !important;
}

[data-theme="dark"] .copilot-intent-bar {
  background: rgba(21, 30, 50, 0.85) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
  color: var(--text-main) !important;
}

[data-theme="dark"] .intent-chip {
  background: var(--copilot-chip-bg) !important;
  border-color: var(--copilot-chip-border) !important;
  color: var(--copilot-chip-text) !important;
}

/* Tables */
[data-theme="dark"] table,
[data-theme="dark"] .table {
  color: var(--text-main) !important;
}

[data-theme="dark"] table thead th,
[data-theme="dark"] .table thead th {
  background: #111827 !important;
  color: var(--text-secondary) !important;
  border-bottom: 1.5px solid var(--border-color) !important;
}

[data-theme="dark"] table tbody td,
[data-theme="dark"] .table tbody td {
  border-bottom: 1px solid var(--border-color) !important;
  color: var(--text-main) !important;
}

[data-theme="dark"] table tbody tr:hover,
[data-theme="dark"] .table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

/* Form Controls & Modals */
[data-theme="dark"] .form-control,
[data-theme="dark"] .input-control,
[data-theme="dark"] select.form-control {
  background-color: var(--input-bg) !important;
  border-color: var(--input-border) !important;
  color: var(--input-text) !important;
}

[data-theme="dark"] .form-control::placeholder {
  color: var(--input-placeholder) !important;
}

[data-theme="dark"] .modal-content,
[data-theme="dark"] .dialog-card {
  background: var(--card-bg) !important;
  color: var(--text-main) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
  border-color: var(--border-color) !important;
}

/* 2.5 Modal Sub-Containers, Collapsible Forms & Controls in Dark Mode */
[data-theme="dark"] .btn-outline {
  background: rgba(30, 41, 59, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .btn-outline:hover {
  background: rgba(51, 65, 85, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
}

[data-theme="dark"] #container-school-form,
[data-theme="dark"] #container-school-year-form,
[data-theme="dark"] #create-rubric-ai-preview-box,
[data-theme="dark"] #edit-existing-rubrics-wrapper,
[data-theme="dark"] #edit-rubric-ai-preview-box,
[data-theme="dark"] .rubric-dropzone,
[data-theme="dark"] .upload-field-card,
[data-theme="dark"] .modal-content div[style*="background: #f8fafc"],
[data-theme="dark"] .modal-content div[style*="background: #fff"],
[data-theme="dark"] .modal-content div[style*="background: #fafafa"] {
  background: rgba(15, 23, 42, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .modal-content label,
[data-theme="dark"] .modal-content h4,
[data-theme="dark"] .modal-content strong {
  color: #f8fafc !important;
}

[data-theme="dark"] .school-table-container thead tr,
[data-theme="dark"] .data-table thead tr {
  background: rgba(15, 23, 42, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .data-table th,
[data-theme="dark"] .data-table td {
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
}

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

[data-theme="dark"] .data-table td .btn-outline {
  background: rgba(30, 41, 59, 0.7) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .data-table td .btn-outline:hover {
  background: rgba(51, 65, 85, 0.9) !important;
  color: #ffffff !important;
}

/* Status Badges */
.badge-active-year { display: inline-flex; align-items: center; gap: 0.25rem; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; border-radius: 999px; padding: 0.15rem 0.5rem; font-size: 0.72rem; }
.badge-archived-year { display: inline-flex; align-items: center; gap: 0.25rem; background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; border-radius: 999px; padding: 0.15rem 0.5rem; font-size: 0.72rem; }
[data-theme="dark"] .badge-active-year { background: rgba(5, 150, 105, 0.18) !important; color: #6ee7b7 !important; border-color: rgba(5, 150, 105, 0.35) !important; }
[data-theme="dark"] .badge-archived-year { background: rgba(51, 65, 85, 0.5) !important; color: #94a3b8 !important; border-color: rgba(255, 255, 255, 0.1) !important; }

[data-theme="dark"] input[type="checkbox"],
[data-theme="dark"] input[type="radio"] {
  accent-color: #3b82f6 !important;
}

/* --------------------------------------------------------------------------
   3. AUTH GATE THEMING (LIGHT VS DARK)
   -------------------------------------------------------------------------- */

.auth-gate-wrapper {
  position: relative;
  transition: background 0.25s ease, color 0.25s ease;
}

/* Light Mode Auth Gate */
[data-theme="light"] .auth-gate-wrapper {
  background: radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.08) 0%, transparent 45%),
              radial-gradient(circle at 85% 85%, rgba(124, 58, 237, 0.06) 0%, transparent 45%),
              #f8fafc !important;
  color: #0f172a !important;
}

[data-theme="light"] body.unauthenticated .app-cockpit-layout {
  background: #f8fafc !important;
}

[data-theme="light"] .auth-brand-badge {
  background: rgba(37, 99, 235, 0.08) !important;
  border: 1px solid rgba(37, 99, 235, 0.28) !important;
  color: #1d4ed8 !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08) !important;
}

[data-theme="light"] .auth-brand-badge .auth-brand-dot {
  background: #059669 !important;
  box-shadow: 0 0 6px rgba(5, 150, 105, 0.4) !important;
}

[data-theme="light"] .auth-gate-card {
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1.5px solid rgba(203, 213, 225, 0.8) !important;
  color: #0f172a !important;
  box-shadow: var(--glass-specular-highlight), 0 20px 45px -10px rgba(15, 23, 42, 0.1) !important;
}

[data-theme="light"] .auth-hero-title {
  color: #0f172a !important;
}

[data-theme="light"] .auth-hero-subtitle {
  color: #475569 !important;
}

[data-theme="light"] .auth-features-list .auth-feature-item {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .auth-features-list .auth-feature-text strong {
  color: #0f172a !important;
}

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

/* Dark Mode Auth Gate */
[data-theme="dark"] .auth-gate-wrapper {
  background: radial-gradient(circle at 20% 20%, rgba(79, 70, 229, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 80% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
              linear-gradient(135deg, #0b132b 0%, #131c38 60%, #0f172a 100%) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] body.unauthenticated .app-cockpit-layout {
  background: linear-gradient(135deg, #0b132b 0%, #1c2541 50%, #0f172a 100%) !important;
}

[data-theme="dark"] .auth-brand-badge {
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
  color: #93c5fd !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .auth-brand-badge .auth-brand-dot {
  background: #10b981 !important;
  box-shadow: 0 0 8px #10b981 !important;
}

[data-theme="dark"] .auth-gate-card {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .auth-hero-title,
[data-theme="dark"] .auth-card-header h2 {
  color: #ffffff !important;
}

[data-theme="dark"] .auth-hero-subtitle,
[data-theme="dark"] .auth-card-header p,
[data-theme="dark"] .auth-security-footnote {
  color: #94a3b8 !important;
}

[data-theme="dark"] .form-group-gate label,
[data-theme="dark"] .checkbox-gate-label {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .btn-toggle-pass-text {
  color: #60a5fa !important;
}

[data-theme="dark"] .auth-features-list .auth-feature-item {
  background: rgba(30, 41, 59, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .auth-features-list .auth-feature-text strong {
  color: #ffffff !important;
}

[data-theme="dark"] .input-gate {
  background: rgba(15, 23, 42, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .input-gate::placeholder {
  color: #64748b !important;
}

[data-theme="dark"] .input-gate-icon {
  color: #94a3b8 !important;
}

/* --------------------------------------------------------------------------
   4. THEME TOGGLE BUTTON COMPONENT
   -------------------------------------------------------------------------- */

.btn-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: var(--tactile-border-width) solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.btn-theme-toggle:active {
  transform: var(--tactile-active-press);
}

.theme-toggle-icon {
  display: inline-block;
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-theme-toggle:hover .theme-toggle-icon {
  transform: rotate(15deg) scale(1.1);
}

.auth-gate-header-bar,
.auth-gate-topbar-actions {
  width: 100%; max-width: 1200px; display: flex; justify-content: space-between; align-items: center; margin: 0 auto 1.25rem; z-index: 20;
}

.auth-theme-toggle {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
  color: var(--text-main) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* --------------------------------------------------------------------------
   5. TEACHER COCKPIT & DASHBOARD SPATIAL DARK THEMING
   -------------------------------------------------------------------------- */

/* 5.1 Cockpit Sidebar Context & Inputs */
[data-theme="dark"] .context-select-styled,
[data-theme="dark"] .class-dropdown-select {
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .context-select-styled:hover,
[data-theme="dark"] .class-dropdown-select:hover {
  border-color: rgba(96, 165, 250, 0.4) !important;
}

[data-theme="dark"] .context-select-styled:focus,
[data-theme="dark"] .class-dropdown-select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25) !important;
}

[data-theme="dark"] .sidebar-teacher-box {
  background: rgba(30, 41, 59, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .sidebar-teacher-select {
  color: #f8fafc !important;
  background: transparent !important;
}

[data-theme="dark"] .teacher-avatar-circle {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.3) 0%, rgba(79, 70, 229, 0.3) 100%) !important;
  border-color: rgba(96, 165, 250, 0.4) !important;
  color: #93c5fd !important;
}

[data-theme="dark"] .btn-sidebar-add {
  background: rgba(37, 99, 235, 0.15) !important;
  border: 1px solid rgba(96, 165, 250, 0.3) !important;
  color: #93c5fd !important;
}

[data-theme="dark"] .btn-sidebar-add:hover {
  background: rgba(37, 99, 235, 0.28) !important;
  border-color: rgba(96, 165, 250, 0.5) !important;
  color: #bfdbfe !important;
}

[data-theme="dark"] .btn-sidebar-class-tool {
  background: rgba(30, 41, 59, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .btn-sidebar-class-tool:hover {
  background: rgba(51, 65, 85, 0.8) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .btn-sidebar-class-tool.text-danger {
  background: rgba(225, 29, 72, 0.15) !important;
  border-color: rgba(244, 63, 94, 0.3) !important;
  color: #fb7185 !important;
}

/* 5.2 Subject Pills & Navigation Items */
[data-theme="dark"] .subject-pill {
  background: transparent !important;
  color: #94a3b8 !important;
  border-color: transparent !important;
}

[data-theme="dark"] .subject-pill:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .subject-pill.active {
  background: rgba(37, 99, 235, 0.18) !important;
  border-color: rgba(96, 165, 250, 0.35) !important;
  color: #93c5fd !important;
}

[data-theme="dark"] .subject-pill .pill-badge {
  background: rgba(15, 23, 42, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .subject-pill.active .pill-badge {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(96, 165, 250, 0.4) !important;
  color: #bfdbfe !important;
}

[data-theme="dark"] .nav-item-card {
  color: #cbd5e1 !important;
  background: transparent !important;
  border-color: transparent !important;
}

[data-theme="dark"] .nav-item-card:hover,
[data-theme="dark"] .nav-subitem-card:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .nav-item-card.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(79, 70, 229, 0.28)) !important;
  border: 1px solid rgba(96, 165, 250, 0.45) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2) !important;
}

[data-theme="dark"] .nav-subitem-card {
  color: #94a3b8 !important;
  background: transparent !important;
}

[data-theme="dark"] .nav-subitem-card.active {
  background: rgba(37, 99, 235, 0.16) !important;
  color: #93c5fd !important;
}

[data-theme="dark"] .command-hint-badge {
  background: rgba(15, 23, 42, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .command-hint-badge:hover {
  background: rgba(30, 41, 59, 0.8) !important;
  border-color: rgba(96, 165, 250, 0.3) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .kbd-chip {
  background: rgba(30, 41, 59, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #cbd5e1 !important;
}

/* 5.3 Topbar, Breadcrumb & Floating Dropdowns */
[data-theme="dark"] .breadcrumb-active {
  color: #93c5fd !important;
  background: rgba(37, 99, 235, 0.2) !important;
  border: 1px solid rgba(96, 165, 250, 0.4) !important;
}

[data-theme="dark"] .spotlight-trigger-box {
  background: rgba(17, 24, 39, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .spotlight-trigger-box:hover {
  background: rgba(30, 41, 59, 0.85) !important;
  border-color: rgba(96, 165, 250, 0.4) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .topbar-utilities-dropdown-menu,
[data-theme="dark"] .user-profile-dropdown {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="dark"] .topbar-util-item,
[data-theme="dark"] .dropdown-item {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .topbar-util-item:hover,
[data-theme="dark"] .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .btn-quota-pill {
  background: rgba(16, 185, 129, 0.15) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: #6ee7b7 !important;
}

/* 5.4 Dashboard Alerts & Warning Banners */
[data-theme="dark"] .archived-year-alert {
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fde68a !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .archived-alert-content strong {
  color: #fbbf24 !important;
}

/* 5.5 Exam Hub Management & Filter Ribbon */
[data-theme="dark"] .exam-hub-card {
  background: var(--card-bg) !important;
  border-color: var(--linear-border) !important;
}

[data-theme="dark"] .exam-hub-badge {
  background: rgba(99, 102, 241, 0.18) !important;
  border: 1px solid rgba(129, 140, 248, 0.35) !important;
  color: #c7d2fe !important;
}

[data-theme="dark"] .exam-hub-search-box {
  background: rgba(17, 24, 39, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .exam-hub-search-box:focus-within {
  background: rgba(15, 23, 42, 0.95) !important;
  border-color: rgba(96, 165, 250, 0.6) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2) !important;
}

[data-theme="dark"] .exam-hub-view-modes {
  background: rgba(15, 23, 42, 0.7) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .btn-hub-view {
  color: #94a3b8 !important;
  background: transparent !important;
}

[data-theme="dark"] .btn-hub-view:hover {
  color: #ffffff !important;
}

[data-theme="dark"] .btn-hub-view.active {
  background: rgba(37, 99, 235, 0.25) !important;
  border: 1px solid rgba(96, 165, 250, 0.4) !important;
  color: #93c5fd !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .hub-filter-pill {
  background: rgba(30, 41, 59, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .hub-filter-pill:hover {
  background: rgba(51, 65, 85, 0.7) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .hub-filter-pill.active {
  background: #2563eb !important; border-color: #60a5fa !important; color: #ffffff !important; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4) !important;
}
[data-theme="dark"] .exam-hub-card-item {
  background: rgba(21, 30, 50, 0.9) !important; border-color: rgba(255, 255, 255, 0.08) !important; color: #f8fafc !important;
}
[data-theme="dark"] .exam-hub-card-item:hover {
  background: rgba(26, 37, 60, 0.95) !important; border-color: rgba(96, 165, 250, 0.4) !important;
}
[data-theme="dark"] .exam-hub-empty { color: #94a3b8 !important; }

/* 5.6 Mobile Action Sheet Drawer (320px - 768px Responsive) */
[data-theme="dark"] .btn-mobile-more-actions {
  background: rgba(30, 41, 59, 0.8) !important; border-color: rgba(255, 255, 255, 0.12) !important; color: #f8fafc !important;
}
[data-theme="dark"] .mobile-action-sheet-card {
  background: rgba(15, 23, 42, 0.95) !important; border-top: 1px solid rgba(255, 255, 255, 0.12) !important; color: #f8fafc !important;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
[data-theme="dark"] .mobile-action-sheet-title { color: #ffffff !important; }
[data-theme="dark"] .mobile-action-sheet-item {
  background: rgba(30, 41, 59, 0.6) !important; border: 1px solid rgba(255, 255, 255, 0.08) !important; color: #f8fafc !important;
}
