/* ─────────────────────────────────────────────────────────────────────────
   Medekis — design tokens + component styles
   Light default; [data-theme="dark"] on <html> swaps the palette.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  /* Brand spine (shared) */
  --primary: #0e7490;
  --primary-deep: #155e75;
  --primary-bright: #06b6d4;
  --teal: #0d9488;
  --navy: #0f2942;
  --navy-deep: #0a1f33;
  --on-primary: #ffffff;

  /* Semantic (shared) */
  --success: #15803d;
  --danger: #b91c1c;
  --warning: #b45309;
  --info: #0e7490;
  --ring-focus: rgba(6, 182, 212, 0.45);

  /* Shape */
  --r-xs: 4px;  --r-sm: 6px;  --r-md: 10px;  --r-lg: 14px;  --r-full: 9999px;

  /* Spacing */
  --s-xxs: 2px; --s-xs: 4px; --s-sm: 8px; --s-md: 12px;
  --s-lg: 16px; --s-xl: 24px; --s-xxl: 32px; --s-xxxl: 48px;

  /* Type families */
  --f-display: "Nunito Sans", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "Inter", system-ui, sans-serif;

  /* Elevation */
  --e-sm: 0 1px 2px rgba(15,41,66,0.06), 0 1px 3px rgba(15,41,66,0.08);
  --e-md: 0 4px 6px rgba(15,41,66,0.05), 0 10px 15px rgba(15,41,66,0.10);
  --e-drawer: -8px 0 24px rgba(15,41,66,0.18);

  /* Алиасы под инлайн-стили auth/модалок в index.html. Без них var(--border)/var(--surface2)
     не определены → у инпутов пропадала обводка («белое на белом»). Резолвятся по активной теме. */
  --border: var(--hairline-strong);
  --surface2: var(--surface-alt);
}

/* ── Light theme (default) ── */
:root, :root[data-theme="light"] {
  --canvas: #f5f8fa;
  --surface: #ffffff;
  --surface-alt: #eef4f7;
  --ink: #0f2942;
  --body: #334155;
  --mute: #64748b;
  --faint: #94a3b8;
  --hairline: rgba(15,41,66,0.12);
  --hairline-strong: rgba(15,41,66,0.24);

  --success-bg: #dcfce7;
  --danger-bg: #fee2e2;
  --warning-bg: #fef3c7;
  --info-bg: #cffafe;
  --scrim: rgba(15,41,66,0.40);
}

/* ── Dark theme ── */
:root[data-theme="dark"] {
  --canvas: #0a1f33;
  --surface: #0f2942;
  --surface-alt: #16344f;
  --ink: #f1f5f9;
  --body: #cbd5e1;
  --mute: #94a3b8;
  --faint: #64748b;
  --hairline: rgba(255,255,255,0.10);
  --hairline-strong: rgba(255,255,255,0.20);

  --success-bg: rgba(34,197,94,0.16);
  --danger-bg: rgba(239,68,68,0.16);
  --warning-bg: rgba(245,158,11,0.16);
  --info-bg: rgba(6,182,212,0.16);
  --scrim: rgba(5,15,25,0.55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}

::selection { background: var(--ring-focus); }

/* ── Scrollbars — thin & light ── */
* { scrollbar-width: thin; scrollbar-color: var(--hairline) transparent; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--hairline-strong); }
::-webkit-scrollbar-corner { background: transparent; }

/* ── Type lanes ── */
.t-display-xl { font-family: var(--f-display); font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: -0.5px; }
.t-display-lg { font-family: var(--f-display); font-size: 30px; font-weight: 800; line-height: 1.15; letter-spacing: -0.4px; }
.t-heading-lg { font-family: var(--f-display); font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -0.2px; }
.t-heading-md { font-family: var(--f-display); font-size: 18px; font-weight: 700; line-height: 1.35; letter-spacing: -0.1px; }
.t-heading-sm { font-family: var(--f-display); font-size: 15px; font-weight: 700; line-height: 1.4; }
.t-body-lg { font-size: 17px; line-height: 1.55; }
.t-body-md { font-size: 15px; line-height: 1.5; }
.t-body-sm { font-size: 13px; line-height: 1.45; }
.t-label { font-size: 13px; font-weight: 700; line-height: 1.3; letter-spacing: 0.2px; }
.t-caption { font-size: 12px; line-height: 1.35; letter-spacing: 0.1px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--mute); }

.num-hero { font-family: var(--f-mono); font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.num-lg { font-family: var(--f-mono); font-size: 20px; font-weight: 600; line-height: 1.2; letter-spacing: -0.3px; font-variant-numeric: tabular-nums; }
.num-md { font-family: var(--f-mono); font-size: 14px; font-weight: 500; line-height: 1.4; font-variant-numeric: tabular-nums; }
.num-sm { font-family: var(--f-mono); font-size: 12px; font-weight: 500; line-height: 1.4; font-variant-numeric: tabular-nums; }

/* ── App shell ── */
.app { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

.top-bar {
  position: sticky; top: 0; z-index: 30;
  height: 60px; flex: 0 0 60px;
  background: var(--surface);
  display: flex; align-items: center; gap: var(--s-xl);
  padding: 0 var(--s-xl);
}
.wordmark { display: flex; align-items: center; gap: 10px; }
.wordmark .mark {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--navy), var(--primary) 60%, var(--primary-bright));
  display: grid; place-items: center; color: #fff; flex: 0 0 28px;
}
.wordmark .name { font-family: var(--f-display); font-size: 22px; font-weight: 800; letter-spacing: -0.4px; color: var(--ink); }
.top-bar .page-title { display: flex; align-items: baseline; gap: 10px; }
.top-bar .page-title h1 { margin: 0; font-family: var(--f-display); font-size: 18px; font-weight: 700; color: var(--ink); }
.top-bar .spacer { flex: 1; }
.new-pill {
  display: inline-flex; align-items: baseline; gap: 5px;
  background: none; color: var(--primary);
  border: none; cursor: pointer; padding: 0;
  font-family: var(--f-body); font-size: 14px; font-weight: 700;
  text-decoration: none;
  transition: color .15s;
}
.new-pill:hover { color: var(--primary-deep); }
.new-pill .w { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.new-pill:focus-visible { outline: none; }
.new-pill:focus-visible .w { text-decoration-thickness: 2.5px; }
.new-pill .n { font-family: var(--f-mono); text-decoration: none; }

/* ── Buttons ── */
.btn { font-family: var(--f-body); font-weight: 700; font-size: 15px;
  border-radius: var(--r-sm); height: 40px; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring-focus); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-deep); }
.btn-primary:active { background: var(--primary-deep); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--hairline-strong); }
:root[data-theme="dark"] .btn-secondary { background: var(--surface-alt); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--primary); border-color: transparent; padding: 0 12px; }
.btn-ghost:hover { background: var(--info-bg); }
/* П.5: компактная кнопка (напр. «Проанализировать этого» в списке альтернатив).
   Раньше .btn-sm в разметке была, но без CSS → кнопка рисовалась в полный рост .btn (40px/15px). */
.btn-sm { height: 28px; padding: 0 11px; font-size: 12px; font-weight: 600;
  border-radius: var(--r-xs); gap: 5px; }
.btn-disabled, .btn[disabled] {
  background: var(--surface-alt); color: var(--faint);
  border-color: transparent; cursor: not-allowed; box-shadow: none; }
.btn-disabled:hover, .btn[disabled]:hover { background: var(--surface-alt); color: var(--faint); }

.btn-icon {
  width: 36px; height: 36px; border-radius: var(--r-full);
  border: 1px solid var(--hairline); background: transparent; color: var(--body);
  display: grid; place-items: center; cursor: pointer; flex: 0 0 auto;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn-icon:hover { border-color: var(--primary); color: var(--primary); background: var(--info-bg); }
.btn-icon:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring-focus); }

.soon-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
  background: var(--surface); color: var(--faint); border: 1px solid var(--hairline);
  border-radius: var(--r-xs); padding: 1px 5px; }

/* ── Layout ── */
.content { width: 100%; flex: 1; min-height: 0; display: flex; flex-direction: column;
  padding: var(--s-lg) var(--s-xl) 0; }

/* ── Filter group (in top-bar) ── */
.tb-filters { display: flex; align-items: center; gap: var(--s-sm); flex: 1; min-width: 0; }

/* ── Filter bar (standalone, kept for compat) ── */
.filter-bar {
  display: flex; align-items: center; gap: var(--s-sm);
  margin-bottom: var(--s-lg); flex-wrap: wrap; }
.field {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-sm); height: 40px; padding: 0 12px;
  color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring-focus); }
.field svg { color: var(--faint); flex: 0 0 auto; }
.field input, .field select {
  border: none; background: transparent; outline: none; color: var(--ink);
  font-family: var(--f-body); font-size: 15px; min-width: 0; }
.field.search { flex: 1 1 240px; min-width: 200px; }
.field.search input { width: 100%; }
.field select { cursor: pointer; padding-right: 4px; }
.field.range { gap: 6px; }
.field.range input { width: 100px; font-family: var(--f-mono); font-size: 13px; }
.field.range .sep { color: var(--faint); }
.field.range .rub { color: var(--faint); font-family: var(--f-mono); font-size: 12px; }
input::placeholder { color: var(--faint); }

.sort-wrap { position: relative; }
.menu {
  position: absolute; top: 44px; right: 0; z-index: 40;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-md); box-shadow: var(--e-md);
  padding: 6px; min-width: 200px; }
.menu button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: transparent; border: none; cursor: pointer;
  font-family: var(--f-body); font-size: 14px; color: var(--body);
  padding: 9px 10px; border-radius: var(--r-sm); text-align: left; }
.menu button:hover { background: var(--surface-alt); }
.menu button.active { color: var(--primary); font-weight: 700; }
.menu button .check { margin-left: auto; color: var(--primary); }

/* ── Чип «Только отобранные» (select-only фильтр в фильтр-баре) ── */
.tb-chip { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  height: 40px; padding: 0 14px; font-family: var(--f-body); font-size: 13px; font-weight: 700;
  border: 1px solid var(--hairline-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--body); cursor: pointer; white-space: nowrap;
  transition: border-color .15s, color .15s, background-color .15s; }
.tb-chip:hover { border-color: var(--primary); color: var(--primary); }
.tb-chip svg { flex: 0 0 auto; }
.tb-chip.active { border-color: var(--primary); color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent); }

/* ── Tender list ── */
.result-meta { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-md); color: var(--mute); }
.tender-list { display: flex; flex-direction: column; gap: var(--s-md); }

.tender-card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: var(--s-lg);
  display: grid; grid-template-columns: 1fr auto; gap: var(--s-sm) var(--s-lg);
  cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .05s; }
.tender-card:hover { box-shadow: var(--e-sm); border-color: var(--hairline-strong); }
.tender-card:active { transform: translateY(1px); }
.tender-card.is-open { border-color: var(--primary); box-shadow: var(--e-sm); }
.tc-main { min-width: 0; display: flex; flex-direction: column; }
.tc-title { font-family: var(--f-display); font-size: 18px; font-weight: 700; color: var(--ink);
  margin: 0 0 4px; line-height: 1.35; }
.tc-eis { color: var(--mute); display: flex; align-items: center; gap: 6px; }
.tc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; justify-self: end; }
.tc-deadline { margin-top: auto; padding-top: 10px; }
.tc-nmck { color: var(--ink); }
.tc-nmck .cur { color: var(--mute); font-size: 14px; }
.tc-region { display: inline-flex; align-items: center; gap: 8px; color: var(--mute); margin-top: auto; padding-top: 10px; align-self: flex-start; }
.tc-region svg { color: var(--faint); flex: 0 0 auto; }
.tc-deadline { display: inline-flex; align-items: center; gap: 8px; color: var(--mute); white-space: nowrap; }
.tc-deadline svg { color: var(--faint); flex: 0 0 auto; }
.tc-deadline.urgent { color: var(--danger); font-weight: 700; }
.tc-deadline.urgent svg { color: var(--danger); }
.tc-deadline .days { font-family: var(--f-mono); font-size: 12px; white-space: nowrap; }

/* density: compact */
.app.compact .tender-card { padding: var(--s-md) var(--s-lg); }
.app.compact .tc-title { font-size: 16px; }

/* ── Status badge ── */
.badge {
  border-radius: var(--r-xs); padding: 3px 8px; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: var(--r-full); background: currentColor; }
.badge.info { color: var(--info); background: var(--info-bg); }
.badge.warning { color: var(--warning); background: var(--warning-bg); }
.badge.success { color: var(--success); background: var(--success-bg); }
.badge.danger { color: var(--danger); background: var(--danger-bg); }
.badge.neutral { color: var(--mute); background: var(--surface-alt); }
.badge.primary { color: var(--primary-deep); background: color-mix(in srgb, var(--primary) 15%, transparent); }
:root[data-theme="dark"] .badge.primary { color: var(--primary-bright); }

/* ── Kanban board ── */
.board {
  flex: 1; min-height: 0;
  display: grid; grid-auto-flow: column;
  /* ★ 5 ВИДИМЫХ КОЛОНОК, остальные — за горизонтальным скроллом ДОСКИ (не страницы; overflow-x
     ниже стоит на .board). Решение владельца 28.07: 7 колонок по `1fr` ужимались до нечитаемых,
     кнопки карточек резались в «В …»/«О…». Ширина = ровно пятая часть доски за вычетом 4 зазоров,
     но НЕ УЖЕ 264px — на узком экране колонки держат минимум и просто скроллятся дальше. */
  grid-auto-columns: max(264px, calc((100% - 4 * var(--s-md)) / 5));
  gap: var(--s-md);
  overflow-x: auto; overflow-y: hidden;
  padding-bottom: var(--s-lg);
  align-items: stretch;
}
.kcolumn {
  background: var(--surface-alt); border-radius: var(--r-lg);
  display: flex; flex-direction: column; min-height: 0;
  transition: background-color .15s, box-shadow .15s;
}
.board.is-dragging-any .kcolumn.drop-ok { box-shadow: inset 0 0 0 1px var(--hairline-strong);
  background: color-mix(in srgb, var(--primary) 7%, var(--surface-alt)); }
.kcolumn.drag-over.drop-ok {
  background: color-mix(in srgb, var(--primary) 16%, var(--surface));
  box-shadow: inset 0 0 0 2px var(--primary);
}
.kcol-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 10px; flex: 0 0 auto;
}
.kcol-title { display: flex; align-items: center; gap: 8px;
  font-family: var(--f-display); font-size: 14px; font-weight: 800; color: var(--ink);
  letter-spacing: 0.2px; white-space: nowrap; }
.kcol-dot { width: 9px; height: 9px; border-radius: var(--r-full); flex: 0 0 auto; }
.kcol-dot.info { background: var(--info); }
.kcol-dot.warning { background: var(--warning); }
.kcol-dot.primary { background: var(--primary); }
.kcol-dot.success { background: var(--success); }
.kcol-dot.neutral { background: var(--faint); }
.kcol-count { color: var(--mute); background: var(--surface);
  border-radius: var(--r-full); min-width: 24px; text-align: center; padding: 1px 7px; }
.kcol-list {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; gap: var(--s-sm);
  padding: 0 10px 10px;
}
.kcol-empty { color: var(--faint); font-size: 13px; text-align: center; padding: 22px 8px;
  border: 1px dashed var(--hairline); border-radius: var(--r-md); }

.kcard {
  position: relative;
  background: var(--surface); border: 1px solid transparent;
  border-radius: var(--r-md); padding: 14px;
  box-shadow: var(--e-sm);
  cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .05s, opacity .15s;
}
.kcard:hover { box-shadow: var(--e-md); }
.kcard:hover .kc-grip { opacity: 1; }
.kcard:active { cursor: grabbing; }
.kcard.is-open { border-color: var(--primary); box-shadow: var(--e-sm); }
.kcard.is-dragging { opacity: 0.45; }
.kc-grip { position: absolute; top: 12px; right: 10px; color: var(--faint);
  cursor: grab; opacity: 0; transition: opacity .15s; }
.board.is-dragging-any .kcard { cursor: grabbing; }
.kc-title { font-family: var(--f-display); font-size: 14.5px; font-weight: 700; color: var(--ink);
  margin: 0 0 8px; line-height: 1.3; padding-right: 22px; }
.kc-nmck { color: var(--ink); font-weight: 600; }
.kc-nmck .cur { color: var(--mute); }
/* П.6: flex-wrap — дедлайн + бейджи (в т.ч. «срок прошёл», «Проанализирован») не влезают в
   строку узкой карточки (особенно в «Архиве») → бейдж переносится, не вылазит за границу. */
.kc-sub { display: flex; align-items: center; justify-content: space-between; gap: var(--s-sm);
  flex-wrap: wrap; row-gap: 6px; margin-top: 8px; color: var(--mute); }
.kc-deadline, .kc-region { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; }
.kc-deadline svg, .kc-region svg { color: var(--faint); flex: 0 0 auto; }
.kc-deadline .days { font-family: var(--f-mono); font-size: 11.5px; }
.kc-deadline.urgent { color: var(--danger); font-weight: 700; }
.kc-deadline.urgent svg { color: var(--danger); }
/* П.0 (stale-list fix): бейдж «срок прошёл» для истёкшего дедлайна */
.kc-stale { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-full);
  color: var(--danger); background: var(--danger-bg); white-space: nowrap; }
.kc-stale svg { flex: 0 0 auto; }
.kc-verdict { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  font-size: 12px; font-weight: 700; border-radius: var(--r-xs); padding: 4px 8px; max-width: 100%; }
.kc-verdict.go { color: var(--success); background: var(--success-bg); }
.kc-verdict.stop { color: var(--danger); background: var(--danger-bg); }
.kc-actions { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--hairline); }
.kbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  flex: 1 1 0; min-width: 0;
  font-family: var(--f-body); font-size: 12px; font-weight: 700;
  height: 30px; padding: 0 8px; border-radius: var(--r-sm);
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.kbtn span { overflow: hidden; text-overflow: ellipsis; }
/* ★ Иконка+тултип вместо обрезанной подписи (правило владельца: «либо полный текст, либо
   иконка+тултип» — усечённое «О…» недопустимо). Ставится на ghost-кнопки ТОЛЬКО когда действий
   три и полные подписи в строку не помещаются; подпись живёт в title/aria-label. */
.kbtn-compact { flex: 0 0 auto; width: 32px; padding: 0; }
.kbtn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring-focus); }
.kbtn svg { flex: 0 0 auto; }
.kbtn-primary { background: var(--primary); color: var(--on-primary); }
.kbtn-primary:hover { background: var(--primary-deep); }
.kbtn-ghost { background: transparent; color: var(--body); border-color: var(--hairline-strong); }
.kbtn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--info-bg); }

/* ── Drawer ── */
.scrim { position: fixed; inset: 0; z-index: 50; background: var(--scrim);
  opacity: 0; pointer-events: none; transition: opacity .28s ease; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60;
  width: 75%; min-width: 520px; max-width: 1400px;
  background: var(--surface); box-shadow: var(--e-drawer);
  border-top-left-radius: var(--r-lg); border-bottom-left-radius: var(--r-lg);
  transform: translateX(100%); transition: transform .32s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer-scroll { overflow-y: auto; flex: 1; padding: var(--s-xl); }
.drawer-scroll > * + * { margin-top: var(--s-lg); }

.drawer-header { display: flex; flex-direction: column; gap: var(--s-md);
  padding-bottom: var(--s-lg); border-bottom: 1px solid var(--hairline); }
.dh-top { display: flex; align-items: flex-start; gap: var(--s-md); }
.dh-top .titles { flex: 1; min-width: 0; }
.dh-title { font-family: var(--f-display); font-size: 22px; font-weight: 700; color: var(--ink);
  margin: 0 0 6px; line-height: 1.3; }
.dh-eis { display: flex; align-items: center; gap: 8px; color: var(--mute); flex-wrap: wrap; }
.dh-eis .copy { cursor: pointer; }
.dh-facts { display: flex; gap: var(--s-xl); flex-wrap: wrap; }
.dh-fact .k { display: block; }
.dh-fact .v { color: var(--ink); }
.dh-actions-inline { display: flex; gap: var(--s-sm); flex-wrap: wrap; }

/* ── Panels ── */
.panel { background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: var(--s-xl); }
.panel-head { display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-md); margin-bottom: var(--s-lg); }
.panel-head .titles { display: flex; flex-direction: column; gap: 3px; }
.panel-head h3 { margin: 0; font-family: var(--f-display); font-size: 15px; font-weight: 700; color: var(--ink); }

/* ── Equipment block ── */
.equip { background: var(--surface-alt); border-radius: var(--r-md); padding: var(--s-lg); }
.equip + .equip { margin-top: var(--s-md); }
.equip-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-md); }
.equip-name { font-family: var(--f-display); font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 3px; }
.equip-maker { color: var(--mute); }
.qty-chip { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-xs);
  padding: 2px 8px; font-family: var(--f-mono); font-size: 12px; color: var(--ink); white-space: nowrap; }
.conf { display: flex; align-items: center; gap: 10px; margin-top: var(--s-md); }
.conf .label { color: var(--mute); font-size: 12px; white-space: nowrap; }
.conf-track { flex: 1; height: 6px; border-radius: var(--r-full); background: var(--hairline); overflow: hidden; }
.conf-fill { height: 100%; background: var(--primary-bright); border-radius: var(--r-full); }
.conf .pct { font-family: var(--f-mono); font-size: 12px; font-weight: 600; color: var(--ink); }
.alt-toggle { margin-top: var(--s-md); }
.alt-list { margin-top: var(--s-md); display: flex; flex-direction: column; gap: var(--s-sm);
  border-top: 1px dashed var(--hairline); padding-top: var(--s-md); }
.alt-item { display: flex; gap: 10px; align-items: flex-start; }
.alt-item .a-name { color: var(--ink); font-weight: 700; }
.alt-item .a-reason { color: var(--mute); }
.alt-item .a-conf { font-family: var(--f-mono); font-size: 12px; color: var(--mute); white-space: nowrap; }

/* ── Compliance table ── */
.unit-block + .unit-block { margin-top: var(--s-xl); }
.compliance-head { display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-md); margin-bottom: var(--s-md); flex-wrap: wrap; }
.compliance-head .unit-name { color: var(--ink); }
.compliance-verdict { display: flex; align-items: center; gap: 10px; }
.compliance-verdict .pct { font-family: var(--f-display); font-size: 22px; font-weight: 800; }
.compliance-verdict.ok .pct, .compliance-verdict.ok .word { color: var(--success); }
.compliance-verdict.no .pct, .compliance-verdict.no .word { color: var(--danger); }
/* Вариант C: НЕПОЛНЫЙ АНАЛИЗ — нейтрально-предупреждающий (не зелёный, не красный) */
.compliance-verdict.incomplete .word { color: var(--warning); }
/* с53-прод-2: при НЕПОЛНЫЙ % ВИДЕН (крупный, предупреждающий цвет) — не прячем число за вердиктом */
.compliance-verdict.incomplete .pct { color: var(--warning); }
.compliance-verdict .word { font-family: var(--f-display); font-weight: 800; font-size: 14px; letter-spacing: 0.4px; }

/* Честный % (жёсткий счёт) — рядом с soft-вердиктом, приглушённо-акцентный */
.compliance-honest { display: flex; align-items: baseline; gap: 5px; padding-left: 12px;
  margin-left: 4px; border-left: 2px solid var(--hairline); }
.compliance-honest .pct { font-family: var(--f-display); font-size: 18px; font-weight: 800; color: var(--text); }
.compliance-honest .word { font-size: 11px; font-weight: 700; letter-spacing: 0.3px; color: var(--mute); text-transform: uppercase; }

/* ★ BUG-025: комплектация% — ВТОРОЕ число, справочно (приглушено, не конкурирует с device%) */
.compliance-kit { display: flex; align-items: baseline; gap: 5px; padding-left: 12px;
  margin-left: 4px; border-left: 2px solid var(--hairline); }
.compliance-kit .pct { font-family: var(--f-display); font-size: 18px; font-weight: 800; color: var(--mute); }
.compliance-kit .word { font-size: 11px; font-weight: 700; letter-spacing: 0.3px; color: var(--mute); text-transform: uppercase; }
/* Флаг «мало характеристик прибора — проверьте KIT» (device≤3) */
.compliance-sparse { display: flex; align-items: center; gap: 6px; margin: -4px 0 var(--s-md);
  padding: 6px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--warning);
  background: color-mix(in srgb, var(--warning) 10%, transparent); }
.compliance-sparse svg { flex: 0 0 auto; }

/* Твёрдость: бейдж + инлайн-флип + раскрытие «почему» */
.c-hard { white-space: nowrap; }
.hbadge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; border: 1px solid transparent; cursor: pointer; background: none; }
.hbadge.h-hard  { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.hbadge.h-soft  { color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, transparent); }
.hbadge.h-rmiss { color: var(--mute); background: color-mix(in srgb, var(--mute) 14%, transparent); }
.h-flip { display: inline-flex; gap: 2px; margin-left: 6px; }
.h-flip button { width: 20px; height: 20px; padding: 0; font-size: 11px; font-weight: 700; line-height: 1;
  border: 1px solid var(--hairline); border-radius: 4px; background: var(--surface); color: var(--mute); cursor: pointer; }
.h-flip button:hover:not(:disabled) { color: var(--text); border-color: var(--accent); }
.h-flip button:disabled { opacity: 0.4; cursor: default; }
.h-none { color: var(--mute); }
.c-why-row td { background: var(--surface-alt); font-size: 12px; color: var(--text); padding: 6px 12px; }
.c-why-by { color: var(--mute); }
/* Разбивка числителя «N авто + M вручную» — мелко/моно, рядом с вердиктом (с52: видно вклад человека) */
.compliance-breakdown { font-family: var(--f-mono); font-size: 11px; color: var(--mute); white-space: nowrap; }

/* МОМЕНТ 2: альтернативные кандидаты — сводка %/verdict + разворот таблицы по клику */
.ranked-candidate { border-top: 1px solid var(--hairline); }
.ranked-candidate:first-of-type { border-top: none; }
.rc-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; }
.ranked-candidate.is-expandable .rc-row { cursor: pointer; }
.ranked-candidate.is-expandable .rc-row:hover { color: var(--primary); }
.rc-main { flex: 1 1 auto; min-width: 0; }
.rc-name { font-weight: 600; color: var(--ink); }
.rc-ru { color: var(--mute); margin-top: 2px; }
.compliance-verdict-mini { flex: 0 0 auto; font-family: var(--f-display); font-size: 12px;
  font-weight: 700; letter-spacing: 0.3px; white-space: nowrap; }
.compliance-verdict-mini b { font-size: 15px; }
.compliance-verdict-mini.success { color: var(--success); }
.compliance-verdict-mini.danger { color: var(--danger); }
.compliance-verdict-mini.warning { color: var(--warning); }
.compliance-verdict-mini.neutral { color: var(--mute); }
.rc-detail { padding: 4px 0 14px; }
.rc-loading { display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 13px; padding: 8px 0; }
.rc-error { color: var(--danger); padding: 8px 0; }
/* П.2: компактный блок конкуренции внутри карточки альтернативы */
.rc-competition { padding: 0 0 12px; }
.rc-competition-head { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 2px 0 8px; }

/* Ярус-1 (Валерий): модальный диалог «Основание» для вердикт-меняющих действий */
.reason-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(15,23,42,0.45);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.reason-modal { background: var(--surface); border: 1px solid var(--hairline-strong);
  border-radius: var(--r-lg); box-shadow: 0 12px 44px rgba(0,0,0,0.28);
  width: 100%; max-width: 460px; padding: 20px; }
.reason-modal h4 { margin: 0 0 2px; font-family: var(--f-display); font-size: 16px; color: var(--ink); }
.reason-input { width: 100%; box-sizing: border-box; resize: vertical; min-height: 68px;
  font-family: var(--f-body); font-size: 14px; color: var(--ink);
  border: 1px solid var(--hairline-strong); border-radius: var(--r-sm); padding: 10px 12px;
  background: var(--surface); }
.reason-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring-focus); }
.reason-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* drawer-nmr: компактная плашка «слабая идентификация» над существующим отчётом */
.weak-identify { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--warning-bg); color: var(--ink); }
.weak-identify > svg { color: var(--warning); flex: 0 0 auto; }
.weak-identify .wi-text { flex: 1 1 240px; min-width: 0; font-size: 13px; line-height: 1.4; }
.weak-identify .wi-reanalyze { flex: 0 0 auto; }

.ctable { width: 100%; border: 1px solid var(--hairline); border-radius: var(--r-md);
  overflow: hidden; border-collapse: separate; border-spacing: 0; }
.ctable th { background: var(--surface-alt); font-size: 11px; font-weight: 700; letter-spacing: 0.4px;
  text-transform: uppercase; color: var(--mute); text-align: left; padding: 10px 12px; }
.ctable td { padding: 11px 12px; border-top: 1px solid var(--hairline); color: var(--body);
  font-size: 13px; vertical-align: top; }
.ctable .c-num { font-family: var(--f-mono); font-size: 12px; color: var(--mute); white-space: nowrap; }
.ctable .c-req { color: var(--ink); }
.ctable .c-found { color: var(--body); }
.ctable .c-page { font-family: var(--f-mono); font-size: 12px; color: var(--mute); white-space: nowrap; }
/* МОМЕНТ 3: «Стр. N» — ссылка на PDF инструкции (открыть на этой странице) */
.ctable .c-page a { color: var(--primary); text-decoration: none; font-weight: 700; }
.ctable .c-page a:hover { text-decoration: underline; }
/* #3: статус-лейбл переносится (не nowrap) — длинный текст не растягивает колонку → нет гор. скролла */
.ctable .c-status { white-space: normal; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.st.ok { color: var(--success); }
.st.manual { color: var(--primary); }  /* confirmed_manual — бирюзовый, ЯВНО ≠ зелёный авто-✓ (с52) */
.st.review { color: var(--warning); }
.st.miss { color: var(--mute); }
.st.bad { color: var(--danger); }
.st.unread { color: var(--warning); }  /* Вариант C: «не прочитано» — жёлтый, не серый «не найдено» */
.ctable tr.row-miss td { background: color-mix(in srgb, var(--danger-bg) 22%, transparent); }
.ctable tr.row-review td { background: color-mix(in srgb, var(--warning-bg) 35%, transparent); }
.ctable tr.row-bad td { background: color-mix(in srgb, var(--danger-bg) 60%, transparent); }
.ctable tr.row-unread td { background: color-mix(in srgb, var(--warning-bg) 22%, transparent); }
.ctable tr.row-manual td { background: color-mix(in srgb, var(--info-bg) 40%, transparent); }
.c-manual-by { display: block; margin-top: 3px; color: var(--mute); font-size: 11px;
  font-family: var(--f-mono); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Ручной вердикт: «Подтвердить» (бирюзовая) · «Опровергнуть» (красная, дисквалификация по строке) ·
   «Отменить» (нейтральная). Матрица TASK 2 — показывается СТРОГО допустимое (макс 2 кнопки → wrap). */
.ctable .c-act { display: flex; flex-wrap: wrap; gap: 4px; }
.c-confirm-btn, .c-revert-btn, .c-contradict-btn { display: inline-flex; align-items: center; gap: 5px; height: 28px;
  padding: 0 10px; font-size: 12px; font-weight: 700; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--hairline); background: var(--surface); }
.c-confirm-btn { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, var(--hairline)); }
.c-confirm-btn:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.c-contradict-btn { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--hairline)); }
.c-contradict-btn:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.c-revert-btn { color: var(--mute); }
.c-revert-btn:hover { background: var(--surface-alt); color: var(--body); }
.c-confirm-btn:disabled, .c-revert-btn:disabled, .c-contradict-btn:disabled { opacity: 0.5; cursor: default; }
/* Бейдж ручного происхождения «M» — и на confirmed_manual, и на contradicted_manual (последний живёт
   ВНУТРИ «Противоречит» → маркер обязателен, чтобы отличить машинную контру от ручной). */
.c-manual-badge { display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 6px; border-radius: 4px; font-size: 10px; font-weight: 800;
  font-family: var(--f-mono); color: var(--primary); vertical-align: middle;
  border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  background: color-mix(in srgb, var(--info-bg) 60%, transparent); }

/* ── Compliance: инлайн-фильтры (поиск + чипы по статусу) — основная версия ── */
.cmodal-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.cfilter { display: flex; flex-wrap: wrap; gap: 6px; }
.cmodal-tools .field.search { height: 34px; }  /* П5: ровнять с чипами-фильтрами */
.cchip { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; font-size: 12px;
  font-weight: 700; border: 1px solid var(--hairline); border-radius: 6px;
  background: var(--surface); color: var(--body); cursor: pointer; }
.cchip:hover { background: var(--surface-alt); }
.cchip .cn { font-family: var(--f-mono); font-size: 11px; color: var(--mute); }
.cchip.active { border-color: var(--primary); color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent); }
.cchip.ok.active { border-color: var(--success); color: var(--success);
  background: color-mix(in srgb, var(--success) 14%, transparent); }
.cchip.manual.active { border-color: var(--primary); color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent); }
.cchip.review.active { border-color: var(--warning); color: var(--warning);
  background: color-mix(in srgb, var(--warning) 16%, transparent); }
.cchip.bad.active, .cchip.miss.active { border-color: var(--danger); color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, transparent); }
.cchip.unread.active { border-color: var(--warning); color: var(--warning);
  background: color-mix(in srgb, var(--warning) 16%, transparent); }
.ctable-wrap { max-height: 440px; overflow-y: auto; overflow-x: auto; border-radius: var(--r-md); }
.ctable-foot { margin-top: 8px; }
.cmodal-empty { padding: 20px; text-align: center; color: var(--mute); font-size: 13px; }

/* ── P&L ── */
.pnl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-md); }
.pnl-field { display: flex; flex-direction: column; gap: 5px; }
.pnl-field label { font-size: 12px; color: var(--mute); }
.pnl-input { display: flex; align-items: center; gap: 6px; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--r-sm); height: 40px; padding: 0 12px;
  transition: border-color .15s, box-shadow .15s; }
.pnl-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring-focus); }
.pnl-input input { border: none; outline: none; background: transparent; width: 100%;
  font-family: var(--f-mono); font-size: 14px; color: var(--ink); text-align: right; }
.pnl-input .unit { color: var(--faint); font-family: var(--f-mono); font-size: 12px; }

.results-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-md); margin-top: var(--s-lg); }
.tile { background: var(--surface-alt); border-radius: var(--r-md); padding: var(--s-lg); }
.tile .k { font-size: 12px; color: var(--mute); margin-bottom: 6px; }
.tile .v { color: var(--ink); }
.tile.headline { grid-column: 1 / -1; display: flex; align-items: flex-end;
  justify-content: space-between; gap: var(--s-md); }
.tile.headline .v { font-family: var(--f-mono); font-size: 30px; font-weight: 700; letter-spacing: -0.5px; }
.tile.headline.good .v { color: var(--success); }
.tile.headline.bad .v { color: var(--danger); }
.tile .sub { color: var(--mute); font-family: var(--f-mono); font-size: 12px; }

/* ── Verdict block ── */
.verdict { border-radius: var(--r-lg); padding: var(--s-xl); position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: var(--s-lg); }
.verdict::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.verdict.go { background: var(--success-bg); }
.verdict.go::before { background: var(--success); }
.verdict.stop { background: var(--danger-bg); }
.verdict.stop::before { background: var(--danger); }
.verdict .word { font-family: var(--f-display); font-size: 30px; font-weight: 800; line-height: 1.05; letter-spacing: -0.4px; }
.verdict.go .word { color: var(--success); }
.verdict.stop .word { color: var(--danger); }
/* Вариант C: НЕПОЛНЫЙ АНАЛИЗ — жёлтый (не go/stop) */
.verdict.warn { background: var(--warning-bg); }
.verdict.warn::before { background: var(--warning); }
.verdict.warn .word, .verdict.warn .icon { color: var(--warning); }
.verdict .reason { color: var(--body); margin-top: 6px; }
.verdict .icon { margin-top: 4px; }
.verdict.go .icon { color: var(--success); }
.verdict.stop .icon { color: var(--danger); }

/* alt verdict style: full tint, no left bar, centered */
.app.verdict-flat .verdict { flex-direction: column; align-items: center; text-align: center; }
.app.verdict-flat .verdict::before { display: none; }
.app.verdict-flat .verdict .icon { margin: 0 0 4px; }

.drawer-actions { display: flex; gap: var(--s-sm); flex-wrap: wrap; align-items: center;
  padding-top: var(--s-sm); }
.drawer-actions .req { display: inline-flex; align-items: center; gap: 8px; }

/* ── Skeleton ── */
.skel-card { background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: var(--s-lg); }
.skel { background: var(--surface-alt); border-radius: var(--r-xs);
  animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ── Empty ── */
.empty { text-align: center; padding: 64px 24px; color: var(--mute); }
.empty .ic { width: 56px; height: 56px; border-radius: var(--r-full); background: var(--surface-alt);
  display: grid; place-items: center; margin: 0 auto var(--s-lg); color: var(--faint); }
.empty h3 { font-family: var(--f-display); color: var(--ink); margin: 0 0 6px; }

/* ── Responsive ── */
@media (max-width: 1023px) {
  .drawer { width: 72%; }
}
@media (max-width: 767px) {
  .content { padding: var(--s-md) var(--s-lg) 0; }
  .board { grid-auto-columns: 86%; }
  .drawer { width: 100%; min-width: 0; border-radius: 0; }
  .top-bar { gap: var(--s-md); padding: 0 var(--s-lg); }
  .top-bar .field.range { display: none; }
  .pnl-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .btn-icon { width: 44px; height: 44px; }
  .ctable .c-found { display: none; } /* keep table scannable on mobile */
}

/* ── Двухуровневый анализ: кнопка анализа на карточке + стадии живого анализа ── */
/* (.kc-pool «Отобрано N из M» УДАЛЁН 18.07 — бейдж снят с карточки, backlog п.7) */
.kc-pool-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
/* .kc-analyze стилизуется в index.html (инлайн <style>) — там же чинён cursor:pointer.
   Дубль здесь убран, чтобы не было двух конфликтующих правил равной специфичности. */
.analyze-stages {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px; text-align: left;
}
.analyze-stages li { position: relative; padding-left: 22px; font-size: 13px; color: var(--mute); }
.analyze-stages li::before {
  content: ""; position: absolute; left: 0; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--hairline-strong); background: transparent;
}
.analyze-stages li.active { color: var(--body); font-weight: 700; }
.analyze-stages li.active::before { border-color: var(--primary); }
.analyze-stages li.done { color: var(--success); }
.analyze-stages li.done::before { border-color: var(--success); background: var(--success); }

/* Плашка «Многотоварная закупка — не анализируется» (карантин multi_position, сессия 70) */
.mp-notice { border-left: 3px solid var(--warning); background: color-mix(in srgb, var(--warning-bg) 30%, transparent); }
.mp-notice-head { display: flex; align-items: center; gap: 8px; color: var(--warning); }
.mp-notice-head h3 { margin: 0; }
.mp-notice-head svg { color: var(--warning); flex: none; }
.mp-notice-body { margin: 10px 0 0; color: var(--body); line-height: 1.55; }
.mp-notice-list { margin: 10px 0 0; padding-left: 18px; color: var(--mute); font-size: 13px; }
.mp-notice-list li { margin: 3px 0; }

/* ── Э2: блок «Условия извещения» в шапке шторки (обеспечения/СМП/ст.14 + срок КП) ── */
.notice-conditions { margin-top: 10px; border: 1px solid var(--hairline); border-radius: 8px; background: var(--canvas); }
.nc-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; background: none; border: none; cursor: pointer; text-align: left; color: var(--ink); }
.nc-title { font-weight: 600; font-size: 13px; white-space: nowrap; }
.nc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.nc-chip { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--info-bg); color: var(--info); white-space: nowrap; }
.nc-chip.nc-nat-restriction, .nc-chip.nc-nat-prohibition { background: var(--danger-bg); color: var(--danger); font-weight: 600; }
.nc-body { padding: 4px 12px 10px; border-top: 1px solid var(--hairline); }
.nc-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; }
.nc-k { color: var(--mute); min-width: 190px; display: flex; align-items: center; gap: 4px; }
.nc-v { color: var(--ink); display: flex; align-items: center; gap: 8px; }
.nc-v.nc-nat-accent { color: var(--danger); font-weight: 600; }
.nc-manual { color: var(--accent); font-size: 11px; }
.nc-editbtn { font-size: 11px; color: var(--accent); background: none; border: none; cursor: pointer; padding: 0 2px; }
.nc-editbtn:hover { text-decoration: underline; }
.nc-edit { display: flex; align-items: center; gap: 4px; }
.nc-inp { width: 120px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 4px; font-size: 12px; }
.nc-sel { padding: 3px 6px; border: 1px solid var(--border); border-radius: 4px; font-size: 12px; }
.nc-ok { color: var(--success); background: none; border: none; cursor: pointer; font-size: 14px; }
.nc-x { color: var(--mute); background: none; border: none; cursor: pointer; font-size: 12px; }

/* ── V3 (2026-07-29): назначение исполнителя ─────────────────────────────────────── */
/* Пометка на карточке. Нейтральная по тону намеренно: пустое назначение — честное
   состояние («взята до введения раздачи» / «ещё не роздана»), а не ошибка. */
.kc-assign { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--hairline); font-size: 12px; }
.kc-assign-who { display: inline-flex; align-items: center; gap: 4px; color: var(--body);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-assign-none { color: var(--mute); font-style: italic; }
.kc-assign-btn { flex: none; background: none; border: 1px solid var(--hairline-strong);
  border-radius: 6px; padding: 2px 8px; font-size: 11px; color: var(--body); cursor: pointer; }
.kc-assign-btn:hover { border-color: var(--primary); color: var(--primary); }
/* Список кандидатов в модалке выбора. */
.assign-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px;
  max-height: 40vh; overflow-y: auto; }
.assign-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--hairline-strong); border-radius: 8px;
  background: var(--surface); color: var(--ink); font-size: 13px; cursor: pointer; text-align: left; }
.assign-row:hover:not(:disabled) { border-color: var(--primary); }
.assign-row:disabled { opacity: 0.6; cursor: default; }
.assign-row.is-current { border-color: var(--primary); background: var(--primary-soft, transparent); }
/* V3: селект роли прямо в строке списка учёток (единственная точка назначения роли). */
.users-role-select { width: 100%; padding: 4px 6px; font-size: 12px; border-radius: 6px;
  border: 1px solid var(--hairline-strong); background: var(--surface); color: var(--ink); }
