/* ==========================================================================
   code.sreyas — Workbench Design System (Dark Clay & Pill System)
   Aesthetic: Dark Modern Clay & Pill Architecture (Plus Jakarta Sans)
   Typography: Plus Jakarta Sans + JetBrains Mono
   Palette: Dark Clay, Slate, Soft Pastels, Electric Lime
   ========================================================================== */

/* Fonts are loaded once, by the <link> in index.html (an @import here loaded them a second time and held up the first paint) */

:root {
  /* Typography: Everything is Google Sans Flex, terminal is original terminal font (JetBrains Mono) */
  --font-sans: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-terminal: 'JetBrains Mono', 'Menlo', 'Monaco', 'Consolas', 'Courier New', monospace;

  /* Canvas & Soft Pastel Palette */
  --bg-canvas: #f6f8fa;
  --bg-app: #f6f8fa;
  --bg-chassis: #ffffff;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-elevated: #f9fafb;
  --bg-sidebar: #ffffff;
  --bg-editor: #ffffff;
  --bg-gutter: #f8fafc;
  --bg-hover: #f3f4f6;
  --bg-active: #d5ebe2;

  /* Borders & Dividers */
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-muted: #e5e7eb;
  --border-card: rgba(0, 0, 0, 0.07);
  --border-active: #181a1e;
  --border-focus: #181a1e;

  /* Typography Colors */
  --text-primary: #181a1e;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --text-dim: #9ca3af;

  /* Soft Pastel Colors (Exact Match to ec0c2df Reference) */
  --pastel-mint: #d5ebe2;
  --pastel-mint-border: #bfe1d4;
  --pastel-mint-text: #1b4d3e;

  --pastel-blush: #fce3ec;
  --pastel-blush-border: #f8c8dc;
  --pastel-blush-text: #831843;

  --pastel-yellow: #fef0c7;
  --pastel-yellow-border: #fde68a;
  --pastel-yellow-text: #78350f;

  --pastel-lilac: #ebe3f7;
  --pastel-lilac-border: #ddd0f3;
  --pastel-lilac-text: #581c87;

  --pastel-cyan: #e0f2fe;
  --pastel-cyan-border: #bae6fd;
  --pastel-cyan-text: #0369a1;

  /* Functional Status */
  --status-pass: #15803d;
  --status-fail: #dc2626;
  --status-warn: #d97706;

  /* Radii & Smooth Pill Geometry */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-card: 22px;
  --radius-pill: 9999px;

  /* Ambient Soft Shadows */
  --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.03);
  --shadow-frame: 0 10px 30px rgba(0, 0, 0, 0.04);
}


/* Google Sans Flex Roundness & Bold Headings */
body, input, button, select, textarea {
  font-family: var(--font-sans);
  font-variation-settings: 'ROND' 100;
}

h1, h2, h3, h4, h5, h6,
.ec-welcome-title,
.ec-section-title,
.ec-activity-title,
.ec-hero-title,
.ec-cal-month-title,
.problem-h1,
.fullview-title,
.sidebar-heading,
.brand-name,
.dialog-title,
.auth-brand-title,
.exam-lockout-title,
.spec-title,
.pipeline-step-title,
.logic-title,
.compile-error-header {
  font-family: var(--font-sans) !important;
  font-weight: 700 !important;
  font-variation-settings: 'ROND' 100, 'wght' 700 !important;
  letter-spacing: -0.35px;
}

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

button,
button:hover,
button:active {
  transform: none !important;
}

body {
  background: #ffffff;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-variation-settings: 'ROND' 100;
  font-size: 13px;
  line-height: 1.5;
  height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Precision Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-xs);
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================================
   TOP WORKBAR (Clean Modern Frame Header with Rounded Pill Controls)
   ========================================================================== */
.workbar { display: none !important; }

.workbar-left, .workbar-center, .workbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-unit {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding-right: 16px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.brand-college-logo {
  height: 30px;
  width: 30px;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}

.brand-name {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 800;
  color: #181a1e;
  letter-spacing: -0.3px;
}

.brand-dot {
  color: #181a1e;
  font-weight: 800;
}

/* Workbar Pill Navigation */
.workbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f3f4f6;
  border-radius: var(--radius-pill);
  padding: 3px 4px;
}

.nav-segment-btn {
  background: transparent;
  border: none;
  color: #6b7280;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-segment-btn:hover {
  color: #181a1e;
  background: rgba(0, 0, 0, 0.04);
}

.nav-segment-btn.active {
  background: #181a1e;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(24, 26, 30, 0.15);
}

.nav-icon {
  font-size: 13px;
}

/* Track Selector */
.workbar-select {
  background: #f3f4f6;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-pill);
  color: #181a1e;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.workbar-select:hover {
  border-color: rgba(0, 0, 0, 0.2);
}

/* Stat Badges */
.workbar-stat {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 4px;
}

.workbar-stat.mint {
  background: #d5ebe2;
  color: #1b4d3e;
  border: 1px solid #bfe1d4;
}

.workbar-stat.yellow {
  background: #fef0c7;
  color: #78350f;
  border: 1px solid #fde68a;
}

.btn-instructor {
  background: #181a1e;
  color: #ffffff;
  border: none;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-instructor:hover {
  opacity: 0.88;
}

.workbar-user-btn {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  background: #f3f4f6;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #181a1e;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.workbar-user-btn:hover {
  background: #e5e7eb;
}

/* ==========================================================================
   APP SHELL LAYOUT (Workbench with Rounded Card Windows)
   ========================================================================== */

/* Confetti Overlay Canvas (Fixed overlay, zero document flow impact) */
#confetti_canvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: none !important;
  z-index: 9999 !important;
  display: block;
}

/* ==========================================================================
   APP SHELL LAYOUT (Workbench with Rounded Card Windows)
   ========================================================================== */
.app-shell {
  display: none;
  height: 100vh;
  max-height: 100vh;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: #f6f8fa;
  padding: 16px 20px;
  gap: 14px;
  font-family: var(--font-sans);
  box-sizing: border-box;
}

/* ==========================================================================
   LEFT SIDEBAR: LAB CURRICULUM TREE (Card Container)
   ========================================================================== */
.lab-sidebar {
  width: 280px;
  min-width: 280px;
  flex-shrink: 0;
  height: 100%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
}

.sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-heading {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: #181a1e;
  letter-spacing: -0.2px;
}

.sidebar-search-box {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
}

.sidebar-search-input {
  width: 100%;
  background: #f3f4f6;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-pill);
  color: #181a1e;
  font-family: var(--font-sans);
  font-size: 11.5px;
  padding: 6px 12px;
  outline: none;
  transition: border-color 0.15s ease;
}
.sidebar-search-input:focus {
  border-color: #181a1e;
}

.curriculum-tree-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px;
}

.curriculum-week-group {
  margin-bottom: 8px;
}

.week-group-header {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 8px;
}

.tree-node-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.tree-node-item:hover {
  background: #f3f4f6;
}

.tree-node-item.selected {
  background: #d5ebe2 !important;
  color: #1b4d3e !important;
  font-weight: 600;
}

.tree-node-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.tree-node-title {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-status-glyph {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #9ca3af;
  width: 14px;
  text-align: center;
}

.tree-status-glyph.done {
  color: #15803d;
}

.tree-difficulty-pill {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.tree-difficulty-pill.easy {
  color: #15803d;
  background: #dcfce7 !important;
}

.tree-difficulty-pill.medium {
  color: #b45309;
  background: #fef3c7 !important;
}

.tree-difficulty-pill.hard {
  color: #dc2626;
  background: #fee2e2 !important;
}

.sidebar-footer {
  padding: 12px 16px;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 11.5px;
  font-weight: 600;
}

.progress-track-bar {
  height: 5px;
  background: #f3f4f6;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 6px;
}

.progress-track-fill {
  height: 100%;
  background: #181a1e;
  width: 0%;
  transition: width 0.3s ease;
}

/* ==========================================================================
   CENTER / RIGHT: WORKBENCH SPLIT (Problem Specification + Code Editor)
   ========================================================================== */
.workbench-viewport {
  flex: 1;
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 46% 54%;
  gap: 14px;
  overflow: hidden;
  background: transparent;
  transition: grid-template-columns 0.2s ease;
}

.workbench-viewport.spec-collapsed {
  grid-template-columns: 1fr;
}
.workbench-viewport.spec-collapsed .problem-pane {
  display: none !important;
}

/* VS Code Explorer Styles */
.explorer-section-hdr {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  background: #f9fafb;
  transition: background 0.15s ease;
}
.explorer-section-hdr:hover {
  background: #f3f4f6;
  color: #111827;
}
.exp-chevron {
  transition: transform 0.2s ease;
}
.explorer-section-hdr.collapsed .exp-chevron {
  transform: rotate(-90deg);
}

.workspace-files-tree {
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vscode-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #374151;
  cursor: pointer;
  transition: all 0.12s ease;
}
.vscode-file-item:hover {
  background: #f3f4f6;
  color: #111827;
}
.vscode-file-item.active {
  background: #e5e7eb;
  color: #0f172a;
  font-weight: 600;
}
.vscode-file-left {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-badge-tag {
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  text-transform: uppercase;
}
.file-badge-tag.c { background: #dbeafe; color: #1d4ed8; }
.file-badge-tag.cpp { background: #ede9fe; color: #6d28d9; }
.file-badge-tag.py { background: #fef3c7; color: #b45309; }
.file-badge-tag.java { background: #fee2e2; color: #b91c1c; }
.file-badge-tag.txt { background: #f3f4f6; color: #4b5563; }

.vscode-file-delete {
  opacity: 0;
  background: transparent;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  transition: all 0.15s ease;
}
.vscode-file-item:hover .vscode-file-delete {
  opacity: 1;
}
.vscode-file-delete:hover {
  color: #ef4444;
  background: #fee2e2;
}

/* VS Code Tabs Bar */
.vscode-tabs-bar {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  height: 38px;
  min-height: 38px;
  padding: 0 4px;
  overflow: hidden;
}
.vscode-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  height: 100%;
}
.vscode-tabs-scroll::-webkit-scrollbar {
  display: none;
}
.vscode-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 100%;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #64748b;
  cursor: pointer;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 2px solid transparent;
  user-select: none;
  white-space: nowrap;
  transition: all 0.12s ease;
}
.vscode-tab:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.vscode-tab.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  border-bottom-color: #0284c7;
}
.vscode-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1;
  transition: all 0.1s ease;
  margin-left: 2px;
}
.vscode-tab-close:hover {
  background: #e2e8f0;
  color: #ef4444;
}
.vscode-tab-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: transparent;
  border: none;
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  margin-left: 4px;
  transition: all 0.15s ease;
}
.vscode-tab-add:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Run Code Action Button */
.btn-run-code {
  background: #059669;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
  transition: all 0.15s ease;
}
.btn-run-code:hover {
  background: #047857;
  transform: translateY(-1px);
}
.btn-run-code:active {
  transform: translateY(0);
}

/* Problem Documentation View (White Rounded Card) */
.problem-pane {
  height: 100%;
  min-width: 0;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pane-toolbar {
  height: 48px;
  min-height: 48px;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.pane-tabs {
  display: flex;
  gap: 4px;
}

.pane-tab-btn {
  background: transparent;
  border: none;
  color: #6b7280;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pane-tab-btn:hover {
  color: #181a1e;
  background: #f3f4f6;
}

.pane-tab-btn.active {
  background: #181a1e;
  color: #ffffff;
  font-weight: 700;
}

.problem-body-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.problem-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.problem-h1 {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 800;
  color: #181a1e;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
}

.problem-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.spec-group {
  margin-bottom: 18px;
}

.spec-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #9ca3af;
  margin-bottom: 6px;
}

.spec-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: #374151;
}

.spec-code-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #181a1e;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Code Editor & Test Runner Pane (Light Pastel Card Theme) */
.editor-pane {
  height: 100%;
  min-width: 0;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.editor-headbar {
  height: 48px;
  min-height: 48px;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.editor-lang-picker {
  background: #f3f4f6;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-pill);
  color: #181a1e;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  font-variation-settings: 'ROND' 100, 'wght' 700;
  padding: 5px 12px;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.editor-lang-picker:hover {
  border-color: rgba(0, 0, 0, 0.15);
  background: #e5e7eb;
}

.btn-tool-plain {
  background: #f3f4f6;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-pill);
  color: #181a1e;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  font-variation-settings: 'ROND' 100, 'wght' 700;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-tool-plain:hover {
  background: #e5e7eb;
  color: #181a1e;
}

/* Editor Workspace Wrap & Full Textarea Surface (Clean Light Surface) */
.editor-workspace-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

.editor-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  height: 100%;
  width: 100%;
  background: #ffffff;
}

.editor-main-area, .editor-core {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  width: 100%;
  background: #ffffff;
}

.editor-gutter {
  width: 46px;
  min-width: 46px;
  background: #f8fafc;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  user-select: none;
  padding: 12px 0;
}

.line-numbers {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #94a3b8;
  text-align: right;
  padding-right: 10px;
  line-height: 1.55;
  font-weight: 500;
}

.editor-textarea-wrapper, .editor-input-area {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  background: #ffffff;
}

.code-textarea {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: #181a1e;
  caret-color: #181a1e;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  padding: 12px 16px;
  white-space: pre;
  tab-size: 4;
  box-sizing: border-box;
  -webkit-text-fill-color: #181a1e;
}

/* Syntax colours (VS Code Light+): a coloured copy of the code under the textarea, whose own text is see-through */
.code-highlight { position: absolute; inset: 0; margin: 0; padding: 12px 16px; border: 0; box-sizing: border-box; background: transparent; font-family: var(--font-mono); font-size: 13px; line-height: 1.55; font-variation-settings: normal; white-space: pre; tab-size: 4; color: #181a1e; pointer-events: none; overflow: hidden; z-index: 1; }
.code-highlight code { display: block; font: inherit; color: inherit; background: none; padding: 0; will-change: transform; }
.has-highlight .code-textarea { -webkit-text-fill-color: transparent; }
.has-highlight .code-textarea::selection { background: rgba(82, 142, 204, 0.28); -webkit-text-fill-color: transparent; }
.code-highlight .tok-keyword { color: #0000ff; }
.code-highlight .tok-control { color: #af00db; }
.code-highlight .tok-type { color: #267f99; }
.code-highlight .tok-string { color: #a31515; }
.code-highlight .tok-number { color: #098658; }
.code-highlight .tok-comment { color: #008000; font-style: italic; }
.code-highlight .tok-function { color: #795e26; }
.code-highlight .tok-pre { color: #af00db; }

.editor-error-marker {
  position: absolute;
  left: 0;
  right: 0;
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid #dc2626;
  pointer-events: none;
  z-index: 5;
  display: flex;
  align-items: center;
  padding-left: 10px;
}

.editor-error-badge-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-family: var(--font-mono);
  pointer-events: auto;
}

.err-badge-tag {
  font-weight: 700;
}

.editor-statusbar, .editor-status-strip {
  height: 26px;
  min-height: 26px;
  background: #f8fafc;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #64748b;
}

.status-left, .status-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-tag {
  color: #0284c7;
  font-weight: 700;
}

.status-meta {
  color: #64748b;
}

/* Drawer: Console & Test Runner (Themed to Soft Light Card System) */
.console-drawer {
  height: 240px;
  min-height: 180px;
  max-height: 300px;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.console-tabbar {
  height: 36px;
  min-height: 36px;
  background: #f8fafc;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.console-tabs-group {
  display: flex;
  gap: 4px;
}

.console-tab-item {
  background: transparent;
  border: none;
  color: #64748b;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.console-tab-item:hover {
  color: #181a1e;
  background: rgba(0, 0, 0, 0.04);
}

.console-tab-item.active {
  background: #ffffff;
  color: #181a1e;
  font-weight: 700;
  font-variation-settings: 'ROND' 100, 'wght' 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.console-content-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  background: #ffffff;
}

.test-chips-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.test-chip {
  background: #f3f4f6;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #4b5563;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.test-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ca3af;
}

.test-chip.active {
  background: #181a1e;
  color: #ffffff;
  font-weight: 700;
  border-color: #181a1e;
}

.test-chip.passed {
  background: #d5ebe2;
  border-color: #bfe1d4;
  color: #1b4d3e;
  font-weight: 700;
}

.test-chip.passed .test-chip-dot {
  background: #15803d;
}

.test-chip.failed {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
  font-weight: 700;
}

.test-chip.failed .test-chip-dot {
  background: #dc2626;
}

.test-eval-banner {
  padding: 8px 12px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.test-eval-banner.pass {
  background: #d5ebe2;
  border: 1px solid #bfe1d4;
  color: #1b4d3e;
}

.test-eval-banner.fail {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.eval-field-group {
  margin-bottom: 8px;
}

.eval-field-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  font-variation-settings: 'ROND' 100, 'wght' 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 3px;
}

.eval-field-output {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #181a1e;
  white-space: pre-wrap;
}

.eval-field-output.correct {
  border-color: #bfe1d4;
  background: #d5ebe2;
  color: #1b4d3e;
}

.eval-field-output.mismatch {
  border-color: #fecaca;
  background: #fee2e2;
  color: #b91c1c;
}

.pipeline-stages-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.pipeline-step {
  flex: 1;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pipeline-step.passed {
  border-color: #bfe1d4;
  background: #f0fdf4;
}

.pipeline-step.failed {
  border-color: #fecaca;
  background: #fef2f2;
}

.pipeline-step.blocked {
  opacity: 0.6;
}

.pipeline-step-badge {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
}

.pipeline-step-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  color: #181a1e;
}

.pipeline-step-status {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
}

.pipeline-step.passed .pipeline-step-status {
  color: #15803d;
}

.pipeline-step.failed .pipeline-step-status {
  color: #dc2626;
}

.compile-error-box {
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

.compile-error-header {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  color: #b91c1c;
  margin-bottom: 6px;
}

.compile-error-body {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #991b1b;
  white-space: pre-wrap;
  margin: 0;
}

.logic-feedback-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

.logic-feedback-box.passed {
  border-color: #bfe1d4;
  background: #f0fdf4;
}

.logic-feedback-box.failed {
  border-color: #fecaca;
  background: #fef2f2;
}

.logic-feedback-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.logic-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  color: #181a1e;
}

.logic-feedback-desc {
  font-size: 11.5px;
  color: #4b5563;
  line-height: 1.4;
}

.custom-stdin-box {
  width: 100%;
  height: 80px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  font-family: var(--font-terminal) !important;
  font-size: 12px;
  color: #181a1e;
  resize: none;
  outline: none;
  box-sizing: border-box;
}

.terminal-log-output {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--font-terminal) !important;
  font-size: 12px;
  line-height: 1.55;
  color: #181a1e;
  min-height: 80px;
}

.terminal-log-output *,
#terminal_output,
#terminal_output *,
.term-eval-session,
.term-tc-code-block,
.term-session-title,
.term-session-meta,
.term-stage-header,
.term-stage-title,
.term-stage-sub,
.term-tc-metrics,
.term-tc-num,
.term-tc-id,
.term-badge {
  font-family: var(--font-terminal) !important;
}

.terminal-log-output .meta {
  color: #64748b;
  font-style: italic;
}

/* ==========================================================================
   ONLINE JUDGE (OJ) VERDICT SYSTEM (AC, WA, TLE, MLE, RTE, CE)
   ========================================================================== */

/* Main Verdict Banner */
.term-verdict-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 14px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.term-verdict-banner.ac {
  background: #f0fdf4;
  border-color: #86efac;
  color: #15803d;
}

.term-verdict-banner.wa {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.term-verdict-banner.tle {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #b45309;
}

.term-verdict-banner.mle {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

.term-verdict-banner.rte {
  background: #faf5ff;
  border-color: #d8b4fe;
  color: #7e22ce;
}

.term-verdict-banner.ce {
  background: #fff1f2;
  border-color: #fda4af;
  color: #be123c;
}

.term-verdict-badge-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.term-verdict-badge-box.ac {
  background: #16a34a;
  color: #ffffff;
}

.term-verdict-badge-box.wa {
  background: #dc2626;
  color: #ffffff;
}

.term-verdict-badge-box.tle {
  background: #d97706;
  color: #ffffff;
}

.term-verdict-badge-box.mle {
  background: #ea580c;
  color: #ffffff;
}

.term-verdict-badge-box.rte {
  background: #9333ea;
  color: #ffffff;
}

.term-verdict-badge-box.ce {
  background: #e11d48;
  color: #ffffff;
}

.term-verdict-text-group {
  flex: 1;
  min-width: 0;
}

.term-verdict-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
  line-height: 1.3;
}

.term-verdict-subtitle {
  font-size: 11px;
  opacity: 0.85;
  margin-top: 2px;
  line-height: 1.4;
}

.term-verdict-metrics-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.05);
  white-space: nowrap;
}

/* Individual Test Case Cards */
.term-test-cases-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.term-test-case-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  transition: border-color 0.15s ease;
}

.term-test-case-card.ac {
  border-left: 4px solid #16a34a;
}

.term-test-case-card.wa {
  border-left: 4px solid #dc2626;
}

.term-test-case-card.tle {
  border-left: 4px solid #d97706;
}

.term-test-case-card.mle {
  border-left: 4px solid #ea580c;
}

.term-test-case-card.rte {
  border-left: 4px solid #9333ea;
}

.term-test-case-card.ce {
  border-left: 4px solid #e11d48;
}

.term-tc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.term-tc-id {
  display: flex;
  align-items: center;
  gap: 8px;
}

.term-tc-num {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
}

.term-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.term-badge.ac {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.term-badge.wa {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.term-badge.tle {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.term-badge.mle {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.term-badge.rte {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #d8b4fe;
}

.term-badge.ce {
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fda4af;
}

.term-tc-metrics {
  font-size: 10.5px;
  color: #64748b;
  display: flex;
  gap: 8px;
}

/* IO Grid */
.term-tc-io-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.term-tc-io-col {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}

.term-tc-col-title {
  font-size: 9.5px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.term-tc-code-block {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
  color: #1e293b;
}

.term-out-pass {
  color: #15803d;
  font-weight: 600;
}

.term-out-fail {
  color: #dc2626;
  font-weight: 600;
}

/* Diff Comparison */
.term-tc-diff-box {
  margin-top: 10px;
  background: #fff7ed;
  border: 1px solid #ffedd5;
  border-radius: 8px;
  padding: 8px 12px;
}

.term-diff-title {
  font-size: 10px;
  font-weight: 700;
  color: #c2410c;
  margin-bottom: 4px;
}

.term-diff-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
}

.term-diff-line-item.expected code {
  color: #15803d;
  background: rgba(22, 163, 74, 0.08);
  padding: 1px 4px;
  border-radius: 3px;
}

.term-diff-line-item.actual code {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Submissions Tab Badges */
.sub-verdict-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  margin-right: 6px;
}

.sub-verdict-pill.ac {
  background: #dcfce7;
  color: #15803d;
}

.sub-verdict-pill.wa {
  background: #fee2e2;
  color: #b91c1c;
}

.sub-verdict-pill.tle {
  background: #fef3c7;
  color: #b45309;
}

.sub-verdict-pill.mle {
  background: #ffedd5;
  color: #c2410c;
}

.sub-verdict-pill.rte {
  background: #f3e8ff;
  color: #7e22ce;
}

.sub-verdict-pill.ce {
  background: #ffe4e6;
  color: #be123c;
}

.sub-verdict-text.ac { color: #15803d; font-weight: 600; }
.sub-verdict-text.wa { color: #b91c1c; font-weight: 600; }
.sub-verdict-text.tle { color: #b45309; font-weight: 600; }
.sub-verdict-text.rte { color: #7e22ce; font-weight: 600; }
.sub-verdict-text.ce { color: #be123c; font-weight: 600; }

/* Test Eval Banner States in Specs Tab */
.test-eval-banner.ac {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}
.test-eval-banner.wa {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}
.test-eval-banner.tle {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #b45309;
}
.test-eval-banner.rte {
  background: #f3e8ff;
  border-color: #d8b4fe;
  color: #7e22ce;
}
.test-eval-banner.ce {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #be123c;
}

/* Execution Action Toolbar (Light Card Theme) */
.console-action-bar {
  height: 48px;
  min-height: 48px;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.checkbox-stdin {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4b5563;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.btn-run-tests {
  background: #f3f4f6;
  color: #181a1e;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  font-variation-settings: 'ROND' 100, 'wght' 700;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-run-tests:hover {
  background: #e5e7eb;
}

.btn-submit-lab {
  background: #d5ebe2;
  color: #1b4d3e;
  border: 1px solid #bfe1d4;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  font-variation-settings: 'ROND' 100, 'wght' 800;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-submit-lab:hover {
  background: #c3e5d9;
}
/* ==========================================================================
   VIEW: LEADERBOARD & FULL CURRICULUM OVERVIEWS (Clean Rounded Cards)
   ========================================================================== */
.overlay-fullview {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  background: #f6f8fa;
  z-index: 10;
  display: none;
  overflow-y: auto;
  font-family: var(--font-sans);
}

.overlay-fullview.active {
  display: block;
}

.fullview-container {
  max-width: 1100px;
  margin: 0 auto;
}

.fullview-title-wrap {
  margin-bottom: 24px;
}

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

.fullview-title {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 800;
  color: #181a1e;
  letter-spacing: -0.5px;
}

.ec-back-btn {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-pill);
  padding: 7px 18px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  color: #181a1e;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.ec-back-btn:hover {
  background: #181a1e;
  color: #ffffff;
}

/* Leaderboard Terminal Data Table (Pure White Rounded Card) */
.data-table-terminal {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  overflow: hidden;
}

.data-table-terminal th {
  background: #f9fafb;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #6b7280;
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.data-table-terminal td {
  padding: 14px 18px;
  border-bottom: 1px solid #f3f4f6;
  font-family: var(--font-sans);
  font-size: 13px;
  color: #181a1e;
}

.data-table-terminal tr:last-child td {
  border-bottom: none;
}

.data-table-terminal tr.current-user {
  background: #f0fdf4 !important;
  font-weight: 700;
}

/* Curriculum Catalog Cards Grid */
#curriculum_catalog_grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.curriculum-module-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

/* Dialog Modals (Pure White 24px Rounded Windows) */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
}

.dialog-overlay.open {
  display: flex;
}

.dialog-window {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  width: 90%;
  max-width: 540px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dialog-header {
  height: 52px;
  background: #ffffff;
  border-bottom: 1px solid #f3f4f6;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialog-title {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: #181a1e;
}

.dialog-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.dialog-close:hover {
  color: #181a1e;
}

.dialog-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dialog-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dialog-row label {
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
}

.input-util {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 9px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: #181a1e;
  outline: none;
  transition: border-color 0.15s ease;
}

.input-util:focus {
  border-color: #181a1e;
}

.dialog-footer {
  padding: 14px 20px;
  background: #f9fafb;
  border-top: 1px solid #f3f4f6;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-danger-signout {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

/* ==========================================================================
   MAIN APPLICATION ROOT (Mounted only AFTER authentication)
   ========================================================================== */
.app-root-view {
  height: 100vh;
  width: 100vw;
  max-height: 100vh;
  max-width: 100vw;
  background: #f6f8fa;
  border: none;
  border-radius: 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  position: relative;
  box-shadow: none;
}

/* ==========================================================================
   EXAM SESSION SINGLE-WINDOW LOCKOUT SCREEN (Strict: NO Resume button)
   ========================================================================== */
.exam-lockout-screen {
  display: none !important;
}

.exam-lockout-card {
  background: var(--bg-surface);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-md);
  max-width: 480px;
  width: 100%;
  padding: 36px 30px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(239, 68, 68, 0.15);
  animation: cardFadeIn 0.25s ease;
}

.exam-lockout-icon {
  font-size: 44px;
  margin-bottom: 14px;
  color: var(--status-fail);
}

.exam-lockout-title {
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 700;
  color: #fca5a5;
  margin-bottom: 12px;
  line-height: 1.35;
}

.exam-lockout-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
}

.exam-lockout-sub {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 24px;
}

.exam-lockout-actions {
  display: flex;
  justify-content: center;
}

/* Exam Mode Toggle in Workbar */
.btn-exam-mode-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.btn-exam-mode-toggle.active {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fcd34d;
}

.exam-status-dot {
  display: none !important;
}

.btn-danger-signout {
  background: transparent !important;
  color: var(--status-fail);
  border: 1px solid var(--status-fail);
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.btn-danger-signout:hover {
  background: transparent !important;
  border-color: #f87171;
  color: #f87171;
}






/* ==========================================================================
   EC0C2DF DASHBOARD SYSTEM (Exact Match to ec0c2df97f95ad52e8a0367aaf46aa6d.jpg)
   Slim Left Rail | Welcome Back Header | Pastel Cards | Schedule Calendar
   ========================================================================== */

#overlay_home {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100vh;
  background: #f6f8fa;
  overflow: hidden;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: none;
}

#overlay_home.active {
  display: block;
}

.ec-dashboard-layout {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #f6f8fa;
  font-family: var(--font-sans);
}

/* --------------------------------------------------------------------------
   1. SLIM LEFT ICON RAIL (Exact Match to Reference Image)
   -------------------------------------------------------------------------- */
.ec-sidebar-rail {
  position: relative;
  width: 76px;
  min-width: 76px;
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 20px 0;
  z-index: 100;
  flex-shrink: 0;
}

.ec-rail-brand {
  cursor: pointer;
  margin-bottom: 24px;
}

.ec-rail-logo-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ec-rail-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.ec-rail-icons-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.ec-rail-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
}

.ec-rail-icon-btn:hover {
  background: #f3f4f6;
  color: #181a1e;
}

.ec-rail-icon-btn.active {
  background: #181a1e !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(24, 26, 30, 0.2);
}

/* The current-tab circle that slides between tabs (js/rail-indicator.js). It sits behind the
   buttons; with it in place the active button's own circle turns see-through so only the
   moving one shows. */
.ec-rail-indicator {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  background: #181a1e;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  will-change: clip-path;
}
.ec-rail-indicator.is-on { opacity: 1; }
.has-indicator .ec-rail-icon-btn { position: relative; z-index: 1; }
.has-indicator .ec-rail-icon-btn.active {
  background: transparent !important;
  box-shadow: none;
}

.ec-rail-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --------------------------------------------------------------------------
   2. MAIN DASHBOARD CONTENT AREA
   -------------------------------------------------------------------------- */
.ec-main-content-flow {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  padding: 28px 40px 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Header Row: Welcome back & Search Pill */
.ec-flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 4px;
}

.ec-welcome-title {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 800;
  color: #181a1e;
  letter-spacing: -0.6px;
  line-height: 1.1;
  margin: 0;
}

.ec-welcome-title .wave-emoji {
  display: inline-block;
  margin-left: 4px;
}

.ec-student-meta {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  margin-top: 4px;
}

.ec-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ec-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  width: 220px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  color: #9ca3af;
}

.ec-search-input {
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 13px;
  color: #181a1e;
  outline: none;
  width: 100%;
}

.ec-search-input::placeholder {
  color: #9ca3af;
}

.ec-avatar-profile-btn {
  cursor: pointer;
}

.ec-avatar-inner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fce3ec;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #831843;
}

/* 2-Column Split: Left 2/3 (Activities & Progress) + Right 1/3 (Lesson Schedule) */
.ec-split-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
  width: 100%;
}

@media (min-width: 1400px) {
  .ec-split-grid {
    grid-template-columns: 1fr 360px;
    gap: 32px;
  }
}

.ec-column-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ec-section-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.ec-section-title {
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 700;
  color: #181a1e;
  letter-spacing: -0.4px;
  margin: 0;
}

.ec-count-badge {
  color: #9ca3af;
  font-weight: 500;
}

.ec-shelf-pill {
  background: #f3f4f6;
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* --------------------------------------------------------------------------
   ACTIVITIES TODAY CARDS (Mint & Blush Pink with arrow buttons)
   -------------------------------------------------------------------------- */
.ec-activities-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ec-activity-card {
  border-radius: 22px;
  padding: 22px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 156px;
  position: relative;
}

.ec-activity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.ec-activity-card.mint {
  background: #d5ebe2;
  border: 1px solid #bfe1d4;
  color: #1b4d3e;
}

.ec-activity-card.blush {
  background: #fce3ec;
  border: 1px solid #f8c8dc;
  color: #831843;
}

.ec-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ec-avatars-cluster {
  display: flex;
  align-items: center;
}

.ec-mini-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  margin-right: -6px;
}

.ec-avatar-plus {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #181a1e;
}

.ec-rating-pill {
  background: #ffffff;
  border-radius: var(--radius-pill);
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 700;
  color: #181a1e;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.ec-card-bottom-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.ec-course-code-mini {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  opacity: 0.8;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: block;
}

.ec-activity-title {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  color: #181a1e;
  line-height: 1.25;
  margin: 0;
}

.ec-arrow-circle-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  color: #181a1e;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.15s ease;
}

.ec-arrow-circle-btn:hover {
  background: #181a1e;
  color: #ffffff;
}

.ec-arrow-circle-btn.sm {
  width: 30px;
  height: 30px;
  min-width: 30px;
}

/* --------------------------------------------------------------------------
   LEARNING PROGRESS COUNTER CARDS (Mint, Butter Yellow, Lilac)
   -------------------------------------------------------------------------- */
.ec-progress-counters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.ec-counter-card {
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
}

.ec-counter-card.mint {
  background: #d5ebe2;
  border: 1px solid #bfe1d4;
}

.ec-counter-card.yellow {
  background: #fef0c7;
  border: 1px solid #fde68a;
}

.ec-counter-card.lilac {
  background: #ebe3f7;
  border: 1px solid #ddd0f3;
}

.ec-counter-lbl {
  font-size: 13px;
  font-weight: 600;
  color: #181a1e;
  opacity: 0.85;
}

.ec-counter-val-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.ec-counter-number {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 800;
  color: #181a1e;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   ACTIVE EXPERIMENT HERO CARD (Butter Yellow Popout)
   -------------------------------------------------------------------------- */
.ec-active-hero-card {
  background: #fef0c7;
  border: 1px solid #fde68a;
  border-radius: 22px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

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

.ec-hero-badge-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #78350f;
}

.ec-hero-kicker {
  background: rgba(255, 255, 255, 0.7);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.ec-hero-lessons-count {
  opacity: 0.9;
}

.ec-hero-title {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 800;
  color: #181a1e;
  letter-spacing: -0.4px;
  margin: 4px 0 0 0;
}

.ec-hero-desc {
  font-size: 13px;
  color: #78350f;
  line-height: 1.4;
  opacity: 0.9;
  margin: 0;
}

.ec-hero-progress-track {
  height: 6px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  width: 100%;
  margin-top: 4px;
}

.ec-hero-progress-pill {
  height: 100%;
  background: #181a1e;
  border-radius: var(--radius-pill);
}

.ec-hero-actions-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.btn-ec-hero-launch {
  background: #181a1e;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 9px 20px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ec-hero-launch:hover {
  background: #2a2e36;
}

/* --------------------------------------------------------------------------
   ACADEMIC PRACTICAL TRACKS GRID (Dynamic Shelf)
   -------------------------------------------------------------------------- */
.home-courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.home-course-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  transition: all 0.15s ease;
}

.home-course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

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

.course-card-code-pill {
  background: #f3f4f6;
  color: #181a1e;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}

.course-card-lang-pill {
  background: #d5ebe2;
  color: #1b4d3e;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
}

.course-card-title {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: #181a1e;
  line-height: 1.3;
  margin: 0;
}

.course-card-meta {
  font-size: 11.5px;
  color: #6b7280;
  margin-top: 4px;
  line-height: 1.35;
}

.course-card-progress-bar {
  height: 5px;
  background: #f3f4f6;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.course-card-progress-fill {
  height: 100%;
  background: #181a1e;
  border-radius: var(--radius-pill);
}

.course-card-progress-nums {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
  margin-top: 4px;
}

.course-card-next-box {
  background: #f9fafb;
  border-radius: 12px;
  padding: 10px 12px;
}

.next-box-kicker {
  font-size: 9.5px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.5px;
}

.next-box-title {
  font-size: 12px;
  font-weight: 600;
  color: #181a1e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.course-card-footer {
  display: flex;
  gap: 8px;
}

.btn-course-launch {
  flex: 1;
  background: #181a1e;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-course-launch:hover {
  background: #2a2e36;
}

.btn-course-syllabus {
  background: #f3f4f6;
  color: #181a1e;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-course-syllabus:hover {
  background: #e5e7eb;
}

/* --------------------------------------------------------------------------
   RIGHT COLUMN: LESSON SCHEDULE & CALENDAR
   -------------------------------------------------------------------------- */
.ec-column-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Calendar Card (Pure White Rounded Card) */
.ec-calendar-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.ec-cal-month-title {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 800;
  color: #181a1e;
}

.ec-cal-nav-btns {
  display: flex;
  gap: 6px;
}

.ec-cal-arrow-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  color: #181a1e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.15s ease;
}

.ec-cal-arrow-btn:hover {
  background: #f3f4f6;
}

.ec-cal-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.5px;
}

.ec-cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
  justify-items: center;
  align-items: center;
}

.ec-cal-day {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  max-width: 32px;
  max-height: 32px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #181a1e;
  border-radius: 50% !important;
  cursor: default;
  box-sizing: border-box;
}

.ec-cal-day.active-mint {
  background: #d5ebe2 !important;
  color: #1b4d3e !important;
  font-weight: 700;
  border-radius: 50% !important;
}

.ec-cal-day.active-black {
  background: #181a1e !important;
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 50% !important;
}

.ec-cal-day.dotted-ring {
  border: 1px dashed #d1d5db;
  color: #9ca3af;
  border-radius: 50% !important;
}

/* Upcoming Assignments List (Soft Mint Cards matching ec0c2df right panel) */
.ec-schedule-items-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-assignments-wrapper .assignment-item {
  background: #d5ebe2;
  border: 1px solid #bfe1d4;
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  transition: all 0.15s ease;
}

.home-assignments-wrapper .assignment-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 77, 62, 0.08);
}

.home-assignments-wrapper .assignment-left {
  overflow: hidden;
}

.home-assignments-wrapper .assignment-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: #181a1e;
  line-height: 1.3;
}

.home-assignments-wrapper .assignment-meta {
  font-size: 11px;
  color: #1b4d3e;
  opacity: 0.85;
  margin-top: 3px;
}

.home-assignments-wrapper .assignment-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.home-assignments-wrapper .assignment-badge-status {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.home-assignments-wrapper .assignment-badge-status.status-verified {
  background: #ffffff;
  color: #1b4d3e;
}

.home-assignments-wrapper .assignment-badge-status.status-progress {
  background: #ffffff;
  color: #b45309;
}

.home-assignments-wrapper .assignment-badge-status.status-pending {
  background: #ffffff;
  color: #6b7280;
}

.home-assignments-wrapper .assignment-badge-status.status-locked {
  background: rgba(255, 255, 255, 0.6);
  color: #6b7280;
}

.home-assignments-wrapper .btn-assignment-solve {
  background: #ffffff;
  border: none;
  color: #181a1e;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.home-assignments-wrapper .btn-assignment-solve:hover {
  background: #181a1e;
  color: #ffffff;
}

.hbp-tests-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hbp-test-item {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-sans);
}


/* Global App Viewport (Holds Home, Workbench, Curriculum, Rankings) */
.ec-app-viewport {
  flex: 1;
  height: 100vh;
  width: calc(100vw - 76px);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sidebar-specs {
  background: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-pill);
  color: #475569;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn-sidebar-specs:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.sidebar-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-course-select {
  background: #f3f4f6;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-pill);
  color: #181a1e;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  outline: none;
  cursor: pointer;
  max-width: 130px;
}

.btn-sidebar-add {
  background: #181a1e;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.15s ease;
}

.btn-sidebar-add:hover {
  opacity: 0.85;
}

/* ==========================================================================
   Section headers: Curriculum, Rankings, Exams and Settings line up with the
   dashboard header (same padding, title size and weight)
   ========================================================================== */
.overlay-fullview .fullview-container {
  padding: 28px 40px 48px 40px;
  /* Full width like the dashboard, so every section's header starts at the same left edge */
  max-width: none;
  margin: 0;
}
.overlay-fullview .fullview-title {
  font-size: 28px;
  letter-spacing: -0.6px;
  line-height: 1.1;
  margin: 0;
}
.overlay-fullview .ec-fullview-header-row {
  gap: 12px;
  flex-wrap: wrap;
}
.fullview-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin: 4px 0 0 0;
}
@media (max-width: 768px) {
  .overlay-fullview .fullview-container { padding: 20px 16px 40px 16px; }
  .overlay-fullview .fullview-title { font-size: 24px; }
}

/* Exams embedded inside the portal */
.fullview-container--frame {
  max-width: none;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.exams-embed-frame {
  flex: 1;
  width: 100%;
  min-height: 480px;
  border: 1px solid var(--border-card);
  border-radius: 16px;
  background: var(--bg-surface);
}
/* Learn fills the whole view in white, edge to edge; the page inside carries the heading and scrolls itself */
#overlay_learn { background: #ffffff; overflow: hidden; }
#overlay_learn .fullview-container { padding: 0; height: 100vh; }
.learn-embed-frame {
  display: block;
  height: 100%;
  min-height: 0;
  border: none;
  border-radius: 0;
  background: #ffffff;
}

/* Settings */
.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
}
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 20px 22px;
}
.settings-card-head h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.settings-card-head p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 4px 0 12px 0;
}
.settings-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 24px;
  margin: 0;
}
.settings-details dt {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.settings-details dd {
  margin: 2px 0 0 0;
  font-size: 14px;
  color: var(--text-primary);
  word-break: break-word;
}
.settings-details dd.mono { font-family: var(--font-terminal); font-size: 13px; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--border-subtle);
  font-size: 13.5px;
  color: var(--text-secondary);
}
.settings-row label { font-weight: 600; color: var(--text-primary); }
.settings-select {
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-muted);
  background: var(--bg-surface);
  color: var(--text-primary);
  min-width: 130px;
}
.settings-switch {
  width: 20px;
  height: 20px;
  accent-color: var(--text-primary);
  cursor: pointer;
}
.settings-select:focus-visible,
.settings-switch:focus-visible,
.ec-back-btn:focus-visible,
.ec-rail-icon-btn:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

/* "Reduce animations" setting: same effect as the operating system preference */
html.reduce-motion *,
html.reduce-motion *::before,
html.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-delay: 0ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* ==========================================================================
   Smooth caret for the code editor: the native caret is hidden and a drawn
   caret glides between positions (like VS Code's smooth caret animation)
   ========================================================================== */
.editor-textarea-wrapper.smooth-caret-on .code-textarea {
  caret-color: transparent;
}
.smooth-caret {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 18px;
  border-radius: 1px;
  background: var(--text-primary);
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  /* Position is animated per frame in editor.js (a CSS transition restarts on every key) */
  transition: height 120ms ease;
}
.editor-textarea-wrapper.caret-visible .smooth-caret {
  opacity: 1;
  animation: smoothCaretBlink 1.1s ease-in-out 0.5s infinite;
}
/* While typing the caret stays solid; blinking resumes after a short pause */
.editor-textarea-wrapper.caret-typing .smooth-caret {
  animation: none;
  opacity: 1;
}
@keyframes smoothCaretBlink {
  0%, 45% { opacity: 1; }
  55%, 95% { opacity: 0.15; }
  100% { opacity: 1; }
}

/* Dashboard stays hidden until its entrance animation starts (no un-animated first frame) */
#overlay_home.home-preanim .ec-dashboard-layout {
  visibility: hidden;
}
html.reduce-motion #overlay_home.home-preanim .ec-dashboard-layout {
  visibility: visible;
}

/* Typed text is uncovered as the smooth caret glides over it (sized per frame in editor.js) */
.smooth-reveal {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to right, transparent 0, var(--reveal-bg, #ffffff) 4px);
  will-change: transform, width;
}
.editor-textarea-wrapper:not(.caret-visible) .smooth-reveal {
  display: none !important;
}

/* Rolling Ln / Col digits in the editor status bar (driven by editor.js).
   Each digit has its own slot; the slot is taller than the text and fades out in that extra
   space, so rolling digits blur away softly instead of being cut at a hard edge. */
.roll-num {
  display: inline-flex;
  font-variant-numeric: tabular-nums;
}
.roll-slot {
  display: inline-grid;
  overflow: hidden;
  padding: 0.4em 0;
  margin: -0.4em 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 0.4em, #000 calc(100% - 0.4em), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 0.4em, #000 calc(100% - 0.4em), transparent 100%);
}
.roll-face {
  grid-area: 1 / 1;
  display: inline-block;
}

/* Text removed by Backspace / Option+Delete / Cmd+Delete, erased behind the gliding caret
   (sized per frame in editor.js). It fades softly where it meets the caret. */
.smooth-ghost {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  white-space: pre;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 4px), transparent 100%);
  mask-image: linear-gradient(to right, #000 calc(100% - 4px), transparent 100%);
  will-change: transform, width;
}
.smooth-ghost-text {
  display: block;
  white-space: pre;
}
.editor-textarea-wrapper:not(.caret-visible) .smooth-ghost {
  display: none !important;
}

/* Caret turns blue while typing and fades back to its normal colour after a short pause.
   Quick fade in (typing rule), slower fade back (base rule). */
.editor-textarea-wrapper .smooth-caret {
  transition: height 120ms ease, background-color 450ms ease;
}
.editor-textarea-wrapper.caret-typing .smooth-caret {
  background: #528ecc; /* the [dot] blue from the brand header */
  transition: height 120ms ease, background-color 150ms ease;
}

/* ==========================================================================
   Editor file tabs: capsules inside a pill container (segmented-control style).
   Only colour, background and shadow transition, so hover effects never fight
   the entrance animation.
   ========================================================================== */
.vscode-tabs-bar {
  background: #ffffff;
  height: 50px;
  min-height: 50px;
  padding: 0 12px;
  gap: 8px;
}
.vscode-tabs-scroll {
  flex: 0 1 auto;
  height: 36px;
  padding: 3px;
  gap: 2px;
  background: #f1f5f9;
  border-radius: 999px;
}
.vscode-tab {
  height: 100%;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.vscode-tab:hover {
  background: rgba(255, 255, 255, 0.65);
}
.vscode-tab.active {
  background: #ffffff;
  border-bottom-color: transparent;
  /* A hairline outline instead of a blurred shadow: it stays inside the pill, which clips anything outside */
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
}
.vscode-tab-close {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.vscode-tab-add {
  width: 30px;
  height: 30px;
  margin-left: 0;
  border-radius: 999px;
  background: #f1f5f9;
  transition: background-color 0.15s ease, color 0.15s ease;
}

/* ==========================================================================
   Themed dialog (new file / delete file). Opened and closed by app.js openModal,
   animated by motion.js modalIn / modalOut.
   ========================================================================== */
.sc-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.sc-modal[hidden] {
  display: none;
}
.sc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.sc-modal-card {
  position: relative;
  width: min(420px, 100%);
  background: #ffffff;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.05);
  font-family: var(--font-sans);
}
.sc-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}
.sc-modal-text {
  margin: 6px 0 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}
.sc-modal-field {
  margin-top: 18px;
}
.sc-modal-field[hidden] {
  display: none;
}
.sc-modal-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.sc-modal-input {
  width: 100%;
  box-sizing: border-box;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.sc-modal-input:focus {
  background: #ffffff;
  border-color: #528ecc;
  box-shadow: 0 0 0 3px rgba(82, 142, 204, 0.18);
}
.sc-modal-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.sc-modal-choices[hidden] {
  display: none;
}
.sc-modal-chip {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f1f5f9;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.sc-modal-chip:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}
.sc-modal-error {
  min-height: 18px;
  margin-top: 10px;
  font-size: 12px;
  color: #b91c1c;
}
.sc-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.sc-modal-btn {
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #ffffff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}
.sc-modal-btn:hover {
  background: #f1f5f9;
}
.sc-modal-btn.primary {
  background: #181a1e;
  border-color: #181a1e;
  color: #ffffff;
}
.sc-modal-btn.primary:hover {
  background: #2b2e34;
}
.sc-modal-btn.primary.danger {
  background: #b91c1c;
  border-color: #b91c1c;
}
.sc-modal-btn.primary.danger:hover {
  background: #991b1b;
}
.sc-modal-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.sc-modal-btn:focus-visible,
.sc-modal-chip:focus-visible {
  outline: 2px solid #528ecc;
  outline-offset: 2px;
}

/* Workspace empty state and an empty tab pill */
.workspace-empty {
  padding: 10px 16px 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.vscode-tabs-scroll.is-empty {
  display: none;
}

/* ==========================================================================
   Editor tabs: sliding active capsule, drag to reorder, gaps that open and close
   ========================================================================== */
.vscode-tabs-scroll {
  position: relative;
}
.vscode-tab {
  position: relative;
  z-index: 1;
  cursor: pointer;
}
/* The white capsule slides behind the active tab (positioned per frame in app.js) */
.vscode-tab-indicator {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
  pointer-events: none;
  opacity: 0;
  will-change: transform, width;
}
.vscode-tabs-scroll.has-indicator .vscode-tab.active {
  background: transparent;
  box-shadow: none;
}
.vscode-tabs-scroll.has-indicator .vscode-tab.active:hover {
  background: transparent;
}
/* Where a dragged tab will land */
.vscode-tab-placeholder {
  flex: 0 0 auto;
  height: 100%;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
}
/* The tab being dragged, lifted out of the pill */
.vscode-tab.is-dragging {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  color: #0f172a;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.08);
  cursor: grabbing;
  transform-origin: center center;
  transition: none;
}
