/* ============================================================================
   Jollibee Rewards — Operator Console · Layout layer
   The ONLY net-new CSS. tokens.css and components.css are reused verbatim from
   the member app, so the console reads as the same product; this file replaces
   the member prototype's mobile prototype.css with a desktop console shell.

   PRD-0007: "an internal console, so brand matters less than density and
   scannability." Brand chrome stays; the type scale tightens and the tables get
   dense. Tokens only for color — no raw hex outside js/dev-toolbar.js.
   ========================================================================== */

/* ---- Shell ----------------------------------------------------------------- */
html, body { height: 100%; }
body.oc-body { background: var(--c-canvas); overflow: hidden; }

.oc {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 0;
  grid-template-rows: 56px minmax(0, 1fr);
  grid-template-areas: 'brand top top' 'rail main dock';
  height: 100vh;
  transition: grid-template-columns .18s ease;
}
.oc.dock-open { grid-template-columns: 232px minmax(0, 1fr) 384px; }
.oc.rail-collapsed { grid-template-columns: 64px minmax(0, 1fr) 0; }
.oc.rail-collapsed.dock-open { grid-template-columns: 64px minmax(0, 1fr) 384px; }

/* ---- Brand block + top bar ------------------------------------------------- */
.oc__brand {
  grid-area: brand; display: flex; align-items: center; gap: var(--space-8);
  padding: 0 var(--space-12) 0 var(--space-16);
  background: var(--c-gradient-brand); color: #fff; overflow: hidden;
}
.oc__brand-name { font-family: var(--font-brand); font-size: 16.5px; line-height: 1.1; white-space: nowrap; }
.oc__brand-sub { font-family: var(--font-display); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.oc.rail-collapsed .oc__brand-text { display: none; }

.oc__top {
  grid-area: top; display: flex; align-items: center; gap: var(--space-12);
  padding: 0 var(--space-16); background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
}
.oc__crumb { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.oc__crumb-sub { color: var(--c-muted); font-size: 12px; font-family: var(--font-text); font-weight: 400; margin-left: var(--space-8); }
.oc__top-spacer { flex: 1 1 auto; }

/* ---- Rail ------------------------------------------------------------------ */
.oc__rail {
  grid-area: rail; background: var(--c-surface); border-right: 1px solid var(--c-border);
  padding: var(--space-8) var(--space-8) var(--space-16);
  overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-2);
}
.oc__rail-group {
  font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--c-text-subtle);
  padding: var(--space-12) var(--space-8) var(--space-4);
}
/* Collapsed, a group label has nowhere to go: 64px of rail leaves ~40px of usable
   width, and "PROGRAMME" clipped to "PROGRAMM" even at 9px. The grouping still has
   to read, so the label becomes a rule — the boundary survives and the broken word
   does not. The text stays in the DOM, so a screen reader still announces it. */
.oc.rail-collapsed .oc__rail-group {
  font-size: 0; line-height: 0; padding: 0;
  margin: var(--space-10) var(--space-8) var(--space-8);
  border-top: 1px solid var(--c-border);
}
.oc.rail-collapsed .oc__rail-group:first-child { border-top: none; margin-top: var(--space-4); }
.oc__nav {
  display: flex; align-items: center; gap: var(--space-8); width: 100%;
  padding: var(--space-8) var(--space-8); border: 1px solid transparent;
  border-radius: var(--radius-md); background: transparent; cursor: pointer;
  font-family: var(--font-display); font-size: 14.5px; color: var(--c-text-2); text-align: left;
}
.oc__nav:hover { background: var(--c-surface-hover); color: var(--c-text); }
.oc__nav:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.oc__nav.is-active { background: var(--c-accent-faint); color: var(--c-accent-strong); border-color: var(--c-accent); font-weight: 600; }
.oc__nav .ficon { flex: 0 0 auto; }
.oc__nav-label { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc__nav-count {
  font-family: var(--font-mono); font-size: 10.5px; padding: 1px var(--space-6);
  border-radius: var(--radius-full); background: var(--c-warning-bg); color: var(--c-warning-text);
  border: 1px solid var(--c-warning-border);
}
.oc.rail-collapsed .oc__nav-label, .oc.rail-collapsed .oc__nav-count { display: none; }
.oc.rail-collapsed .oc__nav { justify-content: center; }

/* ---- Main ------------------------------------------------------------------ */
.oc__main { grid-area: main; overflow-y: auto; padding: var(--space-24); min-width: 0; }
/* No width cap on the view. 1120px was a reading width, and it was wrong for what
   this console mostly is: dense tables that are scanned across, not read down. It
   left roughly 300px of dead canvas to the right of every table with the dock
   closed, and `view--wide` was a per-page exception that only pushed the same
   problem out to 1600px.

   Width is the grid's job — `.oc` already gives main `minmax(0, 1fr)`, so a view
   takes what the rail and the dock are not using and reflows when either moves.
   What still caps is what genuinely reads rather than scans: prose (`.view__sub`,
   `.help--sec`) and the settings list, which is a form and keeps its documented
   900px so its value column cannot stretch. */
.view { display: none; }
.view.is-active { display: block; animation: oc-fade .16s ease both; }
@keyframes oc-fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view.is-active { animation: none; } }

.view__head { margin-bottom: var(--space-16); }
.view__title { font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.2; }
.view__sub { color: var(--c-text-2); font-size: 15px; margin-top: var(--space-4); max-width: 78ch; }
.view__story {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--c-text-subtle);
  border: 1px solid var(--c-border); border-radius: var(--radius-full);
  padding: 1px var(--space-8); display: inline-block; margin-left: var(--space-8); vertical-align: 2px;
}

.sec { margin-bottom: var(--space-24); }
.sec__head { display: flex; align-items: baseline; gap: var(--space-8); margin-bottom: var(--space-6); flex-wrap: wrap; }
.sec__title { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.sec__note { color: var(--c-text-subtle); font-size: 13px; font-family: var(--font-mono); }

/* ---- Dense table ---------------------------------------------------------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
/* Many-column tables SCROLL inside .tbl-wrap rather than compressing every column
   to unreadable width — which is what happens with the dock open. */
table.tbl--wide { min-width: 960px; }
.tbl th {
  text-align: left; font-family: var(--font-display); font-size: 11.5px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--c-text-subtle);
  padding: var(--space-8) var(--space-12); border-bottom: 1px solid var(--c-border); white-space: nowrap;
  background: var(--c-surface-inset);
}
.tbl td { padding: var(--space-8) var(--space-12); border-bottom: 1px solid var(--c-border); vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--c-surface-hover); }
.tbl .num { font-family: var(--font-mono); font-size: 13.5px; text-align: right; white-space: nowrap; }
.tbl .mono { font-family: var(--font-mono); font-size: 13.5px; }
.tbl .tight { white-space: nowrap; }
.tbl .actions { text-align: right; white-space: nowrap; }
.tbl-note { font-size: 13px; color: var(--c-muted); margin-top: var(--space-8); }

/* Settlement is ONE table behind tabs. It was six, one per thing-to-do, and each
   sized its own columns from its own rows — so Charge sat somewhere different in
   every section and the only reason to use a table, scanning a column down the
   page, was gone. Fixed layout keeps the grid stable as the tab changes. */
table.tbl--settle { table-layout: fixed; min-width: 1100px; }
.tbl--settle th:nth-child(1), .tbl--settle td:nth-child(1) { width: 24%; }
.tbl--settle th:nth-child(2), .tbl--settle td:nth-child(2) { width: 15%; }
/* Payable and receivable hold one short figure each, and only ever one of the two.
   Sized for the arithmetic they used to carry, they left a gulf between the number
   and its neighbour — so they are sized for the figure now that the arithmetic is a
   hover away. They stay adjacent: the pair is what tells you the direction. */
.tbl--settle th:nth-child(3), .tbl--settle td:nth-child(3) { width: 11%; }
.tbl--settle th:nth-child(4), .tbl--settle td:nth-child(4) { width: 11%; }
.tbl--settle th:nth-child(5), .tbl--settle td:nth-child(5) { width: 10%; }
/* Wide enough for a payment reference on one line — broken across two it stops
   looking like a reference and starts looking like a wrapping accident. */
.tbl--settle th:nth-child(6), .tbl--settle td:nth-child(6) { width: 14%; }
/* Wide enough for the whole action set. A primary action clipped on first paint is
   a primary action an operator does not know is there — which is why the line list
   moved onto the row's own label rather than competing for this width. */
.tbl--settle th:nth-child(7), .tbl--settle td:nth-child(7) { width: 15%; }
/* The store and its day are one label. Wrapping between them reads as two rows. */
.tbl--settle td:nth-child(1) .msg__link { white-space: nowrap; font-size: 14.5px; }
/* A payment reference is one token. It gets its own line under the date, at a size
   that fits the column — never broken mid-token. */
.tbl--settle td:nth-child(6) .mono { display: block; font-size: 12px; letter-spacing: -0.2px; }

/* A figure whose arithmetic is one hover away says so. Dotted, not underlined —
   an underline in a table cell reads as a link. */
.hasdetail { border-bottom: 1px dotted var(--c-border-strong); cursor: help; }
.hasdetail:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 2px; }

/* ---- Dialog ---------------------------------------------------------------
   Asking for a value used to be window.prompt(): unstylable browser chrome that
   rendered an enum's options as a run-on line and a multi-select as comma-separated
   typing. This is a real <dialog>, so focus trapping, Escape and the backdrop come
   from the platform. It collects the value; the proposal card still applies it. */
.dlg {
  border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  background: var(--c-surface); color: var(--c-text);
  padding: 0; width: min(440px, calc(100vw - 32px));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}
.dlg::backdrop { background: rgba(0, 0, 0, 0.42); backdrop-filter: blur(2px); }
.dlg form { padding: var(--space-24); display: flex; flex-direction: column; gap: var(--space-12); }
.dlg__head { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.25; }
.dlg__help { color: var(--c-text-2); font-size: 13.5px; line-height: 1.5; margin-top: calc(var(--space-8) * -1); }

.dlg__field { display: flex; align-items: center; gap: var(--space-8); }
.dlg__field input {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--font-mono); font-size: 15px;
  padding: var(--space-8) var(--space-12);
  border: 1px solid var(--c-border-strong); border-radius: var(--radius-md);
  background: var(--c-surface-inset); color: var(--c-text);
}
.dlg__field input:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.dlg__unit { font-size: 13.5px; color: var(--c-muted); white-space: nowrap; }

.dlg__opts { display: flex; flex-direction: column; gap: var(--space-6); max-height: 46vh; overflow-y: auto; }
.dlg__opt {
  display: flex; align-items: center; gap: var(--space-12);
  padding: var(--space-8) var(--space-12); cursor: pointer;
  border: 1px solid var(--c-border); border-radius: var(--radius-md);
  font-size: 14.5px;
}
.dlg__opt:hover { border-color: var(--c-border-strong); background: var(--c-surface-hover); }
.dlg__opt.is-on { border-color: var(--c-accent); background: var(--c-accent-faint); }
.dlg__opt input { accent-color: var(--c-accent-solid); flex: 0 0 auto; }

/* The permitted range is reference detail — present, but never louder than the value. */
.dlg__range { font-size: 12.5px; color: var(--c-muted); font-family: var(--font-mono); }
.dlg__err {
  font-size: 13px; color: var(--c-error-text);
  background: var(--c-error-bg); border: 1px solid var(--c-error-border);
  border-radius: var(--radius-md); padding: var(--space-8) var(--space-12);
}
.dlg__acts { display: flex; justify-content: flex-end; gap: var(--space-8); margin-top: var(--space-4); }

/* The tooltip layer. Fixed to the viewport and parented to <body>, because every
   table it serves sits inside a scroll container that would clip it. */
.tip {
  position: fixed; z-index: 80; max-width: 360px;
  background: var(--c-text); color: var(--c-surface);
  font-family: var(--font-text); font-size: 13px; line-height: 1.5;
  padding: var(--space-8) var(--space-12); border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.20);
  pointer-events: none; opacity: 0; transition: opacity .12s ease;
}
.tip.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .tip { transition: none; } }

/* A tab's count sits with its label. Same numeral treatment as the rail. */
.tab-count {
  margin-left: var(--space-6); font-family: var(--font-mono); font-size: 12.5px;
  color: var(--c-muted); background: var(--c-subtle); border-radius: var(--radius-sm);
  padding: 1px 6px;
}
.fds-tab.is-active .tab-count { color: var(--c-text); background: var(--c-surface); }

/* A dialog that collects several fields. One label above its own field, because a
   300px label column is a settings-form idea and a dialog is not that wide. */
.dlg--form form { min-width: 340px; }
.dlg__row { margin-top: var(--space-12); }
.dlg__label {
  display: block; font-family: var(--font-display); font-size: 13.5px; font-weight: 600;
  color: var(--c-text); margin-bottom: var(--space-4);
}
.dlg__row .dlg__field { margin: 0; }
.dlg__row select, .dlg__row input { width: 100%; }
.dlg__help--row { margin: var(--space-4) 0 0; font-size: 12.5px; }

/* An expanded reward: its stock, its batches, and its codes, side by side under
   the row they belong to. Two columns while there is room, stacked when there is not. */
.tbl tr.expand > td { background: var(--c-subtle); padding: var(--space-16); }
.tiles--tight { margin-bottom: var(--space-16); }
.expand__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--space-24); }
@media (max-width: 1100px) { .expand__grid { grid-template-columns: minmax(0, 1fr); } }
.expand__h {
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  color: var(--c-text); margin-bottom: var(--space-2);
}
.expand__acts { margin-top: var(--space-16); }
.codes__find { display: flex; gap: var(--space-8); margin: var(--space-8) 0; max-width: 340px; }
/* A disabled code stays legible — it is still a record — but reads as struck from
   circulation rather than merely another row. */
.tbl tr.is-off td:first-child { text-decoration: line-through; color: var(--c-muted); }

/* Uploading a batch: the file is the control, the parsed summary is the feedback,
   and pasting is the exception behind a disclosure — a batch is hundreds of codes,
   and a textarea holding them would imply otherwise. */
.drop {
  display: flex; align-items: center; gap: var(--space-12);
  padding: var(--space-12); border: 1px dashed var(--c-border); border-radius: var(--radius-md);
  background: var(--c-subtle);
}
.drop__hint { font-size: 12.5px; color: var(--c-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parsed {
  margin-top: var(--space-8); padding: var(--space-8) var(--space-12);
  border-radius: var(--radius-md); background: var(--c-surface);
  border: 1px solid var(--c-border); font-size: 13.5px;
}
.parsed b { font-family: var(--font-mono); }
.parsed__skip { margin-top: var(--space-2); font-size: 12.5px; color: var(--c-text-2); }
.paste { margin-top: var(--space-8); }
.paste > summary { font-size: 12.5px; color: var(--c-text-2); cursor: pointer; }
.paste > summary:hover { color: var(--c-text); }
.dlg__codes {
  width: 100%; margin-top: var(--space-6);
  font-family: var(--font-mono); font-size: 13px; line-height: 1.6;
  padding: var(--space-8); border: 1px solid var(--c-border); border-radius: var(--radius-md);
  background: var(--c-surface); color: var(--c-text); resize: vertical;
}
.dlg__codes:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }

/* ---- Setting row (7.1.1 — range + shipped default at the point of setting) -- */
.set { display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(140px, 1fr) minmax(190px, 1.2fr) auto; gap: var(--space-12);
  padding: var(--space-12); border-bottom: 1px solid var(--c-border); align-items: start; }
.set:last-child { border-bottom: none; }
.set:hover { background: var(--c-surface-hover); }
.set__label { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: var(--space-4); }
.set__meta { color: var(--c-text-subtle); font-size: 11px; margin-top: 2px; font-family: var(--font-mono); }
.set__value { font-family: var(--font-mono); font-size: 14px; word-break: break-word; }
.set__value.is-unset { color: var(--c-warning-text); }
.set__spec { font-size: 11px; color: var(--c-muted); line-height: 1.45; }
.set__spec b { color: var(--c-text-2); font-weight: 600; }
/* Was a full-width tinted bar, which made a group of settings read as a list of
   warnings. Now a quiet line beneath the value it qualifies. */
.set__note { font-size: 12.5px; line-height: 1.5; color: var(--c-muted);
  margin-top: var(--space-4); display: flex; gap: var(--space-6); align-items: flex-start; }
.set__note .ficon { flex: 0 0 auto; margin-top: 2px; color: var(--c-icon); }
.set__act { text-align: right; }

/* ---- Status atoms (icon + words, never colour alone) ---------------------- */
.st { display: inline-flex; align-items: center; gap: var(--space-4); font-size: 12.5px; font-weight: 600;
  font-family: var(--font-display); white-space: nowrap; }
.st--ok    { color: var(--c-success-text); }
.st--warn  { color: var(--c-warning-text); }
.st--err   { color: var(--c-error-text); }
.st--info  { color: var(--c-info-text); }
.st--muted { color: var(--c-muted); }

/* ---- Metric tiles --------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--space-12); margin-bottom: var(--space-24); }
.tile { border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface); padding: var(--space-12) var(--space-16); }
.tile__label { font-family: var(--font-display); font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--c-text-subtle); }
.tile__value { font-family: var(--font-display); font-size: 30px; font-weight: 600; line-height: 1.1; margin-top: var(--space-4); }
.tile__value.is-unset { color: var(--c-warning-text); font-size: 21px; }
.tile__foot { font-size: 13px; color: var(--c-muted); margin-top: var(--space-6); }
.tile.is-clickable { cursor: pointer; }
.tile.is-clickable:hover { border-color: var(--c-accent); background: var(--c-accent-faint); }

/* ---- Watcher row (7.5.3 — recommend, never act) --------------------------- */
.watch { border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface);
  padding: var(--space-12); margin-bottom: var(--space-8); }
.watch__top { display: flex; align-items: baseline; gap: var(--space-8); flex-wrap: wrap; }
.watch__subject { font-weight: 600; font-size: 15px; }
.watch__rec { font-family: var(--font-display); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.watch__spacer { flex: 1 1 auto; }
.watch__evidence { display: flex; flex-wrap: wrap; gap: var(--space-6); margin-top: var(--space-8); }
.watch__caveat { font-size: 13px; color: var(--c-text-2); margin-top: var(--space-8);
  background: var(--c-warning-bg); border-left: 2px solid var(--c-warning);
  padding: var(--space-6) var(--space-8); border-radius: var(--radius-sm); }
.watch__acts { margin-top: var(--space-12); display: flex; gap: var(--space-8); }

/* Module signal chip — the evidence behind a recommendation */
.sig { display: inline-flex; align-items: center; gap: var(--space-6); font-size: 12.5px;
  border: 1px solid var(--c-border); border-radius: var(--radius-full); padding: 2px var(--space-8); }
.sig__bar { width: 44px; height: 4px; border-radius: var(--radius-full); background: var(--c-subtle); overflow: hidden; }
.sig__fill { display: block; height: 100%; background: var(--c-warning); }
.sig__fill.is-high { background: var(--c-error); }
.sig__n { font-family: var(--font-mono); font-size: 12px; color: var(--c-text-2); }

/* ---- The dock ------------------------------------------------------------- */
.oc__dock {
  grid-area: dock; background: var(--c-surface); border-left: 1px solid var(--c-border);
  display: flex; flex-direction: column; overflow: hidden;
}
.oc:not(.dock-open) .oc__dock { display: none; }
.dock__head { display: flex; align-items: center; gap: var(--space-8); padding: var(--space-12);
  border-bottom: 1px solid var(--c-border); }
.dock__title { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.dock__mode { font-family: var(--font-mono); font-size: 11px; padding: 1px var(--space-6);
  border-radius: var(--radius-full); border: 1px solid var(--c-border); color: var(--c-muted); }
.dock__mode.is-live { color: var(--c-success-text); border-color: var(--c-success-border); background: var(--c-success-bg); }
/* min-height:0 is load-bearing. In a column flex container a `flex:1 1 auto` child
   with taller content GROWS past its parent instead of scrolling; the dock's
   `overflow:hidden` then clipped it, which is why the bottom of a long thread —
   including a proposal card's Apply button — could not be reached. */
.dock__thread {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: var(--space-12); display: flex; flex-direction: column; gap: var(--space-12);
}
/* And the children must not shrink. The thread is a flex COLUMN, so by default its
   items shrink to fit the box rather than overflowing it — the cards were being
   crushed to ~5px each, `scrollHeight` equalled `clientHeight`, and so
   `overflow-y:auto` never engaged. `.prop` has `overflow:hidden`, which is why a
   squashed card showed a diff row cut in half instead of simply being scrolled to. */
.dock__thread > * { flex: 0 0 auto; }
.dock__foot { flex: 0 0 auto; border-top: 1px solid var(--c-border); padding: var(--space-12); }
.dock__composer { display: flex; gap: var(--space-8); align-items: flex-end; }
.dock__composer textarea {
  flex: 1 1 auto; resize: none; min-height: 40px; max-height: 120px;
  font-family: var(--font-text); font-size: 14.5px; color: var(--c-text);
  background: var(--c-surface-inset); border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-md); padding: var(--space-8);
}
.dock__composer textarea:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.dock__hint { font-size: 12px; color: var(--c-text-subtle); margin-top: var(--space-6); }

.msg { font-size: 14.5px; line-height: 1.55; }
.msg--you { align-self: flex-end; max-width: 90%; background: var(--c-accent-faint);
  border: 1px solid var(--c-accent); border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-lg);
  padding: var(--space-8) var(--space-12); }
.msg--say { color: var(--c-text-2); }
.msg--thinking { color: var(--c-muted); font-style: italic; }
.msg--refusal { border-left: 2px solid var(--c-error); background: var(--c-error-bg);
  padding: var(--space-8) var(--space-12); border-radius: var(--radius-sm); }
.msg--receipt { border-left: 2px solid var(--c-success); background: var(--c-success-bg);
  padding: var(--space-8) var(--space-12); border-radius: var(--radius-sm); font-size: 14px; }
.msg__link { background: none; border: none; padding: 0; cursor: pointer; color: var(--c-accent-strong);
  font: inherit; text-decoration: underline; }

/* ---- The proposal card (UX-0007 §5) --------------------------------------- */
.prop { border: 1px solid var(--c-border-strong); border-radius: var(--radius-lg); background: var(--c-surface-raised); overflow: hidden; }
.prop__head { padding: var(--space-8) var(--space-12); border-bottom: 1px solid var(--c-border);
  font-family: var(--font-display); font-weight: 600; font-size: 14px; background: var(--c-surface-inset); }
/* Generous: the thread scrolls properly now, so a nested scroller only needs to
   catch the genuinely long case (a bulk award over dozens of members). At 220px it
   was clipping a five-row band proposal mid-row. */
.prop__diffs { padding: var(--space-8) var(--space-12); display: flex; flex-direction: column; gap: var(--space-8);
  max-height: 50vh; overflow-y: auto; }
.prop__diff-label { font-size: 13.5px; font-weight: 600; }
.prop__diff-vals { font-family: var(--font-mono); font-size: 13.5px; margin-top: 3px; }
.prop__from { color: var(--c-muted); text-decoration: line-through; }
.prop__arrow { color: var(--c-text-subtle); margin: 0 var(--space-6); }
.prop__to { color: var(--c-accent-strong); font-weight: 700; }
.prop__effect { padding: var(--space-8) var(--space-12); font-size: 13px; line-height: 1.55;
  color: var(--c-text-2); background: var(--c-info-bg); border-top: 1px solid var(--c-border); }
.prop__effect.is-warn { background: var(--c-warning-bg); }
.prop__authority { padding: var(--space-8) var(--space-12); font-size: 13px; line-height: 1.55;
  color: var(--c-error-text); background: var(--c-error-bg); border-top: 1px solid var(--c-border); }
.prop__reason { padding: var(--space-8) var(--space-12); border-top: 1px solid var(--c-border); }
.prop__reason label { display: block; font-size: 10.5px; font-family: var(--font-display); font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: var(--c-text-subtle); margin-bottom: var(--space-6); font-size: 11.5px; }
.prop__reason input { width: 100%; font-family: var(--font-text); font-size: 14px; color: var(--c-text);
  background: var(--c-surface-inset); border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm); padding: var(--space-6) var(--space-8); }
.prop__reason input:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.prop__acts { padding: var(--space-12); border-top: 1px solid var(--c-border); display: flex; gap: var(--space-8); align-items: center; flex-wrap: wrap; }
.prop__alt { width: 100%; margin-top: var(--space-4); }
.prop.is-stale { opacity: .65; }

/* ---- Highlight-on-navigate (M2) ------------------------------------------- */
.hl { animation: oc-hl 2.1s ease both; }
@keyframes oc-hl {
  0%, 62%  { background: var(--c-brand-yellow-faint); box-shadow: inset 3px 0 0 var(--c-brand-yellow); }
  100%     { background: transparent; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hl { animation: none; outline: 2px solid var(--c-brand-yellow); outline-offset: -2px; }
}

/* ---- Bits ---------------------------------------------------------------- */
.empty { border: 1px dashed var(--c-border-strong); border-radius: var(--radius-lg);
  padding: var(--space-24); text-align: center; color: var(--c-muted); font-size: 14.5px; }
.banner { border-radius: var(--radius-md); padding: var(--space-12); font-size: 13.5px;
  line-height: 1.55; margin-bottom: var(--space-12); border: 1px solid var(--c-info-border);
  background: var(--c-info-bg); color: var(--c-text-2); }
.banner--warn { border-color: var(--c-warning-border); background: var(--c-warning-bg); }
.banner--absent { border-style: dashed; }
.role-pick { display: inline-flex; align-items: center; gap: var(--space-6); font-family: var(--font-display);
  font-size: 13.5px; background: var(--c-surface-inset); border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-full); padding: var(--space-4) var(--space-8); color: var(--c-text); cursor: pointer; }
.thumb { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; background: var(--c-subtle); display: block; }
.bar { height: 6px; border-radius: var(--radius-full); background: var(--c-subtle); overflow: hidden; min-width: 120px; }
.bar__fill { display: block; height: 100%; background: var(--c-success); }
.bar__fill.is-out { background: var(--c-warning); }
.fineprint { font-size: 13px; color: var(--c-muted); line-height: 1.55; }

/* ---- Narrow ------------------------------------------------------------- */
@media (max-width: 900px) {
  .oc, .oc.dock-open { grid-template-columns: 64px minmax(0, 1fr) 0; }
  .oc.dock-open .oc__dock {
    display: flex; position: fixed; inset: 56px 0 0 auto; width: min(384px, 100%); z-index: 40;
    box-shadow: -8px 0 24px rgba(0,0,0,.18);
  }
  .oc__brand-text { display: none; }
  .oc__rail .oc__nav-label, .oc__rail .oc__nav-count { display: none; }
  .oc__rail .oc__nav { justify-content: center; }
  .oc__main { padding: var(--space-16); }
  .set { grid-template-columns: 1fr; gap: var(--space-6); }
}


/* ============================================================================
   Added in the density pass — helper text, accordions, and multi-line records.
   Rationale: an operator needs a one-line explanation at the point of use, and
   a 27-row settings list plus a 7-column audit table cannot both be dense and
   readable. So: help text is short and inline, reference detail hides behind a
   disclosure, and long rows go multi-line instead of scrolling sideways.
   ========================================================================== */

/* ---- Helper text (for the operator, at the point of use) ------------------ */
.help { font-size: 13px; line-height: 1.5; color: var(--c-muted); }
.help--sec { margin: calc(var(--space-4) * -1) 0 var(--space-12); max-width: 84ch; }
.help--row { margin-top: var(--space-2); }

/* ---- Accordion ----------------------------------------------------------- */
details.acc {
  border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  background: var(--c-surface); margin-bottom: var(--space-12); overflow: hidden;
}
details.acc > summary {
  display: flex; align-items: baseline; gap: var(--space-8); cursor: pointer;
  padding: var(--space-12) var(--space-16); list-style: none;
  background: var(--c-surface-inset); border-bottom: 1px solid transparent;
}
details.acc[open] > summary { border-bottom-color: var(--c-border); }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary:hover { background: var(--c-surface-hover); }
details.acc > summary:focus-visible { outline: 2px solid var(--c-accent); outline-offset: -2px; }
.acc__title { font-family: var(--font-display); font-size: 15.5px; font-weight: 600; }
.acc__meta { font-size: 13px; color: var(--c-muted); }
.acc__spacer { flex: 1 1 auto; }
.acc__chev { color: var(--c-icon); transition: transform .15s ease; flex: 0 0 auto; }
details.acc[open] .acc__chev { transform: rotate(180deg); }
.acc__body { padding: var(--space-4) 0 0; }
.acc__body--pad { padding: var(--space-16); }
@media (prefers-reduced-motion: reduce) { .acc__chev { transition: none; } }

/* ---- Setting row, restructured -------------------------------------------
   Was four columns (label | value | spec | action), which forced the range and
   shipped default to compete with the value for width. Now: label + help on the
   left, value and action on the right, and the reference detail behind a
   per-row disclosure so it is available without being ambient. */
/* Two columns and an action, bounded. The label column is a FIXED width so every
   value in the list starts at the same x — the operator's real task is running an
   eye down the value column, and a right-aligned ragged edge defeats that. */
.set {
  display: grid; grid-template-columns: 300px minmax(0, 1fr) auto;
  gap: var(--space-6) var(--space-24);
  padding: var(--space-16); border-bottom: 1px solid var(--c-border); align-items: start;
}
.set__main { min-width: 0; grid-column: 1; grid-row: 1; }
/* Left-aligned, and in the text face by default: most values are chosen options
   ("Receipt scan · App / web order"), not code. Monospace is reserved for the ones
   that really are figures — see .set__value--num. */
.set__col { grid-column: 2; grid-row: 1; min-width: 0; }
.set__value {
  font-family: var(--font-text); font-size: 14.5px; font-weight: 600;
  line-height: 1.45; overflow-wrap: anywhere; text-align: left;
}
.set__value--num { font-family: var(--font-mono); font-weight: 500; }
.set__value .help { font-weight: 400; margin-top: 1px; }
.set__act { grid-column: 3; grid-row: 1; justify-self: end; }

/* Reference detail annotates the VALUE, so it sits under the value rather than
   spanning the row as a third horizontal band inside one row. No fill, no rule. */
.set__spec {
  display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-16);
  font-size: 12.5px; color: var(--c-text-subtle); margin-top: var(--space-4);
}
.set__spec b { color: var(--c-muted); font-weight: 600; font-family: var(--font-mono); font-size: 12px; }
/* Quiet by design: this sits on all 27 rows, so it must not read as 27 calls to
   action. An icon-sized affordance, discoverable but silent until wanted. */
.set__more {
  display: inline-flex; align-items: center; gap: var(--space-4);
  background: none; border: none; padding: 2px 0; margin-left: var(--space-6); cursor: pointer;
  font: inherit; font-size: 12.5px; color: var(--c-text-ghost);
}
.set__more:hover { color: var(--c-accent-strong); }
.set__more:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: var(--radius-sm); }
.set__more .ficon { width: 15px; height: 15px; }
/* A long free-text value cannot share a row with its label without squeezing
   both — so it drops to its own full-width line instead. */
/* Group blurb inside an accordion needs its own padding, not the section variant's
   negative top margin (which clipped it against the summary border). */
.acc__help { padding: var(--space-12) var(--space-16) 0; font-size: 13px; line-height: 1.5;
  color: var(--c-muted); max-width: 84ch; }

/* ---- Multi-line record row (audit, held scans) ---------------------------
   Replaces a many-column table for content whose cells are sentences rather
   than values. Wraps down instead of scrolling sideways. */
.recs { border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface); overflow: hidden; }
.rec { padding: var(--space-12) var(--space-16); border-bottom: 1px solid var(--c-border); }
.rec:last-child { border-bottom: none; }
.rec:hover { background: var(--c-surface-hover); }
.rec__top { display: flex; align-items: baseline; gap: var(--space-8); flex-wrap: wrap; }
.rec__title { font-weight: 600; font-size: 14.5px; }
.rec__mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--c-muted); }
.rec__spacer { flex: 1 1 auto; }
.rec__body { margin-top: var(--space-6); font-size: 13.5px; line-height: 1.55; color: var(--c-text-2); }
.rec__body b { color: var(--c-text); }
.rec__reason {
  margin-top: var(--space-6); font-size: 13px; line-height: 1.5; color: var(--c-text-2);
  border-left: 2px solid var(--c-border-strong); padding-left: var(--space-8);
}
.rec__acts { margin-top: var(--space-12); display: flex; gap: var(--space-8); flex-wrap: wrap; }
.rec__figs { display: flex; flex-wrap: wrap; gap: var(--space-16); margin-top: var(--space-8); }
.rec__fig { font-size: 13px; }
.rec__fig span { color: var(--c-muted); }
.rec__fig b { font-family: var(--font-mono); font-size: 13.5px; }

/* The settings list is a form, not a table — it gets a reading width of its own so
   the label and value columns never stretch apart on a wide window. */
.settings { max-width: 900px; }

/* ---- Filter bar ---------------------------------------------------------- */
.filters { display: flex; gap: var(--space-8); flex-wrap: wrap; align-items: center; margin-bottom: var(--space-12); }
.filters__label { font-size: 12.5px; color: var(--c-text-subtle); font-family: var(--font-display);
  letter-spacing: .06em; text-transform: uppercase; }

@media (max-width: 1180px) { .set { grid-template-columns: 230px minmax(0, 1fr) auto; gap: var(--space-6) var(--space-16); } }
@media (max-width: 820px) {
  /* Below this the three columns stop fitting, so the value drops under the label
     and the action stays on the label's line. */
  .set { grid-template-columns: minmax(0, 1fr) auto; }
  .set__col { grid-column: 1; grid-row: auto; margin-top: var(--space-4); }
  .set__act { grid-column: 2; grid-row: 1; }
}

/* Selected reconciliation cycle — the row whose lines are open below. */
.tbl tr.is-sel { background: var(--c-accent-faint); }
.tbl tr.is-sel td { border-bottom-color: var(--c-accent); }

/* ---- Observations ---------------------------------------------------------
   Replaced .sig, the 0-to-1 score chip the weighted-module model needed. A rule
   reads a plain count or multiple against a threshold, so there is no bar to
   draw — the number IS the observation, and it is read, not gauged. */
.obs {
  display: inline-flex; align-items: baseline; gap: var(--space-8);
  padding: var(--space-4) var(--space-10);
  margin: 0 var(--space-8) var(--space-8) 0;
  border: 1px solid var(--fds-border);
  border-radius: var(--radius-full, 999px);
  background: var(--fds-surface-2);
  font-size: var(--text-sm);
  max-width: 100%;
}
.obs__rule {
  font-weight: 600; color: var(--fds-text-2);
  white-space: nowrap;
}
.obs__rule::after { content: ""; }
.obs__text { color: var(--fds-text); }

/* In the held-scan card the observations stack rather than wrap inline — there
   are up to three and each is a sentence, so a row of pills wraps badly. */
.rec .watch__evidence .obs,
.watch__evidence .obs { display: inline-flex; }

/* ---- Configuration: two blocks, a table per category ----------------------
   The block heading carries the distinction the removed Category column used to
   repeat on every row. It needs to outrank .sec__title, which now labels a
   category rather than the whole list. */
.cfg__block { margin-bottom: var(--space-32, 32px); }
.cfg__block + .cfg__block { padding-top: var(--space-24); border-top: 1px solid var(--fds-border); }
.cfg__head {
  display: flex; align-items: baseline; gap: var(--space-8);
  margin-bottom: var(--space-4); flex-wrap: wrap;
}
.cfg__title {
  font-family: var(--font-display); font-size: 20px; font-weight: 600;
  line-height: 1.2; margin: 0;
}
/* A category heading sits under a block heading, so it steps down rather than
   competing with it. */
.cfg__block .sec__title { font-size: 14.5px; color: var(--c-text-2); }
.cfg__block .sec { margin-bottom: var(--space-20, 20px); }
