/* ── Tables ───────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th {
  background: var(--panel-2); color: var(--muted); font-family: var(--font-mono);
  font-weight: 500; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px;
}
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--panel-2); }
tbody tr:last-child td { border-bottom: none; }

/* Sortable column headers — a link inside the <th>, inheriting the header's
   uppercase mono style, with an arrow on the active column. */
th .sort-link {
  display: inline-flex; align-items: center; gap: 5px;
  color: inherit; text-decoration: none; cursor: pointer;
}
th .sort-link:hover { color: var(--text-strong); }
th .sort-link.is-active { color: var(--accent-2); }
th .sort-arrow { font-size: 9px; line-height: 1; }
th[aria-sort] { color: var(--accent-2); }
td .mono, .mono { font-family: var(--font-mono); }
.tracking { font-family: var(--font-mono); color: var(--signal-2); font-size: 12.5px; }
.feed .tracking { flex: none; padding-top: 1px; }

/* Compact list rows for dashboard feeds */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li {
  display: flex; gap: 16px; align-items: flex-start; padding: 12px 0;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.feed li:last-child { border-bottom: none; }
.feed .when {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-2);
  flex: none; min-width: 84px; padding-top: 2px;
}
/* Two-line body: name on top, route (from → to) beneath — keeps the subject
   from running into the locations. */
.feed .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.feed .who { font-weight: 500; }
.feed .route {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-2);
}
.feed .route .arrow { color: var(--muted-2); }
.feed .to { color: var(--accent-2); }
/* Status pill rendered as a link at the end of an active-movement row. */
.feed > li > .badge { flex: none; align-self: center; text-decoration: none; }

/* ── Attention panel (СЗЧ roster) ─────────────────────────────────────── */
.panel.attention {
  border-color: color-mix(in srgb, var(--danger) 22%, var(--border));
}
.eyebrow.danger { color: var(--danger); }

/* ── Two-line table cells ──────────────────────────────────────────────────
   A cell carrying a fact and the fact that qualifies it: login over ПІБ, role
   over subdivision. Every cell in this app is `white-space: nowrap`, so a wide
   table pays for each extra column in horizontal scroll — and the account list
   paid until its action column sat off-screen entirely. Stacking the pairs that
   are read together buys the columns back without dropping anything. */
.cell-stack { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cell-primary { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; }
/* Only the second line truncates. It is a flex item, so it is a block box and
   `text-overflow` applies to it — which it would not on `.cell-primary`, a flex
   container whose children are flex items. That is also why the cap below sits on
   `.cell-sub` and not on the stack: the login above it is the account's
   identifier, and half of one identifies nobody. */
.cell-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
