/* Stock list and article detail. Uses the colour tokens from site.css. */
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.list-head > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.count { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.count.total { color: var(--fg); font-size: 20px; font-weight: 600; }
.back { align-self: flex-start; font-size: 14px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.filters select, .filters input[type="search"] {
  padding: 9px 12px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); font: inherit; min-width: 0;
}
.filters select { flex: 0 1 220px; }
.filters input[type="search"] { flex: 1 1 220px; }
.filters select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Wide tables scroll inside their own box; the page itself never scrolls sideways. */
.table-wrap { overflow-x: auto; margin: 0 -8px; }
table.stock { border-collapse: collapse; width: 100%; font-size: 15px; }
table.stock th, table.stock td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.stock th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }
table.stock td.num, table.stock th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.stock tbody tr:hover { background: var(--bg); }
table.stock td.expired { color: var(--danger, #b3261e); font-weight: 600; }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-size: 14px; }
.empty { color: var(--muted); padding: 24px 0; text-align: center; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--warn-bg); color: var(--warn-fg); white-space: nowrap; }

@media (prefers-color-scheme: dark) {
  table.stock td.expired { color: #ff8a80; }
}
