:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --line: #e5e7eb;
  --line-soft: #f0f2f5;
  --navy: #0b1220;
  --navy-2: #121c31;
  --navy-3: #1b2942;
  --brand: #2563eb;
  --brand-2: #1d4ed8;
  --brand-soft: #eff6ff;
  --green: #059669;
  --green-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --orange: #ea580c;
  --orange-soft: #fff7ed;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --violet: #7c3aed;
  --violet-soft: #f5f3ff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .04);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, .12);
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: currentColor; display: block; }

.shell { display: flex; min-height: 100vh; }

/* ---------- sidebar ---------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background: linear-gradient(180deg, var(--navy) 0%, #0d1628 100%);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  z-index: 40;
  border-right: 1px solid rgba(255,255,255,.05);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 24px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff; font-weight: 800; font-size: 19px;
  box-shadow: 0 8px 24px rgba(59,130,246,.35);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy strong { color: #fff; font-size: 15px; letter-spacing: .01em; }
.brand-copy span { color: #94a3b8; font-size: 11.5px; margin-top: 3px; letter-spacing: .08em; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 9px;
  color: #aab6c8; font-size: 13.5px; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-item svg { width: 18px; height: 18px; opacity: .8; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.is-active { background: rgba(59,130,246,.16); color: #fff; box-shadow: inset 0 0 0 1px rgba(96,165,250,.2); }
.nav-item.is-active svg { opacity: 1; color: #60a5fa; }
.nav-item em {
  margin-left: auto; font-style: normal; font-size: 10.5px;
  background: rgba(255,255,255,.08); color: #cbd5e1;
  padding: 2px 7px; border-radius: 999px;
}
.nav-item em.soon { background: transparent; color: #64748b; padding-right: 0; }
.nav-item.is-muted { opacity: .72; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.source-card {
  display: flex; gap: 10px; align-items: center;
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.06);
  padding: 11px 12px; border-radius: 10px;
}
.source-card .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.12); flex: none; }
.source-card strong { display: block; color: #e2e8f0; font-size: 12px; font-weight: 600; }
.source-card small { display: block; color: #7f8da3; font-size: 10.5px; margin-top: 2px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.user-chip strong { display: block; color: #e2e8f0; font-size: 12px; }
.user-chip small { display: block; color: #71809a; font-size: 10.5px; margin-top: 2px; }

/* ---------- main / topbar ---------- */
.main { margin-left: var(--sidebar); width: calc(100% - var(--sidebar)); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  min-height: 78px; padding: 14px 28px;
  background: rgba(245,247,251,.86); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229,231,235,.7);
}
.topbar-title { min-width: 170px; }
.eyebrow { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .16em; color: var(--muted-2); margin-bottom: 3px; }
.topbar-title h1 { margin: 0; font-size: 20px; letter-spacing: -.02em; font-weight: 700; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 0 10px; height: 38px;
  width: min(360px, 32vw); box-shadow: 0 1px 2px rgba(16,24,40,.03);
}
.search-box svg { width: 16px; height: 16px; color: var(--muted-2); }
.search-box input { border: 0; outline: 0; background: transparent; width: 100%; color: var(--ink); font-size: 12.5px; }
.search-box input::placeholder { color: var(--muted-2); }
.search-box kbd {
  font-family: inherit; font-size: 10px; color: var(--muted-2);
  border: 1px solid var(--line); background: var(--surface-2);
  padding: 2px 5px; border-radius: 5px; white-space: nowrap;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff; font-size: 12px; font-weight: 700;
}
.avatar.small { width: 31px; height: 31px; font-size: 11px; background: linear-gradient(135deg, #334155, #0f172a); }
.icon-btn { background: transparent; border: 0; color: var(--ink-2); width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface); }
.menu-btn { display: none; }

.content { padding: 26px 28px 48px; max-width: 1500px; }

/* ---------- generic ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; border-radius: 9px;
  height: 36px; padding: 0 13px; font-size: 12.5px; font-weight: 600;
  transition: background .15s, border-color .15s, transform .1s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.22); }
.btn.primary:hover { background: var(--brand-2); }
.btn.ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--red-soft); color: var(--red); border-color: #fecaca; }
.btn.soft { background: var(--brand-soft); color: var(--brand); border-color: #dbeafe; }
.btn.small { height: 30px; padding: 0 10px; font-size: 11.5px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.sync-icon { font-size: 15px; line-height: 1; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.section-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.section-head .head-actions { display: flex; gap: 8px; align-items: center; }
.muted { color: var(--muted); }
.tiny { font-size: 11px; }
.mono { font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; }

/* ---------- dashboard ---------- */
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.hero-row h2 { margin: 0; font-size: 24px; letter-spacing: -.035em; }
.hero-row p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.hero-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 600;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.pill.brand { background: var(--brand-soft); color: var(--brand); border-color: #dbeafe; }
.pill.green { background: var(--green-soft); color: var(--green); border-color: #d1fae5; }
.pill.amber { background: var(--amber-soft); color: var(--amber); border-color: #fde68a; }
.pill.red { background: var(--red-soft); color: var(--red); border-color: #fecaca; }
.pill.violet { background: var(--violet-soft); color: var(--violet); border-color: #ddd6fe; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 17px 18px 15px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-card::after { content: ""; position: absolute; right: -18px; top: -18px; width: 72px; height: 72px; border-radius: 50%; background: var(--surface-2); }
.stat-label { color: var(--muted); font-size: 11.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat-label .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.stat-value { font-size: 30px; font-weight: 750; letter-spacing: -.04em; margin-top: 8px; line-height: 1; position: relative; z-index: 1; }
.stat-foot { color: var(--muted-2); font-size: 10.5px; margin-top: 8px; display: flex; gap: 6px; align-items: center; }
.stat-foot strong { color: var(--green); font-weight: 650; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .9fr); gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }

.queue-list { display: flex; flex-direction: column; }
.queue-item {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) 88px;
  gap: 13px; align-items: center; padding: 13px 4px;
  border-top: 1px solid var(--line-soft);
}
.queue-item:first-child { border-top: 0; }
.queue-avatar {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-2); font-weight: 700; font-size: 13px;
}
.queue-main { min-width: 0; }
.queue-name { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 13px; }
.queue-name .role { color: var(--muted-2); font-weight: 400; font-size: 11px; }
.queue-summary { color: var(--muted); font-size: 11.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-meta { display: flex; gap: 6px; align-items: center; margin-top: 5px; flex-wrap: wrap; }
.queue-score { text-align: right; }
.queue-score .score-badge { margin-left: auto; }
.queue-score small { display: block; color: var(--muted-2); font-size: 10px; margin-top: 4px; }

.score-badge {
  display: inline-flex; align-items: baseline; gap: 2px;
  min-width: 42px; justify-content: center;
  padding: 4px 8px; border-radius: 8px; font-weight: 750; font-size: 13px;
  letter-spacing: -.02em; border: 1px solid transparent;
}
.score-badge span { font-size: 9px; font-weight: 600; opacity: .7; }
.score-5 { background: var(--green-soft); color: var(--green); border-color: #d1fae5; }
.score-4 { background: var(--brand-soft); color: var(--brand); border-color: #dbeafe; }
.score-3 { background: var(--amber-soft); color: var(--amber); border-color: #fde68a; }
.score-2 { background: var(--orange-soft); color: var(--orange); border-color: #fed7aa; }
.score-1 { background: var(--red-soft); color: var(--red); border-color: #fecaca; }
.score-none { background: var(--surface-2); color: var(--muted); border-color: var(--line); }

.dist-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.dist-label { width: 58px; font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.dist-label b { color: var(--ink); font-weight: 650; }
.dist-track { flex: 1; height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.dist-fill { height: 100%; border-radius: 999px; background: var(--brand); min-width: 2px; }
.dist-fill.s5 { background: var(--green); }
.dist-fill.s4 { background: var(--brand); }
.dist-fill.s3 { background: var(--amber); }
.dist-fill.s2 { background: var(--orange); }
.dist-fill.s1 { background: var(--red); }
.dist-count { width: 38px; text-align: right; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.insight-list { display: flex; flex-direction: column; gap: 12px; }
.insight-item { display: flex; gap: 10px; align-items: flex-start; }
.insight-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 700; }
.insight-icon.amber { background: var(--amber-soft); color: var(--amber); }
.insight-icon.red { background: var(--red-soft); color: var(--red); }
.insight-icon.green { background: var(--green-soft); color: var(--green); }
.insight-body strong { display: block; font-size: 12px; }
.insight-body span { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }

.job-bars { display: flex; flex-direction: column; gap: 12px; }
.job-bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 48px; gap: 10px; align-items: center; }
.job-bar-name { min-width: 0; }
.job-bar-name strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-bar-name small { display: block; color: var(--muted-2); font-size: 10px; margin-top: 2px; }
.job-bar-track { height: 7px; background: var(--surface-2); border-radius: 999px; overflow: hidden; display: flex; }
.job-bar-track i { display: block; height: 100%; }
.job-bar-track .keep { background: var(--brand); }
.job-bar-track .review { background: var(--amber); }
.job-bar-track .arch { background: #e5e7eb; }
.job-bar-count { text-align: right; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- recruiting board ---------- */
.board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.board-head-copy { min-width: 0; }
.board-kicker { display: block; font-size: 9.5px; font-weight: 750; letter-spacing: .16em; color: var(--brand); margin-bottom: 4px; }
.board-head h2 { margin: 0; font-size: 28px; letter-spacing: -.045em; line-height: 1.1; }
.board-head p { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; }
.board-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.board-select {
  display: flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px;
  height: 36px; padding: 0 9px; box-shadow: 0 1px 2px rgba(16,24,40,.03);
}
.board-select span { font-size: 9.5px; color: var(--muted-2); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.board-select select { border: 0; outline: 0; background: transparent; color: var(--ink-2); font-size: 11.5px; max-width: 180px; }
.freshness { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; padding-left: 3px; white-space: nowrap; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px rgba(16,185,129,.12); animation: livePulse 1.8s infinite; }
@keyframes livePulse { 50% { box-shadow: 0 0 0 7px rgba(16,185,129,0); } }

.board-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.board-kpi {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 15px 12px; box-shadow: var(--shadow);
}
.board-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.board-kpi.amber::before { background: var(--amber); }
.board-kpi.violet::before { background: var(--violet); }
.board-kpi.green::before { background: var(--green); }
.board-kpi.cyan::before { background: #0891b2; }
.board-kpi.navy::before { background: #334155; }
.board-kpi-label { color: var(--muted); font-size: 10.5px; font-weight: 650; }
.board-kpi-value { font-size: 28px; font-weight: 750; letter-spacing: -.045em; line-height: 1; margin-top: 7px; }
.board-kpi-foot { color: var(--muted-2); font-size: 9.5px; margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.board-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.board-grid-top { grid-template-columns: minmax(0, 1.35fr) minmax(340px, .85fr); }
.board-grid-mid { grid-template-columns: minmax(0, 1.4fr) minmax(330px, .8fr); }
.board-grid-bottom { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.board-card { padding: 18px; min-width: 0; }
.board-card .section-head { margin-bottom: 12px; }

.stage-flow { display: flex; align-items: stretch; overflow-x: auto; padding: 4px 0 8px; }
.stage-node {
  flex: 1 1 0; min-width: 76px; position: relative;
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: 12px 9px 10px;
}
.stage-node::before { content: ""; position: absolute; left: 9px; right: 9px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.stage-node:nth-child(3)::before { background: var(--violet); }
.stage-node:nth-child(5)::before { background: var(--green); }
.stage-node:nth-child(7)::before { background: var(--amber); }
.stage-node:nth-child(9)::before { background: #0891b2; }
.stage-node:nth-child(11)::before { background: #64748b; }
.stage-node-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; color: var(--muted); font-size: 9.5px; font-weight: 650; white-space: nowrap; }
.stage-node-top em { font-style: normal; background: var(--red-soft); color: var(--red); border-radius: 999px; padding: 1px 4px; font-size: 8px; font-weight: 600; }
.stage-node strong { display: block; font-size: 23px; letter-spacing: -.04em; line-height: 1; margin-top: 8px; }
.stage-node small { display: block; color: var(--muted-2); font-size: 8.5px; margin-top: 4px; white-space: nowrap; }
.stage-node.is-overdue { background: #fff8f8; border-color: #fecaca; }
.stage-arrow { display: flex; align-items: center; color: var(--muted-2); font-size: 15px; padding: 0 1px; flex: none; }
.funnel-line { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 11px; border-top: 1px solid var(--line-soft); margin-top: 8px; padding-top: 11px; }
.funnel-line-label { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); font-weight: 750; }
.funnel-step { font-size: 10px; color: var(--muted); white-space: nowrap; }
.funnel-step b { color: var(--ink-2); font-weight: 650; }
.funnel-step em { font-style: normal; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 1px 5px; font-size: 8.5px; margin-left: 4px; }
.overdue-block { margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 9px; }
.overdue-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted-2); font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; margin-bottom: 2px; }
.overdue-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 3px; border-radius: 7px; cursor: pointer; }
.overdue-row:hover { background: var(--surface-2); }
.overdue-person { min-width: 0; }
.overdue-person strong { display: block; font-size: 10.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overdue-person span { display: block; color: var(--muted); font-size: 9px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.overdue-row b { color: var(--red); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.ai-funnel { display: flex; flex-direction: column; gap: 9px; }
.ai-funnel-label { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 10.5px; margin-bottom: 4px; }
.ai-funnel-label strong { color: var(--ink); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.ai-funnel-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ai-funnel-track i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.ai-funnel-track i.violet { background: var(--violet); }
.ai-funnel-track i.green { background: var(--green); }
.ai-funnel-track i.amber { background: var(--amber); }
.score-strip { margin-top: 15px; }
.score-strip-bar { display: flex; height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.score-strip-bar i { display: block; height: 100%; }
.score-strip-bar .s5, .score-legend i.s5 { background: var(--green); }
.score-strip-bar .s4, .score-legend i.s4 { background: var(--brand); }
.score-strip-bar .s3, .score-legend i.s3 { background: var(--amber); }
.score-strip-bar .s2, .score-legend i.s2 { background: var(--orange); }
.score-strip-bar .s1, .score-legend i.s1 { background: var(--red); }
.score-legend { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 7px; color: var(--muted); font-size: 9px; }
.score-legend span { display: inline-flex; align-items: center; gap: 4px; }
.score-legend i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.score-legend b { color: var(--ink-2); font-weight: 650; }
.ai-mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 14px; }
.ai-mini { background: var(--surface-2); border-radius: 8px; padding: 7px 8px; min-width: 0; }
.ai-mini span { display: block; color: var(--muted-2); font-size: 8.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-mini strong { display: block; font-size: 14px; letter-spacing: -.02em; margin-top: 2px; }
.ai-mini small { display: block; color: var(--muted-2); font-size: 8px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-note { margin-top: 13px; padding: 9px 10px; border-radius: 8px; background: var(--amber-soft); color: #92400e; font-size: 10px; line-height: 1.55; }

.trend-chart { width: 100%; height: 252px; }
.chart-fallback { height: 252px; display: grid; place-items: center; color: var(--muted); font-size: 11px; }

.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert-item {
  display: flex; align-items: center; gap: 0; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 0; overflow: hidden; transition: border-color .15s, background .15s;
}
.alert-item:hover { background: #fbfcfe; border-color: #cbd5e1; }
.alert-bar { width: 3px; align-self: stretch; flex: none; background: var(--muted-2); }
.alert-item.red .alert-bar { background: var(--red); }
.alert-item.amber .alert-bar { background: var(--amber); }
.alert-item.blue .alert-bar { background: var(--brand); }
.alert-item.gray .alert-bar { background: #94a3b8; }
.alert-copy { flex: 1; min-width: 0; padding: 10px 11px; }
.alert-copy strong { display: block; font-size: 11.5px; }
.alert-copy span { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; line-height: 1.45; }
.alert-arrow { color: var(--muted-2); font-size: 13px; padding-right: 12px; }

.job-board-card { margin-bottom: 16px; }
.job-board-table { table-layout: fixed; }
.job-board-table th, .job-board-table td { padding: 10px 12px; }
.job-board-table th:nth-child(1) { width: 24%; }
.job-board-table th:nth-child(2) { width: 5%; }
.job-board-table th:nth-child(3) { width: 7%; }
.job-board-table th:nth-child(4) { width: 29%; }
.job-board-table th:nth-child(5) { width: 6%; }
.job-board-table th:nth-child(6) { width: 6%; }
.job-board-table th:nth-child(7) { width: 6%; }
.job-board-table th:nth-child(8) { width: 8%; }
.job-title-cell { min-width: 0; }
.job-title-cell strong { display: block; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-title-cell small { display: block; color: var(--muted-2); font-size: 9.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.num.strong { font-weight: 750; }
.pending-dot {
  display: inline-grid; place-items: center; width: 14px; height: 14px; margin-left: 4px;
  border-radius: 50%; background: var(--red-soft); color: var(--red);
  font-size: 9px; font-weight: 800; vertical-align: 1px;
}
.text-red { color: var(--red); font-weight: 700; }
.stage-stack-cell { min-width: 0; }
.mini-stack { display: flex; height: 7px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.mini-stack i { display: block; height: 100%; }
.mini-stack .blue { background: #60a5fa; }
.mini-stack .violet { background: #a78bfa; }
.mini-stack .green { background: #34d399; }
.mini-stack .amber { background: #fbbf24; }
.mini-stack-legend { color: var(--muted-2); font-size: 8.5px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.health { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 9px; font-weight: 650; white-space: nowrap; }
.health.healthy { background: var(--green-soft); color: var(--green); }
.health.watch { background: var(--amber-soft); color: var(--amber); }
.health.risk { background: var(--red-soft); color: var(--red); }
.health.idle { background: var(--surface-2); color: var(--muted-2); }

.gate-list-mini { display: flex; flex-direction: column; gap: 10px; }
.gate-row-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 10.5px; margin-bottom: 4px; }
.gate-row-head strong { color: var(--ink); font-size: 11.5px; }
.gate-row-track { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.gate-row-track i { display: block; height: 100%; background: var(--red); opacity: .7; border-radius: 999px; }
.gate-actions { margin-top: 13px; }
.activity-list { display: flex; flex-direction: column; }
.activity-item { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 9px; align-items: start; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.activity-item:first-child { border-top: 0; }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-top: 5px; }
.activity-dot.stage { background: var(--green); }
.activity-dot.archive { background: var(--muted-2); }
.activity-dot.note { background: var(--violet); }
.activity-dot.gate { background: var(--red); }
.activity-copy { min-width: 0; }
.activity-copy strong { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-copy span { display: block; color: var(--muted); font-size: 9.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-item time { color: var(--muted-2); font-size: 9px; white-space: nowrap; }
.nav-item em.live { background: rgba(16,185,129,.14); color: #34d399; }
.sync-icon.spin { display: inline-block; animation: spin 1s linear infinite; }

/* ---------- candidate list ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head h2 { margin: 0; font-size: 24px; letter-spacing: -.035em; }
.page-head p { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; }
.filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.filter-search { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 8px; height: 34px; padding: 0 9px; min-width: 220px; flex: 1; max-width: 330px; }
.filter-search svg { width: 15px; height: 15px; color: var(--muted-2); }
.filter-search input { border: 0; outline: 0; width: 100%; font-size: 12px; background: transparent; }
.select {
  height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  color: var(--ink-2); padding: 0 28px 0 9px; font-size: 12px; outline: 0;
}
.chip-group { display: flex; gap: 5px; align-items: center; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  height: 30px; border-radius: 999px; padding: 0 10px; font-size: 11px; font-weight: 600;
}
.chip:hover { background: var(--surface-2); color: var(--ink); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.score-chip.is-active { background: var(--brand); border-color: var(--brand); }
.filter-divider { width: 1px; height: 22px; background: var(--line); margin: 0 2px; }

.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 700; padding: 12px 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
#candidate-table table { table-layout: fixed; }
#candidate-table th:nth-child(1) { width: 22%; }
#candidate-table th:nth-child(2) { width: 20%; }
#candidate-table th:nth-child(3) { width: 8%; }
#candidate-table th:nth-child(4) { width: 13%; white-space: nowrap; }
#candidate-table th:nth-child(5) { width: 12%; white-space: nowrap; }
#candidate-table th:nth-child(6) { width: 25%; }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover { background: #fbfcfe; }
tbody tr:last-child td { border-bottom: 0; }
.cand-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.cand-avatar {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff); color: #4338ca;
  font-weight: 700; font-size: 12px; flex: none;
}
.cand-name { font-weight: 650; font-size: 12.5px; }
.cand-sub { color: var(--muted); font-size: 10.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-cell { min-width: 200px; }
.job-cell strong { display: block; font-size: 12px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.job-cell small { color: var(--muted-2); font-size: 10px; }
.summary-cell { min-width: 0; max-width: 100%; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.status-cell { white-space: nowrap; }
.status-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.status-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
.status-badge.review .dot { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.status-badge.archived .dot { background: var(--muted-2); }
.status-badge.advance .dot { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.status-badge.reject .dot { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.status-badge.active .dot { background: var(--brand); }
.reco { font-size: 11px; font-weight: 600; white-space: nowrap; }
.reco.advance { color: var(--green); }
.reco.review { color: var(--amber); }
.reco.reject { color: var(--red); }
.table-empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.table-empty strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; }
.pager { display: flex; gap: 6px; align-items: center; }
.pager button { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 11px; }
.pager button:hover:not(:disabled) { background: var(--surface-2); }
.pager button:disabled { opacity: .4; cursor: not-allowed; }
.pager span { padding: 0 6px; }

/* ---------- job cards ---------- */
.jobs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.job-card { padding: 18px; }
.job-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.job-card h3 { margin: 0; font-size: 14px; letter-spacing: -.01em; }
.job-card .job-loc { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.job-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 14px; }
.job-metric { background: var(--surface-2); border-radius: 8px; padding: 8px; }
.job-metric strong { display: block; font-size: 16px; letter-spacing: -.02em; }
.job-metric span { display: block; color: var(--muted); font-size: 9.5px; margin-top: 1px; }
.job-card .job-bar-row { grid-template-columns: minmax(0,1fr) 1fr 44px; }

/* ---------- candidate 360 ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin-bottom: 14px; }
.back-link:hover { color: var(--ink); }
.candidate-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 24px; margin-bottom: 18px; }
.candidate-hero-main { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.hero-avatar { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #eef2ff, #dbeafe); color: #3730a3; font-size: 20px; font-weight: 750; flex: none; }
.candidate-hero h2 { margin: 0; font-size: 26px; letter-spacing: -.04em; line-height: 1.15; }
.candidate-hero .sub { display: flex; flex-wrap: wrap; gap: 7px 12px; align-items: center; color: var(--muted); font-size: 12px; margin-top: 7px; }
.candidate-hero .sub strong { color: var(--ink-2); font-weight: 600; }
.hero-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; }
.hero-summary { color: var(--ink-2); font-size: 12.5px; margin: 12px 0 0; max-width: 760px; }
.score-panel { display: flex; align-items: center; gap: 14px; }
.score-ring {
  --score: 3; --score-color: var(--amber);
  width: 94px; height: 94px; border-radius: 50%;
  background: conic-gradient(var(--score-color) calc(var(--score) * 20%), #eef1f5 0);
  display: grid; place-items: center; position: relative;
}
.score-ring::before { content: ""; position: absolute; inset: 8px; background: var(--surface); border-radius: 50%; }
.score-ring-inner { position: relative; text-align: center; }
.score-ring-inner strong { display: block; font-size: 27px; line-height: 1; letter-spacing: -.04em; color: var(--score-color); }
.score-ring-inner span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 4px; }
.score-meta { font-size: 11px; color: var(--muted); line-height: 1.7; }
.score-meta strong { display: block; color: var(--ink); font-size: 12.5px; }
.score-meta .reco { margin-top: 4px; display: inline-block; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.detail-rail { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 96px; }
.rail-card { padding: 18px; }
.rail-card h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: -.01em; }
.rail-card h3 .tiny { color: var(--muted-2); font-weight: 400; margin-left: 5px; }

.gate-list { display: flex; flex-direction: column; gap: 8px; }
.gate-item { display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; border-radius: 9px; background: var(--surface-2); }
.gate-icon { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; flex: none; background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.gate-item.pass .gate-icon { background: var(--green-soft); color: var(--green); border-color: #d1fae5; }
.gate-item.fail .gate-icon { background: var(--red-soft); color: var(--red); border-color: #fecaca; }
.gate-item.unknown .gate-icon { background: var(--amber-soft); color: var(--amber); border-color: #fde68a; }
.gate-body { min-width: 0; }
.gate-body strong { display: block; font-size: 11.5px; }
.gate-body span { display: block; color: var(--muted); font-size: 10.5px; margin-top: 1px; }
.gate-body em { font-style: normal; font-size: 9.5px; color: var(--muted-2); margin-left: 5px; }

.dim-list { display: flex; flex-direction: column; gap: 10px; }
.dim-card { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); overflow: hidden; }
.dim-card summary {
  list-style: none; cursor: pointer; display: grid;
  grid-template-columns: minmax(0, 1fr) 58px 22px; gap: 10px; align-items: center;
  padding: 13px 15px;
}
.dim-card summary::-webkit-details-marker { display: none; }
.dim-card summary:hover { background: #fbfcfe; }
.dim-title { min-width: 0; }
.dim-title strong { display: block; font-size: 12.5px; font-weight: 650; }
.dim-title .dim-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.dim-score { text-align: right; font-weight: 750; font-size: 15px; letter-spacing: -.02em; }
.dim-score span { font-size: 9px; color: var(--muted-2); font-weight: 500; }
.dim-caret { color: var(--muted-2); font-size: 11px; text-align: center; transition: transform .15s; }
.dim-card[open] .dim-caret { transform: rotate(180deg); }
.dim-body { padding: 0 15px 15px; border-top: 1px solid var(--line-soft); }
.dim-reason { color: var(--ink-2); font-size: 12px; margin: 12px 0; }
.dim-evidence-label { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; margin: 13px 0 6px; }
.quote {
  margin: 7px 0; padding: 10px 12px; border-left: 3px solid #bfdbfe;
  background: #f8fbff; border-radius: 0 8px 8px 0;
  color: #334155; font-size: 11.5px; line-height: 1.6;
}
.quote::before { content: "“"; color: #93c5fd; font-size: 18px; line-height: 0; vertical-align: -4px; margin-right: 2px; }
.quote::after { content: "”"; color: #93c5fd; font-size: 18px; line-height: 0; vertical-align: -4px; margin-left: 2px; }
.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.evidence-box { background: var(--surface-2); border-radius: 8px; padding: 8px 9px; }
.evidence-box span { display: block; color: var(--muted-2); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.evidence-box strong { display: block; font-size: 11px; margin-top: 2px; }
.verify-list, .assumption-list { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 11.5px; }
.verify-list li, .assumption-list li { margin: 4px 0; }

.rail-summary { font-size: 12px; color: var(--ink-2); line-height: 1.7; }
.rail-list { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.rail-list li { position: relative; padding-left: 14px; font-size: 11.5px; color: var(--ink-2); line-height: 1.55; }
.rail-list li::before { content: ""; position: absolute; left: 0; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); }
.rail-list.risks li::before { background: var(--red); }
.rail-list.highlights li::before { background: var(--green); }
.note-box {
  background: #0f172a; color: #dbe4f0; border-radius: 10px; padding: 13px;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 10.5px; line-height: 1.65; max-height: 240px; overflow: auto; white-space: pre-wrap;
}
.copy-row { display: flex; justify-content: flex-end; margin-top: 8px; }

.timeline { position: relative; display: flex; flex-direction: column; gap: 13px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding-left: 18px; }
.timeline-item::before { content: ""; position: absolute; left: 1px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.timeline-item.gate::before { border-color: var(--red); }
.timeline-item.archive::before { border-color: var(--muted-2); }
.timeline-item.note::before { border-color: var(--violet); }
.timeline-item.stage_move::before { border-color: var(--green); }
.timeline-item strong { display: block; font-size: 11.5px; font-weight: 600; }
.timeline-item span { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }

.decision-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 9px; }
.decision-actions .btn { width: 100%; padding: 0 4px; font-size: 10.5px; }
.decision-note { width: 100%; min-height: 62px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: 8px 9px; font-size: 11px; outline: none; margin-top: 8px; }
.decision-note:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.decision-result { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 11px; display: none; }

.empty-state { padding: 70px 20px; text-align: center; }
.empty-state .empty-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin: 0 auto 12px; background: var(--surface-2); color: var(--muted-2); font-size: 20px; }
.empty-state h3 { margin: 0 0 5px; font-size: 15px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }

.loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60vh; color: var(--muted); font-size: 12.5px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 100;
  background: var(--navy); color: #fff; padding: 11px 15px; border-radius: 10px;
  font-size: 12px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px);
  pointer-events: none; transition: opacity .2s, transform .2s; max-width: 360px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #7f1d1d; }

.drawer-backdrop { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 35; }
.drawer-backdrop.show { display: block; }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv strong { font-weight: 550; text-align: right; }
.code-block { background: #0f172a; color: #dbe4f0; border-radius: 10px; padding: 13px; font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 10.5px; line-height: 1.7; overflow: auto; }
.note-warning { background: var(--amber-soft); border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: 11px 13px; font-size: 11.5px; line-height: 1.6; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .dash-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 310px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .board-grid-top, .board-grid-mid, .board-grid-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  :root { --sidebar: 220px; }
  .content { padding: 20px; }
  .topbar { padding: 12px 20px; }
  .search-box { width: 220px; }
  .search-box kbd { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-rail { position: static; }
  .jobs-grid { grid-template-columns: 1fr; }
  .board-head { flex-direction: column; align-items: flex-start; }
  .board-controls { justify-content: flex-start; }
  .board-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; width: 250px; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; width: 100%; }
  .menu-btn { display: grid; }
  .topbar-title { min-width: 0; }
  .topbar-title h1 { font-size: 17px; }
  .topbar-actions .search-box { display: none; }
  .topbar-actions .btn.ghost { display: none; }
  .content { padding: 16px 14px 40px; }
  .stat-grid { gap: 10px; }
  .stat-value { font-size: 25px; }
  .candidate-hero { grid-template-columns: 1fr; }
  .score-panel { justify-content: flex-start; }
  .filters { gap: 6px; }
  .filter-search { max-width: none; min-width: 100%; }
  .table-foot { flex-direction: column; align-items: flex-start; }
  .settings-grid { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: 1fr 1fr; }
  .board-head h2 { font-size: 23px; }
  .board-controls { width: 100%; }
  .board-select { flex: 1 1 auto; }
  .board-select select { max-width: none; width: 100%; }
  .freshness { width: 100%; }
  .board-kpi-value { font-size: 24px; }
  .board-card { padding: 14px; }
  .stage-node { min-width: 98px; }
  .ai-mini-grid { grid-template-columns: 1fr 1fr; }
  .trend-chart { height: 220px; }
  .job-board-table { min-width: 720px; }
}

/* ---------- public demo ---------- */
.demo-body { background: #eef2f8; }
.demo-topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229,231,235,.9);
}
.demo-topbar-inner {
  max-width: 1500px; margin: 0 auto; padding: 12px 28px;
  display: flex; align-items: center; gap: 24px;
}
.demo-brand { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.demo-logo {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff;
  font-size: 17px; font-weight: 800; box-shadow: 0 8px 20px rgba(37,99,235,.25);
}
.demo-brand strong { display: block; font-size: 14px; line-height: 1.1; letter-spacing: -.01em; }
.demo-brand span { display: block; color: var(--muted); font-size: 10.5px; margin-top: 3px; }
.demo-nav { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.demo-nav a { padding: 7px 10px; border-radius: 8px; color: var(--muted); font-size: 12px; font-weight: 550; }
.demo-nav a:hover { background: var(--surface-2); color: var(--ink); }
.demo-actions { display: flex; align-items: center; gap: 8px; }
.demo-content { margin: 0 auto; width: 100%; }
.demo-banner {
  display: flex; align-items: center; gap: 9px;
  background: #ecfdf5; border: 1px solid #d1fae5; color: #065f46;
  border-radius: 10px; padding: 9px 12px; font-size: 11.5px; margin-bottom: 16px;
}
.demo-banner b { font-weight: 700; }
.demo-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 22px;
  background: radial-gradient(1100px 500px at 15% -20%, #1d4ed8 0%, transparent 55%), linear-gradient(135deg, #0b1220, #172554 70%, #1e293b);
  color: #fff; border-radius: 18px; padding: 30px 32px; margin-bottom: 18px;
  box-shadow: 0 20px 50px rgba(15,23,42,.18);
}
.demo-hero::after {
  content: ""; position: absolute; right: -90px; top: -110px; width: 310px; height: 310px;
  border-radius: 50%; border: 1px solid rgba(147,197,253,.18);
  box-shadow: 0 0 0 45px rgba(147,197,253,.04), 0 0 0 90px rgba(147,197,253,.03);
}
.demo-hero-copy { position: relative; z-index: 1; }
.demo-kicker { display: block; font-size: 9.5px; letter-spacing: .18em; font-weight: 750; color: #93c5fd; margin-bottom: 8px; }
.demo-hero h1 { margin: 0; font-size: 34px; letter-spacing: -.045em; line-height: 1.08; }
.demo-hero p { margin: 10px 0 0; color: #cbd5e1; font-size: 13px; line-height: 1.7; max-width: 720px; }
.demo-hero-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 22px; max-width: 560px; }
.demo-hero-metric { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.09); border-radius: 10px; padding: 10px 11px; }
.demo-hero-metric strong { display: block; font-size: 20px; letter-spacing: -.03em; }
.demo-hero-metric span { display: block; color: #94a3b8; font-size: 9.5px; margin-top: 3px; }
.demo-hero-side { position: relative; z-index: 1; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 16px; align-self: center; }
.demo-hero-side h3 { margin: 0 0 10px; font-size: 12px; color: #e2e8f0; }
.demo-hero-side p { margin: 0; color: #94a3b8; font-size: 10.5px; line-height: 1.65; }
.demo-hero-side ul { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.demo-hero-side li { color: #cbd5e1; font-size: 10px; padding-left: 12px; position: relative; }
.demo-hero-side li::before { content: ""; position: absolute; left: 0; top: 5px; width: 5px; height: 5px; border-radius: 50%; background: #34d399; }
.demo-section { margin: 20px 0; }
.demo-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.demo-section-head h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.demo-section-head p { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; }
.demo-section-head .pill { flex: none; }
.demo-candidates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.candidate-demo-card { padding: 15px; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.candidate-demo-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(15,23,42,.09); border-color: #cbd5e1; }
.candidate-demo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.candidate-demo-person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.candidate-demo-avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg,#eef2ff,#dbeafe); color: #3730a3; font-weight: 700; font-size: 12px; flex: none; }
.candidate-demo-name { font-size: 12px; font-weight: 700; }
.candidate-demo-job { color: var(--muted); font-size: 10px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.candidate-demo-summary { color: var(--muted); font-size: 10.5px; line-height: 1.55; margin: 10px 0 11px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.candidate-demo-meta { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.candidate-demo-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.candidate-demo-foot span { color: var(--muted-2); font-size: 9.5px; }
.candidate-demo-foot b { color: var(--brand); font-size: 10.5px; font-weight: 650; }
.demo-promo-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 14px; align-items: stretch; }
.demo-promo-card {
  position: relative; overflow: hidden; color: #fff; border-radius: var(--radius); padding: 22px;
  background: radial-gradient(600px 260px at 100% 0%, #f59e0b 0%, transparent 55%), linear-gradient(135deg, #111827, #1e293b 65%, #0f172a);
  box-shadow: 0 18px 40px rgba(15,23,42,.18);
}
.demo-promo-card::after { content: ""; position: absolute; right: -50px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%; border: 1px solid rgba(251,191,36,.2); box-shadow: 0 0 0 40px rgba(251,191,36,.04); }
.demo-promo-label { display: inline-flex; align-items: center; gap: 5px; background: rgba(251,191,36,.14); color: #fbbf24; border: 1px solid rgba(251,191,36,.25); border-radius: 999px; padding: 3px 8px; font-size: 9px; font-weight: 700; letter-spacing: .05em; }
.demo-promo-card h3 { position: relative; z-index: 1; margin: 12px 0 0; font-size: 23px; letter-spacing: -.035em; }
.demo-promo-card p { position: relative; z-index: 1; color: #cbd5e1; font-size: 11.5px; line-height: 1.7; margin: 8px 0 0; max-width: 520px; }
.demo-promo-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.demo-promo-card .btn.primary { background: #fbbf24; color: #111827; box-shadow: 0 8px 20px rgba(251,191,36,.22); }
.demo-promo-card .btn.primary:hover { background: #f59e0b; }
.demo-promo-note { color: #94a3b8; font-size: 9.5px; }
.demo-byok-card { padding: 18px; }
.demo-byok-card h3 { margin: 0; font-size: 14px; }
.demo-byok-card p { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.demo-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.demo-form-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; align-items: center; }
.demo-form-row label { color: var(--muted); font-size: 10px; font-weight: 600; }
.demo-form-row input {
  height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 9px;
  font-size: 10.5px; outline: 0; width: 100%; background: var(--surface);
}
.demo-form-row input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59,130,246,.08); }
.demo-form-actions { display: flex; gap: 7px; margin-top: 3px; }
.demo-form-note { color: var(--muted-2); font-size: 9px; line-height: 1.5; }
.demo-footer { max-width: 1500px; margin: 0 auto; padding: 10px 28px 42px; color: var(--muted-2); font-size: 10px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.demo-footer a { color: var(--brand); }
.demo-modal { position: fixed; inset: 0; z-index: 90; background: rgba(15,23,42,.55); display: none; align-items: center; justify-content: center; padding: 24px; }
.demo-modal.show { display: flex; }
.demo-modal-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; width: min(780px, 100%); max-height: 86vh; overflow: auto; box-shadow: 0 30px 80px rgba(15,23,42,.3); }
.demo-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.demo-modal-head h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.demo-modal-head p { margin: 3px 0 0; color: var(--muted); font-size: 10.5px; }
.demo-modal-close { width: 30px; height: 30px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; color: var(--muted); font-size: 14px; }
.demo-modal-body { padding: 18px 22px 22px; }
.demo-dim-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 14px; }
.demo-dim { background: var(--surface-2); border-radius: 9px; padding: 9px 10px; }
.demo-dim span { display: block; color: var(--muted-2); font-size: 8.5px; text-transform: uppercase; letter-spacing: .05em; }
.demo-dim strong { display: block; font-size: 12px; margin-top: 2px; }
.demo-modal-section { margin-top: 14px; }
.demo-modal-section h4 { margin: 0 0 6px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); }
.demo-modal-section p { margin: 0; color: var(--ink-2); font-size: 11.5px; line-height: 1.7; }
.demo-modal-section ul { margin: 0; padding-left: 17px; color: var(--ink-2); font-size: 11.5px; line-height: 1.7; }
.demo-quote { margin: 7px 0; padding: 9px 11px; border-left: 3px solid #bfdbfe; background: #f8fbff; border-radius: 0 8px 8px 0; color: #334155; font-size: 10.5px; line-height: 1.6; }
.demo-login-form { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.demo-login-form label { font-size: 10px; color: var(--muted); font-weight: 600; }
.demo-login-form input { height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 11px; font-size: 12px; outline: 0; }
.demo-login-form input:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59,130,246,.08); }
.demo-modal-note { background: var(--amber-soft); border: 1px solid #fde68a; color: #92400e; border-radius: 9px; padding: 9px 11px; font-size: 10px; line-height: 1.6; margin-top: 10px; }

/* Serverless auth / BYOK / score */
[hidden] { display: none !important; }
.demo-auth-user {
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink-2); font-size: 10.5px; font-weight: 600;
}
.demo-auth-tabs {
  display: flex; gap: 4px; padding: 4px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--line-soft);
}
.demo-auth-tabs button {
  flex: 1; height: 30px; border: 0; border-radius: 6px; background: transparent;
  color: var(--muted); font-size: 11px; font-weight: 650; cursor: pointer;
}
.demo-auth-tabs button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.08); }
.demo-turnstile { min-height: 0; }
.demo-turnstile:empty { display: none; }

.demo-score-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: 14px; align-items: start;
}
.demo-score-form-card, .demo-score-result { padding: 16px; }
.demo-score-result { min-height: 300px; }
.demo-form-row textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 9px;
  font-size: 10.5px; line-height: 1.6; outline: 0; background: var(--surface);
  font-family: inherit; resize: vertical;
}
.demo-form-row textarea:focus { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59,130,246,.08); }
.demo-form-row-inline {
  grid-template-columns: 84px 82px 84px minmax(0, 1fr) auto minmax(0, 1fr);
}
.demo-range-dash { color: var(--muted-2); text-align: center; font-size: 11px; }
.demo-score-result .empty-state { padding: 48px 12px; }

.score-result-head { display: flex; align-items: center; gap: 12px; }
.score-result-head .score-badge { min-width: 52px; font-size: 18px; padding: 7px 10px; }
.score-result-rec { font-size: 15px; font-weight: 750; letter-spacing: -.02em; }
.score-result-sub { color: var(--muted); font-size: 9.5px; margin-top: 3px; }
.score-gate {
  margin-top: 12px; border-radius: 8px; padding: 8px 10px;
  font-size: 10px; line-height: 1.5; border: 1px solid;
}
.score-gate.pass { background: var(--green-soft); border-color: #d1fae5; color: #047857; }
.score-gate.fail { background: var(--red-soft); border-color: #fecaca; color: #b91c1c; }
.score-summary { margin: 12px 0 0; color: var(--ink-2); font-size: 11.5px; line-height: 1.7; }
.score-dims { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.score-dim { border: 1px solid var(--line-soft); border-radius: 9px; padding: 10px; background: #fcfdff; }
.score-dim-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.score-dim-head strong { font-size: 11px; }
.score-dim-score {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; padding: 2px 7px; border-radius: 6px; border: 1px solid transparent;
  font-size: 10px; font-weight: 750;
}
.score-dim-meta { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.score-dim-meta span {
  background: var(--surface-2); border-radius: 999px; padding: 2px 6px;
  color: var(--muted); font-size: 8.5px;
}
.score-dim p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.score-dim blockquote {
  margin: 7px 0 0; padding: 7px 9px; border-left: 2px solid #bfdbfe;
  background: #f8fbff; border-radius: 0 6px 6px 0; color: #334155;
  font-size: 9.5px; line-height: 1.6;
}
.score-block { margin-top: 13px; }
.score-block h4, .score-note h4 {
  margin: 0 0 5px; color: var(--muted-2); font-size: 9px;
  letter-spacing: .06em; text-transform: uppercase;
}
.score-block ul { margin: 0; padding-left: 16px; color: var(--ink-2); font-size: 10.5px; line-height: 1.7; }
.score-block.risk ul { color: #9a3412; }
.score-block.good ul { color: #047857; }
.score-note { margin-top: 13px; padding: 10px; border-radius: 9px; background: var(--surface-2); }
.score-note p { margin: 0; color: var(--ink-2); font-size: 10.5px; line-height: 1.7; }
.score-result-foot {
  display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line-soft);
  color: var(--muted-2); font-size: 9px;
}
.text-amber { color: #b45309; }

@media (max-width: 1180px) {
  .demo-hero { grid-template-columns: 1fr; }
  .demo-candidates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-promo-grid { grid-template-columns: 1fr; }
  .demo-score-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .demo-topbar-inner { padding: 10px 14px; gap: 10px; }
  .demo-nav { display: none; }
  .demo-brand { min-width: 0; flex: 1; }
  .demo-brand span { display: none; }
  .demo-actions .btn.ghost { display: none; }
  .demo-content { padding: 16px 14px 30px; }
  .demo-hero { padding: 22px 18px; }
  .demo-hero h1 { font-size: 26px; }
  .demo-hero-metrics { grid-template-columns: 1fr 1fr; }
  .demo-candidates { grid-template-columns: 1fr; }
  .demo-section-head { flex-direction: column; align-items: flex-start; }
  .demo-dim-grid { grid-template-columns: 1fr; }
  .demo-footer { padding: 0 14px 28px; flex-direction: column; }
  .demo-form-row-inline { grid-template-columns: 84px minmax(0, 1fr); }
  .demo-form-row-inline .demo-range-dash { display: none; }
}
