/* ═══ 14. Таблицы кабинета: токены --n-* и --st-*, компоненты .nt-* ═══════════
   Claude Design, v2 от 29.10.2026. Палитра — продукта (снимки 29.10): тёмно-синяя главная
   кнопка #131747, светлый холодный фон, Montserrat; в тёмной теме главная — лавандовая.
   Тема — <html data-theme="light|dark">, значения system нет: его разрешает скрипт.
   Статусы — шесть тонов: n черновик · w ждёт решения · p в работе · d готово · f отказ · x отменено.
   Перенос (Z-317): в первой строке у автора между токенами стояла косая черта сразу после звёздочки — она закрывала комментарий, и :root с токенами
   не разбирался; это единственная правка файла автора. */
:root {
  --n-bg:#F5F5F9;
  --n-side:#FFFFFF;
  --n-surface:#FFFFFF;
  --n-surface-2:#FAFAFC;
  --n-head:#FAFAFC;
  --n-field:#FFFFFF;
  --n-line:#EBEAF0;
  --n-line-strong:#DBDADE;
  --n-ink:#2E2A40;
  --n-ink-2:#5D586C;
  --n-ink-3:#6F6B7D;
  --n-accent:#131747;
  --n-accent-hover:#252A6B;
  --n-accent-ink:#FFFFFF;
  --n-accent-tint:#EEEDFC;
  --n-accent-line:#B9B5E6;
  --n-row-hover:#F7F7FA;
  --n-row-sel:#F1F0FD;
  --n-focus:#7367F0;
  --n-danger:#C0392F;
  --n-danger-ink:#FFFFFF;
  --n-danger-tint:#FDEEEE;
  --n-danger-line:#FFC9CB;
  --n-warn-ink:#8A5300;
  --n-pos-ink:#157347;
  --n-pin-shadow:rgba(75,70,92,.14);
  --n-disabled-bg:#F1F1F4;
  --n-disabled-ink:#A8AAAE;
  --n-track:#ECEBF1;
  --n-skel:#EFEEF3;
  --n-avatar:#ECEBF1;
  --n-tip-bg:#2E2A40;
  --n-tip-ink:#FFFFFF;
  --n-bulk-bg:#131747;
  --n-bulk-ink:#FFFFFF;
  --n-bulk-btn:rgba(255,255,255,.14);
  --n-logo:#131747;
  --n-logo-ink:#FFFFFF;
  --st-n-bg:#EFEEF3; --st-n-fg:#5D586C; --st-n-dot:#A8AAAE; --st-n-bd:#EFEEF3;
  --st-w-bg:#FFF1E3; --st-w-fg:#8A5300; --st-w-dot:#FF9F43; --st-w-bd:#FFF1E3;
  --st-p-bg:#E8EEFD; --st-p-fg:#2B4FB8; --st-p-dot:#4C7BEA; --st-p-bd:#E8EEFD;
  --st-d-bg:#E2F7EB; --st-d-fg:#157347; --st-d-dot:#28C76F; --st-d-bd:#E2F7EB;
  --st-f-bg:#FDEAEA; --st-f-fg:#B3151A; --st-f-dot:#EA5455; --st-f-bd:#FDEAEA;
  --st-x-bg:transparent; --st-x-fg:#6F6B7D; --st-x-dot:#A8AAAE; --st-x-bd:#DBDADE;
  /* размеры */
  --n-radius:6px; --n-radius-panel:8px;
  --n-row-h:48px; --n-row-h-compact:36px; --n-head-h:40px; --n-cell-x:12px;
  --n-fs-cell:13px; --n-fs-sub:12px; --n-fs-head:12px;
  --n-ctl-h:38px; --n-ctl-h-row:30px; --n-ctl-h-touch:44px;
}
:root[data-theme="dark"] {
  --n-bg:#1C1E2D;
  --n-side:#222537;
  --n-surface:#25283B;
  --n-surface-2:#2B2E43;
  --n-head:#2B2E43;
  --n-field:#212436;
  --n-line:#353950;
  --n-line-strong:#434968;
  --n-ink:#E6E8F5;
  --n-ink-2:#B6BEE3;
  --n-ink-3:#8F95C6;
  --n-accent:#C5C2FB;
  --n-accent-hover:#D6D3FD;
  --n-accent-ink:#131747;
  --n-accent-tint:#33335E;
  --n-accent-line:#5E5AA6;
  --n-row-hover:#2A2D42;
  --n-row-sel:#2F3056;
  --n-focus:#A39CFF;
  --n-danger:#FF9B9C;
  --n-danger-ink:#2A0F10;
  --n-danger-tint:#3A2433;
  --n-danger-line:#6A3540;
  --n-warn-ink:#FFC98A;
  --n-pos-ink:#6EE7A8;
  --n-pin-shadow:rgba(0,0,0,.5);
  --n-disabled-bg:#2B2E43;
  --n-disabled-ink:#6A7192;
  --n-track:#363A52;
  --n-skel:#2F3248;
  --n-avatar:#363A52;
  --n-tip-bg:#E6E8F5;
  --n-tip-ink:#1C1E2D;
  --n-bulk-bg:#C5C2FB;
  --n-bulk-ink:#131747;
  --n-bulk-btn:rgba(19,23,71,.1);
  --n-logo:#FFFFFF;
  --n-logo-ink:#131747;
  --st-n-bg:#33364C; --st-n-fg:#C4C9E6; --st-n-dot:#8F95C6; --st-n-bd:#33364C;
  --st-w-bg:#45352A; --st-w-fg:#FFC98A; --st-w-dot:#FF9F43; --st-w-bd:#45352A;
  --st-p-bg:#2A3556; --st-p-fg:#A9C3FA; --st-p-dot:#6D96F0; --st-p-bd:#2A3556;
  --st-d-bg:#233D37; --st-d-fg:#6EE7A8; --st-d-dot:#28C76F; --st-d-bd:#233D37;
  --st-f-bg:#46293A; --st-f-fg:#FF9B9C; --st-f-dot:#EA5455; --st-f-bd:#46293A;
  --st-x-bg:transparent; --st-x-fg:#8F95C6; --st-x-dot:#6A7192; --st-x-bd:#434968;
}

/* ---------- Компоненты таблиц ---------- */
.nt { font-family:Montserrat, sans-serif; color:var(--n-ink); font-size:var(--n-fs-cell); }
.nt-num, .nt-money, .nt td.is-num, .nt th.is-num { font-variant-numeric:tabular-nums; }

/* шапка реестра */
.nt-head { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.nt-head__title { font-size:22px; font-weight:700; }
.nt-head__count { font-size:14px; font-weight:600; color:var(--n-ink-3); margin-left:10px; font-variant-numeric:tabular-nums; }
.nt-head__actions { display:flex; gap:8px; }

/* кнопки */
.nt-btn { display:inline-flex; align-items:center; gap:6px; height:var(--n-ctl-h); padding:0 14px; border:0; border-radius:var(--n-radius);
  font:600 13px/1 Montserrat, sans-serif; background:var(--n-surface); color:var(--n-ink); box-shadow:inset 0 0 0 1px var(--n-line-strong); cursor:pointer; white-space:nowrap; }
.nt-btn:hover { background:var(--n-row-hover); box-shadow:inset 0 0 0 1px var(--n-ink-3); }
.nt-btn--primary { background:var(--n-accent); color:var(--n-accent-ink); box-shadow:none; padding:0 16px; }
.nt-btn--primary:hover { background:var(--n-accent-hover); box-shadow:none; }
.nt-btn--ghost { background:transparent; box-shadow:none; color:var(--n-accent); height:var(--n-ctl-h-row); padding:0 10px; }
.nt-btn--ghost:hover { background:var(--n-accent-tint); }
.nt-btn--icon { width:var(--n-ctl-h-row); height:var(--n-ctl-h-row); padding:0; justify-content:center; background:transparent; box-shadow:none; color:var(--n-ink-2); font-size:16px; }
.nt-btn--icon:hover { background:var(--n-row-hover); box-shadow:inset 0 0 0 1px var(--n-line); }
.nt-btn--danger { background:var(--n-danger); color:var(--n-danger-ink); box-shadow:none; }
.nt-btn:disabled, .nt-btn[aria-disabled="true"] { background:var(--n-disabled-bg); color:var(--n-disabled-ink); box-shadow:none; cursor:not-allowed; }
.nt-btn[aria-busy="true"] { opacity:.85; pointer-events:none; }
.nt-btn:focus-visible, .nt-field:focus-visible, .nt a:focus-visible, .nt-chk:focus-visible, .nt th button:focus-visible
  { outline:none; box-shadow:0 0 0 2px var(--n-surface), 0 0 0 4px var(--n-focus); }

/* поле и строка отбора */
.nt-filters { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:18px; }
.nt-field { height:var(--n-ctl-h); padding:0 12px; border:0; border-radius:var(--n-radius); background:var(--n-field); color:var(--n-ink);
  box-shadow:inset 0 0 0 1px var(--n-line-strong); font:400 13px Montserrat, sans-serif; }
.nt-field--search { min-width:320px; }
.nt-field[aria-invalid="true"] { box-shadow:inset 0 0 0 1.5px var(--n-danger); }
.nt-field__error { font-size: 12px; font-weight:600; color:var(--n-danger); margin-top:4px; }
/* отбор — это .nt-btn.nt-filter */
.nt-filter.is-active { background:var(--n-accent-tint); color:var(--n-accent); box-shadow:inset 0 0 0 1px var(--n-accent-line); }
.nt-filter__key { font-weight:500; color:var(--n-ink-3); }
.nt-filter.is-active .nt-filter__key { color:inherit; }
.nt-chips { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:10px; font-size:12px; }
.nt-chip { display:inline-flex; align-items:center; gap:4px; height:26px; padding:0 4px 0 10px; border-radius:var(--n-radius);
  background:var(--n-surface); box-shadow:inset 0 0 0 1px var(--n-line-strong); font-weight:600; }

/* таблица */
.nt-wrap { position:relative; margin-top:14px; border:1px solid var(--n-line); border-radius:var(--n-radius-panel); background:var(--n-surface); overflow:hidden; }
.nt-scroll { overflow-x:auto; scrollbar-gutter:stable; }
.nt table { width:100%; border-collapse:separate; border-spacing:0; }
.nt th { position:sticky; top:0; z-index:2; height:var(--n-head-h); padding:0 var(--n-cell-x); background:var(--n-head);
  border-bottom:1px solid var(--n-line-strong); font-size:var(--n-fs-head); font-weight:600; color:var(--n-ink-2); text-align:left; white-space:nowrap; }
.nt th.is-num { text-align:right; }
.nt th button { all:unset; display:inline-flex; align-items:center; gap:5px; cursor:pointer; }
.nt th .nt-sort { color:var(--n-line-strong); }
.nt th:hover .nt-sort { color:var(--n-ink-2); }
.nt th[aria-sort="ascending"], .nt th[aria-sort="descending"] { color:var(--n-ink); }
.nt th[aria-sort="ascending"] .nt-sort, .nt th[aria-sort="descending"] .nt-sort { color:var(--n-accent); }
.nt th .nt-hint { text-decoration:underline dotted var(--n-ink-3); text-underline-offset:3px; }
.nt td { height:var(--n-row-h); padding:0 var(--n-cell-x); border-bottom:1px solid var(--n-line); vertical-align:middle; line-height:1.4; }
.nt td.is-num { text-align:right; white-space:nowrap; }
.nt td.is-chk, .nt th.is-chk { width:44px; padding:0; text-align:center; }
.nt td.is-act { width:1%; padding:0 6px; text-align:right; white-space:nowrap; }
.nt tbody tr { cursor:pointer; }
.nt tbody tr:hover { background:var(--n-row-hover); }
.nt tbody tr[aria-selected="true"] { background:var(--n-row-sel); }
.nt tbody tr:focus-within { box-shadow:inset 0 0 0 2px var(--n-focus); }
.nt tbody tr.is-muted td { color:var(--n-ink-3); }
.nt tbody tr.is-new .nt-link { font-weight:700; }
.nt tbody tr.is-group { background:var(--n-surface-2); font-weight:700; }
.nt tbody tr.is-child td { height:40px; font-size:12px; background:var(--n-surface-2); }
.nt tfoot td, .nt tr.is-total td { position:sticky; bottom:0; background:var(--n-head); border-top:1px solid var(--n-line-strong); font-weight:700; }
.nt-compact .nt td { height:var(--n-row-h-compact); }
.nt-compact .nt-sub { display:none; }

/* закреплённый первый столбец и подсказка «есть ещё справа» */
.nt .is-pin { position:sticky; left:0; z-index:1; background:inherit; box-shadow:6px 0 10px -6px var(--n-pin-shadow); }
.nt th.is-pin { z-index:3; background:var(--n-head); }
.nt-more { position:absolute; top:0; right:0; bottom:0; width:110px; pointer-events:none;
  background:linear-gradient(90deg, transparent, var(--n-surface) 75%); display:flex; justify-content:flex-end; padding:6px 8px 0 0; }
.nt-more button { pointer-events:auto; }
.nt-wrap.is-end .nt-more { display:none; }

/* ячейки */
.nt-main { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:1; overflow:hidden; }
.nt-main--2 { -webkit-line-clamp:2; }
.nt-sub { display:block; font-size:var(--n-fs-sub); color:var(--n-ink-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nt-link { color:var(--n-accent); font-weight:600; text-decoration:underline; text-decoration-color:var(--n-accent-line); text-underline-offset:3px; }
.nt-ref { color:inherit; text-decoration:underline; text-decoration-color:var(--n-line-strong); text-underline-offset:3px; }
.nt-ref:hover, .nt-link:hover { text-decoration-color:currentColor; }
.nt-unit { color:var(--n-ink-3); font-size:12px; font-weight:500; margin-left:3px; }
.nt-money.is-pos { color:var(--n-pos-ink); }
.nt-zero, .nt-none { color:var(--n-ink-3); }
.nt-date.is-today .nt-sub { color:var(--n-warn-ink); font-weight:600; }
.nt-date.is-over, .nt-date.is-over .nt-sub { color:var(--n-danger); font-weight:600; }
.nt-avatar { width:28px; height:28px; border-radius:50%; background:var(--n-avatar); color:var(--n-ink-2); font-size:11px; font-weight:700;
  display:inline-flex; align-items:center; justify-content:center; flex:none; }
.nt-progress { display:flex; align-items:center; gap:10px; }
.nt-progress__bar { flex:1; height:6px; border-radius:3px; background:var(--n-track); overflow:hidden; }
.nt-progress__bar > span { display:block; height:100%; background:var(--n-accent); }
.nt-progress.is-full .nt-progress__bar > span { background:var(--st-d-dot); }
.nt-chk { width:16px; height:16px; margin:0; accent-color:var(--n-accent); cursor:pointer; }

/* плашка статуса */
.nt-status { display:inline-flex; align-items:center; gap:6px; min-height:22px; padding:2px 8px; border-radius:var(--n-radius);
  font-size:12px; font-weight:600; line-height:1.3; background:var(--st-bg); color:var(--st-fg); box-shadow:inset 0 0 0 1px var(--st-bd); }
.nt-status::before { content:""; width:6px; height:6px; border-radius:50%; background:var(--st-dot); flex:none; }
.nt-status--n { --st-bg:var(--st-n-bg); --st-fg:var(--st-n-fg); --st-dot:var(--st-n-dot); --st-bd:var(--st-n-bd); }
.nt-status--w { --st-bg:var(--st-w-bg); --st-fg:var(--st-w-fg); --st-dot:var(--st-w-dot); --st-bd:var(--st-w-bd); }
.nt-status--p { --st-bg:var(--st-p-bg); --st-fg:var(--st-p-fg); --st-dot:var(--st-p-dot); --st-bd:var(--st-p-bd); }
.nt-status--d { --st-bg:var(--st-d-bg); --st-fg:var(--st-d-fg); --st-dot:var(--st-d-dot); --st-bd:var(--st-d-bd); }
.nt-status--f { --st-bg:var(--st-f-bg); --st-fg:var(--st-f-fg); --st-dot:var(--st-f-dot); --st-bd:var(--st-f-bd); }
.nt-status--x { --st-bg:var(--st-x-bg); --st-fg:var(--st-x-fg); --st-dot:var(--st-x-dot); --st-bd:var(--st-x-bd); }

/* ЭЦП: два квадрата — мы / вторая сторона */
.nt-sign { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--n-ink-3); }
.nt-sign i { width:8px; height:8px; border-radius:2px; box-shadow:inset 0 0 0 1.5px currentColor; }
.nt-sign i + i { margin-left:-4px; }
.nt-sign.is-us { color:var(--st-w-fg); } .nt-sign.is-us i:first-child { background:var(--st-w-dot); box-shadow:none; }
.nt-sign.is-both { color:var(--st-d-fg); } .nt-sign.is-both i { background:var(--st-d-dot); box-shadow:none; }
.nt-sign.is-revoked { color:var(--n-danger); } .nt-sign.is-revoked i { background:var(--n-danger); box-shadow:none; }

/* массовые действия: встаёт на место шапки таблицы */
.nt-bulk { position:sticky; top:0; z-index:4; display:flex; align-items:center; gap:12px; height:44px; padding:0 8px 0 14px;
  background:var(--n-bulk-bg); color:var(--n-bulk-ink); font-size:13px; }
.nt-bulk .nt-btn { height:30px; background:var(--n-bulk-btn); color:inherit; box-shadow:none; }

/* низ */
.nt-foot { display:flex; justify-content:space-between; align-items:center; margin-top:12px; font-size:13px; color:var(--n-ink-2); }
.nt-pager { display:flex; align-items:center; gap:4px; }
.nt-pager a, .nt-pager span { display:inline-flex; align-items:center; justify-content:center; min-width:32px; height:32px; border-radius:var(--n-radius); }
.nt-pager [aria-current="page"] { background:var(--n-accent-tint); color:var(--n-accent); font-weight:700; box-shadow:inset 0 0 0 1px var(--n-accent-line); }

/* пустые и служебные состояния */
.nt-empty { padding:56px 24px; display:flex; flex-direction:column; align-items:center; text-align:center; gap:10px; }
.nt-empty__title { font-size:15px; font-weight:700; }
.nt-empty__text { font-size:13px; line-height:1.5; color:var(--n-ink-2); max-width:520px; }
.nt-error { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:16px; border-radius:var(--n-radius);
  background:var(--n-danger-tint); box-shadow:inset 0 0 0 1px var(--n-danger-line); }
.nt-notice { display:flex; gap:10px; align-items:center; padding:12px 16px; border:1px solid var(--n-line); border-radius:var(--n-radius); font-size:13px; color:var(--n-ink-2); }
.nt-skel { height:10px; border-radius:3px; background:var(--n-skel); }
.nt-tip { background:var(--n-tip-bg); color:var(--n-tip-ink); border-radius:var(--n-radius); padding:10px 12px; font-size:12px; line-height:1.5; max-width:300px; }

/* телефон: строка → карточка по ролям */
@media (max-width: 767.98px) {
  .nt table, .nt thead, .nt tbody, .nt tr, .nt td { display:block; }
  .nt thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
  .nt-wrap { border:0; background:transparent; overflow:visible; }
  .nt tbody { display:flex; flex-direction:column; gap:10px; }
  .nt tbody tr { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 12px; padding:14px; border-radius:var(--n-radius-panel);
    background:var(--n-surface); box-shadow:0 0 0 1px var(--n-line); }
  .nt tbody tr[aria-selected="true"] { box-shadow:0 0 0 1.5px var(--n-accent); }
  .nt td { height:auto; padding:0; border:0; }
  .nt td[data-role="klyuch"]   { grid-column:1; font-size:15px; }
  .nt td[data-role="status"]   { grid-column:2; grid-row:1; }
  .nt td[data-role="kontekst"] { grid-column:1 / -1; font-size:13px; color:var(--n-ink-2); }
  .nt td[data-role="srok"]     { grid-column:1; font-size:13px; }
  .nt td[data-role="chislo"]   { grid-column:2; text-align:right; font-size:16px; font-weight:700; }
  .nt td[data-role="chislo"]::before { content:attr(data-label); display:block; font-size:11px; font-weight:600; color:var(--n-ink-3); }
  .nt td[data-role="deystvie"] { grid-column:1 / -1; display:flex; gap:8px; border-top:1px solid var(--n-line); padding-top:10px; }
  .nt td[data-role="deystvie"] .nt-btn { height:var(--n-ctl-h-touch); flex:1; justify-content:center; box-shadow:inset 0 0 0 1px var(--n-accent-line); }
  .nt td[data-role="deystvie"] .nt-btn--icon { flex:none; width:var(--n-ctl-h-touch); box-shadow:inset 0 0 0 1px var(--n-line-strong); }
  .nt td.is-chk { display:none; }
  .nt tfoot, .nt tr.is-total { position:sticky; bottom:0; }
  .nt-field--search { min-width:0; width:100%; height:var(--n-ctl-h-touch); }
  .nt-filters { flex-wrap:nowrap; overflow-x:auto; }
  .nt-bulk { position:fixed; left:0; right:0; bottom:0; top:auto; height:auto; padding:12px 16px 24px; flex-wrap:wrap; }
}
