/* Trimmed to the framework-required rules only.
   MudBlazor handles app-wide styling; the rest of the original Blazor template
   CSS was unused and has been removed. */

/* WBI2 purchasing reports use Thistle for Local POs. Keep this business color separate
   from the module accent; consumers blend the tint over the current light/dark surface. */
:root { --rpt-local-po: #D8BFD8; }

/* Brand fonts, SELF-HOSTED (wwwroot/fonts). Previously pulled from fonts.googleapis.com via
   two render-blocking <link rel="stylesheet"> tags in index.html — which are UNREACHABLE from
   mainland China, so the Qingdao office's browsers stalled on them before painting a pixel.
   Same reasoning that already put msal-browser.min.js on our own origin.

   Google serves ONE variable woff2 per family covering the whole weight axis, so all four
   IBM Plex Sans weights (and both JetBrains Mono weights) resolve to a single file each —
   77 KB total, downloaded once, then cached. We mirror Google's per-weight @font-face
   declarations exactly so rendering is unchanged; the browser fetches each file only once.

   Dropped entirely: Roboto (MudBlazor's default — referenced nowhere in our CSS or theme)
   and IBM Plex Mono (likewise unused; .rcm-mono uses JetBrains Mono). */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-sans.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-sans.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/ibm-plex-sans.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/ibm-plex-sans.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/jetbrains-mono.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/jetbrains-mono.woff2') format('woff2'); }

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* ── Rochem branded loading (RochemSpinner.razor + the WASM boot screen) ─────────────
   One visual language for every wait state: Rochem wordmark, brand-green ring, quiet label.
   The boot screen in index.html reuses these classes before Blazor starts, so they must
   stay in this global stylesheet (not a scoped component style). */
.rochem-spinner.rs-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 0;
}

.rochem-spinner.rs-inline {
    display: inline-flex;
    align-items: center;
}

.rochem-spinner .rs-logo {
    width: 160px;
    max-width: 60vw;
}

.rochem-spinner .rs-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rochem-spinner .rs-ring {
    width: 20px;
    height: 20px;
    flex: none;
    border: 3px solid color-mix(in srgb, var(--mud-palette-primary, #006b41) 18%, transparent);
    border-top-color: var(--mud-palette-primary, #006b41);
    border-radius: 50%;
    animation: rs-rotate 0.9s linear infinite;
}

.rochem-spinner.rs-inline .rs-ring {
    width: 16px;
    height: 16px;
    border-width: 2.5px;
}

.rochem-spinner .rs-label {
    font-size: 12.5px;
    color: var(--mud-palette-text-secondary, #6b7280);
}

@keyframes rs-rotate {
    to { transform: rotate(360deg); }
}

/* Boot screen (index.html #app placeholder). .loading-progress-text keeps Blazor's live
   load percentage: the runtime updates --blazor-load-percentage-text as assemblies stream in. */
.boot-loading {
    position: absolute;
    inset: 28vh 0 auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.loading-progress-text {
    font-size: 13px;
    color: #6b7280;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

    /* Set by the boot script after 20s. A bare spinner on a thin link reads as "it's broken";
       say what's happening instead. Blazor keeps updating the percentage underneath. */
    .loading-progress-text.boot-slow:after {
        content: var(--blazor-load-percentage-text, "Loading") " · slow connection, still loading";
    }

/* Terminal boot failure (all retries exhausted). Replaces the old behaviour, which was to leave
   a spinner up forever or flash Blazor's generic "An unhandled error has occurred" bar. */
.boot-failed-msg {
    font-size: 15px;
    font-weight: 600;
    color: var(--mud-palette-text-primary, #1f2937);
}

.boot-failed-hint {
    font-size: 13px;
    color: #6b7280;
    max-width: 30rem;
    text-align: center;
    line-height: 1.5;
}

.boot-retry {
    margin-top: 4px;
    background: #006b41;
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 8px 20px;
    font-family: 'IBM Plex Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

    .boot-retry:hover { background: #005433; }

/* Print: drop the app chrome so report pages (Commission Report, Open Order
   Report, etc.) print clean. Only applies while printing. */
@media print {
    .mud-appbar,
    .mud-drawer,
    .mud-overlay,
    .no-print {
        display: none !important;
    }

    .mud-main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* ════════════════════════════════════════════════════════════════════════
   Rochem Professional — design detail layer (Linear-inspired, dark-first).
   The MudTheme (Theme/RochemTheme.cs) owns color tokens; this layer owns
   density, hairlines, typography details, and shell character.
   ════════════════════════════════════════════════════════════════════════ */

/* ── Shell ──────────────────────────────────────────────────────────── */

/* Flat app bar: same surface as the page, separated by a hairline. */
.mud-appbar {
    box-shadow: none !important;
    border-bottom: 1px solid var(--mud-palette-divider);
    backdrop-filter: saturate(1.4) blur(8px);
}

/* Drawer: hairline edge, no shadow. */
.mud-drawer {
    box-shadow: none !important;
    border-right: 1px solid var(--mud-palette-divider);
}


/* Brand lockup in the app bar. */
.rcm-brand {
    font-family: 'IBM Plex Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
    font-weight: 700;
    letter-spacing: -.01em;
    font-size: 1rem;
    letter-spacing: .01em;
    line-height: 1;
    user-select: none;
}
.rcm-brand .rcm-brand-dot { color: var(--mud-palette-primary); }
.rcm-brand-sub {
    font-size: .625rem;
    font-weight: 500;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    line-height: 1;
    margin-top: 3px;
}

/* rochem-tasks#1905: "Viewing as" sits in the app bar, impossible to miss, theme tokens only. */
.rcm-view-as {
    display: inline-flex;
    align-items: center;
    padding: 2px 4px 2px 10px;
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 600;
    white-space: nowrap;
    background: var(--mud-palette-warning);
    color: var(--mud-palette-warning-contrast-text);
}

/* Subtle atmosphere: a faint green wash from the top in dark mode only. */
.rcm-dark .mud-main-content {
    background:
        radial-gradient(1200px 360px at 18% -120px, rgba(0,181,111,0.055), transparent 70%),
        var(--mud-palette-background);
    min-height: 100vh;
}

/* ── Navigation ─────────────────────────────────────────────────────── */

.mud-navmenu .mud-nav-link,
.mud-navmenu .mud-nav-group > .mud-nav-link {
    min-height: 34px;
    padding-top: 4px;
    padding-bottom: 4px;
    font-size: .8125rem;
    border-radius: 6px;
    margin: 1px 8px;
    width: auto;
}
.mud-navmenu .mud-nav-group .mud-nav-link { font-size: .8125rem; }

/* Active link: tinted pill + accent bar — the single strongest cue in the shell. */
.mud-navmenu .mud-nav-link.active {
    background: color-mix(in srgb, var(--mud-palette-primary) 14%, transparent);
    color: var(--mud-palette-primary) !important;
    font-weight: 500;
    position: relative;
}
.mud-navmenu .mud-nav-link.active::before {
    content: "";
    position: absolute;
    left: -8px; top: 7px; bottom: 7px;
    width: 3px;
    border-radius: 2px;
    background: var(--mud-palette-primary);
}

/* ── Vibrant SaaS: per-module accent wayfinding (accent + tint come inline from
   ModuleAccents via --nav-accent / --nav-tint on each top-level item; they cascade
   to that module's children). Icon → a small gradient "icon tile"; the active item
   glows in its module tint so you always know which module you're in. ───────────── */

/* Top-level module icon → rounded gradient tile with a white glyph, in BOTH the
   expanded menu and (below) the collapsed rail. Scoped to the LEADING icon only —
   `:not(.mud-nav-link-expand-icon)` excludes the group's expand/collapse chevron, which
   is also a .mud-icon-root and would otherwise render as a stray colored square.
   rochem-tasks#692: the Class we pass lands on DIFFERENT elements for the two nav kinds —
   on a MudNavGroup it's the `.mud-nav-group`, but on a MudNavLink leaf (the top-level Home
   item) it's the wrapping `.mud-nav-item`, NOT the inner `.mud-nav-link`. So the leaf half
   has to match `.mud-nav-item.rcm-nav-top > .mud-nav-link`; the old `.mud-nav-link.rcm-nav-top`
   never matched, leaving Home a bare 24px grey glyph a couple px off the tiled group icons. */
.mud-navmenu .mud-nav-item.rcm-nav-top > .mud-nav-link .mud-icon-root:not(.mud-nav-link-expand-icon),
.mud-navmenu .mud-nav-group.rcm-nav-top > .mud-nav-link .mud-icon-root:not(.mud-nav-link-expand-icon) {
    width: 26px; height: 26px; padding: 5px;
    border-radius: 7px;
    color: #fff;
    background: linear-gradient(140deg, var(--nav-accent), color-mix(in srgb, var(--nav-accent) 62%, #000));
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    flex: 0 0 auto;
    transition: transform .15s ease, box-shadow .15s ease;
}
.mud-navmenu .mud-nav-item.rcm-nav-top > .mud-nav-link:hover .mud-icon-root:not(.mud-nav-link-expand-icon),
.mud-navmenu .mud-nav-group.rcm-nav-top > .mud-nav-link:hover .mud-icon-root:not(.mud-nav-link-expand-icon) {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px color-mix(in srgb, var(--nav-accent) 45%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
/* The expand/collapse chevron stays a plain, muted arrow — never a tile. */
.mud-navmenu .mud-nav-group.rcm-nav-top > .mud-nav-link .mud-nav-link-expand-icon {
    background: none;
    color: var(--mud-palette-drawer-icon);
    width: 24px; height: 24px; padding: 0; border-radius: 0; box-shadow: none;
}

/* Top-level hover (non-active): a whisper of the module accent. */
.mud-navmenu .mud-nav-item.rcm-nav-top > .mud-nav-link:not(.active):hover,
.mud-navmenu .mud-nav-group.rcm-nav-top > .mud-nav-link:not(.active):hover {
    background: color-mix(in srgb, var(--nav-accent) 8%, transparent);
    color: var(--mud-palette-text-primary) !important;
}

/* Top-level active: module tint pill + accent text + accent edge bar. */
.mud-navmenu .mud-nav-item.rcm-nav-top > .mud-nav-link.active,
.mud-navmenu .mud-nav-group.rcm-nav-top > .mud-nav-link.active {
    background: var(--nav-tint);
    color: var(--nav-accent) !important;
}
.mud-navmenu .mud-nav-item.rcm-nav-top > .mud-nav-link.active::before,
.mud-navmenu .mud-nav-group.rcm-nav-top > .mud-nav-link.active::before {
    background: var(--nav-accent);
}

/* Children stay quiet: no tile, just a hint of the inherited parent accent on
   hover/active so the family reads together without shouting. */
.mud-navmenu .rcm-nav-child.mud-nav-link:not(.active):hover,
.mud-navmenu .rcm-nav-child.mud-nav-group > .mud-nav-link:not(.active):hover {
    background: color-mix(in srgb, var(--nav-accent) 7%, transparent);
    color: var(--mud-palette-text-primary) !important;
}
.mud-navmenu .rcm-nav-child.mud-nav-link.active,
.mud-navmenu .rcm-nav-child.mud-nav-group > .mud-nav-link.active {
    background: color-mix(in srgb, var(--nav-accent) 13%, transparent);
    color: var(--nav-accent) !important;
}
.mud-navmenu .rcm-nav-child.mud-nav-link.active::before,
.mud-navmenu .rcm-nav-child.mud-nav-group > .mud-nav-link.active::before {
    background: var(--nav-accent);
}

/* ── Surfaces: borders do the work, not shadows ─────────────────────── */

.mud-paper:not(.mud-dialog):not(.mud-menu-paper):not(.mud-popover):not(.mud-alert) {
    box-shadow: none !important;
    border: 1px solid var(--mud-palette-divider);
}

/* ── Tables / grids: the ERP heart ──────────────────────────────────── */

.mud-table { border-radius: 8px; }
.mud-table-container { border-radius: inherit; }

.mud-table .mud-table-cell,
.mud-simple-table td, .mud-simple-table th {
    font-variant-numeric: tabular-nums lining-nums;  /* money columns align */
    padding: 6px 12px;
    font-size: .875rem;
}

.mud-simple-table thead th, .mud-table-head .mud-table-cell {
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    background: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    position: sticky; top: 0; z-index: 2;
    white-space: nowrap;
}

.mud-simple-table tbody tr:hover td,
.mud-table-body .mud-table-row:hover .mud-table-cell {
    background: var(--mud-palette-table-hover);
}

/* Identifiers (PO numbers, part numbers, GUIDs) read better in mono. */
.rcm-mono { font-family: 'JetBrains Mono', Consolas, monospace; font-size: .785rem; }

/* ── KPI / stat cards ───────────────────────────────────────────────── */

.rcm-kpi-label {
    font-size: .6875rem;
    font-weight: 500;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}
.rcm-kpi-value {
    font-family: 'IBM Plex Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    line-height: 1.15;
    font-variant-numeric: tabular-nums lining-nums;
    letter-spacing: -.01em;
}

/* ── Page header band (PageHeader.razor) ────────────────────────────── */

.rcm-page-header {
    /* --page-accent is set inline by PageHeader.razor (resolved from ModuleAccents by route);
       falls back to brand primary if a header renders without it. */
    --_acc: var(--page-accent, var(--mud-palette-primary));
    position: relative;
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    /* rochem-tasks#975 - 12px of padding plus 16px of margin under every page title is 28px of
       air before the screen's own content starts, on every page in the app. The band keeps its
       divider, its accent edge and its kicker; it just stops being 54px tall to say one word. */
    padding-bottom: 2px; margin-bottom: 4px;
    border-bottom: 1px solid var(--mud-palette-divider);
}
/* The kicker sat ABOVE the title, so the band was two stacked lines. Side by side it is one,
   which is 22px back on every page in the app and loses nothing - both are still there, still
   in the module accent, still in the same reading order (rochem-tasks#975). */
.rcm-page-header { align-items: center; }
.rcm-page-header > div:first-child {
    display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0;
}
/* h4 is 2.125rem, set for a page title standing alone. Beside the kicker on a one-line band it
   only needs to be the largest thing on the row. */
.rcm-page-header .mud-typography-h4 { font-size: 1.45rem; line-height: 1.25; }
/* ...but the subtitle is a whole sentence (57 pages carry one) and belongs UNDER the title, not
   wrapped onto the end of it. Full-width basis keeps it on its own line inside the same flex row. */
/* rochem-tasks#934/#1093 (JJ, 2026-09-24): "where the report starts is very badly formatted".
   The subtitle is help text — Purchasing Inventory's runs to three lines — and it reprints above
   the data on every visit. One line, with the rest on hover; the sentence is still in the DOM for
   anyone reading the page aloud. */
.rcm-page-header .rcm-page-subtitle {
    flex-basis: 100%; margin-top: 0 !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
/* rochem-tasks#934 (JJ, 2026-09-25): the filters live IN the header band. On a wide screen that
   band was a title and then empty space, while the filters sat below it in a card of their own --
   a border, its padding, a row for the Filters button and another for Clear all, all to show one
   row of boxes. In here they cost nothing: the band is already on the page.

   `display: contents` on the bar's own wrappers is what makes it one dynamic row rather than three
   stacked ones -- the toggle, every field and the Clear all tail become direct children of the same
   wrapping flex row, so they fill the width available and wrap only when they genuinely run out.
   The collapsed rule is repeated at higher specificity, or contents would defeat it and the narrow
   layout could never fold the filters away. */
.rcm-page-filters { flex: 1 1 560px; min-width: 0; display: flex; align-items: center; }
/* A relocated report/grid search takes its own first row ahead of the precise filters. */
.rcm-page-filters:has(> .rv-search-external),
.rcm-page-filters:has(> .wg-search-external) { flex-wrap: wrap; }
/* A header that carries filters keeps its back link and gives the rest of the band to them: the
   title is already on the browser tab, on the app's tab strip and in the report's headline row
   below (JJ, 2026-09-25). Hidden, not removed -- a page read aloud still announces its name. */
.rcm-titleless .mud-typography-h4,
.rcm-titleless .rcm-page-subtitle {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.rcm-titleless > div:first-child { flex: 0 0 auto; }
/* ...and the back link with it (JJ, 2026-09-25). The module is one click away on the app's own tab
   strip and in the left rail; here it was the last thing between the filters and one row. */
/* Both selectors below are (0,2,0) and `.rcm-page-header .rcm-page-back` comes later in this
   file, so it won on order and the link stayed on screen. Matching the band's own class as well
   settles it by specificity rather than by who is further down. */
.rcm-page-header.rcm-titleless .rcm-page-back { display: none; }
.rcm-titleless > div:first-child:empty, .rcm-titleless .rcm-page-titlerow { margin: 0; padding: 0; }
.rcm-page-filters .wbi3-filterbar {
    flex: 1 1 auto; min-width: 0;
    display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px;
}
.rcm-page-filters .wbi3-filterbar .fb-fields,
.rcm-page-filters .wbi3-filterbar .fb-always { display: contents; }
.rcm-page-filters .wbi3-filterbar .fb-fields.fb-collapsed { display: none; }
/* rochem-tasks#1271: filters LEFT, view controls and the page's buttons RIGHT -- the same order as
   the bar everywhere else. With the wrappers flattened, the view controls sat in DOM order straight
   after the Filters button, so on Plan/Actual the filters flowed in to the right of them. Ordering
   them last puts them at the end of the row, pushed right by fb-view's own margin-left:auto. */
.rcm-page-filters .wbi3-filterbar .fb-view,
.rcm-page-filters .wbi3-filterbar .fb-actions { order: 2; }
.rcm-page-filters .wbi3-filterbar .fb-always:not(:has(.fb-view)) .fb-actions { margin-left: auto; }
/* rochem-tasks#1271: the same on an ordinary bar. A page that renders Wbi3FilterBar itself with no
   ViewControls (Items in Staging) has no fb-view to push its buttons right, so Excel sat on the
   LEFT, straight after the search box. A bar inside Wbi3SearchView always has an fb-view and is
   untouched by this. */
.wbi3-filterbar .fb-always:not(:has(.fb-view)) > .fb-actions { margin-left: auto; }
/* No card chrome in here -- the band is the container now. */
.rcm-page-filters .wbi3-filterbar .fb-fields { padding: 0 !important; }
.rcm-page-filters .wbi3-filterbar .fb-tail { margin-left: 0; padding-bottom: 0; }
.rcm-page-filters .wbi3-filterbar .fb-chips { padding: 0; }
/* The header band grows to hold whatever the bar wraps to, instead of the title row stretching. */
.rcm-page-header:has(.rcm-page-filters) { align-items: center; padding-top: 2px; }

/* Thin module-accent edge riding on top of the divider — the band reads as this module's. */
.rcm-page-header::after {
    content: ""; position: absolute; left: 0; bottom: -1px;
    width: 44px; height: 2px; border-radius: 2px;
    background: var(--_acc);
}
.rcm-page-header .rcm-page-kicker {
    font-size: .6875rem; font-weight: 500; letter-spacing: .14em;
    text-transform: uppercase; color: var(--_acc);
    margin-bottom: 0;
}
/* rochem-tasks#934: the back link that stands in for the kicker on filter-bar screens —
   naming the parent menu it returns to. JJ, 2026-09-17: INLINE with the title, not above it; a
   whole row of page height for one word was the single easiest 30px to give back to the grid.
   It wraps above the title on a narrow screen rather than squeezing the title. */
.rcm-page-header .rcm-page-titlerow {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px;
}
.rcm-page-header .rcm-page-back {
    display: inline-flex; align-items: center; gap: 2px;
    font-size: .8125rem; font-weight: 500; color: var(--_acc);
    text-decoration: none; margin-left: -4px; flex: none;
}
.rcm-page-header .rcm-page-back:hover { text-decoration: underline; }

/* ── Module cards (Home) ────────────────────────────────────────────────
   Vibrant SaaS: each card wears its module accent (from --card-accent, resolved by
   ModuleAccents on the page). Icon becomes a gradient tile; the top edge and hover
   glow pick up the accent — Home reads as colour-coded by area. Falls back to brand
   green when a card sets no accent. */

.rcm-module-card {
    --_acc: var(--card-accent, var(--mud-palette-primary));
    border: 1px solid var(--mud-palette-divider);
    border-top: 2px solid color-mix(in srgb, var(--_acc) 42%, var(--mud-palette-divider));
    border-radius: 10px;
    padding: 13px 16px 14px;
    background: var(--mud-palette-surface);
    cursor: pointer;
    transition: border-color .15s ease, transform .15s ease, background .15s ease, box-shadow .15s ease;
    height: 100%;
    display: flex; flex-direction: column; gap: 6px;
}
.rcm-module-card:hover {
    border-color: color-mix(in srgb, var(--_acc) 55%, var(--mud-palette-divider));
    border-top-color: var(--_acc);
    background: color-mix(in srgb, var(--_acc) 5%, var(--mud-palette-surface));
    box-shadow: 0 4px 14px color-mix(in srgb, var(--_acc) 16%, transparent);
    transform: translateY(-1px);
}
.rcm-module-card .rcm-module-icon {
    width: 34px; height: 34px; border-radius: 9px;
    display: grid; place-items: center;
    color: #fff;
    background: linear-gradient(140deg, var(--_acc), color-mix(in srgb, var(--_acc) 62%, #000));
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    margin-bottom: 2px;
}
.rcm-module-card .rcm-module-icon .mud-icon-root { color: #fff; font-size: 1.125rem; }
.rcm-module-card .rcm-module-name {
    font-family: 'IBM Plex Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
    font-weight: 700; font-size: .9375rem; letter-spacing: -.01em;
}
.rcm-module-card .rcm-module-meta {
    font-size: .75rem; color: var(--mud-palette-text-secondary);
}

/* ── Home hero (the single gradient personality moment) ─────────────────── */
.rcm-home-hero {
    position: relative;
    padding: 20px 24px;
    border-radius: 14px;
    border: 1px solid var(--mud-palette-divider);
    background:
        radial-gradient(720px 200px at 0% -40%, color-mix(in srgb, var(--mud-palette-primary) 16%, transparent), transparent 72%),
        linear-gradient(135deg, color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-surface)), var(--mud-palette-surface) 60%);
    overflow: hidden;
}
.rcm-home-hero::after {   /* brand gradient edge, left */
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, var(--mud-palette-primary), var(--mud-palette-secondary));
}
.rcm-home-hero-kicker {
    font-size: .6875rem; font-weight: 600; letter-spacing: .14em;
    text-transform: uppercase; color: var(--mud-palette-primary);
    margin-bottom: 4px;
}
.rcm-home-hero-title { margin: 0; }

/* ── Home empty state ───────────────────────────────────────────────────── */
.rcm-home-empty {
    text-align: center;
    padding: 44px 20px;
    border: 1px dashed var(--mud-palette-divider);
    border-radius: 12px;
    background: var(--mud-palette-surface);
}
.rcm-home-empty-icon {
    width: 54px; height: 54px; margin: 0 auto 12px;
    border-radius: 14px; display: grid; place-items: center;
    color: #fff;
    background: linear-gradient(140deg, var(--mud-palette-secondary), var(--mud-palette-primary));
    box-shadow: 0 2px 8px color-mix(in srgb, var(--mud-palette-primary) 22%, transparent);
}
.rcm-home-empty-icon .mud-icon-root { color: #fff; font-size: 1.6rem; }
.rcm-home-empty-title { font-weight: 700; font-size: 1rem; }
.rcm-home-empty-text { color: var(--mud-palette-text-secondary); font-size: .875rem; margin-top: 4px; }

/* Staggered entrance for the Home grid — one orchestrated moment, then calm. */
@keyframes rcm-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rcm-rise { animation: rcm-rise .35s cubic-bezier(.21,.61,.35,1) backwards; }

/* ── Module-accent dashboard primitives (bespoke pages off the shared shells) ──
   Reusable Vibrant-SaaS pieces for dashboard pages NOT on the ReportView/SearchView
   shells. The consumer sets --rcm-accent inline from ModuleAccents.HexFor(<module key>)
   (never an inline hex); these rules derive the tint, edge and accent numbers from it,
   matching the ReportView KPI look so bespoke dashboards read as the same system.
   Falls back to brand primary when no accent is set. */

/* Thin module-accent top edge for a filter / toolbar panel. */
.rcm-accent-panel {
    --_acc: var(--rcm-accent, var(--mud-palette-primary));
    position: relative;
    overflow: hidden;
}
.rcm-accent-panel::before {
    content: ""; position: absolute; left: 0; top: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--_acc), color-mix(in srgb, var(--_acc) 35%, transparent));
}

/* KPI / summary strip of stat cards — soft module-tint fill + accent left edge. */
.rcm-kpi-strip { display: flex; flex-wrap: wrap; gap: 12px; }
/* Trimmed 2026-09-28 (rochem-tasks#1139). JJ: "the commission is just too large." Five numbers
   were taking 76px of a 1000px screen before the grid started -- the number is the thing worth
   reading, not the box around it. Padding 10/14 -> 5/10 and the value 1.35rem -> 1.05rem takes the
   strip to about 44px. Used by Commissions and BU Plan vs Actual, and nothing else. */
.rcm-kpi-card {
    --_acc: var(--rcm-accent, var(--mud-palette-primary));
    flex: 1 1 150px;
    display: flex; flex-direction: column; gap: 1px;
    padding: 5px 10px;
    border-radius: 10px;
    border: 1px solid var(--mud-palette-divider);
    border-left: 3px solid var(--_acc);
    background: color-mix(in srgb, var(--_acc) 6%, var(--mud-palette-surface));
}
.rcm-kpi-card .rcm-kpi-card-label {
    font-size: .6875rem; font-weight: 500; letter-spacing: .06em;
    text-transform: uppercase; color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}
.rcm-kpi-card .rcm-kpi-card-value {
    font-family: 'IBM Plex Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
    font-weight: 700; font-size: 1.05rem; line-height: 1.15;
    font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.01em;
}
/* The headline (hero) card carries the accent number + a soft accent gradient — the one
   deliberate personality moment on the page. */
.rcm-kpi-card.rcm-kpi-hero {
    background:
        radial-gradient(340px 120px at 100% 0%, color-mix(in srgb, var(--_acc) 14%, transparent), transparent 70%),
        color-mix(in srgb, var(--_acc) 9%, var(--mud-palette-surface));
}
.rcm-kpi-card.rcm-kpi-hero .rcm-kpi-card-value { color: var(--_acc); }

/* Section-header accent for a bespoke subtotal table (MudSimpleTable). */
.rcm-accent-table thead th {
    border-bottom: 2px solid color-mix(in srgb, var(--rcm-accent, var(--mud-palette-primary)) 45%, var(--mud-palette-divider));
}
/* Group-header rows wear a faint module wash + accent top hairline; the chevron is the accent. */
.rcm-group-row > td {
    background: color-mix(in srgb, var(--rcm-accent, var(--mud-palette-primary)) 7%, transparent) !important;
    border-top: 1px solid color-mix(in srgb, var(--rcm-accent, var(--mud-palette-primary)) 22%, var(--mud-palette-divider));
}
.rcm-group-row .rcm-group-chevron { color: var(--rcm-accent, var(--mud-palette-primary)); }

/* ── WBI2 inbound-shipment status codes ───────────────────────────────────────
   The legacy Alpha (WBI2) recognition hues for the Inbound Shipments grid — Contract=blue,
   Signed PO=gold, Order Confirmed=lime, Confirmed MFG PO=pink. These are FIXED brand-
   recognition colors carried over from WBI2 so long-time users read the grid at a glance;
   they are intentionally identical in dark + light (a bright band with black ink, legible on
   both surfaces). Centralized here so the legend chips and the per-cell highlights share one
   source of truth and a single edit re-tints both — no inline hex on the page. */
:root {
    --wbi2-code-contract:  #00ccff;  /* Contract         (PO # · IsConfirmed) */
    --wbi2-code-signed:    #ffc760;  /* Signed PO        (PO Date · IsSigned) */
    --wbi2-code-confirmed: #00ff00;  /* Order Confirmed  (Req Ship · IsConfirmed) */
    --wbi2-code-mfg:       #ff99cc;  /* Confirmed MFG PO (ETD · IsConfirmedByMfr) */
    --wbi2-code-ink:       #000;     /* black ink — legible on every band, both themes */
}

/* On-brand loading / empty / message panel for embed pages (Analytics Power BI). */
.rcm-embed-state {
    --_acc: var(--rcm-accent, var(--mud-palette-primary));
    max-width: 560px; margin: 56px auto; text-align: center;
    padding: 40px 28px; border-radius: 16px;
    border: 1px solid var(--mud-palette-divider);
    background:
        radial-gradient(620px 200px at 50% -30%, color-mix(in srgb, var(--_acc) 12%, transparent), transparent 70%),
        var(--mud-palette-surface);
}
.rcm-embed-state-icon {
    width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 15px;
    display: grid; place-items: center; color: #fff;
    background: linear-gradient(140deg, var(--_acc), color-mix(in srgb, var(--_acc) 58%, #000));
    box-shadow: 0 3px 12px color-mix(in srgb, var(--_acc) 26%, transparent);
}
.rcm-embed-state-icon .mud-icon-root { color: #fff; font-size: 1.7rem; }
.rcm-embed-state-title { font-weight: 700; font-size: 1.05rem; }
.rcm-embed-state-text {
    color: var(--mud-palette-text-secondary); font-size: .875rem; margin-top: 6px;
    max-width: 42ch; margin-left: auto; margin-right: auto;
}
.rcm-embed-state-bar { max-width: 240px; margin: 18px auto 0; }
/* Recolor a MudProgressLinear to the module accent (used inside the loading state). */
.rcm-accent-progress .mud-progress-linear-bar { background-color: var(--rcm-accent, var(--mud-palette-primary)) !important; }

/* Tinted dialog title bar — a soft module-accent wash + accent underline on a bespoke
   dialog's header, so an edit/notes/upload dialog reads as *this module's* dialog. The
   consumer sets --rcm-accent inline on <MudDialog Style="…"> (never an inline hex); falls
   back to brand primary. Scoped under .rcm-dialog-accent so no other dialog is touched. */
.rcm-dialog-accent .mud-dialog-title {
    --_acc: var(--rcm-accent, var(--mud-palette-primary));
    background: color-mix(in srgb, var(--_acc) 8%, var(--mud-palette-surface));
    border-bottom: 2px solid color-mix(in srgb, var(--_acc) 45%, var(--mud-palette-divider));
    display: flex; align-items: center; gap: 8px;
}
/* The accent bullet before the title text — the one small personality mark on the header. */
.rcm-dialog-accent .mud-dialog-title::before {
    content: ""; flex: 0 0 auto; width: 4px; height: 18px; border-radius: 2px;
    background: var(--_acc);
}

/* Inline error banner — a soft error-tint fill + error accent edge, derived from the
   theme's error token so it reads correctly in dark AND light (replaces the hardcoded
   #ffe5e5 / #c00 light-only banner). Text stays on the theme text color. Consumers keep
   their own padding / font-size. */
.rcm-error-banner {
    background: color-mix(in srgb, var(--mud-palette-error) 12%, var(--mud-palette-surface));
    border-left: 3px solid var(--mud-palette-error);
    border-radius: 6px;
    color: var(--mud-palette-text-primary);
}

/* Inline warning banner — the warning-tint sibling of .rcm-error-banner, derived from the
   theme's warning token so it reads correctly in dark AND light. Text stays on the theme
   text color (white-on-solid-amber failed contrast in dark). Consumers keep padding / font. */
.rcm-warn-banner {
    background: color-mix(in srgb, var(--mud-palette-warning) 14%, var(--mud-palette-surface));
    border-left: 3px solid var(--mud-palette-warning);
    border-radius: 6px;
    color: var(--mud-palette-text-primary);
}

/* ── Quiet scrollbars ───────────────────────────────────────────────── */

* { scrollbar-width: thin; scrollbar-color: var(--mud-palette-lines-inputs) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
    background: var(--mud-palette-lines-inputs);
    border-radius: 6px; border: 2px solid transparent; background-clip: content-box;
}
*::-webkit-scrollbar-track { background: transparent; }

/* ── Misc de-AI-ification ───────────────────────────────────────────── */

.mud-button-root { letter-spacing: 0; }            /* no shouty buttons */
.mud-chip { font-weight: 500; }

/* ── Status pills & tint chips (Vibrant SaaS) ──────────────────────────
   Tinted-background chips: a soft ~14% wash of the semantic color behind
   the semantic-colored label + a small leading dot. Rendered as MudChip
   Variant.Text, so the chip root's `color` is the palette color and both
   the tint and the dot derive from `currentColor` — one rule fits every
   semantic color, and a single palette edit re-tints them all. The
   three-class selector clears MudBlazor's own text-variant background
   (app.css loads before MudBlazor.min.css). Status pills are static
   (non-clickable), so MudBlazor's .mud-clickable hover rules never apply. */
.mud-chip.mud-chip-text.wbi3-tint-chip {
    background-color: color-mix(in srgb, currentColor 14%, transparent);
    font-weight: 600;
    letter-spacing: .01em;
}
.mud-chip.mud-chip-text.wbi3-tint-chip .mud-chip-content::before {
    content: "";
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    margin-right: 6px;
    border-radius: 50%;
    background-color: currentColor;
}
.mud-input, .mud-input-label, .mud-select { font-size: .8438rem; }

/* ── Workspace tab strip (WBI2 panes parity) ────────────────────────── */

.rcm-tabstrip {
    display: flex; align-items: stretch; gap: 2px;
    border-bottom: 1px solid var(--mud-palette-divider);
    /* Bleed to the container's edges. The TOP figure must cancel MainLayout's MudContainer top
       padding EXACTLY -- it is what lifts the strip flush under the app bar -- so -4px pairs with
       pt-1 (4px). rochem-tasks#992: #975 changed that container from pt-4 to pt-1 and left
       this at -16px, which pulled 12px of a 28px strip up behind the fixed app bar. MW, from
       Sales Orders: "Why did my view get scrunched at the top where now i can not 'see' access
       the various tabs/windows." Her tabs were half a row tall and half of each one unclickable.
       The same fault was reported as rochem-tasks#998 ("top tools here are cut off") and #997 --
       it hit every page, not one. TabStripBleedMatchesPagePaddingTests fails if the two ever
       drift apart again. */
    margin: -4px -16px 16px -16px;
    padding: 0 8px;
    /* Recessed, so the active tab can sit ON the page surface and read as the front one.
       A tint alone could not carry this in light mode - 12% of the primary on white is close to
       invisible, which is why #285 came back after the first attempt (JJ, 2026-08-26: "make it
       clearer"). Contrast now comes from BOTH directions: the strip steps back, the active tab
       steps forward. That is the browser-tab convention, and it does not depend on colour, so it
       survives a theme where the accent happens to be low-contrast against the page. */
    background: color-mix(in srgb, var(--mud-palette-text-primary) 8%, var(--mud-palette-surface));
    /* 38px -> 28px (rochem-tasks#975). The tabs are 13px text; the rest was padding. */
    min-height: 28px;
    position: sticky; top: 0; z-index: 10;
}

/* rochem-tasks#1004 (DM): "the tabs are partially blocked by this Rochem-WBI3 ribbon".

   The strip's -16px top bleed above was calibrated against MudContainer's pt-4 (16px) in
   MainLayout. rochem-tasks#975 cut that gutter to pt-1 (4px) and left the bleed at -16px, so the
   strip now starts 12px ABOVE its content box -- i.e. underneath the fixed app bar, which is 39px
   tall (--mud-appbar-height 52px, less a quarter for Dense) and sits at z-index 1100 against the
   strip's 10. A 28px strip with its top 12px behind the brand lockup is exactly the screenshot.

   Scoped to .mud-main-content deliberately: the SAME strip also renders inside MobileShell's
   .m-content, which has different padding and an in-flow header that overlaps nothing. The base
   rule above is left untouched so that case keeps the behaviour it has today.

   top: MudBlazor's own dense-appbar expression rather than 0, so on a page that scrolls the strip
   parks at the app bar's lower edge instead of sliding back underneath it. */
.mud-main-content .rcm-tabstrip {
    margin-top: -4px;
    top: calc(var(--mud-appbar-height) - var(--mud-appbar-height) / 4);
}
.rcm-tabstrip-home {
    display: flex; align-items: center; padding: 0 10px; cursor: pointer;
    color: var(--mud-palette-text-secondary);
    border-bottom: 2px solid transparent;
}
.rcm-tabstrip-home.active {
    color: var(--mud-palette-primary);
    font-weight: 600;
    border-bottom: 3px solid var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
}
.rcm-tabstrip-scroll {
    display: flex; align-items: stretch; gap: 2px;
    /* Share the available width; wrap only when labels and close targets would be too small. */
    flex: 1; min-width: 0; flex-wrap: wrap;
}
.rcm-tab {
    display: flex; align-items: center; gap: 4px;
    flex: 1 1 72px; min-width: 72px; min-height: 28px;
    padding: 0 6px; cursor: pointer; user-select: none;
    font-size: .8125rem; white-space: nowrap;
    color: var(--mud-palette-text-secondary);
    border-bottom: 2px solid transparent;
    transition: background .12s ease, color .12s ease;
    max-width: 220px;
}
.rcm-tab:hover { background: var(--mud-palette-table-hover); color: var(--mud-palette-text-primary); }
/* rochem-tasks#285 (Sam Monaco): "hard to see what tab you are on" — with several tabs open, the
   old active treatment (2px border + a 5% primary tint) read almost identically to :hover's own
   text-color shift + neutral-gray tint, so a glance couldn't tell "this is active" from "this is
   what my cursor happens to be over". Widened to a clearly distinct look, still all theme tokens
   (no hardcoded hex) so it holds in both light and dark: a heavier bottom rule, a stronger
   primary-tinted background (12%, up from 5% — enough to read as "colored", not just "slightly
   less white"), and the tab itself lifted 1px so it visually sits above its neighbors. */
.rcm-tab.active {
    color: var(--mud-palette-text-primary);
    font-weight: 600;
    border-bottom: 3px solid var(--mud-palette-primary);
    /* The page surface, against the recessed strip - the active tab is the one joined to the
       content below it. Checked on staging in both themes: in light the strip goes grey and the
       active tab stays white; in dark it inverts and still reads first. A 30% primary tint was
       tried and rejected as too loud for a strip that is on every screen all day. */
    background: var(--mud-palette-surface);
    border-radius: 6px 6px 0 0;
    position: relative;
    top: -1px;
}
.rcm-tab.active:hover {
    /* Active stays visually senior to hover - the current tab must not change identity just
       because the pointer is resting on it. It keeps the surface and picks up only a hint. */
    background: color-mix(in srgb, var(--mud-palette-primary) 6%, var(--mud-palette-surface));
}
.rcm-tab-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rcm-tab-link, .rcm-tab-link:hover { color: inherit; text-decoration: none; line-height: 28px; }
/* rochem-tasks#1126 - the close control is a real button now, so it needs the button reset,
   and it gets a hit area instead of relying on the glyph. Two sizing faults were in here:
   it had no `flex: none` (its sibling .rcm-tab-stale does), so it was a shrinkable item in a
   220px-capped flex row; and its whole target was an 8px "x" plus 4px of padding, in a strip
   that #1022 and #1119 have both made denser. A click that misses lands on .rcm-tab behind it,
   which navigates to the tab you are already standing on - so a miss looks exactly like a
   button that did not work, which is what was reported.

   20x20 is the smallest comfortable target and it CANNOT grow the strip, which is worth
   showing rather than asserting: the old box was already 20px tall (font-size 1rem with
   line-height 1 = 16px, plus 2px of padding top and bottom), so the tallest thing in the
   row is unchanged. It is about 3px wider. The strip is 28px and nothing here sets a
   height - see the #992 note above, where 12px of it disappearing behind the app bar left
   MW with half-height tabs she could not click. */
.rcm-tab-close {
    flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px;
    font-size: 1rem; line-height: 1; border-radius: 4px;
    opacity: .45;
    /* button reset - inherit the tab's type, draw nothing of its own. */
    padding: 0; margin: 0; border: 0; background: none; color: inherit;
    font-family: inherit; cursor: pointer;
}
.rcm-tab-close:hover { opacity: 1; background: var(--mud-palette-lines-default); }
/* rochem-tasks#1514 - "open in a new window". Always on the tab you are on, so it can be found;
   on the others only under the pointer, so a full strip does not lose title width to it. */
.rcm-tab .rcm-tab-popout { visibility: hidden; }
.rcm-tab.active .rcm-tab-popout, .rcm-tab:hover .rcm-tab-popout, .rcm-tab-popout:focus-visible { visibility: visible; }
.rcm-tab-close:focus-visible {
    opacity: 1;
    outline: 2px solid var(--mud-palette-primary); outline-offset: -2px;
}
.rcm-tab-stale {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--mud-palette-warning); flex: none;
}
.rcm-tabstrip-home, .rcm-tabstrip-actions { flex-shrink: 0; }
.rcm-tab.dragging { opacity: .5; }
.rcm-tab.drop-target { outline: 2px solid var(--mud-palette-primary); outline-offset: -2px; }
.rcm-tab:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: -2px; }
.rcm-tabstrip-actions { display: flex; align-items: center; padding-left: 4px; }
.rcm-tab-pane { min-width: 0; }

/* Collapsed nav rail: center the icon-only items and the collapse toggle. */
.rcm-drawer-toggle {
    display: flex;
    justify-content: flex-end;
    padding: 4px 8px;
}
.mud-drawer-mini .rcm-drawer-toggle {
    justify-content: center;
}
.mud-drawer-mini .rcm-rail-item {
    justify-content: center;
}
/* rochem-tasks#692 (JAD's screenshot — this is the reported case): the top-level Home leaf renders
   as a MudNavLink, so in the mini rail its inner `.mud-nav-link` keeps the 16px horizontal padding +
   8px margin every nav-link carries, and its wrapping `.mud-nav-item` box is wider and shorter than
   the compact icon-button boxes the module GROUPS render as. Together those pushed the Home icon
   ~12px to the RIGHT of, and tighter to, the icon column below it. Match Home to the group buttons'
   54px footprint so every rail icon centers on one axis with even vertical spacing. */
.mud-drawer-mini .mud-nav-item.rcm-rail-item {
    width: 54px;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
}
.mud-drawer-mini .mud-nav-item.rcm-rail-item > .mud-nav-link {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 54px;
}

/* Collapsed rail: the module-accent gradient tile carries the wayfinding when there's
   no label. Accent comes inline from --nav-accent (ModuleAccents). */
.rcm-rail-item .mud-icon-root {
    width: 30px; height: 30px; padding: 6px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(140deg, var(--nav-accent), color-mix(in srgb, var(--nav-accent) 62%, #000));
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: transform .15s ease, box-shadow .15s ease;
}
.rcm-rail-item:hover .mud-icon-root {
    transform: translateY(-1px);
    box-shadow: 0 2px 7px color-mix(in srgb, var(--nav-accent) 50%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
/* Active rail leaf: an accent ring around the tile so the current module reads at a glance. */
.rcm-rail-item.mud-nav-link.active {
    background: transparent !important;
}
.rcm-rail-item.mud-nav-link.active::before { display: none; }
.rcm-rail-item.mud-nav-link.active .mud-icon-root {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--nav-accent) 55%, transparent), 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* ── Compact menu (rochem-tasks#1236) ─────────────────────────────────────────────────────────
   JJ, 2026-10-01: the open menu took 248px of every page, which on a laptop is room the grid
   needs. The drawer is now 192px (RochemTheme DrawerWidthLeft) and everything inside it is
   tightened to fit: smaller icon tiles, shorter rows, and MudBlazor's 36/48px child indents cut
   to 22/34px. Labels still read at 13px; a long child label wraps to a second line rather than
   being cut off with an ellipsis.

   Scoped to the OPEN desktop drawer only. The collapsed rail keeps its own rules above, and the
   mobile shell hosts NavMenu outside a drawer, so neither is touched. */
.mud-drawer--open .mud-navmenu .mud-nav-link,
.mud-drawer--open .mud-navmenu .mud-nav-group > .mud-nav-link {
    min-height: 28px;
    padding: 3px 6px 3px 8px;
    margin: 1px 6px;
}
.mud-drawer--open .mud-navmenu .mud-nav-link.active::before { left: -6px; top: 5px; bottom: 5px; }
.mud-drawer--open .mud-navmenu .mud-nav-link .mud-nav-link-text {
    margin-inline-start: 8px;
    line-height: 1.2;
    white-space: normal;
}
.mud-drawer--open .mud-navmenu .mud-nav-link .mud-icon-root { width: 18px; height: 18px; }
.mud-drawer--open .mud-navmenu .mud-nav-item.rcm-nav-top > .mud-nav-link .mud-icon-root:not(.mud-nav-link-expand-icon),
.mud-drawer--open .mud-navmenu .mud-nav-group.rcm-nav-top > .mud-nav-link .mud-icon-root:not(.mud-nav-link-expand-icon) {
    width: 20px; height: 20px; padding: 3px;
    border-radius: 6px;
}
.mud-drawer--open .mud-navmenu .mud-nav-group.rcm-nav-top > .mud-nav-link .mud-nav-link-expand-icon {
    width: 18px; height: 18px;
}
.mud-drawer--open .mud-navmenu .rcm-nav-child.mud-nav-link,
.mud-drawer--open .mud-navmenu .rcm-nav-child.mud-nav-group > .mud-nav-link { font-size: .78rem; }
/* Indents: same selector shape as MudBlazor's, one class more specific. */
.mud-drawer--open .mud-nav-group * .mud-navmenu .mud-nav-item .mud-nav-link,
.mud-drawer--open .mud-nav-group * .mud-navmenu > .mud-nav-group .mud-nav-link {
    padding-inline-start: 22px;
    padding-left: 22px;
    padding-inline-end: 6px;
}
.mud-drawer--open .mud-nav-group * .mud-navmenu > .mud-nav-group * .mud-navmenu .mud-nav-item .mud-nav-link,
.mud-drawer--open .mud-nav-group * .mud-navmenu > .mud-nav-group * .mud-navmenu > .mud-nav-group .mud-nav-link {
    padding-inline-start: 34px;
    padding-left: 34px;
}

/* Never scroll sideways: an open group can still make the column scroll vertically, and the
   scrollbar must not shove the labels out of view. */
.mud-drawer--open .mud-drawer-content {
    overflow-x: hidden;
    /* JJ, 2026-10-02: "there should not be a scroll" on the left. The rows spread to fill the
       column (below), so the closed menu always fits; an open group that does not fit still
       scrolls with the wheel, but no scrollbar is ever drawn or takes width. */
    display: flex;
    flex-direction: column;
    scrollbar-width: none;
}
.mud-drawer--open .mud-drawer-content::-webkit-scrollbar { display: none; }
.mud-drawer--open .mud-drawer-content > .mud-navmenu {
    /* rochem-tasks#1503: the spread is capped at 60px a row. Filling the whole column made a short
       menu (Fabio sees 4 sections) spread ~120px apart down the window. A full menu still fills the
       column at any normal height (19 rows x 60px = 1140px); a short one stacks at the top, spaced
       like the full menu on a 1080p screen. --nav-rows is the top-level count, set by NavMenu. */
    flex: 0 0 auto;
    min-height: min(100%, calc(var(--nav-rows, 99) * 60px));
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;   /* the top-level rows share that height */
}

/* rochem-tasks#1236, round 2 (JJ, 2026-10-01): "it should use that vertical space" -- the
   compact rows above left the bottom half of the column empty. The menu no longer collapses, so
   the column is the menu's for the whole height of the screen: top-level rows grow tall with
   bigger labels and icon tiles so the list fills it, while child rows stay tighter so an open
   group still fits. Width 176px (JJ, 2026-10-02: "could be smaller") still fits every top-level label on one line. Later rules, same specificity, so these win. */
.mud-drawer--open .mud-navmenu .mud-nav-item.rcm-nav-top > .mud-nav-link,
.mud-drawer--open .mud-navmenu .mud-nav-group.rcm-nav-top > .mud-nav-link {
    /* Sized to the window, not fixed: at 46px the 19 top-level rows ran ~30px past a 920px-tall
       window, the column grew a scrollbar, the 212px content no longer fit beside it and the
       whole menu slid sideways under the labels (JJ, 2026-10-02 screenshot). 19 rows share the
       height; never shorter than 30px or taller than 46px. */
    min-height: 30px;   /* the column's flex spreading (above) fills the height; this is the floor */
    padding: 2px 4px 2px 6px;
    margin: 1px 4px;
    font-size: .84rem;
    font-weight: 600;
}
.mud-drawer--open .mud-navmenu .mud-nav-item.rcm-nav-top > .mud-nav-link .mud-icon-root:not(.mud-nav-link-expand-icon),
.mud-drawer--open .mud-navmenu .mud-nav-group.rcm-nav-top > .mud-nav-link .mud-icon-root:not(.mud-nav-link-expand-icon) {
    width: 24px; height: 24px; padding: 4px;
}
.mud-drawer--open .mud-navmenu .mud-nav-item.rcm-nav-top > .mud-nav-link .mud-nav-link-text,
.mud-drawer--open .mud-navmenu .mud-nav-group.rcm-nav-top > .mud-nav-link .mud-nav-link-text {
    margin-inline-start: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mud-drawer--open .mud-navmenu .rcm-nav-child.mud-nav-link,
.mud-drawer--open .mud-navmenu .rcm-nav-child.mud-nav-group > .mud-nav-link {
    min-height: 32px;
    font-size: .84rem;
}

/* ── MudTabs: highlight the TAB, not a hairline under it ──────────────────────────────────────
   rochem-tasks#285, JJ 2026-08-27 on the Shipping Details dialog: "its bottom highlight is too
   small, I'd rather it highlight the actual tab."

   MudTabs with Color.Primary paints the bar green and marks the current tab with a 2px slider
   underneath. On a saturated bar that hairline is the only thing separating the tab you are on
   from the ones you are not, and at a glance it does not register.

   ⚠ THE TRAP, so nobody undoes this: MudBlazor itself ships
       .mud-tabs-tabbar-primary .mud-tab.mud-tab-active { color: var(--mud-palette-primary-text) }
   which re-asserts white on-primary text at specificity (0,3,0). A two-class override such as
   `.mud-tab.mud-tab-active { color: ... }` is (0,2,0) and SILENTLY LOSES - the background applies
   but the colour does not, which is how an earlier attempt produced a white tab with white text
   and made the tab's name vanish altogether. The label is a bare text node inside .mud-tab, so it
   can only take .mud-tab's own computed colour. `.mud-tab-panel` is already on every tab, and
   adding it lifts these to (0,4,0) - no !important needed.

   Scoped to -tabbar-primary so plain MudTabs elsewhere keep their default look. The active tab
   fills with the page surface and rounds its top corners, so it reads as attached to the panel
   below; the icon keeps the Rochem green as the accent. Theme tokens only, so it holds in dark
   (label contrast measured on staging: 15.4:1 light, 14.9:1 dark).

   Deliberately no bold or size change on the active label - that moves the text as you switch
   tabs. All three MudTabs in the app (Ship Details dialog, PO Lookup, Sales Orders) use
   Color.Primary and had the identical problem, so this is one rule rather than three overrides. */
.mud-tabs-tabbar-primary .mud-tab.mud-tab-panel.mud-tab-active {
    background-color: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border-radius: 6px 6px 0 0;
}
.mud-tabs-tabbar-primary .mud-tab.mud-tab-panel.mud-tab-active .mud-icon-root {
    color: var(--mud-palette-primary);
}
/* Redundant under a filled tab, and on the rounded corner it reads as a stray line. */
.mud-tabs-tabbar-primary .mud-tab-slider { display: none; }

/* The count badge on a tab (Ship Notes "17") was genuinely being cut off: MudBlazor hangs the chip
   off a zero-width anchor at the end of the label with right:-22.4px, and .mud-tab is
   overflow:hidden - measured on staging, the chip spanned 683.6-710.0px against a tab edge at
   702.2px, so ~8px of it was clipped. Reserve room for the overhang rather than moving the chip;
   pulling it inline was tried and measured to overlap the last letters of the label. The ring is
   primary-text (white in light, near-black in dark) so the chip separates from the same-green bar
   when the tab is inactive, and blends away harmlessly on the filled active tab. */
.mud-tabs-tabbar-primary .mud-tab:has(.mud-tab-badge) { padding-right: 26px; }
.mud-tabs-tabbar-primary .mud-tab .mud-tab-badge .mud-badge {
    box-shadow: 0 0 0 2px var(--mud-palette-primary-text);
}

/* ── App-wide density scale (rochem-tasks#1022) ──────────────────────────────────────────────
   JJ, 2026-09-18: "everything is just way too zoomed in" -- WBI3's screens do not fit the way
   WBI2's did. Two app-wide levers were measured and rejected before this one:

     - a root font-size (#990/#2673) moves the TEXT layer only. WBI3's client CSS carries 5,605
       pixel values against 781 rem and MudBlazor 9.5.0's own is 5,364 px against 68 rem, so every
       padding, gap, row height and control size stays exactly where it was.
     - overriding MudBlazor's spacing utilities (this ticket as originally written) reaches the
       1,112 utility call sites and misses WBI3's own ~5,700 px values. Counted on the two screens
       that prompted the ticket, that is ~10% of PO Lookup's spacing and ~1.5% of Order Form's.

   `zoom` is the one lever that does not care what units a value is written in, because the browser
   scales the rendered result. It reaches all of it -- our pixels, MudBlazor's utilities and the
   type -- in one declaration.

   WHERE IT IS APPLIED, AND WHY NOT `body`. On the main content container only, NOT on `body` or
   `html`. The app bar and the nav drawer are `position: fixed` and are chrome rather than content;
   they are already Dense, they are not what "too zoomed in" was about, and leaving them at 1.0
   keeps the one class of breakage a unit test cannot see out of this change entirely. It also
   keeps MudBlazor's popover and dialog providers -- which render OUTSIDE this subtree, as siblings
   at the top of MainLayout -- unscaled and unmoved.

   TUNING. The scale is one custom property so it can be changed in one place, and tried live in
   DevTools without a rebuild:
       document.documentElement.style.setProperty('--wbi3-scale', 0.85)
   0.9 is the starting point JJ asked for ("start around 90% and see"), not a measured optimum.

   WHAT TO WATCH, because `zoom` is not free: a `vh`-sized panel inside the scaled subtree resolves
   against the FULL viewport and is then scaled, so it lands at 90% of the height it asks for; and
   an autocomplete or select popover is anchored to a rect measured inside the scaled subtree but
   drawn outside it, so it sits correctly and is drawn at 1.0 beside a 0.9 field. Both are visible
   in a browser in seconds and invisible to every test we have, which is why this ships with
   screenshots rather than with a regex. */
/* 1, not 0.9 (rochem-tasks#1122, JJ 2026-09-25: "i want the normal zoom, that's how people
       will look at it every day").

       The 0.9 came in for #1022 as "start around 90% and see", and seeing it is what settled it.
       A scale of 0.9 puts every stroke of every letter on a fractional pixel, so the whole app
       renders slightly soft - which is what JJ kept describing as the font looking weak, and why
       eight different typefaces all looked the same to him. At 1 the text is on whole pixels and
       sharpens everywhere at once, no font change required.

       It costs about a tenth of the rows on screen, which is the opposite of what this ticket is
       for - so the rows come back from the chrome instead: the filter panel now starts folded,
       the pager row hides when there is only one page, and the grid's own type and padding carry
       the density. Real pixels, not a lens over them.

       The property stays so the lever stays tunable in DevTools without a rebuild. */
:root { --wbi3-scale: 1; }

.wbi3-scale { zoom: var(--wbi3-scale); }

/* rochem-tasks#1090, JJ on staging: "when i scrolled on 1093 for the inventory it got very
   glitchy." Two scroll regions were fighting, and the second one is on EVERY WBI3 page, not just
   that one: MudBlazor gives .mud-main-content `min-height: 100vh`, but the app bar is drawn ABOVE
   it and outside .wbi3-scale, so the page is always taller than the window by the height of the
   bar. Measured at 1900x1000: the document overflows by 23px on Home, on Pallet Lookup and on
   Purchasing Inventory alike, and by 35px on Commissions. A page that always has a little scroll
   left in it, under a table that has its own scroll box, is what "glitchy" feels like -- the wheel
   hands off between the two near the ends.

   Subtracting the bar is the whole fix: measured again with it, the overflow is 0 on all three.
   It REMOVES a scrollbar rather than moving anything, which is why it is safe to do app-wide
   while the density work beside it stays opt-in. The inner box on Purchasing Inventory is left
   exactly as it is -- it is bounded on purpose (rochem-tasks#707: an unbounded scroll root makes
   Virtualize render all ~1,900 lots and the page flickers), so removing it would trade this bug
   for that one. */
.mud-main-content { min-height: calc(100vh - var(--mud-appbar-height, 48px)); }

/* ── AN ACTION COLUMN IS PINNED, NEVER SCROLLED AWAY ────────────────────────────────────────
   rochem-tasks#1181. JJ, 2026-09-30, on Commissions: "its just missing the edit" -- and then,
   when I fixed it there: "remember this has to be universal not just tailored for this grid."

   THE RULE. A grid may be wider than its container; that is a trade a page is allowed to make.
   But the two kinds of column in it are not the same thing when it happens:

       a DATA column can be scrolled to and read. Hiding it costs a gesture.
       an ACTION column is what you press. A control you cannot see is a control that is not
       there -- you do not know to scroll for it, because nothing tells you it exists.

   So any cell carrying a row's actions gets `rcm-col-action` and stays on screen at every width.
   The scroll that remains only ever hides figures, which you can bring back.

   Measured on Commissions, 2026-09-30: the table is 1,680px in a 1,610px container, so the Edit
   button sat 68px past the right edge on a grid where nothing else was wrong. That is the whole
   fault, and it is one a page cannot notice about itself -- it depends on the window.

   THE BACKGROUND IS NOT DECORATION. Without it the figures scroll THROUGH the pinned cell and
   read as part of it. Pages set --rcm-act-bg when their rows are not on the default surface
   (a striped grid, a coloured band); everything else inherits a sensible default.

   Left-pinning is deliberately not offered here. A first column that must stay is an identifier,
   and ReportView already has StickyLeft for exactly that, with its own shadow and z-index rules
   for the frozen-column case. This is the other end and the simpler one. */
.rcm-col-action {
    position: sticky;
    right: 0;
    z-index: 2;
    background: var(--rcm-act-bg, var(--mud-palette-surface));
    box-shadow: -6px 0 7px -5px rgba(0, 0, 0, .13);
}

/* The header of that column sits above both the row and the sticky header, so it needs to beat
   both. */
thead .rcm-col-action {
    z-index: 6;
    background: var(--rcm-act-head-bg, var(--mud-palette-background));
}

/* A hovered row must not show its hover colour everywhere EXCEPT the pinned cell, which is what
   a plain opaque background gives you. */
tr:hover > .rcm-col-action {
    background: var(--rcm-act-hover-bg, var(--rcm-act-bg, var(--mud-palette-surface)));
}

/* ── Dense data screen (rochem-tasks#1090, standard: docs/standards/page-density.md) ─────
   THE TARGET: with a record open on a 1900x1000 screen, the page's main grid shows at least 15
   rows without scrolling. Pallet Lookup showed 5 of 1,379 -- on a build that already carried
   #1022's zoom scale and #1093's width rule, which is why neither of those is the answer here.

   SECOND PASS, and the first one was measured wrong. JJ, 2026-09-24, looking at staging:
   "1090 is having scroll, vertical scroll, there should not be, the text should just be smaller."
   The first pass capped the card at 260px and gave it its own scrollbar, and computed 17 rows
   from the CSS. Opened in a browser at 1900x1000 it showed NINE, because two of the numbers in
   that calculation were not true of the running page:

     1. THE GRID WAS NEVER INSIDE .rcm-dense-page. The class sat on the MudStack holding the scan
        box and the record card; the search grid is its SIBLING (Lookup.razor's second `pa-3`
        block). So the row rule below applied to nothing at all and rows stayed at their full
        height. Measured: 44.4 physical px a row, against the 32 the CSS declared.
     2. ROW HEIGHT IS CONTENT-DRIVEN, NOT SET BY `height`. `height` on a `tr` is a minimum; the
        cells' own vertical padding decides the rest. Trimming that padding is what actually moves
        it -- 4px to 1px took the row from 42 CSS px to 32 on its own, and nothing else came close.

   WHY `!important` BELOW, which is otherwise not this file's habit: MudBlazor's own dense-table
   rules are three classes deep (`.mud-table-dense * .mud-table-row .mud-table-cell`), so they
   outrank a two-class rule of ours whatever the load order. The same wall is documented in
   FdaStatus.razor, which solved it the same way. A rule here without it is silently inert -- which
   is exactly the failure this pass is fixing, so it must not be reintroduced.

   HEIGHT COMES FROM SIZE, NOT FROM CLIPPING. The cap is gone and so is the card's inner
   scrollbar: hiding half a record behind a scrollbar inside a page that also scrolls costs more
   than the height it saves. The card is short now because its type and spacing are small.

   MEASURED ON STAGING, not computed: 1900x1000, the 1,379-row grid, a plate open.
       as shipped  9 rows (card 234px, row 44.4px)
       this pass  16 rows (card 190px, row 28.8px)
   The page header and the filter bar are deliberately NOT touched -- they are #1093's other half
   and wbi3#2797 holds them. 16 clears the target without them, so the split stands.

   THE TRADE THIS MAKES, stated because it is the cap's job that nobody is doing now: the card is
   no longer bounded, so a plate with many orders and a long bin history pushes the grid down and
   can fall under 15. That is the consequence of "no inner scrollbars", and it is the instruction.

   IT IS NOW THE DEFAULT (rochem-tasks#1122, 2026-09-25). It shipped opt-in because JJ said "I'm
   scared of wide site changes like this", and reserved the app-wide move for him: "it becomes the
   default only once the two proving screens have been looked at ... that is a decision, not a
   tidy-up." He has looked, and made it -- on Min Max: "the grid is still too big ... why does it
   look so bad", having already said he wants more rows even if the type is smaller.

   .rcm-dense-page still works and the two proving pages still carry it; it is simply redundant
   now. See the DEFAULT block after this one for what changed and what it deliberately does not
   reach.

   Phone and tablet are untouched: everything is behind the same 1100px floor the rest of the
   page standards use, so the floor's scanners keep what they have. */
:root {
    /* Read by GridDensityConformanceTests. The cell PADDING is the lever that moves a row, so it
       is the value the test reads. The card-cap variable is gone with the cap it named. */
    --rcm-dense-cell-pad: 1px;
}

@media (min-width: 1100px) {
    /* The record card is compact, never clipped. No max-height and no overflow here, on purpose:
       a test asserts their absence so the cap cannot come back quietly. */
    .rcm-dense-page .rcm-record-card { padding: 10px !important; }
    .rcm-dense-page .rcm-record-card .mud-typography-h5 { font-size: 1rem; line-height: 1.2; }
    .rcm-dense-page .rcm-record-card .mud-typography-body2 { font-size: 11.5px; line-height: 1.3; }
    .rcm-dense-page .rcm-record-card .mud-typography-caption,
    .rcm-dense-page .rcm-record-card .mud-typography-overline { font-size: 10.5px; line-height: 1.25; }
    .rcm-dense-page .rcm-record-card .mud-chip { height: 18px; }
    .rcm-dense-page .rcm-record-card .mud-button-root { padding: 2px 8px; min-height: 26px; }

    /* Three grid flavours are in use and a density rule that covered one would look like it had
       worked while half the app stayed tall: Wbi3DataGrid renders MudBlazor's .mud-table-cell,
       while ReportView (.rv-table) and Purchasing Inventory (.inv-table) render plain tables.
       The bare `table` selector is safe here only because it is scoped to the two opted-in
       pages -- it is NOT safe to lift this rule out of .rcm-dense-page unchanged. */
    .rcm-dense-page tbody .mud-table-cell,
    .rcm-dense-page table tbody td {
        padding-top: var(--rcm-dense-cell-pad) !important;
        padding-bottom: var(--rcm-dense-cell-pad) !important;
    }
    .rcm-dense-page thead .mud-table-cell,
    .rcm-dense-page table thead th { padding-top: 2px !important; padding-bottom: 2px !important; }
}

/* ── The same density, now the DEFAULT for every grid (rochem-tasks#1122) ────────────────
   Two pages had it; the rest of the app did not, and the rest of the app is what JJ works in.

   SELECTED BY GRID CLASS, NOT BY A BARE `table`. The opt-in block above can say
   `.rcm-dense-page table tbody td` because it is fenced to two pages; its own comment warns that
   the bare selector "is NOT safe to lift out of .rcm-dense-page unchanged", and it is right --
   app-wide it would also catch a layout table, a print sheet and whatever a future page renders.
   So EVERY grid in the app is named, one class at a time. There are 22 of them, and the list was
   read off the markup rather than guessed -- every `<table>` under src/Wbi3.Client carries exactly
   one of these classes, so nothing is missed and nothing unnamed is caught.

   JJ, 2026-09-29, looking at Commissions after this shipped: the rows were untouched, because the
   first pass named only three flavours and the Commissions ledger (.com-led) is its own table.
   "check every page for their own tables check everything." Fifteen pages had their own.

   Same 1100px floor, same reason: the warehouse scanners and every phone keep exactly what they
   have. Same !important, same reason -- MudBlazor's own dense rule is three classes deep
   (`.mud-table-dense * .mud-table-row .mud-table-cell`), so a rule without it is silently inert.

   SCREEN ONLY. `min-width` matches in print too, and one of the tables named below is a financial
   statement that people print (.pl-stmt, the P&L by month). Squashing a document on its way to
   paper is not what this ticket is for, and no page's own print rules set cell padding, so without
   `screen` this block would silently become the print layout as well.

   Reversing it is deleting this block. Nothing else in the app depends on it. */
@media screen and (min-width: 1100px) {
    tbody .mud-table-cell,
    /* the shared ones */
    .rv-table tbody td,
    .inv-table tbody td,
    .inv-mmtbl tbody td,     /* Purchasing  - Inventory MM pop-up (#1985), inside .inv-table */
    .mmx-bd tbody td,        /* Purchasing  - Min Max: Available breakdown (#2116) */
    /* the pages that render their own table */
    .com-led tbody td,       /* Accounting  - Commissions ledger */
    .po-grid tbody td,       /* Accounting  - Commissions: Processed Orders report (#1342) */
    .pol-tbl tbody td,       /* Logistics   - PO Lookup (and .pol-doctbl, which rides it) */
    .sod-tbl tbody td,       /* Logistics   - Shipped Sales Orders: Damages dialog (#1637) */
    .cmp-detail tbody td,    /* Order Proc. - Comparison Tool: one order, every field (#2056) */
    .cs-table tbody td,      /* Logistics   - Combo Sync differences */
    .od-table tbody td,      /* Logistics   - Open Order drawer */
    .sc-table tbody td,      /* Sales Tools - Sales Cockpit */
    .ta-table tbody td,      /* Sales Tools - Target vs Actual */
    .reps-table tbody td,    /* Cockpit     - Reps tab */
    .monthly-table tbody td, /* Cockpit     - Sales tab, monthly */
    .bu-table tbody td,      /* Cockpit     - Sales tab, by business unit */
    .pc-tbl tbody td,        /* Purchasing  - Pricing Calculator */
    .pt-tbl tbody td,        /* Purchasing  - Pricing Calculator duty / tariff pop-up */
    .lot-tbl tbody td,      /* Purchasing  - Inventory lot view */
    .pp-tbl tbody td,        /* Warehousing - Pick Plan */
    .oli-items tbody td,     /* Order form  - line items */
    .ofd-mini tbody td,      /* Order form  - mini tables */
    .oh-lines tbody td,      /* Order history - lines touched in a save */
    .oh-lines tbody th,
    .ofd-blkrel tbody td,    /* Order form  - blanket releases */
    .led tbody td,           /* Order form  - ledger */
    .bro-figs tbody td,      /* Order form  - typed-over Remaining Qty figures (#1440) */
    .pm-qtable tbody td,     /* C-Suite     - Plan Margin */
    .trr-tree tbody td,      /* Accounting  - Territory Report tree */
    .trr-minitable tbody td,
    .bit-table tbody td,     /* Accounting  - Bank Inventory Tie-Out */
    .rvp-table tbody td,     /* Reports     - the Print button's sheet (#1417): on screen only while
                                it is measured off screen; paper uses ReportView's own print rules */
    .buc-table tbody td,     /* Business Units - BU Cockpit (rochem-tasks#1315) */
    .qbp-lot-t tbody td,     /* Order form  - Send to QuickBooks: choose the lot (rochem-tasks#1386) */
    .broker-preview tbody td, /* PO Lookup  - Broker Instruction Sheet preview (rochem-tasks#1629) */
    .pl-stmt tbody td {      /* C-Suite     - P&L by month (screen only; see above) */
        padding-top: var(--rcm-dense-cell-pad) !important;
        padding-bottom: var(--rcm-dense-cell-pad) !important;
    }

    /* ── A CONTROL IN A ROW SETS THAT ROW'S HEIGHT ───────────────────────────────────────────
       The padding above is not what decides how many rows fit. Anything TALLER than the text
       sitting in a cell holds the whole row open, and cell padding cannot make it shorter.

       This ticket has met it three times, each time on a different screen and each time after
       trimming padding and measuring no change at all:
         - Sales Orders, where a 36px Review button made 37px rows while every text cell held 15px
         - Min Max, where the edit INPUTS made 57px rows -- solved by removing them (#1115)
         - Commissions, where a 23px Edit button held a row that asked to be 24px
       JJ, 2026-09-30: "this type of thing i need consistency for all grids so we need to make
       sure thats all settled." So it is stated once, for every grid, rather than found again.

       20px, because that is the tallest a control can be inside a 24px row that also has 1px of
       cell padding top and bottom and a border. Twelve pages render a button, a checkbox or an
       input inside a grid body; they do not each get an opinion about its height.

       WHAT THIS DOES NOT DO: it never sets a row height and never touches text. A cell whose
       content genuinely wraps to two lines is still two lines tall -- this only stops a CONTROL
       being the reason a row is tall. That distinction is why it is safe to apply to all of them
       at once. */
    .com-led tbody button,
    .com-led tbody .mud-button-root,
    .pol-tbl tbody button,
    .pol-tbl tbody .mud-button-root,
    .od-table tbody button,
    .od-table tbody .mud-button-root,
    .sc-table tbody button,
    .sc-table tbody .mud-button-root,
    .ta-table tbody button,
    .ta-table tbody .mud-button-root,
    .reps-table tbody button,
    .reps-table tbody .mud-button-root,
    .monthly-table tbody button,
    .monthly-table tbody .mud-button-root,
    .bu-table tbody button,
    .bu-table tbody .mud-button-root,
    .pc-tbl tbody button,
    .pc-tbl tbody .mud-button-root,
    .lot-tbl tbody button,
    .lot-tbl tbody .mud-button-root,
    .pp-tbl tbody button,
    .pp-tbl tbody .mud-button-root,
    .oli-items tbody button,
    .oli-items tbody .mud-button-root,
    .ofd-mini tbody button,
    .ofd-mini tbody .mud-button-root,
    .ofd-blkrel tbody button,
    .ofd-blkrel tbody .mud-button-root,
    .led tbody button,
    .led tbody .mud-button-root,
    .pm-qtable tbody button,
    .pm-qtable tbody .mud-button-root,
    .trr-tree tbody button,
    .trr-tree tbody .mud-button-root,
    .trr-minitable tbody button,
    .trr-minitable tbody .mud-button-root,
    .pl-stmt tbody button,
    .pl-stmt tbody .mud-button-root,
    .rv-table tbody button,
    .rv-table tbody .mud-button-root,
    .inv-table tbody button,
    .inv-table tbody .mud-button-root {
        height: 20px !important;
        min-height: 20px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        line-height: 18px !important;
    }

    .com-led tbody input[type="checkbox"],
    .pol-tbl tbody input[type="checkbox"],
    .od-table tbody input[type="checkbox"],
    .sc-table tbody input[type="checkbox"],
    .ta-table tbody input[type="checkbox"],
    .reps-table tbody input[type="checkbox"],
    .monthly-table tbody input[type="checkbox"],
    .bu-table tbody input[type="checkbox"],
    .pc-tbl tbody input[type="checkbox"],
    .lot-tbl tbody input[type="checkbox"],
    .pp-tbl tbody input[type="checkbox"],
    .oli-items tbody input[type="checkbox"],
    .ofd-mini tbody input[type="checkbox"],
    .ofd-blkrel tbody input[type="checkbox"],
    .led tbody input[type="checkbox"],
    .pm-qtable tbody input[type="checkbox"],
    .trr-tree tbody input[type="checkbox"],
    .trr-minitable tbody input[type="checkbox"],
    .pl-stmt tbody input[type="checkbox"],
    .rv-table tbody input[type="checkbox"],
    .inv-table tbody input[type="checkbox"] {
        width: 14px; height: 14px; margin: 0;
    }

    thead .mud-table-cell,
    .rv-table thead th,
    .inv-table thead th,
    .com-led thead th,
    .pol-tbl thead th,
    .od-table thead th,
    .sc-table thead th,
    .ta-table thead th,
    .reps-table thead th,
    .monthly-table thead th,
    .bu-table thead th,
    .pc-tbl thead th,
    .lot-tbl thead th,
    .pp-tbl thead th,
    .oli-items thead th,
    .ofd-mini thead th,
    .ofd-blkrel thead th,
    .led thead th,
    .pm-qtable thead th,
    .trr-tree thead th,
    .trr-minitable thead th,
    .bit-table thead th,
    .pl-stmt thead th { padding-top: 2px !important; padding-bottom: 2px !important; }

    /* THE BUTTON IN THE ROW IS THE BIGGEST SINGLE THING, and it was missed on the first pass of
       this ticket, which tuned cell padding and changed the row by NOTHING. Measured on staging,
       Sales Orders at 1900x1000, with a range over each cell's contents:

           every text cell   15px of content
           the Review cell   28px  <- this is what 37px rows were made of

       A MudBlazor button is sized for a finger: min-height 36px before its own padding. In a grid
       row it is a link that happens to be drawn as a button, and it has no business being twice
       the height of the data beside it. At 20px it is still a comfortable click target and it is
       no longer what decides the row.

       Measured, same screen, same window: row pitch 37px -> 32px on this rule alone, 21 rows on
       screen -> 27. Adding the cell-padding trim in Wbi3DataGrid takes the pitch to 28px.

       Scoped to a table cell: a button on a toolbar, a dialog or a form is untouched. */
    .mud-table-cell .mud-button-root {
        min-height: 20px;
        padding-top: 0;
        padding-bottom: 0;
        line-height: 1.1;
    }

    /* Same argument for a status pill or chip sitting in a row. MudBlazor's default is 32px. */
    .mud-table-cell .mud-chip { height: 18px; }

    /* AN INLINE INPUT SETS THE HEIGHT OF ITS WHOLE ROW, so trimming the cells alone leaves an
       editable grid exactly as tall as it was. MudBlazor puts .mud-typography-subtitle1 on every
       input wrapper, which in RochemTheme is .9375rem at weight 600 -- a size larger and two
       weights heavier than the plain cells beside it (.875rem / 400, above in this file).

       Min Max hit this first (rochem-tasks#1056, SM: "can you make the font smaller and remove the
       bold so the page isnt so large to scroll") and fixed it in its own scoped stylesheet, which
       was right then: the same class is on EVERY input in the application and correcting it
       centrally was a change to dozens of screens. That change is this ticket. Scoped to a table
       cell, so a filter box, a dialog field and a form input are untouched -- an input in a grid
       row should look like the row, an input on a form should not. */
    .mud-table-cell .mud-input.mud-input-text {
        font-size: .875rem;
        font-weight: 400;
    }

    /* .mud-input-root is `font: inherit`, so it follows the wrapper above -- except its own
       first-declared size and weight, pinned here so inheritance is not the thing deciding. The
       tabular figures keep a column of five- and six-digit quantities aligned, which the plain
       cells already get further up this file. */
    .mud-table-cell .mud-input-slot.mud-input-root {
        font-size: inherit;
        font-weight: inherit;
        font-variant-numeric: tabular-nums lining-nums;
    }

    /* The input's own padding sits INSIDE the cell, so it is the part actually setting the row
       height once the cell is down to 1px. MudBlazor's dense text input is 3px top / 7px bottom;
       evening it to 2px keeps the underline clear of the text without carrying the extra. */
    .mud-table-cell .mud-input-root.mud-input-root-text.mud-input-root-margin-dense {
        padding-top: 2px;
        padding-bottom: 2px;
    }
}

/* ── COMPACT ROWS, NOTHING CUT OFF, on every grid (rochem-tasks#1122) ─────────────────────
   JJ, 2026-10-01, after Jesse said Wire/Check Approval used to show far more rows: "i want to fix
   every grid not just this one." Then, seeing the first version cut long vendors and memos with
   "...": "never cut anything off."

   So the rule is: a row is as short as its CONTENT allows, and never shorter. Text is never
   clipped, never ellipsed, never clamped -- if it does not fit it wraps. What made rows tall
   WITHOUT any text needing the room is what this block removes:
     - CONTROLS. The expand arrow (32px), date boxes and dropdowns (29px), checkboxes and icons
       (24px), chips, switches (38px): each held its whole row open. They are 18-20px here.
     - BASELINE ALIGNMENT. An icon or chip on the text baseline pushes the line box down; centred,
       it does not (31px rows with nothing taller than 20px in them).
     - STACKED PIECES. A name and its folder, a page and its route, printed one under the other
       where there is room beside: they now run side by side, and wrap only if they must.
   And pages that fixed a long-text column narrow so the grid would fit (Wire/Check's vendor at
   120px, memo at 150px) let it take the room instead, so it wraps less.

   What it deliberately does NOT reach:
     - a cell spanning the row ([colspan]) -- an expanded detail panel or a group header;
     - forms, dialogs, filter boxes -- everything is scoped to a table body;
     - print and phones -- same screen-only, 1100px floor as the density above. */
@media screen and (min-width: 1100px) {
    /* MudBlazor's own grid: the controls in a row, brought down to the 20px every other grid's
       controls already are (see A CONTROL IN A ROW SETS THAT ROW'S HEIGHT above). */
    tbody .mud-table-cell .mud-icon-button {
        padding: 0 !important;
        margin: 0 !important;
        height: 20px;
        width: 20px;
    }
    tbody .mud-table-cell .mud-button-root:not(.mud-icon-button) {
        height: 20px !important;
        min-height: 20px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        line-height: 18px !important;
    }
    tbody .mud-table-cell .mud-input-control {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    tbody .mud-table-cell .mud-input-slot,
    tbody .mud-table-cell .mud-select-input {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        height: 20px !important;
        min-height: 20px !important;
        line-height: 20px !important;
    }
    tbody .mud-table-cell .mud-input-adornment .mud-icon-root {
        height: 18px;
        width: 18px;
    }
    /* A chip carries 4px of margin top and bottom, and a button or chip sitting on the text
       baseline pushes the line box taller than itself: Customer Groups held every row at 37px
       on one chip, 25px without. */
    tbody .mud-table-cell .mud-button-root,
    tbody .mud-table-cell .mud-chip {
        vertical-align: middle !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    tbody .mud-table-cell .mud-chip { height: 18px !important; }
    /* Report grids carry chips too (System > Audit Log's Action held its rows at 35px). */
    .rv-table tbody td:not([colspan]) .mud-chip {
        height: 18px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        vertical-align: middle !important;
    }

    /* Icons and checkboxes in a row: MudBlazor draws them at 24px, which held Needs Invoicing,
       FDA Status and Inventory by Location at 29-31px rows on their own. */
    tbody .mud-table-cell:not([colspan]) svg.mud-icon-root,
    .rv-table tbody td:not([colspan]) svg.mud-icon-root,
    .wbi3-grid tbody td:not([colspan]) svg.mud-icon-root {
        width: 18px !important;
        height: 18px !important;
    }
    /* Anything that is not text sits on the middle of the line, not its baseline. On the
       baseline an icon or a chip pushes the line box below the text, which is how Order Lookup
       and Customer Requirements had 31px rows with nothing in them taller than 20px. */
    tbody .mud-table-cell:not([colspan]) :is(svg, img, .mud-chip, .mud-button-root, .mud-input-control, .mud-tooltip-root, .mud-checkbox) {
        vertical-align: middle;
    }
    tbody .mud-table-cell:not([colspan]) .mud-input,
    tbody .mud-table-cell:not([colspan]) .mud-input-control-input-container {
        min-height: 0 !important;
    }
    /* A single-line edit box in a row is the row's height, not 27px (C of A Documents' Notes,
       Min Max, Logistics Damages). A multi-line box is left as the page made it: it holds text that
       would otherwise be hidden. */
    tbody .mud-table-cell:not([colspan]) .mud-input.mud-input-text:not(:has(textarea)) {
        height: 20px !important;
    }
    /* Text a page stacked in pieces (a report's name over its folder) runs side by side, and
       wraps only if the pieces do not fit beside each other. */
    tbody .mud-table-cell:not([colspan]) > p.mud-typography,
    tbody .mud-table-cell:not([colspan]) > .mud-typography:not(:only-child),
    .rv-table tbody td:not([colspan]) > .mud-typography:not(:only-child) {
        display: inline !important;
        margin: 0 .5em 0 0 !important;
    }
    /* A switch in a row (Reports > Catalog's Active) is 38px by default; 20px is the same switch. */
    tbody .mud-table-cell:not([colspan]) .mud-switch,
    tbody .mud-table-cell:not([colspan]) .mud-switch-span {
        height: 20px !important;
    }
    tbody .mud-table-cell:not([colspan]) .mud-switch-span {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        align-items: center;
    }
    tbody .mud-table-cell:not([colspan]) .mud-switch-span .mud-switch-base {
        padding: 1px !important;
        top: 0 !important;
    }
    /* A MudSimpleTable is used for forms, label previews and dialogs as well as for grids, so
       it is opted in one table at a time with class="wbi3-grid": Warehousing > Receive's queue
       (114px rows) and the QB Comparison tool (60px rows). */
    .wbi3-grid tbody td:not([colspan]) {
        padding-top: var(--rcm-dense-cell-pad) !important;
        padding-bottom: var(--rcm-dense-cell-pad) !important;
    }
    .wbi3-grid tbody .mud-button-root:not(.mud-icon-button) {
        height: 20px !important;
        min-height: 20px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        line-height: 18px !important;
    }
    .wbi3-grid tbody .mud-icon-button {
        padding: 0 !important;
        margin: 0 !important;
        height: 20px;
        width: 20px;
    }
    .wbi3-grid tbody .mud-input-control {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    .wbi3-grid tbody .mud-input.mud-input-outlined { height: 22px !important; }
    .wbi3-grid tbody .mud-input-outlined .mud-input-slot {
        padding: 0 6px !important;
        height: 20px !important;
    }
}

/* ── The page-name band goes (rochem-tasks#1119) ─────────────────────────────────────────────
   JJ, 2026-09-25: he wants a bigger grid on every screen. The band under the tab strip was 56px
   of every page to print "PURCHASING / Min Max" — which the browser tab, the nav rail and the
   open-tab strip were all already saying. So it stops being printed, and the band draws nothing
   at all unless the page has a back link, its own actions or a filter bar.

   The name was briefly moved up into the app bar instead; that went stale across the open-tab
   strip and was reverted — see the comment in MainLayout.razor. The saving is the band, not the
   move. */
/* What is left of the page band when a page still needs one (a back link, its own buttons). It
   carries no title any more, so it is a single short row rather than a two-line block. */
.rcm-page-header-slim { padding-top: 0; padding-bottom: 0; margin-bottom: 2px; }
/* A band with nothing left to draw: no border, no accent edge, no height. The heading inside it
   is still in the DOM (it is the page's H1), just not on screen - the app bar shows the name. */
.rcm-page-header-none { padding: 0; margin: 0; border-bottom: 0; min-height: 0; }
.rcm-page-header-none::after { display: none; }

/* The heading itself, hidden the accessible way rather than with display:none - a screen reader
   still announces the page, and a test still finds the text where it has always been. */
.rcm-page-heading-sr {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* The subtitle stays in the DOM for anyone reading the page aloud, and takes no space. */
.rcm-page-subtitle-sr {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* rochem-tasks#2129 (Matt, 2026-12-01): testWBI says TEST SITE on every screen, in the menu and
   after every save. All of this is inert on production: nothing there renders these classes, and
   html[data-test-site] is only set when the server says it is the test site (js/test-site.js). */
.rcm-test-site-bar {
    position: sticky; top: 0; z-index: 1200;
    background: #c62828; color: #fff;
    font-weight: 700; font-size: .875rem; line-height: 1.3; letter-spacing: .02em;
    text-align: center; padding: 6px 12px;
}
.rcm-test-site-tag {
    display: inline-block; margin-left: .4em; padding: 2px 6px; border-radius: 4px;
    background: #fff; color: #c62828; font-size: .7rem; font-weight: 800; letter-spacing: .08em;
    vertical-align: middle;
}
.rcm-test-site-menu {
    background: #c62828; color: #fff; font-weight: 800; font-size: .75rem; letter-spacing: .08em;
    text-align: center; padding: 6px 8px; margin: 4px 6px 6px; border-radius: 4px;
}
html[data-test-site="1"] .mud-appbar,
html[data-test-site="1"] .m-appbar { background: #b71c1c !important; color: #fff !important; }
