/*
 * Оформление панели. Акцент — фирменный жёлтый Bybit, база нейтрально-серая.
 * Две темы, обе намеренно неконтрастные: ни чистого чёрного, ни чистого белого,
 * чтобы за панелью можно было сидеть часами. Анимации только на смену состояния,
 * 120 мс — ничего, что отвлекало бы от цифр.
 */

:root,
:root[data-theme='dark'] {
  --accent: #f7a600;
  --accent-soft: rgba(247, 166, 0, 0.14);
  --accent-ink: #1a1400;
  /*
   * Акцент для мелкого текста. На тёмном фоне фирменный жёлтый читается
   * прекрасно и совпадает с основным; на светлом он слишком светлый,
   * поэтому там это отдельный, более глубокий тон.
   */
  --accent-text: #f7a600;

  --bg: #0e1116;
  --surface: #161a20;
  --surface-2: #1c2128;
  --border: #272d36;
  --text: #e3e6ea;
  --muted: #8b95a3;

  --ok: #2ebd85;
  --warn: #e8a33d;
  --danger: #f0616d;
  --ok-soft: rgba(46, 189, 133, 0.14);
  --warn-soft: rgba(232, 163, 61, 0.14);
  --danger-soft: rgba(240, 97, 109, 0.14);

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --radius: 10px;
}

:root[data-theme='light'] {
  --accent: #b87400;
  --accent-soft: rgba(184, 116, 0, 0.13);
  /* Тёмная подпись на жёлтой кнопке — так это сделано и у самого Bybit. */
  --accent-ink: #241a00;
  --accent-text: #8f5a00;

  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f8f9fa;
  --border: #e2e5e9;
  --text: #22272e;
  --muted: #5f6875;

  /*
   * Светлая тема: тона глубже, чем напрашивается на глаз. Проверено
   * расчётом контраста — прежние были ниже порога читаемости на белом,
   * и слова вроде «хватает» приходилось разглядывать.
   */
  --ok: #0f6f4d;
  --warn: #8a5809;
  --danger: #b82634;
  --ok-soft: rgba(15, 111, 77, 0.11);
  --warn-soft: rgba(138, 88, 9, 0.12);
  --danger-soft: rgba(184, 38, 52, 0.1);

  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 ui-sans-serif, system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

code,
.mono {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, 'Liberation Mono', monospace;
  font-size: 0.92em;
}

/* ------------------------------------------------------------------ каркас */

.shell {
  display: grid;
  /*
   * minmax(0, 1fr) — несущее. При обычном 1fr широкая таблица распирает
   * колонку грида, и за край экрана уезжает МЕНЮ, а не таблица.
   */
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

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

@media (max-width: 860px) {
  .side {
    position: static;
    height: auto;
  }
}

.side nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  transition: background 120ms ease, color 120ms ease;
}

.side nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.side nav a.on {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
}

.side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--accent);
  flex: none;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  margin-left: auto;
  transition: background 200ms ease;
}

.live-dot.live-on {
  background: var(--ok);
}

.brand-lg {
  font-size: 16px;
  margin-bottom: 18px;
}

/*
 * Ограничение ширины снято: владелец смотрит панель во весь монитор,
 * и таблицы обязаны занимать всё, что есть. Ограничители ширины у ФОРМ
 * при этом остаются — поле ввода шириной в два метра не шире, а хуже.
 */
.main {
  padding: 18px 20px 40px;
  max-width: none;
  min-width: 0;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

h1 {
  font-size: 20px;
  margin: 0;
  letter-spacing: -0.015em;
}

h2 {
  font-size: 15px;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.hint {
  color: var(--muted);
  margin: 6px 0;
}

/* ------------------------------------------------------------------ блоки */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.muted-card {
  color: var(--muted);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tile-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tile-value {
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

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

/*
 * Договор плотной таблицы: одна сущность — одна строка, все строки одной
 * высоты, ни одна ячейка не переносится на вторую строку. Длинный текст
 * обрезается, целиком он живёт в карточке и в подсказке.
 *
 * table-layout: fixed обязателен ещё и потому, что содержимое подменяется
 * живым обновлением: без него браузер переизмерял бы колонки на каждой
 * подмене, и они дёргались бы на пиксель каждую секунду. Цена — в каждом
 * шаблоне таблицы нужен <colgroup>.
 */
.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.table-wrap {
  overflow-x: auto;
}

.table th {
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  /* Заголовок в две строки ломает высоту шапки и сбивает сканирование. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table td {
  height: 34px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table td.num {
  text-align: right;
}

/*
 * Заголовки — всегда слева. Числа в ячейках по-прежнему справа, по разряду:
 * сравнивать их так проще, а вот шапка, у которой часть названий прижата
 * влево, а часть вправо, читается рвано.
 */
.table th {
  text-align: left;
}

/* Цифры выравниваются по разряду: иначе тысячи не сравнить, не вчитываясь. */
.mono,
.num,
.tick {
  font-variant-numeric: tabular-nums;
}

/*
 * Строка-примечание под основной: длинная причина остановки или текст
 * ошибки. Именно строка таблицы, а не перенос внутри ячейки — перенос
 * ломает высоту и разрушает сканирование колонки.
 */
.note-row td {
  height: auto;
  white-space: normal;
  padding-top: 0;
  color: var(--muted);
  font-size: 12px;
}

/*
 * Обрезка с подсказкой: полный текст — в title и в карточке.
 *
 * inline-block, а НЕ block: с display:block на <td> ячейка перестаёт быть
 * ячейкой таблицы, и вся строка разваливается на несколько строк. Поймано
 * глазами на первом же осмотре, поэтому для td явно возвращаем table-cell.
 */
.clip {
  display: inline-block;
  max-width: 100%;
  vertical-align: bottom;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

td.clip,
th.clip {
  display: table-cell;
}

.cell-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dotted var(--border);
}

.cell-link:hover {
  border-bottom-color: var(--accent);
}

tr[data-card] {
  cursor: pointer;
}

/* Единственная допустимая анимация: затухание фона изменившейся строки. */
.row-changed {
  animation: row-changed 600ms ease;
}

@keyframes row-changed {
  from {
    background: var(--accent-soft);
  }
  to {
    background: transparent;
  }
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr {
  transition: background 120ms ease;
}

.table tbody tr:hover {
  background: var(--surface-2);
}

.row-danger td:first-child {
  box-shadow: inset 2px 0 0 var(--danger);
}

.detail {
  color: var(--muted);
  max-width: 460px;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ статусы */

.sev {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sev-info {
  background: var(--surface-2);
  color: var(--muted);
}

.sev-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.sev-crit {
  background: var(--danger-soft);
  color: var(--danger);
}

.sev-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.inline-link {
  color: var(--accent-text);
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease;
}

.inline-link:hover {
  border-bottom-color: var(--accent);
}

.worker-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.worker-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  transition: background 120ms ease;
}

.worker-pill.ok .dot {
  background: var(--ok);
}

.worker-pill.down .dot {
  background: var(--danger);
}

.alert {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  border: 1px solid transparent;
}

.alert-error {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

/* ------------------------------------------------------------------ формы */

.centered {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  width: min(430px, 100%);
  margin: 0;
}

.auth-title {
  margin: 0 0 14px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

label > span {
  color: var(--muted);
  font-size: 12.5px;
}

input[type='text'],
input[type='password'],
input[type='number'] {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
  transition: border-color 120ms ease;
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

/*
 * Куда попадёт Enter — должно быть видно. Панель отпускает крипту кнопкой,
 * и «где сейчас фокус» тут не вопрос вкуса: пройти табуляцией до «Отпустить»
 * вслепую нельзя. Кольцо только на :focus-visible — после щелчка мышью
 * браузер его не рисует, и глаз оно не мозолит.
 */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Выдвижная панель получает фокус программно — кольцо там было бы шумом. */
[tabindex='-1']:focus-visible {
  outline: none;
}

.btn {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.btn:hover {
  border-color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.link-btn,
.theme-toggle {
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  text-align: left;
  transition: background 120ms ease, color 120ms ease;
}

.link-btn:hover,
.theme-toggle:hover {
  background: var(--surface-2);
  color: var(--text);
}

.theme-toggle.subtle {
  margin-top: 14px;
  padding: 0;
  font-size: 12.5px;
}

.totp-box {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.totp-box img {
  border-radius: 6px;
  background: #fff;
  padding: 6px;
}

.secret {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 9px;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- аккаунты */

.account-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.account-head h2 {
  margin: 0 0 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.tag {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tag-live {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-color: transparent;
}

.health {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 14px;
  border-radius: 8px;
  overflow: hidden;
}

.health-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-left: 3px solid var(--border);
}

.health-row.v-ok {
  border-left-color: var(--ok);
}
.health-row.v-warning {
  border-left-color: var(--warn);
}
.health-row.v-blocked {
  border-left-color: var(--danger);
}
.health-row.v-unknown {
  border-left-color: var(--muted);
}

.health-key {
  color: var(--muted);
  font-size: 12.5px;
}

.health-summary {
  overflow-wrap: anywhere;
}

.table.compact td,
.table.compact th {
  padding: 6px 10px;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.strong {
  font-weight: 600;
}

.bad {
  color: var(--danger);
}

.tools {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 4px;
}

.tools summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  user-select: none;
}

.tools summary:hover {
  color: var(--text);
}

.tools-body {
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.row-form input[type='text'] {
  min-width: 260px;
  flex: 1;
}

label.row {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.form-card {
  max-width: 620px;
}

.alert-ok {
  background: var(--ok-soft);
  border-color: var(--ok);
  color: var(--ok);
}

.alert-warn {
  background: var(--warn-soft);
  border-color: var(--warn);
  color: var(--warn);
}

.alert-warn a {
  color: inherit;
  text-decoration: underline;
}

.btn-danger {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-soft);
}

ul.plain {
  margin: 8px 0;
  padding-left: 18px;
}

ul.plain li {
  margin-bottom: 5px;
}

label > span em {
  color: var(--muted);
  font-style: normal;
}

/* ------------------------------------------------------------------ ордера */

.order {
  border-left: 3px solid var(--border);
}

.order.v-match {
  border-left-color: var(--ok);
}
.order.v-mismatch {
  border-left-color: var(--danger);
}
.order.v-unknown {
  border-left-color: var(--warn);
}

.order-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.order-head h2 {
  margin: 0 0 2px;
  font-size: 15px;
}

.order-verdict {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.verdict {
  font-weight: 600;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 999px;
}

.verdict-ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.verdict-bad {
  background: var(--danger-soft);
  color: var(--danger);
}
.verdict-unknown {
  background: var(--warn-soft);
  color: var(--warn);
}

.order-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 8px;
  margin-bottom: 12px;
}

.order-facts .k {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.order-facts .v {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.order-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.override {
  width: 100%;
}

.override summary {
  cursor: pointer;
  color: var(--danger);
  font-size: 13px;
  user-select: none;
}

.override .stack {
  margin-top: 10px;
  max-width: 460px;
}

.release-mode {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.release-mode .k {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 4px;
}

.release-mode .hint {
  margin: 8px 0 0;
}

input.narrow {
  width: 84px;
  min-width: 0;
  text-align: right;
}

input[type='number'] {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 9px;
  font: inherit;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
}

pre.trace {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0 0;
  overflow-x: auto;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.5;
}

.uid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 6px;
  padding: 10px;
  background: var(--surface-2);
  border-radius: 8px;
}

.uid-grid .row {
  gap: 6px;
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .side {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .side nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .main {
    padding: 16px;
  }
}

/* ------------------------------------------------------ панель v2: слой */

/*
 * Слой подробностей. Живёт вне <main id="live">, потому что живое обновление
 * подменяет его содержимое целиком — открытая карточка захлопывалась бы сама
 * каждые несколько секунд, ровно пока владелец её читает.
 */
/*
 * Панель всегда в разметке: display:none обрывает переход, и она появлялась
 * бы рывком. Закрытая уезжает за край и перестаёт ловить события.
 */
.layer {
  --layer-width: 560px;
}

.layer[data-state='closed'] {
  pointer-events: none;
}

.layer[data-state='closed'] .layer-panel {
  transform: translateX(100%);
}

.layer[data-state='closed'] .layer-scrim {
  display: none;
}

.layer-scrim {
  position: fixed;
  inset: 0;
  /* На широком экране прозрачный: таблица за панелью обязана читаться. */
  background: transparent;
}

.layer-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(var(--layer-width), 100vw);
  height: 100vh;
  overflow: auto;
  padding: 16px 18px 28px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.28);
  transform: translateX(100%);
  transition: transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.layer[data-state='open'] .layer-panel,
.layer[data-state='opening'] .layer-panel {
  transform: none;
}

.layer[data-full='1'] .layer-panel {
  width: 100vw;
}

.layer[data-full='1'] .layer-grip {
  display: none;
}

/* Край для растягивания. Узкий, но с запасом под палец и курсор. */
.layer-grip {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  background: transparent;
}

.layer-grip:hover,
body.resizing-layer .layer-grip {
  background: var(--accent-soft);
}

.layer[data-mode='pop'] .layer-grip {
  display: none;
}

/* Пока тянем — не выделяем текст и не мигаем курсором. */
body.resizing-layer,
body.resizing-col,
body.dragging-col {
  user-select: none;
  cursor: col-resize;
}

body.dragging-col {
  cursor: grabbing;
}

/* Всплывашка у ячейки: быстрый ответ на «а что тут целиком написано». */
.layer[data-mode='pop'] .layer-panel {
  inset: auto;
  height: auto;
  max-height: 50vh;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  transform: none;
}

.layer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.layer-title {
  margin: 0;
  font-size: 15px;
}

.layer-x {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.layer-x:hover {
  color: var(--text);
}

.layer-stale {
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: var(--radius);
  padding: 8px 10px;
  margin-bottom: 12px;
  font-size: 13px;
}

.layer-body .card-fragment {
  display: block;
}

@media (max-width: 860px) {
  .layer-panel {
    width: 100vw;
  }
  .layer-scrim {
    background: rgba(0, 0, 0, 0.5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .layer-panel {
    transition: none;
  }
  .row-changed {
    animation: none;
  }
}

/* ------------------------------------------------ панель v2: срок релиза */

/*
 * Полоса срочности несёт СРАЗУ три сигнала: цвет, глиф и подсказку.
 * Цвет никогда не единственный носитель смысла — это читают и дальтоник,
 * и распечатка, и человек, который смотрит краем глаза.
 */
.tick {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.tick-warn {
  color: var(--warn);
}

.tick-warn::before {
  content: '△ ';
}

.tick-crit {
  color: var(--danger);
  font-weight: 600;
}

.tick-crit::before {
  content: '▲ ';
}

.tick-over {
  color: var(--danger);
  font-weight: 600;
}

.tick-over::before {
  content: '⏱ ';
}

/* Часы сервера давно не приходили — отсчёт идёт по часам браузера. */
.tick-unsynced {
  border-bottom: 1px dashed var(--muted);
}

.row-crit td:first-child {
  box-shadow: inset 2px 0 0 var(--danger);
}

.row-warn td:first-child {
  box-shadow: inset 2px 0 0 var(--warn);
}

/* ------------------------------------------ панель v2: честность экрана */

/*
 * Полоса «воркер молчит». Красит её секундный тик в браузере, а не сервер:
 * пока воркер мёртв, он ничего не пишет в базу, отпечаток состояния замирает
 * и страница вообще не перерисовывается. Серверный вердикт «всё в порядке»
 * остался бы на экране навсегда — это самый опасный отказ из возможных
 * для системы, которая отпускает крипту.
 */
.stale-strip {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 14px;
  font-weight: 500;
}

.stale-strip[hidden] {
  display: none;
}

/* Проверки устарели: ячейка обязана сказать об этом, а не молчать зелёным. */
.health-stale {
  color: var(--warn);
}

.live-hold {
  font-size: 12px;
  color: var(--warn);
  padding: 0 2px;
}

.live-hold[hidden] {
  display: none;
}

.live-dot.live-hold {
  background: var(--warn);
}

/* --------------------------------------- панель v2: гашение колонок */

/*
 * Приоритет колонок. Класс ставится и на <col>, и на каждую ячейку:
 * при table-layout: fixed скрытие одного лишь <col> работает не везде.
 * Погашенное не пропадает — оно в карточке, и таблица об этом говорит.
 */
@media (max-width: 1500px) {
  .p4 {
    display: none;
  }
}

@media (max-width: 1200px) {
  .p3 {
    display: none;
  }
  .table-note::after {
    content: ' · часть колонок скрыта, они есть в карточке';
  }
}

@media (max-width: 900px) {
  .p2 {
    display: none;
  }
}

.btn-sm {
  padding: 2px 8px;
  font-size: 12px;
}

/* ------------------------------------------- панель v2: шапка и вкладки */

.head-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2px;
  /*
   * Пять вкладок журнала не помещаются в телефон. Без этого они распирали
   * страницу, и вбок уезжала вся вёрстка, а не одна полоска вкладок.
   */
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs a {
  flex: 0 0 auto;
  padding: 4px 12px;
  border-radius: calc(var(--radius) - 4px);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}

.tabs a:hover {
  color: var(--text);
}

.tabs a.on {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

/*
 * Пустой раздел — строка ВНУТРИ таблицы, а не карточка с абзацем: шапка
 * остаётся на месте, и появление первой настоящей строки не сдвигает
 * страницу под курсором.
 */
.empty-row td {
  color: var(--muted);
  white-space: normal;
  height: auto;
  padding: 14px 10px;
}

.table td.act {
  overflow: visible;
}

.table td.act form {
  display: inline;
}

.confirm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---------------------------------------- панель v2: карточка сущности */

.card-fragment .fact-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.card-fragment .fact-row .k {
  color: var(--muted);
  font-size: 12px;
}

.card-fragment .fact-row .v {
  overflow-wrap: anywhere;
}

.card-fragment .selectable {
  user-select: all;
}

.fragment-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.card-gone {
  color: var(--muted);
}

/* ------------------------------------ панель v2: ширины колонок ордеров */

.orders-table .c-peer { width: 22%; }
.orders-table .c-left { width: 21ch; }
.orders-table .c-verdict { width: 16ch; }
.orders-table .c-money { width: 16ch; }
.orders-table .c-qty { width: 11ch; }
.orders-table .c-acc { width: 16%; }
.orders-table .c-rel { width: 18%; }
.orders-table .c-act { width: 21ch; }

/* ------------------------------- панель v2: узкий экран не ломает колонки */

/*
 * При table-layout: fixed колонки сжимаются пропорционально, и на ноутбуке
 * первой схлопывалась «Контрагент» — то самое, что владелец читает первым:
 * вместо ника оставалась одна буква. Поэтому у таблицы есть минимальная
 * ширина, а обёртка прокручивается вбок. Лучше подвинуть таблицу, чем
 * показать нечитаемый огрызок.
 *
 * Минимум уменьшается вместе с погашенными колонками: их место освобождается.
 *
 * Числа не на глаз: это сумма заданных ширин тех колонок, которые на этой
 * ширине окна видны. Меньший минимум означал бы, что браузер начнёт ужимать
 * колонки пропорционально, и узкие превращаются в полоски по тридцать
 * пикселей — читать нечего, попасть по заголовку нельзя.
 */
.orders-table { min-width: 64rem; }
.accounts-table { min-width: 80rem; }
.ads-table { min-width: 60rem; }
.uids-table { min-width: 44rem; }
.journal-table { min-width: 56rem; }

@media (max-width: 1500px) {
  .accounts-table { min-width: 58rem; }
}

@media (max-width: 1200px) {
  .orders-table { min-width: 52rem; }
  .accounts-table { min-width: 51rem; }
  .ads-table { min-width: 48rem; }
  .journal-table { min-width: 44rem; }
}

@media (max-width: 900px) {
  .orders-table { min-width: 45rem; }
  .accounts-table { min-width: 46rem; }
  .ads-table { min-width: 36rem; }
  .uids-table { min-width: 36rem; }
  .journal-table { min-width: 32rem; }
}

/*
 * Телефон. Владелец сказал, что смотрит с большого монитора, а телефон —
 * «глянуть, что всё живо». Поэтому здесь остаются только контрагент, срок
 * и вердикт: действия убираются, и это ещё и безопаснее — необратимую
 * кнопку не нажмёшь случайно пальцем в маршрутке.
 */
@media (max-width: 700px) {
  .p5 {
    display: none;
  }
  /*
   * На телефоне остаются ровно три колонки — кто, сколько осталось, совпал ли
   * UID, — и ширины задаются заново в долях. Без этого при table-layout: fixed
   * фиксированные ширины в ch съедали всё место, и первой схлопывалась именно
   * «Контрагент»: вместо ника оставалась одна буква.
   */
  .orders-table { min-width: 20rem; }
  .orders-table .c-peer { width: 40%; }
  .orders-table .c-left { width: 32%; }
  .orders-table .c-verdict { width: 28%; }

  .accounts-table { min-width: 20rem; }
  .accounts-table .c-name { width: 44%; }

  .ads-table { min-width: 20rem; }
}

/* ------------------------------- правки по замечаниям владельца (v2.1) */

/*
 * Подразделы аккаунтов в боковом меню. Отступ и точка слева показывают
 * вложенность, не превращая меню в дерево с раскрытием: разделов мало,
 * и прятать их за щелчком незачем.
 */
.side nav a.sub {
  padding-left: 26px;
  font-size: 13px;
  position: relative;
}

.side nav a.sub::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 50%;
  width: 4px;
  height: 4px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--border);
}

.side nav a.sub.on::before {
  background: var(--accent);
}

/*
 * Заголовок страницы. Раньше терялся среди таблиц: тот же размер, тот же
 * цвет, что и подписи. Теперь фирменный жёлтый и засечка слева — глаз
 * цепляется за него сразу, а место он занимает то же.
 */
.page-head h1 {
  font-size: 22px;
  font-weight: 650;
  color: var(--accent);
  padding-left: 12px;
  border-left: 3px solid var(--accent);
  line-height: 1.15;
}

/* ---------------------------------------- карточка: блоки в своих рамках */

/*
 * Каждый смысловой блок карточки — отдельная рамка. На узкой выдвижной
 * панели заголовки иначе тонут между таблицами: глазу не за что зацепиться,
 * и «Проверки» сливаются с «Деньгами».
 */
.card-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.card-block > h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-block .fact-row:last-of-type {
  border-bottom: none;
}

.card-block .fact-row .v {
  overflow-wrap: anywhere;
  min-width: 0;
}

.card-block {
  overflow: hidden;
}

.block-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/*
 * Таблицы внутри карточки не тянутся на всю ширину экрана: карточка
 * открывается и как страница, и там строка «Часы · ok · расхождение 81 мс»
 * растягивалась на два метра, и читать её приходилось по диагонали.
 */
/*
 * Таблицы внутри карточки. Ячейки общей таблицы живут с nowrap ради
 * многоточия, и при table-layout: auto длинная строка вроде «ключ привязан
 * к 95.135.41.195 — при смене адреса…» распирала таблицу за пределы карточки.
 * Здесь перенос разрешён: места по вертикали не жалко, а читать надо.
 */
.card-table {
  min-width: 0;
  width: 100%;
  table-layout: auto;
}

.card-table td {
  height: auto;
  padding: 6px 8px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  border-right: none;
}

.card-table td:first-child {
  width: 1%;
  white-space: nowrap;
  color: var(--muted);
}

/* Карточка по центру страницы, а не прижата к левому краю. */
.card-fragment {
  max-width: 860px;
  margin: 0 auto;
}

.layer-body .card-fragment {
  max-width: none;
}

/* Поле разброса задержки. */
.delay-box {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.delay-box[hidden] {
  display: none;
}

.range-row {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  margin: 8px 0;
}

.range-row label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.range-row input {
  width: 90px;
}

/* Колонки журнала решений: «что сделано» должно быть шире служебных. */
.journal-table .c-said { width: 34%; }
.journal-table .c-who { width: 10ch; }
.stats-table .c-period { width: 18ch; }
.stats-table .c-n { width: 12ch; }
.stats-table .c-sum { width: 18ch; }

/* ----------------------------------- ширины колонок таблицы аккаунтов */

/*
 * Без явных ширин table-layout: fixed делит место поровну, и все тринадцать
 * колонок получали по 91 пикселю: название аккаунта обрезалось до «Партнёр…»,
 * а «Всё в порядке» — до многоточия. Поймано глазами.
 */
.accounts-table .c-name { width: 15%; }
.accounts-table .c-mode { width: 13ch; }
.accounts-table .c-ad { width: 15%; }
.accounts-table .c-money { width: 13ch; }
.accounts-table .c-enough { width: 16ch; }
.accounts-table .c-health { width: 20%; }
.accounts-table .c-orders { width: 10ch; }
.accounts-table .c-deals { width: 12ch; }
.accounts-table .c-volume { width: 14ch; }
.accounts-table .c-proxy { width: 12ch; }
.accounts-table .c-act { width: 15ch; }

.ads-table .c-acc { width: 20%; }
.ads-table .c-state { width: 18ch; }
.ads-table .c-price { width: 14ch; }
.ads-table .c-qty { width: 14ch; }
.ads-table .c-limits { width: 18ch; }
.ads-table .c-enough { width: 18ch; }
.ads-table .c-pay { width: 11ch; }
.ads-table .c-act { width: 22ch; }

.uids-table .c-uid { width: 16ch; }
.uids-table .c-note { width: 24%; }
.uids-table .c-acc-col { width: 14ch; }
.uids-table .c-orders { width: 11ch; }
.uids-table .c-act { width: 13ch; }

.journal-table .c-time { width: 19ch; }
.journal-table .c-sev { width: 11ch; }
.journal-table .c-what { width: 20ch; }
.journal-table .c-subj { width: 20ch; }
.journal-table .c-detail { width: 22%; }
.journal-table .c-msg { width: 36%; }

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

.icon {
  flex: none;
  vertical-align: -3px;
}

.side nav a {
  display: flex;
  align-items: center;
  gap: 9px;
}

.side nav a .icon {
  color: var(--muted);
}

.side nav a.on .icon {
  color: var(--accent-text);
}

.side nav a.sub .icon {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}

.side nav a.sub::before {
  display: none;
}

.page-head h1 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-head h1 .icon {
  width: 20px;
  height: 20px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}

.layer-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Одна кнопка, два значка: показываем тот, что соответствует состоянию. */
.layer[data-full='1'] .ic-expand,
.layer:not([data-full='1']) .ic-collapse {
  display: none;
}

/* ------------------------------------------- плитки сводки по ордерам */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.tile-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tile-value {
  font-size: 30px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 6px 0 2px;
}

.tile-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  font-size: 13px;
}

.tile-rows div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.tile-rows .k {
  color: var(--muted);
}

.tile-rows .v {
  font-variant-numeric: tabular-nums;
}

/* ------------------------------ изменение ширины и порядка колонок */

/*
 * Заголовок обязан быть точкой отсчёта для ручки изменения ширины.
 * Раньше здесь стоял селектор th[data-col] — от прежней разметки, где ключ
 * колонки лежал на каждой ячейке. Атрибута в разметке нет, правило не
 * срабатывало, и ручка привязывалась к обёртке таблицы: видно её было
 * в углу, а попасть по ней — невозможно.
 */
.table thead th {
  position: relative;
}

.col-movable {
  cursor: grab;
}

.col-grip {
  position: absolute;
  top: 0;
  right: 0;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
  touch-action: none;
}

.col-grip::after {
  content: '';
  position: absolute;
  top: 25%;
  right: 3px;
  width: 2px;
  height: 50%;
  border-radius: 1px;
  background: transparent;
  transition: background 120ms ease;
}

.col-grip:hover::after,
.col-resizing .col-grip::after {
  background: var(--accent);
}

.col-grip:hover,
body.resizing-col .col-grip {
  background: var(--accent-soft);
}

/* Колонка, которую тянут: гаснет целиком, а не только её заголовок. */
.col-dragging {
  opacity: 0.35;
}

.accounts-table .c-deals30 { width: 12ch; }
.accounts-table .c-volume30 { width: 14ch; }

/* Узкие числовые колонки журнала: ключи нумерованные, ширина одинаковая. */
.table .c-n1,
.table .c-n2,
.table .c-n3,
.table .c-n4,
.table .c-n5,
.table .c-n6 {
  width: 13ch;
}

/* ------------------------------- разграничение колонок и жесты над ними */

/*
 * Вертикальные линии между колонками. Без них на широком экране глаз теряет,
 * где кончается одна колонка и начинается следующая, — особенно в числах.
 */
.table th,
.table td {
  border-right: 1px solid var(--border);
}

.table th:last-child,
.table td:last-child {
  border-right: none;
}

/*
 * В карточке таких линий быть не должно: там не сетка данных, а пары
 * «подпись — значение». Правило стоит здесь, а не рядом с остальным
 * оформлением карточки, потому что иначе его перебивало бы разграничение
 * колонок выше — вес селекторов одинаковый, побеждает тот, что ниже.
 */
.table.card-table th,
.table.card-table td {
  border-right: none;
}

.table-wrap {
  position: relative;
}

/*
 * Направляющая: при растягивании показывает будущую границу и число,
 * при перетаскивании — место вставки. Без неё непонятно, что происходит,
 * особенно когда колонка упёрлась в минимум и перестала двигаться.
 */
.col-guide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  pointer-events: none;
  z-index: 3;
}

.col-guide[hidden] {
  display: none;
}

.col-guide::after {
  content: attr(data-label);
  position: absolute;
  top: 2px;
  left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.col-guide[data-label='']::after {
  display: none;
}

/* Призрак заголовка едет за курсором — видно, что именно переносится. */
.col-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  will-change: transform;
}

.col-movable {
  cursor: grab;
  user-select: none;
}

body.dragging-col .col-movable {
  cursor: grabbing;
}

@media (prefers-reduced-motion: reduce) {
  .col-ghost {
    display: none;
  }
}

/* ------------------------------------------- статус блока и кнопка назад */

/*
 * Итог проверок — значок в заголовке блока, а не строка, болтающаяся снизу.
 * Зелёный, когда всё в порядке; красный, когда нет.
 */
.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.block-head h3 {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.status-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.status-bad {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Кнопка «назад» — слева у заголовка, а не на другом конце экрана. */
.page-head.with-back {
  justify-content: flex-start;
  gap: 14px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/*
 * Код валюты пишется прописными. Раньше это стояло атрибутом style прямо
 * в разметке — и не работало: политика безопасности страницы запрещает
 * встроенные стили, браузер молча их отбрасывал.
 */
.upper {
  text-transform: uppercase;
}

/* ------------------------------------------- значок вердикта проверки */

/*
 * Вместо слова «ok» — галочка. Рисунок у каждого вердикта свой, поэтому
 * смысл держится не на цвете: на монохромном экране и в чёрно-белой печати
 * строка всё равно читается. Словесная расшифровка — в подсказке.
 */
.check-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.check-mark .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.1;
}

.check-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.check-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.check-bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.check-none {
  background: var(--surface-2);
  color: var(--muted);
}

/* Опасный блок карточки: единственное место, после которого нечего вернуть. */
.danger-block {
  border-color: var(--danger-soft);
}

.danger-block summary {
  cursor: pointer;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}

/* --------------------------------------------------- раздел «Сообщения» */

textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
  resize: vertical;
  min-height: 96px;
}

textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Разобранный список: владелец видит ровно то, что поняла система. */
.template-list {
  margin: 8px 0 0;
  padding-left: 22px;
  color: var(--muted);
  font-size: 13px;
}

.template-list li {
  padding: 2px 0;
}

.msg-accounts-table { min-width: 48rem; }
.msg-log-table { min-width: 56rem; }
.msg-accounts-table .c-macc { width: 18ch; }
.msg-accounts-table .c-mgdelay { width: 12ch; }
.msg-accounts-table .c-mlead { width: 15ch; }
.msg-accounts-table .c-mact { width: 14ch; }
.msg-log-table .c-mwhen { width: 20ch; }
.msg-log-table .c-mkind { width: 14ch; }
.msg-log-table .c-macc2 { width: 16ch; }
.msg-log-table .c-mstate { width: 18ch; }

@media (max-width: 1200px) {
  .msg-accounts-table { min-width: 36rem; }
  .msg-log-table { min-width: 42rem; }
}

@media (max-width: 900px) {
  .msg-accounts-table { min-width: 28rem; }
  .msg-log-table { min-width: 32rem; }
}

/* Шаблоны объявления. */
.tpl-table { min-width: 44rem; }
.tpl-table .c-tname { width: 22ch; }
.tpl-table .c-tcur { width: 9ch; }
.tpl-table .c-tprice { width: 12ch; }
.tpl-table .c-tqty { width: 12ch; }
.tpl-table .c-tlimits { width: 16ch; }
.tpl-table .c-tact { width: 24ch; }

@media (max-width: 1200px) { .tpl-table { min-width: 34rem; } }
@media (max-width: 900px) { .tpl-table { min-width: 26rem; } }

/* Колонка чата в очереди ордеров. */
.orders-table .c-chat { width: 14ch; }
