/* ==========================================================================
   BULLET.QUEST — TACTICAL TERMINAL DESIGN SYSTEM
   Metaphor: Bloomberg Terminal x Linear.app x Anki
   Palette: Obsidian Dark, Electric Amber, Cobalt Blue, Terminal Monospace
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --bg-primary: #07090e;
  --bg-surface: #0e131f;
  --bg-elevated: #141b2d;
  --bg-hover: #1c263d;
  
  --border-subtle: #1a2235;
  --border-default: #25324d;
  --border-focus: #3b82f6;
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --brand-amber: #f59e0b;
  --brand-amber-dim: rgba(245, 158, 11, 0.12);
  --brand-orange: #ea580c;
  
  --accent-blue: #2563eb;
  --accent-blue-dim: rgba(37, 99, 235, 0.12);
  --accent-cyan: #06b6d4;
  
  --status-success: #10b981;
  --status-success-dim: rgba(16, 185, 129, 0.12);
  --status-danger: #f43f5e;
  --status-danger-dim: rgba(244, 63, 94, 0.12);
  --status-warning: #fbbf24;
  --status-purple: #8b5cf6;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-full: 9999px;
  
  --shadow-terminal: 0 4px 20px -2px rgba(0, 0, 0, 0.6);
  --shadow-glow-amber: 0 0 15px -3px rgba(245, 158, 11, 0.35);
  --shadow-glow-blue: 0 0 15px -3px rgba(37, 99, 235, 0.35);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Typography Utilities */
.font-mono { font-family: var(--font-mono); }
.font-sans { font-family: var(--font-sans); }

.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }

/* Grid Layout Shell */
.terminal-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-primary);
}

/* Sidebar Navigation (Linear style) */
.terminal-sidebar {
  width: 250px;
  flex-shrink: 0;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.03em;
}

.brand-glyph {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--brand-amber), var(--brand-orange));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 900;
  font-family: var(--font-mono);
  font-size: 14px;
}

.nav-section {
  padding: 14px 12px 6px 12px;
}

.nav-section-title {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 0 10px 6px 10px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.nav-link:hover {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
}

.nav-link.active {
  background-color: var(--bg-hover);
  color: #fff;
  border-left: 2px solid var(--brand-amber);
  padding-left: 10px;
}

.nav-link svg {
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.nav-link.active svg {
  color: var(--brand-amber);
  opacity: 1;
}

.nav-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.nav-badge.amber {
  background: var(--brand-amber-dim);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--brand-amber);
}

.sidebar-profile {
  margin-top: auto;
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(10, 14, 23, 0.5);
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: var(--brand-amber);
}

.profile-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.profile-name {
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.profile-exam {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Main Content Surface */
.terminal-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--bg-primary);
}

/* Header Bar */
.terminal-topbar {
  height: 52px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
}

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

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--status-success);
  box-shadow: 0 0 8px var(--status-success);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

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

.telemetry-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.telemetry-chip strong {
  color: var(--text-primary);
  font-weight: 600;
}

.telemetry-chip.streak {
  border-color: rgba(245, 158, 11, 0.3);
  background: var(--brand-amber-dim);
  color: var(--brand-amber);
}

.telemetry-chip.streak strong {
  color: var(--brand-amber);
}

/* Content Container */
.content-body {
  padding: 24px;
  flex: 1;
}

/* Terminal Cards */
.card-terminal {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-terminal);
  position: relative;
  overflow: hidden;
}

.card-terminal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

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

.card-title {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
}

/* Metric / Stat Blocks */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.2s;
}

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

.metric-box.active-glow {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: var(--shadow-glow-amber);
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.metric-sub {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Button UI */
.btn-tactical {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn-primary {
  background: var(--brand-amber);
  color: #000;
  border-color: var(--brand-amber);
}
.btn-primary:hover {
  background: #d97706;
  border-color: #d97706;
  box-shadow: var(--shadow-glow-amber);
}

.btn-blue {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
}
.btn-blue:hover {
  background: #1d4ed8;
  box-shadow: var(--shadow-glow-blue);
}

.btn-outline {
  background: var(--bg-elevated);
  border-color: var(--border-default);
  color: var(--text-primary);
}
.btn-outline:hover {
  background: var(--bg-hover);
  border-color: var(--text-secondary);
}

.btn-danger {
  background: var(--status-danger-dim);
  border-color: rgba(244, 63, 94, 0.4);
  color: var(--status-danger);
}
.btn-danger:hover {
  background: var(--status-danger);
  color: #fff;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11px;
}

/* Tactical Tags / Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}

.badge-amber {
  background: var(--brand-amber-dim);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--brand-amber);
}

.badge-blue {
  background: var(--accent-blue-dim);
  border-color: rgba(37, 99, 235, 0.3);
  color: #60a5fa;
}

.badge-green {
  background: var(--status-success-dim);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--status-success);
}

.badge-rose {
  background: var(--status-danger-dim);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--status-danger);
}

.badge-purple {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.35);
  color: #c084fc;
}

.badge-neutral {
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

/* Streak Heatmap Component (365 days / matrix) */
.heatmap-container {
  overflow-x: auto;
  padding-bottom: 8px;
}
.heatmap-grid {
  display: grid;
  grid-template-rows: repeat(7, 11px);
  grid-auto-flow: column;
  grid-auto-columns: 11px;
  gap: 3px;
}
.heatmap-cell {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background-color: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: transform 0.1s;
}
.heatmap-cell:hover {
  transform: scale(1.3);
  border-color: #fff;
  z-index: 10;
}
.heatmap-cell.level-1 { background-color: rgba(245, 158, 11, 0.25); }
.heatmap-cell.level-2 { background-color: rgba(245, 158, 11, 0.50); }
.heatmap-cell.level-3 { background-color: rgba(245, 158, 11, 0.75); }
.heatmap-cell.level-4 { background-color: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.5); }

/* Keyboard Shortcut Pills */
.kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  color: var(--text-secondary);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-bottom: 2px solid var(--border-default);
  border-radius: 3px;
  line-height: 1.2;
}

/* ==========================================================================
   MODULE A: BULLET NODE MICRO-LEARNING PLAYER
   ========================================================================== */
.bullet-player-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  height: calc(100vh - 120px);
}

.video-pane {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.video-wrapper {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  width: 100%;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chapter-timeline {
  padding: 16px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  overflow-y: auto;
  flex: 1;
}

.chapter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  margin-bottom: 6px;
  transition: all 0.15s ease;
}

.chapter-item:hover {
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
}

.chapter-item.active {
  background: var(--bg-hover);
  border-color: var(--brand-amber);
}

.chapter-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chapter-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.notes-pane {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notes-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  font-size: 14px;
  color: var(--text-secondary);
}

.notes-content h1, .notes-content h2, .notes-content h3 {
  color: var(--text-primary);
  margin: 16px 0 10px 0;
}

.notes-content p {
  margin-bottom: 12px;
  line-height: 1.6;
}

.notes-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 12px;
}

.notes-content th, .notes-content td {
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
  text-align: left;
}

.notes-content th {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* Interactive Checkpoint Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.checkpoint-modal {
  width: 90%;
  max-width: 580px;
  background: var(--bg-surface);
  border: 2px solid var(--brand-amber);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 35px -5px rgba(245, 158, 11, 0.4);
  padding: 28px;
  animation: modal-enter 0.2s ease-out;
}

@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   MODULE B: ACTIVE RECALL SYSTEM (ARS FLASHCARDS)
   ========================================================================== */
.flashcard-stage {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.flashcard-card {
  min-height: 380px;
  perspective: 1200px;
  cursor: pointer;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 380px;
  text-align: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}

.flashcard-card.is-flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-terminal);
}

.flashcard-back {
  transform: rotateY(180deg);
  border-color: var(--brand-amber);
  background: #0f1524;
}

.flashcard-text {
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-primary);
  font-weight: 500;
  margin: auto 0;
}

.sm2-rating-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.rating-btn {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.rating-btn:hover {
  border-color: var(--brand-amber);
  background: var(--bg-hover);
}

.rating-btn.again { border-color: rgba(244, 63, 94, 0.4); }
.rating-btn.again:hover { background: var(--status-danger-dim); }

.rating-btn.good { border-color: rgba(59, 130, 246, 0.4); }
.rating-btn.good:hover { background: var(--accent-blue-dim); }

.rating-btn.easy { border-color: rgba(16, 185, 129, 0.4); }
.rating-btn.easy:hover { background: var(--status-success-dim); }

/* ==========================================================================
   MODULE C: GRANULAR ERROR DIAGNOSTIC (GED) TEST ENGINE
   ========================================================================== */
/* TCS iON Simulator Layout */
.tcs-ion-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  height: calc(100vh - 106px);
  background: #f8fafc;
  color: #1e293b;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.tcs-ion-left {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-right: 1px solid #cbd5e1;
}

.tcs-ion-header {
  background: #1e3a8a;
  color: #ffffff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.tcs-ion-question-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
}

.tcs-option-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  margin-bottom: 10px;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.15s;
}

.tcs-option-label:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.tcs-option-label.selected {
  background: #eff6ff;
  border-color: #2563eb;
  font-weight: 600;
}

.tcs-ion-footer {
  padding: 12px 20px;
  border-top: 1px solid #cbd5e1;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* TCS iON Candidate Palette Panel */
.tcs-ion-right {
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.candidate-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  margin-bottom: 12px;
}

.candidate-photo {
  width: 44px;
  height: 48px;
  background: #cbd5e1;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #475569;
}

.palette-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 11px;
  margin-bottom: 14px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.palette-shape {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  border-radius: 3px;
  font-family: var(--font-mono);
}

.palette-shape.answered { background: #16a34a; }
.palette-shape.not-answered { background: #dc2626; }
.palette-shape.not-visited { background: #94a3b8; }
.palette-shape.marked { background: #7c3aed; }

.palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  overflow-y: auto;
  max-height: 240px;
  padding: 4px;
}

.palette-btn {
  height: 34px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.1s;
}
.palette-btn:hover { transform: scale(1.06); }

/* UPSC / State PSC Mode (OMR Sheet) */
.upsc-mode-container {
  display: grid;
  grid-template-columns: 1.4fr 380px;
  gap: 20px;
  height: calc(100vh - 120px);
}

.upsc-paper-pane {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 30px;
  overflow-y: auto;
}

.omr-sheet-pane {
  background: #ffffff;
  color: #0f172a;
  border-radius: var(--radius-md);
  border: 2px solid #334155;
  box-shadow: var(--shadow-terminal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.omr-header {
  background: #0f172a;
  color: #f8fafc;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.omr-grid-container {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.omr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-bottom: 1px dashed #e2e8f0;
  font-family: var(--font-mono);
}

.omr-row.active {
  background: #f1f5f9;
}

.omr-qnum {
  font-weight: 700;
  font-size: 12px;
  width: 28px;
}

.omr-bubbles {
  display: flex;
  gap: 10px;
}

.omr-bubble {
  width: 24px;
  height: 24px;
  border: 1.5px solid #334155;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.1s ease;
}

.omr-bubble:hover {
  background: #cbd5e1;
}

.omr-bubble.filled {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: inset 0 0 4px #000;
}

/* GED 4-Bucket Diagnostic Styles */
.ged-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  margin-bottom: 12px;
}

.ged-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
}

.ged-tag.KNOWLEDGE_GAP { background: rgba(244, 63, 94, 0.15); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.4); }
.ged-tag.SLUGGISH_OVERTHINK { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.ged-tag.CARELESS_MISREAD { background: rgba(139, 92, 246, 0.15); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.4); }
.ged-tag.GUESSWORK_TRAP { background: rgba(225, 29, 72, 0.25); color: #f43f5e; border: 1px solid #f43f5e; }
.ged-tag.CORRECT { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }

/* ==========================================================================
   MODULE D: HYBRID CENTER MANAGEMENT & OMR SCANNER
   ========================================================================== */
.terminal-floor-map {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding: 20px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.desk-seat {
  height: 64px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.desk-seat:hover:not(.occupied) {
  border-color: var(--brand-amber);
  background: var(--bg-hover);
}

.desk-seat.selected {
  border-color: var(--brand-amber);
  background: var(--brand-amber-dim);
  color: var(--brand-amber);
}

.desk-seat.occupied {
  opacity: 0.35;
  cursor: not-allowed;
  background: #111;
}

/* OMR Canvas Detection Simulator */
.omr-scanner-canvas {
  width: 100%;
  max-height: 420px;
  background: #1e293b;
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.scan-laser-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-amber);
  box-shadow: 0 0 10px var(--brand-amber);
  animation: scan-vertical 2.5s infinite linear;
}

@keyframes scan-vertical {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

/* ==========================================================================
   RESPONSIVE GRID UTILITIES & MOBILE/TABLET DESIGN SYSTEM
   ========================================================================== */

/* Responsive Grid Utility Classes */
.grid-2col-responsive {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.grid-3col-responsive {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid-4col-responsive {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.grid-title-slug-responsive {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

/* Responsive Table Wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
}

.table-responsive table,
.card-terminal > div[style*="overflow-x: auto"] > table {
  min-width: 600px;
}

/* Mobile Navigation Toggle Buttons */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.mobile-menu-btn:hover {
  border-color: var(--brand-amber);
  color: var(--brand-amber);
  background: var(--bg-hover);
}

.mobile-sidebar-close {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.mobile-sidebar-close:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

/* Sidebar Backdrop Overlay */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.75);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 45;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   PUBLIC NAVIGATION & MOBILE/TABLET DRAWER SYSTEM
   ========================================================================== */
.public-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 64px;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  background: rgba(7, 9, 14, 0.94);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

/* Glassmorphism blur on ::before pseudo-element so .public-nav DOES NOT create
   a containing block for position:fixed descendants on mobile/tablet */
.public-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 9, 14, 0.94);
  z-index: -1;
  pointer-events: none;
}

.public-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  font-weight: 500;
}

.public-nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.public-nav-links a:hover,
.public-nav-links a.active {
  color: var(--brand-amber);
  font-weight: 600;
}

/* ==========================================================================
   PUBLIC NAVIGATION DROPDOWN COMPONENT (DESKTOP & TABLET ADAPTIVE)
   ========================================================================== */
.nav-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
  border: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-dropdown-trigger:hover,
.nav-dropdown-wrapper:hover .nav-dropdown-trigger,
.nav-dropdown-wrapper.active .nav-dropdown-trigger {
  color: var(--brand-amber);
  background: rgba(245, 158, 11, 0.08);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 320px;
  background: rgba(14, 19, 31, 0.98);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 20px rgba(245, 158, 11, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
  z-index: 1050;
}

.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
  display: block;
}

.nav-dropdown-wrapper:hover .nav-dropdown-menu,
.nav-dropdown-wrapper:focus-within .nav-dropdown-menu,
.nav-dropdown-wrapper.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(4px);
}

/* Right-aligned dropdown variation (for items positioned near the right side of desktop navigation) */
.nav-dropdown-menu.dropdown-right {
  left: auto;
  right: 0;
  transform: translateY(10px);
}

.nav-dropdown-wrapper:hover .nav-dropdown-menu.dropdown-right,
.nav-dropdown-wrapper:focus-within .nav-dropdown-menu.dropdown-right,
.nav-dropdown-wrapper.open .nav-dropdown-menu.dropdown-right {
  transform: translateY(4px);
}

.nav-dropdown-trigger svg {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-dropdown-wrapper:hover .nav-dropdown-trigger svg,
.nav-dropdown-wrapper:focus-within .nav-dropdown-trigger svg,
.nav-dropdown-wrapper.open .nav-dropdown-trigger svg {
  transform: rotate(180deg);
}

.nav-dropdown-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  padding: 9px 12px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  text-align: left;
}

.nav-dropdown-item:hover {
  background: var(--bg-elevated) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

.nav-dropdown-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-dropdown-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.nav-dropdown-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.mobile-nav-group-label {
  display: none;
}

/* Public Header Mobile & Tablet Controls */
.public-mobile-toggle {
  display: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  height: 36px;
  padding: 0 12px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.public-mobile-toggle:hover {
  border-color: var(--brand-amber);
  color: var(--brand-amber);
  background: rgba(245, 158, 11, 0.1);
}

.public-mobile-toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
}

.public-nav-mobile-controls {
  display: none;
  align-items: center;
  gap: 8px;
}

/* Backdrop Overlay for Mobile Navigation Drawer */
.public-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

body.nav-open {
  overflow: hidden !important;
  touch-action: none !important;
}

body.nav-open .public-nav-backdrop,
.public-nav-backdrop.active,
.public-nav.mobile-open ~ .public-nav-backdrop {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* Quick Category / Menu Horizontal Strip on Mobile & Tablet */
.mobile-quick-menu {
  display: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: rgba(14, 19, 31, 0.96);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 14px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 8px;
  z-index: 990;
}

.mobile-quick-menu::-webkit-scrollbar {
  display: none;
}

.mobile-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  font-family: var(--font-mono);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.mobile-quick-pill:hover,
.mobile-quick-pill:active {
  border-color: var(--brand-amber);
  color: var(--brand-amber);
  background: var(--bg-elevated);
}

.mobile-quick-pill.highlight {
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
}

/* Responsive Modal Utility */
.modal-responsive {
  max-width: 95vw !important;
  max-height: 92vh !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

/* Visibility Utility Helpers */
.hide-on-mobile { display: inherit; }
.hide-on-tablet { display: inherit; }
.show-on-mobile { display: none !important; }
.show-on-tablet { display: none !important; }

/* Responsive Media Elements */
img, video, iframe {
  max-width: 100%;
}

/* ==========================================================================
   BREAKPOINT 1: TABLET & SMALL LAPTOPS (max-width: 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  /* Layout Shell */
  .terminal-layout {
    position: relative;
    overflow-x: hidden;
  }

  .terminal-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -280px;
    width: 270px;
    max-width: 85vw;
    z-index: 50;
    height: 100vh;
    box-shadow: none;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .terminal-sidebar.open {
    left: 0;
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.8);
  }

  .terminal-main {
    width: 100%;
    min-width: 0;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .mobile-sidebar-close {
    display: inline-flex;
  }

  .hide-on-tablet {
    display: none !important;
  }

  .show-on-tablet {
    display: inherit !important;
  }

  /* Topbar & Content Padding */
  .terminal-topbar {
    padding: 0 16px;
  }

  .content-body {
    padding: 18px 16px;
  }

  /* Stat Grids: Collapse 4/5 columns to 2 columns */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px;
  }

  .grid-4col-responsive {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3col-responsive {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Specific player / engine grids */
  .bullet-player-grid, .tcs-ion-container, .upsc-mode-container {
    grid-template-columns: 1fr;
    height: auto;
  }

  /* Public Navigation Drawer on Tablet & Mobile */
  .public-nav {
    padding: 0 16px;
    height: 60px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
  }

  .public-nav.mobile-open {
    z-index: 10000 !important;
  }

  .public-mobile-toggle {
    display: inline-flex;
  }

  .public-nav-mobile-controls {
    display: flex !important;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .mobile-quick-menu {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  .public-nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    height: calc(100vh - 60px);
    max-height: calc(100vh - 60px);
    background: rgba(7, 9, 14, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch !important;
    padding: 16px 20px 48px 20px;
    gap: 6px !important;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: none !important;
    border-top: 1px solid var(--border-default);
    z-index: 10000;
  }

  .public-nav.mobile-open .public-nav-links {
    display: flex !important;
    animation: slideDownNav 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  @keyframes slideDownNav {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .mobile-nav-close-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
  }

  .mobile-nav-close-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
  }

  .public-nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    transition: all 0.15s ease;
    text-decoration: none;
  }

  .public-nav-links a:hover,
  .public-nav-links a.active {
    background: var(--bg-elevated);
    border-color: var(--brand-amber);
    color: var(--brand-amber);
    transform: translateX(4px);
  }

  .public-nav-actions-mobile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
  }

  /* Mobile Drawer Dropdown Adaptation */
  .nav-dropdown-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .nav-dropdown-trigger {
    display: none !important;
  }

  .mobile-nav-group-label {
    display: block !important;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--brand-amber);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 10px 4px 4px 4px;
    margin-top: 6px;
  }

  .nav-dropdown-menu {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    gap: 6px !important;
  }

  .nav-dropdown-item {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-sm) !important;
    padding: 10px 12px !important;
  }

  .nav-dropdown-item:hover {
    border-color: var(--brand-amber) !important;
    background: var(--bg-elevated) !important;
  }

  /* Split Studio Area: stack if needed */
  #studioSplitArea {
    grid-template-columns: 1fr !important;
  }

  #studioPreviewPane {
    border-top: 1px solid var(--border-subtle);
  }
}

/* ==========================================================================
   BREAKPOINT 2: MOBILE PHONES & PHABLETS (max-width: 640px)
   ========================================================================== */
@media (max-width: 640px) {
  /* Navigation on mobile phones: ensure Brand + Menu fit cleanly */
  .public-nav {
    padding: 0 12px !important;
    height: 56px !important;
  }
  .public-nav-signin-pill {
    display: none !important;
  }
  .public-mobile-toggle {
    padding: 0 10px !important;
    height: 34px !important;
    font-size: 10px !important;
  }
  .public-nav-links {
    top: 56px !important;
    height: calc(100vh - 56px) !important;
    max-height: calc(100vh - 56px) !important;
    padding: 14px 16px 40px 16px !important;
  }

  /* Layout & Topbar */
  .terminal-topbar {
    height: auto;
    min-height: 52px;
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .topbar-left {
    gap: 8px;
    flex: 1;
    min-width: 0;
  }

  .topbar-right {
    gap: 6px;
  }

  .system-status {
    font-size: 10px;
    gap: 6px;
  }

  .hide-on-mobile {
    display: none !important;
  }

  .show-on-mobile {
    display: inherit !important;
  }

  .content-body {
    padding: 14px 10px;
  }

  /* Responsive Grids: collapse to single column */
  .stat-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .grid-2col-responsive,
  .grid-3col-responsive,
  .grid-4col-responsive,
  .grid-title-slug-responsive {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px;
  }

  .grid-2col-responsive > *,
  .grid-3col-responsive > *,
  .grid-4col-responsive > *,
  .home-job-card,
  .home-course-card {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Modals: full-width, clean padding */
  .modal-backdrop {
    padding: 8px !important;
  }

  .checkpoint-modal,
  .modal-responsive,
  .card-terminal[style*="max-width: 680px"],
  .card-terminal[style*="max-width: 1280px"] {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 94vh !important;
    padding: 14px 12px !important;
    border-radius: var(--radius-sm) !important;
  }

  /* Touch Targets & Buttons */
  .btn-tactical {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 12px;
  }

  .btn-sm {
    min-height: 32px;
    padding: 5px 9px;
    font-size: 11px;
  }

  /* Forms & Inputs */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    font-size: 14px !important;
  }

  /* Public Website Sections */
  .hero-section {
    padding: 40px 16px 30px 16px !important;
  }

  .hero-section h1 {
    font-size: 28px !important;
    line-height: 1.22 !important;
  }

  .section-wrap {
    padding: 36px 14px !important;
  }

  .section-title {
    font-size: 22px !important;
  }

  .ticker-bar {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    padding: 14px 14px !important;
    gap: 14px 12px !important;
  }

  /* Mobile Hero CTAs */
  .hero-cta-group {
    flex-direction: column !important;
    align-items: stretch !important;
    max-width: 340px !important;
    margin: 0 auto 24px auto !important;
    gap: 10px !important;
  }
  .hero-cta-btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* Mobile Hero Search */
  .hero-search-input {
    padding: 11px 86px 11px 36px !important;
    font-size: 12px !important;
  }
  .hero-search-submit {
    padding: 5px 11px !important;
    font-size: 10px !important;
    right: 5px !important;
  }

  /* Mobile Popular Exam Categories 2-Column Board */
  .category-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .category-grid .category-chip {
    padding: 8px 10px !important;
    min-height: 64px;
    box-sizing: border-box;
  }

  /* Blog Card Grid & Article Container */
  .blog-grid-responsive {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  #articleContentArea {
    padding: 20px 16px !important;
  }

  /* Tables container */
  .card-terminal {
    overflow-x: auto;
  }
}

/* ==========================================================================
   RESPONSIVE FILTER BARS & CATEGORY BOARD (TABLET & DESKTOP SYSTEM)
   ========================================================================== */
@media (max-width: 768px) {
  .scroll-filter-bar {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding-bottom: 6px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .scroll-filter-bar::-webkit-scrollbar {
    display: none !important;
  }
  .scroll-filter-bar button,
  .scroll-filter-bar a {
    flex-shrink: 0 !important;
  }
  .home-job-search-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin-top: 10px !important;
  }
}

/* Popular Category Board Grid Responsiveness */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
@media (min-width: 641px) and (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
  }
}
@media (min-width: 1025px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px !important;
  }
}

