:root {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --border: #e2e8f0;
  --muted: #64748b;
  --ink: #0f172a;
  --sidebar-w: 256px;
  --brand-navy: #061225;
  --brand-navy-2: #0b1830;
  --brand-violet: #8b5cf6;
  --brand-blue: #3b82f6;
  --brand-cyan: #22d3ee;
  --indigo: #4f46e5;
  --indigo-light: #eef2ff;
  --blue: #2563eb;
  --blue-light: #eff6ff;
  --amber: #d97706;
  --amber-light: #fffbeb;
  --green: #16a34a;
  --green-light: #f0fdf4;
  --red: #dc2626;
  --red-light: #fef2f2;
  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  --teal: #0d9488;
  --teal-light: #f0fdfa;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 4%, rgba(79,70,229,0.10), transparent 28rem),
    radial-gradient(circle at 92% 0%, rgba(34,211,238,0.10), transparent 24rem),
    var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

code {
  direction: ltr;
  display: inline;
  padding: 0.1em 0.35em;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f1f5f9;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
}

pre {
  direction: ltr;
  margin: 0.6rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #1e293b;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.84rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ─── SIDEBAR ──────────────────────────────────────────── */

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), transparent 22rem),
    var(--brand-navy);
  border-left: 1px solid rgba(255,255,255,0.10);
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}

.logo-title { font-size: 0.98rem; font-weight: 800; color: white; }
.logo-sub { font-size: 0.72rem; color: #aeb9d4; }

.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #c5cce0;
  cursor: pointer;
  transition: background 120ms, color 120ms;
}

.nav-item svg { flex-shrink: 0; color: #7f8dad; }

.nav-item:hover { background: rgba(255,255,255,0.08); color: white; }

.nav-item.active {
  background: linear-gradient(135deg, rgba(59,130,246,0.22), rgba(139,92,246,0.24));
  color: white;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
}

.nav-item.active svg { color: #bfdbfe; }

/* ─── MOBILE HEADER ────────────────────────────────────── */

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--brand-navy);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
}

.mobile-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
}

.hamburger {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 45;
}

/* ─── MAIN CONTENT ─────────────────────────────────────── */

.main-content {
  margin-right: var(--sidebar-w);
  min-height: 100vh;
  padding: 1.75rem 2rem 5rem;
}

/* ─── VIEWS ─────────────────────────────────────────────── */

.view { display: none; }
.view.active { display: block; }

/* ─── PAGE HEADER ──────────────────────────────────────── */

.page-header { margin-bottom: 1.5rem; }

.page-title {
  margin: 0 0 0.25rem;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ink);
}

.page-sub { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ─── STATS GRID ────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.indigo { background: var(--indigo-light); color: var(--indigo); }
.stat-icon.blue   { background: var(--blue-light);   color: var(--blue); }
.stat-icon.amber  { background: var(--amber-light);  color: var(--amber); }
.stat-icon.green  { background: var(--green-light);  color: var(--green); }
.stat-icon.purple { background: var(--purple-light); color: var(--purple); }
.stat-icon.teal   { background: var(--teal-light);   color: var(--teal); }

.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--ink); line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* ─── DASHBOARD ─────────────────────────────────────────── */

.dashboard-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.widget {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.widget-title {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.priority-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.priority-item:last-child { border-bottom: none; }

.priority-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
}

.pb-critical { background: #fee2e2; color: var(--red); }
.pb-high     { background: var(--amber-light); color: var(--amber); }
.pb-medium   { background: #f0f9ff; color: var(--blue); }

.priority-text { font-size: 0.85rem; color: var(--ink); line-height: 1.45; }
.priority-sub  { font-size: 0.77rem; color: var(--muted); margin-top: 2px; }

.exam-structure-list { display: flex; flex-direction: column; gap: 0.5rem; }

.es-row {
  display: grid;
  grid-template-columns: 5rem 4rem 1fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.84rem;
}

.es-row.highlight { background: #fef2f2; }

.es-q    { font-weight: 700; color: var(--ink); }
.es-pts  { color: var(--red); font-weight: 700; font-size: 0.8rem; }
.es-topic { color: var(--muted); }

.quick-pattern {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

.quick-pattern:last-child { border-bottom: none; }
.quick-pattern strong { color: var(--ink); display: block; margin-bottom: 2px; }

.dashboard-hero {
  position: relative;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 170px;
  gap: 1.25rem;
  align-items: center;
  min-height: 230px;
  margin-bottom: 1.25rem;
  padding: 1.35rem;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(6,18,37,0.96), rgba(13,28,58,0.96) 58%, rgba(36,30,82,0.94)),
    var(--brand-navy);
  color: white;
  box-shadow: 0 22px 60px rgba(6,18,37,0.22);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: auto -4rem -7rem auto;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.28), transparent 65%);
  pointer-events: none;
}

.hero-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-brand img {
  width: 160px;
  max-width: 100%;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
}

.hero-content,
.hero-readiness {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 0.45rem;
  padding: 0.18rem 0.65rem;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: #c7d2fe;
  font-size: 0.76rem;
  font-weight: 800;
}

.hero-content h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.05;
}

.hero-content p {
  max-width: 680px;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.hero-readiness {
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
}

.hero-readiness span,
.hero-readiness small {
  display: block;
  color: #cbd5e1;
  font-size: 0.76rem;
}

.hero-readiness strong {
  display: block;
  margin: 0.1rem 0;
  font-size: 2.2rem;
  line-height: 1;
  color: white;
}

.command-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.next-action {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
}

.next-action p {
  margin: 0.3rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.status-dot {
  width: 12px;
  height: 12px;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px var(--green-light);
}

.dashboard-progress-main {
  display: grid;
  gap: 0.45rem;
}

.progress-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
}

.day-dots {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.28rem;
  margin-top: 0.85rem;
}

.day-dots span {
  min-height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.day-dots span.done {
  background: var(--green-light);
  color: var(--green);
}

.day-dots span.current {
  background: var(--indigo-light);
  color: var(--indigo);
  box-shadow: inset 0 0 0 1px rgba(79,70,229,0.22);
}

.sim-overview-list {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.sim-overview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.42rem 0.55rem;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 0.82rem;
}

.sim-overview-row strong {
  color: var(--indigo);
  white-space: nowrap;
}

/* ─── MARATHON ──────────────────────────────────────────── */

.marathon-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.readiness-card {
  min-width: 170px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
}

.readiness-card span,
.readiness-card small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.readiness-card strong {
  display: block;
  color: var(--indigo);
  font-size: 1.8rem;
  line-height: 1.1;
}

.marathon-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.marathon-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.marathon-days {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.marathon-day-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  padding: 0.72rem;
  text-align: right;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.marathon-day-card.active {
  border-color: var(--indigo);
  box-shadow: 0 0 0 2px var(--indigo-light);
}

.marathon-day-card.locked {
  opacity: 0.55;
  cursor: not-allowed;
}

.marathon-day-num {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--indigo-light);
  color: var(--indigo);
  font-weight: 800;
}

.marathon-day-card.completed .marathon-day-num {
  background: var(--green-light);
  color: var(--green);
}

.marathon-day-main {
  min-width: 0;
  display: grid;
  gap: 0.22rem;
}

.marathon-day-main strong {
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.25;
}

.marathon-day-main small,
.marathon-day-pct {
  color: var(--muted);
  font-size: 0.72rem;
}

.mini-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.mini-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--indigo), var(--purple));
}

.marathon-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
}

.day-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.day-kicker {
  display: block;
  color: var(--indigo);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.day-detail-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.day-detail-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.day-progress-ring {
  min-width: 66px;
  height: 66px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--indigo-light);
  color: var(--indigo);
  font-weight: 900;
}

.marathon-section {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.marathon-section:last-child { border-bottom: 0; }

.marathon-section h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.marathon-checks {
  display: grid;
  gap: 0.45rem;
}

.marathon-check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}

.marathon-check input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--indigo);
}

.quiz-question {
  margin: 0 0 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.quiz-question legend {
  padding: 0 0.35rem;
  font-weight: 700;
}

.quiz-question label {
  display: block;
  margin: 0.35rem 0;
  color: var(--ink);
}

.quiz-done {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: 10px;
  background: var(--green-light);
  color: var(--green);
}

.practice-list {
  display: grid;
  gap: 0.75rem;
}

.practice-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.practice-task p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.practice-actions,
.submit-actions,
.simulation-score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.primary-btn,
.ghost-btn,
.complete-day-btn {
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 0.85rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.82rem;
}

.primary-btn,
.complete-day-btn {
  border-color: var(--indigo);
  background: var(--indigo);
  color: white;
}

.ghost-btn {
  background: white;
  color: var(--indigo);
}

.mentor-box textarea,
.submit-box textarea {
  width: 100%;
  min-height: 130px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  resize: vertical;
  direction: rtl;
  background: #f8fafc;
}

.mentor-box p {
  margin: 0 0 0.65rem;
  color: var(--muted);
}

.submit-actions {
  margin-top: 0.65rem;
}

.review-result {
  margin-top: 0.75rem;
}

.review-card {
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.review-card p { margin: 0.35rem 0; }

.review-list {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
}

.review-list li {
  padding: 0.28rem 0;
  font-size: 0.86rem;
}

.review-list .ok { color: var(--green); }
.review-list .bad { color: var(--red); }

.simulation-block {
  background: #fff7ed;
  margin: 0 -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.simulation-score-row input {
  width: 110px;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 0.55rem;
}

/* ─── WEEKS ─────────────────────────────────────────────── */

.weeks-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.weeks-list { display: flex; flex-direction: column; gap: 0.75rem; }

.wc-preview {
  padding: 0.65rem 1.25rem 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  border-top: 1px solid var(--border);
}
.wc-preview-item {
  background: var(--blue-light);
  color: var(--blue);
  font-size: 0.76rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-weight: 500;
}
.wc-preview-more {
  background: #f1f5f9;
  color: var(--muted);
  font-size: 0.76rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.week-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.week-trigger {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: right;
  transition: background 120ms;
}

.week-trigger:hover { background: #f8fafc; }

.week-num-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.week-num-badge.critical { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.week-num-badge.high     { background: linear-gradient(135deg, #d97706, #b45309); }

.week-trigger-body { flex: 1; min-width: 0; }

.week-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.2rem;
}

.week-goal { font-size: 0.82rem; color: var(--muted); margin: 0; line-height: 1.45; }

.week-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}

.tag.critical { background: #fee2e2; color: var(--red); }
.tag.high     { background: var(--amber-light); color: var(--amber); }

.week-chevron {
  color: #94a3b8;
  margin-top: 4px;
  flex-shrink: 0;
  transition: transform 200ms;
}

.week-chevron.open { transform: rotate(180deg); }

.week-body {
  display: none;
  border-top: 1px solid var(--border);
  padding: 1.25rem;
}

.week-body.open { display: block; }

/* Sections inside week body */
.section-block { margin-bottom: 1.1rem; }
.section-block:last-child { margin-bottom: 0; }

.section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-label.blue   { color: var(--blue); }
.section-label.amber  { color: var(--amber); }
.section-label.green  { color: var(--green); }
.section-label.red    { color: var(--red); }
.section-label.purple { color: var(--purple); }
.section-label.teal   { color: var(--teal); }

.info-box {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.87rem;
  line-height: 1.65;
}

.info-box.blue   { background: var(--blue-light);   border-right: 3px solid var(--blue); }
.info-box.amber  { background: var(--amber-light);  border-right: 3px solid var(--amber); }
.info-box.green  { background: var(--green-light);  border-right: 3px solid var(--green); }
.info-box.red    { background: var(--red-light);    border-right: 3px solid var(--red); }
.info-box.purple { background: var(--purple-light); border-right: 3px solid var(--purple); }
.info-box.teal   { background: var(--teal-light);   border-right: 3px solid var(--teal); }

.bullet-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bullet-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.87rem;
  color: var(--ink);
  line-height: 1.5;
}

.bullet-list li::before {
  content: "•";
  flex-shrink: 0;
  margin-top: 1px;
}

.bullet-list.red li::before    { color: var(--red); }
.bullet-list.amber li::before  { color: var(--amber); }
.bullet-list.green li::before  { color: var(--green); }
.bullet-list.blue li::before   { color: var(--blue); }
.bullet-list.purple li::before { color: var(--purple); }

.pattern-block {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.6rem;
}

.pattern-block:last-child { margin-bottom: 0; }
.pattern-label { font-size: 0.8rem; font-weight: 600; color: var(--ink); margin-bottom: 0.3rem; }

/* ─── EXAMS ──────────────────────────────────────────────── */

.exams-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.filter-pill {
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 120ms;
  color: var(--ink);
}

.filter-pill:hover { background: #f1f5f9; }

.filter-pill.active {
  background: var(--indigo);
  border-color: var(--indigo);
  color: white;
}

.exams-list { display: flex; flex-direction: column; gap: 0.75rem; }

.exam-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.exam-trigger {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: right;
  transition: background 120ms;
}

.exam-trigger:hover { background: #f8fafc; }

.exam-year-badge {
  flex-shrink: 0;
  min-width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  line-height: 1.1;
}

.exam-year-badge .yr { font-size: 1rem; }
.exam-year-badge .mo { font-size: 0.68rem; }

.ybg-2025 { background: #fef2f2; color: var(--red); }
.ybg-2023 { background: var(--amber-light); color: var(--amber); }
.ybg-2022 { background: #f0fdf4; color: var(--green); }
.ybg-2021 { background: var(--indigo-light); color: var(--indigo); }
.ybg-2020 { background: var(--blue-light); color: var(--blue); }
.ybg-2019 { background: var(--purple-light); color: var(--purple); }
.ybg-2018 { background: var(--teal-light); color: var(--teal); }

.exam-trigger-body { flex: 1; min-width: 0; }

.exam-title {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.2rem;
}

.exam-subtitle { font-size: 0.82rem; color: var(--muted); margin: 0; }

.exam-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.exam-body {
  display: none;
  border-top: 1px solid var(--border);
  padding: 1.25rem;
}

.exam-body.open { display: block; }

.exam-links-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.exam-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--indigo);
  background: var(--indigo-light);
  transition: background 120ms;
}

.exam-link-btn:hover { background: #e0e7ff; }

.exam-struct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.exam-struct-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
}

.esi-q   { font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.esi-pts { font-size: 1.1rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.esi-topic { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }

/* ─── TOPICS ─────────────────────────────────────────────── */

.topics-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.topic-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.topic-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.topic-title { font-size: 0.97rem; font-weight: 700; color: var(--ink); margin: 0; }

.freq-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
}

.freq-critical { background: #fee2e2; color: var(--red); }
.freq-high     { background: var(--amber-light); color: var(--amber); }
.freq-medium   { background: var(--blue-light); color: var(--blue); }

.topic-block { margin-bottom: 0.85rem; }
.topic-block:last-child { margin-bottom: 0; }

.topic-block-label {
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.topic-block p { margin: 0; font-size: 0.86rem; color: var(--ink); line-height: 1.6; }

.from-exams {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.from-exam-chip {
  font-size: 0.75rem;
  padding: 0.12rem 0.5rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

/* ─── PLAN ───────────────────────────────────────────────── */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.plan-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.plan-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.day-num {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  color: white;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.day-num.sim { background: linear-gradient(135deg, var(--red), #991b1b); }

.plan-day-title { font-size: 0.97rem; font-weight: 700; color: var(--ink); }

.plan-focus {
  font-size: 0.86rem;
  color: #1e40af;
  background: var(--blue-light);
  border-right: 3px solid var(--blue);
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  line-height: 1.55;
  margin-bottom: 0.85rem;
}

.plan-tasks {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.plan-task {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: var(--ink);
}

.plan-task::before {
  content: "→";
  color: var(--indigo);
  flex-shrink: 0;
}

/* ─── CHECKLIST ──────────────────────────────────────────── */

.progress-bar-wrapper {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
}

.progress-bar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
  color: var(--muted);
}

.progress-bar-info strong { font-size: 1.3rem; color: var(--ink); }

.progress-track {
  flex: 1;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

#progressFill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--indigo), var(--purple));
  transition: width 200ms ease;
  border-radius: 999px;
}

.reset-btn {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--muted);
}

.reset-btn:hover { background: #f1f5f9; }

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.check-group {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.check-group-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  margin-bottom: 0.4rem;
  cursor: pointer;
  transition: background 100ms;
}

.check-item:last-child { margin-bottom: 0; }
.check-item:hover { background: #f8fafc; }

.check-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--indigo);
  cursor: pointer;
}

.check-item span {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink);
}

.check-item.done span { color: var(--muted); text-decoration: line-through; }

/* ─── BOTTOM NAV ─────────────────────────────────────────── */

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 0.4rem 0;
}

.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  padding: 0.4rem 0.25rem;
  color: #94a3b8;
  font-size: 0.68rem;
  cursor: pointer;
  transition: color 120ms;
}

.bottom-nav { display: none; justify-content: space-around; }

.bn-item.active { color: var(--indigo); }
.bn-item:hover  { color: var(--ink); }

/* ─── RESPONSIVE ─────────────────────────────────────────── */

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(100%);
    transition: transform 220ms ease;
  }

  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }

  .mobile-header { display: flex; }

  .main-content {
    margin-right: 0;
    padding-top: 4rem;
    padding-bottom: 5.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .bottom-nav { display: flex; }

  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .hero-brand {
    justify-content: flex-start;
  }
  .hero-brand img {
    width: 150px;
  }
  .command-grid {
    grid-template-columns: 1fr;
  }
  .marathon-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .marathon-layout { grid-template-columns: 1fr; }
  .marathon-days {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-sections { grid-template-columns: 1fr; }
  .topics-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .checklist-grid { grid-template-columns: 1fr; }
  .weeks-stats-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-hero {
    padding: 1rem;
    border-radius: 14px;
  }
  .hero-brand img {
    width: 126px;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .primary-btn,
  .hero-actions .ghost-btn {
    width: 100%;
  }
  .marathon-header { flex-direction: column; }
  .readiness-card { width: 100%; }
  .marathon-stats { grid-template-columns: 1fr; }
  .marathon-days { grid-template-columns: 1fr; }
  .day-detail-header { flex-direction: column; }
  .practice-task { grid-template-columns: 1fr; }
  .weeks-stats-row { grid-template-columns: 1fr 1fr; }
  .exam-struct-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── WEEK DETAIL ────────────────────────────────────────── */

.wd-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 1.25rem;
  transition: background 120ms, color 120ms;
}
.wd-back-btn:hover { background: #f8fafc; color: var(--ink); }

.wd-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-md);
}

.wd-num-badge {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  font-size: 1.5rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wd-num-badge.critical { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.wd-num-badge.high     { background: linear-gradient(135deg, #d97706, #b45309); }

.wd-header-body { flex: 1; }

.wd-week-sub {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.wd-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.wd-goal {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
  line-height: 1.55;
}

.wd-summary-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
  transition: opacity 150ms;
}
.wd-summary-link:hover { opacity: 0.9; }
.wd-summary-link .wd-summary-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wd-summary-text { flex: 1; }
.wd-summary-title { display: block; font-size: 1rem; font-weight: 700; }
.wd-summary-sub { display: block; font-size: 0.78rem; opacity: 0.8; font-weight: 400; margin-top: 2px; }
.wd-summary-arrow { opacity: 0.75; }

.wd-sections {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wd-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.wd-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.wd-section-header.blue   { color: var(--blue);   background: var(--blue-light); }
.wd-section-header.teal   { color: var(--teal);   background: var(--teal-light); }
.wd-section-header.purple { color: var(--purple); background: var(--purple-light); }
.wd-section-header.amber  { color: var(--amber);  background: var(--amber-light); }
.wd-section-header.green  { color: var(--green);  background: var(--green-light); }
.wd-section-header.red    { color: var(--red);    background: var(--red-light); }

.wd-section-body { padding: 1rem 1.25rem; }

.wd-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wd-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.5;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}
.wd-bullets li:last-child { border-bottom: none; }

.wd-bullet-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 0.7rem;
  font-weight: 700;
}
.wd-bullet-dot.blue   { background: var(--blue-light);   color: var(--blue); }
.wd-bullet-dot.amber  { background: var(--amber-light);  color: var(--amber); }
.wd-bullet-dot.green  { background: var(--green-light);  color: var(--green); }
.wd-bullet-dot.red    { background: var(--red-light);    color: var(--red); }

.wd-box {
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.65;
}
.wd-box.teal   { background: var(--teal-light);   border-right: 3px solid var(--teal); }
.wd-box.red    { background: var(--red-light);    border-right: 3px solid var(--red); }
.wd-box.blue   { background: var(--blue-light);   border-right: 3px solid var(--blue); }

.wd-patterns { display: flex; flex-direction: column; gap: 0.75rem; }
.wd-pattern-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 4px;
}

.wd-conclusion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.wd-conclusion-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.84rem;
  line-height: 1.5;
}
.wd-conclusion-item strong { display: block; color: var(--ink); margin-bottom: 3px; }

@media (max-width: 768px) {
  .wd-header { flex-direction: column; gap: 1rem; }
  .wd-conclusion-grid { grid-template-columns: 1fr; }
}
