/* dash-table.css · ONE dashboard (10/16): the businesses table (cards on phones), channels, top products, alerts, Core 13 (+ history lab, 10/17).
   Numbers are tabular; Seal Red marks only critical alerts and losses; nothing scrolls the page sideways at 360 px. */
.sort-pick { display: none; width: auto; min-height: 40px; margin-bottom: 4px; }
.grid-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.grid-table th, .grid-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.grid-table thead th { font-size: 0.74rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em;
  padding-top: 0; white-space: nowrap; }
.grid-table .num { text-align: right; white-space: nowrap; }
.grid-table thead th.c-rev30, .grid-table thead th.c-net30, .grid-table thead th.c-orders30 { text-align: right; }
.sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; min-height: 32px; gap: 2px; }
.sort:focus-visible { outline: 3px solid var(--foreground); outline-offset: 2px; border-radius: 4px; }
th[aria-sort] .sort { color: var(--foreground); }
.biz-link { text-decoration: none; display: inline-flex; flex-wrap: wrap; gap: 0 4px; min-height: 32px; align-items: center; }
.biz-link:hover strong { text-decoration: underline; }
.c-status { white-space: nowrap; } .c-more { width: 44px; text-align: right; }
.more { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--foreground);
  font: 600 1rem/1 var(--font); cursor: pointer; }
.more:hover { border-color: var(--foreground); }
tr.biz.open th, tr.biz.open td { border-bottom-color: transparent; }
.biz-detail td { padding: 0 8px 12px; }
.biz-more { background: var(--background); border-radius: var(--ma-radius-sm); padding: 12px; }
.biz-more .sub { margin-top: 0; }
.grid-table tfoot th, .grid-table tfoot td { font-weight: 650; border-bottom: 0; border-top: 1px solid var(--foreground); }
.mini { margin: 0 0 8px; padding-left: 1.2em; font-size: 0.85rem; }
.mini li { padding: 3px 0; } .mini-name { margin-right: 8px; } .mini-num { color: var(--muted); white-space: nowrap; }

.channels, .top, .alerts, .trials { list-style: none; margin: 0; padding: 0; }
.ch { padding: 8px 0; border-top: 1px solid var(--line); } .ch:first-child { border-top: 0; }
.ch-head, .top-main, .trial-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ch-name, .top-title, .trial-name { font-weight: 600; font-size: 0.9rem; min-width: 0; overflow-wrap: anywhere; }
.ch-num, .top-num, .trial-ret { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 0.9rem; }
.ch-sub, .top-sub, .trial-sub, .trial-run { font-size: 0.78rem; color: var(--muted); margin: 0; display: flex; flex-wrap: wrap;
  align-items: center; gap: 4px; }
.ch.quiet .ch-name { font-weight: 500; color: var(--muted); }
.ch .bar { margin: 6px 0 4px; }
.top-item { padding: 8px 0; border-top: 1px solid var(--line); } .top-item:first-child { border-top: 0; }
.top { counter-reset: top; } .top-title::before { counter-increment: top; content: counter(top) ". "; color: var(--muted); font-weight: 500; }

.alert { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.alert:first-child { border-top: 0; }
.alert-level { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding-top: 2px; }
.alert-critical .alert-level { color: var(--neg); } .alert-critical .alert-title { color: var(--neg); }
.alert-critical { box-shadow: inset 3px 0 0 var(--neg-fill); padding-left: 10px; }
.alert-warn .alert-level { color: var(--foreground); }
.alert-title { margin: 0; font-size: 0.88rem; font-weight: 600; } .alert-sub { margin: 0; font-size: 0.78rem; color: var(--muted); }

.c13-note { font-size: 0.8rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 6px; }
.c13-facts { font-size: 0.85rem; margin-bottom: 4px; }
.trial { padding: 8px 0; border-top: 1px solid var(--line); } .trial:first-child { border-top: 0; }
.trial-run.neg { color: var(--neg); }

/* Server-side portfolio (V0112): search, status and sort tools, the page, the pager. */
.pf-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pf-tools .pf-search { flex: 1 1 220px; width: auto; min-width: 0; }
.pf-tools .pf-status { flex: 0 1 auto; width: auto; max-width: 100%; }
.pf-tools .sort-pick { margin-bottom: 0; }
.pf-body { overflow-x: auto; }
.grid-table thead th.c-ai, .grid-table thead th.c-alerts { text-align: right; }
tr.biz.stale .c-status { color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.pager-text { font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pf-note { margin-top: 6px; }

@media (max-width: 719px) {
  .sort-pick { display: block; }
  .pf-tools .sort-pick { flex: 1 1 100%; width: 100%; }
  .pf-body { overflow-x: visible; }
  .grid-table.portfolio thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .grid-table.portfolio, .grid-table.portfolio tbody, .grid-table.portfolio tfoot { display: block; }
  .grid-table.portfolio tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; position: relative;
    padding: 10px 0; border-bottom: 1px solid var(--line); }
  .grid-table.portfolio th, .grid-table.portfolio td { border: 0; padding: 0; text-align: left; }
  .grid-table.portfolio .c-name { grid-column: 1 / -1; padding-right: 48px; }
  .grid-table.portfolio .c-more { position: absolute; top: 8px; right: 0; width: auto; }
  .grid-table.portfolio td:empty { display: none; }
  .grid-table.portfolio td[data-label]::before { content: attr(data-label); display: block; font-size: 0.68rem; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.05em; }
  .grid-table.portfolio td[data-label=""]::before { content: none; }
  .grid-table.portfolio .num { text-align: left; }
  .grid-table.portfolio tr.biz-detail { display: block; } .grid-table.portfolio tr.biz-detail td { display: block; padding: 0; }
  .grid-table.portfolio tfoot tr { border-top: 1px solid var(--foreground); border-bottom: 0; }
  .alert { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* Core 13 history lab (10/17): the paper-only label, recipes, era × size tables (scroll inside, never the page), learned. */
.c13h { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); min-width: 0; }
.c13h h3 { font-size: 0.95rem; margin: 0 0 6px; } .c13h h4 { font-size: 0.8rem; margin: 12px 0 4px; color: var(--muted); }
.c13h-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; border: 1px solid var(--foreground); border-radius: 4px;
  padding: 4px 8px; margin: 0 0 8px; display: inline-block; }
.c13h-verdict { font-size: 0.75rem; font-weight: 650; white-space: nowrap; } .c13h-verdict.ok { text-decoration: underline; }
.c13h-wrap { overflow-x: auto; max-width: 100%; margin-bottom: 8px; }
.c13h-grid { border-collapse: collapse; font-size: 0.78rem; font-variant-numeric: tabular-nums; min-width: 100%; }
.c13h-grid caption { text-align: left; font-size: 0.75rem; color: var(--muted); padding-bottom: 4px; }
.c13h-grid th, .c13h-grid td { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.c13h-grid thead th { font-weight: 600; color: var(--muted); white-space: nowrap; } .c13h-grid tbody th { font-weight: 500; min-width: 7em; }
.c13h-net { display: block; font-weight: 650; white-space: nowrap; } .c13h-mkt { display: block; color: var(--muted); white-space: nowrap; }
.c13h-learned { margin: 0; padding-left: 1.2em; font-size: 0.8rem; } .c13h-learned li { margin: 2px 0; overflow-wrap: anywhere; }
.c13h-note summary { font-size: 0.8rem; cursor: pointer; margin-top: 8px; }
.c13h-note pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.75rem; max-height: 320px; overflow-y: auto; }
