/* Ulearn Dashboard Redesign — shared styles
   Light Ulearn palette: cream canvas / yellow lead / orange accent /
   navy ink / mid-blue support. Variable names preserved so existing
   selectors keep working. */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --brand-yellow:        #F0C040;
  --brand-yellow-deep:   #E5AE2A;
  --brand-yellow-soft:   #FFE38A;
  --brand-orange:        #F09020;
  --brand-orange-deep:   #D9761A;
  --brand-orange-soft:   #FFC082;
  --brand-navy:          #0B1E3F;
  --brand-blue:          #106090;
  --brand-blue-soft:     #B9D9EE;

  --cream:               #FBF3DC;
  --cream-deep:          #F5E9C4;
  --cream-rim:           #ECDDB0;
  --paper:               #FFFCF3;
  --ink:                 #0B1E3F;
  --ink-2:               #2A3B5C;
  --ink-3:               #5A6B85;
  --ink-4:               #8A98AE;
  --rule:                #E3D8B6;
  --rule-strong:         #C9BC93;

  --bg:                  var(--cream);
  --bg-card:             var(--paper);
  --bg-elevated:         var(--cream-deep);
  --bg-input:            var(--paper);
  --text:                var(--ink);
  --text-dim:            var(--ink-3);
  --text-muted:          var(--ink-4);
  --accent:              var(--brand-yellow);
  --accent-hover:        var(--brand-yellow-deep);
  --pink:                var(--brand-orange);
  --purple:              var(--brand-blue);

  --success:             #2E8B5E;
  --warning:             #D9761A;
  --danger:              #C0392B;

  --srs-new:             #2E8B5E;
  --srs-hatchling:       #F09020;
  --srs-fledgling:       #D9761A;
  --srs-hunter:          #106090;
  --srs-sage:            #2A3B5C;
  --srs-elder:           #8A98AE;

  --border:              var(--rule);
  --border-strong:       var(--rule-strong);

  --radius:              14px;
  --radius-lg:            20px;
  --radius-pill:          999px;
  --shadow:              0 6px 18px -4px rgba(11, 30, 63, 0.10), 0 2px 6px rgba(11, 30, 63, 0.05);
  --shadow-lg:           0 18px 40px -8px rgba(11, 30, 63, 0.14), 0 6px 14px rgba(11, 30, 63, 0.06);
  --shadow-accent:       0 4px 20px rgba(240, 192, 64, 0.40);

  --transition:          0.2s ease;
  --font-sans:    'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

/* Artboard frame */
.dash {
  width: 1320px;
  min-height: 880px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.dash-narrow {
  width: 1100px;
}

/* Top nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(251,243,220,0.85);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-left { display: flex; align-items: center; gap: 14px; }
.nav-right { display: flex; align-items: center; gap: 4px; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0;
}
.logo img { width: 28px; height: 28px; }
.logo .word {
  background: linear-gradient(135deg, var(--accent), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.navbtn:hover { color: var(--text); background: rgba(11, 30, 63, 0.04); }
.navbtn.active {
  color: var(--accent);
  background: rgba(240,192,64,0.10);
  border-color: rgba(240,192,64,0.25);
}
.navbtn svg { width: 16px; height: 16px; }
.navbtn .badge {
  background: var(--pink);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  margin-left: 4px;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  margin-left: 8px;
  background: var(--bg-elevated);
  cursor: pointer;
}

/* Folder tabs */
.folder-tabs {
  display: flex;
  gap: 2px;
  padding: 0 28px;
  background: var(--bg);
  margin-top: -1px;
  border-bottom: 1px solid var(--border);
}
.folder-tab {
  padding: 12px 20px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  top: 1px;
}
.folder-tab:hover { color: var(--text); background: rgba(11, 30, 63, 0.03); }
.folder-tab.active {
  color: var(--text);
  background: var(--bg-card);
  border-color: var(--border);
  border-bottom: 1px solid var(--bg-card);
  font-weight: 600;
}
.folder-tab .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* Main content */
.main {
  flex: 1;
  padding: 28px 32px 40px;
  max-width: 100%;
  overflow: hidden;
}

.page-h {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-h h1 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.page-h .sub {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 4px 0 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  transition: all var(--transition);
}
.btn:hover { background: rgba(11, 30, 63, 0.04); transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(240,192,64,0.5);
  transform: translateY(-1px);
}
.btn-pink {
  background: linear-gradient(135deg, var(--pink), #c01979);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 20px rgba(240,144,32,0.3);
}
.btn-ghost { color: var(--text-dim); }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }

/* Card primitive */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  transition: all var(--transition);
}
.card-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* Section labels */
.label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Hero card flip — used in all variants */
.hero-cta {
  background: linear-gradient(135deg, rgba(240,192,64,0.08), rgba(240,144,32,0.08));
  border: 1px solid rgba(240,192,64,0.20);
  border-radius: 20px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 50%, rgba(240,192,64,0.12), transparent 50%);
  pointer-events: none;
}

.hero-h {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 0 0 6px;
}
.hero-sub {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0 0 14px;
  max-width: 460px;
}

/* Card flip widget */
.flip-card {
  width: 230px;
  height: 150px;
  perspective: 1000px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}
.flip-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
  transform-style: preserve-3d;
}
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 14px 16px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
.flip-face.front {
  background: linear-gradient(160deg, var(--paper), var(--cream-deep));
}
.flip-face.back {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, rgba(46,139,94,0.12), rgba(240,192,64,0.08));
  border-color: rgba(46,139,94,0.3);
}
.flip-face .stripe {
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  width: 36px;
  margin-bottom: 10px;
}
.flip-face.back .stripe { background: var(--success); }
.flip-q {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.flip-text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  flex: 1;
}
.flip-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.flip-foot .grade {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--success);
  font-weight: 600;
}

/* Avatar */
.av {
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--bg-elevated);
}

/* Pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(11, 30, 63, 0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* SRS pile chip */
.srs-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.srs-pile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px 12px;
  position: relative;
  cursor: pointer;
  transition: all var(--transition);
  overflow: hidden;
}
.srs-pile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--c, var(--accent));
}
.srs-pile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.srs-owl {
  width: 56px;
  height: 56px;
  margin: 4px auto 6px;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.35));
}
.srs-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: var(--c);
}
.srs-count {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  margin-top: 2px;
  font-family: var(--font-mono);
  letter-spacing: -0.5px;
}
.srs-pile.due {
  border-color: rgba(240,192,64,0.4);
  background: linear-gradient(180deg, rgba(240,192,64,0.06), var(--bg-card));
}

/* Course card */
.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  cursor: pointer;
  transition: all var(--transition);
  overflow: hidden;
}
.course-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: var(--c, var(--accent));
}
.course-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.course-h {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 8px;
}
.course-h h4 { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.course-meta { font-size: 0.78rem; color: var(--text-muted); }
.course-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(11, 30, 63, 0.06);
  overflow: hidden;
  margin: 12px 0 8px;
}
.course-progress > div {
  height: 100%;
  background: var(--c, var(--accent));
  border-radius: 999px;
  transition: width 0.6s ease;
}
.course-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 8px;
}
.course-foot .due {
  color: var(--accent);
  font-weight: 600;
}
.course-foot .due.zero { color: var(--success); }

/* Mini owls in row */
.owl-row {
  display: flex;
  gap: 4px;
  align-items: center;
}
.owl-row img {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.owl-row .ct {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-left: 2px;
}

/* Hover/click feedback */
.clickable { cursor: pointer; }

/* Dashed add */
.add-dashed {
  border: 1.5px dashed rgba(11, 30, 63, 0.18);
  background: transparent;
  color: var(--text-dim);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 100px;
}
.add-dashed:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(240,192,64,0.04);
}

/* Animations */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.slide-in { animation: slideIn 0.3s ease both; }

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(240,192,64,0.4); }
  70% { box-shadow: 0 0 0 12px rgba(240,192,64,0); }
  100% { box-shadow: 0 0 0 0 rgba(240,192,64,0); }
}
.pulse { animation: pulse-ring 2.5s infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
}
.float { animation: float 3s ease-in-out infinite; }

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-4deg); }
  75% { transform: rotate(4deg); }
}
.wiggle:hover { animation: wiggle 0.4s ease; }

/* Streak flame */
.streak {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(217,118,26,0.12), rgba(192,57,43,0.12));
  border: 1px solid rgba(217,118,26,0.3);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
}
.streak .num { font-family: var(--font-mono); color: var(--warning); }

/* ============== STUDENT VARIANT ============== */
.student-focus {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}

.focus-card {
  background: linear-gradient(160deg, var(--paper), var(--cream-deep));
  border: 1px solid rgba(240,192,64,0.2);
  border-radius: 24px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  min-height: 360px;
}
.focus-card::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(240,192,64,0.18), transparent 60%);
  pointer-events: none;
}

.huge-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  border: none;
  padding: 18px 28px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-accent);
  transition: all var(--transition);
}
.huge-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 40px rgba(240,192,64,0.5); }

.cta-arrow {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(11, 30, 63, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ============== TEACHER VARIANT ============== */
.teacher-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.tch-side .card { padding: 16px; margin-bottom: 12px; }

.tch-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.88rem;
}
.tch-stat:last-child { border-bottom: none; }
.tch-stat .v {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
}

/* roster table */
.roster {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}
.roster thead th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 30, 63, 0.02);
  cursor: pointer;
  user-select: none;
}
.roster thead th:first-child { border-top-left-radius: 12px; }
.roster thead th:last-child { border-top-right-radius: 12px; }
.roster thead th .arrow { color: var(--accent); margin-left: 4px; }

.roster tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.roster tbody tr { transition: background var(--transition); cursor: pointer; }
.roster tbody tr:hover { background: rgba(11, 30, 63, 0.03); }
.roster tbody tr.help-flag td:first-child { box-shadow: inset 3px 0 0 var(--pink); }

.student-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.student-cell .name { font-weight: 600; color: var(--text); }
.student-cell .meta { font-size: 0.75rem; color: var(--text-muted); }

.bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bar-track {
  flex: 1;
  height: 6px;
  background: rgba(11, 30, 63, 0.06);
  border-radius: 999px;
  overflow: hidden;
  min-width: 80px;
}
.bar-fill { height: 100%; border-radius: 999px; }
.bar-val { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-dim); min-width: 36px; text-align: right; }

.help-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(240,144,32,0.15);
  color: var(--pink);
  font-weight: 700;
  font-size: 0.72rem;
}
.help-pill.silent {
  background: transparent;
  color: var(--text-muted);
  font-weight: 500;
}

/* missed-questions list */
.missed-list .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
}
.missed-list .row:last-child { border-bottom: none; }
.missed-list .row .q {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
}
.missed-list .row .meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 3px;
}
.missed-list .row .pct {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--danger);
  font-size: 0.95rem;
  text-align: right;
}

/* Heat-strip */
.heat {
  display: flex;
  gap: 3px;
  align-items: center;
}
.heat .cell {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: rgba(11, 30, 63, 0.04);
}
.heat .cell.l1 { background: rgba(240,192,64,0.18); }
.heat .cell.l2 { background: rgba(240,192,64,0.4); }
.heat .cell.l3 { background: rgba(240,192,64,0.7); }
.heat .cell.l4 { background: var(--accent); }

/* Search */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  width: 240px;
  font-size: 0.85rem;
}
.search input {
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  flex: 1;
  width: 100%;
}
.search input::placeholder { color: var(--text-muted); }
.search svg { color: var(--text-muted); }

/* Scope chip */
.scope-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.scope-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(11, 30, 63, 0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.scope-chip.active {
  background: rgba(240,192,64,0.12);
  border-color: rgba(240,192,64,0.4);
  color: var(--accent);
}
.scope-chip:hover { color: var(--text); }

/* Today bar */
.today {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(46,139,94,0.08);
  border: 1px solid rgba(46,139,94,0.25);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 600;
}

/* Big number */
.bignum {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 3.2rem;
  letter-spacing: -2px;
  line-height: 1;
}
.bignum.tiny { font-size: 1.2rem; letter-spacing: -0.5px; }

/* ============== REAL DASHBOARD (mirrors /app.html) ============== */

/* Top nav back-arrow + avatar tweaks */
.app-nav .nav-right { gap: 4px; }
.navbtn-back {
  width: 32px; height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
  cursor: pointer;
  margin-right: 6px;
  transition: all var(--transition);
}
.navbtn-back:hover { color: var(--text); background: rgba(11, 30, 63, 0.04); }

/* Section headers used by dashboard */
.section-h {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 32px 0 14px;
}
.section-h-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 32px 0 14px;
}
.section-h-row .section-h { margin: 0; }

/* Stats grid — 4 cards with colored stripe */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 8px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--c, var(--accent));
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card .stat-num {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: -1px;
  color: var(--c, var(--accent));
  line-height: 1.1;
}
.stat-card .stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* Practice grid — 3 cards with icon + count */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.practice-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}
.practice-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--c, var(--accent));
}
.practice-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.practice-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.practice-info { flex: 1; min-width: 0; }
.practice-title { font-weight: 700; font-size: 0.95rem; }
.practice-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.practice-count {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--c, var(--accent));
  letter-spacing: -0.5px;
}

/* SRS pile due-count badge */
.srs-pile { font-family: inherit; color: var(--text); text-align: center; }
.srs-due-pill {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  background: rgba(240,192,64,0.14);
  border: 1px solid rgba(240,192,64,0.35);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
}

/* Review schedule — horizontal timeline */
.schedule-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.schedule-bucket {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  transition: all var(--transition);
}
.schedule-bucket:hover { border-color: var(--border-strong); }
.schedule-bucket-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}
.schedule-bucket-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.schedule-bucket-count {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
}
.schedule-bucket-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(11, 30, 63, 0.05);
  overflow: hidden;
}
.schedule-bucket-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.schedule-bucket-due { border-color: rgba(192,57,43,0.4); background: linear-gradient(180deg, rgba(192,57,43,0.08), var(--bg-card)); }
.schedule-bucket-due .schedule-bucket-fill { background: var(--danger); }
.schedule-bucket-due .schedule-bucket-count { color: var(--danger); }
.schedule-bucket-soon .schedule-bucket-fill { background: var(--accent); }
.schedule-bucket-normal .schedule-bucket-fill { background: var(--purple); }
.schedule-bucket-cool .schedule-bucket-fill { background: var(--text-muted); }
.schedule-bucket-cool .schedule-bucket-count { color: var(--text-dim); }

/* Course grid — 3 columns of redesigned course cards */
.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.course-srs-row {
  display: flex;
  gap: 10px;
  margin: 10px 0 4px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.course-srs-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.course-srs-cell img {
  width: 22px; height: 22px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.course-srs-cell span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 600;
}
.course-card .course-meta {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0;
}
.course-card .course-progress { margin: 12px 0 0; }
.course-card .course-foot { margin-top: 6px; }
