/* Shared application theming. Dark mode inherits the established UI; light mode
   remaps semantic surfaces with high-contrast, crisp typography and completely clean, light surfaces. */
:root {
  color-scheme: dark;
  --surface-raised: #22223a;
  --surface-subtle: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.065);
  --surface-overlay: rgba(8, 8, 18, 0.78);
  --border-strong: #3b3b5c;
  --focus-ring: rgba(168, 85, 247, 0.42);
  --text-on-accent: #ffffff;
  --shadow-soft: 0 8px 28px rgba(0, 0, 0, 0.24);
  --shadow-raised: 0 22px 64px rgba(0, 0, 0, 0.52);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-sidebar: #f8fafc;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --bg-active: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #475569;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-dim: rgba(37, 99, 235, 0.08);
  --accent-soft: #eff6ff;
  --accent-border: #93c5fd;
  --accent-ink: #1d4ed8;
  --border: #cbd5e1;
  --shadow: rgba(15, 23, 42, 0.08);
  --surface-raised: #ffffff;
  --surface-subtle: #f8fafc;
  --surface-hover: #f1f5f9;
  --surface-overlay: rgba(15, 23, 42, 0.6);
  --border-strong: #94a3b8;
  --focus-ring: rgba(37, 99, 235, 0.35);
  --text-on-accent: #ffffff;
  --shadow-soft: 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-raised: 0 16px 48px rgba(15, 23, 42, 0.14);
}

/* ==========================================================================
   UNIVERSAL CLEAN SLIM SCROLLBARS (DARK & LIGHT THEMES)
   ========================================================================== */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

*::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

/* Daybreak Light Mode: Clean Slate Scrollbars (Firefox & WebKit) */
html[data-theme="light"],
html[data-theme="light"] body,
html[data-theme="light"] * {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent !important;
}

html[data-theme="light"] *::-webkit-scrollbar,
html[data-theme="light"]::-webkit-scrollbar,
html[data-theme="light"] body::-webkit-scrollbar,
html[data-theme="light"] #sidebar::-webkit-scrollbar,
html[data-theme="light"] #main::-webkit-scrollbar,
html[data-theme="light"] #lecture-view::-webkit-scrollbar,
html[data-theme="light"] .modal-body::-webkit-scrollbar,
html[data-theme="light"] .curriculum-modal-body::-webkit-scrollbar,
html[data-theme="light"] .copilot-messages::-webkit-scrollbar,
html[data-theme="light"] #transcription-list::-webkit-scrollbar,
html[data-theme="light"] #quiz-history-list::-webkit-scrollbar,
html[data-theme="light"] .table-container::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}

html[data-theme="light"] *::-webkit-scrollbar-track,
html[data-theme="light"]::-webkit-scrollbar-track,
html[data-theme="light"] body::-webkit-scrollbar-track,
html[data-theme="light"] #sidebar::-webkit-scrollbar-track,
html[data-theme="light"] #main::-webkit-scrollbar-track,
html[data-theme="light"] #lecture-view::-webkit-scrollbar-track,
html[data-theme="light"] .modal-body::-webkit-scrollbar-track,
html[data-theme="light"] .curriculum-modal-body::-webkit-scrollbar-track,
html[data-theme="light"] .copilot-messages::-webkit-scrollbar-track,
html[data-theme="light"] #transcription-list::-webkit-scrollbar-track,
html[data-theme="light"] #quiz-history-list::-webkit-scrollbar-track,
html[data-theme="light"] .table-container::-webkit-scrollbar-track {
  background: transparent !important;
}

html[data-theme="light"] *::-webkit-scrollbar-thumb,
html[data-theme="light"]::-webkit-scrollbar-thumb,
html[data-theme="light"] body::-webkit-scrollbar-thumb,
html[data-theme="light"] #sidebar::-webkit-scrollbar-thumb,
html[data-theme="light"] #main::-webkit-scrollbar-thumb,
html[data-theme="light"] #lecture-view::-webkit-scrollbar-thumb,
html[data-theme="light"] .modal-body::-webkit-scrollbar-thumb,
html[data-theme="light"] .curriculum-modal-body::-webkit-scrollbar-thumb,
html[data-theme="light"] .copilot-messages::-webkit-scrollbar-thumb,
html[data-theme="light"] #transcription-list::-webkit-scrollbar-thumb,
html[data-theme="light"] #quiz-history-list::-webkit-scrollbar-thumb,
html[data-theme="light"] .table-container::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
  border-radius: 999px !important;
  border: 1px solid transparent !important;
}

html[data-theme="light"] *::-webkit-scrollbar-thumb:hover,
html[data-theme="light"]::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] body::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] #sidebar::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] #main::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] #lecture-view::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] .modal-body::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] .curriculum-modal-body::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] .copilot-messages::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] #transcription-list::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] #quiz-history-list::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] .table-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}

html[data-theme="light"] *::-webkit-scrollbar-button,
html[data-theme="light"]::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

html[data-theme="light"] *::-webkit-scrollbar-corner,
html[data-theme="light"]::-webkit-scrollbar-corner {
  background: transparent !important;
}

html,
body,
button,
input,
select,
textarea,
a,
header,
aside,
main,
.modal-card,
.feature-card,
.stat-card,
.controls-bar,
.table-container {
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

/* Daybreak Lab: clean, crisp, light workspace */
html[data-theme="light"] body {
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(circle at 12% -8%, rgba(37, 99, 235, 0.05), transparent 29rem),
    radial-gradient(circle at 88% 4%, rgba(14, 165, 233, 0.04), transparent 25rem);
  color: var(--text-primary);
}

html[data-theme="light"] #app,
html[data-theme="light"] #layout,
html[data-theme="light"] #main,
html[data-theme="light"] #lecture-view,
html[data-theme="light"] #welcome-view {
  background-color: transparent;
}

html[data-theme="light"] #main {
  background: #f8fafc;
}

html[data-theme="light"] #header,
html[data-theme="light"] #sidebar,
html[data-theme="light"] #copilot-sidebar {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}

html[data-theme="light"] #header {
  backdrop-filter: blur(18px) saturate(1.1);
  border-bottom: 1px solid var(--border);
}

/* ==========================================================================
   UNIVERSAL THEME TOGGLE & HEADER ICONS
   ========================================================================== */
.header-icon-btn,
.theme-toggle,
#features-link,
#transcription-toggle,
#copilot-toggle-btn {
  background: transparent !important;
  border: none !important;
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  color: var(--text-secondary) !important;
  box-shadow: none !important;
  position: relative !important;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease !important;
  text-decoration: none !important;
}

.header-icon-btn:hover,
.theme-toggle:hover,
#features-link:hover,
#transcription-toggle:hover,
#copilot-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-primary) !important;
  transform: scale(1.05) !important;
}

html[data-theme="light"] .header-icon-btn:hover,
html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] #features-link:hover,
html[data-theme="light"] #transcription-toggle:hover,
html[data-theme="light"] #copilot-toggle-btn:hover {
  background: rgba(15, 23, 42, 0.06) !important;
  color: var(--text-primary) !important;
}

/* Header Quiz Section Button with Text */
.header-quiz-btn,
#quiz-toggle {
  background: rgba(168, 85, 247, 0.12) !important;
  border: 1px solid rgba(168, 85, 247, 0.3) !important;
  border-radius: 999px !important;
  padding: 5px 12px !important;
  height: 34px !important;
  min-height: 34px !important;
  width: auto !important;
  min-width: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  color: #c084fc !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.header-quiz-btn:hover,
#quiz-toggle:hover {
  background: rgba(168, 85, 247, 0.22) !important;
  border-color: #a855f7 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.25) !important;
}

html[data-theme="light"] .header-quiz-btn,
html[data-theme="light"] #quiz-toggle {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1d4ed8 !important;
  box-shadow: none !important;
}

html[data-theme="light"] .header-quiz-btn:hover,
html[data-theme="light"] #quiz-toggle:hover {
  background: #dbeafe !important;
  border-color: #93c5fd !important;
  color: #1e40af !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15) !important;
}

.theme-toggle__track,
.theme-toggle__label,
[data-theme-label] {
  display: none !important;
}

.theme-icon,
.theme-toggle__icon {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
}

/* Dark mode (default): show sun icon to switch to light */
.theme-icon--sun,
.theme-toggle__icon--sun {
  display: block !important;
}

.theme-icon--moon,
.theme-toggle__icon--moon {
  display: none !important;
}

/* Light mode: show moon icon to switch to dark */
html[data-theme="light"] .theme-icon--sun,
html[data-theme="light"] .theme-toggle__icon--sun {
  display: none !important;
}

html[data-theme="light"] .theme-icon--moon,
html[data-theme="light"] .theme-toggle__icon--moon {
  display: block !important;
}

.page-theme-action {
  position: absolute;
  top: 16px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
}

.back-link {
  color: var(--text-secondary) !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  border: 1px solid var(--border) !important;
  background: transparent !important;
  transition: all 0.15s ease !important;
}

.back-link:hover {
  color: var(--text-primary) !important;
  background: var(--bg-hover) !important;
  border-color: var(--border-strong) !important;
}

html[data-theme="light"] .back-link {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

html[data-theme="light"] .back-link:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

html[data-theme="light"] #copilot-toggle-btn.active {
  color: var(--accent-ink) !important;
  background: var(--accent-soft) !important;
}

html[data-theme="light"] #progress-indicator {
  background: #f1f5f9;
  color: #475569;
}

/* User Avatar & Material Menu Dropdown in Light Mode */
html[data-theme="light"] .user-avatar-role-dot {
  border-color: #ffffff;
}

html[data-theme="light"] .user-mat-menu {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.12);
}

html[data-theme="light"] .mat-menu-divider {
  background: #e2e8f0;
}

html[data-theme="light"] .mat-menu-item {
  color: var(--text-secondary);
}

html[data-theme="light"] .mat-menu-item svg {
  color: var(--text-muted);
}

html[data-theme="light"] .mat-menu-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-theme="light"] .mat-menu-item:hover svg {
  color: #0f172a;
}

html[data-theme="light"] .mat-menu-item.mat-menu-logout {
  color: #dc2626;
}

html[data-theme="light"] .mat-menu-item.mat-menu-logout svg {
  color: #dc2626;
}

html[data-theme="light"] .mat-menu-item.mat-menu-logout:hover {
  background: #fef2f2;
  color: #b91c1c;
}

/* ==========================================================================
   MODAL HEADINGS & HIGH CONTRAST IN LIGHT MODE
   ========================================================================== */
html[data-theme="light"] #quiz-modal-title,
html[data-theme="light"] #admin-modal-title,
html[data-theme="light"] #auth-modal-title,
html[data-theme="light"] #llm-flow-modal-title,
html[data-theme="light"] .quiz-modal-title,
html[data-theme="light"] .admin-modal-title,
html[data-theme="light"] .quiz-modal-heading h2,
html[data-theme="light"] .admin-modal-heading h2,
html[data-theme="light"] .modal-header h2,
html[data-theme="light"] .modal-header h3,
html[data-theme="light"] .modal-card h2,
html[data-theme="light"] .modal-card h3 {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #0f172a !important;
  color: #0f172a !important;
  font-weight: 750 !important;
}

html[data-theme="light"] #quiz-modal-close,
html[data-theme="light"] #admin-modal-close,
html[data-theme="light"] #auth-modal-close,
html[data-theme="light"] #llm-flow-modal-close-btn,
html[data-theme="light"] .modal-close {
  color: #475569 !important;
}

html[data-theme="light"] #quiz-modal-close:hover,
html[data-theme="light"] #admin-modal-close:hover,
html[data-theme="light"] #auth-modal-close:hover,
html[data-theme="light"] #llm-flow-modal-close-btn:hover,
html[data-theme="light"] .modal-close:hover {
  color: #dc2626 !important;
}

html[data-theme="light"] .modal-overlay,
html[data-theme="light"] .quiz-overlay,
html[data-theme="light"] .auth-modal-overlay,
html[data-theme="light"] #llm-flow-modal,
html[data-theme="light"] .course-visual-lightbox {
  background: var(--surface-overlay);
  backdrop-filter: blur(8px);
}

html[data-theme="light"] .modal-card,
html[data-theme="light"] .quiz-modal,
html[data-theme="light"] .auth-modal,
html[data-theme="light"] .admin-modal,
html[data-theme="light"] .llm-flow-modal-card,
html[data-theme="light"] .curr-modal,
html[data-theme="light"] #quiz-modal-content,
html[data-theme="light"] #auth-modal-content,
html[data-theme="light"] #admin-modal-content {
  background: #ffffff !important;
  color: var(--text-primary);
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-raised) !important;
}

html[data-theme="light"] .modal-header,
html[data-theme="light"] .modal-footer,
html[data-theme="light"] #quiz-modal-header,
html[data-theme="light"] #auth-modal-header,
html[data-theme="light"] #admin-modal-header,
html[data-theme="light"] .admin-tabs,
html[data-theme="light"] .quiz-modal-header,
html[data-theme="light"] .llm-flow-modal-header,
html[data-theme="light"] .llm-flow-modal-footer {
  background: #f8fafc !important;
  border-bottom: 1px solid var(--border) !important;
}

/* ==========================================================================
   QUIZ MODAL LIGHT MODE OVERHAUL & PAST ATTEMPTS HEADING FIX
   ========================================================================== */
html[data-theme="light"] .quiz-modal-eyebrow,
html[data-theme="light"] .quiz-menu-kicker,
html[data-theme="light"] .quiz-menu-intro p {
  color: #475569 !important;
  font-weight: 700 !important;
}

/* High contrast past quiz attempts heading in light mode */
html[data-theme="light"] .quiz-history-heading h4 {
  color: #0f172a !important;
  font-weight: 750 !important;
  font-size: 15px !important;
}

html[data-theme="light"] .quiz-history-heading span {
  color: #475569 !important;
  font-weight: 800 !important;
  font-size: 10px !important;
  letter-spacing: 0.12em !important;
}

html[data-theme="light"] .quiz-history-heading small,
html[data-theme="light"] .quiz-history-heading > small {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

html[data-theme="light"] .quiz-history-heading {
  border-bottom: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .quiz-format-count {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  font-weight: 600 !important;
}

html[data-theme="light"] .quiz-mode-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
}

html[data-theme="light"] .quiz-mode-card:hover {
  border-color: #93c5fd !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12) !important;
}

html[data-theme="light"] .quiz-mode-card[data-tone="lecture"] {
  --mode-accent: #1d4ed8;
}

html[data-theme="light"] .quiz-mode-card[data-tone="week"] {
  --mode-accent: #7c3aed;
}

html[data-theme="light"] .quiz-mode-card[data-tone="course"] {
  --mode-accent: #b45309;
}

html[data-theme="light"] .quiz-mode-card[data-tone="lecture"] .quiz-mode-icon {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1d4ed8 !important;
}

html[data-theme="light"] .quiz-mode-card[data-tone="week"] .quiz-mode-icon {
  background: #f5f3ff !important;
  border: 1px solid #ddd6fe !important;
  color: #7c3aed !important;
}

html[data-theme="light"] .quiz-mode-card[data-tone="course"] .quiz-mode-icon {
  background: #fef3c7 !important;
  border: 1px solid #fde68a !important;
  color: #b45309 !important;
}

html[data-theme="light"] .quiz-mode-kicker {
  font-weight: 750 !important;
}

html[data-theme="light"] .quiz-mode-copy strong {
  color: #0f172a !important;
  font-weight: 750 !important;
}

html[data-theme="light"] .quiz-mode-copy small,
html[data-theme="light"] .quiz-mode-copy p {
  color: #334155 !important;
}

html[data-theme="light"] .quiz-mode-count {
  color: #475569 !important;
  font-weight: 600 !important;
}

html[data-theme="light"] .quiz-mode-arrow {
  color: #64748b !important;
}

html[data-theme="light"] .quiz-mode-card:hover .quiz-mode-arrow {
  color: #1d4ed8 !important;
}

html[data-theme="light"] .quiz-history-item {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
}

html[data-theme="light"] .quiz-history-item:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07) !important;
}

html[data-theme="light"] .history-item-title,
html[data-theme="light"] .quiz-history-title {
  color: #0f172a !important;
  font-weight: 700 !important;
}

html[data-theme="light"] .history-item-meta,
html[data-theme="light"] .quiz-history-meta {
  color: #475569 !important;
  font-weight: 500 !important;
}

html[data-theme="light"] .history-item-score.pass,
html[data-theme="light"] .quiz-history-score.pass {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
  font-weight: 750 !important;
}

html[data-theme="light"] .history-item-score.fail,
html[data-theme="light"] .quiz-history-score.fail {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
  font-weight: 750 !important;
}

/* ==========================================================================
   ADMIN DASHBOARD MODAL LIGHT MODE OVERHAUL
   ========================================================================== */
html[data-theme="light"] .admin-tabs {
  background: #f8fafc !important;
  border-bottom: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .admin-tab {
  color: #475569 !important;
  font-weight: 600 !important;
  border-bottom: 2px solid transparent !important;
}

html[data-theme="light"] .admin-tab:hover {
  color: #0f172a !important;
}

html[data-theme="light"] .admin-tab.active {
  color: #1d4ed8 !important;
  border-bottom: 2px solid #2563eb !important;
  font-weight: 750 !important;
}

html[data-theme="light"] .admin-users-table th,
html[data-theme="light"] .admin-table th {
  background: #f8fafc !important;
  color: #334155 !important;
  font-weight: 750 !important;
  border-bottom: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .admin-users-table td,
html[data-theme="light"] .admin-table td {
  color: #0f172a !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .admin-users-table tbody tr:hover,
html[data-theme="light"] .admin-table tbody tr:hover {
  background: #f1f5f9 !important;
}

html[data-theme="light"] .admin-email-cell {
  color: #0f172a !important;
  font-weight: 600 !important;
}

html[data-theme="light"] .status-badge.approved,
html[data-theme="light"] .admin-status-badge.approved {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
  font-weight: 750 !important;
}

html[data-theme="light"] .status-badge.pending,
html[data-theme="light"] .admin-status-badge.pending {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
  font-weight: 750 !important;
}

html[data-theme="light"] .status-badge.rejected,
html[data-theme="light"] .admin-status-badge.rejected {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
  font-weight: 750 !important;
}

/* ==========================================================================
   CURRICULUM SCOPE PLANNER MODAL
   ========================================================================== */
html[data-theme="light"] .curriculum-modal-dialog {
  --curr-ink: #ffffff;
  --curr-panel: #f8fafc;
  --curr-amber: #b45309;
  --curr-emerald: #047857;
  --curr-lavender: #475569;
  --curr-mist: #0f172a;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.16) !important;
}

html[data-theme="light"] .curriculum-modal-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #cbd5e1 !important;
  padding: 16px 24px !important;
}

html[data-theme="light"] .curriculum-brand-icon {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1d4ed8 !important;
  border-radius: 10px !important;
}

html[data-theme="light"] .curriculum-header-title h3,
html[data-theme="light"] #curriculum-modal-title {
  color: #0f172a !important;
  font-size: 18px !important;
  font-weight: 750 !important;
}

html[data-theme="light"] .curriculum-header-title p,
html[data-theme="light"] #curriculum-modal-description {
  color: #475569 !important;
  font-size: 12.5px !important;
}

html[data-theme="light"] #curriculum-modal-close {
  color: #475569 !important;
  font-size: 26px !important;
  transition: color 0.15s ease !important;
}

html[data-theme="light"] #curriculum-modal-close:hover {
  color: #dc2626 !important;
}

html[data-theme="light"] .curriculum-modal-summary {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 10px 22px !important;
  gap: 12px !important;
}

html[data-theme="light"] .curr-summary-group {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 6px !important;
}

html[data-theme="light"] .curr-summary-heading {
  color: #475569 !important;
  font-size: 10px !important;
  font-weight: 750 !important;
}

html[data-theme="light"] .curr-stat-card {
  border-left: 1px solid #e2e8f0 !important;
  padding: 4px 8px !important;
}

html[data-theme="light"] .curr-stat-num {
  color: #0f172a !important;
  font-weight: 750 !important;
  font-size: 16px !important;
}

html[data-theme="light"] .curr-stat-card.highlight .curr-stat-num {
  color: #1d4ed8 !important;
}

html[data-theme="light"] .curr-stat-label {
  color: #64748b !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
}

html[data-theme="light"] .curriculum-modal-controls {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 10px 22px !important;
}

html[data-theme="light"] .curr-filter-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}

html[data-theme="light"] .curr-filter-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

html[data-theme="light"] .curr-filter-btn.active {
  background: #1d4ed8 !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  font-weight: 700 !important;
}

html[data-theme="light"] .curr-preset-btn {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1d4ed8 !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}

html[data-theme="light"] .curr-preset-btn:hover {
  background: #dbeafe !important;
  border-color: #93c5fd !important;
  color: #1e40af !important;
}

html[data-theme="light"] .curr-results-count {
  color: #64748b !important;
  font-weight: 600 !important;
}

html[data-theme="light"] .curriculum-search-box input {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  border-radius: 8px !important;
}

html[data-theme="light"] .curriculum-search-box input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
}

html[data-theme="light"] .curriculum-search-box svg {
  color: #64748b !important;
}

html[data-theme="light"] .curriculum-table th {
  background: #f8fafc !important;
  border-bottom: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  font-weight: 750 !important;
  font-size: 11px !important;
}

html[data-theme="light"] .curriculum-table th:first-child,
html[data-theme="light"] .curriculum-table td:first-child {
  background: #ffffff !important;
}

html[data-theme="light"] .curriculum-table th.curr-col-actions button {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

html[data-theme="light"] .curr-week-divider td {
  background: #f1f5f9 !important;
  border-top: 1px solid #cbd5e1 !important;
  border-bottom: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 750 !important;
}

html[data-theme="light"] .curr-week-bulk,
html[data-theme="light"] .curr-column-toggle {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
  font-weight: 600 !important;
}

html[data-theme="light"] .curr-week-bulk:hover,
html[data-theme="light"] .curr-column-toggle:hover {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

html[data-theme="light"] .curr-row td {
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

html[data-theme="light"] .curr-row:hover td,
html[data-theme="light"] .curr-row:hover td:first-child {
  background: #f8fafc !important;
}

html[data-theme="light"] .curr-lecture-id {
  background: #fef3c7 !important;
  border: 1px solid #fcd34d !important;
  color: #92400e !important;
  font-weight: 750 !important;
  border-radius: 5px !important;
}

html[data-theme="light"] .curr-lecture-title {
  color: #0f172a !important;
  font-weight: 600 !important;
}

html[data-theme="light"] .curr-topic-tag {
  color: #64748b !important;
}

html[data-theme="light"] .curr-check,
html[data-theme="light"] input[type="checkbox"] {
  accent-color: #2563eb !important;
}

html[data-theme="light"] .curriculum-modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid #cbd5e1 !important;
  padding: 12px 22px !important;
}

html[data-theme="light"] .curr-status-text {
  color: #475569 !important;
  font-weight: 600 !important;
}

html[data-theme="light"] .curr-footer-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  padding: 7px 16px !important;
}

html[data-theme="light"] .curr-footer-btn:hover:not(:disabled) {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

html[data-theme="light"] .curr-footer-btn.primary {
  background: #047857 !important;
  color: #ffffff !important;
  border-color: #047857 !important;
  font-weight: 700 !important;
}

html[data-theme="light"] .curr-footer-btn.primary:hover:not(:disabled) {
  background: #065f46 !important;
}

/* ==========================================================================
   AI MODEL ROUTING DESIGNER IN LIGHT MODE
   ========================================================================== */
html[data-theme="light"] #llm-flow-modal {
  background: var(--surface-overlay) !important;
}

html[data-theme="light"] .llm-flow-modal-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 16px !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18) !important;
}

html[data-theme="light"] .llm-flow-modal-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #cbd5e1 !important;
  padding: 16px 22px !important;
}

html[data-theme="light"] .llm-flow-modal-mark {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1d4ed8 !important;
  border-radius: 10px !important;
}

html[data-theme="light"] .llm-flow-modal-heading h3,
html[data-theme="light"] #llm-flow-modal-title {
  color: #0f172a !important;
  font-weight: 750 !important;
  font-size: 17px !important;
}

html[data-theme="light"] .llm-flow-modal-heading p {
  color: #475569 !important;
  font-size: 12px !important;
}

html[data-theme="light"] .llm-flow-close-btn,
html[data-theme="light"] #llm-flow-modal-close-btn {
  color: #475569 !important;
  background: transparent !important;
  border: none !important;
}

html[data-theme="light"] .llm-flow-close-btn:hover,
html[data-theme="light"] #llm-flow-modal-close-btn:hover {
  color: #dc2626 !important;
  background: #fee2e2 !important;
}

html[data-theme="light"] .llm-flow-modal-body {
  background: #f8fafc !important;
  padding: 18px 22px !important;
}

html[data-theme="light"] .llm-flow-card,
html[data-theme="light"] .llm-flow-card:hover {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

html[data-theme="light"] .llm-flow-icon {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .llm-flow-eyebrow {
  color: #1d4ed8 !important;
  font-weight: 800 !important;
}

html[data-theme="light"] .llm-flow-card:nth-child(2) .llm-flow-eyebrow {
  color: #7c3aed !important;
}

html[data-theme="light"] .llm-flow-title h4 {
  color: #0f172a !important;
  font-weight: 750 !important;
}

html[data-theme="light"] .llm-flow-title p {
  color: #64748b !important;
}

html[data-theme="light"] .llm-flow-badge {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1d4ed8 !important;
}

html[data-theme="light"] .llm-flow-badge span {
  color: #2563eb !important;
}

html[data-theme="light"] .drag-flow-item {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
}

html[data-theme="light"] .drag-flow-item:hover {
  background: #ffffff !important;
  border-color: #93c5fd !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08) !important;
}

html[data-theme="light"] .drag-handle {
  color: #94a3b8 !important;
  background: transparent !important;
}

html[data-theme="light"] .drag-handle:hover,
html[data-theme="light"] .drag-flow-item:hover .drag-handle {
  color: #1d4ed8 !important;
}

html[data-theme="light"] .flow-step-badge {
  min-width: 28px !important;
  height: 24px !important;
  padding: 0 6px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  display: grid !important;
  place-items: center !important;
}

html[data-theme="light"] .flow-step-badge.step-0 {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #047857 !important;
}

html[data-theme="light"] .flow-step-badge.step-1 {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1d4ed8 !important;
}

html[data-theme="light"] .flow-step-badge.step-2 {
  background: #f5f3ff !important;
  border: 1px solid #ddd6fe !important;
  color: #7c3aed !important;
}

html[data-theme="light"] .flow-step-badge.step-3 {
  background: #fef3c7 !important;
  border: 1px solid #fde68a !important;
  color: #b45309 !important;
}

html[data-theme="light"] .provider-gemini {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1d4ed8 !important;
}

html[data-theme="light"] .provider-openai {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #047857 !important;
}

html[data-theme="light"] .provider-groq {
  background: #fef3c7 !important;
  border: 1px solid #fde68a !important;
  color: #92400e !important;
}

html[data-theme="light"] .provider-ollama {
  background: #f5f3ff !important;
  border: 1px solid #ddd6fe !important;
  color: #7c3aed !important;
}

html[data-theme="light"] .provider-name {
  color: #0f172a !important;
  font-weight: 650 !important;
}

html[data-theme="light"] .provider-desc {
  color: #64748b !important;
}

html[data-theme="light"] .reorder-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

html[data-theme="light"] .reorder-btn:hover:not(:disabled) {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
}

html[data-theme="light"] .reorder-btn:disabled {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #cbd5e1 !important;
  opacity: 0.5 !important;
}

html[data-theme="light"] .llm-flow-modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid #cbd5e1 !important;
  padding: 12px 22px !important;
}

html[data-theme="light"] .llm-flow-footer-hint {
  color: #64748b !important;
}

html[data-theme="light"] .llm-flow-footer-hint > span {
  color: #1d4ed8 !important;
}

html[data-theme="light"] .llm-flow-cancel-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

html[data-theme="light"] .llm-flow-cancel-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

html[data-theme="light"] .llm-flow-save-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  border: 1px solid #1d4ed8 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.22) !important;
}

html[data-theme="light"] .llm-flow-save-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28) !important;
}

/* ==========================================================================
   SIDEBAR & GENERAL COMPONENTS
   ========================================================================== */
html[data-theme="light"] .sidebar-filter-bar {
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
}

html[data-theme="light"] .sidebar-filter-pill {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
}

html[data-theme="light"] .sidebar-filter-pill:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

html[data-theme="light"] .sidebar-filter-pill.active {
  background: #fef3c7;
  color: #92400e;
  border-color: #f59e0b;
  font-weight: 700;
}

html[data-theme="light"] .focus-badge,
html[data-theme="light"] .week-focus-pill {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  font-weight: 700;
}

html[data-theme="light"] .focus-star-icon {
  color: #d97706;
  filter: drop-shadow(0 1px 2px rgba(180, 83, 9, 0.25));
}

html[data-theme="light"] .sidebar-footer {
  background: #f8fafc;
  border-top: 1px solid var(--border);
}

html[data-theme="light"] .sidebar-footer-copy strong { color: var(--text-primary); }
html[data-theme="light"] .sidebar-footer-copy small { color: var(--text-muted); }

html[data-theme="light"] .lecture-tooltip {
  color: #f8fafc;
  background: #0f172a;
  border-color: #334155;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.24);
}

html[data-theme="light"] .header-title-group h1,
html[data-theme="light"] .features-page header h1,
html[data-theme="light"] .course-title,
html[data-theme="light"] #dashboard-heading {
  background: linear-gradient(125deg, #0f172a 8%, #2563eb 82%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .badge {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: var(--accent-ink) !important;
  font-weight: 700 !important;
}

html[data-theme="light"] .glow-1 { background: rgba(37, 99, 235, 0.07); }
html[data-theme="light"] .glow-2 { background: rgba(14, 165, 233, 0.055); }

html[data-theme="light"] .feature-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .controls-bar,
html[data-theme="light"] .table-container,
html[data-theme="light"] .pagination-bar,
html[data-theme="light"] .diagram-section,
html[data-theme="light"] .flow-step,
html[data-theme="light"] .interactive-description,
html[data-theme="light"] .interactive-card,
html[data-theme="light"] .concept-card,
html[data-theme="light"] .course-visual-card,
html[data-theme="light"] .course-concept-group,
html[data-theme="light"] .quiz-question,
html[data-theme="light"] .review-item,
html[data-theme="light"] .info-facts,
html[data-theme="light"] .flow-branch-card {
  background-color: var(--bg-card);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .feature-card:hover,
html[data-theme="light"] .stat-card:hover {
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
}

/* Interactive lecture description */
html[data-theme="light"] .idesc-container {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  backdrop-filter: none;
}

html[data-theme="light"] .idesc-tabs {
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

html[data-theme="light"] .idesc-tab {
  color: var(--text-muted);
  font-weight: 600;
}

html[data-theme="light"] .idesc-tab:hover {
  color: var(--text-primary);
  background: #f1f5f9;
}

html[data-theme="light"] .idesc-tab.active {
  color: var(--accent-ink);
  border-bottom-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 700;
}

html[data-theme="light"] .idesc-tab-count {
  color: var(--accent-ink);
  background: #dbeafe;
  font-weight: 700;
}

html[data-theme="light"] .idesc-panel,
html[data-theme="light"] .idesc-overview-text,
html[data-theme="light"] .topic-points li,
html[data-theme="light"] .topic-breakdown,
html[data-theme="light"] .topic-simple-def,
html[data-theme="light"] .command-desc {
  color: var(--text-secondary);
}

html[data-theme="light"] .idesc-overview-text {
  color: #1e293b;
  font-size: 14px;
  line-height: 1.6;
}

html[data-theme="light"] .topic-detail-card,
html[data-theme="light"] .resource-link-card {
  background: #ffffff;
  border: 1px solid var(--border);
}

html[data-theme="light"] .topic-detail-card[open] {
  background: #ffffff;
  border-color: var(--accent-border);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

html[data-theme="light"] .topic-body {
  border-top: 1px solid #e2e8f0;
}

html[data-theme="light"] .topic-name,
html[data-theme="light"] .stage-step-title {
  color: var(--text-primary);
  font-weight: 700;
}

html[data-theme="light"] .topic-analogy {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 12.5px;
}

html[data-theme="light"] .topic-example {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  font-size: 12.5px;
}

html[data-theme="light"] .topic-breakdown code,
html[data-theme="light"] .topic-points code,
html[data-theme="light"] .topic-example code,
html[data-theme="light"] #lecture-description .topic-breakdown code,
html[data-theme="light"] #lecture-description .topic-points code,
html[data-theme="light"] #lecture-description .topic-example code {
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
}

html[data-theme="light"] .topic-example code,
html[data-theme="light"] #lecture-description .topic-example code {
  color: #15803d;
  background: #dcfce7;
  border-color: #bbf7d0;
  font-weight: 600;
}

html[data-theme="light"] .stage-step-item {
  background: #f8fafc;
  border: 1px solid var(--border);
}

html[data-theme="light"] .stage-step-badge {
  background: #eff6ff;
  color: var(--accent-ink);
  border: 1px solid #bfdbfe;
  font-weight: 700;
}

html[data-theme="light"] .achievement-card {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

html[data-theme="light"] .achievement-content h4 {
  color: #065f46;
  font-weight: 700;
}

html[data-theme="light"] .achievement-content p {
  color: #1e293b;
}

html[data-theme="light"] .concept-tag-badge {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--accent-ink);
  font-weight: 600;
}

html[data-theme="light"] .concept-tag-badge:hover {
  background: #dbeafe;
  color: #1e40af;
  border-color: var(--accent-border);
}

/* Command Block Cards & Clean Light Code Rows */
html[data-theme="light"] .commands-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

html[data-theme="light"] .command-block-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

html[data-theme="light"] .command-desc {
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

html[data-theme="light"] .command-code-row {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

html[data-theme="light"] .command-code-row code,
html[data-theme="light"] #lecture-description .command-code-row code {
  color: #1d4ed8;
  font-family: 'Fira Code', monospace, Consolas;
  font-size: 12.5px;
  font-weight: 600;
  background: transparent !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  white-space: nowrap;
}

html[data-theme="light"] .command-code-row .copy-cmd-btn,
html[data-theme="light"] .copy-cmd-btn {
  padding: 4px 10px;
  color: #334155;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  cursor: pointer;
}

html[data-theme="light"] .command-code-row .copy-cmd-btn:hover,
html[data-theme="light"] .copy-cmd-btn:hover {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

html[data-theme="light"] .command-code-row .copy-cmd-btn.copied,
html[data-theme="light"] .copy-cmd-btn.copied {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

/* Prompt Block Cards - Clean, fully wrapping, aligned multi-line cards */
html[data-theme="light"] .prompts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

html[data-theme="light"] .prompt-block-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

html[data-theme="light"] .prompt-block-card + .prompt-block-card {
  border-top: 1px solid var(--border);
}

html[data-theme="light"] .prompt-block-card pre,
html[data-theme="light"] #lecture-description .prompt-block-card pre {
  color: var(--text-primary) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-family: inherit !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  font-weight: 450;
  max-height: none !important;
  overflow: visible !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  flex: 1 1 auto;
  min-width: 0;
}

html[data-theme="light"] .prompt-block-card code,
html[data-theme="light"] #lecture-description .prompt-block-card code {
  color: inherit !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-family: inherit !important;
  font-size: inherit !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  display: inline !important;
}

html[data-theme="light"] .prompt-block-card .copy-cmd-btn {
  padding: 4px 10px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 1px;
  cursor: pointer;
}

html[data-theme="light"] .prompt-block-card .copy-cmd-btn:hover {
  color: var(--accent-ink);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

html[data-theme="light"] .resource-link-card {
  color: var(--text-primary);
}

html[data-theme="light"] .resource-link-card .resource-title {
  color: var(--text-primary);
  font-weight: 600;
}

html[data-theme="light"] .resource-link-card:hover {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

/* Tables & Reports */
html[data-theme="light"] .reports-table thead th,
html[data-theme="light"] .reports-table thead,
html[data-theme="light"] .curr-table thead th {
  background: #f1f5f9;
  color: var(--text-primary);
  border-color: var(--border);
  font-weight: 700;
}

html[data-theme="light"] .reports-table tbody tr:nth-child(even),
html[data-theme="light"] .curr-row:nth-child(even) td {
  background: rgba(15, 23, 42, 0.02);
}

html[data-theme="light"] .reports-table tbody tr:hover,
html[data-theme="light"] .curr-row:hover td {
  background: rgba(37, 99, 235, 0.06);
}

html[data-theme="light"] .student-email-badge {
  color: var(--text-primary);
  font-weight: 600;
}

html[data-theme="light"] .quiz-type-tag {
  color: var(--accent-ink);
  border-color: var(--accent-border);
  background: var(--accent-soft);
  font-weight: 600;
}

html[data-theme="light"] .stat-card.students .stat-icon,
html[data-theme="light"] .stat-card.students .stat-value {
  color: var(--accent-ink);
}

html[data-theme="light"] .stat-card.students .stat-icon {
  background: var(--accent-soft);
}

html[data-theme="light"] .action-icon-btn.view-btn:hover {
  color: #ffffff;
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.24);
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .user-dropdown,
html[data-theme="light"] .search-input,
html[data-theme="light"] .chat-input,
html[data-theme="light"] .combobox-listbox {
  background-color: #ffffff;
  border-color: var(--border);
  color: var(--text-primary);
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #64748b; opacity: 1; }

html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus,
html[data-theme="light"] button:focus-visible,
html[data-theme="light"] a:focus-visible {
  outline-color: var(--accent);
}

html[data-theme="light"] #auth-switch-text a {
  color: var(--accent-ink);
}

html[data-theme="light"] .quiz-action-btn:not(.secondary) {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.22);
}

html[data-theme="light"] .quiz-action-btn:not(.secondary):hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
}

html[data-theme="light"] [data-tooltip]::after,
html[data-theme="light"] .tooltip,
html[data-theme="light"] .curr-toast {
  background: #0f172a;
  color: #f8fafc;
  border-color: #334155;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.24);
}

html[data-theme="light"] code {
  background: #f1f5f9;
  color: var(--accent-ink);
  border: 1px solid var(--border);
}

html[data-theme="light"] #lecture-description code {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid var(--border);
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Non-prompt generic pre blocks in lecture description */
html[data-theme="light"] #lecture-description pre:not(.prompt-block-card pre) {
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 14px;
  border-radius: 8px;
}

html[data-theme="light"] #lecture-description pre:not(.prompt-block-card pre) code {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--text-primary);
}

html[data-theme="light"] ::selection {
  background: rgba(37, 99, 235, 0.18);
  color: #0f172a;
}

/* Media controls intentionally retain a cinema-dark surface in both themes */
html[data-theme="light"] #video-container,
html[data-theme="light"] #custom-controls,
html[data-theme="light"] #video-overlay {
  color-scheme: dark;
  color: #ffffff;
}

html[data-theme="light"] #video-container {
  background: #090911;
  border-color: #cbd5e1;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.14);
}

html[data-theme="light"] #video-overlay {
  background: rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .correct,
html[data-theme="light"] .user-correct,
html[data-theme="light"] .correct-target {
  color: #047857;
}

html[data-theme="light"] .incorrect,
html[data-theme="light"] .user-incorrect { color: #dc2626; }

html[data-theme="light"] .quiz-option-card {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

html[data-theme="light"] .quiz-option-card:hover {
  background: #f8fafc;
  border-color: var(--border-strong);
}

html[data-theme="light"] .quiz-option-card.selected {
  background: #eff6ff;
  border-color: var(--accent);
  color: #1e3a8a;
  box-shadow: 0 0 0 1px var(--accent);
}

html[data-theme="light"] .quiz-option-card input[type="radio"],
html[data-theme="light"] .quiz-option-card input[type="checkbox"] {
  accent-color: var(--accent);
}

html[data-theme="light"] .quiz-tf-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 600;
}

html[data-theme="light"] .quiz-tf-btn:hover {
  background: #f8fafc;
  border-color: var(--border-strong);
}

html[data-theme="light"] .quiz-tf-btn.selected {
  background: #eff6ff;
  border-color: var(--accent);
  color: #1e3a8a;
}

html[data-theme="light"] .quiz-review-q-body {
  background: #f8fafc;
  border-color: var(--border);
}

html[data-theme="light"] .quiz-review-option-item {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

html[data-theme="light"] .quiz-timer-badge {
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 600;
}

html[data-theme="light"] .quiz-score-ring {
  background: conic-gradient(#2563eb 0%, #0891b2 var(--score-percent, 0%), #e2e8f0 var(--score-percent, 0%) 100%);
}

html[data-theme="light"] .quiz-score-ring::after { background: #ffffff; }
html[data-theme="light"] .quiz-review-explanation { background: #f8fafc; border: 1px solid #e2e8f0; color: var(--text-secondary); }
html[data-theme="light"] .quiz-action-btn.secondary { background: #f1f5f9; color: var(--text-secondary); }
html[data-theme="light"] .quiz-action-btn.secondary:hover { background: #e2e8f0; color: var(--text-primary); }

html[data-theme="light"] .quiz-review-item {
  background: #ffffff;
  border: 1px solid var(--border);
}

html[data-theme="light"] .quiz-review-item.correct .quiz-review-q-header {
  color: #065f46;
  background: #ecfdf5;
  border-bottom: 1px solid #a7f3d0;
}

html[data-theme="light"] .quiz-review-option-item.correct-choice {
  color: #065f46;
  background: #ecfdf5;
  border-color: #a7f3d0;
  font-weight: 600;
}

html[data-theme="light"] .quiz-review-item.incorrect .quiz-review-q-header {
  color: #9f1239;
  background: #fff1f2;
  border-bottom: 1px solid #fecdd3;
}

html[data-theme="light"] .quiz-review-option-item.incorrect-choice {
  color: #9f1239;
  background: #fff1f2;
  border-color: #fecdd3;
  font-weight: 600;
}

/* Copilot Assistant Sidebar in Light Mode */
html[data-theme="light"] .copilot-sidebar {
  background: #f8fafc;
  border-color: var(--border);
  box-shadow: -8px 0 28px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .copilot-sidebar.floating {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-raised);
}

html[data-theme="light"] .copilot-header,
html[data-theme="light"] .copilot-model-bar,
html[data-theme="light"] .copilot-input-area {
  background: #ffffff;
  border-color: var(--border);
}

html[data-theme="light"] .copilot-title-copy strong,
html[data-theme="light"] .copilot-welcome-card h3,
html[data-theme="light"] .copilot-context-copy strong { color: var(--text-primary); font-weight: 700; }

html[data-theme="light"] .copilot-title-copy small,
html[data-theme="light"] .copilot-model-bar label,
html[data-theme="light"] .copilot-context-copy small,
html[data-theme="light"] .chat-message-meta,
html[data-theme="light"] .chat-thinking .chat-thinking-label { color: var(--text-muted); }

html[data-theme="light"] .copilot-model-dropdown,
html[data-theme="light"] .copilot-pill-btn,
html[data-theme="light"] .copilot-input-wrapper,
html[data-theme="light"] .copilot-shortcut-hint kbd {
  color: var(--text-secondary);
  border-color: var(--border);
  background-color: #ffffff;
}

html[data-theme="light"] .copilot-model-trigger {
  color: var(--text-primary);
  border: 1px solid var(--border);
  background: #ffffff;
  font-weight: 600;
}

html[data-theme="light"] .copilot-model-trigger:hover,
html[data-theme="light"] .copilot-model-trigger.is-open {
  color: var(--accent-ink);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

html[data-theme="light"] .copilot-model-chevron { color: #64748b; }

html[data-theme="light"] .copilot-model-menu {
  color: var(--text-primary);
  border-color: var(--accent-border);
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

html[data-theme="light"] .copilot-model-option { color: var(--text-secondary); }
html[data-theme="light"] .copilot-model-option-copy small { color: var(--text-muted); }
html[data-theme="light"] .copilot-model-option:hover,
html[data-theme="light"] .copilot-model-option:focus-visible {
  color: var(--text-primary);
  border-color: var(--border);
  background: #f1f5f9;
}

html[data-theme="light"] .copilot-model-option.selected {
  color: var(--accent-ink);
  border-color: var(--accent-border);
  background: linear-gradient(90deg, var(--accent-soft), #f0f9ff);
  font-weight: 600;
}

html[data-theme="light"] .copilot-model-option.selected .copilot-model-option-copy small { color: var(--text-secondary); }

html[data-theme="light"] .copilot-context-label { color: var(--text-muted); }

html[data-theme="light"] .copilot-context-card {
  border-color: #bfdbfe;
  background: linear-gradient(90deg, #f0f9ff, #eff6ff);
}

html[data-theme="light"] .copilot-context-copy strong {
  color: #1e3a8a;
  font-weight: 700;
}

html[data-theme="light"] .copilot-context-copy small {
  color: var(--accent-ink);
  font-weight: 700;
}

html[data-theme="light"] .copilot-pills-container {
  border-color: var(--border);
  background: #ffffff;
}

html[data-theme="light"] .copilot-pill-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
}

html[data-theme="light"] .copilot-pill-btn:hover {
  color: var(--accent-ink);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

html[data-theme="light"] .copilot-messages {
  background: #f8fafc;
}

html[data-theme="light"] .copilot-welcome-card {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.06);
}

html[data-theme="light"] .copilot-welcome-card p { color: var(--text-secondary); }
html[data-theme="light"] .copilot-welcome-eyebrow { color: var(--accent-ink); font-weight: 800; }

html[data-theme="light"] .chat-message.user .chat-message-bubble {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #8fb0f2;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}

html[data-theme="light"] .chat-message.user .chat-message-bubble code {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 0;
}

html[data-theme="light"] .copilot-grounding-badge { color: #047857; font-weight: 700; }

html[data-theme="light"] .chat-message.bot .chat-message-bubble {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

html[data-theme="light"] .chat-message.bot .chat-message-bubble code {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
}

html[data-theme="light"] .chat-message.bot .chat-message-bubble pre {
  background: #f8fafc;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}

html[data-theme="light"] .chat-message.bot .chat-message-bubble pre code {
  background: transparent;
  color: var(--text-primary);
  border: 0;
  padding: 0;
}

html[data-theme="light"] .chat-copy-btn { color: var(--text-muted); }
html[data-theme="light"] .chat-copy-btn:hover { color: var(--accent-ink); }
html[data-theme="light"] .copilot-input-wrapper:focus-within { box-shadow: 0 0 0 3px var(--focus-ring); }
html[data-theme="light"] .copilot-input-wrapper button:disabled,
html[data-theme="light"] #chat-send:disabled { color: var(--text-muted); background: #e2e8f0; }

/* Course 2 learning visuals & concept groups */
html[data-theme="light"] .course-visual-card {
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .course-visual-meta,
html[data-theme="light"] .course-visual-actions,
html[data-theme="light"] .concept-phase-link,
html[data-theme="light"] .course-concept-group {
  border-color: var(--border);
}

html[data-theme="light"] .course-visual-copy > strong {
  color: var(--text-primary) !important;
  font-weight: 700;
}

html[data-theme="light"] .course-visual-copy > p {
  color: var(--text-secondary) !important;
}

html[data-theme="light"] .course-concept-group-header h3 {
  color: var(--text-primary) !important;
  font-weight: 700;
}

html[data-theme="light"] .course-concept-check ol {
  color: var(--text-secondary) !important;
}

html[data-theme="light"] .course-concept-check > span {
  color: #047857;
  font-weight: 700;
}

html[data-theme="light"] .course-visual-watch {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-ink);
  font-weight: 600;
}

html[data-theme="light"] .course-visual-watch:hover {
  background: #dbeafe;
  color: #1e40af;
}

html[data-theme="light"] .concept-phase-link {
  color: var(--text-secondary);
  background: #f8fafc;
  border: 1px solid var(--border);
  font-weight: 600;
}

html[data-theme="light"] .concept-phase-link:hover {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

/* Final high-contrast typography overrides */
html[data-theme="light"] #lecture-title,
html[data-theme="light"] .week-title,
html[data-theme="light"] .lecture-title-sidebar,
html[data-theme="light"] #nav-position,
html[data-theme="light"] #copilot-context-title,
html[data-theme="light"] .copilot-welcome-card > div > strong,
html[data-theme="light"] .copilot-welcome-context {
  color: var(--text-primary);
}

html[data-theme="light"] .lecture-num,
html[data-theme="light"] .copilot-title-copy small,
html[data-theme="light"] .copilot-welcome-card p,
html[data-theme="light"] .chat-message-meta,
html[data-theme="light"] .copilot-shortcut-hint,
html[data-theme="light"] .updated-text,
html[data-theme="light"] .pool-count-text {
  color: var(--text-muted);
}

html[data-theme="light"] .copilot-pill-btn {
  color: var(--text-secondary);
  border-color: var(--border);
  background: #ffffff;
}

html[data-theme="light"] .copilot-pill-btn span { color: var(--accent-ink); }

html[data-theme="light"] .copilot-welcome-card {
  border-color: var(--accent-border);
}

html[data-theme="light"] .copilot-input-footer,
html[data-theme="light"] .copilot-status-indicator { color: var(--text-muted); }

/* Quiz Bank page */
html[data-theme="light"] .quiz-banks-page,
html[data-theme="light"] .quiz-banks-page body { color: var(--text-primary); }

html[data-theme="light"] .quiz-banks-page .header-title-group p,
html[data-theme="light"] .quiz-banks-page .filter-label,
html[data-theme="light"] .quiz-banks-page .stat-title,
html[data-theme="light"] .quiz-banks-page .reports-table th {
  color: var(--text-muted);
}

html[data-theme="light"] .bulk-cap-btn {
  color: #b45309;
  border-color: #fcd34d;
  background: #fef3c7;
}

html[data-theme="light"] .bulk-cap-btn:hover {
  color: #ffffff;
  border-color: #c2410c;
  background: #c2410c;
}

html[data-theme="light"] .bulk-gen-btn {
  color: #047857;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

html[data-theme="light"] .bulk-gen-btn:hover {
  color: #ffffff;
  border-color: #047857;
  background: #047857;
}

html[data-theme="light"] .stat-card.lectures .stat-icon,
html[data-theme="light"] .stat-card.lectures .stat-value { color: var(--accent-ink); }
html[data-theme="light"] .stat-card.generated .stat-icon,
html[data-theme="light"] .stat-card.generated .stat-value { color: #0284c7; }
html[data-theme="light"] .stat-card.questions .stat-icon,
html[data-theme="light"] .stat-card.questions .stat-value { color: #047857; }
html[data-theme="light"] .stat-card.cap .stat-icon,
html[data-theme="light"] .stat-card.cap .stat-value { color: #b45309; }

html[data-theme="light"] .stat-card.lectures .stat-icon { background: var(--accent-soft); }
html[data-theme="light"] .stat-card.generated .stat-icon { background: #f0f9ff; }
html[data-theme="light"] .stat-card.questions .stat-icon { background: #ecfdf5; }
html[data-theme="light"] .stat-card.cap .stat-icon { background: #fef3c7; }

html[data-theme="light"] .week-tag {
  color: var(--accent-ink);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

html[data-theme="light"] .pool-bar-track,
html[data-theme="light"] .bulk-gen-progress-track { background: #e2e8f0; }

html[data-theme="light"] .cap-stepper {
  background: #ffffff;
  border-color: var(--border);
}

html[data-theme="light"] .cap-step-btn { color: var(--text-secondary); }

html[data-theme="light"] .cap-save-btn,
html[data-theme="light"] .reveal-btn {
  color: var(--accent-ink);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

html[data-theme="light"] .action-icon-btn.view-btn {
  color: var(--accent-ink);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

html[data-theme="light"] .action-icon-btn.add-btn {
  color: #0284c7;
  border-color: #bae6fd;
  background: #f0f9ff;
}

html[data-theme="light"] .llm-flow-launch-btn {
  color: var(--accent-ink);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

html[data-theme="light"] .llm-flow-launch-btn:disabled {
  color: var(--text-muted);
  border-color: var(--border);
  background: #f1f5f9;
  opacity: 1;
}

/* Bulk generation modal */
html[data-theme="light"] .bulk-gen-check-label {
  color: var(--text-secondary);
  border-color: var(--border);
  background: #ffffff;
}

html[data-theme="light"] .bulk-gen-check-label:has(input:checked) {
  color: var(--accent-ink);
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
}

html[data-theme="light"] .bulk-gen-check-label input[type="checkbox"] {
  accent-color: var(--accent);
}

html[data-theme="light"] .preset-pill-btn:hover {
  color: var(--accent-ink);
  border-color: var(--accent);
  background: var(--accent-soft);
}

html[data-theme="light"] .preset-pill-btn.cancel-btn {
  color: var(--text-secondary);
  border-color: var(--border);
  background: #f8fafc;
}

html[data-theme="light"] .preset-pill-btn.cancel-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: #f1f5f9;
}

html[data-theme="light"] .generate-submit-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.24);
}

html[data-theme="light"] .modal-body label,
html[data-theme="light"] .modal-body p,
html[data-theme="light"] .modal-body .filter-label { color: var(--text-secondary); }

html[data-theme="light"] .close-btn { color: var(--text-secondary); }
html[data-theme="light"] .close-btn:hover { color: var(--text-primary); background: #f1f5f9; }

@media (max-width: 760px) {
  .header-right { gap: 4px; }
  .page-theme-action { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html,
  body,
  button,
  input,
  select,
  textarea,
  a,
  header,
  aside,
  main,
  .modal-card,
  .feature-card,
  .stat-card,
  .controls-bar,
  .table-container {
    transition: none !important;
  }
}


/* ==========================================================================
   INSTRUCTOR EXAM QUESTIONS IN LIGHT MODE
   ========================================================================== */
html[data-theme="light"] .header-exam-btn, html[data-theme="light"] #exam-toggle { display: none !important; }

html[data-theme="light"] .header-exam-btn:hover,
html[data-theme="light"] #exam-toggle:hover {
  background: #e0f2fe !important;
  border-color: #7dd3fc !important;
  color: #0369a1 !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15) !important;
}

html[data-theme="light"] #exam-modal {
  background: var(--surface-overlay) !important;
}

html[data-theme="light"] .exam-modal-dialog {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 16px !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18) !important;
}

html[data-theme="light"] .exam-modal-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .exam-brand-icon {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #0284c7 !important;
  border-radius: 10px !important;
}

html[data-theme="light"] .exam-header-eyebrow {
  color: #0284c7 !important;
  font-weight: 800 !important;
}

html[data-theme="light"] .exam-header-title h3,
html[data-theme="light"] #exam-modal-title {
  color: #0f172a !important;
  font-weight: 750 !important;
  font-size: 18px !important;
}

html[data-theme="light"] .exam-header-title p,
html[data-theme="light"] #exam-modal-subtitle {
  color: #475569 !important;
  font-size: 12.5px !important;
}

html[data-theme="light"] .exam-modal-close,
html[data-theme="light"] #exam-modal-close {
  color: #475569 !important;
  background: transparent !important;
}

html[data-theme="light"] .exam-modal-close:hover,
html[data-theme="light"] #exam-modal-close:hover {
  color: #dc2626 !important;
  background: #fee2e2 !important;
}

html[data-theme="light"] .exam-tabs-bar {
  background: #f8fafc !important;
  border-bottom: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .exam-tab-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

html[data-theme="light"] .exam-tab-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

html[data-theme="light"] .exam-tab-btn.active {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
}

html[data-theme="light"] .exam-tab-btn.active .exam-tab-pill {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

html[data-theme="light"] .exam-controls-bar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .exam-ctrl-btn {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

html[data-theme="light"] .exam-ctrl-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

html[data-theme="light"] .exam-progress-summary {
  color: #475569 !important;
}

html[data-theme="light"] .exam-modal-body {
  background: #f8fafc !important;
}

html[data-theme="light"] .exam-question-card {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

html[data-theme="light"] .exam-q-num {
  background: #e0f2fe !important;
  border: 1px solid #bae6fd !important;
  color: #0284c7 !important;
  font-weight: 800 !important;
}

html[data-theme="light"] .exam-q-section {
  background: #f5f3ff !important;
  border: 1px solid #ddd6fe !important;
  color: #7c3aed !important;
  font-weight: 700 !important;
}

html[data-theme="light"] .exam-q-type {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
}

html[data-theme="light"] .exam-q-text {
  color: #0f172a !important;
  font-weight: 750 !important;
}

html[data-theme="light"] .exam-option-item {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

html[data-theme="light"] .exam-option-item:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

html[data-theme="light"] .exam-option-item.selected {
  background: #eff6ff !important;
  border-color: #2563eb !important;
  color: #1e40af !important;
  box-shadow: 0 0 0 1px #2563eb !important;
}

html[data-theme="light"] .exam-check-btn {
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1d4ed8 !important;
}

html[data-theme="light"] .exam-check-btn:hover {
  background: #dbeafe !important;
  border-color: #93c5fd !important;
  color: #1e40af !important;
}

html[data-theme="light"] .exam-toggle-answer-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

html[data-theme="light"] .exam-toggle-answer-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

html[data-theme="light"] .exam-toggle-answer-btn.active {
  background: #f5f3ff !important;
  border-color: #ddd6fe !important;
  color: #7c3aed !important;
}

html[data-theme="light"] .exam-explanation-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

html[data-theme="light"] .exam-correct-banner {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
}

html[data-theme="light"] .exam-correct-text {
  color: #065f46 !important;
}

html[data-theme="light"] .exam-correct-label {
  color: #047857 !important;
  font-weight: 800 !important;
}

html[data-theme="light"] .exam-concept-pill {
  background: #d1fae5 !important;
  color: #065f46 !important;
  font-weight: 750 !important;
}

html[data-theme="light"] .exam-exp-heading {
  color: #475569 !important;
}

html[data-theme="light"] .exam-exp-body {
  color: #1e293b !important;
}

html[data-theme="light"] .exam-example-section {
  background: #f0f9ff !important;
  border: 1px solid #bae6fd !important;
}

html[data-theme="light"] .exam-example-heading {
  color: #0284c7 !important;
}

html[data-theme="light"] .exam-example-body {
  color: #0c4a6e !important;
}

html[data-theme="light"] .exam-modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid #cbd5e1 !important;
}

html[data-theme="light"] .exam-footer-note {
  color: #64748b !important;
}

html[data-theme="light"] .exam-close-footer-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

html[data-theme="light"] .exam-close-footer-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}


@media (max-width: 768px) {
  html[data-theme="light"] .user-mat-menu {
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25) !important;
  }
}
