/* ==========================================================================
   SkipNavi V2 — shared design system
   --------------------------------------------------------------------------
   Source of truth: Figma file HUa1t2P7nhVWCqbGcd1zpx (Codia editable UI),
   nodes 30:3 / 30:297 / 30:537 / 30:855 / 30:1098 / 30:1417 / 30:1674,
   desktop canvas 1672 x 941. Tokens below were read from get_design_context
   and verified by sampling the rendered frames.

   Every selector is prefixed .v2- so this file can never collide with the
   production stylesheets (mentor-homework.css, index-kmap.html, …).
   ========================================================================== */

:root {
  /* brand ------------------------------------------------------------- */
  --v2-blue: #2456e6;
  --v2-blue-strong: #1c47d1;
  --v2-blue-hover: #1e4bd8;
  --v2-blue-soft: #eff3fd;
  --v2-blue-soft-2: #e7edfc;
  --v2-blue-line: #c5d5fb;
  --v2-blue-line-2: #dbe4fb;
  --v2-blue-ink: #3b6ae8;

  /* status ------------------------------------------------------------ */
  --v2-green: #23a367;
  --v2-green-soft: #e9f6ef;
  --v2-green-line: #cbe8da;
  --v2-green-ink: #2f9e63;

  --v2-amber: #ef9a3c;
  --v2-amber-soft: #fef4e6;
  --v2-amber-soft-2: #fef8ec;
  --v2-amber-line: #fbe3c2;
  --v2-amber-ink: #d98724;

  --v2-red: #e2564e;
  --v2-red-soft: #fceeed;
  --v2-red-line: #f8d7d5;
  --v2-red-ink: #d9483f;

  --v2-purple: #8b6fd0;
  --v2-purple-soft: #f4f0fc;
  --v2-purple-line: #ded3f8;

  /* ink ---------------------------------------------------------------- */
  --v2-ink: #232a3d;
  --v2-ink-2: #3d4557;
  --v2-ink-3: #545c6d;
  --v2-ink-4: #6b7383;
  --v2-muted: #8b91a1;
  --v2-muted-2: #a3a9b8;
  --v2-faint: #bcc1cd;

  /* surface ------------------------------------------------------------ */
  --v2-page: #f7f8fc;
  --v2-surface: #ffffff;
  --v2-surface-2: #fafbfd;
  --v2-surface-3: #f5f7fb;
  --v2-line: #edeff5;
  --v2-line-2: #e4e7f0;
  --v2-line-3: #f3f5f9;

  /* shape -------------------------------------------------------------- */
  --v2-r-xs: 6px;
  --v2-r-sm: 8px;
  --v2-r: 10px;
  --v2-r-md: 12px;
  --v2-r-lg: 14px;
  --v2-r-xl: 18px;
  --v2-shadow: 0 1px 2px rgba(20, 28, 52, .03), 0 8px 24px rgba(20, 28, 52, .05);
  --v2-shadow-sm: 0 1px 2px rgba(20, 28, 52, .04);
  --v2-shadow-pop: 0 12px 32px rgba(20, 28, 52, .14);
  --v2-shadow-modal: 0 32px 80px rgba(18, 26, 52, .24);

  /* layout ------------------------------------------------------------- */
  --v2-side-mentor: 281px;
  --v2-side-mentor-compact: 252px;
  --v2-side-student: 285px;
  --v2-gutter: 21px;
  --v2-pad-x: 34px;

  --v2-font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui,
    -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ── base ─────────────────────────────────────────────────────────────── */
.v2-body {
  margin: 0;
  min-height: 100vh;
  background: var(--v2-page);
  color: var(--v2-ink-2);
  font-family: var(--v2-font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.v2-body *, .v2-body *::before, .v2-body *::after { box-sizing: border-box; }
.v2-body [hidden] { display: none !important; }
:where(.v2-body) img { display: block; max-width: 100%; }
/* Element resets are wrapped in :where() so any component class (.v2-btn,
   .v2-topchip, …) wins on specificity without needing !important. */
:where(.v2-body) h1, :where(.v2-body) h2, :where(.v2-body) h3,
:where(.v2-body) h4, :where(.v2-body) p, :where(.v2-body) figure { margin: 0; }
:where(.v2-body) ul, :where(.v2-body) ol { margin: 0; padding: 0; list-style: none; }
:where(.v2-body) button { font: inherit; color: inherit; cursor: pointer; }
:where(.v2-body) a { color: inherit; text-decoration: none; }
:where(.v2-body) input, :where(.v2-body) textarea, :where(.v2-body) select { font: inherit; color: inherit; }

.v2-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.v2-skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  padding: 10px 16px; border-radius: var(--v2-r-sm);
  background: var(--v2-blue); color: #fff; font-size: 14px; font-weight: 600;
  transition: top .18s ease;
}
.v2-skip:focus { top: 12px; }

.v2-body :focus-visible {
  outline: 2px solid var(--v2-blue);
  outline-offset: 2px;
  border-radius: 4px;
}
.v2-body :focus:not(:focus-visible) { outline: none; }
.v2-num { font-variant-numeric: tabular-nums; }

/* ── app shell ────────────────────────────────────────────────────────── */
.v2-app { display: flex; align-items: stretch; min-height: 100vh; }
.v2-app.has-topbar { min-height: calc(100vh - 75px); }
.v2-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.v2-content {
  flex: 1 1 auto;
  padding: 22px var(--v2-pad-x) 28px;
  display: flex; flex-direction: column; gap: 16px;
}
.v2-content.is-tight { gap: 16px; }

/* ── mentor top bar (node 30:521) ─────────────────────────────────────── */
.v2-topbar {
  display: flex; align-items: center; gap: 14px;
  height: 75px; padding: 0 24px;
  background: linear-gradient(90deg, #1e3b90 0%, #2b50bc 48%, #3a63e2 100%);
  color: #fff;
}
.v2-topbar-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.v2-topbar-brand img { width: 30px; height: auto; }
.v2-topbar-brand b { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.v2-topbar-spacer { flex: 1 1 auto; }
.v2-topbar-actions { display: flex; align-items: center; gap: 12px; }
.v2-topbar-user { text-align: right; line-height: 1.25; }
.v2-topbar-user b { display: block; font-size: 13px; font-weight: 600; }
.v2-topbar-user small { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .74); }
.v2-topchip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 15px; border-radius: 9px;
  background: #fff; border: 1px solid transparent; color: var(--v2-blue);
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.v2-topchip svg { width: 15px; height: 15px; }
.v2-topchip.is-danger { color: var(--v2-red-ink); }
.v2-topchip.is-ghost { background: transparent; border-color: rgba(255, 255, 255, .6); color: #fff; }
.v2-topchip:hover { filter: brightness(.97); }
.v2-topchip.is-ghost:hover { background: rgba(255, 255, 255, .14); filter: none; }

/* ── sidebar (shared) ─────────────────────────────────────────────────── */
.v2-side {
  flex: none;
  background: var(--v2-surface);
  border-right: 1px solid var(--v2-line);
  display: flex; flex-direction: column;
  align-self: stretch;
}
.v2-side-mentor { width: var(--v2-side-mentor); padding: 24px 20px 20px; gap: 16px; }
.v2-side-mentor.is-compact { width: var(--v2-side-mentor-compact); padding: 26px 18px 20px; gap: 18px; }

.v2-brand { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.v2-brand img { width: 40px; height: auto; }
.v2-brand span { font-size: 19px; font-weight: 700; color: var(--v2-ink); letter-spacing: -.035em; }
.v2-side-mentor.is-compact .v2-brand img { width: 36px; }
.v2-side-mentor.is-compact .v2-brand span { font-size: 17px; }

.v2-side-profile {
  display: flex; align-items: center; gap: 11px;
  padding: 12px; border-radius: var(--v2-r-md);
  background: var(--v2-surface-2); border: 1px solid var(--v2-line-3);
}
.v2-side-profile .v2-avatar { width: 44px; height: 44px; }
.v2-side-profile-body { min-width: 0; }
.v2-side-profile-name { display: flex; align-items: center; gap: 6px; }
.v2-side-profile-name b { font-size: 14px; font-weight: 700; color: var(--v2-ink-2); letter-spacing: -.02em; }
.v2-side-profile small { display: block; font-size: 12px; color: var(--v2-muted); margin-top: 3px; }
.v2-side-profile .v2-rating { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--v2-muted); margin-top: 3px; }
.v2-side-profile .v2-rating svg { width: 13px; height: 13px; color: var(--v2-amber); }

.v2-nav { display: flex; flex-direction: column; gap: 2px; }
.v2-nav-link {
  display: flex; align-items: center; gap: 12px;
  min-height: 46px; padding: 0 14px; border-radius: var(--v2-r);
  color: var(--v2-ink-4); font-size: 14.5px; font-weight: 600;
  border: 0; background: none; width: 100%; text-align: left;
  transition: background .16s ease, color .16s ease;
}
.v2-nav-link svg { width: 19px; height: 19px; flex: none; color: var(--v2-muted-2); }
.v2-nav-link:hover { background: var(--v2-surface-3); color: var(--v2-ink-2); }
.v2-nav-link:hover svg { color: var(--v2-ink-4); }
.v2-nav-link.is-on, .v2-nav-link[aria-current="page"] {
  background: var(--v2-blue-soft); color: var(--v2-blue); font-weight: 700;
}
.v2-nav-link.is-on svg, .v2-nav-link[aria-current="page"] svg { color: var(--v2-blue); }
.v2-side-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 2px; }
.v2-side-foot .v2-divider { margin-bottom: 8px; }
.v2-side-mentorcard {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--v2-r-md); border: 1px solid var(--v2-line);
  background: var(--v2-surface); margin-bottom: 8px; width: 100%; text-align: left;
}
.v2-side-mentorcard .v2-avatar { width: 38px; height: 38px; }
.v2-side-mentorcard small { display: block; font-size: 11.5px; color: var(--v2-muted-2); }
.v2-side-mentorcard b { display: block; font-size: 13.5px; font-weight: 700; color: var(--v2-ink-2); }
.v2-side-mentorcard svg { width: 16px; height: 16px; margin-left: auto; color: var(--v2-muted-2); flex: none; }

.v2-divider { height: 1px; background: var(--v2-line); border: 0; margin: 0; }

/* ── student sidebar (nodes 30:1098 / 30:1417 / 30:1674) ──────────────── */
.v2-side-student { width: var(--v2-side-student); padding: 22px 16px 20px; gap: 14px; }
.v2-side-student .v2-brand img { width: 38px; }
.v2-side-student .v2-brand span { font-size: 17px; }
.v2-side-workflow {
  display: flex; min-height: 0;
  border: 1px solid var(--v2-line); border-radius: var(--v2-r-md);
  background: var(--v2-surface); overflow: hidden;
}
.v2-side-subjects {
  flex: none; width: 92px; padding: 8px 7px;
  background: var(--v2-surface-2); border-right: 1px solid var(--v2-line-3);
  display: flex; flex-direction: column; gap: 3px;
}
.v2-subject-link {
  width: 100%; min-height: 34px; border: 0; border-radius: 7px; background: transparent;
  color: var(--v2-ink-4); font-size: 12.5px; font-weight: 600; letter-spacing: -.03em;
  display: flex; align-items: center; justify-content: center; padding: 5px 4px; white-space: nowrap;
}
.v2-subject-link:hover { background: var(--v2-blue-soft); color: var(--v2-ink-2); }
.v2-subject-link.is-on { background: var(--v2-blue-soft); color: var(--v2-blue); }
.v2-subject-select {
  width: 100%; min-height: 32px; margin-top: 3px;
  border: 1px solid var(--v2-blue-line-2); border-radius: 7px; background: var(--v2-blue-soft);
  color: var(--v2-blue-ink); font-size: 11px; font-weight: 600; white-space: nowrap;
  display: flex; align-items: center; justify-content: center; gap: 3px; padding: 4px 3px;
}
.v2-subject-select svg { width: 12px; height: 12px; flex: none; }
.v2-side-tasks { flex: 1 1 auto; min-width: 0; padding: 9px 8px; display: flex; flex-direction: column; gap: 1px; }
.v2-task-link {
  display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 0 11px; border-radius: var(--v2-r-sm);
  color: var(--v2-ink-4); font-size: 13.5px; font-weight: 600;
  border: 0; background: none; width: 100%; text-align: left;
}
.v2-task-link svg { width: 17px; height: 17px; flex: none; color: var(--v2-muted-2); }
.v2-task-link:hover { background: var(--v2-surface-3); color: var(--v2-ink-2); }
.v2-task-link.is-on { background: var(--v2-blue-soft); color: var(--v2-blue); font-weight: 700; }
.v2-task-link.is-on svg { color: var(--v2-blue); }

.v2-side-summary { border: 1px solid var(--v2-line); border-radius: var(--v2-r-md); padding: 14px 13px; background: var(--v2-surface); }
.v2-side-summary h2 { font-size: 13.5px; font-weight: 700; color: var(--v2-ink-3); margin-bottom: 11px; }
.v2-side-statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v2-side-stat {
  border: 1px solid var(--v2-line); border-radius: var(--v2-r-sm);
  padding: 9px 10px; background: var(--v2-surface);
}
.v2-side-stat span { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--v2-muted); }
.v2-side-stat span svg { width: 12px; height: 12px; flex: none; color: var(--v2-muted-2); }
.v2-side-stat b { display: block; margin-top: 4px; font-size: 17px; font-weight: 700; color: var(--v2-ink); letter-spacing: -.03em; }
.v2-side-stat b i { font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--v2-muted); margin-left: 2px; }

/* ── page header ──────────────────────────────────────────────────────── */
.v2-pagehead { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.v2-pagehead h1 { font-size: 33px; font-weight: 700; letter-spacing: -.045em; color: var(--v2-ink); line-height: 1.24; }
.v2-pagehead .v2-sub { margin-top: 8px; font-size: 15px; color: var(--v2-muted); }
.v2-pagehead-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.v2-pagehead.is-md h1 { font-size: 28px; }
.v2-pagehead.is-sm h1 { font-size: 25px; }

.v2-crumbs { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--v2-muted-2); margin-bottom: 7px; }
.v2-crumbs a { color: var(--v2-blue-ink); font-weight: 600; }
.v2-crumbs a:hover { text-decoration: underline; }

.v2-headline-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── buttons ──────────────────────────────────────────────────────────── */
.v2-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--v2-r-sm);
  border: 1px solid var(--v2-line-2); background: var(--v2-surface); color: var(--v2-ink-3);
  font-size: 14.5px; font-weight: 600; white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.v2-btn svg { width: 16px; height: 16px; flex: none; }
.v2-btn:hover:not(:disabled) { background: var(--v2-surface-3); }
.v2-btn:disabled, .v2-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.v2-btn-primary { background: var(--v2-blue); border-color: var(--v2-blue); color: #fff; }
.v2-btn-primary:hover:not(:disabled) { background: var(--v2-blue-hover); border-color: var(--v2-blue-hover); }
.v2-btn-outline { border-color: var(--v2-blue-line); color: var(--v2-blue); background: var(--v2-surface); }
.v2-btn-outline:hover:not(:disabled) { background: var(--v2-blue-soft); }
.v2-btn-soft { background: var(--v2-blue-soft); border-color: transparent; color: var(--v2-blue); }
.v2-btn-soft:hover:not(:disabled) { background: var(--v2-blue-soft-2); }
.v2-btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 7px; gap: 6px; }
.v2-btn-sm svg { width: 14px; height: 14px; }
.v2-btn-lg { min-height: 52px; padding: 0 24px; font-size: 16px; border-radius: var(--v2-r); }
.v2-btn-icon { min-height: 36px; width: 36px; padding: 0; border-radius: var(--v2-r-sm); color: var(--v2-muted); }
.v2-btn-icon svg { width: 17px; height: 17px; }
.v2-btn-icon.is-bare { border-color: transparent; background: transparent; }
.v2-btn-icon.is-bare:hover { background: var(--v2-surface-3); }
.v2-linkbtn {
  display: inline-flex; align-items: center; gap: 5px; border: 0; background: none;
  color: var(--v2-blue-ink); font-size: 13.5px; font-weight: 600; padding: 4px 2px;
}
.v2-linkbtn svg { width: 14px; height: 14px; }
.v2-linkbtn:hover { color: var(--v2-blue-strong); }

/* ── cards ────────────────────────────────────────────────────────────── */
.v2-card {
  background: var(--v2-surface); border: 1px solid var(--v2-line);
  border-radius: var(--v2-r-lg); box-shadow: var(--v2-shadow-sm);
}
.v2-card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-bottom: 1px solid var(--v2-line-3);
}
.v2-card-head h2 { font-size: 15.5px; font-weight: 700; color: var(--v2-ink-2); letter-spacing: -.03em; }
.v2-card-head .v2-spacer { flex: 1 1 auto; }
.v2-card-body { padding: 14px 16px; }
.v2-card-head .v2-btn-sm { min-height: 28px; }
.v2-card-body.is-flush { padding: 0; }
.v2-card-foot { padding: 11px 16px; border-top: 1px solid var(--v2-line-3); display: flex; align-items: center; gap: 10px; }
.v2-hint { font-size: 12.5px; color: var(--v2-muted-2); }

/* ── stat cards ───────────────────────────────────────────────────────── */
.v2-statgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--v2-gutter); }
.v2-statcard {
  background: var(--v2-surface); border: 1px solid var(--v2-line);
  border-radius: var(--v2-r-lg); padding: 14px 16px 12px; box-shadow: var(--v2-shadow-sm);
  display: flex; flex-direction: column; gap: 8px; min-height: 92px;
}
.v2-statcard-top { display: flex; align-items: center; gap: 12px; }
.v2-stat-icon {
  width: 44px; height: 44px; flex: none; border-radius: var(--v2-r-md);
  display: grid; place-items: center; background: var(--v2-blue-soft); color: var(--v2-blue);
}
.v2-stat-icon svg { width: 21px; height: 21px; }
.v2-stat-icon.is-green { background: var(--v2-green-soft); color: var(--v2-green); }
.v2-stat-icon.is-amber { background: var(--v2-amber-soft); color: var(--v2-amber); }
.v2-stat-icon.is-red { background: var(--v2-red-soft); color: var(--v2-red); }
.v2-stat-icon.is-purple { background: var(--v2-purple-soft); color: var(--v2-purple); }
.v2-stat-text span { display: block; font-size: 13px; color: var(--v2-muted); }
.v2-stat-text b { display: block; margin-top: 2px; font-size: 26px; font-weight: 700; color: var(--v2-ink); letter-spacing: -.045em; line-height: 1.15; }
.v2-stat-text b i { font-style: normal; font-size: 13px; font-weight: 500; color: var(--v2-ink-4); margin-left: 3px; letter-spacing: 0; }
.v2-spark { height: 30px; margin-top: auto; }
.v2-spark svg { width: 100%; height: 30px; display: block; }

/* ── chips / badges ───────────────────────────────────────────────────── */
.v2-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 25px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--v2-surface-3); color: var(--v2-ink-4); border: 1px solid transparent;
}
.v2-chip svg { width: 12px; height: 12px; }
.v2-chip.is-blue { background: var(--v2-blue-soft); color: var(--v2-blue); }
.v2-chip.is-green { background: var(--v2-green-soft); color: var(--v2-green-ink); }
.v2-chip.is-amber { background: var(--v2-amber-soft); color: var(--v2-amber-ink); }
.v2-chip.is-red { background: var(--v2-red-soft); color: var(--v2-red-ink); }
.v2-chip.is-purple { background: var(--v2-purple-soft); color: var(--v2-purple); }
.v2-chip.is-square { border-radius: var(--v2-r-xs); }
.v2-chip.is-outline { background: var(--v2-surface); border-color: var(--v2-line-2); color: var(--v2-ink-4); }
.v2-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

.v2-avatar {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  object-fit: cover; background: var(--v2-blue-soft);
  display: grid; place-items: center; color: var(--v2-blue); font-size: 13px; font-weight: 700;
  overflow: hidden;
}
.v2-avatar svg { width: 58%; height: 58%; color: #b9c4dc; }
.v2-avatar.is-lg { width: 100px; height: 100px; font-size: 28px; }
.v2-avatar.is-sm { width: 32px; height: 32px; font-size: 11px; }
.v2-avatar.is-xs { width: 26px; height: 26px; font-size: 10px; }

/* ── forms ────────────────────────────────────────────────────────────── */
.v2-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.v2-label { font-size: 13px; font-weight: 600; color: var(--v2-ink-4); }
.v2-input, .v2-textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  border: 1px solid var(--v2-line-2); border-radius: var(--v2-r-sm);
  background: var(--v2-surface); color: var(--v2-ink-2); font-size: 14px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.v2-textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.v2-input::placeholder, .v2-textarea::placeholder { color: var(--v2-faint); }
.v2-input:focus, .v2-textarea:focus {
  outline: none; border-color: var(--v2-blue); box-shadow: 0 0 0 3px rgba(36, 86, 230, .12);
}
.v2-search { position: relative; }
.v2-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--v2-muted-2); pointer-events: none; }
.v2-search .v2-input { padding-left: 40px; }

/* custom select (listbox) */
.v2-select { position: relative; }
.v2-select-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--v2-line-2); border-radius: var(--v2-r-sm);
  background: var(--v2-surface); color: var(--v2-ink-3);
  font-size: 14px; font-weight: 600; text-align: left;
}
.v2-select-btn > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-select-btn > svg { width: 16px; height: 16px; flex: none; color: var(--v2-muted-2); transition: transform .18s ease; }
.v2-select-btn[aria-expanded="true"] { border-color: var(--v2-blue); box-shadow: 0 0 0 3px rgba(36, 86, 230, .12); }
.v2-select-btn[aria-expanded="true"] > svg { transform: rotate(180deg); }
.v2-select-menu {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 100%;
  background: var(--v2-surface); border: 1px solid var(--v2-line-2); border-radius: var(--v2-r);
  box-shadow: var(--v2-shadow-pop); padding: 6px; max-height: 300px; overflow: auto;
}
.v2-select-opt {
  display: flex; align-items: center; gap: 8px; width: 100%;
  min-height: 38px; padding: 0 10px; border: 0; border-radius: var(--v2-r-xs);
  background: none; color: var(--v2-ink-3); font-size: 13.5px; font-weight: 600; text-align: left;
}
.v2-select-opt:hover, .v2-select-opt.is-active { background: var(--v2-surface-3); }
.v2-select-opt[aria-selected="true"] { color: var(--v2-blue); background: var(--v2-blue-soft); }
.v2-select-opt svg { width: 15px; height: 15px; margin-left: auto; flex: none; }

/* toggle switch */
.v2-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.v2-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.v2-switch-track {
  width: 44px; height: 25px; flex: none; border-radius: 999px;
  background: var(--v2-line-2); position: relative; transition: background .2s ease;
}
.v2-switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .2);
  transition: transform .2s ease;
}
.v2-switch input:checked + .v2-switch-track { background: var(--v2-blue); }
.v2-switch input:checked + .v2-switch-track::after { transform: translateX(19px); }
.v2-switch input:focus-visible + .v2-switch-track { outline: 2px solid var(--v2-blue); outline-offset: 2px; }

/* checkbox */
.v2-check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; min-width: 0; }
.v2-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.v2-check-box {
  width: 18px; height: 18px; flex: none; border-radius: 5px;
  border: 1.5px solid var(--v2-line-2); background: var(--v2-surface);
  display: grid; place-items: center; transition: background .15s ease, border-color .15s ease;
}
.v2-check-box svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.v2-check input:checked + .v2-check-box { background: var(--v2-blue); border-color: var(--v2-blue); }
.v2-check input:checked + .v2-check-box svg { opacity: 1; }
.v2-check input:focus-visible + .v2-check-box { outline: 2px solid var(--v2-blue); outline-offset: 2px; }
.v2-check-text { font-size: 13.5px; color: var(--v2-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── tabs ─────────────────────────────────────────────────────────────── */
.v2-tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--v2-line); }
.v2-tab {
  border: 0; background: none; padding: 14px 16px 12px; margin-bottom: -1px;
  color: var(--v2-muted); font-size: 14px; font-weight: 600;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.v2-tab:hover { color: var(--v2-ink-3); }
.v2-tab[aria-selected="true"] { color: var(--v2-blue); border-bottom-color: var(--v2-blue); font-weight: 700; }

/* segmented pills (subject picker) */
.v2-pillgroup { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.v2-pill {
  min-height: 45px; padding: 0 20px; border-radius: var(--v2-r);
  border: 1px solid var(--v2-line-2); background: var(--v2-surface);
  color: var(--v2-ink-4); font-size: 14.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.v2-pill:hover { background: var(--v2-surface-3); }
.v2-pill[aria-pressed="true"], .v2-pill.is-on {
  background: var(--v2-blue); border-color: var(--v2-blue); color: #fff;
}

/* ── table ────────────────────────────────────────────────────────────── */
.v2-table { width: 100%; border-collapse: collapse; }
.v2-table thead th {
  text-align: left; font-size: 13.5px; font-weight: 600; color: var(--v2-muted);
  background: var(--v2-surface-2); padding: 12px 16px; white-space: nowrap;
  border-top: 1px solid var(--v2-line-3); border-bottom: 1px solid var(--v2-line-3);
}
.v2-table tbody td { padding: 16px 16px; border-bottom: 1px solid var(--v2-line-3); vertical-align: middle; font-size: 13.5px; }
.v2-table tbody tr:last-child td { border-bottom: 0; }
.v2-table tbody tr:hover { background: var(--v2-surface-2); }
.v2-cell-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.v2-person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.v2-person b { font-size: 14.5px; font-weight: 700; color: var(--v2-ink-2); letter-spacing: -.02em; }
.v2-stackcell b { display: block; font-size: 13.5px; color: var(--v2-ink-3); font-weight: 600; }
.v2-stackcell small { display: block; font-size: 12.5px; color: var(--v2-muted-2); margin-top: 3px; }

.v2-pager { display: flex; align-items: center; justify-content: center; gap: 8px; }
.v2-pager-btn {
  min-width: 32px; height: 32px; border-radius: var(--v2-r-xs);
  border: 1px solid var(--v2-line-2); background: var(--v2-surface); color: var(--v2-ink-4);
  display: inline-grid; place-items: center; font-size: 13px; font-weight: 600;
}
.v2-pager-btn svg { width: 14px; height: 14px; }
.v2-pager-btn[aria-current="page"] { background: var(--v2-blue); border-color: var(--v2-blue); color: #fff; }
.v2-pager-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── progress ─────────────────────────────────────────────────────────── */
.v2-bar { height: 8px; border-radius: 999px; background: var(--v2-line-3); overflow: hidden; }
.v2-bar > i { display: block; height: 100%; border-radius: 999px; background: var(--v2-blue); transition: width .5s ease; }
.v2-bar.is-green > i { background: var(--v2-green); }
.v2-bar.is-amber > i { background: var(--v2-amber); }
.v2-bar.is-red > i { background: var(--v2-red); }
.v2-bar.is-sm { height: 6px; }

.v2-donut { position: relative; flex: none; display: grid; place-items: center; }
.v2-donut svg { transform: rotate(-90deg); display: block; }
.v2-donut-track { stroke: var(--v2-line-3); }
.v2-donut-value { stroke: var(--v2-blue); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.v2-donut.is-green .v2-donut-value { stroke: var(--v2-green); }
.v2-donut.is-amber .v2-donut-value { stroke: var(--v2-amber); }
.v2-donut.is-red .v2-donut-value { stroke: var(--v2-red); }
.v2-donut-label {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  font-weight: 700; color: var(--v2-ink); letter-spacing: -.04em;
}
.v2-donut-label b { font-size: 26px; }
.v2-donut-label i { font-style: normal; font-size: 14px; }
.v2-donut-label small { display: block; font-size: 11.5px; font-weight: 500; color: var(--v2-muted); margin-top: 1px; letter-spacing: 0; }

/* ── modal ────────────────────────────────────────────────────────────── */
.v2-scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(38, 45, 66, .44);
  display: flex; align-items: center; justify-content: center;
  padding: 26px 24px;
  animation: v2-fade .2s ease;
}
.v2-modal {
  background: var(--v2-surface); border-radius: var(--v2-r-xl);
  box-shadow: var(--v2-shadow-modal);
  width: min(1220px, 100%); max-height: 100%;
  display: flex; flex-direction: column; overflow: hidden;
  animation: v2-rise .24s cubic-bezier(.2, .8, .3, 1);
}
.v2-modal.is-md { width: min(1104px, 100%); }
.v2-modal.is-sm { width: min(560px, 100%); }
.v2-modal-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 26px 32px 14px;
}
.v2-modal-head h2 { font-size: 25px; font-weight: 700; color: var(--v2-ink); letter-spacing: -.04em; }
.v2-modal-head .v2-sub { margin-top: 6px; font-size: 13.5px; color: var(--v2-muted); }
.v2-modal-close {
  margin-left: auto; width: 36px; height: 36px; flex: none; border-radius: var(--v2-r-sm);
  border: 0; background: none; color: var(--v2-ink-4); display: grid; place-items: center;
}
.v2-modal-close svg { width: 20px; height: 20px; }
.v2-modal-close:hover { background: var(--v2-surface-3); }
.v2-modal-body { padding: 0 32px 8px; overflow: auto; flex: 1 1 auto; }
.v2-modal-foot { padding: 18px 32px 26px; display: flex; align-items: center; justify-content: center; gap: 12px; }
@keyframes v2-fade { from { opacity: 0; } }
@keyframes v2-rise { from { opacity: 0; transform: translateY(14px) scale(.99); } }

/* ── notice / callout ─────────────────────────────────────────────────── */
.v2-note {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px; border-radius: var(--v2-r-md);
  background: var(--v2-amber-soft-2); border: 1px solid var(--v2-amber-line);
  font-size: 13.5px; color: var(--v2-ink-3);
}
.v2-note > svg { width: 17px; height: 17px; flex: none; color: var(--v2-amber); margin-top: 1px; }
.v2-note.is-blue { background: var(--v2-blue-soft); border-color: var(--v2-blue-line-2); }
.v2-note.is-blue > svg { color: var(--v2-blue); }
.v2-note b { color: var(--v2-ink-2); }

.v2-empty { padding: 40px 20px; text-align: center; color: var(--v2-muted); font-size: 13.5px; }

/* ── utility ──────────────────────────────────────────────────────────── */
.v2-row { display: flex; align-items: center; gap: 10px; }
.v2-row.is-wrap { flex-wrap: wrap; }
.v2-spacer { flex: 1 1 auto; }
.v2-stack { display: flex; flex-direction: column; gap: 14px; }
.v2-stack.is-sm { gap: 13px; }
.v2-grid-main { display: grid; gap: var(--v2-gutter); align-items: start; }
.v2-grid-main > * { min-width: 0; }

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1400px) {
  :root { --v2-pad-x: 24px; }
}
@media (max-width: 1180px) {
  .v2-statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .v2-app { flex-direction: column; }
  .v2-side { width: 100% !important; border-right: 0; border-bottom: 1px solid var(--v2-line); }
  .v2-side-mentor .v2-nav { flex-direction: row; flex-wrap: wrap; }
  .v2-side-student .v2-side-workflow { flex-direction: column; }
  .v2-side-student .v2-side-subjects { width: 100%; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--v2-line-3); }
  .v2-subject-link { width: auto; min-width: 62px; }
  .v2-side-foot { margin-top: 0; }
  .v2-grid-main { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 720px) {
  :root { --v2-pad-x: 16px; }
  .v2-pagehead-actions { min-width: 0; max-width: 100%; }
  .v2-statgrid { grid-template-columns: minmax(0, 1fr); }
  .v2-pagehead h1 { font-size: 26px; }
  .v2-modal-head, .v2-modal-body, .v2-modal-foot { padding-left: 18px; padding-right: 18px; }
  .v2-scrim { padding: 16px 10px; }
}

/* ── reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .v2-body *, .v2-body *::before, .v2-body *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── print ────────────────────────────────────────────────────────────── */
@media print {
  .v2-side, .v2-topbar, .v2-pagehead-actions { display: none !important; }
}

/* indeterminate checkbox (parent unit with a partial selection) */
.v2-check input[data-mixed] + .v2-check-box { border-color: var(--v2-blue); background: var(--v2-blue-soft); }
.v2-check input[data-mixed] + .v2-check-box svg { opacity: 1; color: var(--v2-blue); }

.v2-section-title { font-size: 22px; font-weight: 700; color: var(--v2-ink); letter-spacing: -.04em; }
