html, body {
    font-family: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Neurom typeface app-wide — every MudText carries the mud-typography base class,
   so one rule retargets all headings and body text (Inter Tight 400-700). */
.mud-typography {
    font-family: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ============================================================
   Zenko control standard (2026-10-04 founder reset) — one
   button style and one input style across the whole app. The
   theme already pins the 14px radius on every control; these
   rules pin the rest of the standard: every button renders
   sentence-case, semibold, with the same keyboard-focus ring,
   and the outlined field is the house input everywhere. The
   /quick pad keeps its own design system — every .quick-surface
   rule carries !important and wins the cascade.
   ============================================================ */
.mud-button-root {
    text-transform: none;
    font-weight: 600;
}
.mud-button-root:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

a, .btn-link {
    color: var(--mud-palette-primary);
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.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."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Global fix: MudBlazor tab panel content sits hard against the panel edges.
   Active panels render display:contents, so padding must go on the panels container. */
.mud-tabs-panels {
    padding: 24px;
}

/* Input heights reverted to MudBlazor defaults (2026-09-19, founder request) —
   the "compact inputs" override block that forced dense vertical metrics
   app-wide was removed; fields now use Mud's standard sizing everywhere. */

/* ============================================================
   Scheduling timeline (TimelineView) — resource rows x day
   columns with absolutely positioned, HTML5-draggable bars.
   ============================================================ */
.sched {
    border: 1px solid var(--mud-palette-lines-default, rgba(0, 0, 0, 0.12));
    border-radius: 8px;
    overflow-x: auto;
    background: var(--mud-palette-surface, #fff);
}
.sched-header, .sched-row { display: flex; align-items: stretch; }
.sched-header {
    background: var(--mud-palette-action-default-hover, rgba(0, 0, 0, 0.05));
    font-weight: 500;
}
.sched-label {
    width: 190px; min-width: 190px;
    padding: 6px 10px;
    display: flex; align-items: center; gap: 6px;
    border-right: 1px solid var(--mud-palette-lines-default, rgba(0, 0, 0, 0.12));
    border-bottom: 1px solid var(--mud-palette-lines-default, rgba(0, 0, 0, 0.12));
    overflow: hidden;
}
.sched-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-days { flex: 1; display: flex; position: relative; }
.sched-day {
    flex: 1 1 0; min-width: 34px;
    text-align: center; padding: 4px 2px;
    border-left: 1px solid var(--mud-palette-lines-inputs, rgba(0, 0, 0, 0.08));
    border-bottom: 1px solid var(--mud-palette-lines-default, rgba(0, 0, 0, 0.12));
    font-size: 0.75rem;
}
.sched-dow { color: var(--mud-palette-text-secondary, rgba(0, 0, 0, 0.54)); }
.sched-lane { flex: 1; display: flex; position: relative; min-height: 44px; }
.sched-cell {
    flex: 1 1 0; min-width: 34px;
    border-left: 1px solid var(--mud-palette-lines-inputs, rgba(0, 0, 0, 0.08));
    border-bottom: 1px solid var(--mud-palette-lines-default, rgba(0, 0, 0, 0.12));
    cursor: pointer;
}
.sched-weekend { background: var(--mud-palette-action-default-hover, rgba(0, 0, 0, 0.045)); }
.sched-today { background: var(--mud-palette-primary, #1976d2); opacity: 1; }
.sched-day.sched-today, .sched-cell.sched-today { background: rgba(25, 118, 210, 0.10); }
.sched-dragover { outline: 2px dashed var(--mud-palette-primary, #1976d2); outline-offset: -2px; background: rgba(25, 118, 210, 0.12) !important; }
.sched-bar {
    position: absolute; top: 5px; bottom: 5px;
    border-radius: 6px; z-index: 2;
    color: #fff; font-size: 0.72rem;
    padding: 2px 8px;
    display: flex; align-items: center;
    overflow: hidden; white-space: nowrap;
    cursor: grab; user-select: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.sched-bar-text { position: relative; z-index: 1; }
.sched-fill {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.38);
    border-radius: 6px 0 0 6px;
}
.sched-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--mud-palette-text-secondary, rgba(0, 0, 0, 0.54)); padding: 12px; font-size: 0.85rem; }

/* Platform settings — true masonry: cards flow top-down per column and the browser
   balances the column heights, so a short card no longer strands a gap under its
   row (flex-wrap aligned every row's tops — ragged bottoms). Drag reorder is
   unaffected: MudBlazor resolves the drop index via elementsFromPoint — the card
   under the pointer, not row math — and CardDropped inserts at that index. */
.settings-flex {
    columns: 2;                /* base (960–1599px): two columns */
    column-gap: 16px;
}
/* Cards are drag-reorderable: each card sits in a .mud-drop-item wrapper, so the
   column rules target the wrapper; the paper inside fills it. */
.settings-flex > .mud-drop-item,
.settings-flex > .mud-dropitem-placeholder {   /* dashed slot shown during a drag */
    break-inside: avoid;       /* a card never splits across a column break */
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    width: 100%;
    margin-bottom: 16px;      /* vertical rhythm — CSS columns have no row gap */
    box-sizing: border-box;
}
.settings-flex > .mud-drop-item > .mud-paper { width: 100%; box-sizing: border-box; }
/* mud-drop-item disables text selection globally — keep inputs selectable so
   values can still be copied while cards are drag-reorderable. */
.settings-flex .mud-drop-item input,
.settings-flex .mud-drop-item textarea { user-select: text; }
@media (min-width: 1600px) {   /* wide screens — three columns */
    .settings-flex { columns: 3; }
}
@media (max-width: 959.95px) {   /* matches MudBlazor's md breakpoint — single column */
    .settings-flex { columns: 1; }
}

/* Founder rule: no up/down spin buttons on numeric fields — anywhere, ever.
   MudBlazor wraps them in .mud-input-numeric-spin (only used by numeric inputs),
   so this one rule covers every existing and future MudNumericField. */
.mud-input-numeric-spin {
    display: none !important;
}

/* Settings vertical tabs — nav-like strip: MudTabs default colouring keeps only
   the selected tab highlighted; labels align left like the sidebar nav links. */
.settings-tabs .mud-tab {
    justify-content: flex-start;
    text-align: left;
}

/* MudBlazor 9.10 vertical-tabs quirks:
   1. The active panel renders display:contents inside a flex-ROW panels
      container, so panel content with several root elements (headers, forms,
      toolbars, grids) lays out side-by-side and squashes into a narrow row.
      Stack panel content vertically, full width instead.
   2. MudTabs' PanelClass never renders in 9.10 (panels had no padding), so the
      panel padding is applied here. */
.settings-tabs .mud-tabs-panels.mud-tabs-vertical {
    flex-direction: column;
    padding: 24px;
}

/* Table action cells — the "d-flex justify-end" CellClass flips the td from
   display:table-cell to display:flex (!important in MudBlazor), detaching it
   from the row height: the action cell hugs its icons and renders shorter
   than every other cell in the row. Keep it a real table cell so it stretches
   with the row, right-align and vertically center the buttons. */
.mud-table-cell.d-flex {
    display: table-cell !important;   /* beats .d-flex's display:flex !important */
    text-align: end;                  /* replaces the now-dead justify-end */
    vertical-align: middle;           /* center within the row */
}

.mud-table-cell.d-flex .mud-icon-button {
    vertical-align: middle;           /* icons center, not baseline-aligned */
}

/* Timesheet week grid (Employee Hub → Time, Timesheet/Both mode): the today
   row gets a quiet highlight so the employee can see where "now" is while
   entering hours; the grid itself stays a plain dense table. */
.time-week-grid th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.7;
}
.time-week-today td {
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent);
}

/* Settings panels — root-level buttons (Xero connect/disconnect, invoice save)
   were stretching to the full panel width by the flex column's default stretch.
   Size them to their text like every other button. */
.settings-tabs .mud-tabs-panels.mud-tabs-vertical > .mud-tab-panel-active > .mud-button-root {
    align-self: flex-start;
}

/* Dark-mode fills — the palette keeps BRIGHT accent colours (nav links and icons
   use them as text colour), so filled chips/buttons would render white-on-light
   text after the contrast-text revert. Scoped to the html.omni-dark marker
   (toggled by setTheme) these darken ONLY the backgrounds; text stays white.
   Light mode is completely untouched. Outlined AND Text chips keep their
   transparent backgrounds — a Text chip's font colour IS the bright palette
   colour, so painting a #0b3bf0 bg on a #0b3bf0-text chip made it invisible
   (hub widget stat chips). */
html.omni-dark .mud-chip-color-primary:not(.mud-chip-outlined):not(.mud-chip-text)   { background-color: var(--mud-palette-primary); }
html.omni-dark .mud-chip-color-secondary:not(.mud-chip-outlined):not(.mud-chip-text) { background-color: #16455a; }
html.omni-dark .mud-chip-color-success:not(.mud-chip-outlined):not(.mud-chip-text)   { background-color: #15803d; }
html.omni-dark .mud-chip-color-warning:not(.mud-chip-outlined):not(.mud-chip-text)   { background-color: #b45309; }
html.omni-dark .mud-chip-color-info:not(.mud-chip-outlined):not(.mud-chip-text)      { background-color: #0369a1; }

/* Same treatment for filled buttons — their colour classes are fill-variant-only,
   so outlined/text buttons are never touched. */
html.omni-dark .mud-button-filled-primary   { background-color: var(--mud-palette-primary); }
html.omni-dark .mud-button-filled-secondary { background-color: #16455a; }
html.omni-dark .mud-button-filled-success   { background-color: #15803d; }
html.omni-dark .mud-button-filled-warning   { background-color: #b45309; }
html.omni-dark .mud-button-filled-info      { background-color: #0369a1; }

/* Primary-filled surfaces (chat bubbles, portal balance headers). Light mode:
   palette primary + white. Dark mode: deeper blue + white. */
.oc-primary-fill {
    background-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}
html.omni-dark .oc-primary-fill {
    background-color: var(--mud-palette-primary);
    color: #ffffff;
}

/* ============================================================
   Neurom brand utilities (2026-09-29 rebrand) — glass panels,
   cyan burner glow lines and hover-glow, used by marketing pages
   and app accents alike. Tokens extracted from the template.
   ============================================================ */

/* Glassy translucent panel — Neurom bg-light (#ffffff30-family) tuned
   for legibility on the #030614 app background. */
.oc-glass {
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
}

/* Signature burner line — 1px vertical bar with a cyan glow
   (gradient transparent -> #27bbff, the Neurom hero divider). */
.oc-burner {
    width: 1px;
    height: 150px;
    background: linear-gradient(#18709900, #27bbff);
    border: none;
    flex: 0 0 auto;
}
.oc-burner-h {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, #18709900, #27bbff, #18709900);
    border: none;
}

/* Glow-on-hover card — the template's card lift: cyan-tinted shadow. */
.oc-glow-hover {
    transition: box-shadow 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
}
.oc-glow-hover:hover {
    box-shadow: 0 0 34px rgba(39, 187, 255, 0.22), 0 8px 28px rgba(0, 0, 0, 0.45);
    transform: translateY(-3px);
    border-color: rgba(39, 187, 255, 0.45);
}

/* Electric-blue text glow for hero titles (use sparingly). */
.oc-hero-glow {
    text-shadow: 0 0 42px rgba(11, 59, 240, 0.55);
}

/* MudStack rows (utility flex rows with gap classes) reflow on narrow screens
   instead of squashing titles and buttons together. flex-wrap only engages when
   content overflows, so desktop layouts are unchanged. */
.d-flex.flex-row[class*="gap-"] {
    flex-wrap: wrap;
}

/* Table action cells never wrap: the rule above turns stacked icon rows in
   narrow grid columns vertical (one icon per line, rows balloon). Icon rows
   in tables are always one horizontal line — columns carry explicit Widths. */
.mud-table-cell .d-flex.flex-row[class*="gap-"] {
    flex-wrap: nowrap;
}

/* ============================================================
   Zenko appbar — public-site top-section look (navy gradient +
   blue glow + cyan hairline) with the neuron brand mark.
   Fixed dark surface in both themes, mirroring the public header.
   ============================================================ */
.zen-appbar {
    background:
        radial-gradient(480px 110px at 16% 0%, rgba(11, 59, 240, 0.42), transparent 72%),
        radial-gradient(340px 90px at 82% 100%, rgba(122, 251, 252, 0.10), transparent 72%),
        linear-gradient(180deg, #0a0e24 0%, #030614 100%) !important;
    color: #fff !important;
    position: relative;
}
.zen-appbar::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
    background: linear-gradient(90deg, transparent 4%, rgba(11, 59, 240, 0.9) 30%, #7afbfc 50%, rgba(11, 59, 240, 0.9) 70%, transparent 96%);
    pointer-events: none;
}
.zen-appbar .mud-icon-root { color: #fff; }
.zen-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer; }
.zen-brand:hover .zen-brand-name { color: #7afbfc; }
.zen-brand-icon { color: #0b3bf0; filter: drop-shadow(0 0 10px rgba(11, 59, 240, 0.8)); flex-shrink: 0; }
.zen-brand-name { color: #fff; font-weight: 700; font-size: 1.08rem; letter-spacing: 0.09em; text-transform: uppercase; white-space: nowrap; }
/* Tenant logo in the appbar (tenant branding) — replaces the tenant-name text. */
.zen-tenant-logo { height: 34px; max-width: 170px; width: auto; border-radius: 6px; object-fit: contain; display: block; }

/* ============================================================
   Quick pad surface — the phone app's own design system, scoped
   to the /quick shell so the desktop app is untouched. Filled
   buttons wear a lifted navy gradient (the appbar's glow over a
   brighter base) with square corners; action tiles run edge to
   edge; inputs, selects, and dropdown menus wear the same blue
   surface at the same 64px height as the buttons. The pad has no
   dialogs — every module is a page with hidden sections — so
   select popovers are the only floating surface, hosting inside
   the pad's own popover provider.
   ============================================================ */
.quick-surface .mud-button-root { border-radius: 0 !important; }

.quick-surface .mud-button-filled {
    background:
        radial-gradient(140px 44px at 18% 0%, rgba(11, 59, 240, 0.55), transparent 72%),
        radial-gradient(110px 36px at 84% 100%, rgba(122, 251, 252, 0.16), transparent 72%),
        linear-gradient(180deg, #223a7c 0%, #122458 100%) !important;
    color: #fff !important;
    box-shadow: inset 0 -1px 0 rgba(122, 251, 252, 0.3);
    text-transform: none;
}
.quick-surface .mud-button-filled:hover { filter: brightness(1.15); }
.quick-surface .mud-button-filled:active { filter: brightness(0.88); }
.quick-surface .mud-button-filled .mud-icon-root { color: #fff !important; }

/* Action tiles: the full width of the screen — they break out of the
   pad column's 16px gutters so the gradient runs edge to edge. */
.quick-surface .quick-btn {
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
    height: 64px;
    font-size: 1.05rem;
    font-weight: 600;
}

/* Quick-hour chips: equal-width squares of the same navy, one row. */
.quick-surface .quick-chip {
    flex: 1 1 0;
    min-width: 0 !important;
    height: 40px;
    border: 1px solid rgba(122, 251, 252, 0.3) !important;
    background: #1b2f6b !important;
    color: #fff !important;
    text-transform: none;
}
.quick-surface .quick-chip:hover { filter: brightness(1.2); }

/* Chip rows that wrap (bill category presets): three per row instead of
   the hour chips' one-row flex. */
.quick-surface .quick-chip-wrap .quick-chip { flex: 1 1 30%; }

/* Phone fields: selects and inputs wear a dark charcoal surface — dark,
   never navy (founder rule, 2026-10-04) — square corners, white text,
   matching the buttons' 64px height and type size, edge to edge. The
   breakout mirrors .quick-btn: fields pull out of their container's
   16px gutters (the pad column, a full-screen dialog's content) so
   every control is one aligned stack. MudBlazor clamps
   .mud-input-control with max-width:100% — without lifting the clamp
   the width calc silently truncated the right side. */
.quick-surface .mud-input-control {
    width: calc(100% + 32px) !important;
    max-width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
}
.quick-surface .mud-input-outlined {
    background: linear-gradient(180deg, #22252c 0%, #131519 100%);
    border-radius: 0;
    min-height: 64px;
}
.quick-surface .mud-input-outlined-border {
    border-radius: 0 !important;
    border-color: transparent !important;
}
.quick-surface .mud-input-outlined:focus-within .mud-input-outlined-border {
    border-color: rgba(122, 251, 252, 0.8) !important;
}
.quick-surface .mud-input-outlined .mud-input-slot { color: #fff; font-size: 1.05rem; }
.quick-surface .mud-input-outlined .mud-input-slot::placeholder { color: rgba(255, 255, 255, 0.45); }
.quick-surface .mud-input-outlined .mud-icon-root { color: rgba(255, 255, 255, 0.8); }

/* The floating label rests INSIDE the dark box (light text, centered in
   the 64px height) and floats ABOVE it once filled (theme text, on the
   page background). MudBlazor's own shrink/focus rules out-rank these,
   so the floated position stays stock. */
.quick-surface label.mud-input-label-outlined {
    color: rgba(255, 255, 255, 0.72);
    transform: translate(14px, 24px) scale(1);
}
.quick-surface .mud-shrink ~ label.mud-input-label-outlined,
.quick-surface .mud-input:focus-within ~ label.mud-input-label-outlined {
    color: var(--mud-palette-text-secondary);
}

/* The inventory search row (Quotes line entry): the field grows and the
   Find button sits beside it at chip width — a half button, not a
   stretched one. The row itself carries the edge-to-edge breakout so it
   aligns with the stacked fields; the field's own breakout is
   neutralized inside it (same pattern as the switch row). */
.quick-surface .quick-search-row {
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
}
.quick-surface .quick-search-row .mud-input-control {
    width: auto !important;
    max-width: none;
    margin: 0;
}

/* Select dropdowns: the same dark surface the select input wears
   (founder rule, 2026-10-04: the dropdown list is styled just like the
   select) — scoped to list popovers so date-picker popovers keep their
   theme surface. The background needs !important: popovers carry
   .mud-paper, and the pad's paper rule below paints navy with
   !important — this rule is more specific, so it wins the important
   contest. The selected item is the pad's cyan accent, not MudBlazor's
   brand-blue mud-primary-text (also !important). */
.quick-surface .mud-popover:has(.mud-list) {
    background: linear-gradient(180deg, #22252c 0%, #131519 100%) !important;
    border: 1px solid rgba(122, 251, 252, 0.25);
    border-radius: 0;
}
.quick-surface .mud-popover:has(.mud-list) .mud-list-item { color: #fff !important; }
.quick-surface .mud-popover:has(.mud-list) .mud-list-item.mud-selected-item { color: #7afbfc !important; }
.quick-surface .mud-popover:has(.mud-list) .mud-list-item:hover { background: rgba(122, 251, 252, 0.18); }

/* Cards and picker papers: the same lifted navy gradient as the tiles,
   square to match (founder rule, 2026-10-04: secondary surfaces — the
   date-picker calendar, the workspace card — go dark). The picker
   toolbar keeps its brand-blue theme; the calendar body below it wears
   the navy with white day text. */
.quick-surface .mud-paper {
    border-radius: 0 !important;
    background:
        radial-gradient(140px 44px at 18% 0%, rgba(11, 59, 240, 0.55), transparent 72%),
        radial-gradient(110px 36px at 84% 100%, rgba(122, 251, 252, 0.16), transparent 72%),
        linear-gradient(180deg, #223a7c 0%, #122458 100%) !important;
    color: #fff !important;
    border: 1px solid rgba(122, 251, 252, 0.25);
}

/* Date-picker calendar text on the dark paper: white days, dimmed
   week-headers and adjacent-month days, cyan hover. MudBlazor paints
   the month-nav icon buttons with the surface colour — make them
   transparent so the navy shows through. */
.quick-surface .mud-picker .mud-typography,
.quick-surface .mud-picker .mud-day { color: #fff !important; }
.quick-surface .mud-picker .mud-day:hover { background-color: rgba(122, 251, 252, 0.25) !important; }
.quick-surface .mud-picker .mud-day.mud-adjacent-month { color: rgba(255, 255, 255, 0.38) !important; }
.quick-surface .mud-picker .mud-day-label,
.quick-surface .mud-picker .mud-picker-calendar-week-text { color: rgba(255, 255, 255, 0.45) !important; }
.quick-surface .mud-picker-calendar-header-switch > .mud-icon-button {
    background-color: transparent !important;
}
.quick-surface .mud-picker .mud-picker-year:hover,
.quick-surface .mud-picker .mud-picker-month:hover {
    background-color: rgba(122, 251, 252, 0.25) !important;
}

/* Alerts (info banners, warnings, save confirmations): dark navy like
   the other secondary surfaces, with a severity accent on the left
   edge and the severity colour on the icon. Filled is the pad's only
   alert variant. */
.quick-surface .mud-alert {
    background:
        radial-gradient(140px 44px at 18% 0%, rgba(11, 59, 240, 0.55), transparent 72%),
        radial-gradient(110px 36px at 84% 100%, rgba(122, 251, 252, 0.16), transparent 72%),
        linear-gradient(180deg, #223a7c 0%, #122458 100%) !important;
    color: #fff !important;
    border: 1px solid rgba(122, 251, 252, 0.25);
    border-left-width: 4px;
}
.quick-surface .mud-alert .mud-alert-message { color: #fff !important; }
.quick-surface .mud-alert-filled-info { border-left-color: #7afbfc; }
.quick-surface .mud-alert-filled-info .mud-alert-icon { color: #7afbfc !important; }
.quick-surface .mud-alert-filled-success { border-left-color: #66bb6a; }
.quick-surface .mud-alert-filled-success .mud-alert-icon { color: #66bb6a !important; }
.quick-surface .mud-alert-filled-warning { border-left-color: #ffb74d; }
.quick-surface .mud-alert-filled-warning .mud-alert-icon { color: #ffb74d !important; }
.quick-surface .mud-alert-filled-error { border-left-color: #ef5350; }
.quick-surface .mud-alert-filled-error .mud-alert-icon { color: #ef5350 !important; }

/* Hidden sections (QuickSection — the pad's dialog replacement): the expanded
   panel under a tile. No card chrome: the fields are the surface, breaking
   out to the screen edges like the tiles, so the panel is just spacing. */
.quick-surface .quick-section { padding-top: 8px; }

/* Theme switch row (the Appearance menu's dark-mode control): a toggle
   switch on a background that looks like a button — the same dark
   surface the fields wear, 64px, edge to edge, so it reads as one of
   the tiles. The
   whole row is the tap target; the MudSwitch inside is the visual only
   (pointer-events off), the row carrying role="switch" for keyboards and
   screen readers. The checked track wears the cyan accent; the thumb
   stays white in both states. */
.quick-surface .quick-switch-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
    min-height: 64px;
    padding: 0 20px;
    background: linear-gradient(180deg, #22252c 0%, #131519 100%);
    box-shadow: inset 0 -1px 0 rgba(122, 251, 252, 0.3);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.quick-surface .quick-switch-row:hover { filter: brightness(1.15); }
.quick-surface .quick-switch-row:active { filter: brightness(0.88); }
.quick-surface .quick-switch-row:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}
.quick-surface .quick-switch-row .quick-switch-visual {
    pointer-events: none;
    margin-left: auto;
    display: inline-flex;
}
/* The switch's own wrapper is a .mud-input-control — neutralize the pad's
   field breakout (edge-to-edge width) so it shrink-wraps the switch. */
.quick-surface .quick-switch-row .mud-input-control {
    width: auto !important;
    max-width: none;
    margin: 0;
}
.quick-surface .quick-switch-row .mud-switch-track {
    background-color: rgba(255, 255, 255, 0.35) !important;
    opacity: 1 !important;
}
.quick-surface .quick-switch-row .mud-switch-base { color: #fff !important; }
.quick-surface .quick-switch-row .mud-switch-base.mud-checked + .mud-switch-track {
    background-color: #7afbfc !important;
    opacity: 1 !important;
}

/* Settings buttons (founder rule, 2026-10-04): text aligned left — the
   section tiles read as a menu list (icon, title, chevron at the far
   right) and the save buttons start at the left edge like the fields
   above them. Scoped to the Settings screen's wrapper so the other
   modules keep the pad's centred buttons. */
.quick-surface .quick-settings .quick-btn {
    justify-content: flex-start;
    text-align: left;
    padding-left: 20px;
    padding-right: 20px;
}
.quick-surface .quick-settings .quick-btn .mud-button-label {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.quick-surface .quick-settings .quick-btn .mud-button-icon-end {
    margin-left: auto;
}

/* ============================================================
   Billing module cards — the public Pricing banner head on the
   subscription card. The illustration banner is a dark panel on
   purpose (same asset as the shop); the body follows the app theme.
   ============================================================ */
.bill-card { display: flex; flex-direction: column; height: 100%; border-radius: 16px; overflow: hidden; transition: border-color 0.3s, box-shadow 0.3s; }
.bill-card-active { border-color: var(--mud-palette-primary) !important; box-shadow: 0 0 0 1px var(--mud-palette-primary), 0 10px 30px color-mix(in srgb, var(--mud-palette-primary) 18%, transparent); }
.bill-banner { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-primary-darken) 100%); }
.bill-banner img { width: 100%; display: block; }
.bill-chip {
    position: absolute; top: 12px; right: 12px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    padding: 3px 10px; border-radius: 999px;
    background: rgba(3, 6, 20, 0.72); color: #9b9da7; border: 1px solid rgba(128, 128, 128, 0.4);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.bill-chip-active { background: rgba(24, 154, 97, 0.92); border-color: transparent; color: #fff; }
.bill-chip-other { background: rgba(245, 158, 11, 0.92); border-color: transparent; color: #30230a; }
.bill-body { display: flex; flex-direction: column; flex-grow: 1; padding: 16px 20px 12px; }
.bill-foot { padding: 10px 16px 14px; border-top: 1px solid var(--mud-palette-lines-default); }

/* AI Assistant flyout — a MudMenu popover hosting the whole mini window.
   MudMenu wraps ChildContent in a list; strip its list styling so the
   flyout looks like a dialog panel, not a menu. */
.ai-flyout-popover { overflow: hidden; border-radius: 14px; }
.ai-flyout-popover .mud-list { background: transparent; box-shadow: none; }

/* ============================================================
   Module hub dashboards — KPI strip, chart grid, month labels.
   Theme-safe: fixed accents over Mud theme variables.
   ============================================================ */
.zen-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 12px;
}
.zen-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 16px;
    /* stretch: every chart card in a row shares the tallest height, so
       side-by-side cards read as one even band (David's "even the sizes"). */
    align-items: stretch;
}
/* Position band — the accounting compliance strip: GST, tax and PAYE as three
   balanced cards in one row (David's "3 in the row"), 16px apart like the
   other bands. Each card carries its own period selector — GST files
   two-monthly, income tax is assessed over longer windows, PAYE files
   monthly — so no single window is forced on all three. */
.zen-position-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}
.zen-position-grid-two {   /* no committed pay runs — the PAYE flank hides */
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 1024px) {
    .zen-position-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .zen-position-grid .zen-position-anchor { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
    .zen-position-grid, .zen-position-grid-two { grid-template-columns: minmax(0, 1fr); }
}
.zen-kpi {
    padding: 16px 18px !important;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
}
.zen-kpi::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(200px 100px at 88% -10%, rgba(11, 59, 240, 0.10), transparent 70%);
    pointer-events: none;
}
.zen-kpi > * { position: relative; }
.zen-kpi-label {
    font-size: .74rem; text-transform: uppercase; letter-spacing: .09em;
    color: var(--mud-palette-text-secondary); font-weight: 600;
}
.zen-kpi-value { font-size: 1.65rem; font-weight: 700; letter-spacing: -0.5px; line-height: 1.1; }
.zen-kpi-sub { font-size: .8rem; color: var(--mud-palette-text-secondary); }
.zen-month-labels {
    display: flex; justify-content: space-between;
    font-size: .7rem; color: var(--mud-palette-text-secondary);
    text-transform: uppercase; letter-spacing: .05em;
}

/* --- Bookings week grid ------------------------------------------------- */
.zen-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}
@media (max-width: 900px) {
    .zen-week-grid { grid-template-columns: repeat(2, 1fr); }
}
.zen-week-day {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.zen-week-today {
    border-color: var(--mud-palette-primary);
    box-shadow: inset 0 0 0 1px var(--mud-palette-primary);
}
.zen-week-day-head {
    display: flex;
    justify-content: space-between;
    padding: 6px 8px;
    background: var(--mud-palette-background-grey);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.zen-week-today .zen-week-day-head {
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}
.zen-week-day-name { font-weight: 600; font-size: .8rem; }
.zen-week-day-date { font-size: .75rem; opacity: .8; }
.zen-week-day-body {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.zen-week-booking {
    border-radius: 6px;
    padding: 4px 6px;
    font-size: .72rem;
    line-height: 1.25;
    display: flex;
    flex-direction: column;
    cursor: default;
}
.zen-week-booking .zen-week-time { font-weight: 600; }
.zen-week-booking .zen-week-cust { font-weight: 600; }
.zen-week-booking .zen-week-svc { opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zen-week-confirmed { background: rgba(131, 241, 164, .25); border-left: 3px solid #4caf50; }
.zen-week-held { background: rgba(245, 185, 95, .25); border-left: 3px solid #ff9800; }
.zen-week-completed { background: rgba(137, 116, 255, .18); border-left: 3px solid #8974ff; opacity: .8; }
.zen-week-cancelled, .zen-week-noshow { background: rgba(239, 83, 80, .15); border-left: 3px solid #ef5350; opacity: .65; text-decoration: line-through; }
.zen-week-empty { opacity: .35; text-align: center; padding-top: 12px; }
