/* CQA: контроль качества диалогов. Корпоративная админка в айдентике Freedom Broker.
   Один шрифт, табличные цифры, плоские белые поверхности с линией 1px, зелёный только по смыслу. */

:root {
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;

  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;

  --sb: #0F2A21;
  --sb-text: #C9DDD2;
  --sb-text-2: #9DB8AA;
  --sb-active: #1C4030;
  --sb-hover: #163629;

  --bg: #F4F6F5;
  --surface: #FFFFFF;
  --surface-2: #FAFBFA;
  --hover: #F6F8F7;
  --border: #E2E8E4;
  --border-soft: #EDF1EE;
  --border-strong: #C9D3CD;
  --text: #14231C;
  --text-2: #5B6B63;
  --text-disabled: #8C9A92;

  --primary: #0B7A3B;
  --primary-hover: #096A32;
  --primary-active: #075A2B;
  --brand: #01B13F;

  --ok: #0B7A3B;
  --ok-bg: #E8F5EC;
  --danger: #B42318;
  --danger-bg: #FDEDEB;
  --warn: #9A4A00;
  --warn-bg: #FEF4E6;
  --neutral: #5B6B63;
  --neutral-bg: #EEF1EF;

  --operator-bg: #F3F9F5;
  --evidence-bg: #CBE8D5;
  --range-bg: #EAF4EE;
  --hold-bg: #FFF8EE;
  --hold-line: #F3DEBF;

  --flash-bg: #B5E0C4;
  --cursor-bg: #EEF4F0;
  --selected-bg: #EAF5EE;
  --focus-ring: 0 0 0 3px rgba(1, 177, 63, 0.2);

  --r-ctl: 6px;
  --r-surf: 8px;
  --shadow-pop: 0 8px 24px rgba(15, 42, 33, 0.14), 0 2px 6px rgba(15, 42, 33, 0.08);

  /* движение: одно семейство кривых и три длительности; длиннее 400 мс только разовый досчёт итога */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease: var(--ease-out);
  --d-press: 120ms;
  --d-reveal: 180ms;
  --d-layout: 240ms;
  --d-count: 400ms;
  --d-flash: 700ms;
  /* амплитуды движения; при prefers-reduced-motion обнуляются, остаётся только прозрачность */
  --m-rise: 4px;
  --m-toast: 8px;
  --m-press: 0.98;
  --m-pop: 0.98;
  --m-mark: 0.4;
  --m-shake: 4px;

  /* заставка при входе: фон закрывает экран, логотип проявляется, пауза, заставка растворяется */
  --intro-cover: 150ms;
  --intro-in: 300ms;
  --intro-hold: 400ms;
  --intro-out: 250ms;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { font-size: 16px; }
body {
  font-family: var(--font);
  font-size: var(--fs-14);
  line-height: 1.43;
  color: var(--text);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
img { display: block; }

::selection { background: #C6E8D2; color: var(--text); }
* { scrollbar-width: thin; scrollbar-color: #BCC8C1 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #C3CEC8; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #A3B2AA; border: 2px solid transparent; background-clip: padding-box; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 2px; }
input, textarea, select { caret-color: var(--primary); }

a { color: var(--primary); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -80px; z-index: 300; background: var(--surface); padding: 6px 10px; border-radius: var(--r-ctl); box-shadow: var(--shadow-pop); }
.skip-link:focus { top: 8px; }

.icon { flex: none; display: block; }
.t-2 { color: var(--text-2); }
.t-12 { font-size: var(--fs-12); }
.t-13 { font-size: var(--fs-13); }
.t-ok { color: var(--ok); }
.t-danger { color: var(--danger); }
.t-warn { color: var(--warn); }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.pre-wrap { white-space: pre-wrap; }
.spacer { flex: 1 1 auto; }

/* ---------- кнопки ---------- */

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: var(--r-ctl);
  border: 1px solid transparent; background: transparent;
  font-size: var(--fs-14); font-weight: 600; line-height: 1; white-space: nowrap;
  text-decoration: none; user-select: none;
  transition: background-color var(--d-press) ease, border-color var(--d-press) ease, color var(--d-press) ease, transform var(--d-press) var(--ease-out);
}
.btn:active:not(:disabled), .icon-btn:active:not(:disabled) { transform: scale(var(--m-press)); }
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); }
.btn--primary:active { background: var(--primary-active); }
.btn--secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn--secondary:hover { background: var(--hover); border-color: #AEBBB3; }
.btn--secondary:active { background: #EAEFEC; }
.btn--ghost { color: var(--text); }
.btn--ghost:hover { background: var(--neutral-bg); }
.btn--ghost:active { background: #E3E8E5; }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #9C1E14; }
.btn--sm { height: 28px; padding: 0 10px; font-size: var(--fs-13); }
.btn--block { width: 100%; height: 36px; }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; background: #EEF1EF; border-color: transparent; color: var(--text-disabled); }
.btn--ghost:disabled { background: transparent; }
.btn.is-busy { cursor: progress; }
.btn.is-busy > * { opacity: 0; }
.btn.is-busy::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin 640ms linear infinite;
}
.btn--primary.is-busy { background: var(--primary-hover); color: #fff; }
.btn--secondary.is-busy { background: var(--surface); border-color: var(--border-strong); color: var(--text-2); }
.btn--ghost.is-busy { background: var(--neutral-bg); color: var(--text-2); }
.btn--danger.is-busy { background: #9C1E14; color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn .icon { width: 16px; height: 16px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--r-ctl); border: 0; background: transparent; color: var(--text-2);
  transition: background-color var(--d-press) ease, color var(--d-press) ease, transform var(--d-press) var(--ease-out);
}
.icon-btn:hover { background: var(--neutral-bg); color: var(--text); }
.icon-btn:disabled { color: #B9C3BE; background: transparent; cursor: default; }
.icon-btn--danger:hover { color: var(--danger); background: var(--danger-bg); }

.link-btn {
  border: 0; background: none; padding: 0; color: var(--primary); font-weight: 600;
  text-underline-offset: 3px; cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.link-btn:disabled { color: var(--text-disabled); cursor: default; text-decoration: none; }

/* ---------- поля ---------- */

.input {
  display: block; width: 100%; height: 32px; padding: 0 8px;
  border: 1px solid var(--border-strong); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--text); font-size: var(--fs-14);
  transition: border-color var(--d-press) ease, box-shadow var(--d-press) ease;
}
.input:hover { border-color: #A3B2AA; }
.input:focus, .input:focus-visible { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
.input[aria-invalid="true"] { border-color: var(--danger); }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
input[type="number"].input--cell { width: 64px; height: 26px; margin: -3px 0 -3px auto; padding: 0 6px; text-align: right; }
.input::placeholder { color: var(--text-2); opacity: 1; }
.input:disabled, .input[readonly] { background: var(--surface-2); color: var(--text-2); border-color: var(--border); cursor: default; }
textarea.input { height: auto; padding: 6px 8px; line-height: 1.45; resize: vertical; }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 28px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%235B6B63' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 14px;
}
select.input:disabled { cursor: default; }
.input--sm { height: 28px; font-size: var(--fs-13); }
.input--auto { width: auto; }
.input--num { width: 88px; }
.input--code { width: 72px; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; flex: none; }
input:disabled { cursor: default; }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field__label { font-size: var(--fs-13); font-weight: 600; color: var(--text); }
.field__hint { font-size: var(--fs-12); color: var(--text-2); }
.field__error { font-size: var(--fs-13); color: var(--danger); }
.check-row { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-14); cursor: pointer; }
.check-row.is-disabled { cursor: default; color: var(--text-2); }

.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.fgrid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fgrid .span-all { grid-column: 1 / -1; }
.fstack { display: flex; flex-direction: column; gap: 12px; }
.factions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.search { position: relative; }
.search .icon { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); color: var(--text-2); pointer-events: none; }
.search .input { padding-left: 30px; }

.seg { display: inline-flex; align-items: center; height: 28px; padding: 2px; gap: 2px; border: 1px solid var(--border-strong); border-radius: var(--r-ctl); background: var(--surface); }
.seg button {
  height: 22px; padding: 0 10px; border: 0; border-radius: 4px; background: transparent;
  font-size: var(--fs-13); color: var(--text-2);
}
.seg button:hover { color: var(--text); background: var(--hover); }
.seg button[aria-pressed="true"] { background: var(--ok-bg); color: var(--primary); font-weight: 600; }
.seg button:disabled { cursor: default; }
.seg button { transition: background-color var(--d-press) ease, color var(--d-press) ease; }
.seg button:focus-visible { outline-offset: 0; }

.qf {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: var(--r-ctl); background: var(--surface);
  font-size: var(--fs-13); color: var(--text-2); white-space: nowrap;
  transition: background-color var(--d-press) ease, border-color var(--d-press) ease, color var(--d-press) ease, transform var(--d-press) var(--ease-out);
}
.qf:hover { color: var(--text); border-color: #A3B2AA; }
.qf:active { transform: scale(var(--m-press)); }
.qf__n { font-weight: 600; color: var(--text); }
.qf--danger[aria-pressed="true"] { background: var(--danger-bg); border-color: #F1BDB6; color: var(--danger); font-weight: 600; }
.qf--danger[aria-pressed="true"] .qf__n { color: var(--danger); }

.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); }
.tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 0 9px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; background: none; font-size: var(--fs-14); color: var(--text-2);
}
.tab { transition: color var(--d-press) ease, border-color var(--d-reveal) var(--ease-out); }
.tab:hover { color: var(--text); }
.tab:disabled { color: var(--text-disabled); cursor: default; }
.tab:focus-visible { outline-offset: 0; }
.tab[aria-selected="true"] { color: var(--text); font-weight: 600; border-bottom-color: var(--brand); }

.count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--neutral-bg); color: var(--text); font-size: var(--fs-12); font-weight: 600; line-height: 1;
}
.count--warn { background: var(--warn-bg); color: var(--warn); }
.count--danger { background: var(--danger-bg); color: var(--danger); }

.badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px;
  font-size: var(--fs-12); font-weight: 600; line-height: 1; white-space: nowrap;
}
.badge--yes { background: var(--ok-bg); color: var(--ok); }
.badge--no { background: var(--danger-bg); color: var(--danger); }
.badge--partial { background: var(--warn-bg); color: var(--warn); }
.badge--na, .badge--none { background: var(--neutral-bg); color: var(--neutral); }

.bar { position: relative; height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.bar > span { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: var(--primary); transform-origin: left center; }
.bar--grow > span { animation: bar-grow var(--d-count) var(--ease-out) both; }
@keyframes bar-grow { from { transform: scaleX(0); } }
.bar--mid > span { background: #7A8A82; }
.bar--low > span { background: var(--danger); }

/* ---------- оболочка ---------- */

.sb {
  position: fixed; inset: 0 auto 0 0; width: 232px; z-index: 20;
  display: flex; flex-direction: column; background: var(--sb); color: var(--sb-text);
}
.sb__head { padding: 18px 20px 14px; }
.sb__logo { display: inline-block; border-radius: 2px; }
.sb__logo img { height: 22px; width: auto; }
.sb__product { margin-top: 8px; font-size: var(--fs-12); color: var(--sb-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb__nav { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.sb__item {
  position: relative; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px 0 12px;
  border-radius: var(--r-ctl); color: var(--sb-text); font-size: var(--fs-14); text-decoration: none;
  transition: background-color 120ms, color 120ms;
}
.sb__item:hover { background: var(--sb-hover); color: #fff; text-decoration: none; }
.sb__item[aria-current="page"] { background: var(--sb-active); color: #fff; font-weight: 600; }
.sb__item[aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--brand);
}
.sb__item .count { margin-left: auto; background: rgba(255, 255, 255, 0.08); color: var(--sb-text); font-weight: 600; }
.sb__item .count--warn { background: #5A3A10; color: #FFD9A8; }
.sb__item .count--danger { background: #6A2019; color: #FFCFC8; }
.sb__item:focus-visible { outline-offset: -2px; }
.sb__user {
  margin-top: auto; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 10px 10px;
  padding: 12px 8px 8px 16px; border-top: 1px solid var(--sb-active);
}
.avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--sb-active); color: #fff; font-size: var(--fs-12); font-weight: 600;
}
.sb__name { color: #fff; font-size: var(--fs-13); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb__role { color: var(--sb-text-2); font-size: var(--fs-12); }
.sb__logout {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; height: 32px; margin-left: -8px; padding: 0 12px; border: 0; border-radius: var(--r-ctl);
  background: transparent; color: var(--sb-text); font-size: var(--fs-13); text-align: left;
}
.sb__logout:hover { background: var(--sb-hover); color: #fff; }

.main { margin-left: 232px; height: 100vh; overflow: auto; display: flex; flex-direction: column; }
.view { flex: 1 0 auto; display: flex; flex-direction: column; min-width: 0; }
.view.is-entering { animation: view-in var(--d-reveal) var(--ease-out); }
@keyframes view-in { from { opacity: 0; transform: translateY(var(--m-rise)); } }
.view--fill { flex: 1 1 auto; min-height: 0; overflow: hidden; }

.sysbar { display: flex; align-items: center; gap: 12px; padding: 8px 24px; font-size: var(--fs-13); border-bottom: 1px solid; }
.sysbar--warn { background: var(--warn-bg); color: var(--warn); border-color: #F3DEBF; }
.sysbar--danger { background: var(--danger-bg); color: var(--danger); border-color: #F5C9C4; }
.sysbar a { color: inherit; font-weight: 600; text-decoration: underline; }

/* ---------- шапка страницы ---------- */

.ph { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 18px 24px 14px; flex: none; }
.ph__main { min-width: 0; flex: 1 1 auto; }
.ph__back {
  display: inline-flex; align-items: center; gap: 4px; margin: 0 0 4px -2px; font-size: var(--fs-13); color: var(--text-2);
}
.ph__back:hover { color: var(--primary); text-decoration: none; }
.ph__title { font-size: var(--fs-20); line-height: 28px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.ph__meta { margin-top: 2px; font-size: var(--fs-13); color: var(--text-2); }
.ph__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 72%; }
.ph__actions .input { width: auto; }
.ph__divider { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.ph__back .icon { transition: transform var(--d-press) var(--ease-out); }
.ph__back:hover .icon { transform: translateX(calc(var(--m-rise) * -0.5)); }
.pager { display: inline-flex; align-items: center; gap: 2px; }
.pager__pos { font-size: var(--fs-13); color: var(--text-2); margin-right: 6px; white-space: nowrap; }
.sep { color: #A2AFA8; padding: 0 6px; }

.progress-line { position: absolute; left: 24px; right: 24px; bottom: 0; height: 2px; overflow: hidden; border-radius: 1px; background: var(--border-soft); }
.progress-line__fill { position: absolute; inset: 0; background: var(--brand); transform-origin: left center; transform: scaleX(0.03); transition: transform var(--d-count) var(--ease-out); }
.progress-line:not(.is-indeterminate)::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 18%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  animation: sweep 1.4s linear infinite;
}
.progress-line.is-indeterminate .progress-line__fill { width: 32%; transform: translateX(-100%); transition: none; animation: indet 1.2s var(--ease-in-out) infinite; }
@keyframes indet { to { transform: translateX(320%); } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(560%); } }
.progress-text { font-size: var(--fs-13); color: var(--text-2); white-space: nowrap; }
.progress-text b { color: var(--text); font-weight: 600; }

.content { padding: 0 24px 24px; display: flex; flex-direction: column; gap: 12px; }
.content--fill { flex: 1 1 auto; min-height: 0; padding-bottom: 16px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-surf); overflow: clip; }
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 8px 16px; border-bottom: 1px solid var(--border); flex: none;
}
.panel__title { font-size: var(--fs-14); font-weight: 600; }
.panel__body { padding: 16px; }

/* ---------- сводка и фильтры ---------- */

.strip { font-size: var(--fs-13); color: var(--text-2); display: flex; flex-wrap: wrap; align-items: baseline; margin-top: -4px; }
.strip b { color: var(--text); font-weight: 600; }
.strip b.t-danger { color: var(--danger); }
.strip b.t-warn { color: var(--warn); }
.strip .sep { padding: 0 8px; }

.filters { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0; }
.filters .input { width: auto; }
.filters .search { flex: 0 1 220px; min-width: 132px; }
.filters .search .input { width: 100%; }
.filters__label { font-size: var(--fs-13); color: var(--text-2); }

.toolbar { position: relative; min-height: 32px; flex: none; }
.content--fill > .strip { flex: none; }
.toolbar .filters { min-height: 32px; }
.bulk {
  position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; gap: 12px;
  padding: 0 4px 0 14px; border: 1px solid #BFE0CA; border-radius: var(--r-ctl);
  background: var(--ok-bg); font-size: var(--fs-13); animation: fade-in var(--d-reveal) var(--ease-out);
}
@keyframes fade-in { from { opacity: 0; } }
.bulk .btn--sm { height: 26px; }
.bulk__text { font-weight: 600; }
.bulk__text span { font-weight: 400; color: var(--text-2); }

/* ---------- таблицы ---------- */

.tbl-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-surf); overflow: auto; }
.tbl-wrap--fill { flex: 1 1 auto; min-height: 0; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-13); }
.tbl th {
  position: sticky; top: 0; z-index: 2; height: 36px; padding: 0 12px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); text-align: left; font-size: var(--fs-12); font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.tbl td { height: 40px; padding: 4px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; white-space: nowrap; transition: background-color var(--d-press) ease; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--hover); }
.tbl tr.is-cursor td { background: var(--cursor-bg); }
.tbl tr.is-selected td { background: var(--selected-bg); }
.tbl tr.is-link { cursor: pointer; }
.tbl tbody tr:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.tbl-wrap { scroll-padding-top: 40px; }
.tbl .num { text-align: right; }
.tbl .cb { width: 40px; padding-right: 0; }
.tbl th.sortable { padding: 0; }
.tbl th.sortable button {
  display: inline-flex; align-items: center; gap: 4px; width: 100%; height: 36px; padding: 0 12px; border: 0; background: none;
  font: inherit; color: inherit; text-align: inherit; white-space: nowrap;
}
.tbl th.sortable.num button { justify-content: flex-end; }
.tbl th.sortable button:hover { color: var(--text); }
.tbl th.sortable button .icon { color: #9AA8A0; }
.tbl th.sortable[aria-sort] button { color: var(--text); }
.tbl th.sortable[aria-sort] button .icon { color: var(--primary); }
.tbl--compact td { height: 32px; padding: 3px 10px; }
.tbl--compact th { height: 32px; padding: 0 10px; position: static; }
.tbl .id { font-weight: 600; color: var(--text); }
.tbl a.id:hover { color: var(--primary); }
.tbl .sub { display: block; font-size: var(--fs-12); color: var(--text-2); }
.tbl td.wrap { white-space: normal; }
@media (max-width: 1360px) { .filters .search .input { width: 150px; } .tbl td { padding: 4px 8px; } .tbl th { padding: 0 8px; } .tbl th.sortable button { padding: 0 8px; } .tbl .cb { padding-left: 12px; } }
.tbl td.clip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.score { font-weight: 600; }
.score--good { color: var(--ok); }
.score--low { color: var(--danger); }
.score__orig { font-size: var(--fs-12); font-weight: 400; color: var(--text-2); margin-right: 2px; }

.rowprog { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); white-space: nowrap; }
.rowprog__bar { position: relative; width: 44px; height: 3px; border-radius: 2px; background: var(--border); overflow: hidden; }
.rowprog__bar::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: var(--brand);
  transform: translateX(-100%); animation: slide 1.1s var(--ease-in-out) infinite; animation-delay: var(--phase, 0ms);
}
@keyframes slide { to { transform: translateX(250%); } }

/* ---------- состояния ---------- */

.empty { padding: 40px 24px; text-align: center; }
.empty__title { font-size: var(--fs-16); font-weight: 600; }
.empty__text { margin: 6px auto 0; max-width: 460px; font-size: var(--fs-14); color: var(--text-2); }
.empty__actions { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.empty--error .empty__title { color: var(--danger); }

.skel { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.skel span { position: relative; display: block; height: 12px; border-radius: 4px; background: #EDF1EE; overflow: hidden; }
.skel span::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

.inline-msg { font-size: var(--fs-13); }
.inline-msg.is-error { color: var(--danger); }
.inline-msg.is-ok { color: var(--ok); }

.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 16px; font-size: var(--fs-13);
  border-bottom: 1px solid;
}
.alert--danger { background: var(--danger-bg); border-color: #F5C9C4; color: var(--text); }
.alert--danger > .icon { color: var(--danger); margin-top: 1px; }
.alert__title { color: var(--danger); font-weight: 600; }
.alert--warn { background: var(--warn-bg); border-color: #F3DEBF; }
.alert--warn > .icon { color: var(--warn); margin-top: 1px; }

/* ---------- всплывающие ---------- */

.pop {
  position: fixed; z-index: 60; min-width: 200px; padding: 4px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-surf); box-shadow: var(--shadow-pop);
  animation: pop-in 150ms var(--ease-out);
}
@keyframes pop-in { from { opacity: 0; transform: scale(var(--m-pop)); } }
.pop--form { width: 340px; padding: 14px; }
.pop__title { font-size: var(--fs-14); font-weight: 600; margin-bottom: 10px; }
.menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 10px; border: 0; border-radius: 4px;
  background: transparent; font-size: var(--fs-14); text-align: left; color: var(--text); white-space: nowrap;
}
.menu-item { transition: background-color var(--d-press) ease; }
.menu-item:hover, .menu-item:focus-visible { background: var(--hover); outline-offset: -2px; }
.menu-item .icon { color: var(--text-2); }

.tip {
  position: absolute; z-index: 400; max-width: 340px; padding: 6px 8px; border-radius: 4px;
  background: var(--text); color: #fff; font-size: var(--fs-12); line-height: 16px; white-space: pre-line;
  box-shadow: 0 4px 12px rgba(15, 42, 33, 0.22); pointer-events: none;
  opacity: 0; transform: scale(var(--m-pop)); transition: opacity 120ms ease, transform 120ms var(--ease-out);
}
.tip.is-in { opacity: 1; transform: none; }
.tip.is-instant { transition-duration: 0ms; }
.tip__kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 16px; margin-left: 8px; padding: 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 3px; font: inherit; font-size: 11px; font-weight: 600; color: #DDEAE2; vertical-align: 0;
}

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast {
  display: flex; align-items: flex-start; gap: 10px; min-width: 260px; max-width: 440px; padding: 10px 8px 10px 12px;
  border-radius: var(--r-ctl); background: var(--text); color: #fff; font-size: var(--fs-13); box-shadow: var(--shadow-pop);
  opacity: 0; transform: translateY(var(--m-toast)); transition: opacity var(--d-reveal) var(--ease-out), transform var(--d-reveal) var(--ease-out);
}
.toast.is-in { opacity: 1; transform: none; }
.toast.is-in.is-out { opacity: 0; transform: none; transition: opacity 160ms ease; }
.toast > .icon { margin-top: 1px; color: #7FD6A0; }
.toast--error { background: #7E1A11; }
.toast--error > .icon { color: #FFC9C2; }
.toast__msg { flex: 1; }
.toast__close { border: 0; background: none; color: rgba(255, 255, 255, 0.7); padding: 0 2px; display: inline-flex; }
.toast__close:hover { color: #fff; }

dialog.dlg {
  width: 420px; max-width: calc(100vw - 32px); padding: 0; border: 1px solid var(--border); border-radius: var(--r-surf);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop);
}
dialog.dlg::backdrop { background: rgba(15, 42, 33, 0.32); animation: fade-in var(--d-reveal) var(--ease-out); }
dialog.dlg[open] { animation: dlg-in var(--d-reveal) var(--ease-out); }
@keyframes dlg-in { from { opacity: 0; transform: scale(var(--m-pop)); } }
.dlg__body { padding: 20px 20px 16px; }
.dlg__title { font-size: var(--fs-16); font-weight: 600; margin-bottom: 6px; }
.dlg__text { color: var(--text-2); }
.dlg__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); }

/* ---------- заставка при входе ---------- */

.intro {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: var(--sb); cursor: default;
  animation: fade-in var(--intro-cover) ease backwards;
}
.intro__logo { width: min(320px, 72vw); height: auto; animation: intro-logo var(--intro-in) var(--ease-out) backwards; }
@keyframes intro-logo { from { opacity: 0; transform: scale(var(--m-pop)); } }
.intro.is-out { opacity: 0; transition: opacity var(--intro-out) ease; }
.view:focus { outline: none; }

/* ---------- вход ---------- */

.login {
  position: relative; overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh; background: var(--sb); color: var(--sb-text);
}
.login > * { position: relative; }
.login > img.login__mark {
  position: absolute; right: -4%; bottom: -22%; width: min(58vw, 760px); height: auto;
  opacity: 0.06; pointer-events: none; user-select: none;
}
.login__top { display: flex; align-items: center; gap: 16px; padding: 28px 40px; }
.login__logo { height: 28px; width: auto; }
.login__tag { padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, 0.16); font-size: var(--fs-13); color: var(--sb-text); }
.login__center { display: flex; align-items: center; justify-content: center; padding: 16px 24px 32px; }
.login__card {
  width: 440px; max-width: 100%; padding: 32px 32px 24px; border-radius: 12px;
  background: var(--surface); color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.30), 0 2px 8px rgba(0, 0, 0, 0.14);
  animation: view-in var(--d-layout) var(--ease-out) both;
}
.login__title { font-size: var(--fs-24); line-height: 32px; font-weight: 600; margin-bottom: 20px; }
.login__sub { margin: 4px 0 20px; font-size: var(--fs-13); color: var(--text-2); }
.login__card .input { height: 38px; }
.login__card .btn--primary { height: 38px; }
.login__bottom { display: flex; justify-content: space-between; gap: 16px; padding: 20px 40px; font-size: var(--fs-12); color: var(--sb-text-2); }
.login__error { min-height: 20px; font-size: var(--fs-13); color: var(--danger); }
.login__fields.is-shake { animation: shake 320ms var(--ease-out); }
@keyframes shake {
  20% { transform: translateX(calc(var(--m-shake) * -1)); }
  45% { transform: translateX(var(--m-shake)); }
  70% { transform: translateX(calc(var(--m-shake) * -0.5)); }
  90% { transform: translateX(calc(var(--m-shake) * 0.25)); }
}
.pw { position: relative; }
.pw .input { padding-right: 40px; }
.pw__toggle {
  position: absolute; right: 4px; top: 50%; translate: 0 -50%; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 28px; border: 0; border-radius: 4px; background: transparent; color: var(--text-2);
  transition: background-color var(--d-press) ease, color var(--d-press) ease;
}
.pw__toggle:hover { background: var(--neutral-bg); color: var(--text); }
.pw__toggle[aria-pressed="true"] { color: var(--primary); }
.demo { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.demo__title { font-size: var(--fs-13); font-weight: 600; margin-bottom: 6px; }
.demo .tbl-wrap { border-radius: var(--r-ctl); }
.demo .tbl td { height: 34px; }
.demo .tbl tr { cursor: pointer; }
.demo .tbl td.t-2 { font-size: var(--fs-12); }
.demo .tbl tr:focus-visible td { background: var(--hover); }
.demo .tbl tr:focus-visible { outline-offset: -2px; }
.demo__note { margin-top: 6px; font-size: var(--fs-12); color: var(--text-2); }

/* ---------- карточка диалога ---------- */

.split { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr); gap: 12px; padding: 0 24px 16px; }
.pane { position: relative; display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-surf); }
.pane__scroll { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; }
.pane__foot { flex: none; display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface); }

.player { flex: none; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.player__label { font-size: var(--fs-12); font-weight: 600; color: var(--text-2); white-space: nowrap; }
.player__label.is-error { color: var(--danger); font-weight: 400; }
.player audio { flex: 1 1 auto; min-width: 0; height: 32px; }

.tx { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.tx__body { flex: 1 1 auto; min-height: 0; display: flex; }
.tx__scroll { position: relative; flex: 1 1 auto; min-width: 0; overflow: auto; padding: 4px 0 24px; }
.tx__track { position: relative; flex: none; width: 12px; border-left: 1px solid var(--border-soft); background: var(--surface-2); }
.tx__mark {
  position: absolute; left: 2px; right: 2px; min-height: 4px; padding: 0; border: 0; border-radius: 1px;
  background: var(--primary); cursor: pointer; transform: translateY(-50%);
}
.tx__mark.is-in { animation: mark-in var(--d-reveal) var(--ease-out) both; }
.tx__mark--range.is-in { animation-name: mark-in-range; transform-origin: center top; }
@keyframes mark-in { from { opacity: 0; transform: translateY(-50%) scale(var(--m-mark)); } }
@keyframes mark-in-range { from { opacity: 0; transform: scaleY(var(--m-mark)); } }
.tx__mark:hover { background: var(--brand); left: 0; right: 0; }
.tx__mark--range { background: #9ED3B1; transform: none; }
.tx__mark--play { background: var(--warn); height: 2px; min-height: 2px; pointer-events: none; }

.turn {
  position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) 24px; gap: 0 10px;
  padding: 6px 8px 6px 12px; transition: background-color var(--d-reveal) var(--ease-out);
}
.turn__meta { display: flex; flex-direction: column; font-size: var(--fs-12); line-height: 16px; color: var(--text-2); padding-top: 1px; }
.turn__no { font-weight: 600; }
.turn__who { font-size: var(--fs-12); font-weight: 600; color: var(--text-2); line-height: 16px; margin-bottom: 1px; }
.turn__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.turn--operator { background: var(--operator-bg); }
.turn--operator .turn__who { color: var(--primary); }
.turn--bot .turn__text, .turn--system .turn__text { font-size: var(--fs-13); color: var(--text-2); }
.turn__tag { font-weight: 400; margin-left: 6px; }
.turn__play {
  align-self: start; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border: 0; border-radius: 4px; background: transparent; color: var(--text-2); opacity: 0;
}
.turn:hover .turn__play, .turn__play:focus-visible, .turn.is-playing .turn__play { opacity: 1; }
.turn__play:hover { background: var(--neutral-bg); color: var(--primary); }
.turn.is-range { background: var(--range-bg); }
.turn.is-hl { background: var(--evidence-bg); }
.turn.is-hl .turn__no, .turn.is-hl .turn__who { color: var(--primary-active); }
.turn.is-playing { box-shadow: inset 0 0 0 1px var(--warn); }
.turn.is-playing .turn__play { color: var(--warn); }
.turn::after { content: ""; position: absolute; inset: 0; background: var(--flash-bg); mix-blend-mode: multiply; opacity: 0; pointer-events: none; }
.turn.flash::after { animation: flash var(--d-flash) var(--ease-out); }
@keyframes flash { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }

.botgroup > summary {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) 24px; gap: 0 10px; align-items: center;
  padding: 7px 8px 7px 12px; list-style: none; cursor: pointer; font-size: var(--fs-13); color: var(--text-2);
  border-bottom: 1px solid var(--border-soft);
}
.botgroup > summary::-webkit-details-marker { display: none; }
.botgroup > summary:hover { background: var(--hover); color: var(--text); }
.botgroup > summary .icon { transition: transform var(--d-layout) var(--ease-out); justify-self: center; }
.botgroup[open] > summary .icon { transform: rotate(180deg); }
.botgroup > summary b { font-weight: 600; color: var(--text); }
.botgroup[open] { border-bottom: 1px solid var(--border-soft); }
.botgroup > summary.is-hl { background: var(--evidence-bg); }

.band--hold { background: var(--hold-bg); border-top: 1px solid var(--hold-line); border-bottom: 1px solid var(--hold-line); margin: 4px 0; }
.band--hold .turn--operator { background: transparent; }
.band__label { padding: 6px 12px 2px 74px; font-size: var(--fs-12); font-weight: 600; color: var(--warn); }
.band--after { opacity: 0.62; }
.band--after .band__label { color: var(--text-2); }

/* панель оценки */
.evhead { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px; border-bottom: 1px solid var(--border); }
.evhead > :first-child { flex: none; max-width: 168px; }
.evhead > .sec-grid { flex: 1 1 260px; min-width: 260px; }
.evtotal__num { font-size: 2rem; line-height: 36px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.evtotal__num small { font-size: var(--fs-14); font-weight: 400; color: var(--text-2); letter-spacing: 0; margin-left: 4px; }
.evtotal__num.score--low { color: var(--danger); }
.evtotal__orig { font-size: var(--fs-13); color: var(--text-2); margin-top: 2px; }
.evtotal__note { font-size: var(--fs-12); color: var(--text-2); margin-top: 4px; max-width: 150px; }
.sec-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto 56px; align-items: center; gap: 6px 10px; font-size: var(--fs-13); }
.sec-grid__row { display: contents; }
.sec-grid__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-grid__pts { text-align: right; white-space: nowrap; color: var(--text); }
.sec-grid__pts span { color: var(--text-2); }

.evblock { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.evblock__title { font-size: var(--fs-13); font-weight: 600; margin-bottom: 2px; }
.evmeta { font-size: var(--fs-12); color: var(--text-2); }

.crit-sec {
  position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  font-size: var(--fs-12); font-weight: 600; color: var(--text-2);
}
.crit-sec span:last-child { font-weight: 400; }
.crit { border-bottom: 1px solid var(--border-soft); }
.crit__row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto 40px 16px; align-items: center; gap: 10px;
  width: 100%; min-height: 40px; padding: 6px 16px; border: 0; background: transparent; text-align: left; cursor: pointer;
}
.crit__row { transition: background-color var(--d-press) ease; }
.crit__row:hover, .crit.is-open > .crit__row { background: var(--hover); }
.crit__row:focus-visible { outline-offset: -2px; }
.crit__code { font-size: var(--fs-12); font-weight: 600; color: var(--text-2); }
.crit__name { display: flex; align-items: baseline; min-width: 0; }
.crit__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crit__pts { font-size: var(--fs-13); text-align: right; white-space: nowrap; min-width: 92px; }
.crit__pts span { color: var(--text-2); }
.crit__agree { font-size: var(--fs-12); text-align: right; color: var(--text-2); white-space: nowrap; }
.crit__agree.is-split { color: var(--warn); font-weight: 600; }
.crit__chev { color: var(--text-2); transition: transform var(--d-layout) var(--ease-out); }
.crit.is-open .crit__chev { transform: rotate(180deg); }
.crit__mark { flex: none; color: var(--warn); font-size: var(--fs-12); margin-left: 6px; font-weight: 600; }
.crit__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--d-layout) var(--ease-out); }
.crit.is-open > .crit__panel { grid-template-rows: 1fr; }
.crit__inner { min-height: 0; overflow: hidden; }
.crit__body {
  padding: 4px 16px 16px 48px; display: flex; flex-direction: column; gap: 10px; background: var(--hover);
  opacity: 0; transition: opacity var(--d-press) ease;
}
.crit.is-open .crit__body { opacity: 1; transition: opacity var(--d-reveal) ease 40ms; }
.crit > .crit__row { position: relative; }
.crit > .crit__row::after { content: ""; position: absolute; inset: 0; background: var(--flash-bg); mix-blend-mode: multiply; opacity: 0; pointer-events: none; }
.crit.flash > .crit__row::after { animation: flash var(--d-flash) var(--ease-out); }
.reason { line-height: 1.5; }
.reason__label { font-size: var(--fs-12); font-weight: 600; color: var(--text-2); margin-bottom: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border: 1px solid var(--border-strong);
  border-radius: 4px; background: var(--surface); font-size: var(--fs-12); color: var(--text); white-space: nowrap;
  transition: border-color var(--d-press) ease, color var(--d-press) ease, transform var(--d-press) var(--ease-out);
}
button.chip:active { transform: scale(var(--m-press)); }
button.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip--range { background: var(--range-bg); border-color: #BFE0CA; }

.tlink {
  display: inline; padding: 0; border: 0; background: none; color: var(--primary); font-weight: 600;
  text-decoration: underline; text-decoration-color: rgba(11, 122, 59, 0.35); text-underline-offset: 3px; cursor: pointer;
}
.tlink:hover { text-decoration-color: var(--primary); }

.dl { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 4px 12px; font-size: var(--fs-13); }
.dl dt { color: var(--text-2); }
.dl dd { min-width: 0; }

.appeal-form { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }

.tech > summary {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px; list-style: none; cursor: pointer; font-size: var(--fs-13); font-weight: 600;
}
.tech > summary::-webkit-details-marker { display: none; }
.tech > summary:hover { background: var(--hover); }
.tech > summary .icon { color: var(--text-2); transition: transform var(--d-layout) var(--ease-out); }
.tech[open] > summary .icon { transform: rotate(180deg); }
.tech > summary .t-2 { font-weight: 400; margin-left: auto; font-size: var(--fs-12); }
.tech__body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.tech__sub { font-size: var(--fs-12); font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.tech .tbl-wrap { border-radius: var(--r-ctl); }
.cell-diff { color: var(--warn); font-weight: 600; }

.cmp { border-bottom: 1px solid var(--border); }
.cmp__head { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.cmp__head .input { width: auto; }
.cmp__totals > span { white-space: nowrap; }
.cmp__pts { margin-left: 8px; font-size: var(--fs-13); }
.btn--secondary[aria-pressed="true"] { background: var(--ok-bg); border-color: #BFE0CA; color: var(--primary); }
.cmp__totals { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 10px 16px; font-size: var(--fs-13); border-bottom: 1px solid var(--border-soft); }
.cmp__totals b { font-size: var(--fs-16); font-weight: 600; }
.cmp .tbl td, .cmp .tbl th { position: static; }
.cmp tr.is-changed td { background: #FFFBF4; }
.delta-up { color: var(--ok); font-weight: 600; }
.delta-down { color: var(--danger); font-weight: 600; }

/* ---------- апелляция ---------- */

.sect { padding: 16px; border-bottom: 1px solid var(--border); }
.sect:last-child { border-bottom: 0; }
.sect__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sect__title { font-size: var(--fs-14); font-weight: 600; }
.sect p + p, .sect .reason + .chips, .sect .chips + p { margin-top: 8px; }
.rule { white-space: pre-wrap; line-height: 1.5; }
.scale { margin-top: 8px; font-size: var(--fs-13); }
.scale li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding: 3px 0; }
.scale li b { font-weight: 600; text-align: right; }
.scale li.is-current { color: var(--primary); font-weight: 600; }
.quote { padding-left: 12px; border-left: 1px solid var(--border-strong); line-height: 1.5; }
.byline { margin-top: 6px; font-size: var(--fs-12); color: var(--text-2); }
.verdict { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.radios { display: flex; gap: 20px; }
.result-line { font-size: var(--fs-16); }
.result-line b { font-weight: 600; }
.xfade { display: inline-grid; }
.xfade > span { grid-area: 1 / 1; }
.xfade__old { animation: xf-out var(--d-layout) ease 260ms both; }
.xfade__new { animation: xf-in var(--d-layout) var(--ease-out) 260ms both; }
@keyframes xf-out { to { opacity: 0; transform: translateY(calc(var(--m-rise) * -1)); } }
@keyframes xf-in { from { opacity: 0; transform: translateY(var(--m-rise)); } }
.hist li { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; padding: 4px 0; font-size: var(--fs-13); }
.hist li span:first-child { color: var(--text-2); }

/* ---------- грубые ошибки ---------- */

.glist { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-surf); overflow: clip; }
.gitem {
  display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 24px; padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft); cursor: pointer; transition: background-color var(--d-press) ease;
}
.gitem:last-child { border-bottom: 0; }
.gitem:hover { background: var(--surface-2); }
.gitem__side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gitem__id { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gitem__id:hover { color: var(--primary); }
.gitem__meta { font-size: var(--fs-13); color: var(--text-2); }
.gitem__score { margin-top: 8px; font-size: var(--fs-13); color: var(--text-2); }
.gitem__score b { color: var(--text); font-weight: 600; font-size: var(--fs-14); }
.gitem__main { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 860px; }
.gviol { display: flex; flex-direction: column; gap: 8px; }
.gviol + .gviol { padding-top: 16px; border-top: 1px solid var(--border-soft); }
.gviol__type { font-size: var(--fs-14); line-height: 20px; font-weight: 600; color: var(--danger); }
.gviol .reason { color: var(--text); }
.gquotes { display: flex; flex-direction: column; gap: 6px; }
.gquote { margin: 0; padding: 8px 12px 9px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--r-ctl); }
.gitem:hover .gquote { background: var(--surface); }
.gquote__head { display: flex; align-items: baseline; gap: 8px; font-size: var(--fs-12); color: var(--text-2); margin-bottom: 2px; }
.gquote__head span { font-weight: 600; }
.gquote--operator .gquote__head span { color: var(--primary); }
.gquote__text { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.gquote:not(.gquote--operator) .gquote__text { color: var(--text-2); }
.gviol__foot { font-size: var(--fs-12); color: var(--text-2); }
.glist-wrap { display: flex; flex-direction: column; }

/* ---------- чек-листы ---------- */

.cl-layout { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 12px; padding: 0 24px 16px; }
.ver { display: block; width: 100%; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--border-soft); background: transparent; text-align: left; }
.ver:hover { background: var(--hover); }
.ver.is-current { background: #F0F8F3; }
.ver:focus-visible { outline-offset: -2px; }
.ver__top { display: flex; align-items: center; gap: 8px; }
.ver__name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ver.is-current .ver__name { color: var(--primary); }
.ver__meta { font-size: var(--fs-12); color: var(--text-2); margin-top: 2px; }
.ver__note { font-size: var(--fs-12); margin-top: 2px; }
.ver__act { margin-top: 6px; }

.ed-sect { padding: 16px; border-bottom: 1px solid var(--border); }
.ed-sect__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ed-sect__title { font-size: var(--fs-14); font-weight: 600; }
.ed-note { display: flex; align-items: center; gap: 8px; padding: 8px 16px; font-size: var(--fs-13); background: var(--surface-2); border-bottom: 1px solid var(--border); color: var(--text-2); }
.ed-errors { padding: 8px 16px; background: var(--danger-bg); border-bottom: 1px solid #F5C9C4; font-size: var(--fs-13); color: var(--danger); }
.ed-errors li + li { margin-top: 2px; }
.secrow { display: grid; grid-template-columns: 72px minmax(0, 1fr) 96px auto; gap: 8px; align-items: center; padding: 4px 0; }
.secrow__id { font-size: var(--fs-12); color: var(--text-2); }
.secrow__n { font-size: var(--fs-12); color: var(--text-2); }
.secrow__tools { display: flex; gap: 2px; }

.ctbl td { height: 38px; }
.ctbl tr.is-open td { background: var(--hover); border-bottom-color: transparent; }
.ctbl tr.edit-row td { padding: 4px 12px 16px 40px; background: var(--hover); white-space: normal; }
.ctbl tr.edit-row:hover td { background: var(--hover); }
.ctbl .tools { display: flex; justify-content: flex-end; gap: 2px; white-space: nowrap; }
.ctbl .chev { color: var(--text-2); transition: transform var(--d-layout) var(--ease-out); }
.ctbl tr.flash td { animation: row-flash var(--d-flash) var(--ease-out); }
@keyframes row-flash { 18% { background-color: #D9F0E1; } }
.ctbl td.cell-input { padding-top: 0; padding-bottom: 0; }
.ctbl tr.is-open .chev { transform: rotate(180deg); }
.scale-ed { display: flex; flex-direction: column; gap: 6px; }
.scale-ed__row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 28px; gap: 8px; align-items: center; }
.confirm-inline { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--danger); white-space: nowrap; }

/* ---------- настройки и калибровка ---------- */

.srow { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 20px; border-bottom: 1px solid var(--border); }
.srow:last-child { border-bottom: 0; }
.srow__title { font-size: var(--fs-14); font-weight: 600; }
.srow__desc { font-size: var(--fs-13); color: var(--text-2); margin-top: 2px; }
.srow__body { max-width: 560px; }
.key-line { display: flex; align-items: center; gap: 8px; font-size: var(--fs-13); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-2); flex: none; }
.dot--ok { background: var(--brand); }
.dot--off { background: var(--danger); }
.readonly-note { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: var(--fs-13); color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-ctl); }

.headline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0; font-size: var(--fs-14); color: var(--text-2); }
.headline b { font-size: var(--fs-20); font-weight: 600; color: var(--text); margin-right: 6px; }
.headline .sep { padding: 0 14px; }
.acc { display: grid; grid-template-columns: 120px 56px; gap: 10px; align-items: center; }
.acc span:last-child { text-align: right; font-weight: 600; }

/* ---------- адаптив ---------- */

@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr); overflow: auto; }
  .view--fill { overflow: auto; }
  .split .pane { min-height: 560px; }
  .cl-layout { grid-template-columns: minmax(0, 1fr); }
  .srow { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 860px) {
  .sb { width: 64px; }
  .sb__head, .sb__product, .sb__item span:not(.count), .sb__name, .sb__role, .sb__logout span { display: none; }
  .sb__user { grid-template-columns: 32px; justify-content: center; padding: 12px 0; }
  .main { margin-left: 64px; }
  .login__top, .login__bottom { padding-left: 24px; padding-right: 24px; }
  .login__card { padding: 24px 20px 20px; }
}

/* меньше движения: без сдвигов и масштаба, только прозрачность; бесконечные анимации заменены пульсом */
@media (prefers-reduced-motion: reduce) {
  :root { --m-rise: 0px; --m-toast: 0px; --m-press: 1; --m-pop: 1; --m-mark: 1; --m-shake: 0px; }
  html { scroll-behavior: auto; }
  .crit__panel { transition: none; }
  .bar--grow > span { animation: none; }
  .progress-line__fill { transition: none; }
  .progress-line.is-indeterminate .progress-line__fill { width: 100%; transform: none; animation: pulse 1.6s ease-in-out infinite; }
  .progress-line:not(.is-indeterminate)::after { animation: none; display: none; }
  .skel span::after { animation: none; display: none; }
  .skel span { animation: pulse 1.6s ease-in-out infinite; }
  .rowprog__bar::after { width: 100%; transform: none; animation: pulse 1.6s ease-in-out infinite; }
  .btn.is-busy::after { border-right-color: currentColor; opacity: 0.5; animation: pulse 1.2s ease-in-out infinite; }
  .ph__back:hover .icon { transform: none; }
}
@keyframes pulse { 50% { opacity: 0.45; } }

.foot-status { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane__foot > * { flex-shrink: 0; }
.pane__foot > .foot-status { flex-shrink: 1; }
.ctbl { table-layout: fixed; }
.ctbl td { overflow-wrap: anywhere; }
.edit-tools { display: flex; justify-content: flex-end; margin: 0 -4px 6px 0; }
.edit-tools .tools { display: flex; gap: 2px; }
