:root {
  --bg: #f5f6f8; --surface: #fff; --text: #1d2330; --muted: #6b7385; --border: #e2e5eb;
  --accent: #d6001c; --accent-text: #fff; --ok: #1a7f37; --warn: #9a6700; --danger: #c62828; --col-bg: #eceef2;
  color-scheme: light;
}
/* Тёмная тема: по системе (если не выбрана светлая вручную) или по выбору в шапке */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151b; --surface: #1b1f27; --text: #e6e8ec; --muted: #9aa2b1; --border: #2c323d;
    --accent: #ff4d5e; --ok: #4ac26b; --warn: #d29922; --danger: #ff6b6b; --col-bg: #161a21; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12151b; --surface: #1b1f27; --text: #e6e8ec; --muted: #9aa2b1; --border: #2c323d;
  --accent: #ff4d5e; --ok: #4ac26b; --warn: #d29922; --danger: #ff6b6b; --col-bg: #161a21; color-scheme: dark;
}
.theme-btn { border: 0; background: none; color: var(--muted); padding: 6px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login .theme-btn { position: fixed; top: 12px; right: 12px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); -webkit-tap-highlight-color: transparent; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0 0 12px; }
h2 { font-size: 18px; }
.muted { color: var(--muted); }
.error { color: var(--danger); min-height: 1em; margin: 8px 0 0; }

.login { max-width: 360px; margin: 18vh auto; text-align: center; padding: 0 16px; }
.login #gbtn { display: flex; justify-content: center; margin-top: 16px; }

.top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 2; }
.top nav { display: flex; gap: 4px; }
.top nav button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; color: var(--muted); font: inherit; cursor: pointer; }
.top nav button.active { background: var(--bg); color: var(--text); font-weight: 600; }
.tabs svg { display: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.top .link { margin-left: auto; }
.pill { font-size: 13px; padding: 3px 10px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.pill a { color: var(--accent); }

main { max-width: 1360px; margin: 0 auto; padding: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
label.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 14px; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
label.check input { width: auto; margin: 0; }
button { font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 7px 12px; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
button.danger { color: var(--danger); border-color: var(--danger); }
button.link { border: 0; background: none; color: var(--muted); padding: 4px; }
button:disabled { opacity: .5; cursor: default; }

.progress { display: flex; gap: 10px; align-items: center; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.cand { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.cand header { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.cand .name { font-weight: 600; }
.cand .score { font-weight: 700; font-size: 18px; color: var(--ok); white-space: nowrap; }
.cand .meta { font-size: 13px; color: var(--muted); }
.cand ul { margin: 0; padding-left: 18px; font-size: 13px; }
.cand .plus li::marker { content: "+ "; color: var(--ok); }
.cand .minus li::marker { content: "? "; color: var(--warn); }
.cand .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.cand .actions select { width: auto; margin: 0; padding: 6px 8px; }
.cand textarea { font-size: 13px; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.badge.interview { color: var(--ok); }

.cand.fresh { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.cand .fresh-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: -4px 0 2px;
  font-size: 13px; font-weight: 600; color: var(--accent); }
.cand .fresh-bar .link { font-size: 13px; font-weight: 400; text-decoration: underline; min-height: 0; }
.cand .others { font-size: 13px; padding: 6px 10px; border-radius: 8px; background: var(--bg); color: var(--muted); }
.cand .others span { color: var(--text); }
.cand .jobs { display: grid; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--bg); }
.cand .jobs-title { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.cand .job { display: grid; gap: 2px; padding-left: 10px; border-left: 2px solid var(--border); }
.cand .facts { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; }
.cand .facts .ok { color: var(--ok); }
.cand .facts .warn { color: var(--warn); }
.cand .facts [title]:not([title=""]) { cursor: help; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.cand .next { font-size: 13px; padding: 6px 10px; border-radius: 8px; background: var(--bg); }
.cand .next.overdue, .agenda li.overdue .when { color: var(--danger); }
.cand .next .link { font-size: 13px; text-decoration: underline; }
/* Тест кандидата: строка в карточке и подробный результат */
.cand .testline { font-size: 13px; padding: 6px 10px; border-radius: 8px; background: var(--bg); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.cand .testline .link { font-size: 13px; text-decoration: underline; }
.testline .ok, .dlg .ok { color: var(--ok); }
.testline .warn, .dlg .warn { color: var(--warn); }
.dlg ul.plus, .dlg ul.minus { padding-left: 18px; font-size: 14px; }
.dlg .plus li::marker { content: "+ "; color: var(--ok); }
.dlg .minus li::marker { content: "? "; color: var(--warn); }
.tbars { margin: 8px 0 12px; }
.tbar { display: grid; grid-template-columns: minmax(120px, 40%) 1fr 32px; gap: 8px; align-items: center; font-size: 13px; margin: 6px 0; }
.tbar > div { height: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 99px; overflow: hidden; }
.tbar i { display: block; height: 100%; background: var(--accent); }
.tbar b { text-align: right; font-variant-numeric: tabular-nums; }
.tbars p { margin: -4px 0 6px; }
#testLinkInput { margin-bottom: 8px; font-size: 13px; }
#testLinkDlg menu { flex-wrap: wrap; }
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); cursor: pointer; font-size: 14px; }
.agenda li:first-child { border-top: 0; }
.agenda .when { color: var(--muted); }
.toolbar .export { align-self: flex-end; }
/* Аватарка с инициалами: цвет — от имени (--h) */
.ava { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; letter-spacing: .02em;
  color: #fff; background: linear-gradient(135deg, hsl(var(--h, 210) 62% 52%), hsl(calc(var(--h, 210) + 40) 62% 42%)); user-select: none; }
.ava.big { width: 62px; height: 62px; font-size: 19px; }
.ava.all { background: linear-gradient(135deg, #feda75, #fa7e1e 35%, #d62976 65%, #962fbf); font-size: 15px; }
.ava.plus { background: var(--bg); color: var(--muted); font-size: 28px; font-weight: 400; border: 1px dashed var(--muted); }

/* Канбан: колонки фиксированной ширины с горизонтальной прокруткой — карточки не сжимаются и не налезают друг на друга */
body[data-screen="pipeline"] main { max-width: none; }
.board { position: relative; }
.cols { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.col { flex: 1 0 222px; max-width: 360px; background: var(--col-bg); border: 1px solid var(--border); border-top: 3px solid var(--stage); border-radius: 12px;
  padding: 10px; min-width: 0; scroll-snap-align: start; transition: border-color .15s, background .15s; }
.col[data-status="interesting"] { --stage: #e1306c; }
.col[data-status="invited"] { --stage: #3b82f6; }
.col[data-status="interview"] { --stage: #8b5cf6; }
.col[data-status="offer"] { --stage: #f59e0b; }
.col[data-status="hired"] { --stage: var(--ok); }
.col[data-status="reserve"] { --stage: var(--muted); }
.col h3 { font-size: 14px; color: var(--text); display: flex; gap: 8px; align-items: center; margin: 2px 2px 10px; min-height: 38px; line-height: 1.3; }
.col h3 .t { flex: 1; min-width: 0; }
.col h3 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--stage); flex: none; }
.col h3 .n { font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 0 8px; }
.col-body { display: flex; flex-direction: column; gap: 8px; min-height: 64px; max-height: calc(100vh - 250px); overflow-y: auto; padding: 1px; }
.col .empty { font-size: 12px; color: var(--muted); text-align: center; border: 1px dashed var(--border); border-radius: 10px; padding: 18px 8px; margin: 0; }
.col.over { border-color: var(--stage, var(--accent)); background: color-mix(in srgb, var(--stage, var(--accent)) 8%, var(--col-bg)); }
.mini { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px; cursor: grab;
  display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 2px rgb(0 0 0 / .06); transition: box-shadow .15s, transform .15s, border-color .15s; }
.mini:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mini.fresh { border-color: var(--accent); }
.mini.dragging { opacity: .4; }
.mini-top { display: flex; gap: 9px; align-items: flex-start; }
.mini-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mini .name { font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: break-word; hyphens: auto; }
.mini .ava { width: 30px; height: 30px; font-size: 12px; }
.one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.mini .skip { flex: none; margin: -2px -4px 0 -4px; border: 0; background: none; color: var(--muted); padding: 3px 4px; font-size: 12px; line-height: 1; min-height: 0;
  border-radius: 6px; opacity: 0; transition: opacity .15s; }
.mini:hover .skip, .mini .skip:focus-visible { opacity: 1; }
.mini .skip:hover { color: var(--danger); }
.mini .score { flex: none; font-weight: 700; font-size: 13px; color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border-radius: 99px; padding: 1px 8px; }
.mini .score.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.mini .meta { font-size: 12px; color: var(--muted); line-height: 1.35; }
.mini .prof { font-style: italic; }
.feed-note { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 12px; text-align: left; border-style: dashed; color: var(--muted); }
.feed-note svg { width: 18px; height: 18px; flex: none; fill: #e1306c; stroke: none; }
.feed-note:hover { color: var(--text); border-color: #e1306c; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--bg); border: 1px solid var(--border); color: var(--muted); white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip.ok { color: var(--ok); }
.chip.warn { color: var(--warn); }
.chip.bad { color: var(--danger); border-color: var(--danger); }
.chip.new { color: var(--accent); border-color: var(--accent); font-weight: 600; }
/* Зона «Не подходит» появляется только во время перетаскивания */
.drop-reject { display: none; position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 5; width: min(520px, calc(100vw - 32px));
  border: 2px dashed var(--danger); color: var(--danger); text-align: center; font-weight: 600; box-shadow: 0 6px 24px rgb(0 0 0 / .2); }
.drop-reject .col-body { min-height: 0; padding: 10px; display: block; }
.board.is-dragging .drop-reject { display: block; }
.drop-reject.over { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
@media (hover: hover) {
  .mini:hover { box-shadow: 0 4px 14px rgb(0 0 0 / .12); transform: translateY(-1px); border-color: color-mix(in srgb, var(--muted) 50%, var(--border)); }
}

/* ---------- Лента в стиле Instagram ---------- */
.home { max-width: 640px; margin: 0 auto; }
/* Остатки hh и Anthropic над лентой */
.balances { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; margin: 0 0 12px; }
.balances:empty { display: none; }
.bal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 9px 14px; background: var(--surface);
  border: 1px solid var(--border); border-left: 4px solid var(--ok); border-radius: 10px; font-size: 13px; min-width: 0; }
.bal > b { font-size: 13px; }
.bal.bal-warn { border-left-color: var(--warn); }
.bal.bal-bad { border-left-color: var(--danger); }
.bal-item { white-space: nowrap; }
.bal-item.warn b, .bal-item.warn { color: var(--warn); }
.bal-item.bad b, .bal-item.bad { color: var(--danger); white-space: normal; }
.bal .link { margin-left: auto; }
.bal #balRefresh { margin-left: 0; }
@media (max-width: 900px) { .balances { grid-template-columns: minmax(0, 1fr); } .bal-item { white-space: normal; } }

.stories { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 4px; scrollbar-width: thin; }
.story { flex: none; width: 78px; border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; color: var(--text); }
.story .ring { padding: 3px; border-radius: 50%; background: var(--border); display: grid; }
.story .ring .ava { border: 3px solid var(--bg); box-sizing: content-box; }
.story.has-new .ring { background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5); }
.story.active .story-t { font-weight: 700; }
.story.active .ring { outline: 2px solid var(--text); outline-offset: 1px; }
.story.add .ring { background: none; }
.story-t { font-size: 12px; line-height: 1.25; max-width: 78px; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; }
.story .count { position: absolute; top: 0; right: 4px; border: 2px solid var(--bg); }
.feed-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin: 4px 0 12px; }
.feed-head h2 { margin: 0 0 2px; }
.feed-head .small { margin: 0; max-width: 440px; }
.feed { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.post { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  transition: transform .45s ease, opacity .45s ease, max-height .45s ease; max-height: 4000px; }
/* Статус поиска работы с hh («Не ищет работу») — полоса в самом верху карточки */
.job-status { padding: 7px 14px; font-weight: 600; font-size: 14px; color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.job-status::before { content: "⏸ "; }
.job-status.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent);
  border-bottom-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.cand > .job-status { border-radius: 8px; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); }
/* Статус поиска работы текстом в цветном блоке поста — для любого статуса */
.search-st { display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: #fff; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .35); }
.search-st::before { content: "● "; color: #4ac26b; }
.search-st.warn::before { color: #e3b341; }
.search-st.bad::before { color: #ff6b6b; }
.post.liked { transform: translateX(40%) rotate(3deg); opacity: 0; }
.post.noped { transform: translateX(-40%) rotate(-3deg); opacity: 0; }
.post-head { display: flex; gap: 10px; align-items: center; padding: 10px 14px; }
.post-head .who { flex: 1; min-width: 0; }
.post-head .name { font-weight: 600; }
.post-head .meta { font-size: 13px; color: var(--muted); }
.post-media { position: relative; display: flex; gap: 18px; align-items: center; padding: 26px 20px; min-height: 190px; cursor: pointer; user-select: none;
  background: radial-gradient(circle at 15% 20%, hsl(var(--h) 70% 60% / .35), transparent 55%), radial-gradient(circle at 90% 90%, hsl(calc(var(--h) + 60) 70% 55% / .35), transparent 50%),
  linear-gradient(135deg, hsl(var(--h) 45% 22%), hsl(calc(var(--h) + 40) 45% 16%)); color: #fff; }
.score-ring { flex: none; width: 104px; height: 104px; border-radius: 50%; display: grid; place-content: center; text-align: center; color: #fff;
  background: radial-gradient(closest-side, rgb(0 0 0 / .45) 78%, transparent 80% 100%), conic-gradient(var(--ring, #fff) calc(var(--v) * 1%), rgb(255 255 255 / .18) 0); }
.score-ring.ok { --ring: #4ade80; }
.score-ring.warn { --ring: #fbbf24; }
.score-ring b { font-size: 32px; line-height: 1; }
.score-ring span { font-size: 11px; opacity: .8; }
.media-text { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.media-text .pos { font-size: 21px; font-weight: 700; line-height: 1.2; }
.media-text .sal { font-size: 15px; font-weight: 600; opacity: .95; }
.media-text .prof { font-size: 13px; opacity: .75; }
.heart-pop { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; }
.heart-pop svg { width: 110px; height: 110px; fill: #fff; stroke: none; filter: drop-shadow(0 4px 18px rgb(0 0 0 / .35)); }
.post.liked .heart-pop { animation: pop .45s ease-out; }
@keyframes pop { 0% { opacity: 0; transform: scale(.4); } 40% { opacity: 1; transform: scale(1.1); } 100% { opacity: .9; transform: scale(1); } }
.post-actions { display: flex; gap: 8px; align-items: center; padding: 10px 14px 4px; flex-wrap: wrap; }
.post-actions .grow { flex: 1; }
.post-actions .like, .post-actions .nope { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; border-radius: 99px; padding: 8px 16px; }
.post-actions .like { background: #e1306c; border-color: #e1306c; color: #fff; }
.post-actions .like svg { width: 18px; height: 18px; fill: #fff; stroke: none; }
.post-actions .nope { color: var(--muted); }
.post-actions .nope:hover { color: var(--danger); border-color: var(--danger); }
.post-actions .btn, .post-actions [data-act="more"] { font-size: 14px; padding: 7px 12px; }
.post-contacts { display: flex; gap: 8px 14px; align-items: center; flex-wrap: wrap; padding: 8px 14px 2px; font-size: 14px; }
.post-contacts > a:not(.btn) { color: var(--text); font-weight: 600; }
.post-contacts button { font-size: 14px; padding: 6px 12px; }
.post-contacts .small { margin: 0; }
.post-contacts .btn.wa { padding: 5px 12px; font-size: 14px; }
.post-body { padding: 6px 14px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.post-body p { margin: 0; }
.post-body ul { margin: 0; padding-left: 18px; font-size: 13px; }
.post-body .plus li::marker { content: "+ "; color: var(--ok); }
.post-body .minus li::marker { content: "? "; color: var(--warn); }
.post-body .facts { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; }
.post-body .facts .ok { color: var(--ok); }
.post-body .facts .warn { color: var(--warn); }
.post-body .others { font-size: 13px; padding: 6px 10px; border-radius: 8px; background: var(--bg); color: var(--muted); }
.post-jobs summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.post-jobs .jobs { display: grid; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--bg); margin-top: 6px; }
.post-jobs .jobs-title { display: none; }
.post-jobs .job { display: grid; gap: 2px; padding-left: 10px; border-left: 2px solid var(--border); }
.job-duties, .job-ach { margin-top: 3px; line-height: 1.45; }
.job-ach ul { margin: 2px 0 0; padding-left: 18px; }
.job-ach li { margin: 1px 0; }
.job-ach li::marker { color: var(--ok); }
.jobs-more { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.feed-empty { text-align: center; padding: 36px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.feed-empty .done-mark { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; color: #fff;
  background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf); }
.feed-empty .buttons { justify-content: center; margin-top: 12px; }
.panel > summary { cursor: pointer; font-weight: 600; padding: 2px 0; }
.panel[open] > summary { margin-bottom: 14px; }
.panel #searchForm { margin-bottom: 20px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  max-width: calc(100vw - 32px); padding: 10px 14px; border-radius: 12px; background: #1d2330; color: #fff; box-shadow: 0 8px 28px rgb(0 0 0 / .3); font-size: 14px; }
.toast button { background: none; border: 0; color: #ff8fb1; font-weight: 600; padding: 4px 6px; min-height: 0; }

dialog.wide { width: min(640px, calc(100vw - 32px)); }
#candBody .cand { border: 0; padding: 0; }

.small { font-size: 13px; margin: 0 0 12px; }
.row { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.row h2 { margin: 0; }
.buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.file-btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); font-size: 15px; margin: 0;
  border: 1px dashed var(--muted); border-radius: 8px; padding: 7px 12px; background: var(--surface); }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }


.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar label { margin: 0; min-width: 200px; }

.me { font-size: 13px; color: var(--muted); margin-left: auto; }
.me + .link { margin-left: 0; }
.count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: var(--accent-text); font-size: 12px; font-weight: 600; }
.badge.warn { color: var(--warn); }
.badge.ok { color: var(--ok); }
.cand .contacts { font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; }
.cand .contacts a { color: var(--text); }
a.btn { display: inline-flex; align-items: center; text-decoration: none; border-radius: 8px; border: 1px solid var(--border); padding: 7px 12px; color: var(--text); font-size: 15px; }
a.btn.wa { border-color: #25d366; color: #25d366; font-weight: 600; }
.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline input[type="email"] { flex: 1 1 240px; width: auto; margin: 0; }
.inline label.check { margin: 0; }

.table { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.table .tr { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(140px, 1.5fr) minmax(160px, 1.5fr) auto; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border); align-items: center; }
.table .tr:first-child { border-top: 0; }
.table .tr.click { cursor: pointer; }
.table .tr.click:hover { background: var(--bg); }
.table .sub { font-size: 13px; color: var(--muted); }
.table .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.timeline { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow: auto; }
.timeline li { padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.timeline li:first-child { border-top: 0; }
.timeline .when { font-size: 12px; color: var(--muted); }
.kd { font-size: 13px; margin: 0 0 12px; padding-left: 18px; }

.history { list-style: none; margin: 0; padding: 0; }
.history li { padding: 8px 0; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.history li:first-child { border-top: 0; }
.history a { color: var(--text); cursor: pointer; text-decoration: underline; }

dialog { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); padding: 0; width: min(560px, calc(100vw - 32px)); }
dialog::backdrop { background: rgb(0 0 0 / .4); }
.dlg { padding: 16px; }
.dlg menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 8px 0 0; }

/* ---------- Цвета этапов (общие для доски, дашборда и списков) ---------- */
.st-interesting { --stage: #e1306c; } .st-invited { --stage: #3b82f6; } .st-interview { --stage: #8b5cf6; }
.st-offer { --stage: #f59e0b; } .st-hired { --stage: var(--ok); } .st-reserve { --stage: #64748b; }
.st-new { --stage: #94a3b8; } .st-rejected, .st-rej { --stage: var(--danger); } .st-skipped, .st-skip { --stage: #a1a1aa; }

/* ---------- Дашборд ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px;
  border-top: 3px solid var(--stage, var(--border)); }
.kpi b { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi small { font-size: 12px; color: var(--stage, var(--muted)); font-weight: 600; }
.dash { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.dash .card { margin-bottom: 14px; }
.dash h2 .muted { font-weight: 400; }

.attn { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow: auto; }
.attn li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; padding: 10px 10px 10px 12px; margin-bottom: 6px; border-radius: 10px; cursor: pointer;
  border-left: 3px solid var(--lv); background: color-mix(in srgb, var(--lv) 7%, transparent); }
.attn li:hover, .attn li:focus-visible { background: color-mix(in srgb, var(--lv) 14%, transparent); outline: none; }
.attn .lv { grid-row: span 2; align-self: start; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--lv); padding-top: 3px; width: 92px; }
.attn .attn-who { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.attn .attn-who .meta { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.attn .why { grid-column: 2; font-size: 14px; }
.attn .lv-urgent { --lv: var(--danger); } .attn .lv-look { --lv: #3b82f6; } .attn .lv-back { --lv: var(--ok); }
.score { font-weight: 700; font-size: 13px; color: var(--ok); }
.score.warn { color: var(--warn); }

.pos { padding: 12px 0; border-top: 1px solid var(--border); }
.pos:first-child { border-top: 0; padding-top: 0; }
.pos[data-pid] { cursor: pointer; }
.pos[data-pid]:hover .pos-head strong { color: var(--accent); }
.pos-head .muted { white-space: nowrap; }
.pos-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.pos-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--col-bg); gap: 2px; margin-bottom: 8px; }
.pos-bar i { background: var(--stage); min-width: 4px; }
.pos-nums { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; margin-bottom: 4px; }
.pos-nums span { display: inline-flex; align-items: center; gap: 4px; }
.pos-nums span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--stage); }
.pos-nums .zero { color: var(--muted); opacity: .55; }

/* ---------- Фильтры-чипы и компактные строки (архив, реестр) ---------- */
.chipbar { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.fchip { border-radius: 99px; padding: 5px 12px; font-size: 13px; background: var(--surface); }
.fchip.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.rows { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.row { display: grid; grid-template-columns: 34px minmax(160px, 2fr) minmax(120px, 1.3fr) 190px 82px 36px 130px; gap: 12px; align-items: center;
  padding: 9px 14px; border-top: 1px solid var(--border); cursor: pointer; }
.row:first-child { border-top: 0; }
.row:hover, .row:focus-visible { background: var(--bg); outline: none; }
.row .ava { width: 34px; height: 34px; font-size: 13px; }
.row-who { display: flex; flex-direction: column; min-width: 0; }
.row-who .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-who .meta, .row-prof, .row-when { font-size: 13px; color: var(--muted); }
.row-when { font-variant-numeric: tabular-nums; }
.row-act { display: flex; gap: 6px; justify-content: flex-end; }
.row-act button { padding: 5px 10px; font-size: 13px; }
.pill-st { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px;
  color: var(--stage); background: color-mix(in srgb, var(--stage) 12%, transparent); }
.empty-rows { padding: 16px; margin: 0; }
.one { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

@media (max-width: 1000px) { .dash { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .kpis { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .kpi { padding: 10px; } .kpi b { font-size: 22px; }
  .attn .lv { width: auto; grid-row: auto; grid-column: 1 / -1; padding: 0; }
  .attn li { grid-template-columns: minmax(0, 1fr); }
  .attn .why { grid-column: 1; }
  .row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 4px 10px; }
  .row-prof, .row-when { display: none; }
  .row-st { grid-column: 2; grid-row: 2; }
  .row-score { grid-column: 3; grid-row: 1; }
  .row-act { grid-column: 3; grid-row: 2; }
}


/* ---------- Телефон ---------- */
@media (max-width: 720px) {
  body { font-size: 15px; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

  /* Шапка: название, статус hh (обрезается), выход; меню — внизу экрана */
  .top { flex-wrap: nowrap; gap: 8px; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); }
  .top .brand { white-space: nowrap; }
  .top .pill { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .me { display: none; }
  .top .theme-btn span { display: none; }
  .top .theme-btn { padding: 8px; }
  .top .link { margin-left: 0; padding: 8px 4px; white-space: nowrap; }

  .top .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0;
    background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
  .top .tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; min-height: 56px;
    border-radius: 0; font-size: 11px; position: relative; }
  .top .tabs button.active { background: none; color: var(--accent); }
  .tabs svg { display: block; }
  .tabs .count { position: absolute; top: 4px; left: calc(50% + 6px); font-size: 10px; min-width: 16px; }

  main { padding: 12px; }
  .card { padding: 14px; border-radius: 12px; margin-bottom: 12px; }
  h2 { font-size: 17px; }

  /* Поля 16px — иначе iPhone приближает страницу при вводе; кнопки — под палец */
  input, select, textarea { font-size: 16px; padding: 10px 12px; }
  button, a.btn { min-height: 44px; }
  button.link { min-height: 0; }
  .buttons > button, .buttons > .file-btn { flex: 1 1 100%; min-height: 44px; }
  .row > button { flex: 1 1 100%; }

  /* Карточка кандидата: действия сеткой в две колонки, главные — на всю ширину */
  .cand { padding: 12px; }
  .cand .actions { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; gap: 8px; }
  .cand .actions .wa { order: -1; }
  .cand .actions > * { width: 100%; justify-content: center; text-align: center; padding: 8px 6px; font-size: 14px; }
  .cand .actions select { grid-column: 1 / -1; padding: 10px 12px; font-size: 16px; }
  .cand .actions .danger, .cand .actions .wa { grid-column: 1 / -1; }
  .cand .contacts a { padding: 6px 0; }

  /* Воронка: колонки листаются свайпом по одной */
  .cols { gap: 10px; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding-bottom: 6px; margin: 0 -12px; padding-left: 12px; padding-right: 12px; scroll-padding: 0 12px; }
  .col { flex: 0 0 86%; max-width: none; }
  .col-body { max-height: none; }
  .mini { cursor: pointer; padding: 11px 12px; }
  .mini .skip { opacity: .6; }

  /* Лента: на всю ширину, кнопки под палец */
  .stories { margin: 0 -12px; padding-left: 12px; padding-right: 12px; gap: 10px; }
  .feed-head .buttons { width: 100%; }
  .feed-head .buttons > button { flex: 1; }
  .post-media { padding: 20px 16px; min-height: 160px; gap: 14px; }
  .score-ring { width: 86px; height: 86px; }
  .score-ring b { font-size: 26px; }
  .media-text .pos { font-size: 18px; }
  .post-actions .like, .post-actions .nope { flex: 1 1 40%; justify-content: center; }
  .post-actions .grow { display: none; }
  .post-actions .btn, .post-actions [data-act="more"] { flex: 1 1 40%; justify-content: center; }
  .toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
  dialog.wide { width: 100%; }

  .agenda li { grid-template-columns: 1fr; gap: 2px; }
  .toolbar .export { flex: 1 1 100%; justify-content: center; }
  .toolbar { gap: 8px; }
  .toolbar label { flex: 1 1 140px; min-width: 0; }

  .inline { flex-direction: column; align-items: stretch; }
  .inline input[type="email"] { flex: none; width: 100%; }

  .table .tr { grid-template-columns: 1fr; gap: 4px; padding: 12px; }
  .table .acts { justify-content: flex-start; align-items: center; }
  .history li { flex-direction: column; gap: 2px; }

  /* Диалоги — шторкой снизу */
  dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 16px 16px 0 0; border-bottom: 0; max-height: 92vh; }
  .dlg { padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
  .dlg menu button { flex: 1; }
  .timeline { max-height: none; }
}

/* Команда: профили, открытые рекрутеру */
.table .tr .access { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-check { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 13px; color: var(--text); cursor: pointer; white-space: nowrap; width: auto; margin: 0; }
.chip-check input { width: auto; flex: none; }
.chip-check:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.chip-check input { margin: 0; }

/* Свои тесты профиля: список и редактор */
#templatesBox { margin-top: 20px; }
#templates { margin-bottom: 10px; }
.tpl-row { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.tpl-row:first-child { border-top: 0; }
.tpl-row .grow { flex: 1 1 220px; min-width: 0; }
.tpl-gen { margin-bottom: 14px; display: grid; gap: 8px; }
.tpl-gen .inline { align-items: flex-end; }
.tpl-gen input[type="number"] { width: 90px; }
#tplMinutes { width: 120px; }
.tpl-q { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 10px 0; display: grid; gap: 6px; }
.tpl-q-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tpl-q-head .grow { flex: 1; }
.tpl-q-head input[type="number"] { width: 56px; padding: 4px 6px; }
.tpl-q-head .inline { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; }
.tpl-opt { display: flex; gap: 8px; align-items: center; }
.tpl-opt input[type="radio"] { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--ok); }
.tpl-opt input:not([type="radio"]) { flex: 1; min-width: 0; }
.test-answers li { margin-bottom: 10px; }
.answer-text { white-space: pre-wrap; background: var(--bg); border-radius: 8px; padding: 6px 10px; margin: 4px 0; }

/* Публикация на сайте: предпросмотр и ссылка для рекрутеров */
#publishBox { margin-top: 20px; }
#publishBox .buttons { align-items: center; }
.pub-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin: 8px 0 12px; display: grid; gap: 6px; }
.pub-card p { margin: 4px 0; }
.pub-sec ul { margin: 4px 0 0; padding-left: 20px; }
#joinBox { margin-top: 14px; }
#joinBox .inline { display: flex; gap: 8px; }
#joinUrl { flex: 1; min-width: 0; }
/* Заявки рекрутеров на вакансии */
.table .tr.has-req { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.req-line { gap: 10px; }
.req { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; padding: 4px 4px 4px 12px;
  border: 1px dashed var(--accent); border-radius: 999px; }
.req button.small { padding: 3px 10px; font-size: 13px; min-height: 0; }
