/* The staff workspace in the Codex look (admin rework U1, 2026-10).

   The owner's requirement was "match the Codex site": the marketing site's
   own tokens and type. These are the values from website/assets/site-ui.css
   (.ui-refresh) and the approved mock-ups in the admin rework review
   (mockups/assets/admin-mock.css): Public Sans for everything, navy #0a1f35,
   ink #17344b, blue #087bb5, line #dce5ec, surface #f5f8fb, white panels with
   12px corners and 8px buttons, tabular figures for money.

   Every rule is scoped to the admin view being on screen, so nothing here can
   change what a customer sees. Two scopes are used:
     .adm                                     the admin view itself
     body:has(#view-admin:not([hidden]))      body-level pieces while it is up
                                              (the portal header and footer,
                                              and the shared request drawer)

   The sections that predate the rework keep their own markup and classes.
   They pick up the palette and the typeface through the token overrides
   below, and U6 restyles them properly. */

body:has(#view-admin:not([hidden])) {
  --ui-navy: #0a1f35;
  --ui-ink: #17344b;
  --ui-muted: #526779;
  --ui-blue: #087bb5;
  --ui-blue-hover: #07628f;
  --ui-line: #dce5ec;
  --ui-field: #c8d5e0;
  --ui-surface: #f5f8fb;
  /* Status colours. Each pair passes WCAG AA for text on its tint. */
  --ok: #1d6b45; --ok-bg: #e5f3ea;
  --warn: #7a4f00; --warn-bg: #fcf0d6;
  --bad: #a3271c; --bad-bg: #fbe9e7;
  --info: #07628f; --info-bg: #e6f2f9;
  --quiet: #4a5d6e; --quiet-bg: #edf1f5;
  /* The portal's older tokens, pointed at the Codex values, so the sections
     that predate the rework stop drawing serif headings in the old palette. */
  --navy: #0a1f35;
  --navy-soft: #526779;
  --paper: #f5f8fb;
  --cyan: #087bb5;
  --cyan-deep: #07628f;
  --line: #dce5ec;
  --sans: 'Public Sans', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --serif: var(--sans);
  --radius: 8px;
  --shadow-1: 0 1px 3px rgba(10, 31, 53, .04);
  --shadow-2: 0 4px 18px rgba(10, 31, 53, .08);
  background: var(--ui-surface);
  color: var(--ui-ink);
  -webkit-font-smoothing: antialiased;
}
/* Proposal 4.1: no customer header, no "Client portal" badge, no customer
   footer on staff screens. The test-mode notice moves inside the admin view. */
body:has(#view-admin:not([hidden])) :is(.topbar, #test-banner, .portal-foot) { display: none; }
body:has(#view-admin:not([hidden])) .wrap { max-width: none; margin: 0; padding: 0; }

.adm { font-size: 15px; line-height: 1.5; }
.adm :focus-visible { outline: 3px solid var(--ui-blue); outline-offset: 2px; }
.adm :is(h1, h2, h3) { color: var(--ui-navy); }
.adm a { color: var(--ui-blue); }
.adm-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.adm-skip { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 10px 16px; border-radius: 8px;
  background: var(--ui-navy); color: #fff !important; font-weight: 600; text-decoration: none; }
.adm-skip:focus { top: 12px; }

/* ---- Buttons: the Codex 8px button --------------------------------- */
.adm .btn, body:has(#view-admin:not([hidden])) #drawer .btn {
  min-height: 42px; padding: 9px 18px; border-radius: 8px; font-weight: 600; letter-spacing: 0;
  box-shadow: none; transform: none;
}
.adm .btn:hover, body:has(#view-admin:not([hidden])) #drawer .btn:hover { transform: none; box-shadow: none; }
.adm .btn.primary, body:has(#view-admin:not([hidden])) #drawer .btn.primary { background: var(--ui-blue); border: 1px solid var(--ui-blue); color: #fff; }
.adm .btn.primary:hover, body:has(#view-admin:not([hidden])) #drawer .btn.primary:hover { background: var(--ui-blue-hover); border-color: var(--ui-blue-hover); }
.adm .btn.ghost, body:has(#view-admin:not([hidden])) #drawer .btn.ghost { background: #fff; border: 1px solid #bdcbd6; color: var(--ui-navy); }
.adm .btn.ghost:hover, body:has(#view-admin:not([hidden])) #drawer .btn.ghost:hover { background: #edf5fa; border-color: var(--ui-blue); }
.adm .btn.sm { min-height: 38px; padding: 7px 14px; font-size: .88rem; }

/* ---- Shell: sidebar beside the main column -------------------------- */
.adm-app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(90deg, #fff 0 235px, var(--ui-line) 235px 236px, transparent 236px); }
.adm-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  gap: 4px; padding: 20px 14px; background: #fff; }
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.adm-brand img { width: 150px; height: auto; }
.adm-brand-tag { font-size: .72rem; font-weight: 600; color: var(--ui-muted); border: 1px solid var(--ui-line);
  border-radius: 999px; padding: 2px 8px; }
.adm-side-actions { display: none; }

.adm-nav ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.adm-nav .adm-nav-more { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ui-line); }
.adm-nav a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 8px 12px; border-radius: 8px;
  color: var(--ui-ink); font-weight: 500; text-decoration: none; }
.adm-nav a:hover { background: var(--ui-surface); }
.adm-nav a[aria-current="page"] { background: var(--info-bg); color: var(--ui-blue-hover); font-weight: 600; }
.adm-nav svg, .adm-tabbar svg, .adm-icon svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }
.adm-nav svg { width: 20px; height: 20px; }
.adm-count { margin-left: auto; min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--ui-surface);
  color: var(--ui-ink); font-size: .78rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.adm-count.is-hot { background: var(--bad-bg); color: var(--bad); }

.adm-who { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--ui-line); font-size: .84rem;
  color: var(--ui-muted); display: grid; gap: 2px; }
.adm-who strong { color: var(--ui-ink); }
.adm-who span { overflow-wrap: anywhere; }
.adm-testnote { margin: 8px 0 0; padding: 6px 8px; border-radius: 6px; background: var(--warn-bg); color: var(--warn);
  font-size: .78rem; font-weight: 600; }
.adm-signout { margin-top: 10px; }
.adm-signout .btn { width: 100%; min-height: 38px; padding: 7px 14px; font-size: .88rem; }
.adm-scrim { display: none; }

.adm-main { min-width: 0; }

/* ---- Top bar ---------------------------------------------------------- */
.adm-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 32px;
  background: #fff; border-bottom: 1px solid var(--ui-line); }
/* Scoped to .adm-top so .adm-icon, declared below with display: grid, cannot
   win on source order and put the phone-only toggles on a desktop top bar. */
.adm-top-brand, .adm-top .adm-search-toggle, .adm-top .adm-more-toggle { display: none; }
.adm-spacer { flex: 1; }
/* A fixed basis rather than flex: 1, which split the free space with the
   spacer and left the field too narrow to show its own placeholder. */
.adm form.adm-search { display: block; flex: 0 1 480px; min-width: 200px; position: relative; margin: 0; }
.adm-search input { width: 100%; min-height: 42px; padding: 9px 14px 9px 40px; border: 1px solid var(--ui-field);
  border-radius: 8px; font: inherit; color: var(--ui-ink); background: #fff; }
.adm-search input::placeholder { color: #6b7f90; }
.adm-search > svg { position: absolute; left: 13px; top: 12px; width: 18px; height: 18px; fill: none;
  stroke: var(--ui-muted); stroke-width: 1.8; pointer-events: none; }
.adm-search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; padding: 6px;
  background: #fff; border: 1px solid var(--ui-line); border-radius: 12px; box-shadow: 0 12px 36px rgba(10, 31, 53, .12); }
.adm-search-results ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.adm-search-results button { display: grid; gap: 1px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0;
  border-radius: 8px; background: transparent; font: inherit; text-align: left; color: var(--ui-ink); cursor: pointer; }
.adm-search-results button:hover, .adm-search-results button:focus-visible { background: var(--ui-surface); }
.adm-search-results button span { color: var(--ui-muted); font-size: .82rem; }
.adm-search-results [data-search-all] { color: var(--ui-blue-hover); font-weight: 600; }
.adm-search-none { margin: 4px 12px 6px; color: var(--ui-muted); font-size: .84rem; }

.admin-utility { display: flex; align-items: center; gap: 10px; }
.admin-utility-status { margin: 0; color: var(--ui-muted); font-size: .8rem; white-space: nowrap; }
.adm-icon { position: relative; width: 42px; height: 42px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--ui-field); border-radius: 8px; background: #fff; color: var(--ui-ink); cursor: pointer; padding: 0; }
.adm-icon svg { width: 20px; height: 20px; }
.adm-icon.is-primary { background: var(--ui-blue); border-color: var(--ui-blue); color: #fff; }
.adm-bell b { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--bad); color: #fff; font-size: .72rem; display: grid; place-items: center; }

.adm-testbar { margin: 0; padding: 6px 32px; background: var(--warn-bg); color: var(--warn); font-size: .82rem;
  font-weight: 600; border-bottom: 1px solid #f0d9a4; }

/* ---- Business and Settings sub-navigation ----------------------------- */
.adm-subnav { padding: 18px 32px 0; }
.adm-subnav-title { margin: 0 0 6px; color: var(--ui-muted); font-size: .8rem; font-weight: 600; }
.adm-subnav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; overflow-x: auto;
  border-bottom: 1px solid var(--ui-line); scrollbar-width: thin; }
.adm-subnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; white-space: nowrap;
  color: var(--ui-ink); font-weight: 500; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.adm-subnav a:hover { color: var(--ui-blue-hover); }
.adm-subnav a[aria-current="page"] { color: var(--ui-blue-hover); font-weight: 600; border-bottom-color: var(--ui-blue); }
.adm-subnav a:focus-visible { outline-offset: -3px; }

/* ---- Page ------------------------------------------------------------- */
.adm-page { padding: 28px 32px 56px; max-width: 1304px; }
.adm-page:focus { outline: none; }
.adm .admin-section:focus { outline: none; }
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.adm-head h1 { margin: 0; font-size: 1.75rem; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.adm-head p { margin: 4px 0 0; color: var(--ui-muted); min-height: 1.5em; }
/* The sections that predate the rework keep their headers; only the type changes. */
.adm .admin-page-head h1 { font-weight: 600; letter-spacing: -.02em; }

.adm-panel { margin: 0 0 20px; background: #fff; border: 1px solid var(--ui-line); border-radius: 12px; }
.adm-panel:focus { outline: none; }
.adm-panel:focus-visible { outline: 3px solid var(--ui-blue); outline-offset: 2px; }
.adm-panel > header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--ui-line); }
.adm-panel > header h2 { margin: 0; font-size: 1.02rem; font-weight: 600; letter-spacing: -.01em; }
.adm-panel > header a { margin-left: auto; font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.adm-panel > header a:hover { text-decoration: underline; }
.adm-panel-meta { margin-left: auto; color: var(--ui-muted); font-size: .84rem; }
.adm-panel-meta:empty { display: none; }
.adm-panel-meta + a { margin-left: 12px; }
.adm-panel-meta.is-refreshing { color: var(--info); font-weight: 600; }
.adm-panel-meta.is-refreshing::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px;
  border-radius: 50%; background: currentColor; animation: adm-pulse 1s ease-in-out infinite alternate; }
@keyframes adm-pulse { from { opacity: .35; } to { opacity: 1; } }
.adm-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.adm-grid-2 > .adm-panel { margin: 0; }

/* States (proposal 4.6) */
.adm-callout { margin: 14px 20px; padding: 12px 14px; border-radius: 8px; background: var(--ui-surface);
  border: 1px solid var(--ui-line); font-size: .9rem; }
.adm-callout.bad { background: var(--bad-bg); border-color: #efc2bd; color: #7d1d14; }
.adm-callout.adm-update-needed { margin: 0 0 20px; background: #fff; border-left: 4px solid var(--ui-blue); }
.adm-kpis-wrap .adm-callout.bad { margin: 0 0 20px; }
.adm-retry { margin-left: 4px; padding: 0; border: 0; background: none; font: inherit; font-weight: 600;
  color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 24px; }
.adm-stale { opacity: .62; }
.adm-notallowed { margin: 0; padding: 16px 20px; color: var(--ui-muted); }
.adm-kpis-wrap .adm-notallowed { margin: 0 0 20px; padding: 14px 18px; background: #fff; border: 1px solid var(--ui-line); border-radius: 12px; }
.adm-empty-line { margin: 0; padding: 16px 20px; color: var(--ui-muted); }
.adm-footnote { margin: 0; padding: 10px 20px 14px; color: var(--ui-muted); font-size: .82rem; border-top: 1px solid var(--ui-line); }
.adm-skel { display: block; height: 14px; border-radius: 6px; background: #e8eef3; }
.adm-skel.tall { height: 64px; margin-top: 12px; border-radius: 8px; }
.adm-skel-rows { display: grid; gap: 0; }
.adm-skel-rows > div { display: grid; grid-template-columns: 70px minmax(0, 1fr) 90px; gap: 14px; padding: 16px 20px;
  border-top: 1px solid var(--ui-line); }
.adm-skel-rows > div:first-child { border-top: 0; }
.adm-kpi .adm-skel + .adm-skel { margin-top: 10px; }
.adm-kpi .adm-skel:nth-child(2) { height: 26px; width: 60%; }

/* Needs you: quiet when empty, specific when not. */
.adm-attn { list-style: none; margin: 0; padding: 0; }
.adm-attn li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 20px; border-top: 1px solid var(--ui-line); }
.adm-attn li:first-child { border-top: 0; }
.adm-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); }
.adm-dot.bad { background: var(--bad); }
.adm-dot.info { background: var(--ui-blue); }
.adm-attn strong { display: block; color: var(--ui-ink); font-weight: 600; }
.adm-attn span { color: var(--ui-muted); font-size: .88rem; }

/* Money figures */
.adm-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.adm-kpi { display: block; padding: 16px 18px; background: #fff; border: 1px solid var(--ui-line); border-radius: 12px;
  color: inherit; text-decoration: none; }
.adm a.adm-kpi { color: inherit; }
a.adm-kpi:hover { border-color: var(--ui-blue); }
/* A figure that is not served yet (the next payout, until a server read exists): said in words,
   at a size that does not read as a number. */
.adm-kpi.is-later strong { color: var(--ui-muted); font-size: 1.15rem; line-height: 1.9; }
.adm-kpi span { display: block; color: var(--ui-muted); font-size: .84rem; font-weight: 500; }
.adm-kpi strong { display: block; margin: 2px 0; color: var(--ui-navy); font-size: 1.7rem; font-weight: 600;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.adm-kpi em { color: var(--ui-muted); font-size: .82rem; font-style: normal; }
.adm-kpi.is-flag { border-left: 4px solid var(--bad); }

/* Pipeline: five columns, counts first. */
.adm-pipe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.adm-col { min-width: 0; padding: 14px 16px; border-left: 1px solid var(--ui-line); }
.adm-col:first-child { border-left: 0; }
.adm-col h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0;
  color: var(--ui-muted); font-size: .86rem; font-weight: 600; }
.adm-col h3 b { color: var(--ui-navy); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.adm-card { display: block; width: 100%; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--ui-line);
  border-radius: 8px; background: #fff; color: var(--ui-ink); font: inherit; text-align: left; cursor: pointer; }
.adm-card:hover { border-color: var(--ui-blue); }
.adm-card b { display: block; overflow: hidden; font-size: .9rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.adm-card small { display: block; color: var(--ui-muted); font-size: .78rem; }
.adm-card small.adm-age { color: var(--warn); font-weight: 600; }
.adm-more { display: inline-flex; align-items: center; min-height: 32px; margin-top: 8px; padding: 0; border: 0;
  background: none; color: var(--ui-blue); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.adm-more:hover { text-decoration: underline; }
.adm-col-empty { margin: 10px 0 0; color: var(--ui-muted); font-size: .84rem; }

/* Agenda rows: today's visits and the latest money */
.adm-agenda { list-style: none; margin: 0; padding: 0; }
.adm-agenda li { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 14px; align-items: start;
  padding: 14px 20px; border-top: 1px solid var(--ui-line); }
.adm-agenda li:first-child { border-top: 0; }
.adm-agenda time { color: var(--ui-navy); font-weight: 600; font-variant-numeric: tabular-nums; }
.adm-agenda time small { display: block; color: var(--ui-muted); font-size: .78rem; font-weight: 400; }
.adm-agenda b { display: block; font-weight: 600; }
.adm-agenda div > span { display: block; color: var(--ui-muted); font-size: .86rem; }
.adm-agenda .is-now { background: #f2f8fc; box-shadow: inset 3px 0 0 var(--ui-blue); }
.adm-link { display: block; padding: 0; border: 0; background: none; color: var(--ui-ink); font: inherit; font-weight: 600;
  text-align: left; cursor: pointer; }
.adm-link:hover { color: var(--ui-blue-hover); text-decoration: underline; }

.adm .pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.adm .pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.adm .p-ok { background: var(--ok-bg); color: var(--ok); }
.adm .p-warn { background: var(--warn-bg); color: var(--warn); }
.adm .p-bad { background: var(--bad-bg); color: var(--bad); }
.adm .p-info { background: var(--info-bg); color: var(--info); }
.adm .p-quiet { background: var(--quiet-bg); color: var(--quiet); }
.adm .p-outline-ok { background: #fff; color: var(--ok); box-shadow: inset 0 0 0 1px #9ccdb1; }
.adm .p-outline-bad { background: #fff; color: var(--bad); box-shadow: inset 0 0 0 1px #e3a59f; }

.adm-today-foot { display: none; }

/* The Collect payment picker, in the shared drawer. */
body:has(#view-admin:not([hidden])) .adm-pick { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
body:has(#view-admin:not([hidden])) .adm-pick .row { width: 100%; }

/* ---- Money (admin rework U3, mock-ups 04 and 05) ---------------------- */
.adm-head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.adm .btn.danger { background: #fff; border: 1px solid #e3a59f; color: var(--bad); }
.adm .btn.danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.adm .btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.adm .btn.danger.solid:hover { background: #87201a; border-color: #87201a; }
.adm .btn:disabled { opacity: .6; cursor: not-allowed; }
.adm-sr-head.adm-sr-head { padding: 0 20px; border: 0; min-height: 0; }
.adm-sr-head .adm-panel-meta:not(:empty) { padding-top: 10px; }
.adm-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 20px;
  border-bottom: 1px solid var(--ui-line); }
.adm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 13px; border: 1px solid var(--ui-field);
  border-radius: 999px; background: #fff; font: inherit; font-size: .86rem; font-weight: 500; color: var(--ui-ink); cursor: pointer; }
.adm-chip:hover { border-color: var(--ui-blue); }
.adm-chip[aria-pressed="true"] { background: var(--ui-navy); border-color: var(--ui-navy); color: #fff; font-weight: 600; }
/* The count on a filter chip (M3, mock-up 04-money). */
.adm-chip b { font-weight: 600; color: var(--ui-muted); }
.adm-chip[aria-pressed="true"] b { color: #c8d5e0; }
.adm-mode { display: inline-flex; border: 1px solid var(--ui-field); border-radius: 8px; overflow: hidden; }
.adm-mode button { min-height: 34px; padding: 5px 12px; border: 0; background: #fff; font: inherit; font-size: .84rem;
  font-weight: 600; color: var(--ui-ink); cursor: pointer; }
.adm-mode button + button { border-left: 1px solid var(--ui-field); }
.adm-mode button[aria-pressed="true"] { background: var(--ui-surface); color: var(--ui-blue-hover); box-shadow: inset 0 -2px 0 var(--ui-blue); }
.adm .adm-select { width: auto; max-width: 100%; appearance: auto; min-height: 36px; padding: 6px 12px; border: 1px solid var(--ui-field); border-radius: 8px; font: inherit;
  font-size: .86rem; background: #fff; color: var(--ui-ink); }

.adm-table { width: 100%; border-collapse: collapse; }
.adm-table th { text-align: left; font-size: .78rem; font-weight: 600; color: var(--ui-muted); padding: 10px 14px;
  border-bottom: 1px solid var(--ui-line); background: #fbfcfd; white-space: nowrap; }
.adm-table td { padding: 12px 14px; border-bottom: 1px solid var(--ui-line); vertical-align: top; overflow-wrap: anywhere; }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover { background: #f8fbfd; }
.adm-table .r { text-align: right; }
.adm-table td b { font-weight: 600; color: var(--ui-ink); }
.adm-table td small { display: block; color: var(--ui-muted); font-size: .8rem; }
.adm-table .adm-date { white-space: nowrap; color: var(--ui-ink); }
.adm-amount, .adm-summary .r, .adm-facts dd { font-variant-numeric: tabular-nums; }
.adm-amount { white-space: nowrap; }
.adm .adm-test-pill { margin-left: 4px; }
.adm-inline-link { padding: 0; border: 0; background: none; font: inherit; color: var(--ui-blue); text-decoration: underline;
  text-underline-offset: 2px; cursor: pointer; }
.adm-inline-bad { display: block; color: var(--bad); font-size: .84rem; font-weight: 600; }
.adm-bad-text { color: var(--bad); }
.adm-list-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 20px;
  border-top: 1px solid var(--ui-line); color: var(--ui-muted); font-size: .86rem; }
.adm-empty { padding: 28px 20px; text-align: center; color: var(--ui-muted); }
.adm-empty strong { display: block; color: var(--ui-ink); font-size: 1rem; margin-bottom: 4px; }
.adm-btnrow { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }
.adm-skel-money > div { grid-template-columns: 70px minmax(0, 1fr) 110px 80px; }
.adm-money-note { margin: 0 0 16px; color: var(--ui-muted); font-size: .9rem; }
.adm-money-note b { color: var(--ui-ink); }
.adm-callout.warn { background: var(--warn-bg); border-color: #f0d9a4; color: #5c3c00; }
.adm-callout.ok { background: var(--ok-bg); border-color: #b9dcc7; color: #14452d; }
.adm-callout .pill { margin-right: 6px; }
.adm-callout code { font-size: .84rem; overflow-wrap: anywhere; }
.adm-callout.adm-in-panel { margin: 16px 20px 20px; }
.adm-money > .adm-grid-2 { margin-bottom: 20px; }
.adm .adm-field select { appearance: auto; }
.adm-panel-text { margin: 0; padding: 16px 20px; font-size: .9rem; color: var(--ui-ink); }
.adm-rows { list-style: none; margin: 0; padding: 0; }
.adm-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--ui-line); }
.adm-rows li:first-child { border-top: 0; }
.adm-rows li > div:first-child { min-width: 0; display: grid; gap: 2px; }
.adm-rows b { font-weight: 600; }
.adm-rows span { color: var(--ui-muted); font-size: .86rem; overflow-wrap: anywhere; }
.adm-row-end { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: 8px; flex: none; max-width: 50%; }
.adm-row-end time { color: var(--ui-muted); font-size: .86rem; white-space: nowrap; }
.adm-back { display: inline-flex; align-items: center; min-height: 32px; margin-bottom: 6px; font-weight: 600; font-size: .9rem; text-decoration: none; }
.adm-back::before { content: "\2190"; margin-right: 6px; }
.adm-back:hover { text-decoration: underline; }
.adm-payment .adm-head p .pill { margin-left: 6px; vertical-align: 1px; }
.adm-facts { margin: 0; padding: 6px 20px 14px; display: grid; }
.adm-facts div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--ui-line); }
.adm-facts div:first-child { border-top: 0; }
.adm-facts dt { color: var(--ui-muted); font-size: .88rem; }
.adm-facts dd { margin: 0; overflow-wrap: anywhere; }
.adm-payment .adm-grid-2 { margin-bottom: 20px; }
.adm-payment .adm-grid-2 > .adm-panel { margin: 0; }

/* The refund dialog: centred on a desktop, a bottom sheet on a phone. */
.adm-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 12px;
  background: #fff; color: var(--ui-ink); box-shadow: 0 24px 60px rgba(10, 31, 53, .2); overflow: auto; }
.adm-dialog::backdrop { background: rgba(10, 31, 53, .45); }
.adm-dialog-form { margin: 0; }
.adm-dialog-head { padding: 22px 24px 6px; }
.adm-dialog-head h2 { margin: 0; font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; color: var(--ui-navy); }
.adm-dialog-head p { margin: 4px 0 0; color: var(--ui-muted); }
.adm-dialog-body { padding: 4px 24px 8px; }
.adm-dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; margin-top: 12px;
  border-top: 1px solid var(--ui-line); background: #fff; position: sticky; bottom: 0; }
.adm-dialog-foot .btn { min-height: 48px; padding: 10px 22px; }
.adm-field { display: grid; gap: 6px; margin: 14px 0; padding: 0; border: 0; min-width: 0; }
.adm-field[hidden] { display: none; }
.adm-field label, .adm-field legend { padding: 0; font-weight: 600; font-size: .9rem; color: var(--ui-ink); }
.adm-field legend { margin-bottom: 6px; }
.adm-field input, .adm-field textarea, .adm-field select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #b7c7d4;
  border-radius: 8px; font: inherit; color: var(--ui-ink); background: #fff; }
.adm-field textarea { min-height: 84px; resize: vertical; }
.adm-field [aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.adm-field small { color: var(--ui-muted); font-size: .82rem; }
.adm-field-error { margin: 0; color: var(--bad); font-size: .86rem; font-weight: 600; }
.adm-field-error[hidden] { display: none; }
.adm-seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #b7c7d4; border-radius: 8px; overflow: hidden; }
.adm-seg button { min-height: 44px; padding: 10px; border: 0; background: #fff; font: inherit; font-weight: 600; font-size: .9rem;
  color: var(--ui-ink); cursor: pointer; }
.adm-seg button + button { border-left: 1px solid #b7c7d4; }
.adm-seg button[aria-pressed="true"] { background: var(--ui-navy); color: #fff; }
.adm-seg button:focus-visible { outline-offset: -4px; }
.adm-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px;
  background: var(--ui-surface); border-radius: 8px; font-size: .92rem; }
.adm-summary .r { text-align: right; }
.adm-next { margin: 12px 0 0; color: var(--ui-muted); font-size: .86rem; }
.adm-check { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; font-size: .9rem; cursor: pointer; }
.adm-check input { width: 18px; height: 18px; accent-color: var(--ui-blue); }
.adm-refund-outcome { margin-top: 12px; }
.adm-refund-outcome .adm-callout { margin: 0; }

/* Phone chrome is hidden on a desktop. */
.adm-tabbar { display: none; }

@media (max-width: 1100px) {
  .adm-pipe { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adm-col:nth-child(4) { border-left: 0; }
  .adm-col:nth-child(n+4) { border-top: 1px solid var(--ui-line); }
  .adm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-utility-status { display: none; }
}

/* Between the phone layout and a full desktop the top bar cannot hold the
   search field beside four controls, so the field takes a row of its own. */
@media (max-width: 1000px) and (min-width: 761px) {
  .adm-top { flex-wrap: wrap; }
  .adm form.adm-search { order: 10; flex: 1 0 100%; max-width: none; }
}

/* ---- Phone (proposal 4.7) ------------------------------------------- */
@media (max-width: 760px) {
  .adm-app { display: block; background: none; }
  /* The sidebar becomes the "More" sheet behind the + button. */
  .adm-side { display: none; }
  .adm.is-more-open .adm-side { display: flex; position: fixed; inset: auto 0 0 0; z-index: 40; height: auto;
    max-height: 88vh; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 40px rgba(10, 31, 53, .18); }
  .adm.is-more-open .adm-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(10, 31, 53, .45); }
  .adm-side .adm-brand { display: none; }
  .adm-side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
  .adm-side-actions .btn { width: 100%; }
  .adm-side-actions [data-admin-action="refresh"] { grid-column: 1 / -1; }
  .adm-nav a { min-height: 46px; }

  .adm-top { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .adm-top-brand { display: block; width: 118px; height: auto; }
  .adm-top .adm-search-toggle, .adm-top .adm-more-toggle { display: grid; }
  .adm-top-action, .admin-utility { display: none; }
  .adm form.adm-search { display: none; order: 10; flex: 1 0 100%; max-width: none; }
  .adm.is-search-open form.adm-search { display: block; }
  .adm-bell b { min-width: 18px; height: 18px; font-size: .68rem; }
  .adm-testbar { padding: 6px 16px; }

  .adm-subnav { padding: 14px 16px 0; }
  .adm-page { padding: 18px 16px 104px; }
  .adm-head h1 { font-size: 1.4rem; }
  .adm-panel > header { padding: 14px 16px; }
  .adm-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .adm-kpi { padding: 12px 14px; }
  .adm-kpi strong { font-size: 1.35rem; }
  .adm-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .adm-pipe { grid-template-columns: minmax(0, 1fr); }
  .adm-col, .adm-col:nth-child(4) { border-left: 0; border-top: 1px solid var(--ui-line); }
  .adm-col:first-child { border-top: 0; }
  .adm-callout { margin: 12px 16px; }
  .adm-notallowed, .adm-empty-line { padding: 14px 16px; }
  .adm-attn li { grid-template-columns: 10px minmax(0, 1fr); padding: 12px 16px; }
  .adm-attn li > .btn { grid-column: 2; justify-self: start; }
  .adm-agenda li { grid-template-columns: 72px minmax(0, 1fr); padding: 12px 16px; }
  .adm-agenda li > .pill { grid-column: 2; justify-self: start; }
  .adm-today-foot { display: flex; gap: 10px; margin-top: 20px; }
  .adm-today-foot a { flex: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
    border: 1px solid #bdcbd6; border-radius: 8px; background: #fff; color: var(--ui-navy); font-weight: 600; text-decoration: none; }

  .adm-tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 30; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--ui-line); }
  .adm-tabbar a { position: relative; display: grid; justify-items: center; gap: 2px; min-height: 48px; padding: 4px 0;
    color: var(--ui-muted); font-size: .7rem; font-weight: 600; text-decoration: none; }
  .adm-tabbar a[aria-current="page"] { color: var(--ui-blue-hover); }
  .adm-tabbar svg { width: 22px; height: 22px; }
  .adm-tabbar i { position: absolute; top: 0; right: calc(50% - 22px); min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 999px; background: var(--bad); color: #fff; font-size: .62rem; font-style: normal;
    display: grid; place-items: center; }
}

/* Money on a phone: rows become cards (name, state, amount), the action
   column moves to the Payment page, and the dialog becomes a bottom sheet
   with its buttons pinned above the keyboard. */
@media (max-width: 760px) {
  .adm-head-actions { width: 100%; }
  .adm-head-actions .btn { flex: 1; }
  .adm-toolbar { padding: 14px 16px; }
  .adm-toolbar .adm-spacer { display: none; }
  .adm-stack thead { display: none; }
  .adm-stack, .adm-stack tbody, .adm-stack tr, .adm-stack td { display: block; width: 100%; }
  .adm-stack tr { padding: 12px 16px; border-bottom: 1px solid var(--ui-line); }
  .adm-stack tbody tr:last-child { border-bottom: 0; }
  .adm-stack td { padding: 2px 0; border: 0; text-align: left; }
  .adm-stack td.r { text-align: left; }
  .adm-stack .adm-hide-sm { display: none; }
  .adm-stack .adm-amount { font-weight: 600; }
  .adm-list-foot { padding: 12px 16px; }
  .adm-rows li { flex-direction: column; padding: 12px 16px; }
  .adm-row-end { justify-content: flex-start; max-width: none; }
  .adm-callout.adm-in-panel { margin: 14px 16px 16px; }
  .adm-panel-text { padding: 14px 16px; }
  .adm-facts { padding: 6px 16px 12px; }
  .adm-facts div { grid-template-columns: 110px minmax(0, 1fr); }
  .adm-dialog { width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .adm-dialog-head { padding: 20px 20px 4px; }
  .adm-dialog-body { padding: 4px 20px 8px; }
  .adm-dialog-foot { position: sticky; bottom: 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); }
  .adm-dialog-foot .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .adm-panel-meta.is-refreshing::before { animation: none; }
}

/* ---- Requests and the Request page (admin rework U2, mock-up 02) ------- */
/* The board: the five pipeline columns of decision D1, every card shown. */
.adm-requests .toolbar { margin-bottom: 16px; }
.adm-requests .toolbar .chip { min-height: 38px; padding: 6px 14px; border-radius: 999px; font-size: .86rem; }
.adm-requests .toolbar #search { min-height: 42px; border-radius: 8px; border: 1px solid var(--ui-field); }
.adm-view-switch button { min-height: 38px; padding: 6px 14px; }
.adm-board { overflow: hidden; }
.adm-board[hidden], .adm-requests #list[hidden] { display: none; }
.adm-board-cols .adm-col { padding-bottom: 16px; }
.adm-board-cols.is-single { grid-template-columns: minmax(0, 1fr); }
.adm-card-ref { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* The page itself. */
.adm-crumb { margin: 0 0 6px; color: var(--ui-muted); font-size: .86rem; }
.adm-crumb a { color: var(--ui-muted); }
.adm-request .adm-head { margin-bottom: 18px; }
.adm-req-refresh { display: block; margin: -8px 0 8px; min-height: 0; }
.adm-req-refresh:empty { display: none; }
.adm-req-callout.adm-callout { margin: 0 0 16px; }
.adm-muted { color: var(--ui-muted); font-weight: 400; }
.adm-hint { margin: 0; color: var(--ui-muted); font-size: .84rem; }
.adm-req-pad { padding: 0 20px 14px; }
.adm-req-pad:empty { display: none; }

.adm-statusbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0 0 20px; padding: 12px 16px;
  background: #fff; border: 1px solid var(--ui-line); border-radius: 12px; }
.adm-steps { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 420px; margin: 0; padding: 0; list-style: none; }
.adm-steps li { padding: 6px 12px; border-radius: 999px; background: var(--ui-surface); color: var(--ui-muted); font-size: .84rem; font-weight: 500; }
.adm-steps li.done { background: var(--ok-bg); color: var(--ok); }
.adm-steps li.on { background: var(--ui-navy); color: #fff; font-weight: 600; }
.adm-req-assignee { color: var(--ui-ink); font-size: .9rem; font-weight: 500; }
.adm-statusbar > form { flex: 1 0 100%; }
.adm-skel-bar { width: 60%; height: 22px; }

.adm-req-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.adm-req-stack { display: grid; gap: 20px; align-content: start; min-width: 0; }
.adm-req-stack > .adm-panel { margin: 0; }
.adm-req-report { margin-bottom: 20px; }
.adm-panel > header .pill, .adm-req-pill { margin-left: auto; }
.adm-req-pill .pill { margin-left: 0; }
.adm-req-pill:empty { display: none; }
.adm-req-body { padding: 4px 20px 18px; }
.adm-req-flush { padding-left: 0; padding-right: 0; }
.adm-req-note.adm-money-note { margin: 12px 0 0; }
.adm-panel > .adm-req-note.adm-money-note { margin: 12px 20px; }
.adm-req-body .adm-callout { margin: 12px 0; }

/* The money on a request, as ledger lines. */
.adm-ledger { width: 100%; border-collapse: collapse; }
.adm-ledger td { padding: 12px 0; border-bottom: 1px dashed var(--ui-line); vertical-align: top; }
.adm-ledger td + td { padding-left: 12px; }
.adm-ledger .r { text-align: right; }
.adm-ledger-title { display: block; color: var(--ui-ink); }
.adm-ledger small { display: block; color: var(--ui-muted); font-size: .82rem; }
.adm-ledger-state { white-space: nowrap; }
.adm-ledger-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.adm-ledger-total td { border-bottom: 0; border-top: 1px solid var(--ui-ink); padding-top: 12px; font-weight: 600; color: var(--ui-navy); }
.adm-req-collect .collect-payment { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ui-line); }
.adm-req-collect h3 { margin: 0 0 4px; font-size: .95rem; font-weight: 600; }
.adm-req-collect label { display: grid; gap: 6px; margin: 10px 0; font-weight: 600; font-size: .9rem; }
.adm-req-collect label.consent-check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.adm-req-collect select, .adm-req-collect input[type="text"] { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #b7c7d4;
  border-radius: 8px; font: inherit; background: #fff; color: var(--ui-ink); }
.adm-req-collect .collect-link { margin: 10px 0; padding: 10px 12px; background: var(--ui-surface); border-radius: 8px; overflow-wrap: anywhere; }

/* Everything that happened, newest first. */
.adm-compose { display: grid; gap: 6px; padding: 16px 20px; border-bottom: 1px solid var(--ui-line); }
.adm-compose label { font-weight: 600; font-size: .9rem; }
.adm-compose textarea { width: 100%; min-height: 76px; padding: 10px 12px; border: 1px solid #b7c7d4; border-radius: 8px;
  font: inherit; color: var(--ui-ink); resize: vertical; }
.adm-compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ui-muted); font-size: .82rem; }
.adm-form-msg { margin: 0; font-size: .86rem; color: var(--ui-ink); }
.adm-form-msg:empty { display: none; }
.adm-form-msg.is-bad { color: var(--bad); font-weight: 600; }
.adm-tl { list-style: none; margin: 0; padding: 4px 20px 10px; }
.adm-tl li { position: relative; margin-left: 8px; padding: 14px 0 14px 26px; border-left: 2px solid var(--ui-line); overflow-wrap: anywhere; }
.adm-tl li::before { content: ""; position: absolute; left: -7px; top: 18px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid #9fb3c3; }
.adm-tl li.adm-tl-money::before { border-color: var(--ok); background: var(--ok-bg); }
.adm-tl li.adm-tl-refund::before { border-color: var(--warn); background: var(--warn-bg); }
.adm-tl li.adm-tl-msg::before { border-color: var(--ui-blue); background: var(--info-bg); }
.adm-tl li.adm-tl-note::before { border-color: var(--quiet); background: var(--quiet-bg); }
.adm-tl b { font-weight: 600; color: var(--ui-ink); }
.adm-tl time { display: block; color: var(--ui-muted); font-size: .8rem; }
.adm-tl p { margin: 6px 0 0; color: var(--ui-ink); }
.adm-tl-quote { margin-top: 8px; padding: 10px 14px; background: var(--ui-surface); border-radius: 8px; font-size: .92rem; white-space: pre-line; }
.adm-tl-note .adm-tl-quote { background: var(--warn-bg); }

/* Side cards. */
.adm-req-btnrow { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 20px 16px; }
.adm-req-btnrow-flat { padding: 10px 0 0; }
.adm-req-form { display: grid; gap: 4px; margin: 0; padding: 4px 20px 16px; }
.adm-req-form-flat { padding: 4px 20px 16px; }
.adm-statusbar .adm-req-form { padding: 6px 0 2px; border-top: 1px solid var(--ui-line); }
.adm-req-form .adm-field { margin: 8px 0; }
.adm-req-formrow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.adm-req-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.adm-req-quote { padding: 4px 20px 12px; border-bottom: 1px solid var(--ui-line); }
.adm-req-quote .adm-req-form-flat { padding: 4px 0 0; }
.adm-req-quote .adm-hint { margin-top: 8px; }
.adm-req-quote .quote-card { margin: 12px 0 0; padding: 12px 14px; border: 1px solid var(--ui-line); border-radius: 8px; background: #fff; box-shadow: none; }
.adm-req-quote .quote-card header { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 0; border: 0; }
.adm-req-quote .quote-card p { margin: 6px 0 0; }
.adm-req-quote .quote-lines { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: .9rem; }
.adm-req-quote .quote-lines td { padding: 4px 0; border-top: 1px solid var(--ui-line); }
.adm-req-quote .quote-amount { text-align: right; font-variant-numeric: tabular-nums; }
.adm-req-quote > .adm-form-msg { margin-top: 8px; }
#admin-request-quotes > .adm-empty-line { padding-left: 20px; padding-right: 20px; }
.adm-req-notes { list-style: none; margin: 0; padding: 4px 20px 4px; }
.adm-req-notes li { padding: 10px 0; border-bottom: 1px solid var(--ui-line); }
.adm-req-notes p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.adm-req-notes small { color: var(--ui-muted); font-size: .8rem; }
.adm-panel > .adm-empty-line.adm-req-flush { padding: 14px 20px 4px; }
.adm-req-old { margin: 0; color: var(--ui-muted); font-size: .84rem; }
.adm-req-old .adm-inline-link { min-height: 32px; font-weight: 600; }

@media (max-width: 1100px) {
  .adm-req-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .adm-statusbar { padding: 10px 12px; }
  .adm-steps li { padding: 4px 10px; font-size: .78rem; }
  .adm-req-body, .adm-req-form, .adm-req-form-flat, .adm-req-quote, .adm-req-notes { padding-left: 16px; padding-right: 16px; }
  .adm-req-quote .adm-req-form-flat { padding-left: 0; padding-right: 0; }
  .adm-req-btnrow { padding: 0 16px 14px; }
  .adm-req-btnrow-flat { padding: 10px 0 0; }
  .adm-req-btnrow .btn, .adm-req-formrow .btn { flex: 1 1 auto; min-height: 44px; }
  .adm-compose { padding: 14px 16px; }
  .adm-tl { padding: 4px 16px 8px; }
  .adm-ledger td { display: block; padding: 0; border: 0; }
  .adm-ledger td + td { padding-left: 0; }
  .adm-ledger tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px dashed var(--ui-line); }
  .adm-ledger tbody td:first-child { grid-column: 1 / -1; }
  .adm-ledger .r { text-align: right; }
  .adm-ledger-total td:first-child { grid-column: 1; }
  .adm-ledger-actions .btn { flex: 1 1 auto; min-height: 44px; }
  .adm-req-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .adm-requests .adm-head-actions { width: 100%; }
  .adm-requests .adm-head-actions .btn { flex: 1; }
  .adm-requests .toolbar .chip { flex: none; min-height: 44px; }
}
/* The drawer's form and card classes are kept on the page's controls so the
   two stay recognisable to each other, but the drawer's framing is not. */
.adm-request :is(.note-form, .report-form, .quote-line-form, .quote-new-form, .assign-form, .transition-form, .appt-form) {
  display: grid; gap: 4px; align-items: stretch; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.adm-request .adm-statusbar .transition-form { padding: 6px 0 2px; }
.adm-request .visit-report { margin-top: 0; padding: 0; border: 1px solid var(--ui-line); border-radius: 12px; background: #fff; box-shadow: none; }
.adm-request .visit-report dl { gap: 0; }
.adm-request .visit-report dt { color: var(--ui-muted); font-size: .88rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.adm-request .visit-report dd { margin: 0; white-space: pre-line; }
.adm-request .quote-total { margin: 8px 0 0; font-size: 1.05rem; }
.adm-request .quote-total strong { font-variant-numeric: tabular-nums; }
.adm-request .quote-kind { color: var(--ui-muted); }
.adm-request .badge.q-sent { background: var(--warn-bg); color: var(--warn); }
.adm-request .badge.q-approved { background: var(--ok-bg); color: var(--ok); }
