/* ==========================================================================
   Unilearno CRM — design system (unilearno.com tokens)
   ink #1B1631 · paper #F4F3F8 · violet #4A2FD6 · lime #D4F36B
   Bricolage Grotesque (display) · Hanken Grotesk (body)
   ========================================================================== */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 200 800; font-display: swap; src: url("fonts/bricolage-grotesque.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 100 900; font-display: swap; src: url("fonts/hanken-grotesk.woff2") format("woff2"); }

:root {
  --paper: #F4F3F8;
  --white: #FFFFFF;
  --ink: #1B1631;
  --ink-2: #2A2446;
  --ink-line: #3A3452;
  --text: #1B1631;
  --text-2: #4F4A66;
  --text-3: #77728C;
  --soft: #CFCBE0;
  --soft-2: #E6E3F0;
  --line: #DCD9E6;
  --line-2: #EDEBF4;
  --violet: #4A2FD6;
  --violet-d: #3920B8;
  --violet-2: #5E45E0;
  --violet-t: #ECE9FB;
  --lime: #D4F36B;
  --lime-d: #C2E24F;
  --lime-t: #F2FAD2;
  --green: #2F7A3E;  --green-t: #E3F3E6;
  --amber: #8A5300;  --amber-t: #FFF1D6;
  --red: #B4372D;    --red-t: #FBE7E5;
  --grey: #6A6582;   --grey-t: #EDEBF4;
  --r: 20px;
  --r-sm: 14px;
  --r-xs: 10px;
  --shadow-pop: 0 1px 0 var(--line), 0 30px 60px -24px rgba(27,22,49,.30);
  --fd: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fb: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --side: 248px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--fb); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--violet); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--fd); margin: 0; letter-spacing: -.025em; line-height: 1.1; color: var(--ink); }
h1 { font-size: 32px; font-weight: 800; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 .6em; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.pre { white-space: pre-wrap; }
.ic { flex: none; vertical-align: middle; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.boot { height: 100vh; display: grid; place-items: center; font-family: var(--fd); font-weight: 800; font-size: 28px; color: var(--soft); letter-spacing: -.03em; }

/* ---------- wordmark ---------- */
.wordmark { font-family: var(--fd); font-weight: 800; font-size: 24px; letter-spacing: -.035em; color: var(--ink); display: inline-flex; align-items: baseline; gap: 8px; }
.wordmark span { font-family: var(--fb); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--violet); }
.wordmark-light { color: #fff; }
.wordmark-light span { color: var(--lime); }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--ink); color: var(--soft); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: thin; }
.side-top { padding: 22px 22px 18px; }
.side-nav { padding: 0 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.side-group { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8E89A6; padding: 18px 12px 6px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 999px; color: var(--soft); font-weight: 600; font-size: 14.5px; text-decoration: none !important; }
.side-link:hover { background: var(--ink-2); color: #fff; }
.side-link.on { background: var(--ink-2); color: #fff; box-shadow: inset 0 0 0 1px var(--ink-line); }
.side-link.on .ic { color: var(--lime); }
.side-link .count { margin-left: auto; background: var(--lime); color: var(--ink); font-size: 11px; font-weight: 800; border-radius: 999px; padding: 0 7px; line-height: 19px; }
.side-foot { margin-top: auto; padding: 16px 22px 22px; font-size: 12px; color: #8E89A6; }
.scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; height: 68px; display: flex; align-items: center; gap: 14px; padding: 0 32px; background: var(--paper); border-bottom: 1px solid var(--line); }
.top .grow { flex: 1; }
.search { position: relative; flex: 1; max-width: 460px; }
.search input[type=search] { width: 100%; height: 42px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; padding: 0 16px 0 42px; font: inherit; color: var(--ink); }
.search input[type=search]:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(74,47,214,.18); }
.search .ic { position: absolute; left: 15px; top: 12px; color: var(--text-3); }
.search-pop { position: absolute; top: 48px; left: 0; right: 0; background: #fff; border-radius: var(--r-sm); box-shadow: var(--shadow-pop); padding: 6px; max-height: 420px; overflow: auto; z-index: 40; }
.search-pop a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; color: var(--ink); font-weight: 600; text-decoration: none !important; }
.search-pop a:hover, .search-pop a.hl { background: var(--paper); }
.search-pop .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 8px 10px 4px; font-weight: 700; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.icon-btn:hover { background: #fff; }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; min-width: 18px; height: 18px; border-radius: 999px; background: var(--violet); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--paper); }
.me { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; cursor: pointer; padding: 4px 6px 4px 4px; border-radius: 999px; text-align: left; color: var(--ink); }
.me:hover { background: #fff; }
.me b { display: block; font-size: 14px; line-height: 1.2; }
.me small { display: block; font-size: 12px; color: var(--text-3); line-height: 1.2; }
.pop { position: absolute; z-index: 50; background: #fff; border-radius: var(--r-sm); box-shadow: var(--shadow-pop); padding: 6px; min-width: 240px; }
.pop a, .pop button.pop-item { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 12px; border-radius: 10px; color: var(--ink); font-weight: 600; text-decoration: none !important; border: 0; background: none; cursor: pointer; text-align: left; font-size: 14px; }
.pop a:hover, .pop button.pop-item:hover { background: var(--paper); }
.pop hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 4px; }
.pop .pop-head { padding: 8px 12px 10px; }
.notif { max-width: 380px; width: 380px; max-height: 480px; overflow: auto; }
.notif a { align-items: flex-start; font-weight: 500; }
.notif .n-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--violet-t); color: var(--violet); display: grid; place-items: center; flex: none; }
.notif .n-t { font-weight: 700; }
.content { padding: 32px 32px 64px; width: 100%; max-width: 1280px; margin: 0 auto; }
.switch-bar { background: var(--lime); color: var(--ink); font-size: 13.5px; font-weight: 600; padding: 8px 32px; display: flex; gap: 12px; align-items: center; }
.switch-bar button { margin-left: auto; }
.only-m { display: none !important; }

/* ---------- page header ---------- */
.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.ph .sub { color: var(--text-2); margin-top: 8px; font-size: 15.5px; }
.ph .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.crumb { font-size: 13px; color: var(--text-3); margin-bottom: 8px; font-weight: 600; }
.crumb a { color: var(--text-3); }
.eyebrow { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }

/* ---------- grid ---------- */
.g { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.split-wide { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.stack > * + * { margin-top: 20px; }
.mb { margin-bottom: 24px; }
.mt { margin-top: 20px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* ---------- cards ---------- */
.card { background: #fff; border-radius: var(--r); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 0; }
.card-h h2 { font-size: 17px; }
.card-h .link { font-size: 13.5px; }
.card-b { padding: 18px 24px 22px; }
.card-b.flush { padding: 10px 0 6px; }
.card.pad { padding: 24px; }
.card.ink { background: var(--ink); color: var(--soft); }
.card.ink h2, .card.ink h3 { color: #fff; }
.card.lime { background: var(--lime); }
.card.paper { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
a.card { display: block; color: inherit; text-decoration: none !important; font-weight: inherit; }
a.card.between { display: flex; }
a.card:hover { box-shadow: inset 0 0 0 2px var(--violet); }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { background: #fff; border-radius: var(--r); padding: 20px 22px; color: var(--ink); text-decoration: none !important; font-weight: inherit; display: block; }
a.kpi:hover { box-shadow: inset 0 0 0 2px var(--violet); }
.kpi .k-l { font-size: 13px; color: var(--text-2); font-weight: 600; }
.kpi .k-v { font-family: var(--fd); font-weight: 800; font-size: 34px; letter-spacing: -.035em; line-height: 1.1; margin-top: 8px; }
.kpi .k-n { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.kpi.hot { background: var(--lime); }
.kpi.hot .k-l, .kpi.hot .k-n { color: var(--ink); }
.kpi.dark { background: var(--ink); }
.kpi.dark .k-v { color: #fff; } .kpi.dark .k-l, .kpi.dark .k-n { color: var(--soft); }
.trend { font-size: 12.5px; font-weight: 700; }
.trend.up { color: var(--green); } .trend.down { color: var(--red); }

/* ---------- lists (queues) ---------- */
.q { list-style: none; margin: 0; padding: 0; }
.q li { border-top: 1px solid var(--line-2); }
.q li:first-child { border-top: 0; }
.q a.qi, .q .qi { display: flex; align-items: center; gap: 14px; padding: 14px 24px; color: var(--ink); text-decoration: none !important; font-weight: inherit; }
.q a.qi:hover { background: #FAF9FD; }
.qi .qi-main { flex: 1; min-width: 0; }
.qi .qi-t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qi .qi-s { font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qi .qi-r { text-align: right; flex: none; font-size: 13px; color: var(--text-3); }
.empty { padding: 36px 24px; text-align: center; color: var(--text-3); }
.empty b { display: block; color: var(--ink); font-family: var(--fd); font-size: 17px; margin-bottom: 4px; }

/* ---------- avatar ---------- */
.av { width: 36px; height: 36px; border-radius: 50%; background: var(--violet-t); color: var(--violet); display: inline-grid; place-items: center; font-weight: 800; font-size: 12.5px; flex: none; }
.av.lime { background: var(--lime); color: var(--ink); }
.av.ink { background: var(--ink); color: var(--lime); }
.av.lg { width: 56px; height: 56px; font-size: 18px; }
.av.sm { width: 28px; height: 28px; font-size: 11px; }

/* ---------- badges & chips ---------- */
.b { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: var(--grey-t); color: var(--grey); }
.b.violet { background: var(--violet-t); color: var(--violet); }
.b.ink { background: var(--ink); color: #fff; }
.b.lime { background: var(--lime); color: var(--ink); }
.b.green { background: var(--green-t); color: var(--green); }
.b.amber { background: var(--amber-t); color: var(--amber); }
.b.red { background: var(--red-t); color: var(--red); }
.b.grey { background: var(--grey-t); color: var(--grey); }
.b.out { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); }
.chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; background: var(--paper); font-size: 13px; font-weight: 700; color: var(--violet); margin: 0 6px 6px 0; }
.dotlbl { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.dotlbl::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 0; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 700; font-size: 14.5px; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: #fff; }
.btn-primary { background: var(--violet); color: #fff; box-shadow: none; }
.btn-primary:hover { background: var(--violet-d); }
.btn-lime { background: var(--lime); color: var(--ink); box-shadow: none; }
.btn-lime:hover { background: var(--lime-d); }
.btn-ink { background: var(--ink); color: #fff; box-shadow: none; }
.btn-ink:hover { background: var(--ink-2); }
.btn-ghost { box-shadow: none; }
.btn-ghost:hover { background: rgba(27,22,49,.06); }
.btn-danger { color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn-xs { min-height: 28px; padding: 0 11px; font-size: 12.5px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.card.ink .btn:not(.btn-lime):not(.btn-primary) { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }
.card.ink .btn:not(.btn-lime):not(.btn-primary):hover { background: var(--ink-2); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .lbl { font-size: 13px; font-weight: 700; color: var(--ink); }
.field .hint { font-size: 12.5px; color: var(--text-3); font-weight: 500; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=url], input[type=date], input[type=datetime-local], input[type=time], input[type=search], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--r-sm); border: 1.5px solid var(--soft); background: var(--paper); font: inherit; color: var(--ink); }
textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(74,47,214,.18); background: #fff; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: flex; align-items: center; min-height: 54px; padding: 10px 16px 10px 46px; border-radius: 16px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; cursor: pointer; position: relative; }
.opt span::before { content: ""; position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; border: 2px solid #B9B4CC; background: #fff; }
.opt input:checked + span { background: var(--ink); color: #fff; box-shadow: none; }
.opt input:checked + span::before { border: 5px solid var(--ink); background: var(--lime); box-shadow: 0 0 0 2px var(--lime); }
.opt input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: 2px; }
.opts.pills { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.opts.pills .opt span { padding: 10px 14px; justify-content: center; border-radius: 999px; min-height: 44px; }
.opts.pills .opt span::before { display: none; }
.stars-in { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 6px; }
.stars-in input { position: absolute; opacity: 0; }
.stars-in label { font-size: 34px; line-height: 1; color: var(--soft); cursor: pointer; }
.stars-in input:checked ~ label, .stars-in label:hover, .stars-in label:hover ~ label { color: var(--violet); }
.stars { color: var(--violet); letter-spacing: 1px; }

/* ---------- toolbar / tabs ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; }
.tab { padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--text-2); text-decoration: none !important; border: 0; background: none; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.tab:hover { background: #fff; color: var(--ink); }
.tab.on { background: var(--ink); color: #fff; }
.tab .n { font-size: 12px; opacity: .7; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.tools input, .tools select { width: auto; min-height: 40px; border-radius: 999px; background: #fff; padding: 6px 14px; font-size: 14px; }
.tools input[type=search] { min-width: 240px; }

/* ---------- tables ---------- */
.tw { overflow-x: auto; }
.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 800; padding: 14px 16px 10px; white-space: nowrap; }
.t th:first-child, .t td:first-child { padding-left: 24px; }
.t th:last-child, .t td:last-child { padding-right: 24px; }
.t td { padding: 14px 16px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.t tr.go { cursor: pointer; }
.t tr.go:hover td { background: #FAF9FD; }
.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.t .tt { font-weight: 700; color: var(--ink); }
.t .ts { font-size: 13px; color: var(--text-3); }
.clip { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--text-3); }

/* ---------- definition list ---------- */
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; margin: 0; font-size: 14.5px; }
.dl dt { color: var(--text-3); font-weight: 600; font-size: 13px; padding-top: 1px; }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- callouts ---------- */
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-sm); font-size: 14px; }
.note .ic { margin-top: 2px; }
.note.violet { background: var(--violet-t); }
.note.violet .ic { color: var(--violet); }
.note.lime { background: var(--lime-t); }
.note.red { background: var(--red-t); color: #6B1E17; }
.note.amber { background: var(--amber-t); color: #5C3A00; }
.note.green { background: var(--green-t); color: #1D4D27; }
.voice { font-family: var(--fd); font-weight: 600; font-size: 19px; line-height: 1.45; letter-spacing: -.01em; color: var(--ink); background: var(--paper); border-left: 4px solid var(--lime); border-radius: 0 16px 16px 0; padding: 16px 20px; white-space: pre-wrap; }

/* ---------- next-step banner ---------- */
.next { display: flex; gap: 16px; align-items: center; background: var(--ink); color: var(--soft); border-radius: var(--r); padding: 18px 22px; margin-bottom: 24px; }
.next .n-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--lime); color: var(--ink); display: grid; place-items: center; flex: none; }
.next .n-t { color: #fff; font-weight: 700; font-family: var(--fd); font-size: 17px; }
.next .n-s { font-size: 13.5px; }
.next .btn { margin-left: auto; }

/* ---------- timeline ---------- */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 16px 26px; }
.tl li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--soft); }
.tl li::after { content: ""; position: absolute; left: 8px; top: 20px; bottom: 0; width: 2px; background: var(--line-2); }
.tl li:last-child::after { display: none; }
.tl li.done::before { background: var(--violet); }
.tl li.now::before { background: var(--lime); box-shadow: 0 0 0 3px var(--ink); }
.tl .tl-t { font-weight: 700; font-size: 14px; }
.tl .tl-s { font-size: 12.5px; color: var(--text-3); }
.tl .tl-b { margin-top: 6px; background: var(--paper); border-radius: 12px; padding: 10px 14px; font-size: 14px; white-space: pre-wrap; }
.tl .tl-b.mine { background: var(--violet-t); }

/* ---------- stepper ---------- */
.steps { display: flex; margin: 6px 0 4px; }
.steps .st { flex: 1; position: relative; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--text-3); }
.steps .st::before { content: ""; position: absolute; top: 8px; left: -50%; right: 50%; height: 3px; background: var(--line); }
.steps .st:first-child::before { display: none; }
.steps .st i { position: relative; z-index: 1; display: block; width: 19px; height: 19px; margin: 0 auto 6px; border-radius: 50%; background: #fff; border: 3px solid var(--line); }
.steps .st.done i { background: var(--violet); border-color: var(--violet); }
.steps .st.done::before, .steps .st.cur::before { background: var(--violet); }
.steps .st.cur i { background: var(--lime); border: 4px solid var(--ink); }
.steps .st.cur { color: var(--ink); }

/* ---------- match ---------- */
.mrow { display: flex; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-2); }
.mrow:first-child { border-top: 0; }
.score { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; position: relative; background: conic-gradient(var(--violet) calc(var(--s) * 1%), var(--line-2) 0); flex: none; }
.score::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.score b { position: relative; }

/* ---------- board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.lane { background: var(--soft-2); border-radius: var(--r); padding: 12px; min-height: 320px; }
.lane-h { display: flex; justify-content: space-between; padding: 4px 6px 12px; font-weight: 800; font-size: 13px; }
.lane-h span:last-child { color: var(--text-3); }
.lc { display: block; background: #fff; border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 8px; color: var(--ink); text-decoration: none !important; font-weight: inherit; }
.lc:hover { box-shadow: inset 0 0 0 2px var(--violet); }
.lc .lc-t { font-weight: 700; }
.lc .lc-s { font-size: 12.5px; color: var(--text-3); }

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .grid { stroke: var(--line-2); stroke-width: 1; }
.chart .lbl { font-size: 11px; fill: var(--text-3); font-family: var(--fb); }
.chart .val { font-size: 11px; fill: var(--text-2); font-weight: 700; font-family: var(--fb); }
.chart .bar { fill: var(--violet); }
.chart .bar.alt { fill: var(--ink); }
.chart .bar:hover { fill: var(--violet-d); }
.chart .line { fill: none; stroke: var(--violet); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--violet-t); }
.chart .pt { fill: #fff; stroke: var(--violet); stroke-width: 2; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hb { display: grid; grid-template-columns: 150px 1fr 60px; gap: 12px; align-items: center; font-size: 13.5px; }
.hb .hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-weight: 600; }
.hb .hb-t { height: 10px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.hb .hb-f { height: 100%; background: var(--violet); border-radius: 999px; }
.hb .hb-f.ink { background: var(--ink); }
.hb .hb-v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.funnel .hb { grid-template-columns: 190px 1fr 100px; }
.funnel .hb-t { height: 26px; border-radius: 8px; }
.funnel .hb-f { border-radius: 8px; background: linear-gradient(90deg, var(--ink), var(--violet)); }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-2); font-weight: 600; margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(27,22,49,.45); z-index: 80; display: grid; place-items: center; padding: 20px; }
.modal { background: #fff; border-radius: 24px; width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow: auto; box-shadow: var(--shadow-pop); }
.modal.wide { max-width: 760px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px 0; }
.modal-b { padding: 18px 24px 24px; }
#toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-pop); display: flex; gap: 10px; align-items: center; animation: tin .2s ease-out; }
.toast .ic { color: var(--lime); }
.toast-err { background: #7A1F1F; max-width: min(560px, calc(100vw - 32px)); border-radius: 16px; }
.toast-err .ic { color: #FFD2D2; }
body.busy { cursor: progress; }
.btn[aria-busy="true"] { opacity: .6; pointer-events: none; }
.boot-err { max-width: 520px; margin: 18vh auto; padding: 28px; background: #fff; border-radius: var(--r); text-align: center; }
.alert-ok { background: var(--lime-t, #F2FAD2); color: var(--ink); padding: 12px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 13px; margin: 6px 0; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.int-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 16px 0; border-top: 1px solid var(--line-2); align-items: start; }
.int-row:first-child { border-top: 0; }
.int-hooks { grid-column: 1 / -1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--text-2); background: var(--paper); border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere; }
.post-card { border-top: 1px solid var(--line-2); padding: 14px 0; }
.post-card:first-child { border-top: 0; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

/* ---------- module matrix ---------- */
.matrix th, .matrix td { text-align: center; padding: 10px 8px !important; }
.matrix th:first-child, .matrix td:first-child { text-align: left; padding-left: 24px !important; }
.matrix th.rot { font-size: 11px; letter-spacing: .02em; text-transform: none; max-width: 90px; white-space: normal; line-height: 1.2; vertical-align: bottom; }
.matrix input { width: 18px; height: 18px; accent-color: var(--violet); cursor: pointer; }
.matrix tr.grp td { background: var(--paper); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); text-align: left; }
.toggle { position: relative; width: 42px; height: 24px; display: inline-block; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle i { position: absolute; inset: 0; border-radius: 999px; background: var(--soft); cursor: pointer; transition: background .15s; }
.toggle i::before { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked + i { background: var(--violet); }
.toggle input:checked + i::before { transform: translateX(18px); }
.toggle input:disabled + i { opacity: .5; cursor: not-allowed; }

/* ---------- invoice ---------- */
.invoice { background: #fff; border-radius: var(--r); padding: 40px; max-width: 820px; }
.invoice table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.invoice th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); border-bottom: 1.5px solid var(--ink); padding: 8px 0; }
.invoice td { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.invoice .tot td { border: 0; font-weight: 800; font-size: 18px; }

/* ---------- login ---------- */
body.auth { background: var(--paper); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-brand { background: var(--ink); color: var(--soft); padding: 44px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.stair { display: flex; flex-direction: column; font-family: var(--fd); font-weight: 800; font-size: clamp(56px, 6.6vw, 104px); line-height: .92; letter-spacing: -.045em; color: #fff; margin: 0; }
.stair span:nth-child(2) { padding-left: .42em; } .stair span:nth-child(3) { padding-left: .84em; }
.stair span:nth-child(4) { padding-left: 1.26em; color: var(--lime); }
.auth-lead { font-size: 17px; max-width: 460px; margin-top: 28px; color: var(--soft); }
.auth-roles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.auth-roles li { padding: 6px 12px; border-radius: 999px; background: var(--ink-2); color: var(--soft); font-size: 13px; font-weight: 600; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth-form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
.auth-form h2 { font-size: 36px; font-weight: 800; }
.auth-form .muted { margin-top: -8px; }
.auth-foot { font-size: 14px; color: var(--text-3); text-align: center; margin-top: 6px; }
.auth-mobile-mark { display: none; }
.alert { padding: 12px 16px; border-radius: var(--r-sm); font-weight: 600; font-size: 14px; }
.alert-error { background: var(--red-t); color: var(--red); }

/* ---------- learner portal (top nav) ---------- */
.portal-top { position: sticky; top: 0; z-index: 30; background: rgba(244,243,248,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.portal-top-in { max-width: 1120px; margin: 0 auto; height: 72px; display: flex; align-items: center; gap: 24px; padding: 0 24px; }
.portal-nav { display: flex; gap: 4px; flex: 1; }
.portal-nav a { padding: 9px 16px; border-radius: 999px; color: var(--text-2); font-weight: 700; text-decoration: none !important; }
.portal-nav a:hover { background: #fff; color: var(--ink); }
.portal-nav a.on { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.portal-main { max-width: 1120px; margin: 0 auto; padding: 36px 24px 110px; }
.hello { font-size: clamp(36px, 4.4vw, 56px); font-weight: 800; letter-spacing: -.04em; line-height: .98; }
.session-hero { background: var(--ink); color: var(--soft); border-radius: 28px; padding: 26px; display: grid; grid-template-columns: auto 1fr; gap: 22px; position: relative; overflow: hidden; }
.session-hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(212,243,107,.25), transparent 70%); pointer-events: none; }
.session-hero h2 { color: #fff; font-size: 24px; font-weight: 800; margin: 6px 0; }
.session-hero .eyebrow { color: var(--lime); }
.date-tile { width: 76px; background: #fff; border-radius: 18px; text-align: center; padding: 10px 0; color: var(--ink); align-self: start; position: relative; z-index: 1; }
.date-tile .m { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--violet); }
.date-tile .d { font-family: var(--fd); font-weight: 800; font-size: 32px; line-height: 1; margin: 2px 0; }
.date-tile .w { font-size: 11.5px; font-weight: 700; color: var(--text-3); }
.prep { list-style: none; padding: 0; margin: 12px 0 0; font-size: 14px; }
.prep li { padding-left: 22px; position: relative; margin-bottom: 4px; }
.prep li::before { content: "✓"; position: absolute; left: 0; color: var(--lime); font-weight: 800; }
.mobile-tabs { display: none; }
.pay-box { text-align: center; padding: 10px 0; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--line-2); border-top-color: var(--violet); animation: spin .8s linear infinite; margin: 10px auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- public form ---------- */
.public-top { padding: 26px 24px 0; text-align: center; }
.public-main { max-width: 820px; margin: 0 auto; padding: 24px 20px 64px; }
.composer { background: #fff; border-radius: 28px; padding: clamp(22px, 3vw, 40px); box-shadow: 0 1px 0 var(--line), 0 30px 60px -30px rgba(27,22,49,.25); }
.step-h { display: flex; gap: 12px; align-items: baseline; margin: 26px 0 14px; }
.step-h:first-child { margin-top: 0; }
.step-h .num { font-family: var(--fd); font-weight: 800; color: var(--violet); font-size: 20px; }
.hero-t { font-size: clamp(36px, 5vw, 60px); font-weight: 800; letter-spacing: -.04em; line-height: .98; text-align: center; margin: 14px 0 12px; }
.hero-s { text-align: center; color: var(--text-2); font-size: 17px; max-width: 580px; margin: 0 auto 28px; }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 70; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(27,22,49,.4); z-index: 60; }
  .only-m { display: inline-grid !important; }
  .only-d { display: none !important; }
  .top { padding: 0 16px; }
  .content { padding: 22px 16px 60px; }
  .switch-bar { padding: 8px 16px; }
  .split-wide, .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .me .me-txt { display: none; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-mobile-mark { display: inline-flex; }
  .portal-nav { display: none; }
  .portal-top-in { height: 64px; padding: 0 16px; }
  .portal-main { padding: 22px 16px 110px; }
  .mobile-tabs { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .mobile-tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--text-3); padding: 6px 0; border-radius: 12px; text-decoration: none !important; }
  .mobile-tabs a.on { background: var(--ink); color: #fff; }
  .session-hero { grid-template-columns: 1fr; }
  .date-tile { width: auto; display: flex; gap: 10px; align-items: baseline; justify-content: center; padding: 8px; }
}
@media (max-width: 640px) {
  h1 { font-size: 26px; }
  .kpis, .g4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi { padding: 16px; }
  .kpi .k-v { font-size: 26px; }
  .form { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 10px; }
  .search { display: none; }
  .hb { grid-template-columns: 100px 1fr 48px; }
  .funnel .hb { grid-template-columns: 110px 1fr 70px; }
  .q a.qi, .q .qi { padding: 12px 16px; }
  .card-h { padding: 18px 18px 0; } .card-b { padding: 14px 18px 18px; }
  .t th:first-child, .t td:first-child { padding-left: 16px; }
  .steps .st span { display: none; }
  .steps .st.cur span { display: block; position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; }
  .steps { margin-bottom: 20px; }
  .invoice { padding: 22px; }
  .next { flex-wrap: wrap; }
  .next .btn { margin-left: 0; }
}
@media print {
  .side, .top, .switch-bar, .no-print { display: none !important; }
  .shell { display: block; } body { background: #fff; } .content { padding: 0; }
}

/* admin assistant module */
.asst-frame { border-radius: 18px; overflow: hidden; background: #F6F5FC; box-shadow: inset 0 0 0 1px var(--line, rgba(27,22,49,.1)); }
.asst-frame iframe { display: block; width: 100%; height: calc(100vh - 230px); min-height: 560px; border: 0; }
@media (max-width: 760px) { .asst-frame { border-radius: 0; margin: 0 -16px; } .asst-frame iframe { height: calc(100vh - 170px); } }
