/* Advargo Partner Portal — white-label */
:root {
  --ink: #141634;
  --indigo: #3E4097;
  --indigo-deep: #262A6B;
  --mist: #EDEFF7;
  --mist-2: #F7F8FC;
  --paper: #FFFFFF;
  --signal: #FFC642;
  --muted: #5C5F7E;
  --line: #DDE0EE;
  --field: #C9CCE0;
  --ok: #1F8A5B;
  --warn: #B8541A;
  --err: #B42318;
  --brand: #3E4097;
  --on-brand: #FFFFFF;
  --display: 'Figtree', system-ui, sans-serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --r: 12px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--body); color: var(--ink); background: var(--mist-2); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
a:hover { color: var(--indigo-deep); }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.3px; }
h1 { font-weight: 800; font-size: clamp(26px, 3vw, 34px); }
h2 { font-weight: 700; font-size: 22px; }
h3 { font-weight: 700; font-size: 17px; }
p { margin: 0; }
img { max-width: 100%; }
.mono { font-family: var(--mono); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons & fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent; font: 700 15px var(--display); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { filter: brightness(0.92); color: var(--on-brand); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--field); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-outline { background: var(--paper); color: var(--brand); border-color: var(--brand); }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.field input, .field select, .field textarea {
  min-height: 46px; border: 1px solid var(--field); border-radius: 8px; padding: 10px 14px;
  font: 400 15px var(--body); color: var(--ink); background: var(--paper); width: 100%;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input[type=color] { padding: 4px; width: 64px; }
.field input[type=file] { padding: 9px 10px; }
.field input:focus, .field select:focus, .field textarea:focus, .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.field .hint { font-weight: 400; font-size: 13px; color: var(--muted); }
.field .err, .err-text { font-weight: 500; font-size: 13px; color: var(--err); }
.field.has-err input, .field.has-err select { border-color: var(--err); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; }
.input-group { display: flex; align-items: stretch; }
.input-group input { border-radius: 8px 0 0 8px; }
.input-group span { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--field); border-left: 0; border-radius: 0 8px 8px 0; background: var(--mist-2); font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; border: 1px solid; }
.alert-ok { background: #E3F4EC; border-color: #B6E0CB; color: #145C3D; }
.alert-warn { background: #FFF4DC; border-color: #F4D58A; color: #6B4A00; }
.alert-error { background: #FDECEA; border-color: #F5C2BC; color: #8A1C12; }

/* ---------- Cards, tables, chips ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); background: var(--mist-2); padding: 12px 20px; }
.tbl td { padding: 14px 20px; border-top: 1px solid var(--mist); vertical-align: middle; }
.tbl td.strong { font-weight: 600; }
.tbl tr.link-row:hover td { background: var(--mist-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--mist); color: #3A3D5C; white-space: nowrap; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.kpi .v { font: 800 36px var(--display); line-height: 1.1; }
.pipe { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: var(--mist); }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: #3A3D5C; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.empty { padding: 32px 20px; text-align: center; color: var(--muted); }
.pager { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); }

/* ---------- Top bar (plain pages) ---------- */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 4vw, 56px); border-bottom: 1px solid var(--line); background: var(--paper); }
.wordmark { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.wordmark b { font: 800 26px var(--display); letter-spacing: -0.5px; }
.wordmark .tag { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; padding: 4px 8px; border: 1px solid var(--indigo); color: var(--indigo); border-radius: 4px; }
.wordmark img { max-height: 40px; width: auto; }
.topnav { display: flex; flex-wrap: wrap; gap: 24px; font-size: 15px; }
.topnav a { text-decoration: none; }

/* ---------- Sign-in split ---------- */
.split { display: flex; flex-wrap: wrap; flex: 1; align-items: stretch; }
.split-dark { flex: 1 1 520px; background: var(--ink); color: #FFF; padding: clamp(32px, 5vw, 72px) clamp(16px, 5vw, 72px); display: flex; flex-direction: column; gap: 40px; }
.split-dark.branded { background: var(--brand); color: var(--on-brand); }
.split-dark .kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 2px; color: var(--signal); }
.split-dark.branded .kicker { color: inherit; opacity: .8; }
.split-dark h1 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -1px; max-width: 560px; }
.split-dark .lede { font-size: 17px; line-height: 1.6; color: #C9CBE4; max-width: 520px; }
.split-dark.branded .lede { color: inherit; opacity: .85; }
.track { list-style: none; margin: 0; padding: 0; max-width: 460px; }
.track li { display: flex; gap: 16px; }
.track .rail { display: flex; flex-direction: column; align-items: center; width: 20px; }
.track .node { width: 14px; height: 14px; border-radius: 50%; margin-top: 4px; border: 2px solid #6A6DA6; }
.track .node.done { background: var(--signal); border-color: var(--signal); }
.track .node.now { background: var(--ink); border: 3px solid var(--signal); }
.track .line { flex: 1; width: 2px; min-height: 28px; background: #34376E; }
.track .line.done { background: var(--signal); }
.track .txt { padding-bottom: 18px; display: flex; flex-direction: column; gap: 2px; }
.track .txt b { font: 600 16px var(--display); }
.track .txt span { font-size: 13px; color: #A9ACCF; }
.split-dark.branded .track .node { border-color: currentColor; opacity: .7; }
.split-dark.branded .track .line { background: currentColor; opacity: .3; }
.split-dark.branded .track .txt span { color: inherit; opacity: .75; }
.split-form { flex: 1 1 440px; display: flex; align-items: center; justify-content: center; padding: clamp(32px, 5vw, 72px) 16px; }
.auth-card { width: 100%; max-width: 440px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 32px; display: flex; flex-direction: column; gap: 22px; }
.auth-card.wide { max-width: 640px; }
.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--mist); border-radius: 10px; }
.tabs a { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 8px; font: 600 15px var(--display); text-decoration: none; color: var(--muted); }
.tabs a.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(20,22,52,.12); }
.foot-note { border-top: 1px solid var(--line); padding-top: 18px; font-size: 14px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 20px clamp(16px, 4vw, 56px); font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); background: var(--paper); }

/* ---------- Agent shell ---------- */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side { flex: 1 1 240px; max-width: 100%; background: var(--ink); color: #FFF; padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; }
.side .who { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.side .badge { width: 40px; height: 40px; border-radius: 10px; background: var(--signal); color: var(--ink); display: flex; align-items: center; justify-content: center; font: 800 15px var(--display); overflow: hidden; flex: none; }
.side .badge img { width: 100%; height: 100%; object-fit: contain; background: #FFF; }
.side .who b { font: 700 16px var(--display); display: block; }
.side .who span { font-size: 12px; color: #A9ACCF; }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side nav a { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 12px; border-radius: 8px; text-decoration: none; font-size: 15px; color: #C9CBE4; }
.side nav a:hover { background: #22255A; color: #FFF; }
.side nav a.on { background: #2C2F66; color: #FFF; font-weight: 600; }
.side .bottom { margin-top: auto; padding: 0 8px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.side .bottom a { color: #C9CBE4; }
.main { flex: 999 1 640px; min-width: 0; padding: clamp(20px, 3vw, 40px); display: flex; flex-direction: column; gap: 28px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.addr { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--mist-2); border-radius: 8px; flex-wrap: wrap; }
.addr .mono { font-size: 14px; word-break: break-all; }
.state-live { font-size: 13px; font-weight: 600; color: var(--ok); }
.state-wait { font-size: 13px; font-weight: 600; color: var(--warn); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.money { font: 800 24px var(--display); }
details.drawer > summary { list-style: none; cursor: pointer; }
details.drawer > summary::-webkit-details-marker { display: none; }

/* ---------- Student shell (agent-branded) ---------- */
.s-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 16px clamp(16px, 4vw, 56px); background: var(--brand); color: var(--on-brand); }
.s-head .logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.s-head .logo .mark { width: 40px; height: 40px; border-radius: 50%; background: #FFF; color: var(--brand); display: flex; align-items: center; justify-content: center; font: 800 15px var(--display); overflow: hidden; flex: none; }
.s-head .logo .mark img { width: 100%; height: 100%; object-fit: contain; }
.s-head .logo b { font: 700 20px var(--display); }
.s-head nav { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; font-size: 15px; }
.s-head nav a { color: inherit; text-decoration: none; }
.s-head nav a:hover { text-decoration: underline; color: inherit; }
.s-head .avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font: 600 13px var(--display); }
.s-main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: clamp(20px, 3vw, 40px) 16px; display: flex; flex-direction: column; gap: 24px; }
.progress { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.progress .step { display: flex; flex-direction: column; gap: 8px; }
.progress .bar { height: 6px; border-radius: 3px; background: #E2E2DE; }
.progress .step.done .bar { background: var(--brand); }
.progress .step.now .bar { background: var(--brand); opacity: .5; }
.progress .step b { font: 600 15px var(--display); }
.progress .step span { font-size: 13px; color: var(--muted); }
.panes { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.panes > * { flex: 1 1 380px; min-width: 0; }
.doclist { list-style: none; margin: 0; padding: 0; }
.doclist li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #EFEFEC; }
.doclist .files { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.doclist .received { font-size: 13px; font-weight: 600; color: var(--ok); }
.upload-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.upload-form input[type=file] { font-size: 13px; max-width: 230px; color: var(--muted); }
input[type=file]::file-selector-button { font: 600 13px var(--display); border: 1px solid var(--field); background: var(--mist-2); color: var(--ink); border-radius: 6px; padding: 7px 10px; margin-right: 8px; cursor: pointer; }
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.bubble { max-width: 85%; border-radius: 12px; padding: 10px 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.bubble.them { align-self: flex-start; background: #F1F1EE; }
.bubble.me { align-self: flex-end; background: var(--brand); color: var(--on-brand); }
.bubble .meta { display: block; font-size: 11px; opacity: .75; margin-top: 4px; }

@media (max-width: 640px) {
  .auth-card { padding: 24px 18px; }
  .side { flex-basis: 100%; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
}

/* 1.0.6 — application tabs, application tags */
[hidden] { display: none !important; }
.apptabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.apptabs a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; font: 600 15px var(--display); color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.apptabs a:hover { color: var(--ink); }
.apptabs a[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand); }
.apptabs .n { font: 600 12px var(--body); background: var(--mist); color: #3A3D5C; border-radius: 999px; padding: 1px 8px; }
.ref-tag { font: 500 12px var(--mono); background: var(--mist); color: #3A3D5C; border-radius: 4px; padding: 1px 6px; text-decoration: none; white-space: nowrap; }
a.ref-tag:hover { background: var(--line); }

/* 1.0.7 — student profile */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 560px) { .form-grid .span-2 { grid-column: auto; } }
.rep-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--mist-2); }
.meter { width: 160px; height: 8px; border-radius: 999px; background: var(--mist); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.save-bar { position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 -4px 16px rgba(20,22,52,.06); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 16px; margin: 0; }
.facts div { display: flex; flex-direction: column; gap: 2px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

/* 1.0.8 — enquiries */
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; }
.checks .check { padding: 6px 12px; border: 1px solid var(--field); border-radius: 999px; background: var(--paper); font-size: 14px; }
.checks .check:has(input:checked) { border-color: var(--brand); background: var(--mist); }
.check input { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; }
.check label { cursor: pointer; }
.callout { border-left: 4px solid var(--brand); background: var(--mist-2); padding: 14px 16px; border-radius: 8px; white-space: pre-line; }

/* 1.0.8 — seven dashboard tiles fit one row on a laptop; linked tiles */
.kpis { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 12px; }
.kpi { padding: 18px; }
.kpi .v { font-size: 32px; }
a.kpi { color: inherit; text-decoration: none; transition: border-color .15s; }
a.kpi:hover { border-color: var(--brand); }

/* Sign out: always visible near the account name, highlighted */
.side .signout { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; margin: -12px 8px 0; padding: 0 14px; border-radius: 8px; background: var(--signal); color: var(--ink); font: 700 14px var(--display); text-decoration: none; }
.side .signout:hover { background: #FFD46E; }
.side .signout:focus-visible { outline: 2px solid #FFF; outline-offset: 2px; }
.s-head .signout-top { padding: 8px 14px; border-radius: 8px; background: var(--brand); color: var(--on-brand); font-weight: 700; text-decoration: none; }
@media (min-width: 641px) {
  .side { position: sticky; top: 0; align-self: flex-start; height: 100vh; overflow-y: auto; }
}

/* 1.1.0 — university rows with catalogue search */
.uni-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--mist-2); }
.uni-row .uni-hint { grid-column: 1 / -1; margin-top: -2px; }
.uni-row .uni-hint:empty { display: none; }
.uni-row.in-list [data-uni-name] { border-color: var(--ok); }
.cred-card { border-color: var(--ok); background: #F3FBF7; }

/* 1.1.1 — notification bar */
.notif-bar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: flex-end; margin: -8px 0 4px; pointer-events: none; }
.notif-bar > * { pointer-events: auto; }
.notif-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 600 14px var(--display); cursor: pointer; box-shadow: 0 2px 8px rgba(20,22,52,.06); }
.notif-btn:hover { border-color: var(--brand); }
.notif-btn.has { border-color: var(--brand); }
.notif-btn.has svg { color: var(--brand); }
.notif-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #D92D20; color: #FFF; font: 700 12px var(--body); display: inline-flex; align-items: center; justify-content: center; }
.notif-panel { position: absolute; top: 48px; right: 0; width: min(440px, calc(100vw - 32px)); max-height: min(70vh, 640px); display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 16px 40px rgba(20,22,52,.18); overflow: hidden; }
.notif-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.notif-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.notif-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid var(--line); transition: opacity .18s, transform .18s; }
.notif-item.gone { opacity: 0; transform: translateX(24px); }
.notif-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.notif-title { font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.35; }
.notif-title:hover { text-decoration: underline; }
.notif-body { margin: 0; font-size: 13px; color: #3A3D5C; white-space: pre-line; }
.notif-item form { flex: none; }
.notif-empty { margin: 0; padding: 28px 16px; text-align: center; }
.notif-foot { padding: 10px 16px; border-top: 1px solid var(--line); background: var(--mist-2); font-size: 13px; }

/* 1.2.0 — course finder */
.cf-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; font-weight: 400; }
.ref-tag.ok { background: rgba(31,138,91,.12); color: var(--ok); }
.ref-tag.gold { background: #FFF4E5; color: #9A5B00; }
.ref-tag.closed { opacity: .55; text-decoration: line-through; }

/* 1.2.0 — AI University Finder */
.ai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ai-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.ai-course { font: 700 16px var(--display); color: var(--ink); text-decoration: none; }
.ai-course:hover { text-decoration: underline; }
.ai-match { font: 800 22px var(--display); color: var(--brand); display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.ai-match small { font: 500 11px var(--body); color: var(--muted); }
.ai-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 4px 0; }
.ai-facts dt { font-size: 12px; color: var(--muted); }
.ai-facts dd { margin: 0; font-weight: 600; font-size: 14px; }
.ai-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.ai-chip.ok { background: rgba(31,138,91,.12); color: var(--ok); }
.ai-chip.mid { background: #FFF4E5; color: #9A5B00; }
.ai-chip.err { background: #FDECEA; color: var(--err); }
.ai-group { font: 700 20px var(--display); margin: 8px 0 0; padding-left: 12px; border-left: 4px solid var(--brand); }
.ai-group.ambitious { border-color: #B8541A; }
.ai-group.safe { border-color: var(--ok); }
@media print { .side, .notif-bar, .no-print, .page-head .btn, .page-head a.small { display: none !important; } .main { padding: 0; } .ai-card { break-inside: avoid; } }

/* 1.2.1 — student status chip + pop-up */
.status-chip { margin-top: 6px; border: 0; cursor: pointer; font-family: var(--body); }
.status-chip:hover { box-shadow: 0 0 0 2px var(--brand) inset; }
.status-pop { width: min(760px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: 0 24px 60px rgba(20,22,52,.25); }
.status-pop::backdrop { background: rgba(20,22,52,.45); }
.status-pop h3 { margin: 0; }
.status-pop .table-wrap { margin: 14px -20px -20px; }

/* Master mode (Perfex admin running every agency from one address) */
.side .master-box { display: flex; flex-direction: column; gap: 8px; margin: 0 8px; padding: 12px; border-radius: 10px; background: #22255A; border: 1px solid #3E4097; color: #FFF; }
.side .master-box .master-tag { align-self: flex-start; font: 800 11px var(--display); letter-spacing: .12em; padding: 2px 8px; border-radius: 999px; background: var(--signal); color: var(--ink); }
.side .master-box b { font: 700 15px var(--display); }
.side .master-box .field { gap: 4px; color: #C9CBE4; }
.side .master-box select { width: 100%; min-height: 40px; background: #FFF; color: var(--ink); }
.side .master-box a { color: #C9CBE4; font-size: 14px; text-decoration: none; padding: 6px 2px; }
.side .master-box a:hover, .side .master-box a.on { color: #FFF; text-decoration: underline; }
.shell.is-master .side .signout { margin-top: 0; }
.master-strip { background: #FFF6DB; border: 1px solid #F3D27A; color: var(--ink); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.side .master-out { margin: -18px 8px 0; text-align: center; color: #C9CBE4; font-size: 13px; text-decoration: underline; padding: 6px 0; }
.side .master-out:hover { color: #FFF; }
.master-login .kicker-pill { align-self: flex-start; font: 800 11px var(--display); letter-spacing: .12em; padding: 3px 10px; border-radius: 999px; background: var(--signal); color: var(--ink); }

/* Support tickets */
.tk-facts { display: flex; flex-wrap: wrap; gap: 18px 36px; }
.tk-facts > div { display: flex; flex-direction: column; gap: 4px; }
.tk-thread { max-height: 520px; }
.bubble .tk-file { display: block; margin-top: 6px; font-weight: 600; color: inherit; }
.tk-pri.high { color: #B8541A; }
.tk-pri.urgent { color: var(--err); }
.side nav a .nav-n { background: var(--signal); color: var(--ink); border-radius: 999px; font: 700 11px var(--display); padding: 2px 8px; }

/* Getting-started guide */
.guide { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.guide-toc { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; padding: 16px; }
.guide-toc b { margin-bottom: 6px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-size: 11px; }
.guide-toc a { padding: 6px 8px; border-radius: 6px; text-decoration: none; font-size: 14px; color: var(--ink); }
.guide-toc a:hover { background: var(--mist); }
.guide-body { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.guide-body section { scroll-margin-top: 16px; }
.guide-body h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.guide-body p, .guide-body li { max-width: 72ch; }
.guide-n { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font: 800 15px var(--display); flex: none; }
.guide-flow { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.guide-flow li { background: var(--mist-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.guide-flow li span { font: 800 13px var(--display); color: var(--brand); }
.guide-flow li small { color: var(--muted); }
.guide-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.guide-steps ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.guide-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.guide-tip { background: #FFF6DB; border-left: 3px solid var(--signal); padding: 10px 14px; border-radius: 6px; margin: 0; }
.guide-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.guide-filters div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.guide-filters span { font-size: 13px; color: var(--muted); }
.guide-stages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; border-left: 2px solid var(--line); margin-left: 6px; }
.guide-stages li { position: relative; padding: 6px 0 6px 20px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.guide-stages .dot { position: absolute; left: -7px; top: 12px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--paper); }
.guide-stages small { color: var(--muted); }
@media (max-width: 860px) { .guide { grid-template-columns: 1fr; } .guide-toc { position: static; flex-direction: row; flex-wrap: wrap; } .guide-toc b { width: 100%; } }

/* Welcome panel on the dashboard (first sign-in) */
.welcome-card { background: linear-gradient(135deg, var(--brand), #262A6B); color: #FFF; border: 0; }
.welcome-card h2 { font-size: 24px; color: #FFF; }
.welcome-card p { color: #E4E5F5; margin: 0; max-width: 70ch; }
.welcome-card .guide-flow li { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.welcome-card .guide-flow li span { color: var(--signal); }
.welcome-card .guide-flow li small { color: #C9CBE4; }
.welcome-card .btn-ghost { background: transparent; color: #FFF; border-color: rgba(255,255,255,.5); }
.welcome-card .btn-primary { background: var(--signal); color: var(--ink); }

/* Bulk upload + sorting */
.doc-shared { background: var(--mist-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.bulk-drop { display: flex; flex-direction: column; gap: 10px; }
.bulk-zone { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; border: 2px dashed var(--field); border-radius: 12px; padding: 18px; cursor: pointer; background: var(--paper); }
.bulk-zone.over { border-color: var(--brand); background: var(--mist); }
.bulk-zone input[type=file] { margin-top: 6px; }
.bulk-picked { color: var(--brand); font-weight: 600; }
.bulk-sort { background: #FFF6DB; border: 1px solid #F3D27A; border-radius: 12px; padding: 14px; }
.sort-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid #F3D27A; }
.sort-row:first-of-type { border-top: 0; }

/* Next step after documents + partner ZIP download */
.next-step { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; border: 2px solid var(--brand); background: var(--mist); border-radius: 12px; padding: 14px 16px; }
.next-step.done { border: 1px solid var(--line); background: var(--mist-2); }
.next-n { background: var(--brand); color: var(--on-brand); border-radius: 999px; padding: 4px 12px; font: 800 12px var(--display); letter-spacing: .06em; text-transform: uppercase; }
.zip-bar { gap: 8px; align-items: center; }
.zip-pick { width: 16px; height: 16px; vertical-align: middle; margin-right: 4px; }

/* Student information card */
.facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px 24px; }
.facts-grid .fact { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.facts-grid .fact b { font-weight: 600; overflow-wrap: anywhere; }
.facts-grid .fact.wide { grid-column: span 2; }
.edit-details { border-top: 1px solid var(--line); padding-top: 16px; }
.cred-card .facts { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cred-card .facts dd { overflow-wrap: anywhere; min-width: 0; }
