/* UNCOVER Hub — one stylesheet, token-driven, light + dark.
   Theme: data-theme on <html> ("light" | "dark"), else follows the OS. */

/* Palette from uncovertalent.co.uk: charcoal ink, lavender/cream grounds,
   violet #A084F5 + acid lime #E5FD87 accents. Display type: Syne. */
:root {
  --bg: #f5f2ff;
  --surface: #ffffff;
  --surface-2: #f4f4ef;
  --line: #e7e4f0;
  --line-strong: #d9d9d4;
  --ink: #1a1d1f;
  --ink-2: #424244;
  --ink-3: #6b6f73;
  --charcoal: #424244;
  --night: #0f0f0f;
  --violet: #a084f5;
  --violet-ink: #6e52c2;      /* violet dark enough for text on white */
  --violet-soft: #ece6ff;
  --lime: #e5fd87;
  --lime-ink: #4a5a12;
  --lime-soft: #f4fdd0;
  --beige: #f1e9dd;
  --accent: var(--violet-ink);
  --accent-soft: var(--violet-soft);
  --ok: #2f7a3e;     --ok-soft: #e4f4d8;
  --warn: #9a6200;   --warn-soft: #fbf0d9;
  --bad: #c03636;    --bad-soft: #fdecec;
  --info: #3d5fb8;   --info-soft: #e9eefb;
  --side-bg: var(--night);
  --side-ink: #ffffff;
  --side-muted: rgba(255,255,255,.55);
  --side-hover: rgba(255,255,255,.07);
  --side-line: rgba(255,255,255,.1);
  --shadow: none;
  --radius: 20px;
  --radius-sm: 12px;
  --side-w: 236px;
  --font-display: "Syne", "Inter", sans-serif;
  --col-bg: rgba(255,255,255,.55);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f0f; --surface: #1a1a1a; --surface-2: #222224; --line: #2a2a2d; --line-strong: #38383c;
    --ink: #f4f3f7; --ink-2: #c9c7d0; --ink-3: #8c8a94; --charcoal: #e9e7ef;
    --violet-ink: #b9a4ff; --violet-soft: #241d3a; --lime-ink: #e5fd87; --lime-soft: #262b14;
    --ok: #7fd18f; --ok-soft: #15261a; --warn: #e7b356; --warn-soft: #2a2210;
    --bad: #f07a7a; --bad-soft: #2c1515; --info: #8fa9ff; --info-soft: #161d33;
    --side-bg: #0a0a0a; --col-bg: #151515; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0f0f; --surface: #1a1a1a; --surface-2: #222224; --line: #2a2a2d; --line-strong: #38383c;
  --ink: #f4f3f7; --ink-2: #c9c7d0; --ink-3: #8c8a94; --charcoal: #e9e7ef;
  --violet-ink: #b9a4ff; --violet-soft: #241d3a; --lime-ink: #e5fd87; --lime-soft: #262b14;
  --ok: #7fd18f; --ok-soft: #15261a; --warn: #e7b356; --warn-soft: #2a2210;
  --bad: #f07a7a; --bad-soft: #2c1515; --info: #8fa9ff; --info-soft: #161d33;
  --side-bg: #0a0a0a; --col-bg: #151515; color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink-2); font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.45; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a.link, .md-content a { color: var(--accent); }
a.link:hover { text-decoration: underline; }
svg.i { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Type ── */
h1 { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--ink); letter-spacing: .2px; margin-bottom: 4px; }
h2 { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
h3 { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.sub { font-size: 13px; color: var(--ink-3); margin-bottom: 28px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }

/* ── Forms ── */
input, select, textarea { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; color: var(--ink); font-size: 14px; padding: 9px 11px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; font-family: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
input[type=file] { padding: 7px; background: var(--surface-2); }
input[type=checkbox] { width: auto; }
textarea { resize: vertical; min-height: 90px; }
.label { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-section { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--violet-ink); margin: 8px 0 12px; grid-column: 1 / -1; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 999px; border: 1px solid transparent; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, opacity .15s; font-family: inherit; white-space: nowrap; line-height: 1.2; }
.btn-primary { background: var(--charcoal); color: var(--surface); }
.btn-primary:hover { background: var(--night); }
.btn-accent { background: var(--lime); color: var(--night); }
.btn-accent:hover { background: #d8f45f; }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--charcoal); }
.btn-danger { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); }
.btn-sm { padding: 6px 13px; font-size: 12px; }
.btn-icon { padding: 6px; background: transparent; border: none; color: var(--ink-3); cursor: pointer; border-radius: 6px; display: inline-flex; }
.btn-icon:hover { background: var(--surface-2); color: var(--ink); }

/* ── App shell ── */
.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--side-bg); color: var(--side-ink); display: flex; flex-direction: column; padding: 22px 14px 16px; }
.brand { display: flex; flex-direction: column; gap: 6px; padding: 2px 10px 22px; }
.brand-logo { height: 22px; width: auto; align-self: flex-start; filter: brightness(0) invert(1); }
.brand-sub { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--side-muted); }
.brand-sub img { height: 9px; }
.side-search { display: flex; align-items: center; gap: 8px; padding: 9px 12px; margin: 0 0 16px; background: var(--side-hover); border: 1px solid var(--side-line); border-radius: 999px; color: var(--side-muted); font-size: 13px; cursor: pointer; width: 100%; font-family: inherit; }
.side-search:hover { color: var(--side-ink); }
.side-search kbd { margin-left: auto; font-family: inherit; font-size: 11px; border: 1px solid var(--side-line); border-radius: 4px; padding: 0 5px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 999px; color: rgba(255,255,255,.78); font-weight: 500; font-size: 13.5px; }
.side-nav a:hover { background: var(--side-hover); color: var(--side-ink); }
.side-nav a.active { background: var(--lime); color: var(--night); font-weight: 600; }
.side-nav .count { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--side-muted); }
.side-nav a.active .count { color: rgba(15,15,15,.6); }
.side-nav .count.pill { color: var(--night); background: var(--lime); }
.side-nav a.active .count.pill { background: var(--night); color: var(--lime); }
.side-label { font-size: 10.5px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--side-muted); padding: 18px 12px 6px; }
.side-foot { margin-top: auto; border-top: 1px solid var(--side-line); padding-top: 14px; display: flex; align-items: center; gap: 10px; }
.side-foot .who { flex: 1; min-width: 0; font-size: 13px; color: var(--side-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who a { display: block; font-weight: 400; font-size: 12px; color: var(--side-muted); }
.side .btn-icon { color: var(--side-muted); }
.side .btn-icon:hover { background: var(--side-hover); color: var(--side-ink); }
.side .avatar { background: var(--violet); color: var(--night); }
.main { min-width: 0; }
.topbar { display: none; }
.page { max-width: 1180px; margin: 0 auto; padding: 32px 32px 64px; }
.page-mid { max-width: 760px; margin: 0 auto; padding: 32px 32px 64px; }
.page-narrow { max-width: 420px; margin: 0 auto; padding: 80px 24px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .sub { margin-bottom: 0; }
.crumbs { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.crumbs a:hover { color: var(--ink); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Cards / panels ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 8px; }
.card-head h2 { margin: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-head { padding: 16px 20px 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.stack > * + * { margin-top: 16px; }

/* ── Stat tiles ── */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); display: block; }
a.tile:hover { border-color: var(--line-strong); }
.tile-label { font-size: 12px; color: var(--ink-3); font-weight: 500; margin-bottom: 6px; }
.tile-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.tile-foot { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.tile.accent { background: #424244; border-color: #424244; }
.tile.accent .tile-label, .tile.accent .tile-foot { color: rgba(255,255,255,.65); }
.tile.accent .tile-value { color: var(--lime); }
.tile-dot { display: block; height: 14px; margin-bottom: 10px; }

/* ── Funnel ── */
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 92px 1fr 32px; align-items: center; gap: 10px; font-size: 13px; }
.funnel-bar { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.funnel-bar span { display: block; height: 100%; border-radius: 6px; background: #c9c3dc; min-width: 2px; }
.funnel-row.s-interview .funnel-bar span, .funnel-row.s-offer .funnel-bar span { background: var(--violet); }
.funnel-row.s-placed .funnel-bar span { background: #b8d84a; }
.funnel-row .n { text-align: right; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-2); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr.row-link { cursor: pointer; }
tr.row-link:hover td { background: var(--surface-2); }
td .primary { color: var(--ink); font-weight: 600; }
td .secondary { font-size: 12px; color: var(--ink-3); }

/* ── Pills / badges ── */
.pill, .badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.plain::before { display: none; }
.st-active, .st-open, .st-ok { background: var(--ok-soft); color: var(--ok); }
.st-placed { background: var(--lime); color: #2c360a; }
.st-passive, .st-prospect, .st-on_hold, .st-interested, .st-approached { background: var(--info-soft); color: var(--info); }
.st-submitted { background: var(--beige); color: #6b5a3e; }
.st-interview, .st-offer { background: var(--violet-soft); color: var(--violet-ink); }
.st-not_looking, .st-dormant, .st-closed, .st-filled { background: var(--surface-2); color: var(--ink-3); }
.st-do_not_contact, .st-rejected, .st-overdue { background: var(--bad-soft); color: var(--bad); }
.st-today { background: var(--warn-soft); color: var(--warn); }
.badge-admin { background: var(--violet-soft); color: var(--violet-ink); }
.badge-owner { background: var(--warn-soft); color: var(--warn); }
.badge-member { background: var(--surface-2); color: var(--ink-3); }
.tag { display: inline-block; padding: 2px 8px; margin: 0 4px 4px 0; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }

/* ── Filter bar ── */
.filters { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.filters input[type=search] { max-width: 320px; }
.filters select { width: auto; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg a { padding: 5px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ── Detail page bits ── */
.profile-head { display: flex; gap: 16px; align-items: center; }
.monogram { width: 52px; height: 52px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 19px; flex-shrink: 0; letter-spacing: -.02em; }
.monogram.sm { width: 32px; height: 32px; font-size: 12px; }
.monogram.co { background: var(--beige); color: #424244; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.fact .k { font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }
.fact .v { color: var(--ink); font-weight: 500; word-break: break-word; }
.fact .v:empty::after { content: "—"; color: var(--ink-3); font-weight: 400; }
.list-rows > * { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list-rows > *:last-child { border-bottom: none; }
.list-rows .grow { flex: 1; min-width: 0; }
.cv-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 10px; }

/* ── Activity timeline ── */
.composer { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.composer-row { display: flex; gap: 8px; align-items: center; }
.composer select { width: auto; }
.composer textarea { min-height: 64px; }
.timeline { position: relative; }
.tl-item { display: flex; gap: 12px; padding-bottom: 16px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 1px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 27px; height: 27px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3); flex-shrink: 0; }
.tl-dot svg.i { width: 13px; height: 13px; }
.tl-item.k-stage .tl-dot { background: var(--violet-soft); color: var(--violet-ink); border-color: transparent; }
.tl-item.k-call .tl-dot, .tl-item.k-meeting .tl-dot { background: var(--info-soft); color: var(--info); border-color: transparent; }
.tl-item.k-email .tl-dot { background: var(--beige); color: #6b5a3e; border-color: transparent; }
.tl-body { flex: 1; min-width: 0; padding-top: 3px; }
.tl-meta { font-size: 12px; color: var(--ink-3); }
.tl-meta strong { color: var(--ink-2); font-weight: 600; }
.tl-text { color: var(--ink); margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.tl-item .btn-icon { visibility: hidden; align-self: flex-start; }
.tl-item:hover .btn-icon { visibility: visible; }

/* Visibility markers: the "client-visible" / "candidate-visible" conventions */
.vis { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; }
.vis-client { background: var(--violet-soft); color: var(--violet-ink); }
.vis-cand { background: var(--lime-soft); color: var(--lime-ink); }
.vis-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-3); white-space: nowrap; cursor: pointer; }
.composer-row { flex-wrap: wrap; }
.tl-item.k-feedback .tl-dot { background: var(--lime); color: #2c360a; border-color: transparent; }

/* ── Tasks ── */
.task { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: none; }
.task-check { width: 18px; height: 18px; margin-top: 1px; border-radius: 5px; border: 1.5px solid var(--line-strong); background: var(--surface); cursor: pointer; display: grid; place-items: center; flex-shrink: 0; padding: 0; color: transparent; }
.task-check:hover { border-color: var(--ok); }
.task.done .task-check { background: var(--ok); border-color: var(--ok); color: #fff; }
.task.done .task-title { text-decoration: line-through; color: var(--ink-3); }
.task-title { color: var(--ink); font-weight: 500; }
.task-meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.task-meta a:hover { color: var(--ink); }
.task-add { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.task-add input[name=title] { flex: 1 1 200px; }
.task-add input[type=date] { flex: 1 1 130px; width: auto; }

/* ── Kanban ── */
.board { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: var(--col-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 160px; transition: background .12s, border-color .12s; }
.col.drag-over { border-color: var(--violet); background: var(--violet-soft); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--ink); }
.col-head .n { font-family: "Inter", sans-serif; margin-left: auto; font-size: 11px; color: var(--ink-3); background: var(--surface); border-radius: 999px; padding: 1px 8px; }
.col-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.col[data-stage=submitted] .dot { background: #d9c9ac; }
.col[data-stage=interview] .dot, .col[data-stage=offer] .dot { background: var(--violet); }
.col[data-stage=placed] .dot { background: #b8d84a; }
.col[data-stage=rejected] .dot { background: var(--bad); }
.col[data-stage=approached] .dot, .col[data-stage=interested] .dot { background: var(--info); }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow); transition: border-color .12s, transform .12s; }
.kcard:hover { border-color: var(--line-strong); }
.kcard.dragging { opacity: .5; transform: rotate(1.5deg); }
.kcard-name { font-weight: 600; color: var(--ink); display: block; }
.kcard-name:hover { color: var(--violet-ink); }
.kcard-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.kcard-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; white-space: nowrap; margin-top: 8px; font-size: 11.5px; color: var(--ink-3); }
.kcard select { font-size: 11.5px; padding: 3px 4px; flex: 1 1 auto; min-width: 0; width: auto; border-radius: 6px; }
.kcard-foot > span { flex-shrink: 0; }
.col-empty { font-size: 12px; color: var(--ink-3); text-align: center; padding: 18px 6px; border: 1px dashed var(--line-strong); border-radius: 8px; }

/* ── Picker (add candidate to job) ── */
.picker { position: relative; }
.picker-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.12); z-index: 30; max-height: 320px; overflow-y: auto; }
.picker-results button { display: block; width: 100%; text-align: left; padding: 9px 12px; background: none; border: none; border-bottom: 1px solid var(--line); cursor: pointer; font-family: inherit; color: var(--ink-2); font-size: 13px; }
.picker-results button:hover, .picker-results button.hl { background: var(--surface-2); }
.picker-results strong { color: var(--ink); }

/* ── Command palette ── */
.cmdk { position: fixed; inset: 0; background: rgba(15,15,18,.45); display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; z-index: 3000; }
.cmdk.open { display: flex; }
.cmdk-box { width: min(620px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.25); overflow: hidden; }
.cmdk-box input { border: none; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 18px; font-size: 16px; box-shadow: none !important; }
.cmdk-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
.cmdk-group { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 10px 10px 4px; }
.cmdk-item { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--ink); }
.cmdk-item small { color: var(--ink-3); margin-left: auto; font-size: 12px; text-align: right; }
.cmdk-item.hl { background: var(--violet-soft); }
.cmdk-empty { padding: 22px; text-align: center; color: var(--ink-3); font-size: 13px; }

/* ── Messages ── */
.msg { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.msg-ok { background: var(--ok-soft); color: var(--ok); }
.msg-err { background: var(--bad-soft); color: var(--bad); }
.flash-wrap { max-width: 1180px; margin: 0 auto; padding: 20px 32px 0; }

/* ── Empty states ── */
.empty { text-align: center; padding: 36px 20px; color: var(--ink-3); font-size: 13px; }
.empty-state { text-align: center; padding: 56px 24px; }
.empty-state h2 { margin-bottom: 6px; }
.empty-state p { color: var(--ink-3); margin-bottom: 16px; }

/* ── Auth / landing ── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 28px; }
.auth-brand img.logo { height: 30px; }
.auth-brand span { font-size: 11px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--ink-3); }
:root[data-theme="dark"] .auth-brand img.logo { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .auth-brand img.logo { filter: brightness(0) invert(1); } }
.auth-wrap { background: var(--bg) url("brand/bubble-violet.svg") no-repeat right 8% top 12% / 120px; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

/* ── Avatar ── */
.avatar { border-radius: 50%; background: var(--violet-soft); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.avatar-img { border-radius: 50%; object-fit: cover; }
.profile-avatar { border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--accent); flex-shrink: 0; }

/* ── Markdown ── */
.md-content { color: var(--ink-2); line-height: 1.65; }
.md-content p { margin-bottom: 10px; }
.md-content ul, .md-content ol { margin: 6px 0 10px 20px; }
.md-content h1, .md-content h2, .md-content h3 { margin: 14px 0 6px; }

/* ── Admin (baseline panels, re-skinned) ── */
.admin-bar { display: none; }
.impersonate-banner { background: var(--bad-soft); color: var(--bad); padding: 8px 24px; font-size: 13px; text-align: center; }
.verify-banner { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 12px 16px; font-size: 13px; }
.adm-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.adm-title { font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.adm-subtitle { font-size: 13px; color: var(--ink-3); }
.adm-pulse { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ok); font-weight: 500; }
.adm-pulse-dot { width: 8px; height: 8px; background: var(--ok); border-radius: 50%; }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }
.adm-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; align-items: center; gap: 12px; position: relative; }
.adm-stat-icon { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--info-soft); color: var(--info); }
.adm-stat-value { font-size: 24px; font-weight: 700; color: var(--ink); }
.adm-stat-label { font-size: 12px; color: var(--ink-3); }
.adm-stat-delta { position: absolute; top: 8px; right: 10px; font-size: 11px; color: var(--ok); }
.adm-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.adm-tab { padding: 8px 14px; font-size: 13px; color: var(--ink-3); border-radius: 8px; display: flex; gap: 6px; align-items: center; }
.adm-tab.active { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.adm-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.adm-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.adm-panel-header h2 { margin: 0; }
.adm-count { font-size: 12px; color: var(--ink-3); background: var(--surface-2); padding: 2px 10px; border-radius: 10px; }
.adm-empty { padding: 40px 20px; text-align: center; color: var(--ink-3); }
.adm-activity-row, .adm-user-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.adm-activity-row:last-child, .adm-user-row:last-child { border-bottom: none; }
.adm-activity-icon, .adm-user-avatar { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.adm-activity-body, .adm-user-info { flex: 1; min-width: 0; color: var(--ink-2); }
.adm-user-name { font-weight: 600; color: var(--ink); }
.adm-user-email, .adm-user-date, .adm-activity-time { font-size: 12px; color: var(--ink-3); }
.adm-user-actions { display: flex; gap: 4px; }
.adm-action-btn { width: 28px; height: 28px; display: inline-grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; color: var(--ink-3); cursor: pointer; font-family: inherit; }
.adm-action-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.adm-action-danger:hover { color: var(--bad); }

/* ── Toasts ── */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 16px; border-radius: 10px; font-size: 13px; display: flex; align-items: center; gap: 12px; transform: translateX(120%); transition: transform .3s ease; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.toast-show { transform: translateX(0); }
.toast-success { background: var(--ok-soft); color: var(--ok); }
.toast-error { background: var(--bad-soft); color: var(--bad); }
.toast-close { background: none; border: none; color: inherit; cursor: pointer; font-size: 16px; opacity: .5; }

/* ── Utilities ── */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.text-right { text-align: right; }
.inline { display: inline; }
.hide { display: none !important; }

/* ── Responsive ── */
@media (max-width: 980px) {
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 2500; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--night); color: #fff; position: sticky; top: 0; z-index: 20; }
  .topbar .btn-icon { color: rgba(255,255,255,.8); }
  .topbar .brand-logo { height: 18px; filter: brightness(0) invert(1); }
  .page, .page-mid { padding: 20px 16px 48px; }
  .flash-wrap { padding: 16px 16px 0; }
  .form-grid, .facts { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .filters input[type=search] { max-width: none; flex: 1 1 100%; }
  .hide-sm { display: none; }
}

/* Candidate page: application rows with pitch + told controls */
.app-row { display: block; padding: 11px 0; border-bottom: 1px solid var(--line); }
.app-row:last-child { border-bottom: none; }
.app-row summary { list-style: none; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.app-row summary::-webkit-details-marker { display: none; }
.app-row .grow { flex: 1; min-width: 0; }
.app-row[open] { background: var(--surface-2); margin: 0 -12px; padding: 11px 12px; border-radius: 14px; }
.pitch-form { margin-top: 12px; }
.pitch-form textarea { min-height: 70px; }
.held { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 600; color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 2px 8px; }
.rec-btn.recording { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }

/* Salary data grid */
.sd-table td { padding: 6px 6px; }
.sd-in { width: 78px; padding: 6px 7px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sd-n { width: 52px; }
