/* ═══════════════════════════════════════════════════════════════════════════
   OFFICE — schedule, customers, reports, billing, weekly usage, stock audit,
   seasonal data and admin, for the person running the whole operation from
   a desk, not a pocket.
   ═══════════════════════════════════════════════════════════════════════════

   ── WHO THIS IS FOR ─────────────────────────────────────────────────────────

   js/can.js split "admin" into two roles while this file was being written:
   `office` (see-team-day, see-team-hours, schedule-work, edit-client,
   see-pricing, bill) and the owner, who additionally gets audit-stock,
   edit-handbook, manage-company, delete-records. So Schedule, Customers,
   Reports, Billing and Seasonal are screens an office manager lives in every
   day — they get the most work below. Weekly Usage, Stock Audit, and most of
   Admin (Company Setup, Suppliers, Users, Bulk Restock, Order Needed) stay
   owner-only; they are still restyled, because the owner sits at this same
   desk, but they are not where density had to win every argument. The Admin
   "Hours" tab is the one admin section office actually uses, and is treated
   like a daily-driver screen rather than a settings page.

   Hiding which TAB an office manager sees is still Can.js's job, not this
   file's — nothing here can enforce who sees what. See the report.

   ── WHAT WAS WRONG, AT ONE COMPANY AND A HANDFUL OF ROWS ───────────────────

   Every list on these screens was a column of shadowed, rounded cards —
   right for a dozen customers, a dozen reports a week. At a hundred pools on
   weekly service that is ~5,000 reports and ~5,000 visits a year, hundreds
   of customers, and the cards do not get smaller: the list just gets three
   thousand rows long with no way to scan it, because scanning a card grid
   means reading every card, not running your eye down one column.

   The Schedule week board filled the top third of a 1512×950 window and quit
   — seven short columns with a page of empty ground underneath them, on the
   one screen whose entire job is showing a crew's whole week at once.

   Money did not line up: Seasonal's own column headers sat over a Billed
   column and a Chemicals column, and both were left-aligned text wherever a
   figure happened to land, not a column of numbers a thumb could run down.
   Status showed up as four different shapes — a tone class borrowed from an
   icon badge on Reports, a bespoke pill with its own colour table on
   Invoices, an inset stripe on a stock row, a full-colour gradient card on
   Stock Audit's total — four things to learn instead of one.

   ── THE FIX ──────────────────────────────────────────────────────────────

   Cards become rows: one bordered panel per screen, hairline-separated rows
   inside it, name/type/address/status each in their own column so the eye
   can travel straight down any one of them. Money is tabular-nums and
   right-aligned everywhere it appears in a list. Sticky table headers where
   the markup already gives a real <thead> (Invoices, Weekly Usage, the
   Hours tables) or a real header row (Seasonal's own .szn-head) — CSS cannot
   invent a header out of a loose list of <button> cards, and the report says
   exactly where one needs to be added. The week board fills the screen by
   flexing to the viewport instead of guessing a pixel offset, and each day
   scrolls on its own so a day with forty jobs does not blow out the layout
   of the other six.

   ── SCOPE ────────────────────────────────────────────────────────────────

   Desktop only, 1024px up — the phone belongs to another agent and nothing
   here moves it. Every rule is scoped to one of this file's eight screens by
   id; nothing here touches #nav, #screen-inventory, #screen-today or
   #screen-log, which are not this file's to change. Tokens only, read from
   rf-base.css — never a raw hex.
   ═══════════════════════════════════════════════════════════════════════════ */

@media (min-width: 1024px) {

  /* ── One column, before anything else ────────────────────────────────────
     app.css lays every long list out as a grid of cards -- two columns from
     1024px, three from 1500px. Everything below restyles those cards into
     full-width rows with aligned columns, and that is only coherent if the
     list itself is a single column.

     Without this the rows were still flowing left to right: the Reports
     screen put three reports across one line and the fourth underneath, each
     one internally laid out as though it had the full width, so no column
     lined up with the one above it. The card styling looked right in
     isolation and the screen looked broken.

     `grid-column` on the empty states goes with it -- spanning "1 / -1" of a
     one-column grid is harmless, but saying so plainly is cheaper than
     leaving somebody to work out why it is still there. */
  #screen-clients #cl-list,
  #screen-clients #comm-list,
  #screen-cover   #cov-list,
  #screen-reports #rep-list,
  #screen-handbook .hb-list {
    display: block;
  }


  /* ═══════════════════════════════════════════════════════════════════════
     SHARED — things more than one office screen needs
     ═══════════════════════════════════════════════════════════════════════ */

  /* Four of these screens are a long list first and everything else second.
     1080px was centring that list in a third of a 1512px window and leaving
     the rest as margin. The screens that are mostly a form (Billing's month
     picker, Admin's settings) keep the narrower measure — a text input does
     not read better at 1400px — so this is named by screen, not blanket. */
  #screen-schedule .container,
  #screen-clients  .container,
  #screen-reports  .container,
  #screen-seasonal .container {
    max-width: none;
    /* max-width: none alone is not enough wherever the parent is a flex
       container -- see the note on #screen-schedule .container below. */
    width: 100%;
  }

  /* "There are more" and "still loading" are not wired to anything yet —
     pagination is landing in the data layer as this is written, and no
     render function below emits these classes. They exist now so that work
     has a designed place to land instead of being invented ad hoc, in a
     different shape, on whichever screen hits the row limit first. See the
     report for exactly where each one is meant to attach. */
  .ofc-listfoot {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--w-3); padding: var(--w-3) var(--w-4);
    border-top: 1px solid var(--w-line);
    background: var(--w-panel);
    font-size: var(--w-t-small); color: var(--w-ink-3);
  }
  .ofc-listfoot strong { color: var(--w-ink); font-weight: 800; }
  .ofc-listfoot button {
    font: inherit; font-weight: 700; font-size: var(--w-t-small); cursor: pointer;
    padding: var(--w-1) var(--w-3); border-radius: var(--w-r);
    background: var(--w-raised); border: 1px solid var(--w-line); color: var(--w-ink-2);
    transition: background .12s ease, color .12s ease, border-color .12s ease;
  }
  .ofc-listfoot button:hover { background: var(--w-panel); color: var(--w-ink); border-color: var(--w-ink-3); }
  .ofc-listfoot button:disabled { opacity: .5; cursor: default; }

  /* A row of placeholder bars, the width of the thing that will land there,
     so a list loading 50 rows reads as "arriving" rather than as a blank
     screen someone has to decide is broken or just slow. Also inert until a
     render function emits it. */
  .ofc-skel-row {
    display: flex; align-items: center; gap: var(--w-4);
    padding: var(--w-3) var(--w-2);
    border-bottom: 1px solid var(--w-line-2);
  }
  .ofc-skel-bar {
    height: 13px; border-radius: 4px; flex: none;
    background: linear-gradient(100deg, var(--w-raised) 35%, var(--w-panel) 50%, var(--w-raised) 65%);
    background-size: 200% 100%;
    animation: ofc-shimmer 1.3s ease-in-out infinite;
  }
  @keyframes ofc-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
  @media (prefers-reduced-motion: reduce) { .ofc-skel-bar { animation: none; } }

  /* Ready-made column captions for the two lists that render as a loose run
     of <button> cards with no header row in the DOM at all (Customers,
     Reports — see the report). Unused until that markup lands; the grid
     matches the row templates below exactly so the day it does, the columns
     line up with zero further CSS. */
  .ofc-colhead {
    position: sticky; top: 0; z-index: 2;
    align-items: center; column-gap: var(--w-3);
    padding: var(--w-2) var(--w-2);
    background: var(--w-ground);
    border-bottom: 1px solid var(--w-line);
    font-size: var(--w-t-label); font-weight: 800; letter-spacing: .08em;
    text-transform: uppercase; color: var(--w-ink-3);
  }
  .ofc-colhead > span:last-child { text-align: right; }
  .ofc-colhead-clients { display: grid; grid-template-columns: 22px minmax(0,1.5fr) minmax(0,1fr) minmax(0,1.8fr) 18px; }
  .ofc-colhead-reports { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr) auto; }


  /* ═══════════════════════════════════════════════════════════════════════
     SCHEDULE — the week board actually uses the week
     ═══════════════════════════════════════════════════════════════════════

     The board was sized to its content — seven short day cards — on a
     screen whose whole job is showing capacity, so an empty Thursday and an
     empty two-thirds of the monitor said the same thing twice. Fixed to
     fill the viewport by flexing the screen itself rather than guessing a
     pixel offset for "header plus bar plus summary": whatever grows or
     shrinks above the board, the board still takes what is left, down to
     the bottom of the window. Each day then scrolls its own jobs — at a
     hundred pools a Tuesday can hold far more than seven stops, and a
     scrolling column beats a page that keeps growing under it. */
  #screen-schedule.screen {
    display: flex; flex-direction: column; min-height: 100vh;
  }
  #screen-schedule .container {
    flex: 1; display: flex; flex-direction: column; min-height: 0;
    /* `width: 100%` is doing real work here and is not belt-and-braces.
       app.css sets `.container { margin: 0 auto }`, and an auto margin on a
       flex item's CROSS axis wins over stretch -- the auto margins absorb the
       free space and the item collapses to its content width, centred. The
       column above was 644px wide in a 1248px space with a dead strip either
       side, and every rule in this file looked correct in isolation. */
    width: 100%;
  }
  /* Everything above the board (header, date bar, add-job button, summary
     line) keeps its natural height; the board is the one thing that grows. */
  #sch-list { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
  #sch-list .wk { flex: 1 1 auto; min-height: 0; align-items: stretch; }
  #sch-list .wk-day { min-height: 0; }
  /* Stretched to the full column height now (align-items:stretch above), an
     empty day reads as a tall dashed column of free capacity — exactly the
     signal app.css's own comment says it should be, just visible at last. */
  #sch-list .wk-jobs {
    flex: 1 1 auto; min-height: 0; overflow-y: auto;
    padding-right: 2px; /* clears the scrollbar instead of letting it sit on the job cards */
  }
  #sch-list .wk-add { flex: none; }
  /* One name per line. At thirty-plus jobs on a day, a wrapped two-line
     title cost a whole extra job's worth of scroll; the full name is still
     one hover away via the button's own title attribute. */
  #sch-list .wk-job-t {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }

  /* The one line of "shape of the week" this screen had — a sentence buried
     between the date bar and the board. Given the weight of an actual
     summary, with the unassigned count read off the sentence itself rather
     than a class nobody added: :has(strong) is true exactly when the
     rendered text contains "N nobody assigned", because that is the only
     time app.js's template wraps a <strong> around anything. */
  #sch-summary .sch-count {
    display: flex; align-items: center; gap: var(--w-2);
    margin: 0 0 var(--w-3); padding: var(--w-2) var(--w-3);
    background: var(--w-panel); border: 1px solid var(--w-line); border-radius: var(--w-r);
    font-size: var(--w-t-small); font-weight: 600; color: var(--w-ink-2);
  }
  #sch-summary .sch-count:has(strong) { box-shadow: inset 2px 0 0 var(--w-warn); }
  #sch-summary .sch-count strong { color: var(--w-warn); font-weight: 800; }


  /* ═══════════════════════════════════════════════════════════════════════
     CUSTOMERS — hundreds of rows, not dozens of cards
     ═══════════════════════════════════════════════════════════════════════

     Residential and commercial pools both rendered as a grid of photo/icon
     cards — two or three across, each a bordered box with its own shadow.
     Comfortable at twenty customers; at "hundreds", a card grid has no
     column to run a thumb down, because a name, a type and an address do
     not line up between one card and the one beside it.

     display:contents on .comm-card-body is the trick that makes this
     possible without touching js/ui.js: it unwraps the name/type/address
     wrapper so those three spans become direct grid children of .comm-card
     itself, which is what lets five columns line up using the exact markup
     renderClientList and renderCommercialList already produce. */
  #screen-clients #cl-list,
  #screen-clients #comm-list {
    display: block;
  }
  #screen-clients [data-cust-pane] {
    display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: var(--w-3); align-items: start;
  }
  #screen-clients [data-cust-pane] .inv-search,
  #screen-clients [data-cust-pane] .add-bar { margin-bottom: var(--w-3); }
  #screen-clients #cl-list, #screen-clients #comm-list { grid-column: 1 / -1; }

  /* One panel, hairline rows inside it — the look rf-shell.css already gave
     Inventory, carried over rather than reinvented. Guarded with :has() so
     an empty list's dashed .empty-state box does not sit inside a second,
     solid border around nothing. */
  #screen-clients #cl-list:has(.comm-card),
  #screen-clients #comm-list:has(.comm-card) {
    background: var(--w-panel); border: 1px solid var(--w-line);
    border-radius: var(--w-r-panel); box-shadow: var(--w-shadow); overflow: hidden;
  }
  #screen-clients .comm-card {
    display: grid; grid-template-columns: 22px minmax(0,1.5fr) minmax(0,1fr) minmax(0,1.8fr) 18px;
    column-gap: var(--w-3); align-items: center; width: 100%; text-align: left;
    margin: 0; padding: var(--w-2) var(--w-3);
    background: none; border: 0; border-radius: 0; box-shadow: none;
    border-bottom: 1px solid var(--w-line-2);
    transition: background .12s ease;
  }
  #screen-clients .comm-card:last-child { border-bottom: 0; }
  #screen-clients .comm-card:hover { background: var(--w-hover); }
  #screen-clients .comm-card:active { transform: none; } /* a touch press-scale has no place under a mouse */
  #screen-clients .comm-card-body { display: contents; }

  #screen-clients .comm-card .badge { width: 22px; height: 22px; border-radius: var(--w-r); }
  #screen-clients .comm-card .badge svg { width: 13px; height: 13px; }
  #screen-clients .comm-thumb { width: 26px; height: 26px; border-radius: 6px; }
  #screen-clients .comm-thumb-ph { width: 13px; height: 13px; }
  /* The "3 photos" corner badge is for browsing a photo; it has no job in a
     list built to be scanned, not looked at. */
  #screen-clients .comm-thumb-n { display: none; }

  #screen-clients .comm-card-name {
    font-size: var(--w-t-body); font-weight: 700; color: var(--w-ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  /* Was var(--brand), bold — a colour doing a label's job. In a row that
     already has a dedicated column for it, "Residential" in brand blue next
     to "Commercial" in the same blue says nothing extra; plain and quiet
     reads faster at a hundred rows. */
  #screen-clients .comm-card-sub {
    font-size: var(--w-t-small); font-weight: 600; color: var(--w-ink-3);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  #screen-clients .comm-card-addr { font-size: var(--w-t-small); color: var(--w-ink-3); }
  #screen-clients .comm-card-go { stroke: var(--w-ink-3); width: 16px; height: 16px; }

  /* The one count already in the header earns the "summary before detail"
     job — just not at .74rem and unbolded, the weight a timestamp gets. */
  #screen-clients #cl-count, #screen-clients #comm-count {
    font-size: var(--w-t-body); font-weight: 700; color: var(--w-ink-2);
  }

  /* A customer's own report history is the one place on this screen that
     grows without bound — ten years of weekly visits is 400-plus rows under
     a single heading. Scrolls on its own, with the heading pinned above it,
     rather than pushing the rest of the record sheet down the page. */
  #cl-panel-body .comm-sec:has(.hist-row) {
    max-height: 46vh; overflow-y: auto;
  }
  #cl-panel-body .comm-sec:has(.hist-row) .comm-sec-title {
    position: sticky; top: 0; background: var(--w-panel); padding-top: 2px; padding-bottom: 6px;
  }


  /* ═══════════════════════════════════════════════════════════════════════
     SERVICE REPORTS — ~5,000 of these a year at a hundred pools
     ═══════════════════════════════════════════════════════════════════════

     Same move as Customers: the card becomes a row. The status pill and the
     flexible run of task/dosed/warning tags do not fit a single text line
     together, so the row keeps two lines — site/meta/status on one, the
     tags beneath — rather than forcing everything onto one line and losing
     the tags, or back onto a card and losing the column. */
  #screen-reports #rep-list:has(.rep-card) {
    background: var(--w-panel); border: 1px solid var(--w-line);
    border-radius: var(--w-r-panel); box-shadow: var(--w-shadow); overflow: hidden;
  }
  #screen-reports .rep-card {
    display: grid;
    grid-template-columns: minmax(0,1.6fr) minmax(0,1fr) auto;
    grid-template-areas: "site meta status" "bits bits bits";
    column-gap: var(--w-3); row-gap: 2px; align-items: center; width: 100%;
    margin: 0; padding: var(--w-2) var(--w-3);
    background: none; border: 0; border-radius: 0; box-shadow: none;
    border-bottom: 1px solid var(--w-line-2);
  }
  #screen-reports .rep-card:last-child { border-bottom: 0; }
  #screen-reports .rep-card:hover { background: var(--w-hover); }
  #screen-reports .rep-card:active { transform: none; }
  #screen-reports .rep-card-top { display: contents; }
  #screen-reports .rep-site {
    grid-area: site; color: var(--w-ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  #screen-reports .rep-card-meta {
    grid-area: meta; color: var(--w-ink-3);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  #screen-reports .rep-status { grid-area: status; justify-self: end; }
  #screen-reports .rep-card-bits { grid-area: bits; margin-top: 0; }

  /* Shape only — colour still comes from the c-amber/c-teal tone class
     js/ui.js already puts on the same element via REPORT_STATUS. Unifying
     the pill's shape here, rather than its colour table, is deliberate:
     Invoices' pill has its own colour rules a few screens down, and a
     report status and a payment status are not the same kind of fact.
     Matching how they are SHAPED still reads as one system; forcing them to
     the same four colours would not. */
  #screen-reports .rep-status {
    padding: 3px var(--w-2); border-radius: 999px;
    font-size: var(--w-t-label); font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  }

  #screen-reports #rep-count { font-size: var(--w-t-body); font-weight: 700; color: var(--w-ink-2); }


  /* ═══════════════════════════════════════════════════════════════════════
     BILLING — the money screen, where misaligned figures cost the most
     ═══════════════════════════════════════════════════════════════════════ */

  /* "To bill": fifty customers, each a shadowed card today, becomes one
     panel with hairline-separated groups inside it — the same move as
     Customers and Reports, carried through so the whole office system reads
     as one thing rather than three separately-invented ones. */
  #screen-billing #bill-list:has(.bill-card) {
    background: var(--w-panel); border: 1px solid var(--w-line);
    border-radius: var(--w-r-panel); box-shadow: var(--w-shadow); overflow: hidden;
  }
  #screen-billing .bill-card { background: none; border: 0; border-radius: 0; margin: 0; }
  #screen-billing .bill-card + .bill-card { border-top: 1px solid var(--w-line); }
  #screen-billing .bill-card-h { padding: var(--w-3) var(--w-4); }
  #screen-billing .bill-name { color: var(--w-ink); }
  #screen-billing .bill-total { color: var(--w-ink); }
  #screen-billing .bill-lines { padding: 0 var(--w-4) var(--w-2); }
  #screen-billing .bill-line { border-bottom-color: var(--w-line-2); }

  /* The summary tiles, in both tabs — "to bill" and "outstanding" share this
     class. Retoken to the office palette, and the warning tile moves from a
     full orange wash to the same inset-stripe mark everything else on these
     screens uses for "needs attention" (rf-shell's chem-row, the week
     board's unassigned jobs) — one way to say it instead of four. */
  #screen-billing .bill-tile {
    background: var(--w-panel); border: 1px solid var(--w-line);
    border-radius: var(--w-r-panel); box-shadow: var(--w-shadow);
  }
  #screen-billing .bill-tile.is-warn {
    background: var(--w-panel); border-color: var(--w-line);
    box-shadow: inset 2px 0 0 var(--w-warn);
  }
  #screen-billing .bill-tile.is-warn .bill-k { color: var(--w-warn); }
  #screen-billing .bill-k { color: var(--w-ink-3); }
  #screen-billing .bill-v { color: var(--w-ink); }
  #screen-billing .bill-s { color: var(--w-ink-3); }

  /* Invoices: already a real <table><thead>, which is exactly what a sticky
     header needs — nothing invented here, just switched on. th keeps
     whatever colour app.css already gave it; this only pins it and paints
     an opaque backdrop so rows scrolling underneath do not show through. */
  #screen-billing .inv-table th {
    position: sticky; top: 0; z-index: 2; background: var(--w-ground);
  }
  #screen-billing .inv-table td { border-bottom-color: var(--w-line-2); color: var(--w-ink); }
  #screen-billing .inv-table tbody tr:hover td { background: var(--w-hover); }
  #screen-billing .inv-pill {
    padding: 3px var(--w-2); border-radius: 999px;
    font-size: var(--w-t-label); font-weight: 800; letter-spacing: .06em;
  }


  /* ═══════════════════════════════════════════════════════════════════════
     WEEKLY USAGE — owner-only (Can.js: audit-stock), still the same desk
     ═══════════════════════════════════════════════════════════════════════ */

  /* Already a real table; the header just needed pinning. */
  #screen-weekly .weekly-table th { position: sticky; top: 0; z-index: 2; background: var(--w-ground); }
  #screen-weekly .weekly-table tbody tr:hover td { background: var(--w-hover); }


  /* ═══════════════════════════════════════════════════════════════════════
     STOCK AUDIT — owner-only, same reasoning as Weekly Usage
     ═══════════════════════════════════════════════════════════════════════ */

  /* The headline total was a full-bleed brand gradient with a diagonal
     stripe pattern drawn across it in a pseudo-element — exactly the
     "colour moving everywhere for decoration" rf-shell.css already removed
     from the rail. Brought in line with the rest of the office system: a
     plain panel, and a short-by state marked the same way low stock is
     marked everywhere else — a stripe at the edge, not a wash across the
     whole card. */
  #screen-audit .audit-total {
    background: var(--w-panel); border: 1px solid var(--w-line);
    box-shadow: var(--w-shadow); color: var(--w-ink);
  }
  #screen-audit .audit-total::before { display: none; }
  #screen-audit .audit-total.is-short {
    background: var(--w-panel); box-shadow: inset 2px 0 0 var(--w-bad);
  }
  #screen-audit .audit-total-label,
  #screen-audit .audit-total-k { color: var(--w-ink-3); }
  #screen-audit .audit-total-value,
  #screen-audit .audit-total-v { color: var(--w-ink); }
  #screen-audit .audit-total-sub { color: var(--w-ink-3); }
  #screen-audit .audit-total-split { border-top-color: var(--w-line); }
  /* The white-on-tint override existed because the card used to be solid
     brand colour; it is a plain panel now, so the ordinary neg/pos colours
     read correctly again without it. */
  #screen-audit .audit-total-v.audit-neg { color: var(--w-bad); }
  #screen-audit .audit-total-v.audit-pos { color: var(--w-good); }

  #screen-audit .audit-tile { background: var(--w-panel); border-color: var(--w-line); box-shadow: var(--w-shadow); }
  #screen-audit .audit-tile-missing { border-color: var(--w-line); box-shadow: inset 2px 0 0 var(--w-bad); }
  #screen-audit .audit-tile-over { border-color: var(--w-line); box-shadow: inset 2px 0 0 var(--w-good); }
  #screen-audit .audit-bd { background: var(--w-panel); border-color: var(--w-line); box-shadow: var(--w-shadow); }

  /* No row in this table carries a header naming System/Counted/Diff/
     $-per-unit/Value — the five-cell label row exists in every single row's
     markup already (.audit-cell-label), just switched off at this width.
     Turning it on for only the first row of each chemical group gives every
     group its own caption without a single new element: cheap, because the
     chemical catalog is tens of rows, not thousands — this is not the fix
     Reports and Customers needed, and would not be enough for a list that
     size. */
  #screen-audit .audit-group-body > .audit-row:first-child .audit-cell-label {
    display: block;
  }


  /* ═══════════════════════════════════════════════════════════════════════
     CLIENT SEASONAL DATA — who is actually worth keeping
     ═══════════════════════════════════════════════════════════════════════ */

  /* The season's own total sat at the FOOT of the list, which is backwards
     for a screen whose whole point is "read the shape before the rows" —
     and it is already real markup, not a card, so no restructuring was
     needed: #szn-list's three kinds of child (the header, the season total,
     each customer's row) get reordered with flexbox `order`, which does not
     touch the DOM app.js built, only where each piece paints. */
  #szn-list { display: flex; flex-direction: column; }
  #screen-seasonal .szn-head { order: -2; position: sticky; top: 0; z-index: 2; background: var(--w-ground); }
  #screen-seasonal .szn-total {
    order: -1; margin: 0 0 var(--w-4);
    background: var(--w-panel); border: 1px solid var(--w-line);
    border-radius: var(--w-r-panel); box-shadow: var(--w-shadow);
  }

  /* The actual bug the brief named: Billed and Chemicals sat under their own
     column headers but rendered left-aligned, so the row read as three
     numbers in a line with nothing to say which was which. Profit was
     already right-aligned; these two were not. */
  #screen-seasonal .szn-money { text-align: right; }

  /* The expanded visit-by-visit breakdown inside each customer's <details>
     has the same four columns and never had alignment rules at all — bare
     spans, not .szn-money. Reached structurally, by position, since that is
     the only hook that exists: column 1 is the date, 2-4 are money. */
  #screen-seasonal .szn-visit-row > span:nth-child(2),
  #screen-seasonal .szn-visit-row > span:nth-child(3),
  #screen-seasonal .szn-visit-row > span:nth-child(4) {
    text-align: right; font-variant-numeric: tabular-nums;
  }


  /* ═══════════════════════════════════════════════════════════════════════
     ADMIN — mostly owner-only; Hours is the one tab office actually lives in
     ═══════════════════════════════════════════════════════════════════════ */

  /* Hours (both the live "on the clock" table and the period table) is the
     one Admin tab office has under Can.js — treated like a daily screen. */
  #screen-admin .hv-tbl th { position: sticky; top: 0; z-index: 2; background: var(--w-ground); }
  #screen-admin .hv-tbl tbody tr:hover td { background: var(--w-hover); }
  #screen-admin .hv-sum td { background: var(--w-raised); }

  /* Who is on the clock right now is the first thing anyone opening this
     tab wants, and it already renders first — just give it the same
     row-in-a-panel treatment as everything else instead of a loose stack of
     cards, since a crew of twenty-plus technicians puts twenty rows here
     every single morning. */
  #screen-admin #admin-onclock .oc-list {
    background: var(--w-panel); border: 1px solid var(--w-line);
    border-radius: var(--w-r-panel); box-shadow: var(--w-shadow); overflow: hidden;
  }
  #screen-admin .oc { border-bottom: 1px solid var(--w-line-2); border-radius: 0; margin: 0; }
  #screen-admin .oc:last-child { border-bottom: 0; }

  /* Users, Suppliers, Order Needed: owner-only surfaces, light density pass
     only — tightened to the same hairline rhythm as the rest of the office
     system rather than restyled from scratch, since nobody runs a day from
     here the way they do from Schedule or Billing. */
  #screen-admin .user-row,
  #screen-admin .order-row { border-bottom-color: var(--w-line-2); }
  #screen-admin .supplier-card { background: var(--w-raised); border-color: var(--w-line); }
}
