:root {
  --bg: #f7f7f5; --surface: #fff; --text: #1d1d1b; --muted: #6b6b66; --line: #e2e1dc;
  --accent: #2f5fd0; --accent-ink: #fff; --good: #1f7a4a; --warn: #a15c00; --bad: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161615; --surface: #1f1f1d; --text: #ecebe6; --muted: #a3a29b; --line: #34332f;
          --accent: #7aa2ff; --accent-ink: #10131a; --good: #5fc48d; --warn: #e3a54a; --bad: #ff8a80; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
main { max-width: 1040px; margin: 0 auto; padding: 24px 16px 64px; }
.topbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar nav { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.brand { font-weight: 600; color: var(--text); text-decoration: none; }
h1 { font-size: 22px; margin: 0 0 16px; } h2 { font-size: 16px; margin: 20px 0 8px; }
.heading-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: baseline; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.narrow { max-width: 520px; margin: 0 auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 16px 0; }
.muted { color: var(--muted); }
button, .button { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 6px; padding: 8px 14px; font: inherit; cursor: pointer; text-decoration: none; }
.button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.link { background: none; color: var(--accent); padding: 0; }
button.danger { color: var(--bad); margin-top: 24px; }
form.inline { display: inline; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; width: 100%; }
input[type=checkbox] { width: auto; }
form p label { display: block; font-weight: 600; margin-bottom: 4px; }
.helptext { color: var(--muted); font-size: 13px; }
.errorlist { color: var(--bad); margin: 4px 0; padding-left: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.filters select { width: auto; } .filters input { flex: 1; min-width: 180px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
.stage-counts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 12px; }
.stage-counts li { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; font-size: 13px; color: var(--muted); }
.stage-counts span { color: var(--text); font-weight: 600; }
.stage { font-size: 13px; font-weight: 600; }
.stage-offer, .stage-accepted { color: var(--good); }
.stage-interview, .stage-screen { color: var(--accent); }
.stage-rejected, .stage-no_response, .stage-withdrawn { color: var(--muted); }
.badge { font-size: 12px; color: var(--warn); border: 1px solid var(--warn); border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
.flash { border-radius: 6px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); }
.flash.success { border-color: var(--good); } .flash.info { border-color: var(--warn); }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dt { color: var(--muted); } dd { margin: 0; }
.history { padding-left: 18px; }
.codes { columns: 2; list-style: none; padding: 0; font-size: 16px; }
.qr svg { width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: 8px; }
.notes { white-space: normal; }
.score { display: inline-block; min-width: 2.2em; text-align: center; font-weight: 600; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.score.big { font-size: 22px; padding: 4px 12px; }
.score-strong { color: var(--good); border-color: var(--good); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 12px 0; }
.secondary-button { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
table.plain { border: 0; } table.plain td { border: 0; padding: 4px 8px 4px 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.description { color: var(--text); font-size: 14px; }
@media (max-width: 560px) { .wide-only { display: none; } th, td { padding: 8px; } }
.chart-card { margin: 16px 0; }
.chart { width: 100%; height: 320px; }
.chart.short { height: 200px; }
