/* «Документы» — реестр КП, договоров, счетов, актов (каркас до контракта арха; js/views/doc-registry.js).
   Токены пакета v5 — обе темы сами; сетка без фиксированных ширин — 390 px без прокрутки вбок (таблица листается
   своей полосой .table-wrap). */
.docreg { padding: 14px var(--sp-4); display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; }
.docreg__head { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.docreg__over { font-family: var(--font-mono); font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.docreg__title { margin: 0; font-size: 22px; line-height: 28px; font-weight: 800; color: var(--ink); }
.docreg__sub { margin: 0; font-size: 13px; color: var(--muted); }
.docreg__kinds { align-self: flex-start; max-width: 100%; flex-wrap: wrap; }
.docreg__no { font-family: var(--font-mono); font-size: 12.5px; white-space: nowrap; }
.docreg__table td.right, .docreg__table th.right { text-align: right; white-space: nowrap; }
.docreg__pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.docreg__bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; min-width: 0; }
.docreg__q { flex: 1 1 220px; max-width: 360px; min-width: 0; width: 100%; }
.docreg__who { display: grid; gap: 2px; justify-items: start; min-width: 0; }
.docreg__deal { font-size: 12px; }
.docreg__client { white-space: nowrap; }
.docreg__unf-error { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.docreg__retry, .docreg__open { white-space: nowrap; }
.docreg__open .icn svg { width: 14px; height: 14px; }
.docreg__in1c { white-space: nowrap; font-size: 12.5px; }
/* 390 px: документ — строкой-карточкой (восемь колонок в 340 px рвали контрагента по слогу и уводили сумму за край):
   номер и вид сверху, контрагент со сделкой, сумма и дата, «Клиенту» и файл, обмен с 1С — во всю ширину. */
@media (max-width: 640px) {
  .docreg__table thead { display: none; }
  .docreg__table, .docreg__table tbody { display: block; }
  .docreg__table tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line);
    grid-template-areas: "no kind" "who who" "amount date" "client file" "unf unf";
  }
  .docreg__table td { display: block; height: auto; padding: 0; border: 0; min-width: 0; }
  .docreg__table td:nth-child(1) { grid-area: no; }
  .docreg__table td:nth-child(2) { grid-area: kind; color: var(--muted); }
  .docreg__table td:nth-child(3) { grid-area: who; font-weight: 650; }
  .docreg__table td:nth-child(4) { grid-area: amount; text-align: left; font-weight: 700; }
  .docreg__table td:nth-child(5) { grid-area: date; color: var(--muted); }
  .docreg__table td:nth-child(6) { grid-area: client; }
  .docreg__table td:nth-child(7) { grid-area: unf; }
  .docreg__table td:nth-child(8) { grid-area: file; justify-self: end; }
}
