/* Recruiter desk design layer (redesign 2026-10-21, owner review).
   Type: Inter, one scale, nothing under 12px. Color: purple leads; one violet-tinted gray family; readiness and
   status colors keep their meaning but are softened to sit with the purple. Shape: cards 12px, controls 8px, chips 6px.
   Motion: short fades and lifts (transform/opacity only), switched off for people who ask for less motion. */

@font-face {
  font-family: "Inter";
  src: url("/static/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* type scale */
  --fs-caption: 12px;
  --fs-meta: 13px;
  --fs-body: 14px;
  --fs-read: 15px;
  --fs-title: 16px;
  --fs-h2: 18px;
  --fs-h1: 28px;

  /* neutrals: one violet-tinted family */
  --bg: #f7f7fb;
  --surface: #fff;
  --surface-2: #f3f2f8;
  --surface-hover: #faf9fd;
  --line: #e8e6f0;
  --line-soft: #f0eef5;
  --line-strong: #d6d3e1;
  --ink: #16141f;
  --ink-2: #4a4659;
  --ink-3: #6b6779;

  /* brand */
  --accent: #6d4ae0;
  --accent-hover: #5c3bce;
  --accent-press: #4e30b5;
  --on-accent: #fff;
  --accent-tint: #f1edfd;
  --accent-tint-2: #e5ddfb;
  --accent-text: #5432c4;

  /* readiness: meaning kept, saturation lowered */
  --hot-text: #b4234a;   --hot-tint: #fdedf1;   --hot-dot: #e0577b;
  --medium-text: #9a4b0e; --medium-tint: #fdf1e6; --medium-dot: #e6894a;
  --warm-text: #0f6b63;  --warm-tint: #e7f5f2;  --warm-dot: #2fa394;
  --cold-text: #485a7a;  --cold-tint: #eef1f7;  --cold-dot: #8596b5;

  /* status */
  --danger-text: #b42318; --danger-tint: #fdeeec; --danger-line: #f6cfca;
  --warn-text: var(--medium-text); --warn-tint: var(--medium-tint);
  --success-text: #157a4f; --success-tint: #e8f6ee; --success-dot: #2f9e6a;
  --calm-text: #575366; --calm-tint: #f0eff5;

  --r-lg: 12px;
  --r-md: 8px;
  --r-sm: 6px;
  --shadow-sm: 0 1px 2px rgb(40 26 92 / .05), 0 1px 1px rgb(40 26 92 / .03);
  --shadow-md: 0 6px 16px -4px rgb(40 26 92 / .10), 0 2px 4px -2px rgb(40 26 92 / .06);
  --shadow-lg: 0 16px 40px -8px rgb(40 26 92 / .22);
  --focus: 0 0 0 3px rgb(109 74 224 / .24);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sidebar: 240px;
}

/* ---- base ------------------------------------------------------------------------------- */
body.app-body, body.auth-body { background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1.5; font-feature-settings: "cv11", "ss01"; }
.app-body button, .app-body input, .app-body select, .app-body textarea, .auth-body button, .auth-body input { font-family: var(--font-sans); }
.app-body :focus-visible, .auth-body :focus-visible { outline: none; box-shadow: var(--focus); }
.app-body [hidden] { display: none !important; }
.app-body .skip-link { z-index: 50; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.mono, .phone { font-family: var(--font-sans); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
h1, h2 { text-wrap: balance; }

/* buttons */
.app-body .btn, .auth-body .btn { min-height: 38px; padding: 0 14px; border-color: var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font-size: var(--fs-body); font-weight: 600; box-shadow: var(--shadow-sm); }
.app-body .btn:hover, .auth-body .btn:hover { background: var(--surface-hover); border-color: #c8c4d6; }
.app-body .btn:active, .auth-body .btn:active { transform: translateY(1px) scale(.99); }
.app-body .btn-primary, .auth-body .btn-primary { color: var(--on-accent); background: var(--accent); border-color: var(--accent); box-shadow: 0 1px 2px rgb(64 38 160 / .2), inset 0 1px 0 rgb(255 255 255 / .12); }
.app-body .btn-primary:hover, .auth-body .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 4px 12px -2px rgb(92 59 206 / .35); filter: none; }
.app-body .btn-primary:active, .auth-body .btn-primary:active { background: var(--accent-press); }
.app-body .btn-primary:focus-visible, .auth-body .btn-primary:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.app-body .btn-ghost, .auth-body .btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--ink-2); }
.app-body .btn-ghost:hover, .auth-body .btn-ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary .icon { transition: transform 200ms var(--ease); }
.btn-primary:hover .icon { transform: translateX(2px); }

/* chips: readiness, sync and follow-up */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: var(--r-sm); font-size: var(--fs-caption); font-weight: 600; white-space: nowrap; }
.chip-accent { color: var(--accent-text); background: var(--accent-tint); }
.chip-warn { color: var(--warn-text); background: var(--warn-tint); }
.chip-calm { color: var(--calm-text); background: var(--calm-tint); }
.chip-danger { color: var(--danger-text); background: var(--danger-tint); }
.chip-hot { color: var(--hot-text); background: var(--hot-tint); }
.chip-medium { color: var(--medium-text); background: var(--medium-tint); }
.chip-warm { color: var(--warm-text); background: var(--warm-tint); }
.chip-cold { color: var(--cold-text); background: var(--cold-tint); }
.heat { height: 11px; }
.heat i { width: 3px; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--r-sm); background: var(--calm-tint); color: var(--calm-text); font-size: var(--fs-caption); font-weight: 600; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.status-to-call { background: var(--calm-tint); color: var(--calm-text); }
.status-called { background: var(--accent-tint); color: var(--accent-text); }
.status-no-answer { background: var(--medium-tint); color: var(--medium-text); }
.status-done { background: var(--success-tint); color: var(--success-text); }

/* ---- shell: sidebar and top bar ---------------------------------------------------------- */
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 24; width: var(--sidebar); display: flex; flex-direction: column; padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line); }
.sidebar .brand { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; min-height: 44px; padding: 0 8px; color: var(--ink); text-decoration: none; }
.brand-logo { display: block; width: 184px; max-width: 100%; height: auto; }
.brand-symbol { display: none; width: 36px; max-width: 100%; height: auto; }
.brand-text small, .auth-brand small { display: block; margin-top: 1px; color: var(--ink-3); font-size: var(--fs-caption); font-weight: 500; letter-spacing: 0; }
.side-nav { display: grid; gap: 2px; margin-top: 28px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: var(--r-md); color: var(--ink-2); font-size: var(--fs-body); font-weight: 500; text-decoration: none; transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.nav-link .icon { color: var(--ink-3); transition: color 160ms var(--ease); }
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link:hover .icon { color: var(--ink-2); }
.nav-link[aria-current="page"] { color: var(--accent-text); background: var(--accent-tint); font-weight: 600; }
.nav-link[aria-current="page"] .icon { color: var(--accent); }
.nav-link[aria-current="page"]::before { position: absolute; top: 9px; bottom: 9px; left: -14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); content: ""; }
.app-main { min-width: 0; min-height: 100dvh; margin-left: var(--sidebar); }
.app-body .topbar { position: sticky; top: 0; z-index: 20; background: rgb(247 247 251 / .82); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.app-body .topbar-inner { height: 60px; max-width: 1280px; margin: 0 auto; padding: 0 clamp(20px, 3.5vw, 40px); }
.topbar-context { color: var(--ink); font-size: var(--fs-body); font-weight: 600; }
.app-body .who { gap: 10px; color: var(--ink-2); font-size: var(--fs-body); }
.who-avatar { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--accent-tint-2); color: var(--accent-text); font-size: var(--fs-caption); font-weight: 700; }
.who-avatar:empty { display: none; }
.app-body .who .btn { min-height: 34px; padding: 0 10px; }
.btn-icon-text { gap: 7px; }

/* ---- page ------------------------------------------------------------------------------- */
.app-body .page.shell-page { max-width: 1280px; margin: 0 auto; padding: 32px clamp(20px, 3.5vw, 40px) 80px; }
.page-view:not([hidden]) { animation: view-in 260ms var(--ease) both; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head h1, .app-body .detail-title h1 { font-size: var(--fs-h1); font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.page-sub { margin-top: 6px; color: var(--ink-3); font-size: var(--fs-body); }
.updated { color: var(--ink-3); font-size: var(--fs-meta); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.section { margin-top: 32px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.section-head h2, .app-body .side-head h2 { color: var(--ink); font-size: var(--fs-h2); font-weight: 650; letter-spacing: -.015em; }
.section-head .count, .app-body .section-head .count { display: inline-grid; min-width: 26px; height: 22px; padding: 0 7px; place-items: center; border-radius: 11px; background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-caption); font-weight: 600; font-variant-numeric: tabular-nums; }
.text-link { margin-left: auto; color: var(--accent-text); font-size: var(--fs-meta); font-weight: 600; text-decoration: none; }
.text-link:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
.rows > li + li { border-top: 1px solid var(--line-soft); }
.rows > li { animation: row-in 320ms var(--ease) both; }
.rows > li:nth-child(2) { animation-delay: 30ms; } .rows > li:nth-child(3) { animation-delay: 60ms; }
.rows > li:nth-child(4) { animation-delay: 90ms; } .rows > li:nth-child(5) { animation-delay: 120ms; }
.rows > li:nth-child(n+6) { animation-delay: 150ms; }
.banner { border-radius: var(--r-md); font-size: var(--fs-body); }
.empty { padding: 40px 24px; text-align: center; }
.empty-title { font-size: var(--fs-title); font-weight: 650; }
.empty-body { margin: 6px auto 0; color: var(--ink-3); font-size: var(--fs-body); }
.skeleton { height: 84px; }
.data-scope { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* read out to screen readers, not shown */
.faint { color: var(--ink-3); font-size: var(--fs-meta); }

/* ---- overview: who to call next ---------------------------------------------------------- */
.priority-overview { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(250px, 1fr); gap: 16px; }
.next-action, .up-next { min-width: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.next-action { position: relative; overflow: hidden; padding: 22px 24px; }
.next-action::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); content: ""; }
.next-action-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.priority-category { color: var(--accent-text); font-size: var(--fs-meta); font-weight: 600; }
.urgent-reason { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: var(--r-sm); background: var(--danger-tint); color: var(--danger-text); font-size: var(--fs-caption); font-weight: 650; }
.urgent-reason.is-neutral { background: var(--surface-2); color: var(--ink-2); }
.next-action-main { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.next-action h2 { color: var(--ink); font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.next-action-main p { max-width: 56ch; margin-top: 6px; color: var(--ink-2); font-size: var(--fs-read); }
.next-action .btn-primary { flex: 0 0 auto; min-height: 42px; padding: 0 18px; gap: 8px; font-size: var(--fs-body); white-space: nowrap; }
.up-next { display: flex; flex-direction: column; justify-content: center; padding: 20px; transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease); }
.up-next:hover { border-color: var(--accent-tint-2); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.up-next-label { margin-bottom: 12px; color: var(--ink-3); font-size: var(--fs-meta); font-weight: 600; }
.up-next-person { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.up-next-person:hover strong { color: var(--accent-text); }
.following-rank { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-meta); font-weight: 700; }
.up-next strong { display: block; font-size: var(--fs-title); font-weight: 650; }
.up-next small { display: block; margin-top: 2px; color: var(--ink-3); font-size: var(--fs-meta); }
.up-next-arrow { margin-left: auto; color: var(--ink-3); transition: transform 180ms var(--ease), color 180ms var(--ease); }
.up-next:hover .up-next-arrow { color: var(--accent); transform: translateX(3px); }

.stat-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 16px; overflow: hidden; }
.stat-tile { display: grid; gap: 4px; padding: 16px 20px; color: inherit; text-decoration: none; transition: background-color 160ms var(--ease); }
.stat-tile + .stat-tile { border-left: 1px solid var(--line-soft); }
.stat-tile:hover { background: var(--surface-hover); }
.stat-tile-label { color: var(--ink-3); font-size: var(--fs-meta); font-weight: 500; }
.stat-tile strong { color: var(--ink); font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
#stat-sync.is-problem strong { color: var(--danger-text); }

/* attention rows */
.attn { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 16px 20px; }
.attn-name { font-size: var(--fs-read); font-weight: 650; }
.attn-detail { margin-top: 4px; color: var(--ink-2); font-size: var(--fs-body); }
.attn-hint, .attn-when { color: var(--ink-3); font-size: var(--fs-meta); }
.attn-summary { margin-top: 6px; color: var(--ink-2); font-size: var(--fs-body); }

/* callback queue rows: rank | person | callback time | actions */
.row { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(150px, 190px) auto; gap: 18px; align-items: center; padding: 16px 20px; }
.row:hover, .tline:hover:not([disabled]) { background: var(--surface-hover); }
.row.is-leaving, .row.is-entering { pointer-events: none; }
.queue-rank { display: grid; width: 32px; height: 32px; place-items: center; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-meta); font-weight: 700; font-variant-numeric: tabular-nums; }
.priority-first .queue-rank { background: var(--accent); color: var(--on-accent); box-shadow: 0 3px 8px -2px rgb(92 59 206 / .45); }
.name-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.name { color: var(--ink); font-size: var(--fs-read); font-weight: 650; letter-spacing: -.01em; }
.name-link { text-decoration: none; }
.name-link:hover { color: var(--accent-text); text-decoration: none; }
.phone-line { margin-top: 3px; }
.phone { margin-top: 0; color: var(--ink-2); font-size: var(--fs-body); }
.also { margin-left: 12px; color: var(--ink-3); font-size: var(--fs-meta); }
.facts { display: flex; flex-wrap: wrap; gap: 2px 0; margin-top: 4px; color: var(--ink-3); font-size: var(--fs-meta); }
.facts > span + span::before { margin: 0 8px; color: var(--line-strong); content: "·"; }
.facts .k { margin-right: 4px; color: var(--ink-3); }
.note { margin-top: 8px; padding: 7px 10px; border-left: 3px solid var(--accent-tint-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-meta); }
.when-label { color: var(--ink-3); font-size: var(--fs-caption); white-space: nowrap; }
.when-value { margin-top: 2px; color: var(--ink); font-size: var(--fs-body); font-weight: 600; }
.when-value.is-late { color: var(--danger-text); }
.when-value.is-none { color: var(--ink-3); font-weight: 500; }
.seg { display: inline-flex; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.seg button { min-height: 36px; padding: 0 12px; border: 0; background: transparent; color: var(--ink-2); font-size: var(--fs-meta); font-weight: 600; cursor: pointer; transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { background: var(--surface-2); color: var(--ink); }
.app-body .seg button[aria-pressed="true"] { color: var(--accent-text); background: var(--accent-tint); }
.app-body .seg button[data-follow-up="to_call"][aria-pressed="true"] { color: var(--calm-text); background: var(--calm-tint); }
.app-body .seg button[data-follow-up="no_answer"][aria-pressed="true"] { color: var(--medium-text); background: var(--medium-tint); }
.app-body .seg button[data-follow-up="done"][aria-pressed="true"] { color: var(--success-text); background: var(--success-tint); }

/* ---- applicants directory ---------------------------------------------------------------- */
.directory-panel, .activity-panel { overflow: visible; }
.directory-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search-field { position: relative; display: block; width: min(100%, 320px); }
.search-icon { position: absolute; left: 11px; top: 50%; z-index: 1; width: 17px; height: 17px; color: var(--ink-3); transform: translateY(-50%); pointer-events: none; }
.search-field .input { min-height: 38px; padding: 0 12px 0 36px; border-color: var(--line-strong); border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-body); }
.filter-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: var(--r-md); background: var(--surface-2); }
.filter-tabs button { min-height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-2); font-size: var(--fs-meta); font-weight: 600; cursor: pointer; transition: background-color 150ms var(--ease), color 150ms var(--ease), box-shadow 150ms var(--ease); }
.filter-tabs button:hover { color: var(--ink); }
.filter-tabs button[aria-pressed="true"] { background: var(--surface); color: var(--accent-text); box-shadow: 0 1px 3px rgb(40 26 92 / .12); }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; min-width: 720px; border-collapse: collapse; text-align: left; }
.data-table th { padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-hover); color: var(--ink-3); font-size: var(--fs-caption); font-weight: 600; }
.data-table th:first-child, .data-table td:first-child { padding-left: 18px; }
.data-table td { padding: 14px; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); font-size: var(--fs-body); vertical-align: middle; }
.data-table tbody tr { transition: background-color 140ms var(--ease); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--surface-hover); }
.applicant-cell { display: flex; align-items: center; gap: 12px; min-width: 230px; }
.person-avatar { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--accent-tint); color: var(--accent-text); font-size: var(--fs-caption); font-weight: 700; }
.table-person-name { display: block; color: var(--ink); font-size: var(--fs-body); font-weight: 650; text-decoration: none; }
.table-person-name:hover { color: var(--accent-text); }
.applicant-cell small { display: block; margin-top: 1px; color: var(--ink-3); font-size: var(--fs-caption); }
.readiness-cell { display: grid; gap: 3px; justify-items: start; }
.readiness-cell small { color: var(--ink-3); font-size: var(--fs-caption); }
.callback-cell { color: var(--ink-2); font-size: var(--fs-meta); white-space: nowrap; }
.callback-cell.muted, .last-call-cell { color: var(--ink-3); font-size: var(--fs-meta); white-space: nowrap; }
.table-substatus { display: block; margin-top: 4px; color: var(--medium-text); font-size: var(--fs-caption); }
.open-cell { text-align: right; }
.app-body .table-open { min-height: 32px; gap: 4px; padding: 0 8px 0 12px; color: var(--accent-text); font-size: var(--fs-meta); }
.app-body .table-open:hover { border-color: var(--accent-tint-2); background: var(--accent-tint); color: var(--accent-text); }
.table-open .icon { width: 15px; height: 15px; transition: transform 180ms var(--ease); }
.table-open:hover .icon { transform: translateX(2px); }
.table-empty { padding: 40px 18px !important; color: var(--ink-3) !important; text-align: center; }
.directory-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-meta); }
.directory-footer .btn { min-height: 34px; font-size: var(--fs-meta); }
.pagination { display: flex; gap: 8px; }

/* ---- call activity ----------------------------------------------------------------------- */
.activity-toolbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.filter-control { display: grid; gap: 5px; min-width: 150px; }
.filter-control > span { color: var(--ink-3); font-size: var(--fs-caption); font-weight: 600; }
.filter-control .input { min-height: 38px; padding: 0 10px; border-color: var(--line-strong); border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-meta); }
.activity-search { width: 220px; margin-left: auto; }
.activity-search .input { min-height: 38px; }
.activity-list { margin: 0; padding: 0 20px 4px; list-style: none; }
.activity-item { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 14px; padding: 18px 0; animation: row-in 320ms var(--ease) both; }
.activity-item + .activity-item { border-top: 1px solid var(--line-soft); }
.activity-marker { display: flex; justify-content: center; padding-top: 6px; }
.activity-marker span { width: 10px; height: 10px; border: 2px solid var(--accent-tint-2); border-radius: 50%; background: var(--accent); }
.activity-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.activity-name { color: var(--ink); font-size: var(--fs-read); font-weight: 650; text-decoration: none; }
.activity-name:hover { color: var(--accent-text); }
.activity-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; color: var(--ink-3); font-size: var(--fs-meta); }
.activity-meta .phone { font-size: var(--fs-meta); }
.activity-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.activity-callback, .activity-review-reason, .activity-sync-note { margin-top: 8px; color: var(--ink-2); font-size: var(--fs-meta); }
.activity-review-reason { color: var(--medium-text); }
.activity-sync-note { color: var(--danger-text); }
.activity-summary { max-width: 80ch; margin-top: 8px; color: var(--ink-2); font-size: var(--fs-body); line-height: 1.6; overflow-wrap: anywhere; }
.activity-details { width: fit-content; max-width: 100%; margin-top: 10px; color: var(--accent-text); font-size: var(--fs-meta); font-weight: 600; }
.activity-details summary { cursor: pointer; }
.activity-details audio { display: block; width: min(380px, 100%); height: 36px; margin-top: 8px; }

/* ---- analytics --------------------------------------------------------------------------- */
.analytics-head { gap: 20px; }
.analytics-controls { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.analytics-coverage { margin: -10px 0 18px; color: var(--ink-3); font-size: var(--fs-meta); }
.analytics-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink-2); font-size: var(--fs-body); }
.analytics-notice.is-error { border-color: var(--danger-line); }
.analytics-notice .btn { flex-shrink: 0; }
.metric-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.metric { min-width: 0; padding: 20px 22px; }
.metric + .metric { border-left: 1px solid var(--line-soft); }
.metric h2 { color: var(--ink-3); font-size: var(--fs-meta); font-weight: 500; letter-spacing: 0; }
.metric-value { margin-top: 8px; color: var(--ink); font-size: clamp(26px, 2.4vw, 32px); font-weight: 700; letter-spacing: -.025em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metric-detail { margin-top: 6px; color: var(--ink-3); font-size: var(--fs-caption); line-height: 1.5; }
.metric-secondary { display: none; } /* the definitions section explains the denominators */
.analytics-empty { margin-top: 18px; padding: 16px 18px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); color: var(--ink-2); font-size: var(--fs-body); }
.analytics-chart-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.analytics-distribution-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.analytics-panel { min-width: 0; padding: 20px 22px; }
.analytics-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.analytics-panel-head h2 { color: var(--ink); font-size: var(--fs-title); font-weight: 650; letter-spacing: -.01em; }
.analytics-panel-head p { margin-top: 2px; color: var(--ink-3); font-size: var(--fs-meta); }
.analytics-panel-head .text-link { white-space: nowrap; }
.chart-total { color: var(--ink-2); font-size: var(--fs-meta); font-weight: 600; white-space: nowrap; }
.volume-figure { margin: 0; }
.volume-plot { display: flex; gap: 12px; height: 210px; padding-top: 18px; }
.volume-axis { display: flex; flex-direction: column; justify-content: space-between; flex: 0 0 22px; height: calc(100% - 28px); color: var(--ink-3); font-size: var(--fs-caption); text-align: right; }
.volume-bars { position: relative; display: flex; flex: 1 1 auto; min-width: 0; gap: 8px; background: linear-gradient(var(--line-soft), var(--line-soft)) left top / 100% 1px no-repeat, linear-gradient(var(--line-soft), var(--line-soft)) left calc(50% - 14px) / 100% 1px no-repeat, linear-gradient(var(--line), var(--line)) left calc(100% - 28px) / 100% 1px no-repeat; }
.volume-day { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; }
.volume-stem { display: flex; align-items: flex-end; justify-content: center; flex: 1 1 auto; min-height: 0; }
.volume-fill { position: relative; display: block; width: 60%; max-width: 36px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #8366ea, var(--accent)); transform-origin: bottom; animation: bar-grow 520ms var(--ease) both; transition: filter 160ms var(--ease); }
.volume-stem:hover .volume-fill { filter: brightness(1.08); }
.volume-count { position: absolute; top: -21px; left: 50%; transform: translateX(-50%); color: var(--ink-2); font-size: var(--fs-caption); font-weight: 600; white-space: nowrap; }
.volume-day-label { display: block; height: 28px; padding-top: 9px; color: var(--ink-3); font-size: var(--fs-caption); text-align: center; white-space: nowrap; }
.volume-day:first-child .volume-day-label { text-align: left; }
.volume-day:last-child .volume-day-label { text-align: right; }
.volume-plot.is-dense .volume-bars { gap: 3px; }
.volume-plot.is-dense .volume-fill { width: 100%; border-radius: 3px 3px 0 0; }
.volume-plot.is-dense .volume-count { display: none; }
.volume-plot.is-dense .volume-day-label { visibility: hidden; }
.volume-plot.is-dense .volume-day:first-child .volume-day-label, .volume-plot.is-dense .volume-day:last-child .volume-day-label { visibility: visible; }
.chart-caption { margin-top: 8px; color: var(--ink-3); font-size: var(--fs-caption); }
.chart-data { margin-top: 14px; color: var(--ink-2); font-size: var(--fs-meta); }
.chart-data summary, .metric-definitions summary { width: fit-content; max-width: 100%; cursor: pointer; }
.chart-data summary:hover { color: var(--accent-text); }
.counts-table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: var(--fs-meta); }
.counts-table th, .counts-table td { padding: 8px 0; border-bottom: 1px solid var(--line-soft); text-align: left; font-weight: 500; }
.counts-table thead th { font-weight: 650; }
.counts-table td, .counts-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.metric-breakdown { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.breakdown-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; color: var(--ink-2); font-size: var(--fs-meta); }
.breakdown-value { display: inline-flex; align-items: baseline; gap: 12px; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.breakdown-value small { min-width: 42px; color: var(--ink-3); font-size: var(--fs-caption); font-weight: 500; text-align: right; }
.breakdown-track { height: 6px; margin-top: 8px; overflow: hidden; border-radius: 3px; background: var(--surface-2); }
.breakdown-fill { display: block; height: 100%; border-radius: 3px; background: var(--line-strong); transform-origin: left; animation: fill-grow 520ms var(--ease) both; }
.breakdown-fill.fill-accent { background: var(--accent); }
.breakdown-fill.fill-amber { background: var(--medium-dot); }
.analytics-link { display: inline-block; margin-top: 18px; }
.metric-definitions { margin-top: 16px; padding: 16px 22px; }
.metric-definitions summary { color: var(--ink-2); font-size: var(--fs-meta); font-weight: 600; }
.metric-definitions dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; margin: 20px 0 4px; }
.metric-definitions dt { color: var(--ink); font-size: var(--fs-meta); font-weight: 650; }
.metric-definitions dd { margin: 4px 0 0; color: var(--ink-3); font-size: var(--fs-meta); line-height: 1.6; }

/* ---- applicant detail -------------------------------------------------------------------- */
.app-body .crumb { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--ink-3); font-size: var(--fs-meta); }
.app-body .crumb a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 500; text-decoration: none; }
.app-body .crumb a:hover { color: var(--accent-text); text-decoration: none; }
.app-body .crumb .icon { width: 16px; height: 16px; }
.app-body .detail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 0 0 20px; border: 0; }
.app-body .detail-title { gap: 8px 12px; }
.app-body .detail-sub { gap: 4px 20px; margin-top: 8px; color: var(--ink-2); font-size: var(--fs-read); }
.app-body .detail-sub .phone { font-size: var(--fs-read); }
.app-body .detail-grid { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 20px; margin-top: 4px; }
.app-body .detail-grid > section, .app-body .detail-grid > aside { min-width: 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.app-body .detail-grid .section-head { margin: 0 0 4px; }
.app-body .side-section + .side-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.app-body .side-head { margin-bottom: 8px; }
.app-body .side-head h2 { font-size: var(--fs-title); }
.call-list > li { padding: 18px 0; }
.call-list > li:last-child { padding-bottom: 4px; }
.app-body .call-row + .call-row { border-top: 1px solid var(--line-soft); }
.app-body .call-when { font-size: var(--fs-body); font-weight: 650; }
.app-body .call-summary { margin-top: 10px; color: var(--ink); font-size: var(--fs-read); line-height: 1.6; }
.app-body .call-line { margin-top: 6px; color: var(--ink-3); font-size: var(--fs-meta); }
.app-body .history li { color: var(--ink-2); font-size: var(--fs-meta); }
.app-body .history .when-did { color: var(--ink-3); font-size: var(--fs-caption); }
.app-body .pf { grid-template-columns: 104px minmax(0, 1fr); padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-body); }
.app-body .pf .k { color: var(--ink-3); font-size: var(--fs-meta); }
.app-body .profile .input { min-height: 38px; font-size: var(--fs-body); }
.app-body .textarea { min-height: 88px; border-color: var(--line-strong); font-size: var(--fs-body); }
.app-body .help, .app-body .player-note { color: var(--ink-3); font-size: var(--fs-meta); }
.app-body .btn-sm { min-height: 34px; padding: 0 12px; font-size: var(--fs-meta); }
.app-body .player .btn { min-height: 34px; }
.app-body .listen { border-top-color: var(--line-soft); }
.app-body .transcript { border-color: var(--line); border-radius: var(--r-md); }
.app-body .tline { font-size: var(--fs-body); }
.app-body .tline .t { font-family: var(--font-sans); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; }
.app-body .tline.is-now { background: var(--accent-tint); }
.app-body .not-found { padding: 40px 0; }

/* ---- toasts ------------------------------------------------------------------------------ */
.app-body .toast { border-radius: var(--r-md); background: #1d1a29; color: #fff; font-size: var(--fs-body); box-shadow: var(--shadow-lg); animation: toast-in 280ms var(--ease) both; }

/* ---- sign in ----------------------------------------------------------------------------- */
body.auth-body { min-height: 100dvh; margin: 0; background: radial-gradient(1200px 600px at 50% -10%, #ece6fd 0%, rgb(236 230 253 / 0) 60%), var(--bg); }
.auth-main { display: grid; min-height: 100dvh; place-items: center; align-content: center; gap: 20px; padding: 32px 16px; }
.auth-card { width: min(100%, 400px); padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-md); animation: view-in 320ms var(--ease) both; }
.auth-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 28px; }
.auth-brand .brand-logo { width: 210px; }
.auth-card h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.auth-lede { margin-top: 6px; color: var(--ink-3); font-size: var(--fs-body); }
.auth-body .form { margin-top: 24px; gap: 16px; }
.auth-body .field label { font-size: var(--fs-meta); font-weight: 600; }
.auth-body .input { min-height: 44px; border-color: var(--line-strong); font-size: var(--fs-read); }
.auth-body .input:focus-visible { border-color: var(--accent); box-shadow: var(--focus); }
.auth-body .reveal { top: 5px; right: 5px; min-height: 34px; font-size: var(--fs-meta); }
.auth-body .form-error { font-size: var(--fs-meta); }
.auth-body .btn-primary { width: 100%; min-height: 46px; font-size: var(--fs-read); }
.auth-foot { color: var(--ink-3); font-size: var(--fs-meta); text-align: center; }

/* ---- motion ------------------------------------------------------------------------------ */
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes row-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes bar-grow { from { transform: scaleY(0); } }
@keyframes fill-grow { from { transform: scaleX(0); } }

/* ---- narrower screens -------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .row { grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-areas: "rank main act" "rank when act"; row-gap: 8px; }
  .row .c-rank { grid-area: rank; align-self: start; }
  .row .c-main { grid-area: main; }
  .row .c-when { grid-area: when; display: flex; align-items: baseline; gap: 8px; }
  .row .c-act { grid-area: act; }
  .row .when-value { margin-top: 0; }
  .directory-toolbar { align-items: flex-start; flex-direction: column; }
  .directory-toolbar .search-field { width: 100%; }
  .analytics-head { align-items: flex-start; flex-direction: column; }
  .analytics-chart-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  :root { --sidebar: 72px; }
  .sidebar { align-items: center; padding: 20px 12px; }
  .brand-text, .sidebar .brand-logo { display: none; }
  .brand-symbol { display: block; }
  .sidebar .brand { align-items: center; padding: 0; }
  .nav-link { justify-content: center; width: 48px; padding: 0; }
  .nav-link > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-link .icon { width: 20px; height: 20px; }
  .nav-link[aria-current="page"]::before { left: -12px; }
  .priority-overview { grid-template-columns: minmax(0, 1fr); }
  .app-body .detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .row { grid-template-columns: 32px minmax(0, 1fr); grid-template-areas: "rank main" "rank when" "rank act"; }
  .row .seg { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .attn { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .stat-bar, .metric-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-tile:nth-child(3), .metric:nth-child(3) { border-left: 0; }
  .stat-tile:nth-child(n+3), .metric:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 760px) {
  body.app-body { padding-bottom: 68px; }
  .sidebar { inset: auto 0 0; width: 100%; height: 64px; flex-direction: row; padding: 0 8px; border-top: 1px solid var(--line); border-right: 0; background: rgb(255 255 255 / .94); backdrop-filter: blur(12px); }
  .sidebar .brand { display: none; }
  .side-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; height: 100%; margin: 0; }
  .nav-link { flex-direction: column; justify-content: center; gap: 2px; width: auto; min-height: 0; padding: 4px 2px; font-size: var(--fs-caption); }
  .nav-link > span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .nav-link[aria-current="page"]::before { display: none; }
  .app-main { margin-left: 0; }
  .app-body .topbar-inner { height: 56px; padding: 0 16px; }
  .app-body .who #who { display: none; }
  .app-body .page.shell-page { padding: 22px 16px 40px; }
  .page-head { align-items: flex-start; }
  .page-head h1, .app-body .detail-title h1 { font-size: 24px; }
  .next-action { padding: 18px 18px 18px 20px; }
  .next-action-main { display: block; }
  .next-action h2 { font-size: 21px; }
  .next-action .btn-primary { width: 100%; margin-top: 16px; }
  .row { padding: 16px; gap: 10px 14px; }
  .row .seg button { min-height: 42px; padding: 0 6px; }
  .filter-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .filter-tabs button { flex: 0 0 auto; }
  .table-scroll { overflow: visible; }
  .data-table { display: block; min-width: 0; }
  .data-table thead { display: none; }
  .data-table tbody, .data-table tr { display: block; }
  .data-table tbody tr { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
  .data-table td { display: block; padding: 4px 0; border: 0; }
  .data-table td:first-child { padding-left: 0; padding-bottom: 8px; }
  .data-table td:nth-child(2)::before, .data-table td:nth-child(3)::before, .data-table td:nth-child(4)::before { display: inline-block; width: 84px; color: var(--ink-3); font-size: var(--fs-caption); font-weight: 600; }
  .data-table td:nth-child(2)::before { content: "Readiness"; }
  .data-table td:nth-child(3)::before { content: "Callback"; }
  .data-table td:nth-child(4)::before { content: "Follow-up"; }
  .data-table td:nth-child(5), .data-table .open-cell { display: none; }
  .activity-toolbar { gap: 10px; padding: 12px; }
  .filter-control { min-width: calc(50% - 5px); flex: 1 1 calc(50% - 5px); }
  .activity-search { flex-basis: 100%; width: 100%; }
  .activity-list { padding: 0 14px 4px; }
  .activity-title-row { align-items: flex-start; flex-direction: column; }
  .analytics-controls { width: 100%; justify-content: space-between; }
  .metric { padding: 16px; }
  .metric-value { font-size: 26px; }
  .analytics-chart-grid, .analytics-distribution-grid { grid-template-columns: minmax(0, 1fr); }
  .analytics-panel { padding: 18px 16px; }
  .analytics-panel-head { flex-wrap: wrap; }
  .analytics-panel-head .text-link { margin-left: 0; }
  .volume-plot { gap: 8px; height: 190px; }
  .metric-definitions dl { grid-template-columns: minmax(0, 1fr); }
  .analytics-notice { align-items: flex-start; flex-direction: column; }
  .app-body .detail-grid > section, .app-body .detail-grid > aside { padding: 16px; }
  .app-body .detail-head .seg { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; }
  .app-body .detail-head .seg button { min-height: 42px; padding: 0 4px; }
  .app-body .pf { grid-template-columns: 92px minmax(0, 1fr); }
  .app-body .profile .input, .app-body .textarea { min-height: 44px; font-size: 16px; }
  .app-body .toasts { left: 12px; right: 12px; bottom: 76px; }
  .auth-card { padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .app-body *, .app-body *::before, .app-body *::after, .auth-body *, .auth-body *::before, .auth-body *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; }
}
