:root {
  /* Ultra-Clean Modern Zinc Palette (PREVIA Apple OS & Linear Theme) */
  --bg-base: #09090b;
  --bg-surface: #101014;
  --bg-card: #18181b;
  --bg-card-hover: #202024;
  --bg-elevated: #27272a;
  
  --border-subtle: #27272a;
  --border-hover: #3f3f46;
  --border-active: #52525b;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  /* High-Contrast Readability Typography Colors */
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-dim: #52525b;

  /* Typography Stack: Geist + Inter */
  --font-sans: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', monospace;

  --sidebar-width: 270px;
  --header-height: 64px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
}

/* Light Theme Variables */
body.light-theme {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-elevated: #e2e8f0;
  
  --border-subtle: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-active: #94a3b8;

  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-cyan: #0284c7;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;

  /* High-Contrast Readability Typography Colors for Light Mode */
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.theme-toggle-btn:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
}
.theme-toggle-btn i {
  color: var(--accent-amber);
}

/* Motivational Hero Banner */
.motivation-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-amber);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}
.motivation-quote-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.motivation-content {
  flex: 1;
}
.motivation-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.motivation-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.motivation-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.motivation-text {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  font-style: italic;
}
.motivation-refresh-btn {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.motivation-refresh-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: rotate(45deg);
}

/* Light Theme Component Overrides */
body.light-theme .app-header {
  background: rgba(255, 255, 255, 0.92);
}
body.light-theme .sidebar {
  background: #ffffff;
}
body.light-theme .concept-graph-canvas-container {
  background: #f1f5f9;
}
body.light-theme .canvas-card {
  background: #f8fafc;
}
body.light-theme .modal-dialog {
  background: #ffffff;
  color: #0f172a;
}
body.light-theme .ai-copilot-panel {
  background: #ffffff;
  color: #0f172a;
}
body.light-theme .formula-box {
  background: #f1f5f9;
  color: #0369a1;
}
body.light-theme .step-text-display {
  background: #f8fafc;
  color: #0f172a;
}
body.light-theme .step-player-bar {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #cbd5e1;
}
body.light-theme .step-btn {
  color: #334155;
  border-color: #cbd5e1;
}
body.light-theme .step-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
body.light-theme .model-info-floating {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #cbd5e1;
}
body.light-theme .canvas-controls-overlay {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #cbd5e1;
}
body.light-theme .quote-box {
  background: #f8fafc;
  color: #1e293b;
}
body.light-theme .highlight-box {
  background: #f8fafc;
  color: #1e293b;
}

/* Elegant Minimalist Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* App Header */
.app-header {
  height: 64px;
  max-height: 64px;
  background: rgba(9, 9, 11, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo-glow {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-title {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.badge-ai {
  font-size: 0.68rem;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 2px 7px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 600;
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

@media (max-width: 1280px) {
  .brand-tagline {
    display: none !important;
  }
}

/* Active User & School Identity Badge */
.active-user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  padding: 5px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
  max-width: 320px;
  min-width: 0;
}
.active-user-badge:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.04);
}
.user-avatar-tiny {
  font-size: 1.15rem;
  line-height: 1;
}
.user-header-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.user-header-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-header-school {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-cyan);
  border-radius: 50%;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
.pulse-dot.online {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

.cyber-select {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.cyber-select:focus {
  border-color: var(--accent-primary);
}

.cyber-select.full {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-gem-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
  cursor: pointer;
  transition: all 0.2s ease;
}
.header-gem-badge:hover {
  border-color: var(--border-hover);
  background: var(--bg-card);
  transform: translateY(-1px);
}

.header-pomodoro-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cyber-btn {
  background: var(--accent-primary);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.cyber-btn:hover {
  background: var(--accent-primary-hover);
}

.cyber-btn.sm {
  padding: 5px 10px;
  font-size: 0.75rem;
}

.cyber-btn.full {
  width: 100%;
  justify-content: center;
}

.cyber-btn.secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.cyber-btn.secondary:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.cyber-btn.danger-btn {
  background: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.4);
}
.cyber-btn.danger-btn:hover {
  background: #e11d48;
}

.risk-meter-chip {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.risk-meter-chip .chip-label { color: var(--text-secondary); }
.risk-meter-chip .chip-val { font-family: var(--font-mono); font-weight: 700; }
.risk-meter-chip .chip-val.high { color: var(--accent-rose); }

/* Main App Layout */
.app-layout {
  display: flex;
  min-height: calc(100vh - var(--header-height));
}

/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin: 16px 8px 6px 8px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.nav-section-title:first-child { margin-top: 0; }

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-links li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-links li:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.nav-links li.active {
  background: var(--bg-card);
  color: #fff;
  font-weight: 600;
  border-left: 2px solid var(--accent-primary);
}

.nav-links li i {
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
  color: var(--text-muted);
}
.nav-links li.active i {
  color: var(--accent-primary);
}

.tab-indicator {
  margin-left: auto;
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-weight: 600;
}
.tab-indicator.danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
}
.tab-indicator.highlight {
  background: rgba(6, 182, 212, 0.15);
  color: #a5f3fc;
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.tab-indicator.new {
  background: rgba(16, 185, 129, 0.15);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.twin-telemetry-mini {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}
.twin-telemetry-mini .warn { color: var(--accent-amber); }

/* Main Content Viewport */
.content-viewport {
  flex: 1;
  padding: 28px 36px;
  overflow-y: auto;
  background: var(--bg-base);
}

.tab-view {
  display: none;
  animation: fadeIn 0.2s ease;
}
.tab-view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.view-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.25;
}

.view-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.55;
  max-width: 820px;
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.horizon-toggle-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.btn-group {
  display: flex;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  padding: 2px;
}

.time-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 5px 12px;
  font-size: 0.78rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 600;
  transition: all 0.15s ease;
}

.time-btn.active {
  background: var(--bg-card);
  color: #fff;
  border: 1px solid var(--border-subtle);
}

/* Metric Cards */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: border-color 0.2s;
}

.metric-card:hover {
  border-color: var(--border-hover);
}

.metric-card.danger-card {
  border-color: rgba(244, 63, 94, 0.3);
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.04) 0%, var(--bg-card) 100%);
}

.metric-card.warning-card {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.04) 0%, var(--bg-card) 100%);
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.metric-subtext {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.45;
}

.metric-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.25);
  margin-top: 10px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.metric-badge.warn-badge {
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.25);
}

.progress-bar-wrap {
  width: 100%;
  height: 5px;
  background: var(--bg-surface);
  border-radius: 999px;
  margin-top: 12px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.danger-bg { background: var(--accent-rose); }
.text-danger { color: var(--accent-rose); }
.text-warn { color: var(--accent-amber); }
.text-success { color: var(--accent-emerald); }
.text-info { color: var(--accent-cyan); }
.text-primary { color: var(--accent-primary); }

/* Panel Cards & Split Grids */
.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.panel-title {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.twin-view-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
  gap: 12px;
}

.twin-toggle-group {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}

.twin-toggle-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.twin-toggle-btn:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.twin-toggle-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.twin-view-mode-hint {
  display: flex;
  align-items: center;
  gap: 8px;
}

.twin-panels-container {
  width: 100%;
}

.twin-panels-container.view-single-graph #twinGraphCard {
  display: block;
  width: 100%;
}
.twin-panels-container.view-single-graph #twinChartCard {
  display: none;
}

.twin-panels-container.view-single-trajectory #twinGraphCard {
  display: none;
}
.twin-panels-container.view-single-trajectory #twinChartCard {
  display: block;
  width: 100%;
}

.twin-panels-container.view-both {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.twin-panels-container.view-both #twinGraphCard,
.twin-panels-container.view-both #twinChartCard {
  display: block;
  width: 100%;
}

@media (max-width: 1200px) {
  .twin-panels-container.view-both {
    grid-template-columns: 1fr;
  }
}

.twin-split-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

.legend-pills {
  display: flex;
  gap: 8px;
}

.legend-pill {
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

.legend-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.legend-pill.root .dot { background: var(--accent-amber); }
.legend-pill.failing .dot { background: var(--accent-rose); }
.legend-pill.safe .dot { background: var(--accent-emerald); }

.concept-graph-canvas-container {
  height: 480px;
  background: #0d0d10;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

#twinGraphCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.graph-overlay-info {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(18, 18, 22, 0.95);
  border: 1px solid var(--border-subtle);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.panel-footer-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.ai-pill {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
}

.chart-container {
  height: 270px;
  position: relative;
}
.chart-container.large {
  height: 360px;
}

.trajectory-insights {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.insight-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.5;
}

.insight-item.danger {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.2);
  color: #fda4af;
}

.insight-item.success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
}

/* What-If Simulator */
.what-if-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 20px;
}

.sim-field {
  margin-bottom: 18px;
}

.sim-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.intervention-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.intervention-radio {
  display: block;
  cursor: pointer;
}
.intervention-radio input { display: none; }

.radio-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: all 0.15s ease;
}

.intervention-radio input:checked + .radio-box {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--accent-primary);
}

.radio-title {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.radio-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.4;
}

.range-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--accent-primary);
}

.range-val {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan);
  width: 90px;
}

.badge-tag {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  background: var(--bg-surface);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.badge-tag.highlight {
  background: rgba(6, 182, 212, 0.12);
  color: #a5f3fc;
  border-color: rgba(6, 182, 212, 0.25);
}

.badge-tag.danger {
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.25);
}

.simulation-metrics-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 16px;
}

.sim-metric-col .label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.val-diff {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.old-val {
  font-size: 0.95rem;
  color: var(--accent-rose);
  text-decoration: line-through;
  font-weight: 600;
  font-family: var(--font-mono);
}

.new-val {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.new-val.highlight { color: var(--accent-cyan); }

.panel-cta-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

/* 3D Concept Models Lab (All Chapters) */
.three-d-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
}

.canvas-card {
  height: 600px;
  background: #09090c;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.three-container {
  width: 100%;
  height: 100%;
  cursor: grab;
}
.three-container:active { cursor: grabbing; }

.canvas-controls-overlay {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 16, 20, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  backdrop-filter: blur(12px);
  z-index: 10;
}

.cam-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cam-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.speed-slider-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.speed-slider-wrap input[type="range"] {
  width: 60px;
  accent-color: var(--accent-cyan);
}

/* Interactive 3D Step Player Overlay */
.step-player-bar {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(16, 16, 20, 0.95);
  border: 1px solid var(--border-subtle);
  padding: 6px 16px;
  border-radius: 999px;
  backdrop-filter: blur(16px);
  z-index: 15;
}

.step-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.step-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.step-indicator {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.model-info-floating {
  position: absolute;
  bottom: 16px;
  left: 16px;
  max-width: 400px;
  background: rgba(16, 16, 20, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  backdrop-filter: blur(12px);
  z-index: 10;
}

.model-info-floating .title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.015em;
}

.model-info-floating .desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.inspector-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.inspector-section h4 {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

.step-text-display {
  background: var(--bg-surface);
  border-left: 2px solid var(--accent-cyan);
  padding: 10px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.45;
}

.formula-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan);
  overflow-x: auto;
}

.misconception-cleared-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent-amber);
  line-height: 1.45;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sub-tag {
  font-size: 0.74rem;
  background: var(--bg-surface);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
}

.inspector-action-btn { margin-top: auto; }

/* Date-by-Date Timetable & Planner */
.schedule-inputs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.sched-col.full-span { grid-column: span 4; }

.sched-col label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.cyber-input {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
}
.cyber-input.full { width: 100%; }
.cyber-input:focus { border-color: var(--accent-primary); }

.schedule-split-layout {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 20px;
}

.hourly-timetable-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 4px;
}

.schedule-slot-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.schedule-slot-item.core { border-left: 3px solid var(--accent-primary); }
.schedule-slot-item.practice { border-left: 3px solid var(--accent-cyan); }
.schedule-slot-item.recall { border-left: 3px solid var(--accent-emerald); }
.schedule-slot-item.backlog { border-left: 3px solid var(--accent-amber); background: rgba(245, 158, 11, 0.04); }
.schedule-slot-item.autopsy { border-left: 3px solid #ec4899; }
.schedule-slot-item.break { border-left: 3px solid var(--text-dim); opacity: 0.75; }
.schedule-slot-item.school { border-left: 3px solid #8b5cf6; }

.slot-time-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-cyan);
  white-space: nowrap;
  width: 140px;
}

.slot-title {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
}

.slot-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.4;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.check-item:hover { color: var(--text-primary); }
.check-item input[type="checkbox"] { accent-color: var(--accent-emerald); }

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 640px;
  overflow-y: auto;
  padding-right: 4px;
}

.calendar-day-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  position: relative;
  transition: all 0.15s ease;
}

.calendar-day-card:hover {
  border-color: var(--border-hover);
}

.calendar-day-card.mock-day {
  border-color: rgba(244, 63, 94, 0.35);
  background: rgba(244, 63, 94, 0.05);
}

.calendar-day-card.completed {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.05);
}

.cal-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cal-date-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.cal-day-name {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.sub-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 700;
}
.sub-badge.physics { background: rgba(99, 102, 241, 0.15); color: #c7d2fe; }
.sub-badge.chemistry { background: rgba(245, 158, 11, 0.15); color: #fde68a; }
.sub-badge.math { background: rgba(6, 182, 212, 0.15); color: #a5f3fc; }
.sub-badge.biology { background: rgba(16, 185, 129, 0.15); color: #a7f3d0; }

.cal-chapter-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.35;
}

.cal-meta-row {
  display: flex;
  gap: 12px;
  font-size: 0.74rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.cal-3d-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}
.cal-3d-btn:hover { border-color: var(--accent-cyan); }

.cal-checkbox-row {
  border-top: 1px solid var(--border-subtle);
  padding-top: 6px;
  margin-top: 4px;
}

.cal-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* 2030 Career Navigator */
.career-category-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
  font-weight: 500;
}
.filter-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}
.filter-btn.active {
  background: var(--text-primary);
  color: var(--bg-base);
  border-color: var(--text-primary);
  font-weight: 600;
}

.career-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.career-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.career-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.career-card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.career-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.career-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  line-height: 1.3;
}

.career-tagline {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.4;
}

.career-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: var(--bg-surface);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.meta-item .label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.meta-item .val {
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.meta-item .val.highlight { color: var(--accent-cyan); }

.career-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.exam-pill {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: var(--bg-surface);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-secondary);
}

/* Modal Dialog */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 16px; right: 16px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 1.15rem;
  cursor: pointer;
}
.modal-close-btn:hover { color: var(--text-primary); }

.career-detail-section { margin-bottom: 16px; }
.career-detail-section h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.highlight-box {
  background: var(--bg-surface);
  border-left: 2px solid var(--accent-primary);
  padding: 10px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.salary-progression-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--bg-surface);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}
.sal-step .step-label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.sal-step .step-num {
  font-size: 0.88rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.twin-match-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Floating Champ AI Student Copilot Launcher */
.champ-floating-launcher {
  position: fixed;
  bottom: 24px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 17, 26, 0.92);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 6px 18px 6px 6px;
  border-radius: 999px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(6, 182, 212, 0.25);
  cursor: pointer;
  z-index: 1500;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.champ-floating-launcher:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--accent-cyan);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 32px rgba(6, 182, 212, 0.45);
}

.champ-launcher-avatar {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
}
.champ-launcher-avatar img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.4);
  display: block;
}
.champ-online-indicator {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #0b0d14;
  box-shadow: 0 0 8px #10b981;
}

.champ-launcher-tag {
  display: flex;
  flex-direction: column;
}
.champ-tag-name {
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.2;
}
.champ-tag-status {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Fallback for legacy button */
.ai-copilot-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 28px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  z-index: 1500;
  transition: transform 0.2s;
}
.ai-copilot-floating-btn:hover { transform: scale(1.06); }

.copilot-pulse {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  animation: pulseDot 2.5s infinite;
}

.ai-copilot-panel {
  position: fixed;
  bottom: 92px;
  right: 28px;
  width: 400px;
  height: 540px;
  background: rgba(18, 20, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(28px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65), 0 0 30px rgba(6, 182, 212, 0.15);
  display: none;
  flex-direction: column;
  z-index: 1500;
  overflow: hidden;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.champ-panel-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}
.champ-panel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent-cyan);
  display: block;
}
.champ-panel-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  border: 1.5px solid #000;
}

.champ-bot-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--accent-cyan);
  flex-shrink: 0;
}
.champ-avatar-bubble-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.copilot-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.copilot-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
}

.status-online {
  font-size: 0.68rem;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
}

.close-copilot-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 1rem;
  cursor: pointer;
}

.copilot-chips-row {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.chip-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.chip-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.copilot-messages {
  flex: 1;
  padding: 12px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  display: flex;
  gap: 8px;
  font-size: 0.82rem;
  line-height: 1.5;
}
.chat-msg.user-msg { justify-content: flex-end; }

.bot-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #fff;
  flex-shrink: 0;
}

.msg-bubble {
  max-width: 84%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}
.ai-msg .msg-bubble {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}
.user-msg .msg-bubble {
  background: var(--accent-primary);
  color: #fff;
}

.copilot-input-row {
  padding: 8px 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
  background: var(--bg-surface);
}

.copilot-input-row input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: #fff;
  font-size: 0.82rem;
  outline: none;
}
.copilot-input-row input:focus { border-color: var(--accent-primary); }

/* Misconceptions Autopsy Grid */
.misconception-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
}

.misconception-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.miscon-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.miscon-item:hover { border-color: var(--border-hover); }
.miscon-item.active {
  border-color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.06);
}

.miscon-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.miscon-subject {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}
.miscon-name {
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 4px;
  color: var(--text-primary);
}
.miscon-risk-tag {
  font-size: 0.74rem;
  color: var(--accent-rose);
  font-weight: 500;
  margin-top: 4px;
}

.autopsy-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.autopsy-section h4 {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quote-box {
  background: var(--bg-surface);
  border-left: 2px solid var(--accent-rose);
  padding: 10px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  color: var(--text-primary);
  font-style: italic;
  line-height: 1.5;
}

.origin-trail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--bg-surface);
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.trail-step {
  font-size: 0.74rem;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 600;
}
.trail-step.grade9 { background: rgba(99, 102, 241, 0.15); color: #c7d2fe; }
.trail-step.broken { background: rgba(245, 158, 11, 0.15); color: #fde68a; border: 1px dashed var(--accent-amber); }
.trail-step.failing { background: rgba(244, 63, 94, 0.2); color: #fda4af; }
.trail-step.doom { background: rgba(168, 85, 247, 0.2); color: #e9d5ff; }

.repair-plan-box ol {
  margin-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.autopsy-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* 10-Yr PYQ Intelligence */
.subject-select-row {
  display: flex;
  gap: 10px;
}

.pyq-analytics-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.trend-insights-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trend-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.82rem;
}

.trend-item .topic-name {
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.trend-item .stat-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.trend-item p {
  color: var(--text-secondary);
  line-height: 1.45;
}

.pyq-questions-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.pyq-q-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: border-color 0.15s ease;
}
.pyq-q-row:hover { border-color: var(--border-hover); }

.pyq-q-main { flex: 1; }

.pyq-q-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.pyq-year-tag {
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  padding: 2px 6px;
  border-radius: 4px;
}

.pyq-recur-prob {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.pyq-q-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.45;
}

/* Exam Generator Layout */
.generator-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 20px;
}

.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}
.form-col { flex: 1; }

.form-col label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-primary);
  background: var(--bg-surface);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-top: 4px;
}
.toggle-wrap input[type="checkbox"] { accent-color: var(--accent-primary); }

.paper-actions { display: flex; gap: 8px; }

.paper-document-viewport {
  background: #ffffff;
  color: #09090b;
  border-radius: var(--radius-md);
  padding: 32px 36px;
  min-height: 520px;
  max-height: 640px;
  overflow-y: auto;
  font-family: 'Times New Roman', Times, serif;
}

.empty-paper-placeholder {
  height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  gap: 12px;
  font-family: var(--font-sans);
}

.paper-head-center {
  text-align: center;
  border-bottom: 2px solid #000;
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.paper-exam-title {
  font-size: 1.25rem;
  font-weight: bold;
  text-transform: uppercase;
}
.paper-subhead { font-size: 0.9rem; margin-top: 3px; }
.paper-meta-row {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  font-size: 0.88rem;
  margin-top: 4px;
}
.paper-section-banner {
  font-weight: bold;
  font-size: 0.95rem;
  margin: 16px 0 6px 0;
  border-bottom: 1px solid #333;
  padding-bottom: 2px;
  text-transform: uppercase;
}
.paper-q-item {
  margin-bottom: 10px;
  font-size: 0.92rem;
  line-height: 1.45;
}
.paper-q-num { font-weight: bold; }
.paper-q-marks { float: right; font-weight: bold; }
.paper-solution-box {
  background: #f4f4f5;
  border-left: 3px solid var(--accent-primary);
  padding: 8px 10px;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: #27272a;
}

.paper-marks-summary-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px 0;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  align-items: center;
}
.summary-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: 4px;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.summary-chip.total-score {
  background: #0f172a;
  color: #38bdf8;
  border-color: #0f172a;
  font-weight: 700;
  margin-left: auto;
}

/* Stream Selection Layout */
.stream-layout-grid {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 20px;
}

.stream-input-group { margin-bottom: 14px; }
.stream-input-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stream-bars-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stream-bar-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.stream-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.stream-name {
  font-weight: 600;
  font-size: 0.88rem;
}

.stream-percent {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
}

.stream-deep-dive {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
}
.stream-deep-dive h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

/* Diagnostic Test Taker */
.test-taker-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}

.test-timer-badge {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.question-palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.palette-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  height: 34px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.palette-btn.active {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.15);
  color: #fff;
}
.palette-btn.done {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  color: #a7f3d0;
}

.palette-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.palette-legend .leg-item { display: flex; align-items: center; gap: 4px; }
.palette-legend .dot { width: 7px; height: 7px; border-radius: 50%; }
.palette-legend .dot.done { background: var(--accent-emerald); }
.palette-legend .dot.curr { background: var(--accent-cyan); }
.palette-legend .dot.pend { background: var(--text-dim); }

.confidence-selector-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 16px;
}
.confidence-selector-box label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-amber);
  display: block;
  margin-bottom: 6px;
}
.confidence-radios {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.test-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.test-option-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s ease;
  font-size: 0.88rem;
}
.test-option-item:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
}
.test-option-item.selected {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--accent-primary);
}

.opt-prefix {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-primary);
  width: 22px;
}

/* Print Overrides */
@media print {
  body * { visibility: hidden; }
  #paperDocumentViewport, #paperDocumentViewport * { visibility: visible; }
  #paperDocumentViewport {
    position: absolute;
    left: 0; top: 0; width: 100%;
    margin: 0; padding: 20px;
    box-shadow: none; max-height: none; overflow: visible;
  }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .metrics-row { grid-template-columns: repeat(2, 1fr); }
  .twin-split-grid, .what-if-grid, .three-d-layout, .generator-layout, .stream-layout-grid, .test-taker-layout, .schedule-split-layout {
    grid-template-columns: 1fr;
  }
  .career-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .schedule-inputs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .career-cards-grid { grid-template-columns: 1fr; }
  .calendar-days-grid { grid-template-columns: 1fr; }
}

/* ========================================================
   LANDING PAGE SYSTEM (PREVIA APPLE OS DESIGN)
   ======================================================== */
.landing-page-view {
  min-height: 100vh;
  background-color: var(--bg-base);
  color: var(--text-primary);
  overflow-x: hidden;
  position: relative;
}

/* Landing Navigation */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.25s ease;
}
body.light-theme .landing-nav {
  background: rgba(248, 250, 252, 0.88);
}

.landing-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
}
.landing-nav-brand .brand-logo-glow {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.4);
}
.landing-nav-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.landing-nav-title span {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.landing-nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.landing-nav-links a:hover {
  color: var(--text-primary);
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.landing-cta-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.landing-cta-btn.primary {
  background: linear-gradient(135deg, var(--accent-primary), #4338ca);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.landing-cta-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}
.landing-cta-btn.secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.landing-cta-btn.secondary:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
}

.landing-profile-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  cursor: pointer;
}
.landing-profile-pill .user-avatar-sm {
  font-size: 1.1rem;
}
.landing-profile-pill .user-name-sm {
  font-weight: 600;
  font-size: 0.85rem;
}

/* ========================================================
   TOP MARQUEE TICKER TAPE (REFERENCE UI STYLE)
   ======================================================== */
.top-ticker-marquee {
  background: #000000;
  color: #ffffff;
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 50;
  user-select: none;
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  animation: infiniteTicker 35s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-marker {
  color: #ff4b72;
  font-size: 0.75rem;
  margin: 0 4px;
}

@keyframes infiniteTicker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========================================================
   ANIME CYBER-CITADEL HERO VIEWPORT (REFERENCE UI STYLE)
   ======================================================== */
.anime-hero-viewport {
  position: relative;
  min-height: 94vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: #08070d;
}

.anime-hero-backdrop {
  position: absolute;
  inset: 0;
  background-image: url("../assets/hero_anime_city.jpg");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  z-index: 1;
  transform: scale(1.02);
  transition: transform 12s cubic-bezier(0.1, 0.9, 0.2, 1);
}
.anime-hero-viewport:hover .anime-hero-backdrop {
  transform: scale(1.06);
}

.anime-hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 6, 18, 0.65) 0%,
    rgba(8, 6, 18, 0.12) 28%,
    rgba(9, 8, 16, 0.45) 55%,
    rgba(9, 9, 11, 0.92) 85%,
    #09090b 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* Floating Glassmorphic Pill Navbar */
.floating-pill-nav {
  position: relative;
  z-index: 20;
  max-width: 1180px;
  width: calc(100% - 40px);
  margin: 22px auto 0;
  padding: 8px 14px 8px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 9999px;
  background: rgba(15, 12, 30, 0.58);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.pill-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
}

.pill-brand-glow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4b72, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.95rem;
  box-shadow: 0 0 16px rgba(255, 75, 114, 0.5);
}

.pill-brand-text {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pill-brand-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(255, 75, 114, 0.2);
  color: #ff6b8b;
  border: 1px solid rgba(255, 75, 114, 0.4);
  padding: 1px 6px;
  border-radius: 9999px;
}

.pill-nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 26px;
}

.pill-nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.pill-nav-links a:hover {
  color: #ffffff;
}

.pill-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill-theme-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}
.pill-theme-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(30deg);
}

/* Coral CTA Pill Buttons (Reference UI Style) */
.pill-cta-coral {
  background: linear-gradient(135deg, #ff4b72 0%, #ff6b8b 100%);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 10px 22px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(255, 75, 114, 0.45);
  transition: all 0.25s ease;
  text-decoration: none;
}
.pill-cta-coral:hover {
  background: linear-gradient(135deg, #e03259 0%, #ff5277 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(255, 75, 114, 0.6);
}

.pill-cta-coral.lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

.pill-cta-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  border-radius: 9999px;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  text-decoration: none;
}
.pill-cta-glass:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
}
.pill-cta-glass.lg {
  padding: 16px 32px;
  font-size: 1.02rem;
}

/* Hero Content Area */
.anime-hero-container {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  align-items: flex-end;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 90px 32px 80px;
}

.anime-hero-content {
  max-width: 880px;
  text-align: left;
}

.anime-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 9999px;
  background: rgba(255, 75, 114, 0.14);
  border: 1px solid rgba(255, 75, 114, 0.35);
  color: #ff8ca3;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}

.pulse-dot-coral {
  width: 7px;
  height: 7px;
  background: #ff4b72;
  border-radius: 50%;
  box-shadow: 0 0 10px #ff4b72;
  animation: pulseDot 2s infinite;
}

/* PREVIA Master Typography & Branding */
.previa-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.35);
  padding: 5px 16px;
  border-radius: 9999px;
  margin-bottom: 18px;
  backdrop-filter: blur(10px);
}
.previa-pulse-dot {
  width: 7px;
  height: 7px;
  background: #38bdf8;
  border-radius: 50%;
  box-shadow: 0 0 10px #38bdf8;
  animation: pulseDot 2s infinite;
}

.anime-hero-title {
  font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(3.8rem, 8.5vw, 7.4rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin: 0 0 24px;
  text-shadow: 0 6px 32px rgba(0, 0, 0, 0.85);
}

.anime-hero-title.previa-hero-brand {
  font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(4.2rem, 9.5vw, 7.8rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 12px;
  text-shadow: 0 8px 38px rgba(0, 0, 0, 0.85);
}

.previa-hero-subtitle {
  font-size: clamp(1.3rem, 2.8vw, 2.1rem);
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.75);
}

.anime-hero-motto {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 1.85rem);
  font-weight: 600;
  color: #60a5fa;
  margin: 0 0 16px;
  text-shadow: 0 2px 14px rgba(37, 99, 235, 0.45);
  letter-spacing: 0.01em;
}

.previa-hero-desc {
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(226, 232, 240, 0.9);
  max-width: 680px;
  margin: 0 0 32px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

.qbank-pill-num {
  background: rgba(37, 99, 235, 0.25);
  color: #93c5fd;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 4px;
}

.anime-hero-subtitle {
  font-size: 1.18rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
  max-width: 760px;
  margin-bottom: 38px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
  font-weight: 400;
}
.anime-hero-subtitle strong {
  color: #ffffff;
  font-weight: 600;
}

.anime-hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.anime-hero-pills-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 12, 30, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-mono);
}

/* ========================================================
   HORIZON METRIC RIBBON (SPACIOUS STATS)
   ======================================================== */
.horizon-metric-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 60px 32px;
  border-bottom: 1px solid var(--border-subtle);
}

.horizon-stat-item {
  text-align: left;
}

.horizon-stat-item .stat-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.horizon-stat-item .stat-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 6px 0 2px;
}

.horizon-stat-item .stat-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ========================================================
   SPACIOUS 5-STEP METHODOLOGY SECTION ("GIVE SPACE DONT MIX")
   ======================================================== */
.spacious-section {
  padding: 100px 32px 90px;
  max-width: 1240px;
  margin: 0 auto;
}

.section-header-centered {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 56px;
}

.section-tag-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 4px 14px;
  border-radius: 9999px;
  margin-bottom: 16px;
}

.section-serif-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.7rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.15;
}

.section-sub-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.spacious-steps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.spacious-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
}
.spacious-step-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
}

.step-num-badge {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: #ff4b72;
  margin-bottom: 14px;
}

.spacious-step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.spacious-step-card p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 18px;
  flex: 1;
}

.step-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
  align-self: flex-start;
}
.step-tag.warn {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.25);
}
.step-tag.cyan {
  background: rgba(6, 182, 212, 0.12);
  color: #38bdf8;
  border-color: rgba(6, 182, 212, 0.25);
}
.step-tag.emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
}
.step-tag.purple {
  background: rgba(139, 92, 246, 0.12);
  color: #c084fc;
  border-color: rgba(139, 92, 246, 0.25);
}

@media (max-width: 1024px) {
  .horizon-metric-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }
  .spacious-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pill-nav-links {
    display: none;
  }
}
@media (max-width: 640px) {
  .horizon-metric-ribbon {
    grid-template-columns: 1fr;
  }
  .spacious-steps-grid {
    grid-template-columns: 1fr;
  }
}

/* Features Grid */
.landing-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: 1240px;
  margin: 0 auto 70px;
  padding: 0 24px;
}
.landing-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: left;
  transition: all 0.2s ease;
}
.landing-feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}
.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 18px;
}
.feature-icon-wrapper.indigo { background: rgba(99, 102, 241, 0.12); color: var(--accent-primary); }
.feature-icon-wrapper.cyan { background: rgba(6, 182, 212, 0.12); color: var(--accent-cyan); }
.feature-icon-wrapper.emerald { background: rgba(16, 185, 129, 0.12); color: var(--accent-emerald); }
.feature-icon-wrapper.amber { background: rgba(245, 158, 11, 0.12); color: var(--accent-amber); }
.feature-icon-wrapper.rose { background: rgba(244, 63, 94, 0.12); color: var(--accent-rose); }
.feature-icon-wrapper.purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }

.landing-feature-card h3 {
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.landing-feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Comparison Matrix Section */
.comparison-section {
  max-width: 1040px;
  margin: 0 auto 80px;
  padding: 0 24px;
  text-align: center;
}
.comparison-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 32px;
}
.comp-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.comp-table th, .comp-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.92rem;
}
.comp-table th {
  background: var(--bg-surface);
  font-weight: 700;
  color: var(--text-primary);
}
.comp-table tr:last-child td {
  border-bottom: none;
}
.comp-table td.brand-col {
  color: var(--accent-cyan);
  font-weight: 600;
  background: rgba(6, 182, 212, 0.03);
}

/* Bottom CTA Banner (Anime Backdrop & Editorial Serif) */
.landing-bottom-cta {
  position: relative;
  background: linear-gradient(180deg, rgba(14, 10, 26, 0.82) 0%, rgba(10, 8, 20, 0.95) 100%), url("../assets/hero_anime_city.jpg") center center / cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  max-width: 1180px;
  margin: 0 auto 100px;
  padding: 80px 48px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.landing-bottom-cta h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-bottom: 16px;
}
.landing-bottom-cta p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 720px;
  margin: 0 auto 36px;
  line-height: 1.65;
}

/* Landing Footer */
.landing-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ========================================================
   AUTHENTICATION MODAL
   ======================================================== */
.auth-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  box-sizing: border-box;
}

.auth-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 32px 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  position: relative;
  box-sizing: border-box;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-modal-card::-webkit-scrollbar {
  width: 6px;
}
.auth-modal-card::-webkit-scrollbar-track {
  background: transparent;
}
.auth-modal-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}
body.light-theme .auth-modal-card::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s;
}
.auth-modal-close:hover {
  color: var(--text-primary);
}

.auth-modal-header {
  text-align: center;
  margin-bottom: 24px;
}
.auth-modal-header h2 {
  font-size: 1.5rem;
  font-weight: 750;
  margin-bottom: 6px;
}
.auth-modal-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.auth-tabs-row {
  display: flex;
  gap: 6px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
}
.auth-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-tab-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.auth-tab-panel {
  display: none;
}
.auth-tab-panel.active {
  display: block;
}

.auth-form-group {
  margin-bottom: 16px;
}
.auth-form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.auth-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color 0.2s;
}
.auth-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* Quick Persona Cards */
.persona-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.persona-quick-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.persona-quick-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  transform: translateX(3px);
}
.persona-avatar-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.persona-info-box {
  flex: 1;
}
.persona-name-text {
  font-weight: 700;
  font-size: 0.92rem;
}
.persona-sub-text {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ========================================================
   QUESTION BANK MODULE (IMAGE 3 DESIGN)
   ======================================================== */
.qbank-beta-banner {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.qbank-beta-tag {
  background: var(--accent-primary);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
}
.qbank-top-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

.qbank-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 1050px) {
  .qbank-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 650px) {
  .qbank-grid { grid-template-columns: 1fr; }
}

.qbank-card {
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.qbank-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.qbank-grad-math { background: linear-gradient(135deg, #f59e0b, #d97706); }
.qbank-grad-chem { background: linear-gradient(135deg, #f43f5e, #be123c); }
.qbank-grad-phys { background: linear-gradient(135deg, #0284c7, #0369a1); }
.qbank-grad-cs   { background: linear-gradient(135deg, #10b981, #047857); }
.qbank-grad-eng  { background: linear-gradient(135deg, #ea580c, #c2410c); }
.qbank-grad-bio  { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }

.qbank-subject-title {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.qbank-stat-count {
  font-size: 1.05rem;
  font-weight: 600;
  opacity: 0.95;
}
.qbank-stat-sub {
  font-size: 0.82rem;
  opacity: 0.8;
  margin-bottom: 20px;
}

.qbank-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: #ffffff;
  color: #0f172a;
  border: none;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.2s, transform 0.2s;
}
.qbank-open-btn:hover {
  background: #f1f5f9;
  transform: translateX(2px);
}

.qbank-watermark {
  position: absolute;
  right: 14px;
  bottom: 10px;
  font-size: 5.5rem;
  line-height: 1;
  opacity: 0.22;
  font-family: var(--font-mono);
  user-select: none;
  pointer-events: none;
}

/* ========================================================
   STUDY NOTES & MATERIAL MODULE (IMAGE 5 DESIGN)
   ======================================================== */
.notes-search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 18px;
  gap: 12px;
}
.notes-search-bar i {
  color: var(--text-muted);
}
.notes-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.92rem;
}
.notes-search-input:focus {
  outline: none;
}

.notes-filters-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.notes-pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.notes-filter-pill {
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.notes-filter-pill.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

.notes-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
@media (max-width: 1400px) {
  .notes-cards-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1100px) {
  .notes-cards-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 750px) {
  .notes-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

.note-cover-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}
.note-cover-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

/* White sheet illustration matching Image 5 */
.note-cover-preview {
  background: #0f172a;
  padding: 16px 12px 10px;
  display: flex;
  justify-content: center;
}
body.light-theme .note-cover-preview {
  background: #e2e8f0;
}
.note-paper-sheet {
  background: #ffffff;
  color: #0f172a;
  border-radius: 6px;
  width: 100%;
  aspect-ratio: 1 / 1.35;
  padding: 12px 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  position: relative;
}
.paper-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.paper-logo {
  font-size: 0.58rem;
  font-weight: 800;
  color: #0284c7;
  letter-spacing: 0.05em;
}
.paper-ch-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
}
.paper-title {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.paper-lines {
  flex: 1;
}
.pline {
  height: 3px;
  background: #e2e8f0;
  border-radius: 2px;
  margin-bottom: 4px;
}
.pline.short {
  width: 60%;
}
.paper-stamp {
  font-size: 0.58rem;
  font-weight: 700;
  color: #059669;
  border: 1px dashed #059669;
  padding: 2px 4px;
  border-radius: 3px;
  align-self: flex-start;
}

.note-card-meta {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.note-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}
.note-card-author {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.note-card-stats {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
  margin-bottom: 12px;
}
.note-card-btns {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.note-action-btn {
  flex: 1;
  padding: 6px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s;
}
.note-action-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* ========================================================
   SIDEBAR USER PROFILE SECTION (IMAGE 3 DESIGN)
   ======================================================== */
.sidebar-user-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  background: var(--bg-surface);
}
.user-profile-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
  overflow: hidden;
}
.user-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.user-text-meta {
  overflow: hidden;
}
.user-name-line {
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.user-plan-line {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.user-quick-logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 6px;
  transition: color 0.2s;
}
.user-quick-logout-btn:hover {
  color: var(--accent-rose);
}

/* ========================================================
   ZEN MODE ROOM (IMAGE 1 DESIGN)
   ======================================================== */
.zen-room-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}
.zen-clock-display {
  font-size: 5.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.04em;
  margin: 20px 0;
  color: var(--text-primary);
  text-shadow: 0 0 40px rgba(6, 182, 212, 0.2);
}
.zen-sound-cards-row {
  display: flex;
  gap: 16px;
  margin: 28px 0;
  flex-wrap: wrap;
  justify-content: center;
}
.zen-sound-card {
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.2s;
}
.zen-sound-card.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ========================================================
   CS LAB SANDBOX (IMAGE 4 DESIGN)
   ======================================================== */
.cs-lab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}
.cs-code-editor {
  width: 100%;
  height: 380px;
  background: #09090b;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  resize: vertical;
  line-height: 1.5;
}
.cs-console-output {
  height: 380px;
  background: #09090b;
  color: #a1a1aa;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow-y: auto;
  white-space: pre-wrap;
}

/* ========================================================
   MEET CHAMP AI COPILOT SHOWCASE STYLES
   ======================================================== */
.champ-showcase-section {
  position: relative;
  padding: 110px 48px;
  background: radial-gradient(circle at 85% 20%, rgba(99, 102, 241, 0.12), transparent 50%),
              radial-gradient(circle at 15% 85%, rgba(6, 182, 212, 0.1), transparent 50%),
              var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

.champ-showcase-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 72px;
  align-items: center;
}

.champ-visual-col {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.champ-avatar-glow-halo {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: conic-gradient(from 180deg at 50% 50%, #6366f1, #06b6d4, #10b981, #6366f1);
  filter: blur(64px);
  opacity: 0.35;
  animation: rotateHalo 18s linear infinite;
  pointer-events: none;
}

@keyframes rotateHalo {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.champ-avatar-card {
  position: relative;
  width: 100%;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(18, 20, 32, 0.75);
  backdrop-filter: blur(24px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
}
.champ-avatar-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.7), 0 0 40px rgba(6, 182, 212, 0.25);
}

.champ-hero-img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.champ-status-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  padding: 14px 20px;
  background: rgba(9, 10, 16, 0.94);
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.champ-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 2s infinite;
}

.champ-content-col {
  display: flex;
  flex-direction: column;
}

.champ-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  width: fit-content;
  margin-bottom: 12px;
}

.champ-editorial-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 12px 0 20px 0;
  color: var(--text-primary);
}
.champ-editorial-heading em {
  font-style: italic;
  background: linear-gradient(135deg, #38bdf8 0%, #a855f7 50%, #f43f5e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.champ-lead-text {
  font-size: 1.12rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 680px;
}
.champ-lead-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.champ-features-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 36px;
}

.champ-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  transition: all 0.25s ease;
}
.champ-feature-item:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateX(6px);
  background: rgba(255, 255, 255, 0.03);
}

.champ-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #38bdf8;
  flex-shrink: 0;
}

.champ-feature-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.champ-feature-text p {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.champ-actions-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* Anime / Champ Action Pill Buttons (PREVIA Modern Aesthetic) */
.anime-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  outline: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
}

.anime-pill-btn i {
  font-size: 1rem;
  transition: transform 0.25s ease;
}

.anime-pill-btn:hover i {
  transform: translateX(3px) scale(1.1);
}

.anime-pill-btn:active {
  transform: translateY(0) scale(0.97);
}

/* Primary Cyber Gradient Pill */
.anime-pill-btn.primary {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #6366f1 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4), 0 0 15px rgba(99, 102, 241, 0.25);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.anime-pill-btn.primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.6s ease;
}

.anime-pill-btn.primary:hover {
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 50%, #4f46e5 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.6), 0 0 25px rgba(99, 102, 241, 0.45);
  border-color: rgba(255, 255, 255, 0.5);
}

.anime-pill-btn.primary:hover::before {
  left: 100%;
}

/* Glass / Translucent Pill */
.anime-pill-btn.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.anime-pill-btn.glass:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(6, 182, 212, 0.5);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35), 0 0 16px rgba(6, 182, 212, 0.2);
}

/* Light Theme overrides for Champ components */
body.light-theme .champ-showcase-section {
  background: radial-gradient(circle at 85% 20%, rgba(99, 102, 241, 0.08), transparent 50%),
              radial-gradient(circle at 15% 85%, rgba(6, 182, 212, 0.06), transparent 50%),
              #f8fafc;
}
body.light-theme .champ-avatar-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}
body.light-theme .champ-status-badge {
  background: #f1f5f9;
  color: #0284c7;
  border-top-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .champ-floating-launcher {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15), 0 0 20px rgba(6, 182, 212, 0.2);
}
body.light-theme .champ-tag-name {
  color: #0f172a;
}
body.light-theme .champ-tag-status {
  color: #0284c7;
}
body.light-theme .champ-feature-item {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .champ-feature-item:hover {
  background: #f8fafc;
  border-color: #0284c7;
}

body.light-theme .anime-pill-btn.primary {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #4f46e5 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.35);
}
body.light-theme .anime-pill-btn.primary:hover {
  box-shadow: 0 8px 26px rgba(2, 132, 199, 0.5);
}
body.light-theme .anime-pill-btn.glass {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.15);
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
body.light-theme .anime-pill-btn.glass:hover {
  background: rgba(15, 23, 42, 0.09);
  border-color: #0284c7;
  color: #0284c7;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

/* Responsive queries for Champ section */
@media (max-width: 960px) {
  .champ-showcase-section {
    padding: 70px 24px;
  }
  .champ-showcase-container {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .champ-hero-img {
    height: 380px;
  }
  .champ-editorial-heading {
    font-size: 2.6rem;
  }
}

/* ========================================================
   DIAGNOSTIC TEST CENTER & EXAM SUB-TAB NAVIGATION
   ======================================================== */
.sub-tab-pills-row {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.sub-tab-pill {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.sub-tab-pill:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.sub-tab-pill.active {
  background: rgba(6, 182, 212, 0.16);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 700;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.2);
}

.palette-btn.review {
  background: rgba(168, 85, 247, 0.2);
  border-color: #a855f7;
  color: #e9d5ff;
}

.palette-legend .dot.review {
  background: #a855f7;
}

/* Neural Autopsy Report Card Styles */
.diagnostic-results-card {
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  animation: modalFadeIn 0.3s ease;
}

.autopsy-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.autopsy-score-gauge {
  text-align: center;
  padding: 16px 28px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 16px;
  backdrop-filter: blur(12px);
}

.score-number {
  font-size: 2.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #38bdf8;
  line-height: 1.1;
}

.score-sub {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 4px;
}

.autopsy-bias-badge {
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.autopsy-bias-badge.danger {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fda4af;
}
.autopsy-bias-badge.warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
}
.autopsy-bias-badge.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}

.gaps-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.gap-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px 18px;
  transition: border-color 0.2s;
}
.gap-card:hover {
  border-color: rgba(244, 63, 94, 0.4);
}

.gap-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.autopsy-review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.autopsy-q-row {
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  transition: transform 0.15s ease;
}
.autopsy-q-row:hover {
  transform: translateX(4px);
}
.autopsy-q-row.correct {
  border-left: 4px solid #10b981;
}
.autopsy-q-row.wrong {
  border-left: 4px solid #f43f5e;
}

/* Light Theme Adjustments */
body.light-theme .sub-tab-pill {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  color: #475569;
}
body.light-theme .sub-tab-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
}
body.light-theme .sub-tab-pill.active {
  background: rgba(2, 132, 199, 0.12);
  border-color: #0284c7;
  color: #0284c7;
}
body.light-theme .diagnostic-results-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-theme .autopsy-score-gauge {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.2);
}
body.light-theme .gap-card {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .autopsy-q-row {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}

/* ========================================================
   CYBERNETIC IRIS THREE.JS PARTICLE ENGINE (#07080f)
   ======================================================== */
.cyber-iris-section {
  position: relative;
  max-width: 1360px;
  margin: 0 auto;
  padding: 80px 32px 70px;
}

.cyber-iris-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 36px;
}

.section-tag-pill.cyber-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  border-radius: 9999px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.cyber-iris-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.4rem, 4.8vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 16px;
}

.cyber-iris-sub {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-muted);
}
.cyber-iris-sub code {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.cyber-iris-container {
  position: relative;
  width: 100%;
  height: 660px;
  min-height: 520px;
  max-height: 85vh;
  border-radius: 20px;
  overflow: hidden;
  background-color: #07080f;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.95), 0 0 50px rgba(6, 182, 212, 0.15);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cyber-iris-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

/* Fullscreen Mode Override */
.cyber-iris-container.fullscreen-mode {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  z-index: 999999 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  background-color: #07080f !important;
}

.cyber-iris-overlay-controls {
  position: absolute;
  top: 20px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 25;
}

.cyber-iris-hud-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  pointer-events: auto;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(7, 8, 15, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #cbd5e1;
  padding: 6px 14px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.hud-pill .text-cyan { color: #38bdf8; }
.hud-pill .text-blue { color: #3b82f6; }
.hud-pill .text-purple { color: #a855f7; }
.hud-pill .text-emerald { color: #10b981; }

.cyber-iris-action-btns {
  pointer-events: auto;
}

.iris-ctrl-btn {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.28), rgba(59, 130, 246, 0.32));
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: #ffffff;
  padding: 9px 22px;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
  backdrop-filter: blur(10px);
}
.iris-ctrl-btn:hover {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.55);
}

.cyber-iris-container.fullscreen-mode .iris-ctrl-btn {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.65);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}
.cyber-iris-container.fullscreen-mode .iris-ctrl-btn:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: #ef4444;
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.5);
}

.cyber-iris-interaction-hint {
  position: absolute;
  bottom: 20px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(7, 8, 15, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 7px 18px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  pointer-events: none;
  z-index: 25;
}

/* Light Theme fallback - keeps canvas pure dark with nice outer framing */
body.light-theme .cyber-iris-heading {
  color: #0f172a;
}
body.light-theme .cyber-iris-sub {
  color: #475569;
}
body.light-theme .cyber-iris-container {
  border-color: rgba(2, 132, 199, 0.3);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2), 0 0 30px rgba(2, 132, 199, 0.15);
}

@media (max-width: 768px) {
  .cyber-iris-container {
    height: 460px;
  }
  .cyber-iris-hud-badges .hud-pill:nth-child(n+3) {
    display: none;
  }
  .cyber-iris-interaction-hint {
    font-size: 0.72rem;
    padding: 5px 12px;
    bottom: 12px;
    left: 14px;
  }
}

/* ========================================================
   STUDYOS V2.0 INSPIRED: SIDEBAR QUICK ACTIONS DOCK
   ======================================================== */
.sidebar-quick-actions {
  padding: 12px 14px;
  margin: 12px 10px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.quick-actions-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #60a5fa; /* Electric Sapphire Accent */
  margin-bottom: 8px;
  padding-left: 2px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.quick-act-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.quick-act-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

/* Quick Scratchpad Widget in Dashboard */
.quick-scratchpad-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.quick-scratchpad-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 70px;
  box-sizing: border-box;
}
.quick-scratchpad-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
}

/* ========================================================
   STUDYOS V2.0 INSPIRED: PERSONAL NOTES STUDIO
   ======================================================== */
.notes-studio-container {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  min-height: 680px;
}

@media (max-width: 992px) {
  .notes-studio-container {
    grid-template-columns: 1fr;
  }
}

/* Left Column: Sidebar Directory */
.studio-sidebar-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 820px;
}

.studio-sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
}

.studio-header-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.studio-header-sub {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.studio-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 8px 12px;
}
.studio-search-bar input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.8rem;
  width: 100%;
  outline: none;
}

.studio-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.studio-pills-scroll {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}
.studio-pills-scroll::-webkit-scrollbar { display: none; }

.studio-sub-pill {
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.studio-sub-pill:hover,
.studio-sub-pill.active {
  background: var(--accent-cyan);
  color: #07080f;
  border-color: var(--accent-cyan);
  font-weight: 700;
}

.studio-star-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 9px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.studio-star-toggle.active {
  color: #f59e0b;
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
}

.studio-notes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 560px;
  padding-right: 4px;
}

.studio-note-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.studio-note-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateX(2px);
}
.studio-note-item.active {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 18px rgba(6, 182, 212, 0.15);
}

.note-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.note-subject-pill {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.note-subject-pill.badge-chem { background: rgba(244, 63, 94, 0.2); color: #fb7185; }
.note-subject-pill.badge-math { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.note-subject-pill.badge-phys { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.note-subject-pill.badge-bio { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.note-subject-pill.badge-cs { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
.note-subject-pill.badge-gen { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }

.note-star-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.note-star-btn.starred {
  color: #f59e0b;
}

.note-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.note-item-snippet {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.note-item-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.note-tag-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--accent-cyan);
}

/* Right Column: Editorial Markdown Editor */
.studio-editor-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.studio-editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}

.editor-header-inputs {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 280px;
}

.editor-title-input {
  background: transparent;
  border: none;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary);
  width: 100%;
  outline: none;
}
.editor-title-input:focus {
  border-bottom: 1px dashed var(--accent-cyan);
}

.editor-sub-select-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  shrink: 0;
}

.note-editor-star-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.note-editor-star-btn.starred {
  color: #f59e0b;
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
}

.editor-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-spark-btn {
  background: #0f172a;
  border: 1px solid #3b82f6;
  color: #60a5fa;
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.ai-spark-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

.ai-pill-action-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 6px 13px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.ai-pill-action-btn:hover {
  background: var(--accent-cyan);
  color: #07080f;
  border-color: var(--accent-cyan);
}

.editor-util-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.editor-util-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}
.editor-util-btn.danger:hover {
  color: #ef4444;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Format Helper Toolbar */
.studio-format-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.format-btn-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.format-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: all 0.15s;
}
.format-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.format-counts-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.count-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Main Textarea */
.studio-textarea-wrapper {
  flex: 1;
  min-height: 380px;
}

.studio-markdown-editor {
  width: 100%;
  height: 100%;
  min-height: 380px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  padding: 8px 4px;
  box-sizing: border-box;
}

/* Bottom Bar */
.studio-editor-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  font-size: 0.78rem;
}

.editor-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 500px;
}

.editor-tags-input {
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  width: 100%;
  outline: none;
}
.editor-tags-input:focus {
  border-bottom: 1px dashed var(--accent-cyan);
}

.editor-autosave-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* AI Assistant Canvas inside Notes */
.note-ai-canvas {
  margin: 10px 0;
  animation: fadeIn 0.25s ease-out;
}

.ai-note-response-box {
  background: #090812;
  border: 1px solid rgba(163, 230, 53, 0.4);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.ai-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.ai-spark-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.modal-close-sm {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
}
.modal-close-sm:hover { color: #ffffff; }

.ai-principle-card {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
}
.ai-principle-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: #60a5fa;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.ai-summary-bullets ul {
  padding-left: 20px;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #cbd5e1;
}
.ai-summary-bullets li {
  margin-bottom: 6px;
}

.ai-box-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Quiz UI inside Note */
.note-quiz-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.quiz-q-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-cyan);
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.quiz-q-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 600px) {
  .quiz-options-grid { grid-template-columns: 1fr; }
}

.quiz-opt-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.quiz-opt-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-cyan);
}
.quiz-opt-btn.correct {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}
.quiz-opt-btn.incorrect {
  background: rgba(244, 63, 94, 0.25) !important;
  border-color: #f43f5e !important;
  color: #fb7185 !important;
}
.opt-letter {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

.quiz-feedback-box {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.5;
}
.quiz-feedback-box.correct {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
}
.quiz-feedback-box.incorrect {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid #f43f5e;
  color: #fb7185;
}

/* 3D Flashcards inside Note */
.flashcard-3d-wrapper {
  perspective: 1000px;
  min-height: 200px;
  cursor: pointer;
  margin-bottom: 16px;
}
.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 200px;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}
.flashcard-3d-wrapper.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
}
.flashcard-back {
  transform: rotateY(180deg);
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.35);
}

.fc-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
}
.fc-badge.highlight { color: #60a5fa; }

.fc-content {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
  max-width: 580px;
}

.fc-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.flashcard-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Light Theme Overrides for Personal Notes Studio */
body.light-theme .studio-sidebar-panel,
body.light-theme .studio-editor-panel,
body.light-theme .quick-scratchpad-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.09);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}
body.light-theme .studio-search-bar,
body.light-theme .quick-scratchpad-input,
body.light-theme .studio-format-toolbar {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .studio-note-item {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.06);
}
body.light-theme .studio-note-item.active {
  background: rgba(2, 132, 199, 0.08);
  border-color: #0284c7;
}
body.light-theme .studio-markdown-editor {
  color: #0f172a;
}
body.light-theme .ai-note-response-box {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 10px 30px rgba(2, 132, 199, 0.15);
}
body.light-theme .quick-act-btn {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.08);
  color: #334155;
}
body.light-theme .quick-actions-title {
  color: #4d7c0f;
}

/* ========================================================
   EDU-PREDICT BESPOKE DESIGN SYSTEM: ELECTRIC SAPPHIRE & COBALT THEME
   Inspired by Deep Space Science & Neural Particles
   Vibrant Royal Blue: #2563eb / #3b82f6 / #60a5fa & Deep Obsidian #0b0d14
   ======================================================== */

/* Blue Box Screenshot Showcase Component */
.blue-box-ss-container {
  position: relative;
  border-radius: 26px;
  padding: 3px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  box-shadow: 0 16px 48px rgba(37, 99, 235, 0.4), 0 0 45px rgba(59, 130, 246, 0.25);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 16px 0;
}
.blue-box-ss-container:hover {
  transform: translateY(-3px) scale(1.008);
  box-shadow: 0 24px 64px rgba(37, 99, 235, 0.55), 0 0 60px rgba(59, 130, 246, 0.4);
}
.blue-box-ss-frame {
  background: #090c16;
  border-radius: 23px;
  padding: 18px;
  overflow: hidden;
}
.blue-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding: 0 4px;
  flex-wrap: wrap;
  gap: 12px;
}
.blue-box-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}
.blue-box-icon-img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.6);
  flex-shrink: 0;
}
.blue-box-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #60a5fa;
  text-transform: uppercase;
}
.blue-box-heading {
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 1px;
  letter-spacing: -0.01em;
}
.blue-box-live-btn {
  background: rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #93c5fd;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.blue-box-live-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
}
.pulse-dot-cyan {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseDot 2s infinite;
}
.blue-box-media-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: #07080f;
}
.blue-box-screenshot-img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.blue-box-ss-container:hover .blue-box-screenshot-img {
  transform: scale(1.02);
}
.blue-box-glass-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: linear-gradient(to top, rgba(7, 8, 15, 0.95) 10%, rgba(7, 8, 15, 0.4) 60%, transparent);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.blue-box-stats-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bb-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.28);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Workspace Header Search Trigger (⌘K) */
.workspace-search-trigger {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 20px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 260px;
}
.workspace-search-trigger:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(59, 130, 246, 0.5);
  color: #93c5fd;
}
.search-kbd-chip {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  color: #93c5fd;
}

/* Custom Electric Sapphire Active Nav Pill */
.sidebar .nav-links li {
  margin: 3px 8px;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.sidebar .nav-links li:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #93c5fd;
}
.sidebar .nav-links li.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.45) !important;
}
.sidebar .nav-links li.active i,
.sidebar .nav-links li.active span {
  color: #ffffff !important;
}
.sidebar .nav-links li.active .tab-indicator {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  border: none !important;
}

/* Greeting Header */
.studyos-greeting-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.studyos-greeting-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.studyos-greeting-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.studyos-header-actions {
  display: flex;
  gap: 10px;
}
.studyos-action-btn {
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  transition: all 0.2s ease;
}
.studyos-action-btn.primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.studyos-action-btn.primary:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}
.studyos-action-btn.secondary {
  background: rgba(37, 99, 235, 0.08);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.studyos-action-btn.secondary:hover {
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(59, 130, 246, 0.45);
}

/* 5 High-Impact Metric Stat Cards */
.studyos-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.studyos-stat-card {
  background: #111420;
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 125px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.studyos-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}
.stat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stat-card-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.stat-card-icon-pill {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}
.stat-card-icon-pill.green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.stat-card-icon-pill.cyan { background: rgba(37, 99, 235, 0.2); color: #60a5fa; }
.stat-card-icon-pill.amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.stat-card-icon-pill.rose { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
.stat-card-icon-pill.purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

.stat-card-number {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 8px 0 4px;
}
.stat-unit {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.stat-card-footer {
  font-size: 0.76rem;
}

/* Personal AI Insight Recommendation Banner */
.personal-ai-insight-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(6, 182, 212, 0.08)), #111420;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 18px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.12);
}
.ai-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 280px;
}
.ai-banner-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}
.ai-banner-title {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #60a5fa;
  margin-bottom: 2px;
}
.ai-banner-body {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.5;
}
.ai-banner-actions {
  display: flex;
  gap: 10px;
}
.ai-pill-btn {
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ai-pill-btn.primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.35);
}
.ai-pill-btn.primary:hover {
  filter: brightness(1.12);
}
.ai-pill-btn.secondary {
  background: rgba(37, 99, 235, 0.08);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.ai-pill-btn.secondary:hover {
  background: rgba(37, 99, 235, 0.16);
}

/* 2-Column Grid Layout */
.studyos-dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
}
@media (max-width: 1080px) {
  .studyos-dashboard-grid {
    grid-template-columns: 1fr;
  }
}
.studyos-content-card {
  background: #111420;
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}
.studyos-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.studyos-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}
.studyos-card-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.studyos-card-link-btn {
  background: none;
  border: none;
  color: #60a5fa;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.studyos-card-link-btn:hover {
  text-decoration: underline;
}
.studyos-status-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
}
.studyos-status-pill.on-track {
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Schedule Timeline Items */
.schedule-timeline-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.schedule-timeline-item {
  display: flex;
  gap: 14px;
  position: relative;
}
.timeline-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3b82f6;
  margin-top: 14px;
  flex-shrink: 0;
  box-shadow: 0 0 10px #3b82f6;
}
.schedule-entry-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
}
.schedule-entry-card:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}
.schedule-entry-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}
.schedule-entry-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}
.schedule-type-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}
.schedule-type-pill.lecture { background: rgba(37, 99, 235, 0.2); color: #93c5fd; }
.schedule-type-pill.lab { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.schedule-type-pill.seminar { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

/* Weekly Hours Vertical Chart */
.weekly-hours-chart {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  height: 160px;
  padding-top: 24px;
}
.weekly-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 38px;
  position: relative;
}
.bar-track {
  flex: 1;
  width: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.bar-fill {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.35);
  border-radius: 10px;
  transition: height 0.5s ease;
}
.bar-day-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 8px;
}
.bar-value-tooltip {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: #60a5fa;
  margin-bottom: 4px;
}

/* Upcoming Deadlines Checklist */
.deadlines-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.deadline-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.deadline-item-card:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}
.deadline-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.deadline-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: transparent;
  transition: all 0.15s ease;
}
.deadline-checkbox.checked {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #3b82f6;
  color: #ffffff;
}
.deadline-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}
.deadline-title.line-through {
  text-decoration: line-through;
  color: var(--text-muted);
}
.deadline-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
}
.deadline-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.deadline-due-date {
  font-size: 0.74rem;
  color: var(--text-secondary);
}
.deadline-priority-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}
.deadline-priority-badge.high { background: rgba(244, 63, 94, 0.15); color: #f43f5e; }
.deadline-priority-badge.medium { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.deadline-priority-badge.low { background: rgba(16, 185, 129, 0.15); color: #10b981; }

/* Focus Pomodoro 25:00 Widget */
.focus-card-wrapper {
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.15), transparent 70%), #111420;
  border: 1px solid rgba(59, 130, 246, 0.25);
  text-align: center;
}
.focus-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.focus-title-group {
  text-align: left;
}
.focus-pill-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: #60a5fa;
  letter-spacing: 0.08em;
}
.focus-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
}
.zen-btn-link {
  background: none;
  border: none;
  color: #60a5fa;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.focus-timer-clock-display {
  font-family: var(--font-mono);
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 12px 0 4px;
  color: #60a5fa;
  text-shadow: 0 0 28px rgba(37, 99, 235, 0.55);
}
.focus-sub-tag {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.dashboard-focus-start-btn {
  width: 100%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 14px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}
.dashboard-focus-start-btn:hover {
  filter: brightness(1.12);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.55);
  transform: translateY(-1px);
}
.focus-footer-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

/* Exam Countdown List */
.exam-countdown-list {
  display: flex;
  flex-direction: column;
}
.exam-countdown-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(59, 130, 246, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
}
.exam-item-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 8px;
}
.exam-progress-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}
.exam-progress-bar {
  height: 100%;
  background: #3b82f6;
  border-radius: 6px;
}
.exam-progress-bar.amber {
  background: var(--accent-amber);
}
.exam-item-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* ================= ASSIGNMENTS MANAGER TAB ================= */
.assignments-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.assign-filter-group {
  display: flex;
  gap: 8px;
}
.assign-filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.assign-filter-btn.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border-color: #3b82f6;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}
.assign-stats-chip {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.assignments-container-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.assignment-full-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #111420;
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-radius: 14px;
  transition: all 0.2s ease;
}
.assignment-full-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.12);
}
.assign-left-group {
  display: flex;
  align-items: center;
  gap: 16px;
}
.assign-checkbox-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--border-hover);
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.15s ease;
}
.assign-checkbox-btn.checked {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #3b82f6;
  color: #ffffff;
}
.assign-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}
.assign-title.line-through {
  text-decoration: line-through;
  color: var(--text-muted);
}
.assign-sub-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.assign-subject-pill {
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  color: #93c5fd;
}
.assign-right-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.assign-del-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.15s ease;
}
.assign-del-btn:hover {
  color: var(--accent-rose);
}

/* ================= AI TUTOR TAB ================= */
.ai-tutor-workspace-layout {
  max-width: 900px;
  margin: 0 auto;
}
.tutor-chat-stream-card {
  background: #111420;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 680px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.tutor-chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(37, 99, 235, 0.04);
}
.tutor-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.clear-chat-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
}
.tutor-quick-prompts-bar {
  padding: 10px 16px;
  background: rgba(37, 99, 235, 0.02);
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  display: flex;
  gap: 8px;
  overflow-x: auto;
}
.tutor-chip-btn {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.tutor-chip-btn:hover {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  color: #ffffff;
}
.tutor-messages-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tutor-msg-item {
  display: flex;
  gap: 14px;
  max-width: 85%;
}
.tutor-msg-item.user-msg {
  margin-left: auto;
  flex-direction: row-reverse;
}
.tutor-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(37, 99, 235, 0.15);
}
.tutor-msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tutor-msg-bubble {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-radius: 14px;
  padding: 14px 18px;
}
.user-msg .tutor-msg-bubble {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
}
.tutor-msg-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.78rem;
}
.tutor-msg-time {
  color: var(--text-muted);
  font-size: 0.7rem;
}
.tutor-msg-content {
  font-size: 0.88rem;
  line-height: 1.6;
}
.tutor-input-bar-wrap {
  padding: 14px 20px;
  border-top: 1px solid rgba(59, 130, 246, 0.12);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(37, 99, 235, 0.02);
}
.tutor-text-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 12px;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
}
.tutor-text-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}
.tutor-attach-btn {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.tutor-send-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.35);
}

/* ================= ATTENDANCE TRACKER TAB ================= */
.attendance-top-summary-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  background: #111420;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  align-items: center;
}
@media (max-width: 768px) {
  .attendance-top-summary-card {
    grid-template-columns: 1fr;
  }
}
.att-gauge-block {
  text-align: center;
  border-right: 1px solid rgba(59, 130, 246, 0.12);
  padding-right: 24px;
}
.att-gauge-number {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: -0.03em;
}
.att-gauge-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}
.att-gauge-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}
.att-notice-block {
  font-size: 0.95rem;
  line-height: 1.6;
}
.safe-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}
.safe-badge-pill.safe {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}
.safe-badge-pill.danger {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
}
.attendance-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.attendance-card {
  background: #111420;
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-radius: 16px;
  padding: 18px 20px;
}
.attendance-card.critical-border {
  border-color: rgba(244, 63, 94, 0.4);
}
.att-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.att-subject-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.att-pct-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
}
.att-pct-pill.safe { background: rgba(37, 99, 235, 0.2); color: #93c5fa; }
.att-pct-pill.danger { background: rgba(244, 63, 94, 0.15); color: #f43f5e; }
.att-teacher-text {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin: 4px 0 14px;
}
.att-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
}
.att-progress-bar {
  height: 100%;
  background: #3b82f6;
  border-radius: 6px;
}
.att-progress-bar.danger {
  background: #f43f5e;
}
.att-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.att-action-buttons {
  display: flex;
  gap: 8px;
}
.att-btn {
  flex: 1;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.att-btn.present {
  background: rgba(37, 99, 235, 0.18);
  color: #93c5fd;
}
.att-btn.present:hover {
  background: rgba(37, 99, 235, 0.3);
}
.att-btn.absent {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
}
.att-btn.absent:hover {
  background: rgba(244, 63, 94, 0.25);
}

/* ================= STUDY PLANNER TAB ================= */
.planner-grid-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}
@media (max-width: 900px) {
  .planner-grid-layout {
    grid-template-columns: 1fr;
  }
}
.planner-goal-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.planner-goal-left {
  width: 140px;
  display: flex;
  flex-direction: column;
}
.planner-goal-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}
.planner-goal-hours {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.planner-goal-bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
}
.planner-goal-bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.4s ease;
}
.planner-goal-pct {
  width: 45px;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.milestones-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.milestone-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  font-size: 0.85rem;
}
.milestone-check-item.done span {
  color: var(--text-muted);
  text-decoration: line-through;
}

/* ================= COGNITIVE ANALYTICS TAB ================= */
.analytics-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 860px) {
  .analytics-layout-grid {
    grid-template-columns: 1fr;
  }
}
.analytics-chapter-card {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 12px;
  margin-bottom: 12px;
}
.analytics-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}
.analytics-ch-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}
.analytics-ch-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}
.analytics-status-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}
.analytics-status-pill.high-risk { background: rgba(244, 63, 94, 0.15); color: #f43f5e; }
.analytics-status-pill.moderate-risk { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.analytics-status-pill.stable,
.analytics-status-pill.mastered { background: rgba(37, 99, 235, 0.2); color: #93c5fd; }
.analytics-retention-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.analytics-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}
.analytics-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 6px;
}
.analytics-fill.danger {
  background: #f43f5e;
}
.calibration-stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.calib-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.calib-num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
}
.calib-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ================= GLOBAL COMMAND PALETTE MODAL ================= */
.command-palette-dialog {
  width: 100%;
  max-width: 640px;
  background: #111420;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(37, 99, 235, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.palette-input-wrap {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  background: rgba(37, 99, 235, 0.04);
}
.palette-search-icon {
  color: #60a5fa;
  font-size: 1.1rem;
  margin-right: 12px;
}
.palette-search-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
}
.palette-close-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
}
.palette-results-container {
  max-height: 380px;
  overflow-y: auto;
  padding: 12px 14px;
}
.search-hit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.search-hit-item:hover {
  background: rgba(37, 99, 235, 0.14);
}
.search-hit-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  color: #60a5fa;
}
.search-hit-info {
  flex: 1;
}
.search-hit-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}
.search-hit-cat {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.search-hit-arrow {
  color: var(--text-dim);
  font-size: 0.8rem;
}
.palette-footer-row {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 10px 20px;
  border-top: 1px solid rgba(59, 130, 246, 0.1);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(37, 99, 235, 0.02);
}
.palette-footer-row kbd {
  font-family: var(--font-mono);
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  padding: 2px 5px;
  border-radius: 4px;
}

/* Light Mode Overrides for Electric Sapphire Theme */
body.light-theme .studyos-stat-card,
body.light-theme .studyos-content-card,
body.light-theme .attendance-top-summary-card,
body.light-theme .attendance-card,
body.light-theme .assignment-full-card,
body.light-theme .tutor-chat-stream-card,
body.light-theme .command-palette-dialog {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
}
body.light-theme .personal-ai-insight-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(6, 182, 212, 0.08)), #ffffff;
  border-color: rgba(37, 99, 235, 0.35);
}
body.light-theme .studyos-greeting-title,
body.light-theme .studyos-card-title {
  color: #0f172a;
}
body.light-theme .workspace-search-trigger {
  background: #f1f5f9;
  border-color: rgba(37, 99, 235, 0.2);
  color: #1e3a8a;
}

/* ========================================================
   QUESTION BANK HUB ENHANCEMENTS (CLASSES 9, 10, 11, 12)
   ======================================================== */
.qbank-top-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.16);
}
.qbank-header-left {
  flex: 1;
  min-width: 280px;
}
.qbank-kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #60a5fa;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.qbank-main-heading {
  font-size: 1.65rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
}
.qbank-sub-heading {
  font-size: 0.86rem;
  color: #94a3b8;
  max-width: 680px;
  line-height: 1.45;
  margin: 0;
}
.qbank-class-pills-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.qbank-class-pill {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #cbd5e1;
  padding: 7px 16px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}
.qbank-class-pill:hover {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(96, 165, 250, 0.5);
  color: #ffffff;
}
.qbank-class-pill.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #60a5fa;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}
.qbank-card-class-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Practice Modal Interactive Question Styles */
.practice-question-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 12px;
  padding: 22px;
  margin-top: 14px;
}
.practice-q-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.practice-q-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.6;
  margin-bottom: 18px;
}
.practice-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.practice-opt-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #e2e8f0;
}
.practice-opt-item:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}
.practice-opt-item.correct {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: #10b981 !important;
  color: #a7f3d0 !important;
}
.practice-opt-item.wrong,
.practice-opt-item.incorrect {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}
.practice-opt-letter,
.opt-key-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.practice-opt-text,
.opt-text {
  font-size: 0.92rem;
  font-weight: 500;
}
.practice-solution-box {
  background: rgba(37, 99, 235, 0.08);
  border-left: 4px solid #3b82f6;
  border-radius: 0 8px 8px 0;
  padding: 16px;
  margin-top: 14px;
}
.practice-sol-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #60a5fa;
  margin-bottom: 8px;
}
.practice-sol-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #e2e8f0;
  margin-bottom: 14px;
}
.practice-sol-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ========================================================
   NCERT READER MODULE (IMAGES 1, 2, 3, 4 DESIGN)
   ======================================================== */
.ncert-reader-header-wrap {
  margin-bottom: 24px;
}
.ncert-hero-title-group {
  margin-bottom: 16px;
}
.ncert-main-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
}
.ncert-main-sub {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0;
}

.ncert-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.16);
}
.ncert-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 300px;
  flex: 1;
  max-width: 480px;
}
.ncert-search-icon {
  position: absolute;
  left: 14px;
  color: #60a5fa;
  font-size: 0.85rem;
  pointer-events: none;
}
.ncert-search-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 9999px;
  padding: 8px 40px 8px 36px;
  color: #f8fafc;
  font-size: 0.86rem;
  outline: none;
  transition: all 0.2s ease;
}
.ncert-search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  background: rgba(15, 23, 42, 0.95);
}
.ncert-search-slash {
  position: absolute;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  padding: 1px 6px;
  border-radius: 4px;
  pointer-events: none;
}

.ncert-class-pills-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ncert-class-pill {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #cbd5e1;
  padding: 7px 16px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}
.ncert-class-pill:hover {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(96, 165, 250, 0.5);
  color: #ffffff;
}
.ncert-class-pill.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #60a5fa;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.ncert-shelf-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 20px 0;
}
.ncert-shelf-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ncert-shelf-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}
.ncert-class-tag-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 2px 8px;
  border-radius: 9999px;
}
.ncert-shelf-count {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 500;
}

/* Textbook Covers Grid (Images 1, 2, 3, 4) */
.ncert-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 22px;
  margin-top: 10px;
}
.ncert-book-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.22s ease;
}
.ncert-book-card:hover {
  transform: translateY(-5px);
}
.ncert-cover-canvas {
  aspect-ratio: 1 / 1.38;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}
.ncert-book-card:hover .ncert-cover-canvas {
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.25);
}
.book-spine-binding {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 14px;
  background: linear-gradient(90deg, rgba(0,0,0,0.45) 0%, rgba(255,255,255,0.18) 40%, rgba(0,0,0,0.2) 80%, transparent 100%);
  z-index: 2;
  border-right: 1px solid rgba(0,0,0,0.25);
}
.book-cover-inner {
  padding-left: 8px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.book-mini-ncert {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.book-cover-title {
  font-size: 1.28rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.22;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
  margin-bottom: 6px;
}
.book-cover-sub {
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.35;
  margin-bottom: auto;
}
.book-class-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 3px 8px;
  border-radius: 9999px;
  display: inline-block;
  align-self: flex-start;
  margin-top: 12px;
}
.book-watermark-overlay {
  position: absolute;
  right: 8px;
  bottom: 6px;
  font-size: 3.8rem;
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.ncert-book-meta {
  padding: 10px 4px 4px 4px;
}
.ncert-book-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ncert-chapter-count {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}

/* NCERT Modal Directory & Reader View */
.ncert-chapters-directory {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
}
.ncert-ch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 10px;
  padding: 14px 18px;
  transition: all 0.2s ease;
  gap: 16px;
}
.ncert-ch-row:hover {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(96, 165, 250, 0.35);
}
.ncert-ch-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.ncert-ch-idx {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ncert-ch-info {
  flex: 1;
  min-width: 0;
}
.ncert-ch-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 2px;
}
.ncert-ch-author {
  font-size: 0.78rem;
  color: #60a5fa;
  font-weight: 500;
  margin-bottom: 4px;
}
.ncert-ch-summary {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
}
.ncert-read-ch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: 1px solid #3b82f6;
  border-radius: 9999px;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.ncert-read-ch-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.ncert-reader-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.16);
  flex-wrap: wrap;
  gap: 10px;
}
.ncert-reader-book-tag {
  font-size: 0.82rem;
  font-weight: 700;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 4px 12px;
  border-radius: 9999px;
}
.ncert-toolbar-tools {
  display: flex;
  gap: 8px;
}
.ncert-tool-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.ncert-tool-btn:hover {
  background: rgba(37, 99, 235, 0.2);
  color: #ffffff;
}
.ncert-tool-btn.primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #3b82f6;
  color: #fff;
}
.ncert-content-body-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  padding: 22px;
}
.ncert-study-tips-callout {
  background: rgba(245, 158, 11, 0.08);
  border-left: 4px solid #f59e0b;
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #e2e8f0;
}

/* ========================================================
   FORMULA SHEETS MODULE (IMAGE 5 DESIGN)
   ======================================================== */
.formula-class-pills-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.formula-class-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}
.formula-class-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
}
.formula-class-pill:hover {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(96, 165, 250, 0.45);
  color: #f1f5f9;
  transform: translateY(-1px);
}
.formula-class-pill.active {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  border-color: #60a5fa;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}
.formula-subject-pills-row {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.formula-subject-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.formula-subject-pill:hover {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(96, 165, 250, 0.5);
  color: #ffffff;
}
.formula-subject-pill .f-count-badge {
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
}
.formula-subject-pill.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #60a5fa;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.formula-subject-pill.active .f-count-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.formula-shelf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}
.formula-shelf-title-group {
  display: flex;
  align-items: center;
}
.formula-main-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #f8fafc;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}
.formula-sheets-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 3px 10px;
  border-radius: 9999px;
}
.formula-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 9999px;
  padding: 6px 14px;
  min-width: 280px;
}
.formula-search-box i {
  color: #60a5fa;
  font-size: 0.85rem;
}
.formula-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  font-size: 0.85rem;
  width: 100%;
}

.formula-sheets-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.formula-sheet-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 12px;
  transition: all 0.2s ease;
}
.formula-sheet-row:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(96, 165, 250, 0.4);
  transform: translateX(3px);
}
.sheet-idx-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sheet-meta-group {
  flex: 1;
  min-width: 0;
}
.sheet-unit-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #60a5fa;
  margin-bottom: 2px;
}
.sheet-chapter-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 3px;
}
.sheet-summary-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 600px;
}
.sheet-topics-badge {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 9999px;
  white-space: nowrap;
}
.sheet-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.sheet-read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #60a5fa;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 10px;
  transition: all 0.2s ease;
}
.sheet-read-link:hover {
  color: #93c5fd;
  transform: translateX(3px);
}
.sheet-more-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}
.sheet-more-btn:hover {
  background: rgba(37, 99, 235, 0.3);
  color: #ffffff;
}

/* Formula Modal Styles */
.formula-cards-scroll-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
}
.formula-eq-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  padding: 16px;
}
.formula-eq-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.formula-eq-num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #60a5fa;
  font-size: 0.85rem;
}
.formula-eq-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}
.formula-eq-box {
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  overflow-x: auto;
}
.formula-eq-box code {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  color: #38bdf8;
  font-weight: 600;
}
.formula-eq-desc {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

/* Light Mode Overrides for NCERT, Formulas, and Question Bank */
body.light-theme .qbank-top-nav-bar,
body.light-theme .ncert-controls-bar {
  border-color: rgba(37, 99, 235, 0.15);
}
body.light-theme .qbank-main-heading,
body.light-theme .ncert-main-title,
body.light-theme .ncert-shelf-heading,
body.light-theme .formula-main-title,
body.light-theme .ncert-book-title,
body.light-theme .sheet-chapter-title,
body.light-theme .formula-eq-name,
body.light-theme .practice-q-text {
  color: #0f172a;
}
body.light-theme .qbank-class-pill,
body.light-theme .ncert-class-pill,
body.light-theme .formula-subject-pill {
  background: #f1f5f9;
  border-color: rgba(37, 99, 235, 0.2);
  color: #334155;
}
body.light-theme .qbank-class-pill.active,
body.light-theme .ncert-class-pill.active,
body.light-theme .formula-subject-pill.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
}
body.light-theme .ncert-search-input,
body.light-theme .formula-search-box {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.25);
  color: #0f172a;
}
body.light-theme .formula-sheet-row,
body.light-theme .ncert-ch-row,
body.light-theme .practice-question-card,
body.light-theme .formula-eq-card,
body.light-theme .ncert-content-body-card {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.06);
}
body.light-theme .practice-opt-item {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}
body.light-theme .formula-eq-box {
  background: #f8fafc;
  border-color: rgba(37, 99, 235, 0.2);
}
body.light-theme .formula-eq-box code {
  color: #1d4ed8;
}

/* ========================================================
   AUTHENTICATION & GOOGLE SIGN-IN ENHANCEMENTS
   ======================================================== */
.google-signin-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.google-signin-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-glass);
}
.auth-divider span {
  padding: 0 12px;
}
.auth-role-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.role-radio-card {
  cursor: pointer;
}
.role-radio-card input {
  display: none;
}
.role-radio-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 10px;
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-glass);
  transition: all 0.2s ease;
}
.role-radio-card input:checked + .role-radio-content {
  background: rgba(37, 99, 235, 0.15);
  border-color: #3b82f6;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.3);
}
.role-icon {
  font-size: 1.25rem;
}
.role-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}
.badge-role {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  display: inline-block;
  margin-left: 6px;
}
.badge-role.admin {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}
.badge-role.teacher {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.badge-role.student {
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.4);
}
.header-role-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
}
.header-role-badge:hover {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
}
.role-chip {
  font-size: 0.64rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
}
.role-chip.admin { background: #3b82f6; color: #fff; }
.role-chip.teacher { background: #10b981; color: #fff; }
.role-chip.student { background: #06b6d4; color: #fff; }

/* Google Account Selection Modal */
.google-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.google-auth-modal {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  color: #1f2937;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.google-header {
  text-align: center;
  margin-bottom: 20px;
}
.google-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 8px;
  color: #111827;
}
.google-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 4px;
}
.google-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.google-acc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.google-acc-item:hover {
  background: #f3f4f6;
  border-color: #3b82f6;
}
.acc-avatar {
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef2ff;
  border-radius: 50%;
}
.acc-info {
  flex: 1;
}
.acc-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #111827;
}
.acc-email {
  font-size: 0.78rem;
  color: #6b7280;
}
.google-footer {
  margin-top: 20px;
  text-align: right;
}
.google-cancel-btn {
  padding: 8px 16px;
  border-radius: 8px;
  background: #f3f4f6;
  border: none;
  color: #4b5563;
  font-weight: 600;
  cursor: pointer;
}
.google-cancel-btn:hover { background: #e5e7eb; }

/* ========================================================
   FACULTY & ADMIN PORTAL VIEW STYLES
   ======================================================== */
.admin-welcome-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.admin-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}
.admin-banner-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0 0 6px 0;
  color: var(--text-primary);
}
.admin-banner-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 680px;
  line-height: 1.6;
  margin: 0;
}
.admin-banner-actions {
  display: flex;
  gap: 10px;
}

/* KPI Cards Grid */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.admin-kpi-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}
.kpi-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.kpi-icon-box.blue { background: rgba(37, 99, 235, 0.15); color: #60a5fa; }
.kpi-icon-box.purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.kpi-icon-box.rose { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
.kpi-icon-box.emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.kpi-details { flex: 1; }
.kpi-val { font-size: 1.45rem; font-weight: 800; color: var(--text-primary); }
.kpi-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); margin-top: 2px; }
.kpi-sub { font-size: 0.72rem; font-weight: 600; margin-top: 4px; }
.kpi-sub.positive { color: #34d399; }

/* Admin Navigation Tabs */
.admin-tabs-nav {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 12px;
  margin-bottom: 24px;
  overflow-x: auto;
}
.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 10px;
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.admin-tab-btn:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--text-primary);
}
.admin-tab-btn.active {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.4);
}

/* Layout Cards */
.admin-split-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}
@media (max-width: 1024px) {
  .admin-split-layout { grid-template-columns: 1fr; }
}
.admin-card {
  background: var(--bg-surface-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.admin-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-card-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

/* Forms */
.admin-q-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.admin-form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.admin-form-row.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.admin-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* Question Scroll List */
.admin-q-scroll-list {
  max-height: 600px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}
.admin-q-item-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  transition: all 0.2s ease;
}
.admin-q-item-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
}
.admin-q-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.admin-tag-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  margin-left: 6px;
}
.admin-tag-chip.difficulty { color: #f59e0b; }
.del-q-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.del-q-btn:hover { background: rgba(239, 68, 68, 0.15); }
.admin-q-text-preview {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 10px;
}
.admin-q-options-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.q-opt-pill {
  font-size: 0.78rem;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  color: var(--text-secondary);
}
.q-opt-pill.correct {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}
.admin-q-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

/* Tables */
.admin-table-wrapper {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.admin-table th {
  padding: 12px 14px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
}
.admin-table td {
  padding: 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.student-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.student-email {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.risk-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
}
.risk-pill.high { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.risk-pill.medium { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.risk-pill.safe { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.action-mini-btn {
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  margin-right: 4px;
  transition: all 0.2s ease;
}
.action-mini-btn:hover {
  background: rgba(37, 99, 235, 0.2);
  border-color: #3b82f6;
}

/* Light Theme overrides for Admin Portal */
body.light-theme .admin-welcome-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, #ffffff 100%);
  border-color: rgba(37, 99, 235, 0.2);
}
body.light-theme .admin-kpi-card,
body.light-theme .admin-card {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.15);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.06);
}
body.light-theme .admin-q-item-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}
body.light-theme .admin-table th {
  color: #64748b;
  border-bottom-color: #e2e8f0;
}
body.light-theme .admin-table td {
  color: #334155;
  border-bottom-color: #f1f5f9;
}
body.light-theme .action-mini-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1e293b;
}

/* ==========================================================================
   FACULTY & ADMIN SUITE: TELEMETRY, AUDIT & SECURITY LOCK STYLES
   ========================================================================== */
.admin-lock-card {
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.7), 0 0 25px rgba(99,102,241,0.15);
}

.admin-panel-card {
  background: linear-gradient(145deg, rgba(20,27,45,0.85), rgba(12,18,34,0.92));
  border: 1px solid rgba(99,102,241,0.22);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.admin-kpi-card {
  background: linear-gradient(135deg, rgba(24,32,54,0.9), rgba(15,22,40,0.95));
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.kpi-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.kpi-icon-box.blue { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.kpi-icon-box.green { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.kpi-icon-box.purple { background: rgba(168,85,247,0.15); color: #c084fc; border: 1px solid rgba(168,85,247,0.3); }
.kpi-icon-box.amber { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }

.kpi-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}
.kpi-lbl {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.admin-tabs-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 10px;
  overflow-x: auto;
}
.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.admin-tab-btn:hover {
  color: #f8fafc;
  background: rgba(255,255,255,0.04);
}
.admin-tab-btn.active {
  color: #ffffff;
  background: rgba(99,102,241,0.2);
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 4px 12px rgba(99,102,241,0.15);
}

/* Student Live Activity Table */
.admin-student-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.admin-student-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(15,23,42,0.4);
}
.admin-student-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.admin-student-table tbody tr:hover td {
  background: rgba(255,255,255,0.02);
}

.student-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar-cell {
  font-size: 1.5rem;
  line-height: 1;
}
.name-cell {
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.email-cell {
  font-size: 11px;
  color: var(--text-muted);
}
.status-dot-sm {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot-sm.online {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16,185,129,0.8);
}
.status-dot-sm.offline {
  background: #64748b;
}

.login-time-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #cbd5e1;
}
.study-time-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(56,189,248,0.12);
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}
.activity-chip {
  font-size: 12px;
  color: #e2e8f0;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255,255,255,0.04);
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
}
.live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.3);
  padding: 4px 10px;
  border-radius: 14px;
}

.table-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.table-action-btn:hover {
  background: rgba(99,102,241,0.25);
  color: #fff;
  border-color: rgba(99,102,241,0.4);
}

/* ==========================================================================
   NCERT CHAPTER STUDY STUDIO & CLASSROOM READER
   ========================================================================== */
.ncert-study-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin: 14px 0 18px;
  padding-bottom: 8px;
  overflow-x: auto;
}
.ncert-study-tab-btn {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.ncert-study-tab-btn:hover {
  color: #f8fafc;
  background: rgba(255,255,255,0.04);
}
.ncert-study-tab-btn.active {
  color: #ffffff;
  background: rgba(56,189,248,0.15);
  border-color: rgba(56,189,248,0.35);
}

.ncert-concept-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
}
.ncert-concept-title {
  font-size: 14px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 6px;
}
.ncert-concept-body {
  font-size: 13px;
  line-height: 1.65;
  color: #e2e8f0;
}
.ncert-solved-qa {
  background: rgba(15,23,42,0.6);
  border-left: 3px solid #3b82f6;
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.ncert-q-title {
  font-size: 13px;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 6px;
}
.ncert-ans-body {
  font-size: 13px;
  line-height: 1.6;
  color: #cbd5e1;
}

/* Light Theme Overrides for New Components */
body.light-theme .admin-panel-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}
body.light-theme .admin-kpi-card {
  background: #ffffff;
  border-color: #e2e8f0;
}
body.light-theme .kpi-val {
  color: #0f172a;
}
body.light-theme .name-cell {
  color: #0f172a;
}
body.light-theme .activity-chip {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}
body.light-theme .admin-student-table th {
  background: #f8fafc;
  color: #64748b;
  border-bottom-color: #e2e8f0;
}
body.light-theme .admin-student-table td {
  border-bottom-color: #f1f5f9;
}




/* ========================================================
   APPLE macOS SONOMA INTERFACE & CONTROL CENTER STYLING
   ======================================================== */
.apple-os-menubar {
  height: 32px;
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 12.5px;
  font-weight: 500;
  color: #cbd5e1;
  z-index: 999;
  user-select: none;
}

body.light-theme .apple-os-menubar {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: rgba(0, 0, 0, 0.08);
  color: #334155;
}

.apple-menu-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.apple-logo-icon {
  font-size: 15px;
  color: #f8fafc;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.15s ease;
}

body.light-theme .apple-logo-icon {
  color: #0f172a;
}

.apple-logo-icon:hover {
  transform: scale(1.15);
}

.apple-menu-appname {
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  font-size: 13px;
}

body.light-theme .apple-menu-appname {
  color: #0f172a;
}

.apple-menu-item {
  color: #94a3b8;
  cursor: pointer;
  font-size: 12px;
  transition: color 0.15s ease;
}

body.light-theme .apple-menu-item {
  color: #64748b;
}

.apple-menu-item:hover {
  color: #38bdf8;
}

.apple-menu-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.apple-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: #4ade80;
  cursor: pointer;
  transition: all 0.2s;
}

.apple-status-chip:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
}

.status-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  display: inline-block;
}

.apple-live-clock {
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  color: #e2e8f0;
  font-weight: 600;
  letter-spacing: 0.02em;
}

body.light-theme .apple-live-clock {
  color: #334155;
}

.apple-control-center-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #cbd5e1;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s;
}

.apple-control-center-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.apple-admin-direct-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.5);
  border-radius: 20px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.apple-admin-direct-btn:hover {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

/* Global Website Announcement Banner (Managed by Admin) */
.site-announcement-banner {
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.25), rgba(14, 165, 233, 0.18));
  border-bottom: 1px solid rgba(56, 189, 248, 0.35);
  font-size: 13px;
  color: #e0f2fe;
  z-index: 100;
  transition: all 0.3s ease;
}

.site-announcement-banner.urgent {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.28), rgba(220, 38, 38, 0.2));
  border-bottom-color: rgba(239, 68, 68, 0.5);
  color: #fee2e2;
}

.site-announcement-banner.success {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.25), rgba(16, 185, 129, 0.18));
  border-bottom-color: rgba(34, 197, 94, 0.4);
  color: #dcfce7;
}

.site-announcement-banner.warning {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.18));
  border-bottom-color: rgba(245, 158, 11, 0.4);
  color: #fef3c7;
}

.banner-content-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.banner-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.banner-close-btn {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  transition: opacity 0.15s;
}

.banner-close-btn:hover {
  opacity: 1;
}

/* ========================================================
   STEM 3D MODEL LIBRARY & SIMULATION STUDIO (IMAGES 2 & 3)
   ======================================================== */

.stem-library-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.stem-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stem-search-box {
  flex: 1;
  min-width: 280px;
  max-width: 520px;
  position: relative;
  display: flex;
  align-items: center;
}

.stem-search-box i {
  position: absolute;
  left: 18px;
  color: #717682;
  font-size: 14px;
  pointer-events: none;
}

.stem-search-input {
  width: 100%;
  background: #191a1e;
  border: 1px solid #33343a;
  border-radius: 28px;
  color: #ffffff;
  padding: 12px 18px 12px 42px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.stem-search-input:focus {
  border-color: #3df1e5;
  box-shadow: 0 0 14px rgba(61, 241, 229, 0.2);
}

.stem-subject-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stem-subject-pill {
  border: 1px solid transparent;
  background: transparent;
  color: #bbbfc8;
  border-radius: 24px;
  padding: 8px 15px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.18s ease;
}

.stem-subject-pill:hover {
  background: #25262a;
  color: #ffffff;
}

.stem-subject-pill.active {
  background: #25262a;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.stem-grade-select {
  background: #191a1e;
  border: 1px solid #33343a;
  border-radius: 20px;
  color: #f4f6f8;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.stem-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stem-chapter-select {
  background: #191a1e;
  border: 1px solid #33343a;
  border-radius: 22px;
  color: #f4f6f8;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  min-width: 290px;
  cursor: pointer;
  outline: none;
}

.stem-chapter-count {
  color: #9ea1a9;
  font-size: 13px;
}

.stem-chapter-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 10px 0 20px;
}

.stem-chapter-heading-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.stem-num {
  font-family: ui-monospace, SFMono-Regular, monospace;
  color: #9ea1a9;
  font-size: 15px;
  font-weight: 600;
}

.stem-item-count {
  color: #9ea1a9;
  font-size: 13px;
}

/* Cards Grid matching Image 2 */
.stem-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 20px;
}

@media (max-width: 960px) {
  .stem-cards-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 640px) {
  .stem-cards-grid {
    grid-template-columns: 1fr;
  }
}

.stem-activity-card {
  background: #191a1e;
  border: 1px solid #303136;
  border-radius: 22px;
  padding: 24px;
  min-height: 238px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.stem-activity-card:hover {
  transform: translateY(-3px);
  border-color: #555961;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.stem-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stem-card-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: linear-gradient(135deg, #2b82fe 0%, #17b8dd 100%);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 24px;
  box-shadow: 0 4px 14px rgba(43, 130, 254, 0.35);
}

.stem-interactive-pill {
  background: #25262a;
  color: #a8abb3;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stem-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 18px 0 8px;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stem-tag-pill {
  background: #2a2c32;
  color: #a3a7b1;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
}

.stem-card-desc {
  color: #a9abb1;
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.stem-card-footer {
  border-top: 1px solid #303136;
  margin-top: 18px;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #989ba3;
  font-size: 13px;
}

.stem-offline-text {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  color: #8b8e96;
}

.stem-launch-action {
  font-weight: 650;
  color: #dedfe3;
  transition: color 0.15s ease;
}

.stem-activity-card:hover .stem-launch-action {
  color: #3df1e5;
}

/* ========================================================
   STUDIO SIMULATION VIEWPORT (MATCHING IMAGE 3)
   ======================================================== */
#stem3dStudio {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #090e13;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

body.stem-studio-open {
  overflow: hidden !important;
}

.stem-studio-head {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid #1a252f;
  background: #0d141b;
  flex-shrink: 0;
}

.stem-studio-crumb-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: #9eaab5;
}

.stem-back-btn {
  background: transparent;
  color: #d9dde4;
  border: 1px solid #2a3744;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stem-back-btn:hover {
  background: #1a2430;
  border-color: #3d4f63;
  color: #ffffff;
}

.stem-studio-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stem-studio-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #0e1e26 0%, #090e13 80%);
}

.stem-stage-container {
  width: 100%;
  max-width: 1120px;
  height: calc(100vh - 210px);
  min-height: 420px;
  max-height: 640px;
  background: #091319;
  border: 1px solid #1c3d47;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 0 80px rgba(19, 209, 202, 0.03);
}

#stem3dStudioCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#stem3dStudioCanvas:active {
  cursor: grabbing;
}

/* View Mode Pills at Bottom-Left of Stage */
.stem-view-switch-pill {
  position: absolute;
  left: 20px;
  bottom: 20px;
  display: flex;
  gap: 4px;
  background: rgba(13, 32, 39, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid #24444f;
  border-radius: 24px;
  padding: 4px;
  z-index: 5;
}

.stem-view-pill-btn {
  background: transparent;
  color: #b1c2c8;
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stem-view-pill-btn:hover {
  color: #ffffff;
}

.stem-view-pill-btn.active {
  background: #13d1ca;
  color: #042528;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(19, 209, 202, 0.45);
}

/* Readout Capsule at Bottom-Center of Stage */
.stem-value-chip {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 38, 46, 0.92);
  border: 1px solid #27606a;
  border-radius: 18px;
  padding: 9px 22px;
  color: #9adfe3;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  z-index: 5;
  white-space: nowrap;
}

/* Floating Control Deck below Stage */
.stem-control-deck {
  margin-top: 14px;
  background: rgba(14, 28, 35, 0.92);
  border: 1px solid #1c3d47;
  border-radius: 20px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.stem-deck-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.stem-deck-group:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -14px;
  top: 15%;
  height: 70%;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.stem-deck-group-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #688390;
}

.stem-deck-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stem-deck-btn {
  background: transparent;
  border: 1px solid #284c59;
  border-radius: 12px;
  padding: 8px 14px;
  color: #b1c2c8;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.stem-deck-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border-color: #386779;
}

.stem-deck-btn.active {
  background: #0f3b43;
  border-color: #13d1ca;
  color: #3df1e5;
  box-shadow: 0 0 12px rgba(19, 209, 202, 0.25);
}

/* Floating Champ Mascot at Bottom-Right */
.stem-studio-mascot {
  position: absolute;
  right: 28px;
  bottom: 20px;
  width: 80px;
  height: 80px;
  cursor: pointer;
  z-index: 15;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 8px 24px rgba(6, 182, 212, 0.4));
}

.stem-studio-mascot:hover {
  transform: scale(1.1) translateY(-4px);
}

.stem-studio-mascot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

/* ========================================================
   APPLE macOS SONOMA ADMIN OS WINDOW STYLING
   ======================================================== */
.apple-mac-admin-window {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  margin-bottom: 30px;
}

body.light-theme .apple-mac-admin-window {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.mac-window-titlebar {
  height: 44px;
  background: rgba(30, 41, 59, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  user-select: none;
}

body.light-theme .mac-window-titlebar {
  background: rgba(241, 245, 249, 0.85);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mac-traffic-lights {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mac-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.mac-dot:hover {
  transform: scale(1.15);
}

.mac-dot.red {
  background: #ff5f56;
  border: 1px solid #e0443e;
}

.mac-dot.yellow {
  background: #ffbd2e;
  border: 1px solid #dea123;
}

.mac-dot.green {
  background: #27c93f;
  border: 1px solid #1aab29;
}

.mac-window-title-text {
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  display: flex;
  align-items: center;
}

body.light-theme .mac-window-title-text span[style*="color:#fff"] {
  color: #0f172a !important;
}

body.light-theme .mac-window-title-text span[style*="color:#94a3b8"] {
  color: #475569 !important;
}

.mac-window-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mac-action-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  transition: all 0.15s ease;
}

.mac-action-pill-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.mac-action-pill-btn.accent {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

.mac-action-pill-btn.accent:hover {
  background: rgba(37, 99, 235, 0.3);
  color: #ffffff;
}

body.light-theme .mac-action-pill-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: #334155;
}

body.light-theme .mac-action-pill-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

.mac-window-body {
  padding: 24px;
}

/* Apple macOS Segmented Navigation Pill Group */
.mac-segmented-control-bar {
  margin-bottom: 22px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.mac-segmented-pill-group {
  display: inline-flex;
  gap: 4px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
}

body.light-theme .mac-segmented-pill-group {
  background: rgba(241, 245, 249, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
}

.mac-seg-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  color: #94a3b8;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.mac-seg-pill:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

body.light-theme .mac-seg-pill {
  color: #64748b;
}

body.light-theme .mac-seg-pill:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.04);
}

.mac-seg-pill.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

body.light-theme .mac-seg-pill.active {
  background: #0071e3;
  color: #ffffff;
}

.seg-count-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  font-weight: 700;
}

