/* App shell: dark sidebar + work area. Consumes tokens.css only — no literal colours.
 * The eight sections arriving in phases 2–7 render inside .main and inherit all of this.
 */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app {
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  min-height: 100vh;
}

/* ---------- sidebar ---------- */

.side {
  background: var(--side-bg);
  border-right: 1px solid var(--side-line);
  padding: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--side-line);
  margin-bottom: 12px;
}

/* Знак приложения. Прежние четыре кружка повторяли логотип Авито — автопроверка
 * Маркетплейса вернула заявку и за иконку, и за скриншоты. Сам рисунок лежит в
 * page.ts (MARK), здесь только размер: он обязан совпадать с иконкой в карточке. */
.mark { width: 26px; height: 26px; flex: 0 0 auto; display: block; }
.wizard-cap .mark { width: 22px; height: 22px; }

.brand-name { color: var(--ink); font-weight: 700; font-size: 14px; letter-spacing: -.01em; }

.side-caps {
  color: var(--side-caps);
  text-transform: uppercase;
  letter-spacing: .07em;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 20px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 10px 14px;
  margin: 2px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--side-text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.nav-item:hover { background: var(--side-hover-bg); color: var(--side-text-hover); }
.nav-item.active { background: var(--side-active-bg); color: var(--side-text-hover); font-weight: 600; }

.count {
  margin-left: auto;
  background: var(--side-count-bg);
  color: var(--side-count-text);
  border-radius: 99px;
  padding: 1px 7px;
  font-size: 11px;
}
.nav-item.active .count { background: var(--accent); color: #fff; }

.tag-new {
  margin-left: auto;
  background: var(--special);
  color: #fff;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}
.tag-soon {
  margin-left: auto;
  background: var(--side-count-bg);
  color: var(--side-count-text);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
}

.side-foot { margin-top: auto; padding: 16px 12px 0; }
.plan-card {
  background: var(--side-card-bg);
  border: 1px solid var(--side-card-line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--side-card-text);
  font-size: 12px;
}
.plan-card b { color: var(--ink); }

/* ---------- work area ---------- */

.main { display: flex; flex-direction: column; min-width: 0; }

/* Topbar: the app's own header inside the Bitrix frame. */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.topbar-name { font-size: 15px; font-weight: 600; }
.topbar-acc {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  color: var(--muted); font-size: 13px; white-space: nowrap;
}

.work { flex: 1; overflow-y: auto; padding: 32px 40px; }
.work-inner { max-width: 960px; }
/* Diagnostics carries a right-hand help rail, so it gets the full width: at 960px the
 * rail ate the data column while the screen stood empty to the right. The cap keeps
 * lines readable on a very wide monitor. */
.work-inner.wide { max-width: 1400px; }

/* The setup wizard sits in the middle of the screen. It is a short, focused column —
 * pinned to the left edge of a wide monitor it read as a page that failed to load the
 * rest of itself. */
.work-inner.centered { max-width: 920px; margin: 0 auto; }

/* Caption over the steps: says what this sequence is before the numbers explain where
 * in it you are. Centred with the stepper; the step's own title stays left, over the
 * content it describes. */
.wizard-cap {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 20px;
}

.page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 24px; }
.page-title { font-size: 22px; font-weight: 700; line-height: 1.3; margin: 0; }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card + .card { margin-top: 16px; }

.row { display: flex; align-items: center; gap: 10px; padding: 14px 0; }
.row + .row { border-top: 1px solid var(--divider); }
.row-name { font-weight: 500; font-size: 14px; }
.row-hint { color: var(--muted-2); font-size: 11px; line-height: 1.4; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
}
/* Small uppercase tag — field types, "ОБРАЩЕНИЕ", "Скоро". */
.tag {
  display: inline-block; padding: 3px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
  background: var(--divider); color: var(--muted);
}
.tag.purple { background: var(--accent-bg); color: var(--accent); }
.tag.blue   { background: var(--info-bg);   color: var(--info); }
.badge.ok    { background: var(--ok-bg);     color: var(--ok-text); }
.badge.warn  { background: var(--warn-bg);   color: var(--ink); }
.badge.err   { background: var(--danger-bg); color: var(--danger); }
.badge.acc   { background: var(--accent-bg); color: var(--accent-press); }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn, #E5A50A); }
.dot.err { background: var(--danger); }

.btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 0 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn-sm { height: 32px; padding: 0 12px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:disabled { color: var(--muted-2); cursor: default; background: var(--surface); }
.btn-primary:hover, .btn-primary:active { background: var(--accent-press); border-color: var(--accent-press); }
.btn:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 1px; }

/* ---------- form controls ----------
 * One look for every field on every screen. Previously each screen styled its own
 * inputs, so the height differed section to section — the kind of unevenness nobody
 * can name but everybody sees. Checkboxes are excluded by listing types explicitly.
 */
.card select,
.card input[type="text"],
.card input[type="search"],
.card input[type="number"],
.card input[type="date"] {
  height: 36px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  max-width: 100%;
}
.card select:focus-visible,
.card input:focus-visible {
  outline: 3px solid var(--accent-ring);
  outline-offset: 1px;
  border-color: var(--accent);
}

/* Pager under a long list. Same control on every screen that has one. */
.pager { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.pager .row-hint { margin-right: auto; }

/* An alarm, not a note: this is the one block on the screen that must interrupt. Used
 * when applications arrive and get dropped, or when Avito has gone quiet. */
.alarm {
  background: var(--warn-bg);
  border: 1px solid var(--warn, #E5A50A);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.55;
}
.alarm-t { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.alarm-list { margin: 8px 0 12px; padding-left: 20px; }
.alarm-list li { margin: 2px 0; }
.alarm .btn { margin-top: 4px; }

/* ---------- tariffs ---------- */
.pr-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 8px; }
.pr-plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
/* The plan in force is outlined, not coloured in: this is a statement of fact, not a
 * call to action — the action is the other card. */
.pr-plan.current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.pr-name { font-weight: 600; font-size: 15px; }
.pr-price { font-size: 26px; font-weight: 700; line-height: 1.2; margin-top: 2px; }
.pr-price span { font-size: 13px; font-weight: 500; color: var(--muted); }
.pr-line { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; font-size: 13px; }
.pr-label { color: var(--ink-2); }
.pr-mark { flex: 0 0 auto; width: 16px; font-weight: 700; }
.pr-mark.yes { color: var(--ok); }
.pr-mark.no { color: var(--faint); }
.pr-contacts { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }

/* AI grade chips — used by the scoring module later, defined once here. */
.grade { width: 22px; height: 22px; border-radius: var(--radius-sm); color: #fff;
         font-weight: 700; font-size: 12px; display: inline-grid; place-items: center; }
.grade.a { background: var(--grade-a); }
.grade.b { background: var(--grade-b); }
.grade.c { background: var(--grade-c); }
.grade.d { background: var(--grade-d); }

@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; }
  .side-foot { margin: 0; }
}

/* ---------- field mapping ---------- */

.map-head, .map-row {
  display: grid;
  grid-template-columns: minmax(200px, 1.1fr) 20px minmax(230px, 1fr) minmax(200px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}
.map-head {
  color: var(--caps); font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; border-bottom: 1px solid var(--line);
}
.map-row + .map-row { border-top: 1px solid var(--divider); }
.map-name { font-weight: 500; font-size: 14px; }
.map-type {
  margin-left: 8px; font-size: 10px; font-weight: 700; color: var(--muted);
  background: var(--divider); border-radius: 4px; padding: 3px 6px; text-transform: uppercase;
}
.map-hint { color: var(--muted-2); font-size: 11px; margin-top: 3px; line-height: 1.4; }

/* Mapping cell: the select and the per-row «create the field» button stand side by side.
 * Without the flex row the button dropped under the select and broke the column grid. */
.map-cell { display: flex; align-items: center; gap: 6px; min-width: 0; }
.map-cell select { flex: 1 1 auto; min-width: 0; }
.map-mk { flex: 0 0 auto; height: 36px; padding: 0 10px; font-size: 12px; }
.map-arrow { color: var(--faint); text-align: center; }
.map-row select {
  width: 100%; height: 36px; font: inherit; font-size: 13px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0 10px;
}
.map-row select:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 1px; border-color: var(--accent); }
/* Одно поле выбрано для нескольких источников — обе строки подсвечиваются, сохранение заблокировано. */
.map-row select.dup { border-color: var(--danger); background: var(--danger-bg); }
.map-actions { display: flex; align-items: center; gap: 10px; margin-top: 16px; }

/* Status sync maps ONE thing to ONE thing, so its header and rows share a two-column
 * grid instead of the four the field mapping needs. */
.map-2 .map-head, .map-2 .map-row { grid-template-columns: minmax(220px, 1fr) 24px minmax(240px, 1fr); }
.map-2 .map-row select { width: 100%; }

/* Avito status codes, coloured by what they mean to the candidate. */
.map-type.t-new       { background: var(--info-bg);   color: var(--info); }
.map-type.t-inprocess { background: var(--accent-bg); color: var(--accent); }
.map-type.t-interview { background: var(--info-bg);   color: var(--info); }
.map-type.t-selected  { background: var(--ok-bg);     color: var(--ok-text); }
.map-type.t-rejected  { background: var(--danger-bg); color: var(--danger); }

/* Labelled controls in a row: the label sits above its field. */
.fld-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; padding-bottom: 4px; }
.fld label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.fld select { width: 100%; }
.fld .map-hint { margin-top: 4px; }
/* Stacked on their own (outside .fld-grid) the fields need vertical rhythm. */
.card > .fld + .fld { margin-top: 16px; }
.card > .fld { margin-top: 4px; }
.imp-dates { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.imp-quick { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .map-head, .map-2 .map-head { display: none; }
  .map-row, .map-2 .map-row { grid-template-columns: 1fr; gap: 6px; }
  .map-arrow { display: none; }
}
.map-auto { display: flex; align-items: center; }

/* backfill progress */
.imp-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.imp-bar i { display: block; height: 100%; background: var(--accent); transition: width .3s ease; }
/* fields here inherit the shared control style above */

/* Diagnostics: live data left, reference material in a narrow rail on the right.
 *
 * The rail is a FIXED width and the data column takes everything else — so on a wide
 * monitor the extra space goes to the numbers, not to the help text, and the layout
 * looks deliberate at any window size instead of leaving a void on the right.
 */
#diag-root { max-width: none; }
.diag-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.diag-side { position: sticky; top: 20px; }
@media (max-width: 1100px) {
  .diag-cols { grid-template-columns: 1fr; }
  .diag-side { position: static; }
}
#diag-root .card, #diag-root .note { max-width: none; }

/* The rail is help, not data: quieter background, no card border competing with the
 * real cards on the left, smaller type. */
.diag-side .card {
  background: var(--bg);
  border-color: var(--divider);
  padding: 6px 16px;
}
.diag-side .diag-h { color: var(--muted-2); }
.diag-side .faq > summary { font-size: 13px; font-weight: 500; padding: 10px 0; }
.diag-side .faq-a { font-size: 12.5px; padding-left: 22px; }

/* FAQ accordion — native <details>, no JS and nothing to break */
.faq { border-top: 1px solid var(--line); }
.faq:first-child { border-top: 0; }
.faq > summary {
  cursor: pointer; padding: 11px 0; font-weight: 500; list-style: none;
  display: flex; align-items: flex-start; gap: 10px;
}
.faq > summary::-webkit-details-marker { display: none; }
.faq > summary:before {
  content: '+'; color: var(--muted); font-weight: 600; line-height: 1.4; flex: 0 0 auto;
}
.faq[open] > summary:before { content: '–'; }
.faq[open] > summary { color: var(--accent-press); }
.faq-a { color: var(--muted); font-size: 13px; margin: 0 0 12px; padding: 0 0 0 40px; max-width: 780px; }
.faq-a li { margin: 0 0 6px; padding-left: 2px; }
.faq-a li:last-child { margin-bottom: 0; }
.faq-a li::marker { color: var(--faint); }

/* diagnostics: counter tiles and section headings */
/* Three equal tiles across the data column: they start and end exactly where the cards
 * under them do. Narrow windows wrap them instead of squeezing. */
.diag-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.diag-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 2px;
}
.diag-tile b { font-size: 24px; line-height: 1.1; }
.diag-tile-t { font-weight: 500; font-size: 13px; }
.diag-tile-h { color: var(--muted); font-size: 12px; }
.diag-h {
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); margin: 22px 0 8px;
}

/* per-vacancy overrides: two labelled selects under an enabled vacancy */
.vac-ov { margin: 10px 0 2px 54px; padding: 10px 12px; background: var(--bg); border-radius: var(--radius-sm); }
.vac-ov-t { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.vac-ov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 14px; }
.vac-ov-grid label { display: block; }
.vac-ov-grid label > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.vac-ov-grid select { width: 100%; }
@media (max-width: 700px) { .vac-ov { margin-left: 0; } }

/* ---------- vacancy rows ---------- */
.vac { padding: 12px 0; border-top: 1px solid var(--divider); }
.vac-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vac-main { min-width: 0; flex: 1 1 320px; }
.vac-title { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vac-marks { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.vac-msg { margin-left: auto; }
/* Search + filters strip above the list. */
.vac-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 0 4px; }
.vac-tools .vac-q { flex: 1 1 240px; min-width: 180px; }
.vac-check { display: flex; align-items: center; gap: 6px; cursor: pointer; }
/* Выбор ответственного в панели фильтров: не растягивается, чтобы поиск остался главным. */
.vac-tools #resp-filter { flex: 0 1 220px; max-width: 260px; }
.vac-tools #sort { flex: 0 0 auto; }

/* Настройка поведения приложения — своей плашкой, а не галочкой в углу: её читают
   один раз и принимают решение, поэтому у неё есть заголовок и объяснение. */
.vac-auto {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  /* Выключенная настройка приглушена, включённая выглядит как обычная карточка —
     чтобы состояние читалось не только по тумблеру. */
  background: var(--bg);
}
.vac-auto.on { background: var(--surface); }

/* Уведомление поверх любого экрана: текст слева, действия справа. */
.fresh-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.fresh-banner .btn { white-space: nowrap; }
.fresh-banner > div:first-child { flex: 1 1 auto; }
.vac-auto .row-name { margin: 0; }

/* Шапка настроек вакансии: что задано сейчас — слева, кнопка раскрытия — справа.
   Раскрытыми они висеть не должны: при полусотне включённых вакансий страница
   превращается в простыню из выпадающих списков. */
.vac-ov-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 2px 46px;
}
/* «настроить» — ссылка, а не кнопка: в списке их под сотню, и каждая кнопка тянет
 * на себя внимание, которого строка не стоит (замечание Ксении 28.08). */
.vac-ov-btn { margin-left: auto; font-size: 12px; color: var(--accent-press); text-decoration: none; border-bottom: 1px dashed currentColor; }
.vac-ov-btn:hover { color: var(--accent); }

/* switch */
.sw { position: relative; display: inline-block; width: 36px; height: 20px; flex: 0 0 auto; }
.sw input { opacity: 0; width: 0; height: 0; }
.sw span {
  position: absolute; inset: 0; cursor: pointer; border-radius: 10px;
  background: var(--faint); transition: background .15s;
}
.sw span:before {
  content: ""; position: absolute; height: 16px; width: 16px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: transform .15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}
.sw input:checked + span { background: var(--ok); }
.sw input:checked + span:before { transform: translateX(16px); }

/* A rule the user should read BEFORE acting — not an error, and not the main event.
 *
 * It used to be a filled blue panel. Six lines of text in a coloured box outweigh the
 * controls they explain, and on a screen with two of them the eye starts skipping the
 * blue entirely. Now it is a quiet line with an info mark: present, readable, secondary.
 * One component, so every screen changes together. */
.note {
  position: relative;
  padding-left: 24px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.note::before {
  content: 'i';
  position: absolute; left: 0; top: 1px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--info-bg); color: var(--info);
  font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
/* The heading runs into the text as a lead-in instead of standing on its own line. */
.note-t { display: inline; font-weight: 600; color: var(--ink-2); }
.note-t::after { content: '. '; }

/* ---------- account cards ---------- */

/* ---------- cabinets ----------
 * One cabinet = one row card. Everything the client checks at a glance (does it work,
 * what did it bring, where do chats go) is on the line; rarer actions hide under «…».
 */
.acc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.acc + .acc { margin-top: 12px; }
.acc-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; flex-wrap: wrap; }
.acc-id { flex: 1 1 180px; min-width: 0; }
.acc-state { display: flex; gap: 6px; align-items: center; }

/* Counters read as numbers, not as tiles: the figure and its word, nothing around them. */
.acc-nums { display: flex; gap: 20px; }
.acc-nums b { display: block; font-size: 18px; line-height: 1.15; }
.acc-nums span { color: var(--muted); font-size: 11px; }

/* The chat control looks like a field because it holds a value you can change. */
.acc-line {
  height: 34px; padding: 0 12px; font: inherit; font-size: 13px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acc-line:hover { border-color: var(--line-strong); background: var(--surface-2); }
.acc-line.off { color: var(--muted); }
.acc-line.warn { color: var(--danger); border-color: var(--danger-line); background: var(--danger-bg); }

/* Overflow menu */
.acc-menu { position: relative; }
.acc-dots { width: 34px; height: 34px; padding: 0; font-size: 15px; line-height: 1; letter-spacing: 1px; }
.acc-menu .menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 200px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); padding: 6px;
}
.acc-menu.open .menu { display: block; }
.acc-menu .menu > * {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: transparent;
  font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; border-radius: 6px; text-decoration: none;
}
.acc-menu .menu > *:hover { background: var(--surface-2); }
.acc-menu .menu .danger { color: var(--danger); }

/* The picker unfolds under the row it belongs to. */
.acc .ol-box { padding: 0 18px 16px; }

/* Connect button with the rule beside it, not a banner above the page. */
/* Button and rule start on the SAME line: centring the text against the button made the
 * paragraph float, and its first line no longer had anything to line up with. */
.acc-add { display: flex; align-items: flex-start; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
/* The rule takes the rest of the row, so the block ends flush with the cabinet cards
 * above it. A fixed width made the text stop short and left the right edge ragged. */
.acc-tip { flex: 1 1 320px; min-width: 0; margin: 0; padding-top: 7px; }
.empty { text-align: left; }
@media (max-width: 900px) { .acc-id { flex-basis: 100%; } }
.acc-ava {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: var(--divider); color: var(--ink-2);
}
.acc-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-sub { color: var(--muted); font-size: 12px; }

/* The Open Line picker, unfolded under a cabinet row. */
.ol-hint { color: var(--muted); font-size: 12.5px; line-height: 1.5; max-width: 520px; }
.ol-current { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ol-name { font-weight: 500; font-size: 14px; }
.ol-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ol-box[hidden] { display: none; }
.ol-picker {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); padding: 0 12px; height: 40px;
}
.ol-picker select {
  flex: 1; height: 38px; border: 0; background: transparent; font: inherit; font-size: 13px;
  color: var(--ink); outline: none; min-width: 0;
}
.ol-picker:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.btn-danger { color: var(--danger); border-color: var(--danger-line); background: var(--danger-bg); }
.btn-danger:hover { background: #ffdfe3; }

/* ---------- поиск резюме ---------- */

.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.res-f { display: flex; flex-direction: column; gap: 4px; position: relative; }
.res-f label { color: var(--ink-2); font-size: 12px; font-weight: 600; }
.res-f input, .res-f select {
  height: 36px; font: inherit; font-size: 13px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 10px; width: 100%;
}
.res-f input:focus-visible, .res-f select:focus-visible {
  outline: 3px solid var(--accent-ring); outline-offset: 1px; border-color: var(--accent);
}
.res-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.res-sug {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); max-height: 260px; overflow: auto;
}
.res-sug:empty { display: none; }
.res-sug > div { padding: 7px 10px; cursor: pointer; font-size: 13px; }
.res-sug > div:hover { background: var(--accent-weak); }

/* One grid for every row, with FIXED columns on the right.
 * Laid out as a flex row, the buttons started wherever the text and the salary happened
 * to end — so they stepped left and right down the list and the eye had nothing to
 * follow. Fixed columns mean every button sits under the one above it, whatever the row
 * contains, and a missing salary leaves a gap instead of shifting the buttons. */
.res-hit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 165px 185px;
  align-items: start;
  gap: 12px;
  padding: 14px 0;
}
.res-hit + .res-hit { border-top: 1px solid var(--divider); }
.res-title { font-weight: 600; margin-bottom: 2px; }
.res-pay { text-align: right; }
.res-salary { font-weight: 700; font-size: 15px; white-space: nowrap; }
/* Buttons fill their column, so their edges line up even with different labels. */
.res-act > .btn, .res-act > .badge { width: 100%; justify-content: center; }
@media (max-width: 1000px) {
  .res-hit { grid-template-columns: minmax(0, 1fr) 110px 185px; }
  .res-hit .res-act:last-child { grid-column: 2 / -1; }
}
@media (max-width: 720px) {
  .res-hit { grid-template-columns: 1fr; }
  .res-pay { text-align: left; }
  .res-hit .res-act:last-child { grid-column: auto; }
}
.res-preview {
  margin: 0 0 14px; padding: 14px 16px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.res-preview-text {
  white-space: pre-wrap; font-size: 13px; line-height: 1.6; color: var(--ink-2);
  max-height: 320px; overflow: auto;
}
.res-preview-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px;
}
.res-marks { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.res-marks span {
  font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 5px; padding: 5px 9px;
}
/* ---------- setup wizard stepper ---------- */
.steps { display: flex; align-items: flex-start; max-width: 640px; margin: 0 auto 28px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; }
.step-dot {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 600; background: var(--line); color: var(--muted);
  border: 0; cursor: pointer; font-family: inherit;
}
.step.current .step-dot { background: var(--accent); color: #fff; }
.step.done .step-dot { background: var(--ok); color: #fff; }
.step-label { font-size: 11px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.step-line { flex: 1; height: 2px; background: var(--line); margin-top: 14px; }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 24px; }

/* Sidebar card: state above, tariff below, one hairline between them. */
.plan-sep { height: 1px; background: var(--side-card-line); margin: 8px 0; }
.plan-more { display: inline-block; margin-top: 6px; color: var(--accent); font-size: 12px; text-decoration: none; }
.plan-more:hover { text-decoration: underline; }


/* Подпись под названием вакансии несёт её состояние: живая — обычным цветом, снятая с
 * публикации — приглушённая. Раньше это было видно только у включённых вакансий. */
.vac-sub { color: var(--ink-2); font-size: 11.5px; line-height: 1.4; }
.vac-sub a { color: var(--accent); }
.vac-sub-off { opacity: .75; }
.vac-sub-off b { color: var(--muted); font-weight: 600; }


/* Кнопка оплаты внутри карточки тарифа: во всю ширину, цена справа — как ценник, а не
 * как подпись. Строка про счёт под ней намеренно негромкая: юрлиц меньше, и им нужен
 * другой путь, а не другой призыв. */
.pr-cta {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; height: 48px; margin-top: 18px; font-size: 14px; text-decoration: none;
}
.pr-cta-sum { font-weight: 700; }
.pr-invoice { margin-top: 10px; text-align: center; font-size: 12px; color: var(--muted); }
.pr-invoice a { color: var(--accent); }
