/* THE ADMIN CONSOLE'S SHARED COMPONENTS (design reconcile wave 2: DS-A01..A07, A09, A10, A12, A13).
   One sheet, loaded by admin.html after alt-components.css. Every value is a token from alt-tokens.css; the chart series and notice
   families are the aliases --a-chart-* and --a-notice-* (alt-tokens.css). Panes emit these classes and add no sizing of their own.
   Layout is the host's (grid columns, widths); type, ground, edge and state are here. */

/* ---------- 1. THE DATA TABLE, `.a-table` (DS-A01) ----------
   Header cell = the eyebrow (DS-10); body cell 13px/400 on 1.45 (DS-47) in a row of about 32px. `.a-table-wrap` is the scrolling host:
   a wide table scrolls inside it and the head sticks to it. `.raised` is a table that sits on a raised ground (hover lifts to float). */
.a-table-wrap{ min-width:0; max-width:100%; overflow:auto; }
.a-table{
  --a-tbl-bg:var(--a-panel); --a-tbl-hover:var(--a-raised);
  width:100%; border-collapse:separate; border-spacing:0; text-align:left;
}
.a-table.raised{ --a-tbl-bg:var(--a-raised); --a-tbl-hover:var(--a-float); }
.a-table th{
  position:sticky; top:0; z-index:1; padding:6px 12px; background:var(--a-tbl-bg); border-bottom:1px solid var(--a-line);
  font-family:var(--a-body); font-size:var(--a-fs-11); font-weight:700; line-height:var(--a-lh-tight);
  letter-spacing:.08em; text-transform:uppercase; text-align:left; white-space:nowrap; color:var(--a-dim);
}
.a-table td{
  padding:7px 12px; border-bottom:1px solid var(--a-line-soft); vertical-align:middle;
  font-family:var(--a-body); font-size:var(--a-fs-13); font-weight:400; line-height:var(--a-lh-ui); color:var(--a-text);
}
.a-table tbody tr:last-child > td{ border-bottom:0; }
/* A figure is right-aligned in the body face with tabular figures (DS-53); `.act` is the trailing action cell, as wide as its buttons. */
.a-table th.num,
.a-table td.num{ text-align:right; font-variant-numeric:tabular-nums; }
.a-table td.dim{ color:var(--a-dim); }
.a-table td.act{ width:1%; text-align:right; white-space:nowrap; }
.a-table td.nowrap{ white-space:nowrap; }
.a-table td.trunc{ max-width:24ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* A clickable row lifts on hover and takes the blue edge and wash when selected (DS-51); it is a keyboard stop, so it draws the ring inset. */
.a-table tbody tr.is-click{ cursor:pointer; }
.a-table tbody tr.is-click:hover > td{ background:var(--a-tbl-hover); }
.a-table tbody tr:focus-visible{ outline:var(--a-focus); outline-offset:var(--a-focus-inset); }
.a-table tbody tr.on > td,
.a-table tbody tr[aria-selected="true"] > td{ background:var(--a-blue-soft); }
.a-table tbody tr.on > td:first-child,
.a-table tbody tr[aria-selected="true"] > td:first-child{ box-shadow:inset 2px 0 0 var(--a-blue); }
/* The empty state is one spanning cell, so a table with no rows still reads as a table with a sentence in it. */
.a-table td.a-table-empty{ padding:var(--a-sp-16) 12px; text-align:center; font-size:var(--a-fs-12); color:var(--a-faint); }

/* ---------- 2. THE FIGURE TILE, `.a-stat` (DS-A02) ----------
   The base tile is in alt-components.css (figure `b`, label `span`). Here: the optional parts and the two kinds of tile. Markup order:
   `.a-stat-scope`, `b`, `span`, `.a-stat-sub`; the glyph may sit anywhere. A pressable tile is a `<button>`; a cardinality is a `<div>`. */
.a-stat{ position:relative; }
.a-stat > .a-stat-sub{
  font-size:var(--a-fs-12); font-weight:400; line-height:var(--a-lh-ui); color:var(--a-faint);
}
.a-stat.on > .a-stat-sub,
.a-stat[aria-pressed="true"] > .a-stat-sub{ color:var(--a-dim); }
.a-stat > .a-stat-scope{
  font-size:var(--a-fs-11); font-weight:700; line-height:var(--a-lh-tight); letter-spacing:.08em; text-transform:uppercase; color:var(--a-dim);
}
.a-stat > .a-stat-glyph{ position:absolute; top:8px; right:12px; display:inline-flex; width:var(--a-glyph); height:var(--a-glyph); color:var(--a-dim); }
.a-stat > .a-stat-glyph svg{ width:100%; height:100%; display:block; }
.a-stat:has(> .a-stat-glyph){ padding-right:calc(12px + var(--a-glyph) + var(--a-sp-8)); }
.a-stat > .a-stat-sub:empty,
.a-stat > .a-stat-scope:empty{ display:none; }
.a-stat:not(button){ cursor:default; }
.a-stat:not(button):hover{ border-color:var(--a-line-soft); }

/* ---------- 3. THE SECTION NAVIGATION, `.a-side-nav` (DS-A04) ----------
   A column of destinations (one scrolls on its own), a strip below 1024. Item: 36px, 13px/600, radius 6, 15px glyph, the count as a count chip
   at the end, never shrunk (the column scrolls once the sections outgrow it). The current one is `aria-current="page"` (or `.on`): the blue edge and wash, never colour alone. Markup: `.a-side-nav-h` (a
   group heading, an eyebrow), `button.a-side-nav-item` > `svg.a-side-nav-glyph`, `.a-side-nav-lb`, `.a-count-chip.mute`. */
.a-side-nav{ display:flex; flex-direction:column; gap:var(--a-sp-2); min-width:0; min-height:0; overflow-y:auto; align-content:start; }
.a-side-nav-h{
  margin:0 0 var(--a-sp-4); padding:0 var(--a-sp-8);
  font-family:var(--a-body); font-size:var(--a-fs-11); font-weight:700; line-height:var(--a-lh-tight);
  letter-spacing:.08em; text-transform:uppercase; color:var(--a-dim);
}
.a-side-nav-h:not(:first-child){ margin-top:var(--a-sp-12); }
.a-side-nav-item{
  display:flex; flex:0 0 auto; align-items:center; gap:var(--a-sp-8); width:100%; min-width:0; height:var(--a-ctl-lg); padding:0 10px;
  border:1px solid transparent; border-radius:var(--a-r-sm); background:transparent; color:var(--a-dim); cursor:pointer; white-space:nowrap;
  font-family:var(--a-body); font-size:var(--a-fs-ctl); font-weight:var(--a-fw-ctl); line-height:var(--a-lh-ctl); text-align:left;
}
.a-side-nav-item:hover{ background:var(--a-raised); color:var(--a-text); }
.a-side-nav-item:focus-visible{ outline:var(--a-focus); outline-offset:var(--a-focus-inset); }
.a-side-nav-glyph{ flex:0 0 auto; width:var(--a-glyph); height:var(--a-glyph); }
.a-side-nav-lb{ flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.a-side-nav-item .a-count-chip{ flex:0 0 auto; margin-left:0; }
.a-side-nav-item .a-count-chip:empty{ display:none; }
.a-side-nav-item[aria-current="page"],
.a-side-nav-item.on{ background:var(--a-blue-soft); border-color:var(--a-blue); color:var(--a-blue-text); }
.a-side-nav-item[aria-current="page"] .a-count-chip.mute,
.a-side-nav-item.on .a-count-chip.mute{ border-color:var(--a-line); color:var(--a-text); }
@media (max-width:1023px){
  .a-side-nav{
    flex-direction:row; align-self:start; overflow-x:auto; overflow-y:hidden; gap:var(--a-sp-4); padding-bottom:var(--a-sp-4);
    border-bottom:1px solid var(--a-line-soft); scrollbar-width:none;
  }
  .a-side-nav::-webkit-scrollbar{ display:none; }
  .a-side-nav-h{ display:none; }
  .a-side-nav-item{ width:auto; flex:0 0 auto; }
  .a-side-nav-item .a-count-chip{ display:none; }
}
@media (pointer:coarse), (max-width:639px){
  .a-side-nav-item{ min-height:var(--a-touch); }
}

/* ---------- 4. THE NOTICE, `.a-notice` (DS-A05) ----------
   A note, verdict, warning or banner. 12px/400 on 1.45 (the hint text), an optional `.a-notice-title` in 12px/600, a 1px edge and a soft wash in the
   family colour. Families: `.info` (the default), `.caution`, `.danger`, `.good`. `role="status"` or `role="alert"` stays on the element. An
   empty notice is not drawn (a permanently visible empty box says something is wrong). */
.a-notice{
  --a-nt-edge:var(--a-notice-info-edge); --a-nt-wash:var(--a-notice-info-wash);
  display:block; margin:0; padding:8px 12px; border:1px solid var(--a-nt-edge); border-radius:var(--a-r-sm); background:var(--a-nt-wash);
  font-family:var(--a-body); font-size:var(--a-fs-12); font-weight:400; line-height:var(--a-lh-ui); color:var(--a-text);
  overflow-wrap:anywhere;
}
.a-notice.caution{ --a-nt-edge:var(--a-notice-caution-edge); --a-nt-wash:var(--a-notice-caution-wash); }
.a-notice.danger{ --a-nt-edge:var(--a-notice-danger-edge); --a-nt-wash:var(--a-notice-danger-wash); }
.a-notice.good{ --a-nt-edge:var(--a-notice-good-edge); --a-nt-wash:var(--a-notice-good-wash); }
.a-notice-title{ display:block; font-weight:600; }
.a-notice > p{ margin:0; }
.a-notice > * + *{ margin-top:var(--a-sp-4); }
.a-notice a{ color:var(--a-blue-text); }
.a-notice:empty,
.a-notice[hidden]{ display:none; }

/* ---------- 5. CODE, IDS AND MACHINE STRINGS, `.a-code` (DS-A06) ----------
   Inline (`code.a-code`) is a chip of mono; a block (`pre.a-code`, or `.a-code.block`) scrolls sideways rather than wrapping. An id a reader copies
   sits in `.a-code-row` with an sm ghost button `.a-code-copy` (`.copied` after the copy). Counts, sizes and dates are NOT code: body face, tabular. */
.a-code{
  font-family:var(--a-mono); font-size:var(--a-fs-12); font-weight:400; line-height:var(--a-lh-ui);
  padding:1px 5px; border-radius:var(--a-r-sm); background:var(--a-raised); color:var(--a-text); overflow-wrap:anywhere;
}
pre.a-code,
.a-code.block{
  display:block; margin:0; padding:8px 10px; background:var(--a-bg); line-height:var(--a-lh-body);
  overflow-x:auto; overflow-wrap:normal; white-space:pre; tab-size:2;
}
.a-code-row{ display:inline-flex; align-items:center; gap:var(--a-sp-4); min-width:0; max-width:100%; }
.a-code-row > .a-code{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.a-code-copy{ flex:0 0 auto; min-width:var(--a-ctl-sm); padding:0 var(--a-sp-4); }
.a-code-copy svg{ width:var(--a-glyph-sm); height:var(--a-glyph-sm); }
.a-code-copy.copied{ color:var(--a-green); }

/* ---------- 6. CHART TEXT, PARTS AND SERIES (DS-A07) ----------
   Three text roles. `.a-chart-axis`: axis, tick, key and legend text, 11px/400 `--a-dim`. `.a-chart-val`: a value label, 11px/600, tabular. A donut's
   centre figure is HTML (`.a-chart-centre`) laid over the SVG in the tile's style and is never SVG text in a scaled viewBox. A tooltip is the popover
   with 12px text. Series colours: `.a-chart-s1`..`s6` set `--a-series` (= `--a-chart-1`..`6`) that `.a-chart-fill`/`-stroke`/`-bg` and `.a-chart-sw` read. */
.a-chart-axis,
.a-chart-val{ font-family:var(--a-body); font-size:var(--a-fs-11); line-height:var(--a-lh-tight); fill:currentColor; }
.a-chart-axis{ font-weight:400; color:var(--a-dim); }
.a-chart-val{ font-weight:600; color:var(--a-text); font-variant-numeric:tabular-nums; }
.a-chart-grid{ stroke:var(--a-chart-grid); stroke-width:1; fill:none; }
.a-chart-s1{ --a-series:var(--a-chart-1); }
.a-chart-s2{ --a-series:var(--a-chart-2); }
.a-chart-s3{ --a-series:var(--a-chart-3); }
.a-chart-s4{ --a-series:var(--a-chart-4); }
.a-chart-s5{ --a-series:var(--a-chart-5); }
.a-chart-s6{ --a-series:var(--a-chart-6); }
.a-chart-fill{ fill:var(--a-series); }
.a-chart-stroke{ stroke:var(--a-series); fill:none; }
.a-chart-bg{ background:var(--a-series); }
.a-chart-wrap{ position:relative; display:inline-block; max-width:100%; }
.a-chart-wrap > svg{ display:block; max-width:100%; height:auto; }
.a-chart-centre{
  position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:var(--a-sp-2);
  text-align:center; pointer-events:none;
}
.a-chart-centre > b{ font-family:var(--a-display); font-size:var(--a-fs-21); font-weight:700; line-height:var(--a-lh-tight); font-variant-numeric:tabular-nums; color:var(--a-text); }
.a-chart-centre > span{ font-size:var(--a-fs-11); font-weight:600; line-height:var(--a-lh-tight); color:var(--a-dim); }
.a-chart-legend{ display:flex; flex-wrap:wrap; gap:var(--a-sp-4) var(--a-sp-12); margin:0; padding:0; list-style:none; }
.a-chart-key{ display:inline-flex; align-items:center; gap:var(--a-sp-6); min-width:0; font-size:var(--a-fs-11); font-weight:400; line-height:var(--a-lh-tight); color:var(--a-dim); }
.a-chart-sw{ flex:0 0 auto; width:var(--a-dot); height:var(--a-dot); border-radius:var(--a-r-sm); background:var(--a-series); }
.a-chart-tip{
  max-width:min(320px, 92vw); padding:12px; border:1px solid var(--a-line-strong); border-radius:var(--a-r); background:var(--a-float);
  box-shadow:var(--a-shadow); font-family:var(--a-body); font-size:var(--a-fs-12); font-weight:400; line-height:var(--a-lh-ui); color:var(--a-text);
}

/* ---------- 7. RADIOS AND RADIO CARDS (DS-A09) ----------
   A radio is the checkbox's twin (DS-30): native, 16px, blue accent, the one focus ring. `label.a-radio` is a radio with its label; `label.a-radio-card` is
   a card: radius 9, padding 12, a title (13px/600) and the hint under it, lifting on hover and blue-edged with a wash when selected. */
.alt-app input[type="radio"]{ width:var(--a-check); height:var(--a-check); margin:0; accent-color:var(--a-blue); }
.alt-app input[type="radio"]:focus-visible{ outline:var(--a-focus); outline-offset:var(--a-focus-offset); }
.a-radio{
  display:inline-flex; align-items:center; gap:var(--a-sp-8); cursor:pointer;
  font-family:var(--a-body); font-size:var(--a-fs-13); font-weight:400; line-height:var(--a-lh-ui); color:var(--a-text);
}
.a-radio > input{ flex:0 0 auto; }
.a-radio-cards{ display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:var(--a-sp-8); min-width:0; }
.a-radio-card{
  display:grid; grid-template-columns:auto minmax(0,1fr); align-items:start; column-gap:var(--a-sp-8); row-gap:var(--a-sp-2); min-width:0; cursor:pointer;
  padding:12px; border:1px solid var(--a-line); border-radius:var(--a-r); background:var(--a-panel);
}
.a-radio-card > input{ grid-row:1; grid-column:1; margin-top:var(--a-sp-2); }
.a-radio-card > .a-radio-card-t{ grid-column:2; font-size:var(--a-fs-13); font-weight:600; line-height:var(--a-lh-ui); color:var(--a-text); overflow-wrap:anywhere; }
.a-radio-card > .a-radio-card-h{ grid-column:2; font-size:var(--a-fs-12); font-weight:400; line-height:var(--a-lh-ui); color:var(--a-faint); overflow-wrap:anywhere; }
.a-radio-card:hover{ background:var(--a-raised); }
.a-radio-card:has(> input:checked),
.a-radio-card.on{ border-color:var(--a-blue); background:var(--a-blue-soft); }
.a-radio-card:has(> input:checked) > .a-radio-card-h,
.a-radio-card.on > .a-radio-card-h{ color:var(--a-dim); }
.a-radio-card:has(> input:disabled){ opacity:.55; cursor:not-allowed; }

/* ---------- 8. THE FILTER BAR, `.a-filter-bar` (DS-A10) ----------
   Every filter is a medium control (`.a-select`, `.a-input`, 32px); its name is its first option ("All teams") plus an `aria-label`, never a visible
   label. A search field takes the spare width; `.a-filter-end` pushes the actions to the end. The active filters show as chips in `.a-filter-chips`. */
.a-filter-bar{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--a-sp-8); min-width:0; }
.a-filter-bar > .a-select,
.a-filter-bar > .a-input{ flex:0 1 auto; max-width:100%; }
.a-filter-bar > .a-input[type="search"],
.a-filter-bar > .a-filter-grow{ flex:1 1 200px; min-width:160px; }
.a-filter-end{ display:flex; align-items:center; gap:var(--a-sp-8); margin-left:auto; }
.a-filter-chips{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--a-sp-6); margin-top:var(--a-sp-8); }
.a-filter-chips:empty{ display:none; }
@media (max-width:639px){
  .a-filter-bar > .a-select,
  .a-filter-bar > .a-input{ flex:1 1 140px; min-width:0; }
  .a-filter-end{ margin-left:0; width:100%; }
}

/* ---------- 9. SUB-VIEW SWITCHES (DS-A12) ----------
   A switch that REPLACES what a pane or drawer shows is the panel tab (`.a-tabs` > `.a-tab`); one between presentations of the SAME data is the
   segmented control (`.a-seg-ctl`). The two shared rules draw both; here is only the strip: it stays one row and scrolls inside itself on a
   narrow pane, and `.a-subview-bar` seats a tab strip with a trailing segmented control or filters. */
.a-subviews{ flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; min-width:0; max-width:100%; }
.a-subviews::-webkit-scrollbar{ display:none; }
.a-subviews > .a-tab{ flex:0 0 auto; white-space:nowrap; }
.a-subview-bar{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:var(--a-sp-8) var(--a-sp-12); min-width:0; }
.a-subview-bar > .a-tabs{ flex:1 1 auto; min-width:0; }

/* ---------- 10. A PANE'S HEADING (DS-A13) ----------
   The band heading of a pane is the overlay title (DS-14): display face, 16px/600. Sub-heads inside a band are `.a-eyebrow` (DS-15). */
.a-pane-title{
  margin:0; font-family:var(--a-display); font-size:var(--a-fs-16); font-weight:600; line-height:var(--a-lh-tight); color:var(--a-text);
}

/* ---------- 11. THE RECORD ROW, `.a-record` (DS-A03) ----------
   Every record (an account, team, board, delivery, log entry) is the list row of DS-06/07/08: radius 9, panel ground, a transparent 1px edge,
   padding 7px 10px 7px 8px, 4px between rows (`.a-records`), hover lift and blue selection (DS-51), and a 3px status edge when the record has
   a state: `.edge-good` (Active), `.edge-mute` (Inactive), `.edge-caution` (Held), `.edge-danger` (Failed), `.edge-info`. The name is `.a-record-t`
   (13px/600), the meta line `.a-record-m` (the hint), stacked in `.a-record-main`; `.a-record-end` holds chips and actions. The host sets
   `grid-template-columns` (the fixed-track rule); the default is main then end. */
.a-records{ display:grid; gap:var(--a-gap-row); margin:0; padding:0; list-style:none; min-width:0; }
.a-record{
  --a-rec-edge:transparent;
  position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; column-gap:var(--a-sp-12); min-width:0;
  padding:7px 10px 7px 8px; border:1px solid transparent; border-left:3px solid var(--a-rec-edge); border-radius:var(--a-r);
  background:var(--a-panel); color:var(--a-text); font-family:var(--a-body); text-align:left;
}
.a-record.is-click,
button.a-record{ cursor:pointer; }
.a-record.is-click:hover,
button.a-record:hover{ border-color:var(--a-line); border-left-color:var(--a-rec-edge); background:var(--a-raised); }
.a-record:focus-visible{ outline:var(--a-focus); outline-offset:var(--a-focus-offset); }
.a-record.on,
.a-record[aria-selected="true"],
.a-record[aria-current="true"]{ --a-rec-edge:var(--a-blue); border-color:var(--a-blue); background:var(--a-blue-soft); }
.a-record.edge-info{ --a-rec-edge:var(--a-blue); }
.a-record.edge-good{ --a-rec-edge:var(--a-green); }
.a-record.edge-caution{ --a-rec-edge:var(--a-amber); }
.a-record.edge-danger{ --a-rec-edge:var(--a-red); }
.a-record.edge-mute{ --a-rec-edge:var(--a-line-strong); }
.a-record-main{ display:flex; flex-direction:column; gap:var(--a-sp-2); min-width:0; }
.a-record-end{ display:flex; align-items:center; gap:var(--a-sp-8); min-width:0; }
.a-record-t{ min-width:0; font-size:var(--a-fs-13); font-weight:600; line-height:var(--a-lh-ui); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.a-record-m{ min-width:0; font-size:var(--a-fs-12); font-weight:400; line-height:var(--a-lh-ui); color:var(--a-faint); overflow-wrap:anywhere; }

/* ---------- motion: the micro response (reduced motion is answered at the token) ---------- */
.a-table tbody tr.is-click > td,
.a-side-nav-item,
.a-radio-card,
.a-record{
  transition:background-color var(--dur-micro) linear, border-color var(--dur-micro) linear, color var(--dur-micro) linear;
}
