/* NexGrad — shared styles for the Lead Desk and the Student Portal.
   Brand colours come from the logo: red #ED1432 and charcoal #303030.
   Change a colour once in :root and it updates everywhere. */

/* Archivo is a variable font: one file per character set covers every weight. */
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/archivo-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/archivo-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* NexGrad brand theme — logo red #ED1432 + charcoal #303030 on a soft neutral ground, and separate
     semantic colours so "hot", "overdue" and "primary action" no longer
     all share the same red. */
  --color-bg: #f6f6f6;
  --color-surface: #ffffff;
  --color-text: #303030;
  --color-accent: #ed1432;
  --color-accent-2: #303030;
  --color-divider: #e4e4e4;

  --color-neutral-100: #f3f3f3;
  --color-neutral-200: #e7e7e7;
  --color-neutral-300: #d2d2d2;
  --color-neutral-400: #ababab;
  --color-neutral-500: #8a8a8a;
  --color-neutral-600: #686868;
  --color-neutral-700: #5a5a5a;
  --color-neutral-800: #404040;
  --color-neutral-900: #303030;

  --color-accent-100: #fdeef0;
  --color-accent-200: #fbd6dc;
  --color-accent-300: #f6abb6;
  --color-accent-400: #f07d8e;
  --color-accent-500: #ee4a62;
  --color-accent-600: #d0102b;
  --color-accent-700: #b00d25;
  --color-accent-800: #8c0b1e;
  --color-accent-900: #5e0914;

  --color-accent-2-100: #f3f3f3;
  --color-accent-2-200: #e7e7e7;
  --color-accent-2-800: #303030;

  /* Semantic */
  --color-danger: #d0102b;
  --color-danger-bg: #fdeef0;
  --color-danger-text: #b00d25;
  --color-warn-bg: #fdf3e1;
  --color-warn-text: #87570a;
  --color-warn-line: #edcf94;
  --color-success-bg: #e6f4ec;
  --color-success-text: #256b43;
  --color-info-bg: #eaf1fb;
  --color-info-text: #2f5588;
  --color-info-line: #cddcf1;

  --font-heading: "Archivo", system-ui, sans-serif;
  --font-heading-weight: 700;
  --font-body: "Archivo", system-ui, sans-serif;

  --space-1: 4.0px;
  --space-2: 8.0px;
  --space-3: 12.0px;
  --space-4: 16.0px;
  --space-6: 24.0px;
  --space-8: 32.0px;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(48, 48, 48, 0.06);
  --shadow-md: 0 4px 12px rgba(48, 48, 48, 0.08);
  --shadow-lg: 0 12px 32px rgba(48, 48, 48, 0.14);
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--font-heading-weight); }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.55; font-weight: 400; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 var(--space-2);
}
h1 { font-size: 34px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }
h4 { font-size: 17px; }
h5 { font-size: 15px; }
h6 { font-size: 13px; }
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
.text-muted { color: var(--color-neutral-600); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent-400); outline-offset: 2px; }
::selection { background: var(--color-accent-200); }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-body); font-weight: 600;
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: 8px 14px; min-height: 36px;
  border-radius: var(--radius-md);
  transition: background .15s, border-color .15s, color .15s;
}
.btn svg { display: block; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:hover { background: var(--color-neutral-100); }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { background: var(--color-surface); border-color: var(--color-neutral-300); }
.btn-secondary:hover { background: var(--color-neutral-100); }
.btn-secondary:active { background: var(--color-neutral-200); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-2); }
.btn-ghost:hover { background: var(--color-accent-100); }
.btn-selected, .btn-selected:hover { background: var(--color-accent-100); color: var(--color-accent-800); }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-block { width: 100%; margin-top: var(--space-2); }

/* — forms — */
.field > label {
  display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px;
  color: var(--color-neutral-800);
}
.input {
  width: 100%; min-height: 38px; padding: 7px 11px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-neutral-300); border-radius: var(--radius-md);
}
.input:hover { border-color: var(--color-neutral-400); }
.input:focus-visible { border-color: var(--color-accent); outline: 3px solid var(--color-accent-200); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }
.seg {
  display: inline-flex; overflow: hidden; gap: 2px; padding: 3px;
  background: var(--color-neutral-100);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.seg > .btn { border: 0 !important; min-height: 30px; border-radius: var(--radius-sm); font-weight: 500; color: var(--color-neutral-800); }
.seg > .btn:hover { background: var(--color-neutral-200); }
.seg > .btn-selected, .seg > .btn-selected:hover { background: var(--color-surface); color: var(--color-accent-800); font-weight: 600; box-shadow: var(--shadow-sm); }

/* — cards — */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface);
  border: 1px solid var(--color-divider) !important;
}
.card:hover { border-color: var(--color-accent-300) !important; }
.card-kicker { font-size: 12px; font-weight: 600; color: var(--color-success-text); }
.card-title { font-family: var(--font-heading); font-weight: 700; font-size: 16px; line-height: 1.25; }
.card-body { margin: 0; font-size: 13px; opacity: 0.8; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--color-neutral-600); }
.panel {
  background: var(--color-surface); border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm);
}

/* — tags / status pills — */
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  line-height: 1.3; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
/* Lead temperature: Hot = green, Warm = yellow, Cold = blue.
   Used by the tags and by the Hot / Warm / Cold choice buttons. */
:root {
  --temp-hot-bg: #e3f5e9;  --temp-hot-text: #1e7040;  --temp-hot-line: #9fd8b4;  --temp-hot-dot: #2e9d5b;
  --temp-warm-bg: #fff6cc; --temp-warm-text: #7a5c00; --temp-warm-line: #ecd57a; --temp-warm-dot: #d9a800;
  --temp-cold-bg: #e6effc; --temp-cold-text: #28589c; --temp-cold-line: #a9c4ec; --temp-cold-dot: #3b72c4;
}
.tag-hot { background: var(--temp-hot-bg); color: var(--temp-hot-text); }
.tag-warm { background: var(--temp-warm-bg); color: var(--temp-warm-text); }
.tag-cold { background: var(--temp-cold-bg); color: var(--temp-cold-text); }

/* Dashboard "Lead temperature" rows, tinted in each temperature's colour */
.temp-rows { display: flex; flex-direction: column; gap: 10px; }
.temp-row { display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; font: inherit; color: var(--color-text); cursor: pointer;
  padding: 12px 14px; border: 1px solid; border-left-width: 4px; border-radius: var(--radius-md); transition: filter .15s; }
.temp-row:hover { filter: brightness(0.98); }
.temp-row-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.temp-row-count { font-size: 13px; }
.temp-row-count b { font-size: 20px; margin-right: 2px; }
.temp-row-days { margin-left: auto; font-size: 12px; font-weight: 600; }
.temp-row-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); overflow: hidden; }
.temp-row-bar > span { display: block; height: 100%; border-radius: inherit; }
.temp-row-rule { font-size: 13px; color: var(--color-neutral-800); }
.temp-row-hot { background: var(--temp-hot-bg); border-color: var(--temp-hot-line); border-left-color: var(--temp-hot-dot); }
.temp-row-hot .temp-row-count b, .temp-row-hot .temp-row-days { color: var(--temp-hot-text); }
.temp-row-hot .temp-row-bar > span { background: var(--temp-hot-dot); }
.temp-row-warm { background: var(--temp-warm-bg); border-color: var(--temp-warm-line); border-left-color: var(--temp-warm-dot); }
.temp-row-warm .temp-row-count b, .temp-row-warm .temp-row-days { color: var(--temp-warm-text); }
.temp-row-warm .temp-row-bar > span { background: var(--temp-warm-dot); }
.temp-row-cold { background: var(--temp-cold-bg); border-color: var(--temp-cold-line); border-left-color: var(--temp-cold-dot); }
.temp-row-cold .temp-row-count b, .temp-row-cold .temp-row-days { color: var(--temp-cold-text); }
.temp-row-cold .temp-row-bar > span { background: var(--temp-cold-dot); }
.temp-row .tag { background: var(--color-surface); }

/* Hot / Warm / Cold buttons: coloured dot when not chosen, filled when chosen */
.seg > .temp-opt::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.seg > .temp-hot::before { background: var(--temp-hot-dot); }
.seg > .temp-warm::before { background: var(--temp-warm-dot); }
.seg > .temp-cold::before { background: var(--temp-cold-dot); }
.seg > .temp-hot.btn-selected, .seg > .temp-hot.btn-selected:hover { background: var(--temp-hot-bg); color: var(--temp-hot-text); box-shadow: inset 0 0 0 1px var(--temp-hot-line); }
.seg > .temp-warm.btn-selected, .seg > .temp-warm.btn-selected:hover { background: var(--temp-warm-bg); color: var(--temp-warm-text); box-shadow: inset 0 0 0 1px var(--temp-warm-line); }
.seg > .temp-cold.btn-selected, .seg > .temp-cold.btn-selected:hover { background: var(--temp-cold-bg); color: var(--temp-cold-text); box-shadow: inset 0 0 0 1px var(--temp-cold-line); }
/* Status colours: overdue = red, due soon = amber, info = blue */
.tag-danger { background: var(--color-danger-bg); color: var(--color-danger-text); }
.tag-warn { background: var(--color-warn-bg); color: var(--color-warn-text); }
.tag-info { background: var(--color-info-bg); color: var(--color-info-text); }
.tag-success { background: var(--color-success-bg); color: var(--color-success-text); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-700); }
.tag-outline { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-hot::before, .tag-danger::before, .tag-warm::before, .tag-warn::before, .tag-cold::before, .tag-info::before, .tag-success::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8;
}
.badge {
  display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 999px;
  font-size: 12px; font-weight: 600; text-align: center;
  background: var(--color-neutral-200); color: var(--color-neutral-800);
}
.badge-alert { background: var(--color-danger-bg); color: var(--color-danger-text); }

/* — navigation — */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface); border-bottom: 1px solid var(--color-divider);
}
.nav-brand { font-family: var(--font-heading); font-weight: 800; font-size: 18px; margin-right: auto; }
.nav-item {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  text-align: left; border: 0; border-radius: var(--radius-md);
  padding: 10px 12px; font-size: 14px; font-weight: 500; color: var(--color-neutral-800);
}
.nav-item:hover { background: var(--color-neutral-100); }
.nav-item.active { background: var(--color-accent-100); color: var(--color-accent-800); font-weight: 600; }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 12px; font-weight: 600;
  color: var(--color-neutral-600); background: var(--color-neutral-100);
  padding: 10px 12px; border-bottom: 1px solid var(--color-divider);
}
.table td { padding: 12px; border-bottom: 1px solid var(--color-divider); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--color-neutral-100); }

/* — alerts — */
.alert {
  display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
  padding: 12px 16px; border-radius: var(--radius-lg); border: 1px solid; font-size: 14px;
}
.alert-warn { background: var(--color-warn-bg); color: var(--color-warn-text); border-color: var(--color-warn-line); }
.alert-danger { background: var(--color-danger-bg); color: var(--color-danger-text); border-color: var(--color-accent-200); }

/* — dialog — */
.dialog-backdrop {
  position: fixed; inset: 0; display: grid; place-items: center; z-index: 60;
  padding: var(--space-4); background: rgba(48, 48, 48, 0.4);
}
.dialog {
  width: min(440px, 100%); display: flex; flex-direction: column; gap: var(--space-3);
  padding: 24px; border-radius: var(--radius-lg);
  background: var(--color-surface); box-shadow: var(--shadow-lg);
}
.dialog-title { font-family: var(--font-heading); font-weight: 700; font-size: 20px; }
.dialog-body { font-size: 14px; color: var(--color-neutral-800); }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }

/* — misc — */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.kpi { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: 13px; font-weight: 500; color: var(--color-neutral-600); }
.kpi-value { font-family: var(--font-heading); font-weight: 700; font-size: 28px; line-height: 1.2; }
.kpi-value.hot { color: var(--color-danger-text); }
.kpi-sub { font-size: 12px; color: var(--color-neutral-600); }
.bar { height: 10px; border-radius: 999px; overflow: hidden; background: var(--color-neutral-100); }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--color-accent-400); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--color-accent-100); color: var(--color-accent-800); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.toast { position: fixed; bottom: 24px; background: var(--color-neutral-900); color: #fff; padding: 12px 16px; font-size: 14px; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); max-width: min(420px, calc(100vw - 32px)); z-index: 70; }
.demo-bar {
  position: fixed; right: 16px; bottom: 16px; max-width: calc(100vw - 32px); z-index: 50;
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  background: var(--color-surface); border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg); padding: 6px; box-shadow: var(--shadow-md); font-size: 13px;
}
.demo-bar .btn { min-height: 30px; padding: 5px 10px; font-size: 13px; font-weight: 500; }
.demo-label { font-size: 11px; font-weight: 600; color: var(--color-neutral-500); padding: 0 6px 0 8px; }
.demo-sep { width: 1px; align-self: stretch; background: var(--color-divider); margin: 2px 4px; }
.brand-logo { width: 34px; height: 34px; flex: none; object-fit: contain; }
.brand { display: flex; align-items: center; gap: 10px; }

/* ── Shared helpers ─────────────────────────────────────────────── */
select.input { appearance: auto; }
.btn { white-space: nowrap; }
.muted { color: var(--color-neutral-600); }
.small { font-size: 12px; }
.wordmark { font-family: var(--font-heading); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; line-height: 1.1; }
.wordmark span { color: var(--color-accent); }
.rel-urgent { font-size: 12px; font-weight: 600; color: var(--color-danger-text); }
.rel { font-size: 12px; color: var(--color-neutral-600); }
.alert-info { background: var(--color-info-bg); color: var(--color-info-text); border-color: var(--color-info-line); }
.panel-flush { padding: 0; overflow: hidden; }
.panel-head { padding: 16px 20px 12px; }
.table-scroll { overflow-x: auto; }
.stat-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) 32px; align-items: center; gap: 12px; padding: 7px 0; font-size: 14px; }
.stat-row > b { text-align: right; }
.list-row { padding: 10px 0; border-top: 1px solid var(--color-divider); }
.clickable { cursor: pointer; }
[hidden] { display: none !important; }

/* ── Lead Desk ──────────────────────────────────────────────────── */
.ld-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.ld-side { background: var(--color-surface); border-right: 1px solid var(--color-divider); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.ld-side nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.ld-sources { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--color-divider); font-size: 12px; color: var(--color-neutral-600); display: flex; flex-direction: column; gap: 6px; }
.ld-live { display: flex; align-items: center; gap: 6px; color: var(--color-success-text); font-weight: 600; }
.ld-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ld-main { min-width: 0; display: flex; flex-direction: column; padding-bottom: 88px; }
.ld-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 18px 28px; background: var(--color-surface); border-bottom: 1px solid var(--color-divider); }
.ld-head h1 { font-size: 24px; margin: 0; }
.ld-user { display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid var(--color-divider); }
.ld-user-txt { font-size: 13px; line-height: 1.3; white-space: nowrap; }
.ld-content { padding: 24px 28px; display: flex; flex-direction: column; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: end; }
.board { display: grid; grid-template-columns: repeat(6, minmax(210px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.board-col { background: var(--color-neutral-100); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); display: flex; flex-direction: column; min-height: 300px; }
.board-col-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font-weight: 600; }
.board-col-body { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 8px; }
.board-card { text-align: left; font: inherit; cursor: pointer; gap: 6px; box-shadow: var(--shadow-sm); }
.fu-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(200px, 1.6fr) 120px auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--color-divider); }
.fu-actions { display: flex; gap: 8px; justify-content: flex-end; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(48, 48, 48, 0.35); z-index: 55; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--color-surface); box-shadow: var(--shadow-lg); overflow-y: auto; display: flex; flex-direction: column; z-index: 56; }
.drawer-head { padding: 18px 22px; border-bottom: 1px solid var(--color-divider); display: flex; align-items: start; gap: 12px; }
.drawer-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 20px; }
.drawer-section { border-top: 1px solid var(--color-divider); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.note { padding: 10px 0; border-bottom: 1px solid var(--color-divider); font-size: 13px; }
.ld-toast { left: 256px; }

@media (max-width: 820px) {
  .ld-shell { grid-template-columns: minmax(0, 1fr); }
  .ld-side { min-width: 0; position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--color-divider); }
  .ld-side nav { flex-direction: row; overflow-x: auto; padding: 0 8px 8px; }
  .ld-side .nav-item { width: auto; }
  .ld-sources, .ld-user-txt { display: none; }
  .ld-content { padding: 16px; }
  .ld-head { padding: 14px 16px; }
  .fu-row { grid-template-columns: 1fr; gap: 8px; }
  .fu-actions { justify-content: flex-start; }
  .ld-toast { left: 16px; }
}

/* Pagination bar (below every list) */
.pager { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; border-top: 1px solid var(--color-divider); font-size: 13px; color: var(--color-neutral-600); }
.pager-info b { color: var(--color-text); font-weight: 600; }
.pager-size { display: flex; align-items: center; gap: 8px; }
.pager-size .input { width: auto; min-height: 32px; padding: 4px 8px; font-size: 13px; }
.pager-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.pager-btn { min-height: 32px; min-width: 32px; padding: 4px 10px; font-size: 13px; font-weight: 500; border: 1px solid var(--color-neutral-300); background: var(--color-surface); }
.pager-btn.btn-selected { border-color: var(--color-accent-300); font-weight: 600; }
.pager-btn:disabled { opacity: 0.4; }
.pager-gap { padding: 0 4px; }
.panel:not(.panel-flush) > .pager:last-child { margin: 8px -20px -18px; }
@media (max-width: 600px) { .pager-nav { margin-left: 0; width: 100%; } }

/* Enrollment page */
.enroll-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.enroll-form { display: flex; flex-direction: column; gap: 22px; }
.form-section { display: flex; flex-direction: column; gap: 12px; }
.form-section + .form-section { border-top: 1px solid var(--color-divider); padding-top: 18px; }
.form-section h4 { margin: 0; }
.enroll-preview { position: sticky; top: 16px; }
.input-error, .input-error:hover { border-color: var(--color-danger); }
.field-error { font-size: 12px; color: var(--color-danger-text); margin-top: 4px; }
@media (max-width: 900px) {
  .enroll-grid, .form-grid { grid-template-columns: 1fr; }
  .enroll-preview { position: static; }
}

/* ── Student Portal ─────────────────────────────────────────────── */
.sp-header { padding: 14px 24px; }
.sp-header-right { display: flex; align-items: center; gap: 12px; }
.sp-login-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); min-height: calc(100vh - 66px); }
.sp-hero { background: var(--color-surface); border-right: 1px solid var(--color-divider); padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.sp-hero h1 { font-size: 40px; line-height: 1.15; margin: 0; max-width: 520px; }
.sp-login { padding: 48px 40px; display: flex; align-items: center; }
.sp-login .panel { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 16px; padding: 28px; }
.sp-wrap { max-width: 1200px; margin: 0 auto; padding: 28px 24px 110px; display: flex; flex-direction: column; gap: 24px; }
.sp-intro { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: end; justify-content: space-between; }
.sp-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 24px; align-items: start; }
.sp-notif { padding: 12px 0; border-bottom: 1px solid var(--color-divider); display: flex; gap: 10px; }
.sp-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--color-neutral-300); }
.sp-dot.hot { background: var(--color-danger); }
.pay-summary { display: flex; flex-direction: column; gap: 6px; font-size: 14px; background: var(--color-neutral-100); border-radius: var(--radius-md); padding: 12px 14px; }
.pay-summary > div { display: flex; justify-content: space-between; }
.pay-total { font-weight: 700; font-size: 18px; border-top: 1px solid var(--color-divider); padding-top: 8px; margin-top: 2px; }
.progress { height: 6px; border-radius: 999px; background: var(--color-neutral-200); overflow: hidden; }
.progress > span { display: block; height: 100%; width: 60%; border-radius: inherit; background: var(--color-accent-400); }

@media (max-width: 860px) {
  .sp-main { grid-template-columns: 1fr; }
  .sp-help { display: none; }
  .sp-hero { padding: 32px 20px; border-right: 0; }
  .sp-hero h1 { font-size: 30px; }
  .sp-login { padding: 32px 20px; }
  .sp-wrap { padding: 20px 16px 130px; }
  .nav { flex-wrap: wrap; }
}

@media (max-width: 820px) {
  .demo-bar { left: 8px; right: 8px; bottom: 8px; max-width: none; }
  .demo-label { display: none; }
}

/* ── Lead Desk additions ────────────────────────────────────────── */
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--color-neutral-500); padding: 14px 12px 4px; }
.kpis-6 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.req { color: var(--color-danger); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--color-accent); }

/* Notes & activity */
.note-type { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; margin-bottom: 4px; background: var(--color-neutral-100); color: var(--color-neutral-700); }
.note-call { background: var(--color-info-bg); color: var(--color-info-text); }
.note-system { background: transparent; padding-left: 0; color: var(--color-neutral-500); }

/* Record a call */
.call-dialog { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.call-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius-md); background: var(--color-neutral-100); }
.call-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; font-size: 13px; }
.call-facts > div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.call-review { font-size: 13px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--color-info-bg); color: var(--color-info-text); }

/* Master data */
.md-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.md-tabs { display: flex; flex-direction: column; gap: 6px; padding: 12px; }
.md-group-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--color-neutral-500); padding: 8px 12px 4px; }
.md-form { display: flex; flex-direction: column; gap: 12px; margin: 0 20px 16px; padding: 16px; border: 1px solid var(--color-accent-200); border-radius: var(--radius-md); background: var(--color-accent-100); }
.md-form .input { background: var(--color-surface); }
.md-editing { background: var(--color-accent-100); }
@media (max-width: 900px) {
  .md-layout { grid-template-columns: 1fr; }
  .md-tabs { flex-direction: row; overflow-x: auto; }
  .md-group { display: flex; align-items: center; gap: 4px; }
  .md-tabs .nav-item { width: auto; }
}
