﻿/* ═══════════════════════════════════════════════
   DASHBOARD — Redesigned Glass Card Layout
   All new classes use `dash-` prefix
   ═══════════════════════════════════════════════ */

/* ── 1. Header ── */
.dash-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 12px;
  gap: 12px;
  animation: fadeUp var(--anim-slow) var(--ease-out) both;
}
.dash-hdr-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex-shrink: 1;
}
.dash-hdr-brand {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--wh);
  letter-spacing: -0.04em;
}
.dash-hdr-greeting {
  font-size: 13px;
  color: var(--dim);
}
.dash-hdr-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.dash-hdr-study-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--acc);
  background: var(--acc-10);
  padding: 4px 10px;
  border-radius: 20px;
}
.dash-hdr-streak {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--amb);
  background: rgba(255,159,10,0.1);
  padding: 4px 10px;
  border-radius: 20px;
}
.dash-hdr-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}
.dash-hdr-avatar-wrap:active { transform: scale(0.93); }
.dash-hdr-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sf);
  border: 1px solid var(--bdr);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  overflow: hidden;
  transition: background 0.15s, border-color 0.15s;
}
.dash-hdr-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.dash-hdr-avatar-label {
  font-size: 9px;
  color: var(--dim);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ── Unified Tile ── */
.dash-tile {
  background: var(--card-gradient), var(--sf);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: fadeUp var(--anim-slow) var(--ease-out) 60ms both;
}

/* ── 2. Hero Pass Estimate ── */
.dash-hero {
  position: relative;
  padding: 20px;
  margin-bottom: 16px;
  overflow: hidden;
  background: var(--hero-gradient), var(--sf);
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--r) + 2px);
  box-shadow: var(--shadow-hero);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.dash-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-topline), transparent);
  pointer-events: none;
}
.dash-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.dash-hero-left {
  display: flex;
  flex-direction: column;
}
.dash-hero-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
  margin-bottom: 4px;
}
[data-theme="dark"] .dash-hero-label {
  color: rgba(255,255,255,0.60);
}
.dash-hero-score {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  animation: numberReveal 0.6s var(--ease-out) both;
}
.dash-hero-meta {
  font-size: 12px;
  color: var(--dim);
  margin-top: 4px;
}
[data-theme="dark"] .dash-hero-meta {
  color: rgba(255,255,255,0.58);
}
.dash-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.dash-hero-days {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--wh);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.dash-hero-days-label {
  font-size: 10px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dash-hero-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-on-color);
  padding: 3px 10px;
  border-radius: 10px;
}
.dash-hero-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dash-hero-bar-track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--track-bg);
  overflow: hidden;
}
.dash-hero-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s var(--ease-out);
  animation: barGrow 0.8s var(--ease-out) both;
  box-shadow: 0 0 8px currentColor;
}
.dash-hero-bar-marker {
  position: absolute;
  left: 70%;
  top: -2px;
  width: 2px;
  height: 10px;
  background: var(--dim);
  border-radius: 1px;
  opacity: 0.4;
}
.dash-hero-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--dim);
}

/* ── 3. Stats Row ── */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  animation: fadeUp var(--anim-slow) var(--ease-out) 90ms both;
}
.dash-stat-card {
  background: var(--card-gradient), var(--sf);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.dash-stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-stat-icon.green { background: rgba(52,199,89,0.12); color: var(--grn); box-shadow: 0 0 8px rgba(52,199,89,0.15); }
.dash-stat-icon.red { background: rgba(255,69,58,0.12); color: var(--red); box-shadow: 0 0 8px rgba(255,69,58,0.15); }
.dash-stat-icon.dim { background: rgba(142,142,147,0.12); color: var(--dim); }
.dash-stat-icon.blue { background: var(--icon-chip-bg); color: var(--acc); box-shadow: 0 0 8px rgba(10,132,255,0.15); }
.dash-stat-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--wh);
  animation: numberReveal 0.5s var(--ease-out) both;
}
.dash-stat-label {
  font-size: 10px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── 4. Quick Actions ── */
.dash-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  animation: fadeUp var(--anim-slow) var(--ease-out) 120ms both;
}
.dash-action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--wh);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}
.dash-action-pill:active { transform: scale(var(--press-scale)); }
.dash-action-pill.primary {
  background: var(--acc);
  color: var(--text-on-color);
  border-color: var(--acc);
  flex: 1;
  font-weight: 700;
}
.dash-action-pill.primary:hover { background: var(--acc-hover); }

/* ── 5. Readiness Widget (engine-powered) ── */
.dash-readiness {
  margin-bottom: 12px;
  animation: fadeUp var(--anim-slow) var(--ease-out) 140ms both;
}
.dash-readiness-card {
  background: var(--card-gradient), var(--sf);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 16px;
}
.dash-readiness-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.dash-readiness-ring {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-readiness-ring svg {
  width: 96px;
  height: 96px;
}
.dash-readiness-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-readiness-pct {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
}
.dash-readiness-pct-sign {
  font-size: 14px;
  font-weight: 600;
  margin-left: 1px;
  align-self: flex-start;
  margin-top: 4px;
}
.dash-readiness-summary {
  flex: 1;
  min-width: 0;
}
.dash-readiness-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}
.dash-readiness-subtitle {
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 6px;
}
.dash-readiness-cards {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--dim);
}
.dash-readiness-cards span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dash-readiness-factors {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.dash-readiness-factor-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.dash-readiness-factor-label {
  font-size: 11px;
  color: var(--dim);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dash-readiness-factor-val {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.dash-readiness-factor-track {
  height: 4px;
  border-radius: 2px;
  background: var(--track-bg);
  overflow: hidden;
}
.dash-readiness-factor-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s var(--ease-out);
}
.dash-readiness-priority {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,159,10,0.06);
  border: 1px solid rgba(255,159,10,0.15);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.dash-readiness-priority:active {
  background: rgba(255,159,10,0.12);
  transform: scale(0.98);
}
.dash-readiness-priority-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255,159,10,0.12);
  color: var(--amb);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-readiness-priority-body {
  flex: 1;
  min-width: 0;
}
.dash-readiness-priority-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--wh);
}
.dash-readiness-priority-detail {
  font-size: 10px;
  color: var(--dim);
  margin-top: 1px;
}
.dash-readiness-priority-chevron {
  color: var(--dim);
  flex-shrink: 0;
}

/* ── 6. AI Insight (container only) ── */
#dash-ai-insight {
  margin-bottom: 12px;
}

/* ── 6. Assessment (container only) ── */
#dash-assessment {
  margin-bottom: 12px;
}

/* ── Section Label (shared) ── */
.dash-section-label {
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
  padding: 0 0 8px;
}

/* ── 7. Domain Cards ── */
.dash-domains-section {
  margin-bottom: 16px;
  animation: fadeUp var(--anim-slow) var(--ease-out) 180ms both;
}
.dash-section-heading {
  margin-bottom: 10px;
}
.dash-section-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--acc);
  margin-bottom: 4px;
}
.dash-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--wh);
  margin-bottom: 2px;
}
.dash-section-copy {
  font-size: 12px;
  color: var(--dim);
}
.dash-domain-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.dash-domain-card {
  position: relative;
  background: var(--card-gradient), var(--sf);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  box-shadow: var(--shadow-card);
  padding: 14px 12px 12px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  animation: fadeUp var(--anim-slow) var(--ease-out) both;
}
.dash-domain-card:active { transform: scale(0.97); }
.dash-domain-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--r) var(--r) 0 0;
  background: linear-gradient(90deg, var(--domain-accent, var(--acc)), var(--domain-accent, var(--acc)));
}
.dash-domain-card-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.dash-domain-icon {
  width: 32px;
  height: 32px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--domain-accent-soft, rgba(10,132,255,0.14));
  color: var(--domain-accent, var(--acc));
  box-shadow: 0 0 8px var(--domain-accent-soft, rgba(10,132,255,0.14));
}
.dash-domain-tier {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(142,142,147,0.1);
}
.dash-domain-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--wh);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dash-domain-score {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  margin-bottom: 2px;
  animation: numberReveal 0.5s var(--ease-out) both;
}
.dash-domain-meta {
  font-size: 10px;
  color: var(--dim);
  margin-bottom: 8px;
}
.dash-domain-bar-track {
  height: 6px;
  border-radius: 3px;
  background: var(--domain-accent-track, var(--track-bg));
  overflow: hidden;
}
.dash-domain-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--domain-accent, var(--acc)), var(--domain-accent, var(--acc)));
  box-shadow: 0 0 6px var(--domain-accent-soft, rgba(10,132,255,0.14));
}

/* ── 8. Heatmap (container only) ── */
#heatmap-container {
  margin-bottom: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--bdr);
}
.dash-widget-shell {
  min-height: 44px;
  display: flex;
  align-items: center;
}
.dash-widget-shell-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--dim);
}

/* ── 9. Study Advisor (container only) ── */
/* ── 10. Recent Sessions ── */
.dash-sessions-section {
  margin-bottom: 16px;
  animation: fadeUp var(--anim-slow) var(--ease-out) 300ms both;
}
.dash-session-list {
  background: var(--card-gradient), var(--sf);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.dash-session-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--flat-divider);
  animation: slideInRight var(--anim-base) var(--ease-out) both;
}
.dash-session-row:last-child { border-bottom: none; }
.dash-session-row:hover { background: var(--flat-row-hover); }
.dash-session-row { cursor: pointer; }
.dash-session-icon {
  width: 32px;
  height: 32px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dash-session-icon.practice { background: var(--acc-12); color: var(--acc); }
.dash-session-icon.exam { background: rgba(175,82,222,0.12); color: var(--pur); }
.dash-session-icon.review { background: rgba(255,159,10,0.12); color: var(--amb); }
.dash-session-icon.assessment { background: rgba(52,199,89,0.12); color: var(--grn); }
.dash-session-body {
  flex: 1;
  min-width: 0;
}
.dash-session-mode {
  font-size: 13px;
  font-weight: 600;
  color: var(--wh);
  text-transform: capitalize;
}
.dash-session-time {
  font-size: 11px;
  color: var(--dim);
  margin-top: 1px;
}
.dash-session-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex-shrink: 0;
}
.dash-session-count {
  font-size: 11px;
  color: var(--dim);
}
.dash-session-accuracy {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.dash-session-empty {
  text-align: center;
  padding: 20px 16px;
  color: var(--dim);
  font-size: 13px;
}

/* ── 11. Theme Slider ── */
.dash-theme-wrap {
  display: flex;
  justify-content: center;
  padding-bottom: 100px;
  animation: fadeUp var(--anim-slow) var(--ease-out) 340ms both;
}

/* ── Hero Stat Grid (redesigned) ── */
.dash-hero-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.dash-hero-active-badge { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-on-color); background: var(--grn); padding: 2px 8px; border-radius: 8px; }
.dash-hero-cert-short { font-size: 11px; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: 0.04em; }
.dash-hero-cert { font-size: 16px; font-weight: 800; color: var(--wh); letter-spacing: -0.01em; margin: 8px 0 0; }
.dash-hero-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 12px 0; text-align: center; }
.dash-hero-grid-val { font-family: var(--font-display); font-size: 28px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--wh); font-variant-numeric: tabular-nums; animation: numberReveal 0.5s var(--ease-out) both; }
.dash-hero-grid-label { font-size: 11px; color: var(--dim); margin-top: 4px; }
.dash-hero-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 11px; font-weight: 600; color: var(--dim); }

/* ── Calibration Ring Card ── */
.dash-calibration-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--card-gradient), var(--sf);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: fadeUp var(--anim-slow) var(--ease-out) 80ms both;
}
.dash-calibration-ring-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
}
.dash-calibration-svg {
  display: block;
}
.dash-calibration-arc {
  transition: stroke-dashoffset 0.8s var(--ease-out);
}
.dash-calibration-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.dash-calibration-pct {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--wh);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}
.dash-calibration-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.dash-calibration-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--wh);
}
.dash-calibration-sub {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.4;
}
@media (max-width: 480px) {
  .dash-calibration-card { padding: 12px 14px; gap: 12px; }
  .dash-calibration-ring-wrap { width: 80px; height: 80px; }
  .dash-calibration-svg { width: 80px; height: 80px; }
  .dash-calibration-pct { font-size: 20px; }
  .dash-calibration-label { font-size: 13px; }
  .dash-calibration-sub { font-size: 11px; }
}

/* ── Today Goals Card ── */
.dash-goals { background: var(--card-gradient), var(--sf); border: 1px solid var(--glass-border); border-radius: var(--r); box-shadow: var(--shadow-card); padding: 16px; margin-bottom: 12px; animation: fadeUp var(--anim-slow) var(--ease-out) 120ms both; }
.dash-goals-title { font-size: 15px; font-weight: 700; color: var(--wh); margin-bottom: 12px; }
.dash-goal-item { display: flex; gap: 12px; align-items: center; padding: 8px 12px; border-left: 3px solid var(--acc); margin-bottom: 6px; background: rgba(142,142,147,0.06); border-radius: 0 8px 8px 0; }
.dash-goal-item:last-child { margin-bottom: 0; }
.dash-goal-item.amber { border-left-color: var(--amb); }
.dash-goal-item.green { border-left-color: var(--grn); }
.dash-goal-emoji { font-size: 16px; flex-shrink: 0; }
.dash-goal-text { font-size: 13px; font-weight: 500; color: var(--wh); }

/* ── Single CTA Button ── */
.dash-cta { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 14px; border-radius: var(--r); border: none; background: var(--acc); color: var(--text-on-accent); font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; margin-bottom: 8px; transition: all 0.2s ease; box-shadow: 0 4px 16px rgba(10,132,255,0.25); }
.dash-cta:active { transform: scale(0.97); }
.dash-cta:hover { background: var(--acc-hover); }
.dash-cta-secondary { background: var(--card-gradient), var(--sf); border: 1px solid var(--glass-border); color: var(--wh); margin-bottom: 8px; box-shadow: none; }
.dash-cta-secondary:hover { background: var(--cd); }

/* ── Weakness Area (mobile) ── */
/* ── Weak Areas Section ── */
.dash-weak-areas { background:var(--card-gradient), var(--sf); border:1px solid var(--glass-border); border-radius:var(--r); box-shadow:var(--shadow-card); padding:16px; margin-bottom:12px; }
.dash-weak-title { display:flex; align-items:center; gap:8px; font-size:16px; font-weight:700; color:var(--wh); margin-bottom:4px; }
.dash-weak-sub { font-size:12px; color:var(--dim); margin-bottom:14px; }
.dash-weak-row { display:flex; align-items:center; gap:12px; padding:12px; border-radius:10px; cursor:pointer; transition:background .15s; }
.dash-weak-row:hover { background:var(--cd); }
.dash-weak-row:active { background:var(--cd); transform:scale(0.98); }
.dash-weak-info { flex:1; min-width:0; }
.dash-weak-name { font-size:13px; font-weight:600; color:var(--wh); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dash-weak-stats { font-size:11px; margin-top:2px; }
.dash-weak-bar { width:60px; height:4px; border-radius:2px; background:var(--bdr); flex-shrink:0; }
.dash-weak-fill { height:100%; border-radius:2px; transition:width .3s ease; }
.dash-weak-go { width:28px; height:28px; border-radius:50%; background:var(--acc); color:var(--text-on-accent); display:flex; align-items:center; justify-content:center; flex-shrink:0; box-shadow:0 0 10px rgba(10,132,255,0.3); }

/* Legacy weakness (keep for compat) */
.dash-weakness { background:var(--sf); border:1px solid var(--bdr); border-radius:var(--r); padding:16px; margin-bottom:12px; }
.dash-weakness-hdr { display:flex; align-items:center; gap:6px; font-size:11px; font-weight:700; color:var(--amb); text-transform:uppercase; letter-spacing:0.06em; margin-bottom:6px; }
.dash-weakness-domain { font-size:15px; font-weight:600; color:var(--wh); margin-bottom:2px; }
.dash-weakness-pct { font-size:13px; margin-bottom:10px; }
.dash-weakness-btn { display:flex; align-items:center; justify-content:center; gap:6px; width:100%; padding:10px; border:none; border-radius:var(--r); background:var(--acc); color:var(--text-on-accent); font-size:13px; font-weight:600; font-family:inherit; cursor:pointer; }
.dash-weakness-btn:hover { opacity:0.9; }

/* ── Quick Lesson (mobile) ── */
.dash-lesson { display:flex; flex-direction:column; padding-top:12px; margin-top:4px; border-top:1px solid var(--bdr); }
.dash-lesson-hdr { display:flex; align-items:center; gap:6px; font-size:11px; font-weight:700; color:var(--acc); text-transform:uppercase; letter-spacing:0.06em; margin-bottom:8px; }
.dash-lesson-body { font-size:14px; line-height:1.6; color:var(--wh); }
.dash-lesson-next { display:flex; align-items:center; justify-content:center; gap:4px; margin-top:14px; padding:8px 16px; border:1px solid var(--bdr); border-radius:var(--r); background:none; color:var(--dim); font-size:12px; font-weight:600; font-family:inherit; cursor:pointer; align-self:flex-end; transition:all 0.15s ease; }
.dash-lesson-next:hover { color:var(--acc); border-color:var(--acc); }

/* ── Collapsible Sections ── */
.dash-collapse { margin-bottom: 8px; }
.dash-collapse-hdr { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 0; background: none; border: none; cursor: pointer; color: var(--dim); font-family: inherit; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.dash-collapse-hdr:active { opacity: 0.7; }
.dash-collapse-chevron { font-size: 16px; transition: transform 0.2s ease; display: inline-block; }
.dash-collapse-chevron.open { transform: rotate(90deg); }
.dash-collapse-body.collapsed { display: none; }

/* ── Cross-Cert Overview Strip ── */
.dash-certs-strip { margin-bottom:12px; padding-bottom:12px; border-bottom:1px solid var(--bdr); }
.dash-certs-strip-hdr { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.dash-certs-strip-title { display:flex; align-items:center; gap:6px; font-size:13px; font-weight:700; color:var(--wh); }
.dash-certs-strip-all { background:none; border:1px solid var(--bdr); border-radius:50%; width:28px; height:28px; display:flex; align-items:center; justify-content:center; color:var(--dim); cursor:pointer; transition:all .15s; }
.dash-certs-strip-all:hover { background:var(--sf); color:var(--wh); }
.dash-certs-scroll-wrap { position:relative; }
.dash-certs-scroll { display:flex; gap:8px; overflow-x:auto; padding-bottom:8px; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
.dash-certs-scroll::-webkit-scrollbar { display:none; }
.dash-certs-scrollbar { position:relative; height:4px; background:rgba(180,200,220,0.15); border-radius:2px; margin-top:6px; overflow:visible; }
.dash-certs-scrollbar-thumb { position:absolute; top:0; left:0; height:100%; width:30%; border-radius:2px; background:rgba(180,200,220,0.5); transition:left 0.15s ease, box-shadow 0.3s ease; box-shadow:0 0 6px rgba(180,200,220,0.3); }
.dash-certs-scrollbar-thumb.active { background:rgba(255,213,79,0.8); box-shadow:0 0 10px rgba(255,213,79,0.5), 0 0 20px rgba(255,213,79,0.2); }
.dash-certs-scrollbar-thumb.hint { animation:scroll-hint 2.5s ease-in-out 0.5s 1; }
@keyframes scroll-hint {
  0%   { left:0; background:rgba(255,213,79,0.7); box-shadow:0 0 8px rgba(255,213,79,0.4); }
  40%  { left:20%; background:rgba(255,213,79,0.9); box-shadow:0 0 14px rgba(255,213,79,0.6); }
  100% { left:0; background:rgba(180,200,220,0.5); box-shadow:0 0 6px rgba(180,200,220,0.3); }
}
.dash-cert-chip { display:flex; align-items:center; gap:8px; background:var(--card-gradient), var(--sf); border:1px solid var(--glass-border); border-radius:10px; padding:10px 12px; min-width:140px; cursor:pointer; transition:all .15s; flex-shrink:0; }
.dash-cert-chip:hover { background:var(--cd); }
.dash-cert-chip:active { transform:scale(0.97); }
.dash-cert-chip-icon { width:28px; height:28px; border-radius:8px; display:flex; align-items:center; justify-content:center; background:currentColor; background:rgba(128,128,128,0.1); flex-shrink:0; }
.dash-cert-chip-info { flex:1; min-width:0; }
.dash-cert-chip-name { font-size:11px; font-weight:700; color:var(--wh); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dash-cert-chip-bar { height:3px; background:var(--bdr); border-radius:2px; margin-top:4px; overflow:hidden; }
.dash-cert-chip-fill { height:100%; border-radius:2px; transition:width .3s ease; }
.dash-cert-chip-pct { font-size:12px; font-weight:800; flex-shrink:0; font-variant-numeric:tabular-nums; }

/* ── Mastery Ladder ── */
.dash-ladder { padding-top:12px; margin-top:4px; border-top:1px solid var(--bdr); }
.dash-ladder-hdr { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.dash-ladder-title { display:flex; align-items:center; gap:6px; font-size:14px; font-weight:700; color:var(--wh); }
.dash-ladder-pct { font-size:14px; font-weight:700; color:var(--acc); font-variant-numeric:tabular-nums; }

/* Progress bar */
.dash-ladder-bar { position:relative; height:6px; background:var(--cd); border-radius:3px; margin-bottom:14px; }
.dash-ladder-bar-fill { position:absolute; top:0; left:0; height:100%; border-radius:3px; background:linear-gradient(90deg, #E8EDF2, #64748b); box-shadow:0 0 10px rgba(180,200,220,0.25); transition:width .4s ease; }
.dash-ladder-marker { position:absolute; top:-3px; width:4px; height:12px; border-radius:2px; background:var(--bdr); transform:translateX(-50%); }
.dash-ladder-marker-done { background:#ffd54f; box-shadow:0 0 6px rgba(255,213,79,0.5), 0 0 14px rgba(255,213,79,0.2); animation: notch-glow 4s ease-in-out infinite; }
@keyframes notch-glow {
  0%   { box-shadow:0 0 4px rgba(255,213,79,0.2), 0 0 8px rgba(255,213,79,0.05); opacity:0.65; }
  50%  { box-shadow:0 0 12px rgba(255,213,79,0.7), 0 0 24px rgba(255,213,79,0.3); opacity:1; }
  100% { box-shadow:0 0 4px rgba(255,213,79,0.2), 0 0 8px rgba(255,213,79,0.05); opacity:0.65; }
}

/* Tier list */
.dash-ladder-tiers { display:flex; flex-direction:column; gap:2px; }
.dash-ladder-tier { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:8px; transition:background .15s; }
.dash-lt-icon { width:28px; height:28px; border-radius:10px; background:var(--cd); display:flex; align-items:center; justify-content:center; color:var(--dim); flex-shrink:0; font-size:14px; }
.dash-lt-info { flex:1; min-width:0; }
.dash-lt-label { font-size:13px; font-weight:600; color:var(--dim); }
.dash-lt-range { font-size:10px; color:var(--dim); opacity:0.6; }
.dash-ladder-next { font-size:11px; color:var(--dim); margin-top:4px; }
.dash-lt-badge { font-size:9px; font-weight:800; color:var(--bg); background:var(--acc); padding:2px 8px; border-radius:10px; letter-spacing:0.05em; }
.dash-lt-check { color:var(--grn); opacity:0.7; }

/* Reached tiers */
.dash-lt-reached .dash-lt-icon { background:var(--acc-15); color:var(--acc); }
.dash-lt-reached .dash-lt-label { color:var(--wh); }

/* Current tier highlight */
.dash-lt-current { background:var(--acc-8); }
.dash-lt-current .dash-lt-icon { background:var(--acc); color:var(--text-on-accent); box-shadow:0 0 12px rgba(10,132,255,0.4), 0 0 24px rgba(10,132,255,0.15); }
.dash-lt-current .dash-lt-label { color:var(--wh); font-weight:700; }

/* ── Mobile polish for new layout ── */
@media (max-width: 480px) {
  .dash-hero-score { font-size: 48px; }
  .dash-hero-grid-val { font-size: 22px; }
  .dash-hero-cert { font-size: 14px; }
  .dash-domain-grid { grid-template-columns: 1fr; }
  .dash-domain-grid { gap: 8px; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .dash-hdr,
  .dash-hero,
  .dash-cta,
  .dash-domains-section,
  .dash-domain-card {
    animation: none !important;
  }
  .dash-hero-score {
    animation: none !important;
  }
  .dash-hero-bar-fill {
    animation: none !important;
    transition: none !important;
  }
  .dash-domain-bar-fill {
    animation: none !important;
  }
}


/* ═══════════════════════════════════════════════
   DEPRECATED — Legacy classes kept for
   Assessment.renderDashCard and other modules
   ═══════════════════════════════════════════════ */

/* ── Dashboard Header (legacy) ── */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  background: var(--header-grad);
  border-bottom: 1px solid var(--bdr);
  box-shadow: none;
  animation: fadeUp var(--anim-slow) var(--ease-out) both;
}
.dash-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--wh);
  letter-spacing: -0.02em;
}
.dash-title .dim { font-weight: 400; color: var(--dim); font-size: 13px; }
.dash-subtitle {
  font-size: 11px;
  color: var(--dim);
  margin-top: 2px;
}
.header-actions {
  display: flex;
  gap: 6px;
}

/* ── Dashboard Content (legacy) ── */
.dash-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Top Row (legacy) ── */
.dash-top-row {
  display: block;
  animation: fadeUp var(--anim-slow) var(--ease-out) 50ms both;
}
.dash-content > *:nth-child(1) { animation: fadeUp var(--anim-slow) var(--ease-out) 50ms both; }
.dash-content > *:nth-child(2) { animation: fadeUp var(--anim-slow) var(--ease-out) 100ms both; }
.dash-content > *:nth-child(3) { animation: fadeUp var(--anim-slow) var(--ease-out) 150ms both; }
.dash-content > *:nth-child(4) { animation: fadeUp var(--anim-slow) var(--ease-out) 200ms both; }
.dash-content > *:nth-child(5) { animation: fadeUp var(--anim-slow) var(--ease-out) 250ms both; }

/* ── Progress Ring Card (legacy) ── */
.progress-ring-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.ring-container {
  position: relative;
  flex-shrink: 0;
}
.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ring-pct {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--wh);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.ring-label {
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 9px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ring-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.ring-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  letter-spacing: -0.02em;
}
.stat-num.green { color: var(--grn); }
.stat-num.red { color: var(--red); }
.stat-num.dim { color: var(--dim); }
.stat-label {
  font-size: 11px;
  color: var(--dim);
}

/* ── Streak Toast (legacy) ── */
.streak-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin-bottom: 8px;
  background: rgba(255,149,0,0.08);
  border: 1px solid rgba(255,149,0,0.15);
  border-radius: 14px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.45s ease, transform 0.45s var(--ease-out);
}
.streak-toast--visible {
  opacity: 1;
  transform: translateY(0);
}
.streak-toast--milestone {
  background: rgba(255,149,0,0.12);
  border-color: rgba(255,149,0,0.25);
}
.streak-toast-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255,149,0,0.12);
  color: var(--amb);
  display: flex;
  align-items: center;
  justify-content: center;
}
.streak-toast-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.streak-toast-days {
  font-size: 13px;
  font-weight: 700;
  color: var(--amb);
}
.streak-toast-msg {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.3;
}

/* ── Session Recap Modal (legacy) ── */
.recap-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.recap-backdrop.recap-visible {
  opacity: 1;
}
.recap-backdrop.recap-hiding {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.recap-modal {
  width: 100%;
  max-width: 340px;
  background: var(--sf);
  border: 1px solid var(--bdr);
  border-radius: 20px;
  padding: 28px 24px 20px;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s var(--ease-out);
}
.recap-visible .recap-modal {
  transform: translateY(0) scale(1);
}
.recap-hiding .recap-modal {
  transform: translateY(12px) scale(0.98);
}
.recap-header {
  text-align: center;
  margin-bottom: 20px;
}
.recap-eyebrow {
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--acc);
  margin-bottom: 6px;
}
.recap-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--wh);
  letter-spacing: -0.02em;
}
.recap-time {
  font-size: 11px;
  color: var(--dim);
  margin-top: 4px;
}
.recap-score-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.recap-ring-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.recap-ring-wrap svg {
  width: 96px;
  height: 96px;
}
.recap-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.recap-ring-pct {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--wh);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.recap-ring-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--dim);
  margin-top: 6px;
}
.recap-stats {
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: center;
}
.recap-stat {
  text-align: center;
  padding: 0 16px;
}
.recap-stat-num {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: block;
  letter-spacing: -0.02em;
}
.recap-stat-label {
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.recap-stat-sep {
  width: 1px;
  height: 28px;
  background: var(--flat-divider);
}
.recap-msg {
  text-align: center;
  font-size: 13px;
  color: var(--dim);
  margin-bottom: 20px;
  line-height: 1.4;
}
.recap-domains {
  margin-bottom: 16px;
  padding: 12px;
  background: var(--flat-card);
  border-radius: 10px;
}
.recap-domains-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.recap-domain-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--flat-divider);
}
.recap-domain-row:last-child { border-bottom: none; }
.recap-domain-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--wh);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 8px;
}
.recap-domain-pct {
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.recap-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.recap-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 9999px;
  background: var(--acc);
  color: var(--text-on-color);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.recap-btn-primary:active { transform: scale(0.97); }
.recap-btn-primary:hover { background: var(--acc-hover); }
.recap-btn-ghost {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: var(--r2);
  background: transparent;
  color: var(--dim);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s;
}
.recap-btn-ghost:hover { color: var(--tx); }

/* ── Flat Pass Score (legacy) ── */
.pass-score-flat {
  padding: 16px;
  border-bottom: 1px solid var(--flat-divider);
  animation: fadeUp var(--anim-slow) var(--ease-out) both;
}
.pass-score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.pass-score-body {
  text-align: center;
  margin-bottom: 12px;
}
.pass-score-est {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.03em;
  animation: numberReveal 0.6s var(--ease-out) both;
}
.pass-score-meta {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--dim);
  margin-top: 6px;
}
.pass-score-accent {
  font-weight: 800;
  color: var(--acc);
  font-variant-numeric: tabular-nums;
}
.pass-score-accent-grn {
  font-weight: 800;
  color: var(--grn);
  font-variant-numeric: tabular-nums;
}
.pass-score-exam-date {
  font-size: 10px;
  font-weight: 600;
  color: var(--grn);
}
.pass-score-label {
  font-size: 10px;
  color: var(--dim);
}
.pass-score-bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

/* ── Domain Strips (legacy) ── */
.domain-strips {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.domain-strip {
  padding: 12px 0;
  border-bottom: 1px solid var(--flat-divider);
  animation: fadeUp var(--anim-base) var(--ease-out) both;
}
.domain-strip:last-child { border-bottom: none; }
.domain-strip-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.domain-strip-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--wh);
}
.domain-strip-score {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.domain-strip-mid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.domain-strip-tier {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.domain-strip-weight {
  font-size: 10px;
  color: var(--dim);
}

/* ── Domain Bar Track (legacy, shared) ── */
.domain-bar-track {
  height: 6px;
  border-radius: 3px;
  background: var(--track-bg);
  overflow: hidden;
}
.domain-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--acc);
}
.domain-bar-fill.d1 { background: linear-gradient(90deg, var(--acc), var(--acc-hover)); }
.domain-bar-fill.d2 { background: linear-gradient(90deg, var(--domain-2), var(--acc-hover)); }
.domain-bar-fill.d3 { background: linear-gradient(90deg, var(--domain-3), var(--cyn)); }
.domain-bar-fill.d4 { background: linear-gradient(90deg, var(--domain-4), var(--pur)); }

/* ── Trend Chart (legacy) ── */
.trend-chart {
  padding: 8px 0;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.trend-empty {
  font-size: 11px;
  color: var(--dim);
}

/* ── Quick Actions (legacy) ── */
.dash-actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.action-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.action-icon.blue { color: var(--acc); }
.action-icon.red { color: var(--red); }
.action-icon.purple { color: var(--pur); }
.action-icon.amber { color: var(--amb); }

/* ── Sessions List (legacy) ── */
.session-flat-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.session-flat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--flat-divider);
  background: transparent;
}
.session-flat-row:last-child { border-bottom: none; }
.session-date {
  font-size: 11px;
  color: var(--dim);
  min-width: 70px;
}
.session-mode {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--acc);
}
.session-score {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.session-count {
  font-size: 11px;
  color: var(--dim);
}

/* ── Dash card padding (legacy) ── */
.dash-card {
  padding: 14px;
}

/* ── Hero Pass Score Card (legacy) ── */
.pass-score-card {
  padding: 20px;
  border-color: var(--bdr);
  box-shadow: var(--elev-2);
}
.pass-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--acc);
  background: var(--acc-subtle);
  padding: 3px 10px;
  border-radius: 10px;
}
.pass-grid {
  display: flex;
  justify-content: space-around;
  text-align: center;
  margin-bottom: 12px;
}
.pass-metric-num {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.pass-metric-label {
  font-size: 10px;
  color: var(--dim);
  margin-top: 2px;
}
.pass-bar-track {
  height: 6px;
  border-radius: 3px;
  background: var(--track-bg);
  overflow: hidden;
  position: relative;
}
.pass-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
}
.pass-bar-marker {
  position: absolute;
  left: 70%;
  top: -2px;
  width: 2px;
  height: 10px;
  background: var(--dim);
  border-radius: 1px;
  opacity: 0.5;
}

/* ── Theme Slider (legacy) ── */
.theme-slider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.theme-slider-track {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--cd);
  border: 1px solid var(--bdr);
  border-radius: 20px;
  padding: 3px;
  gap: 0;
  width: 96px;
  height: 30px;
}
.theme-slider-thumb {
  position: absolute;
  width: 28px;
  height: 24px;
  border-radius: 12px;
  background: var(--acc);
  top: 3px;
  transform: translateX(-50%);
  transition: left 0.2s var(--ease-out);
  z-index: 0;
  opacity: 0.2;
}
.theme-slider-opt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dim);
  position: relative;
  z-index: 1;
  padding: 0;
  height: 24px;
  transition: color 0.15s ease;
  font-family: inherit;
}
.theme-slider-opt.active {
  color: var(--acc);
}
.theme-slider-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Domain accent borders (legacy) ── */
.domain-row.d1-accent { border-left: 2px solid var(--acc); padding-left: 8px; }
.domain-row.d2-accent { border-left: 2px solid var(--domain-2); padding-left: 8px; }
.domain-row.d3-accent { border-left: 2px solid var(--domain-3); padding-left: 8px; }
.domain-row.d4-accent { border-left: 2px solid var(--domain-4); padding-left: 8px; }

/* ── Session relative time (legacy) ── */
.session-row:nth-child(even) {
  background: var(--zebra-bg);
}

/* ── HOME VIEW — Mobile-First (legacy) ── */
#home-content {
  padding: 0 16px 100px;
  max-width: 480px;
  margin: 0 auto;
}

/* ── Home Header (legacy) ── */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 12px;
  gap: 12px;
  animation: fadeUp var(--anim-slow) var(--ease-out) both;
}
.home-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex-shrink: 1;
}
.home-brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--wh);
  letter-spacing: -0.03em;
}
.home-greeting {
  font-size: 13px;
  color: var(--dim);
}
.home-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.home-study-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--acc);
  background: var(--acc-10);
  padding: 4px 10px;
  border-radius: 20px;
}
.home-streak {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--amb);
  background: rgba(255,159,10,0.1);
  padding: 4px 10px;
  border-radius: 20px;
}
.home-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sf);
  border: 1px solid var(--bdr);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.home-avatar:active { transform: scale(0.93); }

/* ── Home Hero (legacy) ── */
.home-hero {
  background: var(--sf);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 12px;
  animation: fadeUp var(--anim-slow) var(--ease-out) 60ms both;
}
.home-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.home-hero-left {
  display: flex;
  flex-direction: column;
}
.home-hero-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
  margin-bottom: 4px;
}
.home-hero-score {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  animation: numberReveal 0.6s var(--ease-out) both;
}
.home-hero-meta {
  font-size: 12px;
  color: var(--dim);
  margin-top: 4px;
}
.home-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.home-hero-days {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--wh);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.home-hero-days-label {
  font-size: 10px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.home-hero-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-on-color);
  padding: 3px 10px;
  border-radius: 10px;
}
.home-hero-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.home-hero-bar-track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--track-bg);
  overflow: hidden;
}
.home-hero-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s var(--ease-out);
  animation: barGrow 0.8s var(--ease-out) both;
}
.home-hero-bar-marker {
  position: absolute;
  left: 70%;
  top: -2px;
  width: 2px;
  height: 10px;
  background: var(--dim);
  border-radius: 1px;
  opacity: 0.4;
}
.home-hero-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--dim);
}

/* ── Home Quick Session (legacy) ── */
.home-quick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  animation: fadeUp var(--anim-slow) var(--ease-out) 90ms both;
}
.home-quick-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dim);
  flex: 1;
  min-width: 0;
}
.home-quick-badge.done {
  color: var(--grn);
}
.home-quick-badge svg {
  flex-shrink: 0;
}
.home-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--bdr);
  border-radius: 9999px;
  background: var(--sf);
  color: var(--wh);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.home-quick-btn:active { transform: scale(var(--press-scale)); }
.home-quick-btn.primary {
  background: var(--acc);
  color: var(--text-on-color);
  border-color: var(--acc);
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
}
.home-quick-btn.primary:hover { background: var(--acc-hover); }

/* ── Home CTA (legacy) ── */
.home-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  margin: 0 auto 20px;
  padding: 10px 28px;
  border: none;
  border-radius: 9999px;
  background: var(--acc);
  color: var(--text-on-color);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  animation: fadeUp var(--anim-slow) var(--ease-out) 120ms both;
}
.home-cta:active { transform: scale(var(--press-scale)); }
.home-cta:hover { background: var(--acc-hover); }

/* ── Home Sections (legacy) ── */
.home-section {
  margin-bottom: 20px;
  animation: fadeUp var(--anim-slow) var(--ease-out) 180ms both;
}
.home-section:nth-child(5) { animation-delay: 220ms; }
.home-section:nth-child(6) { animation-delay: 260ms; }
.home-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
  margin-bottom: 10px;
}

/* ── Home Plan Rows (legacy) ── */
.home-plan-list {
  background: var(--sf);
  border: 1px solid var(--bdr);
  border-radius: var(--r);
  overflow: hidden;
}
.home-plan-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid var(--flat-divider);
}
.home-plan-row:last-child { border-bottom: none; }
.home-plan-row:active { background: var(--flat-row-hover); }
.home-plan-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-plan-body {
  flex: 1;
  min-width: 0;
}
.home-plan-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--wh);
}
.home-plan-chevron {
  color: var(--dim);
  flex-shrink: 0;
}

/* ── Home Domain Rows (legacy) ── */
.home-domain-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--flat-divider);
}
.home-domain-row:last-child { border-bottom: none; }
.home-domain-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.home-domain-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--wh);
}
.home-domain-pct {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--acc);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.home-domain-bar {
  height: 5px;
  border-radius: 3px;
  background: var(--track-bg);
  overflow: hidden;
}
.home-domain-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--acc);
  transition: width 0.6s var(--ease-out);
  animation: barGrow 0.6s var(--ease-out) both;
}

/* ── Home Last Session (legacy) ── */
.home-last-session {
  font-size: 13px;
  color: var(--dim);
  background: var(--sf);
  border: 1px solid var(--bdr);
  border-radius: var(--r2);
  padding: 14px 16px;
}

/* ── Admin Toolbar (legacy) ── */
.admin-toolbar {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  background: rgba(40,40,50,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
}
.at-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-on-accent);
  background: rgba(255,255,255,0.1);
}
.at-btn:hover { background: rgba(255,255,255,0.2); }
.at-btn:active { transform: scale(0.9); }
.at-chat { color: var(--acc); }
.at-zoom { color: var(--acc); }
.at-debug {
  color: var(--red);
  font-family: 'SF Mono', 'Consolas', monospace;
}
.at-zoom-popover {
  background: var(--sf);
  border: 1px solid var(--bdr);
  border-radius: 12px;
  padding: 10px;
  margin-top: 4px;
}
.at-zoom-popover .zoom-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.at-zoom-popover .zoom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.at-zoom-popover .zoom-label {
  font-size: 11px;
  color: var(--dim);
  min-width: 60px;
}
.at-zoom-popover .zoom-value {
  font-size: 11px;
  color: var(--dim);
  min-width: 34px;
  text-align: right;
}
.at-zoom-popover input[type="range"] {
  flex: 1;
  height: 4px;
  accent-color: var(--acc);
}
.at-zoom-popover .zoom-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.at-zoom-popover .zoom-reset,
.at-zoom-popover .zoom-lock {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--bdr);
  background: var(--sf);
  color: var(--tx);
  cursor: pointer;
}

/* ── QuickBar (legacy) ── */
.quickbar {
  position: fixed;
  top: 60px;
  right: 16px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  background: rgba(40,40,50,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
  transition: padding 0.2s ease, border-radius 0.2s ease;
}
.quickbar.collapsed .qb-btn:not(.qb-collapse) { display: none; }
.quickbar.collapsed .qb-zoom-popover { display: none !important; }
.quickbar.collapsed { border-radius: 18px; }
.qb-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-on-accent);
  background: rgba(255,255,255,0.1);
}
.qb-btn:hover { background: rgba(255,255,255,0.2); }
.qb-btn:active { transform: scale(0.9); }
.qb-chat { color: var(--acc); }
.qb-zoom { color: var(--acc); }
.qb-fit { color: var(--acc); }
.qb-fit.qb-fit-active {
  background: var(--acc-25);
  box-shadow: 0 0 0 2px rgba(10,132,255,0.4);
}
.qb-debug {
  color: var(--red);
  font-family: 'SF Mono', 'Consolas', monospace;
}
.qb-zoom-popover {
  background: var(--sf);
  border: 1px solid var(--bdr);
  border-radius: 12px;
  padding: 10px;
  margin-top: 4px;
}
.qb-zoom-popover .zoom-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qb-zoom-popover .zoom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qb-zoom-popover .zoom-label {
  font-size: 11px;
  color: var(--dim);
  min-width: 60px;
}
.qb-zoom-popover .zoom-value {
  font-size: 11px;
  color: var(--dim);
  min-width: 34px;
  text-align: right;
}
.qb-zoom-popover input[type="range"] {
  flex: 1;
  height: 4px;
  accent-color: var(--acc);
}
.qb-zoom-popover .zoom-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.qb-zoom-popover .zoom-reset,
.qb-zoom-popover .zoom-lock {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--bdr);
  background: var(--sf);
  color: var(--tx);
  cursor: pointer;
}

/* ── Sync Status Pill ── */
.dash-sync-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 2px 0;
  opacity: 0.7;
}
.dash-sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Primary Next Action CTA ── */
.dash-next-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #1e2a3a, #2a3a4e);
  border: 1px solid rgba(180,200,220,0.15);
  border-radius: var(--r);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s var(--ease-out);
}
.dash-next-action:hover {
  background: linear-gradient(135deg, #243244, #334a60);
  border-color: rgba(180,200,220,0.25);
}
.dash-next-action:active {
  transform: scale(0.97);
}
.dash-next-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(180,200,220,0.12);
  color: #b4c8dc;
  flex-shrink: 0;
}
.dash-next-action-body {
  flex: 1;
  min-width: 0;
}
.dash-next-action-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #e8edf2;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.dash-next-action-sub {
  font-size: 12px;
  color: rgba(180,200,220,0.65);
  margin-top: 2px;
  line-height: 1.3;
}
.dash-next-action-arrow {
  color: rgba(180,200,220,0.5);
  flex-shrink: 0;
}
