/* Candidate Intake System — admin dashboard */
:root {
  --brand: #4338ca;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f5f7fb;
  --card: #ffffff;
  --o: #8b5cf6; --c: #2563eb; --e: #f97316; --a: #10b981; --n: #e11d48;
  --ok: #059669; --warn: #d97706; --bad: #dc2626;
  --r: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .05);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14.5px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h2 { font-size: 1.05rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 10px; }
code { background: #eef2ff; color: #3730a3; padding: 1px 6px; border-radius: 5px; font-size: .86em; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: .8125rem; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 18px; }
.ic { flex: none; vertical-align: -3px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 248px; flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, #1e1b4b 0%, color-mix(in srgb, var(--brand) 70%, #1e1b4b) 100%);
  color: #e0e7ff; display: flex; flex-direction: column; padding: 18px 14px;
}
.side-brand { display: flex; align-items: center; gap: 10px; color: #fff; padding: 4px 6px 18px; text-decoration: none !important; }
.side-brand img { width: 38px; height: 38px; border-radius: 10px; object-fit: contain; background: #fff; padding: 3px; }
.side-brand strong { display: block; font-size: .92rem; line-height: 1.2; }
.side-brand small { display: block; color: #a5b4fc; font-size: .75rem; }
.mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none;
  font-weight: 800; color: #fff; letter-spacing: .02em;
  background: conic-gradient(from 200deg, var(--o), var(--c), var(--a), var(--e), var(--n), var(--o));
}
.mark.big { width: 56px; height: 56px; border-radius: 16px; font-size: 1.2rem; margin-bottom: 14px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-foot a, .side-foot button {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  color: #c7d2fe; font: inherit; font-weight: 500; text-decoration: none; background: none; border: 0; width: 100%; cursor: pointer; text-align: left;
}
.side-nav a:hover, .side-foot a:hover, .side-foot button:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.side-nav a.on { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 3px 0 0 #fbbf24; }
.side-label { margin: 18px 12px 6px; font-size: .72rem; color: #a5b4fc; font-weight: 700; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.side-foot form { margin: 0; }
.side-foot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 28px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 6px 16px -14px rgba(15,23,42,.35);
}
.topbar h1 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; flex: 1; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.menu-btn { display: none; background: none; border: 0; padding: 4px; color: var(--ink); cursor: pointer; }
.content { padding: 22px 28px 48px; max-width: 1320px; width: 100%; }
.content > * + * { margin-top: 18px; }
.scrim { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
  font: inherit; font-weight: 600; padding: 9px 15px; min-height: 40px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none !important;
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 86%, #000); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.danger { color: var(--bad); border-color: #fecaca; background: #fff; }
.btn.danger:hover { background: #fef2f2; }
.btn.sm { min-height: 32px; padding: 5px 11px; font-size: .85rem; border-radius: 8px; }
.btn.block { width: 100%; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.card-head .row { margin-top: 0; }
.card-head form { margin: 0; }
.link { font-weight: 600; font-size: .875rem; }

/* Dropdown menu */
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu > div {
  position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 40px -12px rgba(15,23,42,.25); padding: 6px; min-width: 240px; z-index: 20;
}
.menu > div a { display: flex; gap: 9px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.menu > div a:hover { background: #f1f5f9; }

/* ---------- Cards and layout ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; }
.section-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section-title h2 { font-size: 1.3rem; font-weight: 800; }
.badge { display: inline-flex; gap: 5px; align-items: center; font-size: .75rem; font-weight: 700; color: #7c3aed; background: #f3e8ff; padding: 3px 9px; border-radius: 999px; }
.intro { max-width: 82ch; }

/* Notices */
.notice { padding: 12px 16px; border-radius: 12px; border: 1px solid; font-weight: 500; }
.notice.ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.notice.err { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.notice.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.notice a { color: inherit; text-decoration: underline; }

/* Empty states */
.empty { text-align: center; padding: 42px 20px; }
.empty-ic { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; margin-bottom: 12px; color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, #fff); }
.empty h2 { margin-bottom: 6px; }
.empty .btn { margin-top: 12px; }

/* Share hero */
.hero { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 18px; align-items: center;
  background: linear-gradient(120deg, #fff 0%, #fff 50%, color-mix(in srgb, var(--brand) 10%, #fff) 100%); }
.hero h2 { font-size: 1.15rem; margin-bottom: 4px; }
.share { display: grid; gap: 8px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; margin: 0; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.kpi { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -24px; top: -24px; width: 76px; height: 76px; border-radius: 50%; background: var(--k); opacity: .09; }
.kpi-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; background: var(--k); flex: none; box-shadow: 0 8px 16px -8px var(--k); }
.kpi-label { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 600; }
.kpi-value { margin: 2px 0 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-sub { margin: 0; font-size: .75rem; color: var(--muted); }

/* Charts */
.radar-wrap { display: flex; flex-direction: column; align-items: center; }
.radar { width: 100%; max-width: 440px; height: auto; overflow: visible; }
.radar .rlabel { font-size: 12px; font-weight: 700; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.cols, .hist { width: 100%; height: auto; display: block; }
.cols .axis, .hist .axis { font-size: 10px; fill: #94a3b8; }
.cols .val, .hist .val { font-size: 10px; fill: #334155; font-weight: 700; }

.bandbars { display: grid; gap: 12px; }
.bandbar-head { display: flex; gap: 8px; align-items: center; margin-bottom: 5px; font-size: .9rem; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }
.stack { display: flex; gap: 3px; height: 26px; border-radius: 8px; overflow: hidden; }
.stack span { display: flex; align-items: center; padding: 0 10px; color: #fff; font-size: .75rem; font-weight: 700; white-space: nowrap; overflow: hidden; min-width: 0; }

.hist-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 12px; }
.hist-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; border-top: 4px solid var(--c); }
.hist-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.hist-head span { font-weight: 800; color: var(--c); }
.hist-card p { margin: 6px 0 0; }

/* Tables */
.table-card { padding: 0; overflow: hidden; }
.table-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.table-toolbar > span { flex: 1; }
.bulk { display: flex; gap: 8px; align-items: center; background: #eef2ff; padding: 4px 6px 4px 12px; border-radius: 10px; }
.sort { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--muted); }
.sort select { min-height: 34px; padding: 4px 8px; margin: 0; width: auto; }
.table-wrap { overflow-x: auto; }
.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { padding: 11px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid #f1f5f9; }
.grid thead th { font-size: .75rem; color: var(--muted); font-weight: 700; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid tbody tr:hover { background: #fafbff; }
.grid tr:last-child td { border-bottom: 0; }
.grid.compact th, .grid.compact td { padding: 7px 12px; }
.grid .num { text-align: center; font-variant-numeric: tabular-nums; }
.grid .cb { width: 40px; }
.grid td.wrap { max-width: 260px; word-break: break-word; }
.heatcell, .corr td { font-weight: 700; }
.heat td, .corr td { border-bottom: 2px solid #fff; }
.card > .table-wrap.flat { margin: 0 -20px; }
.card > .table-wrap.flat:last-child { margin-bottom: -18px; border-radius: 0 0 var(--r) var(--r); }
.card > .table-wrap.flat .grid th:first-child, .card > .table-wrap.flat .grid td:first-child { padding-left: 20px; }
.card > .table-wrap.flat .grid th:last-child, .card > .table-wrap.flat .grid td:last-child { padding-right: 20px; }
/* Table cards have no inner padding: the table must not be pulled outwards (that clipped the last row and the left edge). */
.table-card > .table-wrap.flat, .table-card > .table-wrap.flat:last-child { margin: 0; }
.table-card .grid th:first-child, .table-card .grid td:first-child { padding-left: 20px; }
.table-card .grid th:last-child, .table-card .grid td:last-child { padding-right: 20px; }
.table-card .grid tbody tr:last-child td { padding-bottom: 14px; }
.table-card > .empty { padding: 36px 20px; }

.person { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; }
.person strong { display: block; }
.person small { display: block; color: var(--muted); font-size: .78rem; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person:hover strong { color: var(--brand); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-weight: 800; font-size: .8rem; flex: none; }
.avatar.xl { width: 72px; height: 72px; font-size: 1.5rem; border-radius: 22px; }

.chips { display: inline-flex; gap: 4px; flex-wrap: nowrap; }
.tchip {
  display: inline-flex; gap: 3px; align-items: baseline; font-size: .75rem; font-weight: 700; padding: 3px 7px; border-radius: 7px;
  font-variant-numeric: tabular-nums; color: #0f172a;
  background: color-mix(in srgb, var(--c) calc(var(--a) * 60%), #fff);
  border: 1px solid color-mix(in srgb, var(--c) 35%, #fff);
}
.tchip b { color: color-mix(in srgb, var(--c) 75%, #000); font-size: .7rem; }
.flag { display: inline-flex; gap: 4px; align-items: center; font-size: .75rem; font-weight: 700; color: #9a3412; background: #ffedd5; padding: 3px 8px; border-radius: 7px; }
.ok-tag { display: inline-flex; gap: 4px; align-items: center; font-size: .75rem; font-weight: 700; color: #047857; background: #d1fae5; padding: 3px 8px; border-radius: 7px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; }
.pager a { min-width: 36px; padding: 6px 10px; text-align: center; border-radius: 9px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.pager a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.legend-line b { color: var(--ink-2); }

/* Filters and forms */
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #d5dbe5; border-radius: 10px; padding: 9px 12px; min-height: 40px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; min-height: 0; padding: 0; accent-color: var(--brand); flex: none; }
input[type="color"] { width: 54px; height: 40px; padding: 3px; }
input[type="file"] { padding: 7px; }
label { display: block; font-weight: 600; font-size: .82rem; color: var(--ink-2); }
label > input, label > select, label > textarea { margin-top: 5px; font-weight: 400; }
label.check { display: flex; gap: 9px; align-items: center; font-weight: 500; font-size: .875rem; margin: 10px 0; }
label.check > input { margin: 0; }
.form > label, .form > .form-grid { margin-top: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px 14px; }
.form-grid .span2 { grid-column: 1 / -1; }
.form h3 { margin-top: 16px; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-items: end; padding: 14px 16px; }
.filters label.grow { grid-column: span 2; }
.filter-btns { display: flex; gap: 6px; }
@media (max-width: 560px) { .filters label.grow { grid-column: 1 / -1; } }
.crumb { margin: 0; }
.crumb a { font-weight: 600; font-size: .875rem; }
.color-row { display: flex; gap: 10px; align-items: center; margin-top: 5px; font-weight: 400; }
.color-row input { margin: 0; }
.logo-preview { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.logo-preview img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; padding: 4px; background: #fff; }
.settings { display: grid; gap: 18px; max-width: 980px; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px; border: 2px dashed #c7d2fe; border-radius: 14px; background: #f8faff; color: var(--brand); text-align: center; margin-top: 10px; cursor: pointer; }
.drop input { max-width: 300px; }

/* Profile */
.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.ph-main { flex: 1; min-width: 240px; }
.ph-main h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; }
.ph-main p { margin: 2px 0 8px; }
.contact { display: flex; gap: 8px; flex-wrap: wrap; }
.contact a { display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: 8px; background: #f1f5f9; color: var(--ink-2); font-size: .82rem; font-weight: 600; text-decoration: none; }
.contact a:hover { background: #e2e8f0; }
.ph-facts { display: flex; gap: 22px; margin: 0; flex-wrap: wrap; }
.ph-facts dt { font-size: .72rem; color: var(--muted); font-weight: 700; }
.ph-facts dd { margin: 3px 0 0; font-weight: 600; }

.insights { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.insights li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: linear-gradient(90deg, #faf5ff, #fff); border: 1px solid #f3e8ff; }
.insights .ic { color: #8b5cf6; margin-top: 2px; }
.fit { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr auto auto; gap: 10px; align-items: center; padding: 6px 0; }
.fit-bar { display: inline-block; height: 8px; border-radius: 4px; background: #eef2f7; overflow: hidden; width: 100%; min-width: 80px; vertical-align: middle; }
.fit-bar i { display: block; height: 100%; border-radius: 4px; }
.fitcell { display: flex; align-items: center; gap: 8px; min-width: 250px; }
.fitcell .fit-bar { width: 120px; flex: none; }

.trait-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; }
.trait-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); border-top: 5px solid var(--c); break-inside: avoid; }
.trait-card header { display: flex; justify-content: space-between; gap: 12px; }
.trait-card h3 { color: var(--c); font-size: 1.08rem; font-weight: 800; }
.score-big { text-align: right; }
.score-big b { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.pill { display: inline-block; margin-top: 5px; padding: 2px 10px; border-radius: 999px; background: var(--c); color: #fff; font-size: .72rem; font-weight: 800; }
.meter { position: relative; height: 12px; margin: 16px 0 4px; border-radius: 6px;
  background: linear-gradient(90deg, var(--soft) 0 37.5%, color-mix(in srgb, var(--soft) 75%, var(--c)) 37.5% 62.5%, color-mix(in srgb, var(--soft) 55%, var(--c)) 62.5% 100%); }
.meter .fillbar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--c); }
.meter .knob { position: absolute; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.meter .cmp { position: absolute; top: -5px; width: 3px; height: 22px; margin-left: -1.5px; border-radius: 2px; background: #475569; opacity: .6; }
.poles { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); font-weight: 600; }
.lead { font-weight: 600; margin: 12px 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.two h4, .tip h4 { font-size: .8rem; margin-bottom: 4px; }
.good { color: #047857; }
.warn { color: #b45309; }
.trait-card ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: .875rem; }
.trait-card li { margin: 3px 0; }
.tip { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--soft); }
.tip h4 { color: color-mix(in srgb, var(--c) 80%, #000); }
.probe { margin: 8px 0 0; font-size: .85rem; font-style: italic; color: var(--ink-2); }
.answers summary { cursor: pointer; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.answers[open] summary { margin-bottom: 12px; }
.resp { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-weight: 800; font-size: .75rem; color: #fff; margin-right: 4px; }
.resp.r1 { background: #e11d48; } .resp.r2 { background: #fb7185; } .resp.r3 { background: #94a3b8; } .resp.r4 { background: #34d399; } .resp.r5 { background: #059669; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.timeline li { padding-left: 14px; border-left: 3px solid #a7f3d0; }
.timeline li.bad { border-left-color: #fecaca; }
.danger-zone { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* Analysis */
.tops { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.top-col { border-radius: 12px; padding: 10px 12px; background: color-mix(in srgb, var(--c) 8%, #fff); border: 1px solid color-mix(in srgb, var(--c) 22%, #fff); }
.top-col h4 { color: var(--c); font-size: .85rem; margin-bottom: 6px; }
.top-col ol { margin: 0; padding-left: 18px; font-size: .85rem; }
.top-col ol { list-style: none; padding: 0; }
.top-col li { display: grid; grid-template-columns: 16px 1fr auto; gap: 4px; margin: 4px 0; align-items: baseline; }
.top-col li i { font-style: normal; color: var(--muted); font-size: .75rem; }
.top-col li b { color: var(--c); }

/* Email compose */
.who { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: #f8fafc; margin-bottom: 6px; }
.who b, .who small { display: block; }
.who small { color: var(--muted); }
.seg { border: 0; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg legend { font-weight: 600; font-size: .82rem; color: var(--ink-2); margin-bottom: 6px; }
.seg a { display: block; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); color: var(--ink); text-decoration: none; }
.seg a small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.seg a.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, #fff); }
.attach { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid #fecaca; background: #fff7f7; margin-top: 14px; color: #dc2626; }
.attach div { flex: 1; color: var(--ink); }
.attach b, .attach small { display: block; }
.attach small { color: var(--muted); }
.mail-preview { width: 100%; height: 760px; border: 1px solid var(--line); border-radius: 12px; background: #f1f5f9; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: #e9edf5; border-radius: 12px; }
.tabs a { padding: 7px 14px; border-radius: 9px; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.tabs a.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.type { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #e0e7ff; color: #3730a3; }
.type.t-employee { background: #d1fae5; color: #065f46; }
.type.t-team { background: #ffedd5; color: #9a3412; }

/* Benchmarks */
.bm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 16px; }
.bm-trait { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; padding: 12px; }
.bm-trait h4 { color: var(--c); margin-bottom: 8px; font-size: .9rem; }
.seg-radio { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 10px; }
.seg-radio label { margin: 0; position: relative; }
.seg-radio input { position: absolute; opacity: 0; }
.seg-radio span { display: block; text-align: center; padding: 7px 2px; border-radius: 8px; border: 1px solid var(--line); font-size: .72rem; font-weight: 600; cursor: pointer; }
.seg-radio input:checked + span { background: var(--c); border-color: var(--c); color: #fff; }
.seg-radio input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--c) 40%, transparent); }
.bm-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.bm-card { display: block; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink); text-decoration: none !important; min-width: 200px; }
.bm-card.on { border-color: var(--brand); box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--brand) 70%, transparent); }
.bm-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.bm-tags i { font-style: normal; font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; color: #fff; background: var(--c); }
.inline-filter { margin: 0; }
.inline-filter select { min-height: 32px; padding: 4px 8px; margin: 0; width: auto; }

.admins { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.admins li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.admins li > span:nth-child(2) { flex: 1; }
.admins small { display: block; }
.admins form { margin: 0; }

/* ---------- Sign-in and installer ---------- */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 24px;
  background: radial-gradient(1200px 600px at 10% 10%, #312e81 0%, transparent 60%), radial-gradient(900px 600px at 90% 90%, color-mix(in srgb, var(--brand) 80%, #000) 0%, transparent 60%), #1e1b4b; }
.auth-art { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.auth-art span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .45; }
.auth-art span:nth-child(1) { width: 320px; height: 320px; background: var(--o); left: 6%; top: 12%; }
.auth-art span:nth-child(2) { width: 260px; height: 260px; background: var(--c); right: 10%; top: 8%; }
.auth-art span:nth-child(3) { width: 280px; height: 280px; background: var(--e); left: 18%; bottom: 6%; }
.auth-art span:nth-child(4) { width: 240px; height: 240px; background: var(--a); right: 18%; bottom: 12%; }
.auth-art span:nth-child(5) { width: 200px; height: 200px; background: var(--n); left: 48%; top: 40%; }
.auth-box { position: relative; background: rgba(255,255,255,.97); border-radius: 22px; padding: 34px 32px; width: 100%; max-width: 410px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
.auth-box.wide { max-width: 600px; }
.auth-box h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.auth-box label { margin-top: 14px; }
.auth-box .btn.primary { margin-top: 20px; width: 100%; min-height: 46px; }
.auth-logo { width: 64px; height: 64px; object-fit: contain; margin-bottom: 14px; }
.auth-box fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 6px 16px 16px; margin: 0 0 16px; }
.auth-box legend { font-weight: 800; padding: 0 6px; }
.auth-box label.radio { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: .9rem; }
.auth-box label.radio input { margin: 0; }
.help { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .side { position: fixed; left: 0; top: 0; z-index: 30; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(0,0,0,.3); }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 25; }
  .menu-btn { display: block; }
  .topbar { padding: 12px 16px; }
  .topbar h1 { font-size: 1.15rem; }
  .content { padding: 16px 14px 40px; }
  .hero { grid-template-columns: 1fr; }
  .grid-2, .trait-grid { grid-template-columns: 1fr; }
  .copy-row { flex-wrap: wrap; }
  .two { grid-template-columns: 1fr; }
  .seg { grid-template-columns: 1fr; }
  .fit { grid-template-columns: 1fr auto; }
  .fit .fit-bar { grid-column: 1 / -1; order: 3; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media print {
  .side, .topbar, .noprint, .crumb, .filters, .pager, .menu, .scrim { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; max-width: none; }
  .card, .trait-card, .kpi { box-shadow: none; }
  .meter, .pill, .tchip, .stack span, .kpi-ic, .avatar, .tip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Compact correlation matrix so it fits half-width cards */
.grid.corr th, .grid.corr td { padding: 8px 6px; font-size: .85rem; }
.grid.corr td { min-width: 48px; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: color-mix(in srgb, var(--s) 75%, #000); background: color-mix(in srgb, var(--s) 14%, #fff); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }

/* ---------- Organisations ---------- */
.client-cards { display: flex; flex-wrap: wrap; gap: 10px; }
.client-card { display: block; padding: 12px 16px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink); text-decoration: none !important; min-width: 220px; }
.client-card small { display: block; color: var(--muted); font-size: .8rem; }
.client-card.on { border-color: var(--brand); box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--brand) 70%, transparent); }
.client-card.off { opacity: .6; }

/* ---------- Users, roles and onboarding ---------- */
.role-pill { display: inline-block; font-size: .74rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; color: color-mix(in srgb, var(--r) 80%, #000); background: color-mix(in srgb, var(--r) 14%, #fff); white-space: nowrap; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.role-card { display: flex; flex-direction: column; gap: 3px; padding: 14px; border-radius: 14px; background: #fff; border: 2px solid var(--line); border-top: 5px solid var(--r); color: var(--ink); text-decoration: none !important; box-shadow: var(--shadow); }
.role-card .rside { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--r); }
.role-card small { color: var(--muted); font-size: .78rem; line-height: 1.35; flex: 1; }
.role-card em { font-style: normal; font-weight: 700; font-size: .8rem; margin-top: 6px; }
.role-card.on { border-color: var(--r); }
.role-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.role-pick label { margin: 0; position: relative; }
.role-pick input { position: absolute; opacity: 0; }
.role-pick span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); cursor: pointer; font-weight: 400; }
.role-pick em { font-style: normal; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--r); }
.role-pick b { color: var(--ink); }
.role-pick small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.role-pick input:checked + span { border-color: var(--r); background: color-mix(in srgb, var(--r) 7%, #fff); box-shadow: 0 6px 16px -10px var(--r); }
.role-pick input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--r) 40%, transparent); }
.form h3 { margin: 22px 0 8px; font-size: .95rem; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 6px; transition: opacity .2s; }
.pick-grid.dim { opacity: .4; pointer-events: none; }
.pick { display: flex; gap: 10px; align-items: center; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 400; cursor: pointer; }
.pick input { margin: 0; }
.pick span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick small { color: var(--muted); font-size: .76rem; }
.pick:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-top: 6px; }
.perm-grid fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 10px; margin: 0; }
.perm-grid legend { font-weight: 800; font-size: .8rem; color: var(--ink-2); padding: 0 4px; }
.perm { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 0; font-weight: 400; }
.perm input { margin-top: 2px; }
.perm span { display: flex; flex-direction: column; }
.perm small { color: var(--muted); font-size: .76rem; }
.perm.locked { opacity: .45; }
.perm-grid.readonly .perm { pointer-events: none; }
.perm-grid.readonly { opacity: .85; }
.setup { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.setup h3 { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.setup-bar { height: 8px; border-radius: 4px; background: #eef2f7; overflow: hidden; margin-bottom: 10px; }
.setup-bar i { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #0ea5e9); border-radius: 4px; }
.checklist, .access { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .tick { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cbd5e1; display: grid; place-items: center; color: #fff; margin-top: 1px; }
.checklist li.ok .tick { background: #10b981; border-color: #10b981; }
.checklist b, .checklist small, .access b, .access small { display: block; }
.checklist small, .access small { color: var(--muted); font-size: .78rem; }
.checklist li:not(.ok) b { color: var(--ink-2); }
.access li { display: flex; gap: 10px; align-items: center; }
.access li > span:nth-child(2) { flex: 1; min-width: 0; }
.side-foot a.me { padding: 8px 10px; margin-bottom: 6px; background: rgba(255,255,255,.06); }
.side-foot a.me.on { background: rgba(255,255,255,.14); }
.side-foot a.me b, .side-foot a.me small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot a.me b { color: #fff; font-size: .86rem; }
.side-foot a.me small { color: #a5b4fc; font-size: .72rem; }
.side-foot a.me > span:last-child { min-width: 0; flex: 1; }
.pin-slip .pinv.sm { font-size: 1.25rem; letter-spacing: .06em; }
.auth-link { text-align: center; margin: 16px 0 0; font-weight: 600; }
.wizard { display: grid; gap: 18px; max-width: 980px; }
.wstep h2 { gap: 10px; }
.wnum { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .85rem; }
.big-btn { min-height: 48px; padding: 10px 24px; font-size: 1rem; }
.done-card { text-align: center; max-width: 860px; }
.empty-ic.ok { color: #059669; background: #d1fae5; }
.next-steps { text-align: left; max-width: 640px; margin: 18px auto 0; padding-left: 22px; display: grid; gap: 14px; }
.done-card .pin-slip { text-align: left; }



/* ---------- Individual sharing ---------- */
.share-card { border: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 5%, #fff), #fff); }
.share-link { display: flex; gap: 8px; margin: 8px 0; }
.share-link input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; background: #fff; }
.share-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 16px; }
.share-way { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; display: grid; gap: 8px; }
.share-way b { display: flex; align-items: center; gap: 6px; }
.wa-t::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #25d366; display: inline-block; }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; }
.bulk-tools > summary { list-style: none; cursor: pointer; }
.bulk-tools > summary::-webkit-details-marker { display: none; }
.bulk-tools > summary h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; }
.bulk-tools > summary h2::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .2s; }
.bulk-tools[open] > summary h2::after { transform: rotate(180deg); }
.bulk-tools[open] > summary { margin-bottom: 12px; }
.kind-pill { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 800; color: #7c3aed; background: #ede9fe; padding: 2px 8px; border-radius: 999px; }
.camp-top { flex-wrap: wrap; }
.center-row { justify-content: center; }
h3.first { margin-top: 0; }

.bulk-tools { align-self: start; }
.btn.copied { background: #10b981 !important; border-color: #10b981 !important; color: #fff !important; }

.btn.wa { background: #25d366; border-color: #25d366; color: #fff; }
.btn.wa:hover { background: #1ebe5b; }
.inv-actions { display: flex; gap: 4px; align-items: center; flex-wrap: nowrap; }
.inv-actions form { margin: 0; }

/* ---------- Shared components ---------- */
.link-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.link-strip .ls { display: block; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-left: 5px solid #2563eb; color: var(--ink); text-decoration: none !important; box-shadow: var(--shadow); }
.link-strip .ls.warn { border-left-color: #f59e0b; } .link-strip .ls.ok { border-left-color: #10b981; } .link-strip .ls.bad { border-left-color: #e11d48; }
.link-strip b { display: block; font-size: 1.6rem; font-weight: 850; line-height: 1.1; }
.link-strip span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.fit span small { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; }
.fit.applied { background: #eff6ff; border-radius: 10px; padding: 6px 10px; margin: 0 -10px 4px; }
.fit.applied span small { color: #2563eb; text-transform: uppercase; letter-spacing: .04em; }
.fit-bar.inline { width: 90px; }
.tchips { display: inline-flex; gap: 3px; vertical-align: middle; }
.tchip { display: inline-flex; align-items: baseline; gap: 1px; min-width: 30px; justify-content: center; padding: 3px 5px; border-radius: 6px; font-weight: 800; font-size: .74rem; }
.tchip small { font-size: .62rem; opacity: .9; }
.role-list { display: grid; gap: 8px; }
.role-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.role-row b, .role-row small { display: block; }
.role-row small { color: var(--muted); font-size: .78rem; }
.rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 2px 26px; }
.target-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.target { border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 6px 2px; border: 1px solid var(--line); border-radius: 8px; font-size: .78rem; font-weight: 700; cursor: pointer; }
.seg input:checked + span { background: var(--c); border-color: var(--c); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--c) 40%, transparent); }
.quad { width: 100%; height: auto; display: block; }
.quad-key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8rem; color: var(--ink-2); margin: 6px 0; }
.section-h { margin: 26px 0 12px; font-size: 1.15rem; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.guide { border-top: 5px solid var(--c); margin: 0; }
.guide header { display: flex; gap: 12px; align-items: flex-start; }
.guide header > div:nth-child(2) { flex: 1; }
.guide h3 { margin: 0 0 2px; }
.g-letter { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 900; font-size: 1.2rem; flex: none; }
.g-avg { text-align: right; } .g-avg b { display: block; font-size: 1.4rem; color: var(--c); } .g-avg small { color: var(--muted); font-size: .72rem; }
.g-dist { display: flex; height: 24px; border-radius: 7px; overflow: hidden; margin: 12px 0; }
.g-dist span { display: grid; place-items: center; color: #fff; font-size: .72rem; font-weight: 800; white-space: nowrap; overflow: hidden; }
.g-levels { margin: 0; display: grid; gap: 6px; }
.g-levels div { display: grid; grid-template-columns: 62px 1fr; gap: 8px; font-size: .86rem; }
.g-levels dt { font-weight: 800; color: color-mix(in srgb, var(--c) 80%, #000); }
.g-levels dd { margin: 0; color: var(--ink-2); }
.guide h4 { margin: 14px 0 6px; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.g-clues { margin: 0; padding-left: 18px; font-size: .86rem; display: grid; gap: 4px; }
.g-probe { margin: 12px 0 0; padding: 10px 12px; background: var(--soft); border-radius: 10px; font-size: .85rem; }
@media (max-width: 760px) { .role-row { grid-template-columns: 1fr; } }

/* Horizontal bars */
.hbar { display: grid; grid-template-columns: minmax(130px, 34%) 1fr 64px; align-items: center; gap: 10px; padding: 6px 0; font-size: .88rem; }
.hbar > span:first-child { font-weight: 600; color: var(--ink-2); }
.hbar .track { position: relative; height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--c) 12%, #fff); }
.hbar .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--c); }
.hbar .track em { position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px; border-radius: 2px; background: #0f172a; }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; }
.hbar.small { grid-template-columns: minmax(120px, 45%) 1fr 32px; font-size: .82rem; }

/* ---------- Employee development (v4.1) ---------- */
.purpose { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.purpose.rec { color: #1d4ed8; background: #dbeafe; }
.purpose.dev { color: #047857; background: #d1fae5; }
.purpose-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.purpose-pick label { margin: 0; cursor: pointer; }
.purpose-pick input { position: absolute; opacity: 0; }
.purpose-pick span { display: block; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; height: 100%; }
.purpose-pick b, .purpose-pick small { display: block; }
.purpose-pick small { color: var(--muted); font-size: .76rem; margin-top: 2px; }
.purpose-pick input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); }
.purpose-pick input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.progress-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.trend { width: 100%; height: auto; display: block; }
.small-h { font-size: .85rem; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.chg { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.chg > small { grid-column: 1 / -1; }
.delta { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.up { color: #059669; } .delta.down { color: #d97706; } .delta.flat { color: #94a3b8; }
.hist-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.hist-list a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; color: var(--ink-2); text-decoration: none; }
.hist-list a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.avg-change { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.avg-change > div { border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 12px; padding: 10px 12px; }
.avg-change span, .avg-change small { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; }
.avg-change b { font-size: 1.4rem; }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .9rem; }
@media (max-width: 900px) { .progress-grid, .purpose-pick { grid-template-columns: 1fr; } }

/* ===================== Candidate Intake ===================== */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.qual { display: inline-flex; align-items: center; font-size: .78rem; font-weight: 700; color: color-mix(in srgb, var(--s) 78%, #000); background: color-mix(in srgb, var(--s) 13%, #fff); border: 1px solid color-mix(in srgb, var(--s) 30%, #fff); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.ko-text { color: #be123c; font-weight: 700; }
.tab-right { margin-left: auto; }
.warn-list { margin: 6px 0 0; padding-left: 18px; font-size: .88rem; }
.notice.info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.notice.once { display: grid; gap: 8px; }
pre.code { background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 12px 14px; font-size: .8rem; overflow-x: auto; white-space: pre; }
.hl-logo { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #ff6a00; color: #fff; font-size: .75rem; font-weight: 900; margin-right: 8px; }
/* forms list */
.new-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.new-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 10px; align-content: start; }
.new-card h3 { margin: 0; }
.new-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); }
.tpl-list { display: grid; gap: 6px; }
.tpl { display: block; cursor: pointer; margin: 0; }
.tpl input { position: absolute; opacity: 0; }
.tpl span { display: block; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.tpl b, .tpl small { display: block; } .tpl small { color: var(--muted); font-size: .76rem; }
.tpl input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); }
.form-grid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.fcard { margin: 0; display: grid; gap: 8px; align-content: start; }
.fc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fcard h3 { margin: 4px 0 0; font-size: 1.08rem; } .fcard h3 a { color: var(--ink); text-decoration: none; }
.fc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0; }
.fc-stats a { background: #f8fafc; border-radius: 10px; padding: 8px; text-align: center; color: var(--ink); text-decoration: none; }
.fc-stats b { display: block; font-size: 1.25rem; } .fc-stats span { font-size: .72rem; color: var(--muted); font-weight: 600; }
/* builder */
.builder { margin-bottom: 30px; }
.b-bar { position: sticky; top: 68px; z-index: 4; display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 12px; box-shadow: 0 6px 16px -14px rgba(15,23,42,.4); }
.b-bar .btn { margin-left: auto; }
.b-status { font-size: .82rem; color: var(--muted); } .b-status.dirty { color: #b45309; font-weight: 700; } .b-status.ok { color: #047857; } .b-status.err { color: #be123c; font-weight: 700; }
.b-cols { display: grid; grid-template-columns: 190px minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.b-palette, .b-props { position: sticky; top: 124px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; max-height: calc(100vh - 140px); overflow: auto; }
.b-h { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.b-type { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 9px; margin-bottom: 6px; cursor: grab; font: inherit; font-size: .86rem; text-align: left; }
.b-type:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, #fff); }
.b-type i { font-style: normal; width: 22px; text-align: center; font-weight: 800; color: var(--brand); }
.b-tip { margin: 8px 0 0; }
.b-canvas { min-height: 300px; background: #f8fafc; border: 2px dashed #dbe3ee; border-radius: 14px; padding: 10px; }
.b-empty { text-align: center; color: var(--muted); padding: 60px 10px; }
.b-card { display: grid; grid-template-columns: auto auto 1fr auto; gap: 10px; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; position: relative; }
.b-card:hover { border-color: #c7d2fe; }
.b-card.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.b-card.t-section { background: color-mix(in srgb, var(--brand) 8%, #fff); border-left: 5px solid var(--brand); margin-top: 16px; }
.b-card.t-note { background: #fffbeb; }
.b-card.dragging { opacity: .4; }
.b-card.drop-before::before, .b-card.drop-after::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; background: var(--brand); border-radius: 2px; }
.b-card.drop-before::before { top: -6px; } .b-card.drop-after::after { bottom: -6px; }
.b-grip { color: #cbd5e1; cursor: grab; font-weight: 900; letter-spacing: -2px; }
.b-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #f1f5f9; font-weight: 800; color: var(--brand); }
.b-main { min-width: 0; } .b-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-main small { color: var(--muted); font-size: .75rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-req { color: #be123c; font-weight: 700; } .b-ko { color: #be123c; font-weight: 700; } .b-cond { color: #6d28d9; font-weight: 600; }
.b-tools { display: flex; gap: 2px; opacity: .55; } .b-card:hover .b-tools, .b-card.on .b-tools { opacity: 1; }
.b-tools button, .b-ch button, .b-rule button { border: 0; background: none; cursor: pointer; padding: 4px 6px; border-radius: 6px; color: var(--ink-2); font: inherit; }
.b-tools button:hover, .b-ch button:hover, .b-rule button:hover { background: #f1f5f9; }
.b-props label { display: block; font-size: .84rem; font-weight: 600; margin-bottom: 10px; }
.b-props input:not([type=checkbox]):not([type=radio]), .b-props textarea, .b-props select { width: 100%; margin-top: 4px; }
.b-props .check { display: flex; gap: 8px; align-items: center; }
.b-sub { font-weight: 800; font-size: .82rem; margin: 14px 0 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.b-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.b-choices { display: grid; gap: 4px; margin-bottom: 8px; }
.b-ch { display: grid; grid-template-columns: 1fr 58px 26px 52px; gap: 4px; align-items: center; }
.b-ch.head { font-size: .7rem; color: var(--muted); font-weight: 800; text-transform: uppercase; }
.b-ch input[type=checkbox] { justify-self: center; accent-color: #e11d48; width: 16px; height: 16px; }
.b-ch input:not([type=checkbox]) { margin: 0 !important; padding: 6px 8px; min-height: 0; font-size: .85rem; }
.b-acc { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 10px; }
.b-acc .chk { display: inline-flex; gap: 4px; font-weight: 500; margin: 0; }
.b-rule { display: grid; grid-template-columns: 1fr; gap: 4px; background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 10px; padding: 8px; margin-bottom: 6px; position: relative; }
.b-rule select, .b-rule input { margin: 0 !important; font-size: .84rem; padding: 6px 8px; min-height: 0; }
.b-rule button { position: absolute; top: 2px; right: 2px; }
.b-cond-box { background: #f5f3ff; border-radius: 8px; padding: 8px 10px; font-size: .84rem; }
.b-adv { margin-top: 10px; font-size: .85rem; } .b-adv summary { cursor: pointer; color: var(--muted); font-weight: 700; }
@media (max-width: 1200px) { .b-cols { grid-template-columns: 170px minmax(0, 1fr); } .b-props { grid-column: 1 / -1; position: static; max-height: none; } }
@media (max-width: 760px) { .b-cols { grid-template-columns: 1fr; } .b-palette { position: static; display: flex; flex-wrap: wrap; gap: 6px; max-height: none; } .b-type { width: auto; margin: 0; } .b-bar { top: 60px; } }
/* share */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 42px; height: 24px; border-radius: 12px; background: #cbd5e1; position: relative; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: #10b981; } .switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); }
/* candidate */
.cand-photo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 4px 14px -6px rgba(15,23,42,.4); }
.wa-link { color: #128c7e !important; font-weight: 700; }
.cand-top .card { margin: 0; }
.score-big b { font-size: 2.4rem; font-weight: 850; line-height: 1; } .score-big span { display: block; color: var(--muted); font-size: .85rem; }
.score-track { position: relative; height: 12px; border-radius: 6px; background: #eef2f7; margin: 14px 0 6px; }
.score-track i { display: block; height: 100%; border-radius: 6px; }
.score-track em { position: absolute; top: -4px; width: 2px; height: 20px; background: #0f172a; opacity: .4; }
.ko-box { background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 10px 12px; margin-top: 12px; color: #991b1b; }
.ko-box ul { margin: 4px 0 0; padding-left: 18px; font-size: .88rem; }
.stage-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.stage-pick label { margin: 0; cursor: pointer; }
.stage-pick input { position: absolute; opacity: 0; }
.stage-pick span { display: block; padding: 6px 11px; border-radius: 999px; border: 1.5px solid var(--line); font-size: .82rem; font-weight: 700; }
.stage-pick input:checked + span { background: var(--s); border-color: var(--s); color: #fff; }
.stage-pick input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--s) 40%, transparent); }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.file-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; align-content: start; }
.file-card img { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; background: #f1f5f9; }
.file-card b, .file-card small { display: block; word-break: break-word; }
.file-ic { width: 56px; height: 64px; border-radius: 8px; background: #eef2ff; color: #4338ca; display: grid; place-items: center; font-weight: 900; font-size: .8rem; }
.ans-sec h3 { font-size: .95rem; margin: 18px 0 6px; padding-bottom: 6px; border-bottom: 2px solid color-mix(in srgb, var(--brand) 25%, #fff); color: color-mix(in srgb, var(--brand) 80%, #000); }
.ans { margin: 0; }
.ans div { display: grid; grid-template-columns: minmax(180px, 42%) 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: .92rem; }
.ans dt { color: var(--muted); } .ans dd { margin: 0; font-weight: 600; word-break: break-word; }
.pts { display: inline-block; margin-left: 6px; font-size: .72rem; font-weight: 800; color: #047857; background: #ecfdf5; border-radius: 6px; padding: 1px 6px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: .88rem; }
.timeline li > span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); }
.timeline small { display: block; color: var(--muted); font-size: .76rem; }
/* dashboard */
.spark { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.spark span { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.spark i { display: block; width: 100%; background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #fff)); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.spark small { font-size: .68rem; color: var(--muted); }
.qual-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.qual-split a { border-radius: 12px; padding: 14px; background: color-mix(in srgb, var(--c) 10%, #fff); border: 1px solid color-mix(in srgb, var(--c) 25%, #fff); text-decoration: none; color: var(--ink); }
.qual-split b { display: block; font-size: 1.6rem; color: var(--c); } .qual-split span { font-size: .8rem; font-weight: 700; }
.live-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f1f5f9; }
.live-row a:first-child { color: var(--ink); text-decoration: none; } .live-row b, .live-row small { display: block; } .live-row small { color: var(--muted); font-size: .78rem; }
a.link-row { text-decoration: none; color: inherit; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; } .pager a { padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; color: var(--ink); } .pager a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.tpl-edit { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; } .tpl-edit summary { cursor: pointer; } .tpl-edit[open] summary { margin-bottom: 8px; }
.lbl { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
@media print { .b-bar, .tabs, .crumb { display: none !important; } }

.filter-count { align-self: center; margin-left: auto; white-space: nowrap; }
.org-code { display: inline-block; font-size: .7rem; font-weight: 800; color: #475569; background: #f1f5f9; border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }

/* ---------- Bulk invitations from a spreadsheet (v1.2) ---------- */
.bulk-upload { display: grid; gap: 6px; margin-bottom: 10px; }
.drop-sheet { display: flex; gap: 12px; align-items: center; border: 2px dashed #cbd5e1; border-radius: 14px; padding: 14px 16px; cursor: pointer; background: #f8fafc; color: var(--ink); margin: 0; }
.drop-sheet:hover, .drop-sheet.has-file { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); }
.drop-sheet span { display: grid; gap: 2px; font-weight: 500; } .drop-sheet small { color: var(--muted); font-weight: 400; }
.drop-sheet input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop-sheet .fname { color: var(--brand); font-weight: 700; }
.sample-links { margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.paste-alt { margin: 4px 0 10px; } .paste-alt > summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: .9rem; }
fieldset.when { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 4px 0 12px; display: grid; gap: 6px; }
fieldset.when legend { font-weight: 700; font-size: .88rem; padding: 0 4px; }
fieldset.when .chk { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; margin: 0; }
.bulk-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.bulk-stats span { background: #f1f5f9; border-radius: 12px; padding: 8px 14px; font-size: .85rem; color: var(--muted); display: grid; }
.bulk-stats b { font-size: 1.4rem; color: var(--ink); }
.bulk-stats .ok b { color: #047857; } .bulk-stats .wa b { color: #128c7e; } .bulk-stats .bad b { color: #be123c; } .bulk-stats .warn b { color: #b45309; }

/* ---------- Identity verification (v1.4) ---------- */
.id-compare { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.id-compare figure { margin: 0; text-align: center; }
.id-compare img { width: 160px; height: 200px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: #f1f5f9; }
.id-compare figcaption { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.id-nophoto { display: grid; place-items: center; width: 160px; height: 200px; border-radius: 12px; background: #f1f5f9; color: var(--muted); font-size: .8rem; }
.id-facts { flex: 1 1 320px; }
.inline-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-right: 8px; }
.inline-label input { width: 260px; }
.id-card .row { margin-top: 8px; }

/* ---------- Verify identity section (v1.5) ---------- */
.id-cols { gap: 28px; align-items: start; }
.id-new h3.first { margin-top: 0; }
.id-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.id-seg label { margin: 0; cursor: pointer; }
.id-seg input { position: absolute; opacity: 0; }
.id-seg span { display: block; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; height: 100%; }
.id-seg span b, .id-seg span small { display: block; } .id-seg span small { color: var(--muted); font-size: .76rem; font-weight: 500; }
.id-seg input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, #fff); }
.id-seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.pick-list { list-style: none; margin: 4px 0 10px; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pick-list li { border-bottom: 1px solid #f1f5f9; } .pick-list li:last-child { border-bottom: 0; } .pick-list li.muted { padding: 10px 12px; }
.pick-list button { display: block; width: 100%; text-align: left; background: #fff; border: 0; padding: 9px 12px; cursor: pointer; font: inherit; }
.pick-list button:hover, .pick-list button:focus { background: #f8fafc; }
.pick-list small { display: block; color: var(--muted); font-size: .76rem; }
.chosen { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.kind-pill.ext { color: #7c2d12; background: #ffedd5; }
@media (max-width: 760px) { .id-seg { grid-template-columns: 1fr; } }
.chosen .link { background: none; border: 0; padding: 0 0 0 6px; color: var(--brand); cursor: pointer; text-decoration: underline; font: inherit; font-size: .85rem; }

/* ---------- Verification reports (v1.6) ---------- */
.report-box { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: #f0fdfa; border: 1px solid #99f6e4; display: grid; gap: 8px; }
.report-box > div:first-child { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.report-box .row { margin: 0; }

/* ---------- Report signature images (v1.7.2) ---------- */
.sig-grid { margin-top: 6px; }
.sig-up { display: grid; gap: 6px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; }
.sig-up img { max-height: 70px; max-width: 220px; object-fit: contain; background: repeating-conic-gradient(#f1f5f9 0 25%, #fff 0 50%) 0 0 / 14px 14px; border-radius: 6px; padding: 4px; }
.sig-none { color: var(--muted); font-size: .85rem; }

/* ===================== CIS 2.0 (Part 1) ===================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd { font: 600 .72rem ui-monospace, monospace; background: #f1f5f9; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--ink); }
.btn.disabled { opacity: .45; pointer-events: none; }
.strike { text-decoration: line-through; }
ul.plain { list-style: none; padding: 0; margin: 0; } ul.plain li { padding: 6px 0; border-bottom: 1px solid #f1f5f9; }

/* Instant filters: no Apply button when JavaScript is on; soft fade while results load */
form.filters.is-live .filter-btns .btn.primary { display: none; }
body.is-loading main.content > :not(form.filters) { opacity: .55; transition: opacity .15s; }

/* Top bar search and side menu tools */
.search-btn { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; margin-right: 10px; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 10px; padding: 6px 10px; font: inherit; font-size: .88rem; cursor: pointer; min-height: 36px; }
.search-btn:hover { border-color: var(--brand); color: var(--ink); }
.tool-link .ext { margin-left: auto; opacity: .6; font-size: .8rem; }
@media (max-width: 760px) { .search-btn span, .search-btn kbd { display: none; } }

/* Toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 1000; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 36px)); }
.toast { display: flex; align-items: center; gap: 10px; background: #0f172a; color: #fff; border-radius: 12px; padding: 11px 12px 11px 14px; box-shadow: 0 12px 30px -10px rgba(15,23,42,.5); font-size: .92rem; animation: toastIn .2s ease-out; border-left: 5px solid #10b981; }
.toast.warn { border-left-color: #f59e0b; } .toast.err { border-left-color: #e11d48; }
.toast span { flex: 1; }
.toast button { background: none; border: 0; color: #fff; font: inherit; cursor: pointer; }
.toast .toast-undo { font-weight: 800; text-decoration: underline; color: #99f6e4; }
.toast .toast-x { font-size: 1.2rem; opacity: .7; }
.toast.out { opacity: 0; transform: translateY(8px); transition: .25s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.notice.fade { opacity: 0; transition: opacity .4s; }

/* Modal, email preview, search */
.cis-modal { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 900; display: grid; place-items: start center; padding: 8vh 14px 14px; overflow: auto; }
.cis-modal-box { background: #fff; border-radius: 16px; padding: 20px 22px; width: min(620px, 100%); box-shadow: 0 30px 70px -20px rgba(15,23,42,.6); display: grid; gap: 12px; }
.cis-modal-box h3 { margin: 0; }
.cis-modal-box label { display: grid; gap: 4px; font-weight: 600; }
.cis-modal-box input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.mail-preview { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #f8fafc; max-height: 40vh; overflow: auto; }
.mail-preview pre { white-space: pre-wrap; font: inherit; margin: 8px 0 0; }
.cis-search input { width: 100%; font-size: 1.05rem; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; }
.search-res { list-style: none; margin: 8px 0; padding: 0; max-height: 50vh; overflow: auto; }
.search-res a { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.search-res li.on a, .search-res a:hover { background: #f1f5f9; }
.search-res .kind { grid-row: span 2; align-self: center; font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, #fff); padding: 3px 7px; border-radius: 6px; }
.search-res small { color: var(--muted); }

/* Candidate profile: sticky header */
.cand-bar { position: sticky; top: 0; z-index: 30; display: grid; gap: 10px; padding: 12px 16px; margin-bottom: 12px; }
.cb-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cb-nav .cb-pos { margin-left: auto; color: var(--muted); font-size: .88rem; }
.cb-main { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cb-who { flex: 1 1 260px; min-width: 0; }
.cb-who h2 { margin: 0; font-size: 1.25rem; }
.cb-who p { margin: 2px 0 4px; }
.cb-who .contact { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cb-stage { display: grid; gap: 6px; justify-items: end; }
.cb-stage select { min-width: 190px; }
.avatar.lg { width: 52px; height: 52px; font-size: 1.1rem; }
.cand-photo.sm { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.stars { display: flex; align-items: center; gap: 1px; }
.stars button { background: none; border: 0; font-size: 1.3rem; line-height: 1; color: #cbd5e1; cursor: pointer; padding: 0 1px; }
.stars button.on { color: #f59e0b; } .stars button:disabled { cursor: default; }
.stars small { margin-left: 6px; }
.cb-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cb-tags input { border: 1px dashed var(--line); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .82rem; width: 130px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; color: var(--t); background: color-mix(in srgb, var(--t) 12%, #fff); border: 1px solid color-mix(in srgb, var(--t) 35%, #fff); border-radius: 999px; padding: 2px 9px; }
.tag button { background: none; border: 0; color: inherit; cursor: pointer; font-size: .95rem; padding: 0; line-height: 1; }
.tag.sm { font-size: .7rem; padding: 1px 7px; }
.row-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.stars-avg { font-size: .75rem; color: #b45309; font-weight: 700; }
.cb-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.save-next { display: inline-flex; gap: 6px; margin-left: auto; }
.save-next select { min-height: 32px; border-radius: 8px; }
@media (max-width: 760px) { .cand-bar { position: static; } .cb-stage { justify-items: start; } .save-next { margin-left: 0; } }

/* Tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 4px 0 14px; scrollbar-width: thin; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 9px 12px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--brand); }
.tabs .count { font-size: .72rem; background: #f1f5f9; border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.panel > .card, .panel > section { margin-bottom: 14px; }
details.original summary { cursor: pointer; }

/* Lists: saved views, bulk bar */
.views-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.view-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: .85rem; color: var(--ink); text-decoration: none; }
.view-chip.on { border-color: var(--brand); color: var(--brand); font-weight: 700; }
.save-view { position: relative; }
.save-view summary { list-style: none; }
.save-view-box { position: absolute; right: 0; top: 110%; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; width: 260px; box-shadow: var(--shadow); }
.save-view-box input[name=name] { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; }
.bulk-bar { display: none; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 14px; background: color-mix(in srgb, var(--brand) 7%, #fff); border-bottom: 1px solid var(--line); }
.bulk-bar.on { display: flex; }
.bulk-group { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bulk-group input[name=tag_name] { width: 130px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .85rem; }
.manage-views { margin-top: 10px; }
.manage-views form { padding: 4px 0; }

/* Pipeline board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.board .col { background: #f8fafc; border: 1px solid var(--line); border-top: 4px solid var(--s); border-radius: 12px; padding: 10px; min-height: 200px; display: flex; flex-direction: column; }
.board .col.over { background: color-mix(in srgb, var(--s) 8%, #fff); outline: 2px dashed var(--s); }
.board header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: .9rem; }
.board .count { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; font-size: .78rem; }
.board .cards { display: grid; gap: 8px; align-content: start; flex: 1; }
.bcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; display: grid; gap: 4px; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.bcard[draggable=true] { cursor: grab; }
.bcard.dragging { opacity: .5; }
.bcard a { color: var(--ink); text-decoration: none; }
.bcard select { font-size: .78rem; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }

/* Edit candidate */
.edit-cand h3 { margin-top: 18px; }
.file-edit { display: grid; gap: 4px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; }
.edit-cand fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }

/* Printing a profile: show every section, hide the controls */
@media print {
  .tabs, .cb-nav, .cb-actions, .toasts, .search-btn, .cb-tags input { display: none !important; }
  [data-panel] { display: block !important; }
  [data-panel][hidden] { display: block !important; }
  .cand-bar { position: static; }
}
.save-next { align-items: center; }
.board-help { flex: 2 1 320px; align-self: end; margin: 0 0 8px; }

/* ===================== CIS 2.1 (Part 2) ===================== */
.tab-link { display: inline-block; padding: 9px 12px; border-bottom: 3px solid transparent; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.tab-link.on { color: var(--ink); border-bottom-color: var(--brand); }
.danger-text { color: #be123c !important; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: .78rem; cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--brand); color: var(--brand); }

/* Composer */
.composer { display: grid; gap: 12px; }
.cm-to { display: grid; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.editor-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.editor-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.editor-bar button { border: 1px solid transparent; background: none; border-radius: 6px; padding: 4px 9px; font: inherit; font-size: .85rem; cursor: pointer; }
.editor-bar button:hover { background: #fff; border-color: var(--line); }
.editor { min-height: 220px; padding: 12px 14px; outline: none; line-height: 1.6; }
.editor.sig { min-height: 110px; }
.editor:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
.ph-list { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.cm-opts { display: grid; gap: 8px; }
.cm-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.schedule-box { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.schedule-box input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.mail-body { line-height: 1.6; } .mail-body p { margin: .5em 0; }
.batch-card { display: grid; gap: 8px; margin-bottom: 12px; }
.tpl-layout { grid-template-columns: minmax(240px, 1fr) 2fr; align-items: start; }
@media (max-width: 900px) { .tpl-layout { grid-template-columns: 1fr; } }

/* Interviews */
.iv-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; display: grid; gap: 6px; }
.iv-card p { margin: 0; }
.iv-head { display: flex; gap: 8px; align-items: center; }
.scorecard { background: #f8fafc; border-radius: 10px; padding: 8px 10px; }
.iv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.iv-grid .span2 { grid-column: span 2; }
.cis-modal-box select, .cis-modal-box input[type=date], .cis-modal-box input[type=time], .cis-modal-box input[type=number] { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; }
label.check.inline { display: inline-flex; margin: 0 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-h { text-align: center; font-size: .78rem; color: var(--muted); padding: 4px 0; }
.cal-d { min-height: 86px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; display: grid; align-content: start; gap: 3px; font-size: .75rem; }
.cal-d.empty { border: 0; }
.cal-d.today { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, #fff); }
.cal-d .n { font-weight: 700; color: var(--muted); }
.cal-ev { display: block; background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--ink); border-radius: 5px; padding: 2px 4px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .cal-d { min-height: 56px; } .cal-ev { font-size: .65rem; } .iv-grid { grid-template-columns: 1fr; } .iv-grid .span2 { grid-column: auto; } }

/* Notifications */
.bell-btn { position: relative; border: 1px solid var(--line); background: #fff; border-radius: 10px; min-height: 36px; padding: 0 9px; cursor: pointer; color: var(--muted); margin-left: auto; }
.bell-btn + .search-btn { margin-left: 8px; }
.bell-n { position: absolute; top: -6px; right: -6px; background: #e11d48; color: #fff; border-radius: 999px; font-size: .68rem; font-weight: 800; padding: 1px 5px; }
.bell-pop { position: absolute; right: 18px; top: 58px; z-index: 50; width: min(360px, calc(100vw - 30px)); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; }
.bell-pop ul { list-style: none; margin: 8px 0 0; padding: 0; max-height: 50vh; overflow: auto; }
.bell-pop li { padding: 8px 6px; border-bottom: 1px solid #f1f5f9; display: grid; gap: 2px; }
.bell-pop li.unread { background: color-mix(in srgb, var(--brand) 6%, #fff); border-radius: 8px; }
.bell-pop a { color: var(--ink); text-decoration: none; font-size: .9rem; } .bell-pop small { color: var(--muted); }
.topbar { position: relative; }
.schedule-box input[type=datetime-local] { width: auto; max-width: 240px; }
.cm-to b + br { display: none; }
.cis-modal-box label.check { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-weight: 500; }
.cis-modal-box label.check select { min-width: 180px; }

/* CIS 2.2 — address verification */
.svc-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.svc-pick label { margin: 0; cursor: pointer; }
.svc-pick input { position: absolute; opacity: 0; }
.svc-pick span { display: grid; gap: 4px; border: 2px solid var(--line); border-radius: 14px; padding: 12px 14px; height: 100%; }
.svc-pick small { color: var(--muted); }
.svc-pick input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, #fff); }
.svc-pick input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.addr-form h3 { margin: 18px 0 8px; }
.addr-form .consent { margin: 16px 0; padding: 12px; background: #f8fafc; border-radius: 12px; }
.addr-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.addr-photos a { display: grid; gap: 4px; text-decoration: none; color: var(--muted); font-size: .8rem; }
.addr-photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.sim-card { border: 1px dashed #c4b5fd; background: #faf5ff; }
.danger-row { display: flex; gap: 8px; justify-content: flex-end; margin: 8px 0 16px; }
@media (max-width: 700px) { .svc-pick { grid-template-columns: 1fr; } }
