/* Radzen declares Material Symbols without font-display, so icon ligature names
   ("menu", "home", "arrow_drop_down") flash as text while the font downloads.
   Re-declaring the face (this sheet loads after material-base.css) with
   font-display: block hides the text instead; each app's index.html also
   preloads the woff2 so the font is usually ready before first render. */
@font-face {
  font-family: "Material Symbols";
  src: url("/_content/Radzen.Blazor/fonts/MaterialSymbolsOutlined.woff2") format("woff2 supports variations"),
       url("/_content/Radzen.Blazor/fonts/MaterialSymbolsOutlined.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
}

* { box-sizing: border-box; }
html, body, #app { margin: 0; height: 100%; }
body {
  font-family: var(--ls-font);
  font-size: var(--ls-fs-lg);
  color: var(--ls-text);
  background: var(--ls-surface-alt);
}
a { color: var(--ls-link); text-decoration: none; }
/* Buttons inherit the page font (Phase 3, 8 Oct 2026): an unstyled icon-only button otherwise sits at the
   browser default 13.33px, off the type scale. .v3-btn and Radzen set their own on top. */
button { font: inherit; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------------
   V3 theme — the ERP-wide template. Every app/module uses these building
   blocks; page-scoped CSS is for page-specific layout only.
   Tokens live in v3-tokens.css.
--------------------------------------------------------------------------- */

/* Radzen alignment: material-base.css loads first; these overrides pull every
   Radzen control (buttons, grids, tabs, dialogs, dropdowns) onto the V3 navy. */
:root {
  --rz-primary: var(--ls-primary);
  --rz-primary-light: #2f5876;
  --rz-primary-lighter: var(--ls-surface-active);
  --rz-primary-dark: var(--ls-primary-hover);
  --rz-primary-darker: #001d33;
  --rz-on-primary: #fff;
  --rz-secondary: var(--ls-link);
  --rz-secondary-light: var(--ls-link-muted);
  --rz-secondary-lighter: var(--ls-info-bg);
  --rz-secondary-dark: #216e9e;
  --rz-secondary-darker: #185a83;
  --rz-on-secondary: #fff;
  --rz-text-font-family: var(--ls-font);
  /* Body ink: Radzen's material default is #424242 grey, which left every grid cell paler than
     legacy (CTO 16 Oct 2026). Map it to the house text token in every theme. */
  --rz-text-color: var(--ls-text);
  --rz-grid-cell-color: var(--ls-text);

  /* control metrics — legacy CRM parity (18 Sep 2026, Je): denser than .v3-btn on purpose, so this
     stays a literal 3px rather than var(--ls-radius-control), which also sizes buttons/chips/menus. */
  --rz-input-height: 28px;
  --rz-input-font-size: var(--ls-fs-base);
  --rz-input-padding-block: 4px;
  --rz-input-padding-inline: 8px;
  --rz-input-border-radius: 3px;
  --rz-input-border: 1px solid var(--ls-border-mid);
  --rz-input-focus-border: 1px solid var(--ls-primary);
  --rz-dropdown-item-font-size: var(--ls-fs-base);

  /* grid type — Radzen ships 0.875rem (14px) cells and 14px sentence-case headers, which read
     bigger than the cards beside them. Pull both onto the house scale: cells match .v3-table td
     and an info card's values (13px); headers match the small uppercase labels (.v3-table th /
     .info-list dt). Set here so every ERP grid matches, never per page. */
  --rz-grid-cell-font-size: var(--ls-fs-md);
  --rz-grid-header-font-size: var(--ls-fs-xs);
  --rz-grid-header-font-weight: 700;

  /* House pager scale (18 Sep 2026, Je: "make the pager count/labels in all the grids smaller",
     then pointed at the grid's own "2,316 entries" .result-count text — 11px — as the target
     scale). The real class is `.rz-pager-summary` (this Radzen version has no `.rz-paginator` at
     all — a first attempt targeting that class silently matched nothing, which is why the text
     "still looked the same size"). `--rz-pager-summary-font-size` alone covers BOTH the "Page X
     of Y (N items)" summary and the "items per page" label — Radzen's own `.rz-pagesize-text`
     rule reads the same variable. The oversized numeric page-number buttons (1 2 3 4 5) were the
     other big claim on a compact card's height/width; brought down near the grid's own compact
     row scale rather than Radzen's default 48px-wide buttons. */
  --rz-pager-summary-font-size: var(--ls-fs-sm);
  --rz-pager-numeric-button-min-width: 24px;
  --rz-pager-numeric-button-padding: 2px 4px;
  --rz-pager-dropdown-width: 60px;
}

/* The uppercase label look can't be expressed as a Radzen var — it rides on the title element. */
.rz-grid-table thead th .rz-column-title {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ls-text-label);
}

/* Match every plain dropdown to .v3-input. Radzen's `.rz-input-md` class (its default Size) sets
   `--rz-input-height`/etc directly ON the `.rz-dropdown` element from its own `--rz-input-size-md`
   token (2.5rem/40px) — a declaration made directly on the element always wins over the :root ones
   above, which only reach it by inheritance, regardless of load order. Re-declare them here across
   the states Radzen also restyles (open/focused), same fix `.v3-row-dropdown` already applies locally. */
.rz-dropdown,
.rz-dropdown:not(.rz-state-disabled):focus,
.rz-dropdown.rz-state-focused,
.rz-dropdown.rz-dropdown-open {
  --rz-input-height: 28px;
  --rz-input-line-height: 16px;
  --rz-input-font-size: var(--ls-fs-base);
  --rz-input-padding-block: 4px;
  --rz-input-padding-inline: 8px;
}

/* The date picker has the same shadowing: `.rz-datepicker.rz-input-md` writes `--rz-input-height`
   (2.5rem/40px) and its padding onto the element, and `.rz-datepicker>.rz-inputtext` sizes itself from
   those — so a picker sat 40px tall beside a 32px button and a 34px dropdown (Payroll Close's "Open
   period ending", Je, 8 Sep 2026). Same re-pin as the dropdown above, on the element and its focused
   state; the trailing calendar-icon inset is Radzen's own `:has(.rz-datepicker-trigger)` rule and stays. */
.rz-datepicker,
.rz-datepicker.rz-state-focused {
  --rz-input-height: 28px;
  --rz-input-line-height: 16px;
  --rz-input-padding-block: 4px;
  --rz-input-padding-inline: 8px;
}

/* Match a date field to the V3DropDown beside it. `--rz-input-font-size` is NOT usable here: Radzen's
   `.rz-input-md` re-defines that var ON the control to 1rem (16px), so it shadows our :root 13px and a
   `var(--rz-input-font-size)` pin resolves to 16px on the element — the date then reads BIGGER than the
   dropdown. The dropdown's selected value renders via `.rz-dropdown-label` at an explicit 14px (see the
   dropdown-label rule further down), so pin the inner input to the same 14px + the dropdown's line box
   (`--rz-input-line-height`, overriding Radzen's 1.5rem `--rz-datepicker-line-height`). Covers both the
   plain date and the `dd MMM yyyy HH:mm` ShowTime variant. `input.rz-inputtext` (element+class)
   out-specifies Radzen's own `.rz-datepicker>.rz-inputtext` rule regardless of load order. */
.rz-datepicker input.rz-inputtext { font-size: var(--ls-fs-base); line-height: var(--rz-input-line-height); }

/* RadzenNumeric has the identical shadowing: `.rz-numeric.rz-input-md` writes `--rz-input-height`
   (2.5rem/40px) and `--rz-input-font-size` (1rem/16px) onto the element, so a raw numeric field
   (Quote Editor's "Routine service"/"Parts warranty" years, not routed through V3Numeric's
   `.v3-input` text-entry mode) rendered visibly bigger than every dropdown/date/text field beside
   it — found live, 18 Sep 2026, Je. Same re-pin as the dropdown/datepicker above. */
.rz-numeric,
.rz-numeric:not(.rz-state-disabled):focus,
.rz-numeric.rz-state-focused {
  --rz-input-height: 28px;
  --rz-input-line-height: 16px;
  --rz-input-font-size: var(--ls-fs-base);
  --rz-input-padding-block: 4px;
  --rz-input-padding-inline: 8px;
}
/* Radzen's up/down spinner buttons are sized and positioned for its own 40px-tall control
   (`top:2px`/`height:16px` and `bottom:2px`/`height:16px` — exactly halves a 40px box with a
   4px gap between them) and don't rescale with `--rz-input-height`, so at our 28px height they
   overlapped by 8px and rendered as one merged diamond instead of two carets — found live,
   18 Sep 2026, Je ("Custom width/depth" in the Quote Editor). Re-pinned to split the shorter box
   evenly with a 1px gap. */
.rz-numeric-up, .rz-numeric-down { height: 13px; right: 2px; }
.rz-numeric-up { top: 1px; }
.rz-numeric-down { bottom: 1px; }
.rz-numeric-button-icon { font-size: var(--ls-fs-sm); line-height: 13px; }

/* Radzen's icon font defaults to --rz-icon-size (1.5rem/24px) everywhere, including the dropdown
   clear (×) and trigger (chevron) glyphs and the date picker's calendar-icon trigger button — all
   sized for its original 40px-tall control. At our 28px compact height the icon nearly filled the
   whole box (24px in 26-28px), reading oversized next to 12px field text — found live, 18 Sep
   2026, Je. Scoped to these specific icon classes rather than the shared --rz-icon-size variable,
   which also sizes icon-only buttons elsewhere that are NOT part of this compact-field pass. */
.rz-dropdown-trigger-icon { font-size: var(--ls-fs-lg) !important; width: 14px !important; height: 14px !important; }
/* Radzen's clear (×) is position:absolute with a bare `top:0` (sized for its original 24px-tall
   icon nearly filling the 40px control, so top:0 read close enough to centred). Shrinking it to
   14px kept `top:0`, pinning it flush to the box's top edge instead of the middle — found live,
   18 Sep 2026, Je. `top:50%` + a translate centres it regardless of the control's own height. */
.rz-dropdown-clear-icon {
  font-size: var(--ls-fs-lg) !important;
  width: 14px !important;
  height: 14px !important;
  top: 50% !important;
  transform: translateY(-50%);
}
.rz-datepicker-trigger.rz-button-icon-only { width: 22px; height: 22px; }
.rz-datepicker-trigger .rzi { font-size: var(--ls-fs-lg); }

/* Back link — the house affordance on detail pages, sits above the page title. Standardised
   app-wide (18 Sep 2026, Je: "make it a app wide/standard ui/design how we implemented it in
   lift workspace") on the solid `.v3-btn.sm` treatment the Lift Workspace header redesign (PR
   3593) introduced page-scoped as `v3-btn sm back-btn` — promoted here so every back-link is one
   shared class instead of two competing looks. Was "clean text at rest, pill only on hover";
   that read as too easy to miss ("so it is noticeable"), so it is now solid at rest, same as any
   other button. Mirrors `.v3-btn.sm` deliberately (flat 3px radius, not a pill — legacy CRM
   parity already moved `.v3-btn` off the pill shape, 18 Sep 2026) rather than composing it via
   markup, since several consumers are `<button>` elements, not `<a>`. No more `margin-left`
   cancel trick (shared.css history) — that only mattered for blending an almost-invisible text
   link flush with the heading below it; a filled button doesn't need to hide its own padding. */
.back-link {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  background: var(--ls-primary); color: #fff; border: 1px solid transparent; border-radius: 3px;
  font-family: var(--ls-font); font-size: var(--ls-fs-base); font-weight: 600;
  margin-bottom: 6px; text-decoration: none; cursor: pointer;
  padding: 4px 12px; box-shadow: var(--ls-shadow-1);
  transition: background .14s, border-color .14s, color .14s;
}
.back-link:hover { background: var(--ls-primary-hover); text-decoration: none; }
.back-link:focus-visible { outline: 2px solid var(--ls-primary-tint-2); outline-offset: 1px; }
.back-link .rzi { transition: transform .14s; }
.back-link:hover .rzi { transform: translateX(-2px); }
@media (prefers-reduced-motion: reduce) { .back-link .rzi { transition: none; } }

/* Detail-page header meta — the key facts under the title (address, owner, dates) as an icon row,
   readable at a glance instead of one muted sentence. */
.head-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 6px; }
.head-meta .meta-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--ls-fs-md); font-weight: 400; color: var(--ls-text);
}
.head-meta .meta-item i { color: var(--ls-text-muted); }
.head-meta .meta-label { color: var(--ls-text-muted); font-weight: 400; }
/* A meta-item that links out (e.g. address -> Google Maps). */
.head-meta a.meta-link { text-decoration: none; cursor: pointer; }
.head-meta a.meta-link:hover { color: var(--ls-primary); text-decoration: underline; }
.head-meta a.meta-link:hover i { color: var(--ls-primary); }

/* Labelled facts list — the house <dl> for record facts on detail pages and dialogs.
   Pages may override grid-template-columns for a narrower label column. */
.info-list { display: grid; grid-template-columns: 110px 1fr; row-gap: 8px; column-gap: 12px; margin: 0; }
.info-list dt {
  font-size: var(--ls-fs-sm); font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ls-text-muted); align-self: center;
}
.info-list dd { margin: 0; font-size: var(--ls-fs-md); color: var(--ls-text); min-width: 0; }

/* Record link inside a grid cell or toolbar — navy-blue, bold, underline on hover. */
.grid-link { color: var(--ls-link); text-decoration: none; }
.grid-link:hover { text-decoration: underline; }
/* A stood-down text-link row action (15 Sep 2026, promoted from ProjectSummaryPage.razor.css once
   ClientRowMenu needed it too): an <a> takes no disabled attribute, so aria-disabled="true" carries
   the state for assistive tech and this class carries it for the eye — muted, no pointer, no
   underline. Pair the two every time; one without the other is a silent dead link. */
.grid-link.is-disabled { color: var(--ls-text-muted); cursor: not-allowed; }
.grid-link.is-disabled:hover { text-decoration: none; }

/* Page header */
.page-header {
  background: var(--ls-surface);
  border-bottom: 1px solid var(--ls-border-mid);
  padding: 14px 20px 12px;
  display: flex;
  align-items: flex-start;   /* the right-hand cluster tops with the H1 */
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  /* `.shell .content > *` (below) gives every page-level direct child of the scroll container
     `transform: translateZ(0)` — deliberately, to stop a Chrome/Windows font-antialiasing flicker
     during the entrance fade. A side effect: any non-`none` transform makes an element a stacking
     context at level 0, so .page-header and its next sibling (a tab strip, a flight path, a
     banner...) tie, and the LATER one wins regardless of DOM depth — trapping a header-hosted
     popover (Site Central's Lifts dropdown) behind whatever renders after the header, no matter
     the popover's own z-index. z-index has NO effect on a position:static box, full stop — the
     transform does NOT imply position:relative (a first attempt at this fix shipped z-index alone
     and, confirmed via getComputedStyle on the live app, position stayed "static" and the bug
     persisted). position:relative is required alongside z-index to actually break the tie.
     Verified live in the running app (not just a static repro), 11 Aug 2026. */
  position: relative;
  z-index: 1;
}
.page-header h1 {
  margin: 0;
  font-size: var(--ls-fs-2xl);
  font-weight: 700;
  color: var(--ls-primary);
}
/* Header-right action cluster — primary (New client, New site, Add security...) leads, secondaries
   (Subtle/Danger: Export, Bump my overdue, Close all mine, a sibling-page link) trail, all in one row
   top right. A 7 Sep 2026 change split the primary onto its own row under the title; reverted 8 Sep
   2026 — it read bulkier than this one-row layout. */
.head-actions { display: flex; align-items: center; gap: 8px; }
.page-sub {
  margin: 2px 0 0;
  font-size: var(--ls-fs-base);
  color: var(--ls-text-muted);
  flex-basis: 100%;
}
.page-header .head-text { flex: 1 1 auto; }
.page-header .head-text .page-sub { flex-basis: auto; }
/* A header's primary-action row under the sub-line (Payroll Close: "Open period ending" + picker +
   button; the period page's one action + its hint): one flex line, house gap, a breath below the
   sub-line. Wraps rather than overflows on a narrow header. */
.page-header .head-primary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* Cards */
.v3-card {
  background: var(--ls-surface);
  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-card);
  padding: 16px;
  box-shadow: none;
  transition: box-shadow .15s;
}
.v3-card:hover { box-shadow: var(--ls-shadow-card-hover); }
.pane-title {
  font-size: var(--ls-fs-base);
  font-weight: 700;
  color: var(--ls-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* Grid card (V3Grid component) */
.pane-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.pane-top .pane-title { margin-bottom: 0; }

/* Banded card head — the Quote Editor treatment (its .qe-main scoped rule was the first consumer),
   promoted at its second consumer, the lift workspace. Opt-in via .banded; the tinted strip sits
   flush to the card's top: negative margins swallow .v3-card's 16px padding, the radius follows the
   card's own. Direct child only — in-card subsection titles are not card heads. */
.v3-card.banded > .pane-top {
  margin: -16px -16px 10px;
  padding: 6px 16px;
  min-height: 38px;
  background: var(--ls-surface-alt, rgba(1, 45, 80, 0.05));
  border-bottom: 1px solid var(--ls-border-light, var(--ls-border));
  border-radius: calc(var(--ls-radius-card) - 1px) calc(var(--ls-radius-card) - 1px) 0 0;
  box-sizing: border-box;
}
/* Same band, now the DEFAULT for every card's title (legacy CRM parity, 18 Sep 2026, Je) — was
   opt-in only via .banded above. Scoped to a literal first child so an in-card subsection title
   (not the card's own header) is never touched, and `.stat` (compact KPI tiles) is excluded — a
   shaded band would outweigh a card that's mostly just a number. `.banded` above still works
   identically for any markup that already names it explicitly. `min-height` is pinned to the
   button-bearing case (a `.pane-top` with a `.v3-btn.sm` in it) and `.pane-title` alone gets
   `display:flex;align-items:center` so a plain-text band matches it rather than sizing to its
   own shorter line box — found live, 18 Sep 2026: unbanded, the height mismatch between a title
   with a header button and one without was invisible whitespace; banded, it read as a jagged
   strip of different-height headers down the page. Tightened same day (Je: "make the card header
   more compact even [when] there is a button in it"), then re-measured live against a REAL
   button-bearing pane-top (V3DataGrid's "New log" — 24.5px tall `.v3-btn.sm`, not the icon-only
   case originally assumed): at `8px 16px`/`36px` the button case's own content (padding + button +
   1px border ≈ 41.5px) blew past the 36px floor while text-only titles clamped to it — the exact
   "jagged strip" bug this rule exists to prevent, just reintroduced at a smaller scale (Je: "match
   the height to those cards with buttons in it"). `6px 16px`/`38px` makes both cases resolve to
   the same 38px: the button case's own content only needs ~37.5px so the 38px floor still wins. */
.v3-card:not(.stat) > .pane-title:first-child,
.v3-card:not(.stat) > .pane-top:first-child {
  margin: -16px -16px 10px;
  padding: 6px 16px;
  min-height: 38px;
  background: var(--ls-surface-alt, rgba(1, 45, 80, 0.05));
  border-bottom: 1px solid var(--ls-border-light, var(--ls-border));
  border-radius: calc(var(--ls-radius-card) - 1px) calc(var(--ls-radius-card) - 1px) 0 0;
  box-sizing: border-box;
}
.v3-card:not(.stat) > .pane-title:first-child { display: flex; align-items: center; }
/* Dirty-gated cards (28 Sep 2026, Je, from the Lift Workspace Details card: "i like how the
   dirty/buttons are implemented here ... implement across to existing cards"): `V3DirtyBar` rides
   the card's title band — pinned right, caps hint + small Cancel + Save — and the card itself tints
   amber while the bar renders, via :has(), so a consumer only drops the component into `.pane-top`
   (or a flex `.pane-title`). Nothing below the band moves when the card goes dirty, unlike the
   old `.ce-actions` foot row. The bar also carries `.ce-actions`, so the `.client-edit .ce-actions`
   foot-row rule below is overridden here for the in-band case. */
.v3-dirty-bar { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.client-edit .pane-top .v3-dirty-bar, .client-edit .pane-title .v3-dirty-bar,
.pane-top .v3-dirty-bar, .pane-title .v3-dirty-bar { margin: 0 0 0 auto; justify-content: flex-end; }
.v3-dirty-hint { font-size: var(--ls-fs-base); font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--ls-warning-text); white-space: nowrap; }
.v3-card:has(> .pane-top .v3-dirty-bar), .v3-card:has(> .pane-title .v3-dirty-bar) { border-color: var(--ls-warning-text); }
.v3-card:has(> .pane-top .v3-dirty-bar) > .pane-top,
.v3-card:has(> .pane-title .v3-dirty-bar) > .pane-title { background: var(--ls-warning-bg); }
/* A dialog body that groups its fields into several separate banded cards, stacked, rather than
   one continuous form under plain .mc-section-label dividers — first consumer: the Service Event
   / Maintenance Subscription edit dialogs (Phase F), which each carry too many distinct topics
   for the flat-divider treatment to read as chapters. */
.section-cards { display: flex; flex-direction: column; gap: 10px; }
/* A banded card whose body is switched off (the New Event dialog's "Schedule now"): the band IS the
   card — no body, no bottom rule, the band's radius follows the card all the way round. */
.v3-card.banded.collapsed > .pane-top { margin-bottom: -16px; border-bottom: none;
  border-radius: calc(var(--ls-radius-card) - 1px); }
/* The band's on/off switch (mc-switch, sized down) with its word, pinned to the band's right. */
.pane-top .sched-toggle { margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--ls-fs-base); font-weight: 600; color: var(--ls-text-secondary); cursor: pointer; }
.pane-top .sched-toggle .mc-switch { width: 34px; height: 18px; }
.pane-top .sched-toggle .mc-switch::after { width: 14px; height: 14px; top: 2px; left: 2px; }
.pane-top .sched-toggle .mc-switch:checked::after { left: 18px; }

/* ---- Compact overview card (flight path + stat tiles in one card). No lift-page consumer as of
   14 Sep 2026: Service Hub, the Lift Workspace Service tab and both Install shells dropped the card
   and its tiles for the FlightPath rail band (Je: "remove the tiles, keep the flight path"). Kept for
   a caller that still wants the shape. Promoted 3 Sep 2026, tightened
   further 9 Sep 2026 (Je: "make the Overview cards compact") — smaller flight-path nodes/text and
   denser stat tiles, scoped to this card only so the standalone Sales/Site Central flight paths
   and every other .stat-grid.slim consumer (Employees, Leave, Invoicing, …) are untouched. ---- */
.overview-card { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px; }
.overview-card > .pane-top { margin-bottom: 0; }
.overview-card .pane-title { margin-bottom: 0; }
.overview-card .flight-path { background: none; border: none; padding: 0; gap: 8px; }
.overview-card .flight-label { font-size: var(--ls-fs-xs); }
.overview-card .flight-toggle { padding: 0; }
.overview-card .flight-steps { gap: 0 6px; }
.overview-card .flight-step { gap: 6px; }
.overview-card .flight-step .step-node { width: 20px; height: 20px; }
.overview-card .flight-step .step-label { font-size: var(--ls-fs-xs); line-height: 11px; }
.overview-card .flight-step .step-value { font-size: var(--ls-fs-md); line-height: 14px; }
.overview-card .stat-grid.slim { margin: 0; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
.overview-card .stat-grid.slim .v3-card.stat { padding: 6px 10px 6px; }
.overview-card .stat-grid.slim .s-label { font-size: var(--ls-fs-xs); }
.overview-card .stat-grid.slim .s-value { font-size: var(--ls-fs-lg); line-height: 17px; }

/* ---- Payment ticks (Lift Workspace payment band + the Install rail's Payments card). ---- */
.pay-ticks { display: flex; justify-content: space-between; gap: 8px; }
.pay-tick { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.tick-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ls-border-mid); background: var(--ls-surface); }
.pay-tick.paid .tick-dot { background: var(--ls-success); border-color: var(--ls-success); }
.pay-tick.due .tick-dot { background: var(--ls-warning-text); border-color: var(--ls-warning-text); }
.tick-label { font-size: var(--ls-fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ls-text-label); white-space: nowrap; }
.tick-value { font-size: var(--ls-fs-md); font-weight: 600; color: var(--ls-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-tick.todo .tick-value { color: var(--ls-text-muted); font-weight: 400; }
.pay-tick.due .tick-value { color: var(--ls-warning-text); }
/* Vertical variant for a narrow rail card: dot + label + value on one line each. */
.pay-ticks.stacked { flex-direction: column; gap: 6px; }
.pay-ticks.stacked .pay-tick { flex-direction: row; align-items: center; gap: 8px; }
.pay-ticks.stacked .tick-dot { margin: 0; }
.pay-ticks.stacked .tick-value { margin-left: auto; }
@media (max-width: 1100px) { .pay-ticks { flex-wrap: wrap; row-gap: 12px; } }

/* ---- Milestone checklist rows (LiftMilestones: Service Hub + Install). ---- */
.ms-timeline { margin: 4px 0 8px; }
.ms-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ms-label { font-size: var(--ls-fs-base); font-weight: 600; color: var(--ls-text); min-width: 170px; }
.ms-value { font-size: var(--ls-fs-md); color: var(--ls-text-label); }
.ms-docs { margin-top: 4px; }
.ms-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
@media (max-width: 900px) { .ms-cols { grid-template-columns: 1fr; } }

/* ---- Link-out row: a labelled link to a legacy page (Install rail's Reports & documents). ---- */
.link-out { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 3px; font-size: var(--ls-fs-base); font-weight: 600; color: var(--ls-text-secondary); text-decoration: none; }
.link-out:hover { background: var(--ls-primary-tint); color: var(--ls-primary); text-decoration: none; }
.link-out .rz-icon, .link-out .rzi { color: var(--ls-text-muted); }
.link-out .ext { margin-left: auto; opacity: .7; }

/* ---- Banded accordion band: the pane-top doubles as the toggle. ---- */
.band-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.band-toggle .pane-title { margin-bottom: 0; }
.band-sum { font-size: var(--ls-fs-base); color: var(--ls-text-muted); display: inline-flex; gap: 8px; align-items: center; }
/* A band's right-pinned action cluster (icon buttons etc.) sitting alongside .band-sum. */
.pane-actions { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; }

/* A .qf-switch built from real radios (a form's exclusive-binary choice — the invoice dialog's Bill
   to Company / Client): the input stays in the DOM for the form and the tests, the label is the pill. */
.qf-switch label.qf-switch-opt { cursor: pointer; }
.qf-switch label.qf-switch-opt > input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.qf-switch label.qf-switch-opt:focus-within { outline: 2px solid var(--ls-primary-tint-2); outline-offset: 1px; }

/* Colour dropdown item — a small dot beside the colour's name, for a templated RadzenDropDown
   (ops prefer words over colour; the dot is a confirming hint, not the only cue). First consumer:
   the Service Event edit dialog's Colour code field, replacing a colour-only swatch picker. Reuse
   for any other "pick a colour" dropdown in Service — same pattern as Calendar's own booking
   colour picker (LiftShop.ERP.Calendar/Bookings/BookingEditor.razor). */
/* The ranked technician picker: a name, and the reason it sorts where it does. The dropdown rows
   are Radzen's, so these sit inside its item template rather than on a V3 control. */
.tech-opt { display: flex; flex-direction: column; gap: 1px; line-height: 1.3; padding: 1px 0; }
.tech-opt .tech-name { font-weight: 600; font-size: var(--ls-fs-md); }
.tech-opt .tech-why { font-size: var(--ls-fs-sm); color: var(--ls-text-muted); }
/* Busy or on leave: still selectable, just plainly not the obvious choice. */
.tech-opt.away .tech-name { font-weight: 500; color: var(--ls-text-muted); }
/* The recommended one, in the status green the rest of the ERP uses for a good state — kept off
   the navy accent, which Radzen is already using for selection and focus inside this dropdown. A
   left rule rather than a filled band: the row sits inside Radzen's own item padding, so a
   background would stop short of the edges and read as a mistake. */
.tech-opt.best { border-left: 3px solid var(--ls-success); padding-left: 7px; }
.tech-opt.best .tech-name { color: var(--ls-success-text); }
.tech-opt.best .tech-why { color: var(--ls-success-text); opacity: 0.85; }
.tech-star { color: var(--ls-success); margin-right: 3px; }
.tech-chosen { display: block; margin-top: 3px; font-size: var(--ls-fs-sm); color: var(--ls-text-muted); }
.tech-chosen.picked { color: var(--ls-success-text); font-weight: 600; }
/* The recommendation when someone else is already chosen — the board prefills a technician by which
   column was clicked, so without this the better match never surfaces. Sits under the field rather
   than inside the list, because the list is closed at the moment it matters. */
.tech-suggest {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-top: 5px; padding: 6px 9px; border-radius: var(--ls-radius-control);
  background: var(--ls-success-bg); color: var(--ls-success-text); font-size: var(--ls-fs-sm);
}
.tech-suggest-text { flex: 1; min-width: 0; }
/* Nothing to restyle: .tech-use is a V3Button, solid and themed like every other primary in the
   app. It only needs to stay on one line beside the reason. */
.tech-use { white-space: nowrap; flex: none; }

.colour-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px;
  margin-right: 6px; vertical-align: middle; box-shadow: 0 0 0 1px var(--ls-border-mid); }

/* Main content + a fixed-width info rail, side by side — first consumer: the Service Hub lift
   page's Service Events tab, paired with the GSM/phone/attendance rail (Phase G, ADO #3720).
   Stacks single-column below the width a 320px rail can share a row usefully. Grid items default
   to min-width:auto, so a wide child (the Service Events grid, 9 columns) blows out the 1fr track
   — and the whole page — into page-level horizontal scroll instead of scrolling inside its own
   card; min-width:0 on every direct child lets the track shrink to the row's actual space and
   pushes overflow back onto .v3-grid-card's own internal scroller (30 Aug 2026, Je: "goes beyond
   the boundaries"). */
.rail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 12px; align-items: start; }
.rail-layout > * { min-width: 0; }
@media (max-width: 900px) { .rail-layout { grid-template-columns: 1fr; } }

/* Row background for an event still open (no DateClosed) — legacy's own grdServiceList row rule
   (ServiceV2.aspx.cs ItemDataBound). First consumer: ServiceEventsTab's grid (Phase G follow-up,
   30 Aug 2026). */
/* Legacy's own colours (LightYellow #ffffe0 open, #dff0d8 serviced), set on the cells: the grid paints each cell
   with its stripe colour, which covered a colour set on the row, so open events showed no yellow (Michael Rossi,
   24 Nov 2026). The dark theme keeps a dim tint of each. */
.v3-row-open, .v3-row-open > td { background-color: #ffffe0 !important; }
/* Service Events: legacy shades a row green when a service slip is on file (the download sits there). */
.v3-row-slip, .v3-row-slip > td { background-color: #dff0d8 !important; }
:root[data-theme="dark"] .v3-row-open, :root[data-theme="dark"] .v3-row-open > td { background-color: #3a3a1c !important; }
:root[data-theme="dark"] .v3-row-slip, :root[data-theme="dark"] .v3-row-slip > td { background-color: #1f3524 !important; }

/* V3DataGrid loading: shimmer skeleton overlaid on the grid body (replaces Radzen's grey overlay).
   The overlay sits over the RadzenDataGrid only, so the card title/toolbar stay visible; :has keeps a
   sensible height during an initial (empty) load. */
.v3-grid-scroll { position: relative; }
.v3-grid-scroll:has(> .v3-grid-skel) { min-height: 220px; }
.v3-grid-skel { position: absolute; inset: 0; z-index: 3; background: var(--ls-surface);
  display: flex; flex-direction: column; gap: 14px; padding: 16px 4px; }
.result-count { font-size: var(--ls-fs-sm); color: var(--ls-text-muted); margin-left: auto; }
.grid-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
/* A one-line composer living in a grid's toolbar slot (the Service log's "Add a note"): the field
   takes the width, the button hugs it, both share the row. */
.grid-toolbar .composer { display: flex; align-items: flex-start; gap: 8px; flex: 1; min-width: 260px; }
.grid-toolbar .composer > textarea { flex: 1; }
.v3-table { width: 100%; border-collapse: collapse; }
.v3-table th {
  text-align: left;
  font-size: var(--ls-fs-xs);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ls-text-label);
  padding: 6px 10px;
  border-bottom: 1px solid var(--ls-border-mid);
}
.v3-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--ls-border-light);
  font-size: var(--ls-fs-md);
  vertical-align: middle;
}
.v3-table tbody tr:last-child td { border-bottom: none; }
.v3-table tbody tr:hover td { background: var(--ls-primary-tint); }
/* House cell roles for a .v3-table (promoted 3 Sep 2026 from three identical page-scoped copies —
   InvoicingTab, SalesYtdReport, SalesPerformanceReport — because a page-scoped rule never reaches a
   dialog-hosted grid: the Maintenance Subscription dialog's money columns sat left-aligned).
   .num: money and counts, right-aligned on tabular figures. .nowrap: a date or id that must not
   break. .acts: the trailing row-actions cell, shrunk to its content and right-aligned. A page may
   still widen .acts for its own action set (InvoicingTab does). */
.v3-table th.num, .v3-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.v3-table td.nowrap { white-space: nowrap; }
.v3-table th.acts, .v3-table td.acts { width: 1%; white-space: nowrap; text-align: right; }
/* V3Grid's optional rows (12 Nov 2026, first consumer: Shipment Prices). tr.v3-group-row is a band
   naming the group under it; tr.v3-detail-row is an item's inline detail; tr.v3-row-click is an item
   row that opens something on click. Child combinators so a table nested inside a detail row keeps
   its own cells. The :hover twins keep bands and detail from lighting up like an actionable row. */
.v3-table > tbody > tr.v3-group-row > td,
.v3-table > tbody > tr.v3-group-row:hover > td {
  background: var(--ls-surface-alt); padding: 6px 10px; border-bottom: 1px solid var(--ls-border-mid);
}
.v3-table > tbody > tr.v3-detail-row > td,
.v3-table > tbody > tr.v3-detail-row:hover > td {
  background: var(--ls-surface-alt); padding: 12px 16px; border-bottom: 1px solid var(--ls-border-mid);
}
/* A table nested in a detail row: hovering the detail row (which any pointer over the nested table
   does) must not tint the nested cells through the generic .v3-table tbody tr:hover td rule. */
.v3-table > tbody > tr.v3-detail-row:hover .v3-table td { background: transparent; }
.v3-table > tbody > tr.v3-row-click { cursor: pointer; }
.v3-table > tbody > tr.v3-row-click:focus-visible { outline: 2px solid var(--ls-primary); outline-offset: -2px; }
/* A wide .v3-table scrolls sideways inside its own card at every width, not only on phones (the
   media rule below adds the phone-only content sizing). A 12-column grid in a 960px dialog was
   pushing the whole dialog body sideways instead. */
.v3-card:has(> .v3-table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Refresh helpers: initials avatar + tabular money — additive, opt-in per cell. */
.v3-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: var(--ls-fs-base); letter-spacing: .02em; color: var(--ls-primary);
  background: var(--ls-primary-tint-2); flex: none; }
.money { font-weight: 600; font-variant-numeric: tabular-nums; }

/* StateFilter dropdown groups */
.state-group {
  font-size: var(--ls-fs-sm);
  font-weight: 700;
  color: var(--ls-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.state-option { padding-left: 8px; }

/* Segmented control — one pill per option, the chosen one on the primary. The Theme and Text size
   pickers in Settings → Appearance (was ThemeControl's own scoped .theme-seg until 16 Oct 2026). */
.v3-seg {
  display: inline-flex; background: var(--ls-surface-alt); border: 1px solid var(--ls-border);
  border-radius: 999px; padding: 3px; gap: 2px;
}
.v3-seg button {
  appearance: none; border: 0; background: transparent; cursor: pointer; font: inherit;
  font-size: var(--ls-fs-md); font-weight: 600; color: var(--ls-text-secondary);
  padding: 6px 15px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, color .15s;
}
.v3-seg button.on { background: var(--ls-primary); color: #fff; }
.v3-seg button:focus-visible { outline: 2px solid var(--ls-primary); outline-offset: 2px; }

/* Tabs */
.v3-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--ls-border-mid);
  /* The house tab-to-content gap. A tab BAND sitting above a padded wrap zeroes this —
     the wrap's own 12px padding is the gap (see Site Central's .summary-tabs). */
  margin-bottom: 8px;
}
.v3-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 9px 14px;
  margin-bottom: -1px;
  font-family: var(--ls-font);
  font-size: var(--ls-fs-md);
  font-weight: 600;
  color: var(--ls-text-secondary);
  cursor: pointer;
}
.v3-tab:hover { color: var(--ls-primary); background: var(--ls-surface-alt); }
/* A count chip beside a tab label (`<span class="v3-chip tab-count">12</span>`) — what sits behind the
   tab before it is opened. Promoted from the Lift Workspace's page CSS at its second consumer, the
   Service Event edit dialog (3 Sep 2026). */
.v3-tab .tab-count { font-size: var(--ls-fs-xs); padding: 1px 7px; font-variant-numeric: tabular-nums; }
/* A small status count (`<span class="pill warn">1 pending</span>`) — what needs you, coloured by how much
   it matters; omitted when zero. First use: the Platform page tabs (5 Nov 2026); promoted to a bare `.pill`
   the same day at its second consumer, the Platform Migrations "Recorded" summary. */
.pill { font-size: var(--ls-fs-xs); font-weight: 700; border-radius: var(--ls-radius-badge); padding: 1px 7px;
  background: var(--ls-primary-tint-2); color: var(--ls-primary); font-variant-numeric: tabular-nums; }
.pill.warn { background: var(--ls-warning-bg); color: var(--ls-warning-text); }
.pill.bad { background: var(--ls-danger-bg); color: var(--ls-danger-text); }
.pill.ok { background: var(--ls-success-bg); color: var(--ls-success-text); }
.v3-tab.active {
  color: var(--ls-primary);
  font-weight: 700;
  background: var(--ls-surface-active);
  border-bottom-color: var(--ls-primary);
  border-top-left-radius: var(--ls-radius-control);
  border-top-right-radius: var(--ls-radius-control);
}

/* Controls */
.v3-input {
  font-family: var(--ls-font);
  font-size: var(--ls-fs-base);
  padding: 4px 8px;
  background: var(--ls-field);
  border: 1px solid var(--ls-border-mid);
  border-radius: 3px;
  color: var(--ls-text);
}
.v3-input:focus { outline: none; border-color: var(--ls-primary); box-shadow: 0 0 0 3px var(--ls-primary-tint); }
.v3-input.readonly { background: var(--ls-surface-alt); color: var(--ls-text-muted); }
.v3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--ls-primary);
  color: #fff;
  border: 1px solid transparent;
  /* Legacy CRM parity, 18 Sep 2026, Je: flat 3px like every other control, not
     var(--ls-radius-control) (8px) — that token also sizes chips/menus/tags, which aren't part of
     this pass, so it's overridden here directly rather than changed at the shared token. Font
     weight (600) already matched legacy's .btn-v3 — the "heavy" read was the pill-shaped 8px
     radius on a solid-fill button, not the text weight. */
  border-radius: 3px;
  font-family: var(--ls-font);
  font-size: var(--ls-fs-md);
  font-weight: 600;
  padding: 7px 16px;
  cursor: pointer;
  text-decoration: none; /* the class also dresses <a> links as buttons */
  box-shadow: var(--ls-shadow-1);
  transition: background .14s, border-color .14s, color .14s;
}
.v3-btn:hover { background: var(--ls-primary-hover); text-decoration: none; }
.v3-btn:disabled { opacity: 0.45; cursor: default; }
.v3-btn.subtle {
  background: var(--ls-surface);
  color: var(--ls-text);
  border: 1px solid var(--ls-border-mid);
  box-shadow: none;
}
.v3-btn.subtle:hover { background: var(--ls-surface); border-color: var(--ls-primary); color: var(--ls-primary); }
.v3-btn.danger {
  background: var(--ls-surface);
  color: var(--ls-danger);
  border: 1px solid var(--ls-danger);
}
.v3-btn.danger:hover { background: var(--ls-danger-bg); }
/* Filled variants for legacy btn-warning / btn-danger parity: Warning (orange, e.g. Amend Service Slip)
   and DangerSolid (red, a discard-and-close action such as Undo & Close). Destructive deletes keep the
   outlined .danger above. White caption on both, as legacy; disabled comes from .v3-btn:disabled. */
.v3-btn.warning { background: var(--ls-warning); border-color: var(--ls-warning); color: #fff; }
.v3-btn.warning:hover { background: color-mix(in srgb, var(--ls-warning) 88%, #000); }
.v3-btn.danger-solid { background: var(--ls-danger); border-color: var(--ls-danger); color: #fff; }
.v3-btn.danger-solid:hover { background: color-mix(in srgb, var(--ls-danger) 88%, #000); }
.v3-btn.sm { padding: 4px 12px; font-size: var(--ls-fs-base); }

/* Checkbox (V3CheckBox) — legacy CRM parity, 18 Sep 2026: matches the compact 12px control scale */
.v3-check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: var(--ls-fs-base); }
.v3-check input { width: 13px; height: 13px; accent-color: var(--ls-primary); flex-shrink: 0; }
.v3-check.disabled { color: var(--ls-text-label); cursor: default; }

/* Compact solid-navy dropdown button for grid rows (V3RowDropDown). Radzen sets the
   --rz-input-* sizing vars ON the element via rz-input-md and repaints the background
   per state, so sizes and every state are restated here. */
.v3-row-dropdown .rz-dropdown,
.v3-row-dropdown .rz-dropdown:not(.rz-state-disabled):focus,
.v3-row-dropdown .rz-dropdown.rz-state-focused,
.v3-row-dropdown .rz-dropdown.rz-dropdown-open {
  --rz-input-height: 24px;
  --rz-input-line-height: 20px;
  --rz-input-font-size: var(--ls-fs-md);
  --rz-input-padding-block: 2px;
  --rz-dropdown-trigger-icon-width: 16px;
  background-color: var(--ls-primary);
  border: 1px solid var(--ls-primary);
  box-shadow: none;
}
.v3-row-dropdown .rz-dropdown .rz-dropdown-label { padding-inline: 10px 20px; }
.v3-row-dropdown .rz-dropdown:not(.rz-state-disabled):hover {
  background-color: var(--ls-primary-hover);
  border-color: var(--ls-primary-hover);
}
.v3-row-dropdown .rz-dropdown .rz-dropdown-label,
.v3-row-dropdown .rz-dropdown .rz-dropdown-label.rz-placeholder,
.v3-row-dropdown .rz-dropdown .rz-dropdown-trigger-icon {
  color: #fff;
  font-weight: 600;
  font-size: var(--ls-fs-md);
}
.v3-row-dropdown .rz-dropdown-panel .rz-dropdown-item { font-size: var(--ls-fs-md); }

/* Outline variant — navy-bordered pill matching the row "Manage"/action button; fills navy on
   hover so it reads as a real corporate control, not a weak grey dropdown. Flows beside the row's
   .v3-btn.danger (Suspend) action. Tokens theme both modes. */
.v3-row-dropdown.subtle .rz-dropdown,
.v3-row-dropdown.subtle .rz-dropdown:not(.rz-state-disabled):focus,
.v3-row-dropdown.subtle .rz-dropdown.rz-state-focused,
.v3-row-dropdown.subtle .rz-dropdown.rz-dropdown-open {
  background-color: var(--ls-surface);
  border: 1px solid var(--ls-primary);
}
.v3-row-dropdown.subtle .rz-dropdown .rz-dropdown-label,
.v3-row-dropdown.subtle .rz-dropdown .rz-dropdown-label.rz-placeholder,
.v3-row-dropdown.subtle .rz-dropdown .rz-dropdown-trigger-icon {
  color: var(--ls-primary);
  font-weight: 600;
}
.v3-row-dropdown.subtle .rz-dropdown:not(.rz-state-disabled):hover {
  background-color: var(--ls-primary);
  border-color: var(--ls-primary);
}
.v3-row-dropdown.subtle .rz-dropdown:not(.rz-state-disabled):hover .rz-dropdown-label,
.v3-row-dropdown.subtle .rz-dropdown:not(.rz-state-disabled):hover .rz-dropdown-label.rz-placeholder,
.v3-row-dropdown.subtle .rz-dropdown:not(.rz-state-disabled):hover .rz-dropdown-trigger-icon {
  color: #fff;
}

/* Ghost-chip variant — the "＋ Add role" affordance living INSIDE the cell it adds to:
   dashed and muted at rest, filling navy on hover, same dropdown behaviour throughout. */
.v3-row-dropdown.chip .rz-dropdown,
.v3-row-dropdown.chip .rz-dropdown:not(.rz-state-disabled):focus,
.v3-row-dropdown.chip .rz-dropdown.rz-state-focused,
.v3-row-dropdown.chip .rz-dropdown.rz-dropdown-open {
  background-color: transparent;
  border: 1px dashed var(--ls-border-mid);
  border-radius: 12px;
}
.v3-row-dropdown.chip .rz-dropdown .rz-dropdown-label,
.v3-row-dropdown.chip .rz-dropdown .rz-dropdown-label.rz-placeholder,
.v3-row-dropdown.chip .rz-dropdown .rz-dropdown-trigger-icon {
  color: var(--ls-text-muted);
  font-weight: 600;
  font-size: var(--ls-fs-sm);
}
.v3-row-dropdown.chip .rz-dropdown:not(.rz-state-disabled):hover {
  background-color: var(--ls-primary);
  border: 1px solid var(--ls-primary);
}
.v3-row-dropdown.chip .rz-dropdown:not(.rz-state-disabled):hover .rz-dropdown-label,
.v3-row-dropdown.chip .rz-dropdown:not(.rz-state-disabled):hover .rz-dropdown-label.rz-placeholder,
.v3-row-dropdown.chip .rz-dropdown:not(.rz-state-disabled):hover .rz-dropdown-trigger-icon {
  color: #fff;
}

/* Grid row-action icon buttons — one quiet, consistent treatment across every grid (Follow-Ups,
   Files, Timesheet, Master Data…). Radzen renders each as a .rz-button with a loud filled ButtonStyle;
   here they rest as neutral ghost icons and tint to their semantic colour only on hover/focus, so a row
   reads as a calm set of actions instead of a row of bright blue/green/red blocks. */
.row-actions { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; white-space: nowrap; }
.row-actions .rz-button,
.row-actions .rz-button.rz-primary,
.row-actions .rz-button.rz-secondary,
.row-actions .rz-button.rz-success,
.row-actions .rz-button.rz-danger,
.row-actions .rz-button.rz-info,
.row-actions .rz-button.rz-light,
.row-actions .rz-button.rz-base {
  width: 28px; height: 28px; min-width: 0; padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--ls-radius-control);
  box-shadow: none;
  color: var(--ls-text-muted);
}
.row-actions .rz-button .rzi,
.row-actions .rz-button .rz-button-icon-left { margin: 0; font-size: var(--ls-icon-lg); }
.row-actions .rz-button:not(.rz-state-disabled):hover,
.row-actions .rz-button:not(.rz-state-disabled):focus-visible {
  background: var(--ls-surface-active);
  color: var(--ls-primary);
  border-color: transparent;
}
.row-actions .rz-button.rz-danger:not(.rz-state-disabled):hover,
.row-actions .rz-button.rz-danger:not(.rz-state-disabled):focus-visible {
  background: var(--ls-danger-bg); color: var(--ls-danger-text);
}
.row-actions .rz-button.rz-success:not(.rz-state-disabled):hover,
.row-actions .rz-button.rz-success:not(.rz-state-disabled):focus-visible {
  background: var(--ls-success-bg); color: var(--ls-success-text);
}
/* A text .grid-link sharing a row with the 28px icon buttons above (Site Central's Archive/Restore
   hyperlink, 15 Sep 2026) — the same 8px horizontal padding the icon buttons carry, so it sits
   level with them rather than hugging the row's edge. */
.row-actions .grid-link { padding: 0 8px; }
/* A secondary action sitting after a value INSIDE a cell (the Clients grid's Assign link, and the
   span wrapping its Change-company pencil, 16 Sep 2026) — Blazor strips the whitespace-only markup
   between the value and the action, so the gap has to be a margin; it drops when the action is the
   cell's only content. Same weight and size the quoting-client band's own Edit link carries. */
.cell-edit-link { font-size: var(--ls-fs-base); font-weight: 600; }
.cell-edit-link:not(:first-child) { margin-left: 10px; }

/* Chips / badges */
.v3-chip {
  background: var(--ls-surface-active);
  color: var(--ls-primary);
  font-size: var(--ls-fs-sm);
  font-weight: 600;
  border-radius: var(--ls-radius-badge);
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
/* Status variants (first use: Announcements admin) — generic so any grid can carry them. */
.v3-chip.success { background: var(--ls-success-bg); color: var(--ls-success-text); }
.v3-chip.warning { background: var(--ls-warning-bg); color: var(--ls-warning-text); }
.v3-chip.danger  { background: var(--ls-danger-bg); color: var(--ls-danger-text); }
.v3-chip.neutral { background: var(--ls-neutral-bg); color: var(--ls-neutral-text); }
.v3-chip.info    { background: var(--ls-info-bg); color: var(--ls-link); }
.v3-chip.vip     { background: var(--ls-vip-bg); color: var(--ls-vip); }

/* States */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--ls-text-muted);
  font-size: var(--ls-fs-md);
}
.hint { font-size: var(--ls-fs-base); color: var(--ls-text-muted); }
/* A hint carrying a failure line ("the report could not be loaded") — pair with .hint. Shared
   15 Sep 2026: each of the three Sales report pages had restated the colour page-scoped. */
.hint.error { color: var(--ls-danger-text); }
/* A hint that is a WARNING rather than an aside — "below the minimum", "doesn't match the spec".
   Pairs with .hint (put both on the element) and must follow it here to win the colour. Shared
   15 Sep 2026: it was page-scoped in the quote editor and its sidebar, but Site Central's inline
   price cell and AdjustSellingPriceDialog use the same class outside either scope, where it was
   rendering as an ordinary muted hint. */
.mismatch-hint { color: var(--ls-danger); }
.editor-error { color: var(--ls-danger-text); font-size: var(--ls-fs-base); padding: 6px 0; }

/* Grid row-action links (Send now / Delete / Edit) — even spacing, right-aligned. Global so it
   works in RCL components rendered inside dialogs where page-scoped CSS can't reach. */
.grid-actions { display: flex; align-items: center; gap: 16px; justify-content: flex-end; }
.grid-actions .grid-link.danger { color: var(--ls-danger); }
.grid-actions .v3-chip { margin-right: auto; }

/* ---- Quote address gate dialog (BackOffice/QuoteMaker/QuoteAddressGateDialog). Service-opened,
   so page-scoped CSS can't reach it — the record facts the rep is fixing/vouching for. */
.gate-facts { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 4px; }
.gate-facts > div { display: flex; align-items: center; gap: 10px; }
.gate-label {
  min-width: 90px; font-size: var(--ls-fs-sm); font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ls-text-label);
}

/* ---- Digest editor dialog (Shared.UI/Digests/DigestEditor). Lives here, not in a .razor.css,
   because the editor is a shared component opened via DialogService — page-scoped CSS can't reach it. */
.digest-editor { display: flex; flex-direction: column; gap: 16px; min-width: 480px; }
.digest-editor .field { display: flex; flex-direction: column; gap: 6px; }
.digest-editor .field > label {
  font-size: var(--ls-fs-sm); font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ls-text-label);
}
.digest-editor .de-row { display: flex; gap: 16px; align-items: flex-end; }
.digest-editor .de-row .grow { flex: 1 1 auto; min-width: 0; }
.digest-editor .de-status { height: 34px; display: flex; align-items: center; }

.digest-editor .de-sections-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.digest-editor .de-sections { display: flex; flex-direction: column; gap: 10px; }
.digest-editor .de-sec {
  border: 1px solid var(--ls-border); border-radius: var(--ls-radius-card);
  padding: 11px 14px 12px; background: var(--ls-surface); transition: border-color .12s, background .12s;
}
.digest-editor .de-sec.on { border-color: var(--ls-primary); background: var(--ls-surface-alt); }
.digest-editor .de-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.digest-editor .de-sec-head strong { font-size: var(--ls-fs-md); }
.digest-editor .de-sec-count { font-size: var(--ls-fs-sm); color: var(--ls-text-muted); font-variant-numeric: tabular-nums; }
.digest-editor .de-subs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 9px 18px; margin: 11px 0 1px 26px;
}

.digest-editor .de-schedule { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.digest-editor .de-schedule .at { font-size: var(--ls-fs-base); color: var(--ls-text-muted); }
.digest-editor .de-tz { margin-left: 4px; }

.digest-editor .de-error { color: var(--ls-danger); font-size: var(--ls-fs-md); }
.digest-editor .de-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  padding-top: 14px; margin-top: 2px; border-top: 1px solid var(--ls-border-light);
}

/* ---- Leave request editor dialog (Home/Leave/LeaveEditor). In shared.css because it is opened via
   DialogService — page-scoped CSS can't reach a dialog-hosted component reliably. */
.leave-editor { display: flex; flex-direction: column; gap: 16px; min-width: 440px; }
.leave-editor .field { display: flex; flex-direction: column; gap: 6px; }
.leave-editor .field > label {
  font-size: var(--ls-fs-sm); font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ls-text-label);
}
.leave-editor .le-row { display: flex; gap: 14px; align-items: flex-end; }
.leave-editor .le-file { display: flex; align-items: center; gap: 10px; }
.leave-editor .le-row .grow { flex: 1 1 auto; min-width: 0; }
.leave-editor .le-error { color: var(--ls-danger); font-size: var(--ls-fs-md); }
.leave-editor .le-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  padding-top: 14px; margin-top: 2px; border-top: 1px solid var(--ls-border-light);
}

/* Security: roles pane shared by the Roles & Permissions and Quick Links tabs */
.split { display: flex; gap: 16px; align-items: flex-start; }
.roles-pane { width: 260px; flex-shrink: 0; }

/* Phones: the fixed roles pane would leave the other pane ~100px — stack them instead. */
@media (max-width: 900px) {
  .split { flex-direction: column; }
  .roles-pane { width: 100%; }
}

.role-list { list-style: none; margin: 0 0 14px; padding: 0; }
.role-item {
  padding: 8px 10px;
  border-radius: var(--ls-radius-tile);
  font-size: var(--ls-fs-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ls-text-secondary);
}
.role-item:hover { background: var(--ls-surface-alt); }
.role-item.selected {
  background: var(--ls-surface-active);
  color: var(--ls-primary);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--ls-primary);
}
.role-name { flex: 1; }

/* Search keyword highlight. Global (not page-scoped): the dialog injects <mark> as raw markup,
   which never receives a scoped-CSS attribute, so the rule has to live here. */
.search-mark { background: var(--ls-mark-bg); color: var(--ls-mark-text); border-radius: 2px; padding: 0 1px; }
.footer-hint { font-size: var(--ls-fs-base); color: var(--ls-text-muted); }

/* Skeletons */
.skeleton-row { padding: 6px 0; }
.skeleton-line {
  height: 10px; border-radius: 4px;
  background: linear-gradient(90deg, #eee 25%, #f8f9fa 50%, #eee 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; margin-bottom: 6px;
}
.w-70 { width: 70%; }
.w-40 { width: 40%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Skeleton standard — the house "content is loading" treatment across every ERP web app.
   Compose `.v3-sk` (a shimmering block; size it with width/height or a shape class below) into
   the shape of what's loading. Themes light + dark here; honours reduced-motion. */
.v3-sk {
  background: linear-gradient(90deg, #e9edf1 25%, #f4f7fa 50%, #e9edf1 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 5px;
}
:root[data-theme="dark"] .v3-sk {
  background: linear-gradient(90deg, #1b232d 25%, #232d38 50%, #1b232d 75%);
  background-size: 200% 100%;
}
@media (prefers-reduced-motion: reduce) { .v3-sk { animation: none; } }

/* Ready-made shapes for the two calendar surfaces (grid template comes from the page). */
.sk-toolbar { display: flex; gap: 8px; margin-bottom: 10px; }
.sk-week { display: grid; grid-template-columns: 46px repeat(7, 1fr); grid-auto-rows: 24px; gap: 6px; padding: 4px; }
.sk-week .sk-time { height: 12px; align-self: center; }

/* ---- Dark theme: Radzen surface/text vars + any hard-coded light spots ---- */
:root[data-theme="dark"] {
  --rz-base-background-color: var(--ls-surface);
  --rz-content-background-color: var(--ls-surface);
  --rz-panel-background-color: var(--ls-surface);
  --rz-body-background-color: var(--ls-surface-alt);
  --rz-input-background-color: var(--ls-field);
  --rz-input-value-color: var(--ls-text);
  --rz-input-placeholder-color: var(--ls-text-muted);
  --rz-input-disabled-background-color: var(--ls-surface-alt);
  --rz-text-color: var(--ls-text);
  --rz-text-secondary-color: var(--ls-text-secondary);
  --rz-text-tertiary-color: var(--ls-text-muted);
  --rz-border-color: var(--ls-border);
  --rz-panel-shadow: var(--ls-shadow-card-hover);
  /* Radzen base grey scale — "Light" buttons (e.g. the dispatch board's ‹ Today › nav) paint from these */
  --rz-base-100: var(--ls-surface-alt);
  --rz-base-200: var(--ls-surface-active);
  --rz-base-300: var(--ls-border-mid);
  --rz-on-base-light: var(--ls-text);
  --rz-base-light: var(--ls-surface-active);
  --rz-shadow-1: 0 2px 10px rgba(0, 0, 0, 0.45);
  --rz-primary-light: #24557d;
  --rz-primary-lighter: var(--ls-surface-active);
  --rz-primary-darker: #0a2438;
  --rz-secondary-lighter: var(--ls-info-bg);

  /* DataGrid (Audit activity, etc.) — rows, stripe, header, cells, borders */
  --rz-grid-background-color: var(--ls-surface);
  --rz-grid-stripe-background-color: var(--ls-surface-alt);
  --rz-grid-stripe-odd-background-color: var(--ls-surface);
  --rz-grid-header-background-color: var(--ls-surface-alt);
  --rz-grid-header-color: var(--ls-text);
  --rz-grid-header-sorted-background-color: var(--ls-surface-active);
  --rz-grid-cell-color: var(--ls-text);
  --rz-grid-cell-border: 1px solid var(--ls-border-light);
  --rz-grid-header-cell-border: 1px solid var(--ls-border);
  --rz-grid-border: 1px solid var(--ls-border);
  --rz-grid-hover-background-color: var(--ls-surface-active);
  --rz-grid-hover-color: var(--ls-text);
  --rz-grid-cell-focus-background-color: var(--ls-surface-active);
  --rz-grid-cell-focus-color: var(--ls-text);
  --rz-grid-filter-background-color: var(--ls-surface);
  --rz-grid-filter-color: var(--ls-text);
  --rz-grid-foot-background-color: var(--ls-surface-alt);

  /* Scheduler (My Schedule) — surfaces, borders, toolbar title contrast */
  --rz-scheduler-background-color: var(--ls-surface);
  --rz-scheduler-color: var(--ls-text);
  --rz-scheduler-border-color: var(--ls-border);
  /* --ls-border-light (#eef2f6) is nearly invisible on the white card surface — the half-hour
     rows rendered with zero visible gridline, looking like the schedule was hourly-only. Match
     the hour-row border weight instead; the row LABEL (blank on the half-hour) is what tells
     them apart, not a fainter line nobody can see. */
  --rz-scheduler-minor-border-color: var(--ls-border);
  --rz-scheduler-header-background-color: var(--ls-surface-alt);
  --rz-scheduler-header-color: var(--ls-text);
  --rz-scheduler-toolbar-background-color: var(--ls-surface);
  --rz-scheduler-toolbar-title-color: var(--ls-text);
  --rz-scheduler-prev-next-button-color: var(--ls-text);
  --rz-scheduler-view-button-color: var(--ls-text);
  --rz-scheduler-other-month-background-color: var(--ls-surface-alt);
  --rz-scheduler-highlight-background-color: var(--ls-surface-active);

  /* Date picker popup (From/To filters) + dropdown items */
  --rz-datepicker-panel-background-color: var(--ls-surface);
  --rz-datepicker-header-background-color: var(--ls-surface-alt);
  --rz-dropdown-item-hover-background-color: var(--ls-surface-active);
  /* This var also paints the popup panels (.rz-dropdown-panel/.rz-multiselect-panel), so it
     must stay opaque — the open-trigger tint is applied by the scoped rule below instead. */
  --rz-dropdown-open-background-color: var(--ls-surface);
}

/* Open-trigger highlight (translucent is fine here — it sits on the page surface) */
:root[data-theme="dark"] .rz-dropdown.rz-dropdown-open,
:root[data-theme="dark"] .rz-multiselect.rz-state-focus { background-color: var(--ls-surface-active); }

/* skeleton shimmer uses literal light greys — re-tint for dark */
:root[data-theme="dark"] .skeleton-line {
  background: linear-gradient(90deg, #1b232d 25%, #232d38 50%, #1b232d 75%);
  background-size: 200% 100%;
}

/* The brand lockup ships in two colourways — blue text for light surfaces, white text for dark —
   so each theme shows the right one instead of sitting the navy artwork on a plaque. Markup renders
   both imgs; these rules keep exactly one visible. img-qualified so they outrank a carrier class that
   also sets display (.login-logo's display:block sits later in this file and was un-hiding the twin). */
img.logo-dark { display: none; }
:root[data-theme="dark"] img.logo-light { display: none; }
:root[data-theme="dark"] img.logo-dark { display: inline-block; }


/* Dispatch board (Calendar) — lives here (shared, token-based) so it themes in one place.
   Surfaces/text/borders use --ls-* tokens; only text ON coloured/branded fills is literal. */
/* Tight (Lance, 04 Nov 2026: "remove some margin, make use of the space"): a thin inset round the
   board and its header, slim card padding, and below the cards share one row sized by the rail. */
.schedule-wrap { padding: 16px 20px 60px; }
.board-wrap { padding: 6px 8px 12px; }
.schedule-card { padding: 12px; }
.board-card { padding: 8px; }
.board-toolbar { display: flex; align-items: center; gap: 8px; padding: 0 0 6px; flex-wrap: wrap; }
.board-range { font-size: var(--ls-fs-base); color: var(--ls-text-muted); min-width: 160px; }
.board-view-toggle { display: inline-flex; gap: 4px; }
/* The nav chevrons, Today and the range on the left; Day / Week / Month at the right end (Lance, 04 Nov 2026). */
.board-view-toggle { margin-left: auto; }
/* Legacy calendarv2's scheduler footer under the schedule (fix35.png, 19 Nov 2026): "Show 24 hours..." /
   "Show business hours...". */
.board-hours-foot { flex: none; padding: 5px 10px; border-top: 1px solid var(--ls-border); background: var(--ls-surface-alt); }
.board-hours-link { background: none; border: none; padding: 0; cursor: pointer; font-family: var(--ls-font); font-size: var(--ls-fs-base); color: var(--ls-text); display: inline-flex; align-items: center; gap: 6px; }
/* Only the words underline on hover, never the up / down arrow (Lance, 19 Nov 2026). */
.board-hours-link:hover .board-hours-text { text-decoration: underline; }

/* calendarv2's two panes: the controls rail on the left (Refresh, month calendar, List of
   Technicians, My Groups + its four buttons), the scheduler card on the right. The rail is a
   fixed column so the grid gets everything else; under 900px it stacks above the grid. */
.board-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 6px; align-items: start; }
/* Side by side, the RAIL sets the height: the scheduler card stretches to the rail's bottom edge
   and the grid scrolls inside it (Lance, 04 Nov 2026). contain: size stops the card contributing a
   height of its own, so the rail alone sizes the row. Phones stack the cards and keep each one's
   own height and the grid's 72vh cap. */
@media (min-width: 901px) {
  .board-layout { align-items: stretch; }
  .board-card { display: flex; flex-direction: column; min-height: 0; contain: size; }
  .board-card .tg-wrap, .board-card .mg-wrap { flex: 1 1 auto; min-height: 0; max-height: none; }
  /* First load (Lance, 13 Nov 2026, fix23.png): the skeleton fills the card down to the rail's edge,
     not a fixed 60vh that ran past the card's bottom. */
  .board-card .tg-skeleton { flex: 1 1 auto; min-height: 0; }
  .board-card .tg-skeleton .tg-sk-grid { flex: 1 1 auto; min-height: 0; height: auto; }
  /* The whole window, as legacy (Lance, 13 Nov 2026, fix26.png): js/board-fit.js gives the layout the height
     left below its top edge and adds .fit. Rail and scheduler both run to the bottom; the extra height goes
     to My Groups' list and to the hours, which scroll inside. */
  .board-layout.fit { grid-template-rows: minmax(0, 1fr); }
  .board-layout.fit .board-rail { min-height: 0; overflow-y: auto; }
  .board-layout.fit .rail-groups { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .board-layout.fit .rail-groups .grp-list { flex: 1 1 auto; max-height: none; }
}
/* Loading while the dates change (Lance, 04 Nov 2026): the grid stays where it is and dims after 150ms,
   with a pill over it saying so; a read that lands quicker than that shows nothing, so stepping a week
   never flickers. First load keeps the skeleton. */
.board-body { position: relative; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.board-body > :not(.board-loading) { transition: opacity .15s ease .15s; }
.board-body.loading > :not(.board-loading) { opacity: .45; pointer-events: none; }
.board-loading { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-start; justify-content: center; padding-top: 88px; pointer-events: none; animation: ls-page-in .15s ease .15s both; }
.board-loading span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--ls-surface); border: 1px solid var(--ls-border); box-shadow: var(--ls-shadow-2); font-size: var(--ls-fs-sm); font-weight: 600; color: var(--ls-text); }
.board-loading .spin { width: 14px; height: 14px; border: 2px solid var(--ls-primary); border-top-color: transparent; border-radius: 50%; animation: ls-spin 700ms linear infinite; }
/* The rail must fit one screen with every button showing (Lance, 12 Nov 2026, fix14.png): legacy's pane is
   760px with a small calendar and a 200px group box. Tight gaps, a compact calendar and a five-row group list
   keep Refresh through Edit Members inside about 720px. */
.board-rail { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.board-rail .v3-btn.rail-wide, .grp-btns .v3-btn, .grp-panel-btns .v3-btn { width: 100%; justify-content: center; }
.rail-sec { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* Legacy's whitesmoke section bands ("List of Technicians", "My Groups", "Group Name"). */
.rail-head { font-size: var(--ls-fs-sm); font-weight: 600; color: var(--ls-text-secondary); background: var(--ls-surface-alt); padding: 4px 8px; border-radius: 3px; }
/* The inline month calendar fills the rail; Radzen sizes it to its own popup width otherwise. */
.board-rail .rail-cal, .board-rail .rail-cal .rz-datepicker-inline, .board-rail .rail-cal .rz-datepicker-inline-container, .board-rail .rail-cal .rz-calendar { width: 100%; max-width: 100%; box-sizing: border-box; }
.board-rail .rail-cal .rz-calendar-view table { width: 100%; table-layout: fixed; }
.board-rail .rail-cal .rz-calendar-view td, .board-rail .rail-cal .rz-calendar-view th { padding: 0; text-align: center; height: 24px; font-size: var(--ls-fs-sm); line-height: 1; }
/* Compact day cells, about legacy's RadCalendar size: Radzen's day span otherwise pads to ~40px square. */
.board-rail .rail-cal .rz-calendar-view td > span, .board-rail .rail-cal .rz-calendar-view td > a { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; min-width: 0; min-height: 0; padding: 0; line-height: 1; }
.board-rail .rail-cal .rz-datepicker-inline, .board-rail .rail-cal .rz-datepicker-inline-container { padding: 2px; }
/* The header's month and year are RadzenDropDowns (not selects) between two icon buttons, and
   Radzen sizes them 8.75rem + 6rem — wider than the rail. Two earlier tries sized them (fix3.png:
   squeezed to "Septe…"; then width:auto: wider than the rail with a scrollbar, donow2.png,
   04 Nov 2026). Now NOTHING in the header has a width of its own: the chevrons are fixed 24px, the
   title takes exactly what is left, the year gets 4.25rem of it and the month the rest, both with
   min-width 0, so whatever Radzen wants they can never add up to more than the rail. The label
   keeps room for its caret only, and the calendar can never scroll sideways. */
.board-rail .rail-cal { --rz-datepicker-prev-next-icon-size: 1.25rem; --rz-datepicker-header-padding-inline: 0.25rem; --rz-datepicker-header-padding-block: 0.2rem; }
.board-rail .rail-cal .rz-calendar-header { display: flex; align-items: center; gap: 0.25rem; overflow: hidden; }
.board-rail .rail-cal .rz-calendar-prev, .board-rail .rail-cal .rz-calendar-next { flex: 0 0 auto; width: 1.5rem; min-width: 0; height: 1.75rem; min-height: 0; padding: 0; }
.board-rail .rail-cal .rz-calendar-title { flex: 1 1 0; min-width: 0; display: flex; gap: 0.25rem; }
.board-rail .rail-cal .rz-calendar-month-dropdown { flex: 1 1 0; width: 0; min-width: 0 !important; }
.board-rail .rail-cal .rz-calendar-year-dropdown { flex: 0 1 4.25rem; width: 4.25rem; min-width: 0 !important; }
.board-rail .rail-cal .rz-dropdown-label { padding-inline: 0 1.25rem; }
.board-rail .rail-cal .rz-datepicker-inline, .board-rail .rail-cal .rz-datepicker-inline-container, .board-rail .rail-cal .rz-calendar { overflow-x: hidden; }
/* My Groups — legacy's 200px list box. A row is a real button (keyboard, aria-selected); the
   selected group paints navy like a selected nav item. */
/* Three rows at the default text size, then it scrolls inside (Lance, 04 Nov 2026): the rail sets the
   board row's height, so every group past three pushed the grid's horizontal scrollbar below the fold. */
/* Five rows before it scrolls (Lance, 12 Nov 2026): seven put Create / Rename / Delete / Edit Members
   below the fold on a 1080p screen; the four buttons showing on load matter more than two extra names. */
.grp-list { --grp-row: 29px; display: flex; flex-direction: column; gap: 1px; max-height: calc(5 * var(--grp-row) + 4 * 1px + 2 * 3px + 2 * 1px); min-height: 64px; overflow-y: auto; padding: 3px; border: 1px solid var(--ls-border-mid); border-radius: 3px; background: var(--ls-field); }
.grp-row { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; padding: 5px 8px; border: 0; border-radius: 3px; background: transparent; color: var(--ls-text); font: inherit; font-size: var(--ls-fs-md); cursor: pointer; }
.grp-row:hover { background: var(--ls-surface-alt); }
.grp-row:focus-visible { outline: 2px solid var(--ls-primary); outline-offset: -2px; }
.grp-row.selected, .grp-row.selected:hover { background: var(--ls-primary); color: #fff; }
.grp-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-row .n { font-size: var(--ls-fs-xs); opacity: 0.75; }
/* Company groups (Lance, 13 Nov 2026): always first, on their own background with a gold edge, so
   nobody mistakes the shared list for their own. */
.grp-row.company { background: var(--ls-warning-bg); box-shadow: inset 3px 0 0 var(--ls-warning); font-weight: 600; }
.grp-row.company:hover { filter: brightness(0.97); }
.grp-row.company.selected { background: var(--ls-primary); }
.grp-empty { padding: 14px 8px; font-size: var(--ls-fs-base); color: var(--ls-text-muted); text-align: center; }
.grp-btns { display: flex; flex-direction: column; gap: 4px; }
.grp-name { display: flex; flex-direction: column; gap: 6px; }
.grp-name .v3-input { width: 100%; box-sizing: border-box; }
.grp-panel-btns { display: flex; gap: 4px; }
.grp-panel-btns .v3-btn { flex: 1 1 0; }
.grp-error { margin: 0; }
/* Edit Members dialog: the name search sits over the transfer list's Available pane. */
.grp-members .grp-members-search { width: 100%; box-sizing: border-box; margin-bottom: 8px; }
.grp-members .v3-transfer { min-height: 300px; }

/* Phones/tablets: 1fr day columns would shrink to ~30px slivers instead of overflowing, so the
   grid's own overflow-x never engaged. Under 900px every day gets a real minimum and the board
   scrolls sideways INSIDE the card (the same rule the V3 grids follow), with the technician
   column held sticky so the names stay in view while scrolling the week. Toolbar filters take
   a full row each — their desktop widths are inline (V3DropDown Style), hence the !important. */
@media (max-width: 900px) {
  .board-wrap, .schedule-wrap { padding: 12px 8px 60px; }
  .board-card { padding: 8px; }
  .board-layout { grid-template-columns: minmax(0, 1fr); }
  .board-toolbar .rz-dropdown { flex: 1 1 100%; width: auto !important; min-width: 0 !important; }
  .board-range { min-width: 0; }
  .board-view-toggle { margin-left: 0; }
}

/* Assistant markdown replies — rendered from MarkupString, so the scoped panel CSS can't reach
   these child elements; they are styled globally here (single-source rule). */
.asst-msg.assistant > :first-child { margin-top: 0; }
.asst-msg.assistant > :last-child { margin-bottom: 0; }
.asst-msg.assistant p { margin: 0 0 6px; }
.asst-msg.assistant ul, .asst-msg.assistant ol { margin: 6px 0; padding-left: 18px; }
.asst-msg.assistant li { margin: 0 0 3px; }
.asst-msg.assistant li:last-child { margin-bottom: 0; }
.asst-msg.assistant li > p { margin: 0; }                  /* loose-list items don't double the gap */
.asst-msg.assistant li > ul, .asst-msg.assistant li > ol { margin: 3px 0 0; }
.asst-msg.assistant strong { font-weight: 600; }
.asst-msg.assistant code { background: var(--ls-surface-alt); border-radius: 3px; padding: 0 3px; font-size: var(--ls-fs-base); }
.asst-msg.assistant h1, .asst-msg.assistant h2, .asst-msg.assistant h3 { font-size: var(--ls-fs-md); font-weight: 600; margin: 8px 0 4px; }
.asst-msg.assistant a { color: var(--ls-primary); }

/* AppShell top bar — global search box (AppShell.razor.css has the surrounding .top-bar layout).
   The search is the bar's ONE flexible child at EVERY width, not just phones: the icon cluster's
   width varies by permission (admins carry the search box, Chat bell, ...), and a rigid 220px
   input let the admin bar overflow the row and hand the whole page a sideways scroll at
   tablet/split-screen widths — the same admin-only symptom AppShell's 768px rule fixed for
   phones. flex-shrink + min-width lets it yield gracefully instead. */
.top-bar-search { position: relative; display: flex; align-items: center; gap: 6px; margin-left: 16px; flex: 0 1 auto; min-width: 0; }
/* Sized as the bar's primary tool (legacy users search first): a wide, 36px, tinted box with the
   magnifier drawn inside it, next to a labelled primary Search button. The tint (the legacy CRM's
   aliceblue, per theme via --ls-search-fill) is what lifts it off the white bar — the old
   white-on-white 30px box read as part of the brand. */
.top-bar-search input {
  height: 36px; width: 420px; max-width: 40vw; min-width: 44px; flex: 0 1 auto; padding: 0 12px 0 36px;
  border: 1px solid var(--ls-border-mid); border-radius: var(--ls-radius-control);
  font-family: var(--ls-font); font-size: var(--ls-fs-md); background: var(--ls-search-fill); color: var(--ls-text);
}
.top-bar-search input::placeholder { color: var(--ls-text-muted); }
.top-bar-search input:focus { outline: none; border-color: var(--ls-primary); }
.top-bar-search .search-ic {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%); display: flex;
  color: var(--ls-primary); pointer-events: none;
}
.top-bar-search .search-btn { height: 36px; padding: 0 16px; flex: none; }
.top-bar-search .search-btn-ic { display: none; }
@media (max-width: 700px) {
  .top-bar-search input { width: 120px; }
  /* Phones: the label goes, the magnifier on the button comes back (a square 36px tap target). */
  .top-bar-search .search-btn { padding: 0 9px; }
  .top-bar-search .search-btn-label { display: none; }
  .top-bar-search .search-btn-ic { display: block; }
}

/* Account menu — the top-bar user name opens a small dropdown (Settings, Sign out). */
.user-menu { position: relative; }
.user-menu-btn {
  display: inline-flex; align-items: center; gap: 4px; background: none; border: none;
  cursor: pointer; color: inherit; font: inherit; padding: 4px 6px; border-radius: var(--ls-radius-control);
}
.user-menu-btn:hover { background: rgba(255, 255, 255, .12); }
.user-menu-backdrop { position: fixed; inset: 0; z-index: 90; }
.user-menu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 91; min-width: 170px;
  background: var(--ls-surface); color: var(--ls-text); border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-card); box-shadow: var(--ls-shadow-pop, 0 8px 24px rgba(0, 0, 0, .18));
  padding: 6px; display: flex; flex-direction: column;
}
.user-menu-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--ls-radius-control);
  background: none; border: none; cursor: pointer; color: var(--ls-text); font-family: var(--ls-font);
  font-size: var(--ls-fs-md); text-align: left; text-decoration: none;
}
.user-menu-item:hover { background: var(--ls-surface-2, rgba(1, 45, 80, .06)); color: var(--ls-text); }
/* Unread chip on the folded-in Notifications item (phones) — the bell badge's metrics, in-row. */
.user-menu-count {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--ls-danger); color: #fff;
  font-size: var(--ls-fs-sm); font-weight: 700; line-height: 18px; text-align: center;
}

/* Grids on narrow screens (phones): scroll sideways inside the card instead of letting the
   fixed-width columns crush the flexible ones (customer/heading links) to nothing. Radzen sets
   table-layout:fixed + width:100%, which hands the flexible column "whatever is left" — 0 when
   the fixed columns exceed the phone width — so on mobile the table sizes to its CONTENT
   (width:max-content + table-layout:auto) and the card scrolls to reach it all. */
@media (max-width: 900px) {
  .v3-grid-card .rz-data-grid-data { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .v3-grid-card .rz-grid-table { min-width: 100%; width: max-content; table-layout: auto !important; }
  .v3-table { min-width: 100%; width: max-content; }
}

/* Radzen dialogs render at the document body, so they're themed globally here. The stock
   titlebar ignores our tokens — in dark mode the title text and close icon were
   near-invisible (dark-on-dark). */
.rz-dialog { background: var(--ls-surface); color: var(--ls-text); }
.rz-dialog .rz-dialog-titlebar {
  background: var(--ls-surface); color: var(--ls-text);
  border-bottom: 1px solid var(--ls-border);
}
.rz-dialog .rz-dialog-title { color: var(--ls-text); font-family: var(--ls-font); font-weight: 600; }
.rz-dialog .rz-dialog-titlebar-close { color: var(--ls-text-muted); opacity: 1; }
.rz-dialog .rz-dialog-titlebar-close:hover { color: var(--ls-text); }
.rz-dialog .rz-dialog-content { background: var(--ls-surface); color: var(--ls-text); }
/* Alert text keeps its line breaks: a save's warnings arrive newline-joined in one Dialogs.Alert. */
.rz-dialog-alert-message { white-space: pre-line; }

/* Google Places Autocomplete (New Site's address field) also renders its suggestion list at
   document.body, with its own low default z-index — inside a Radzen dialog it ends up stacked
   behind the dialog and never becomes visible. */
.pac-container { z-index: 9999 !important; }

/* Dropdown / multiselect popups render at the document body, so they're styled globally here.
   Let the panel stretch to fit long option labels (e.g. long status names) instead of wrapping them
   into a narrow column, show more rows before scrolling, and keep popup text at the control's size.
   !important is required: Radzen's popup-positioning JS sets an inline min-width/width equal to the
   trigger control's own width on every open (Radzen.Blazor.js openPopup, syncWidth), which otherwise
   wins the cascade over this rule and clips any option label longer than the trigger (e.g. a 200px-wide
   Status filter truncating "1 1 Prospects - Active (Sales)" mid-word). */
.rz-dropdown-panel,
.rz-multiselect-panel {
  min-width: max-content !important; max-width: min(92vw, 380px);
  /* Compact option rows: material-base.css's .rz-input-md sets --rz-dropdown-item-padding to
     0.75rem/1rem (12px/16px), which makes every item ~41px tall — the 26-entry Client type
     filter needs heavy scrolling to see even half of it (Nathan Heaney, 22 Oct 2026). Match
     the density of the legacy CRM's native select by tightening the two Radzen vars that drive
     item height. Same specificity as .rz-input-md, our rule wins by cascade order. */
  --rz-dropdown-item-padding: 4px 12px;
  --rz-dropdown-items-padding: 2px 0;
}
.rz-dropdown-panel .rz-dropdown-items,
.rz-multiselect-panel .rz-multiselect-items { max-height: 340px; }
/* Cap the OPTION width so an over-long label (Service Map job addresses) ellipsizes instead of
   forcing the panel — via min-width:max-content above — wider than the screen (user report,
   06 Sep 2026). The item cap bounds max-content, so the panel can never exceed it. */
.rz-dropdown-panel .rz-dropdown-item,
.rz-multiselect-panel .rz-multiselect-item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(84vw, 340px);
  font-size: var(--ls-fs-base);
}
/* filter box + empty/"no results" text sized like the items, not oversized */
.rz-dropdown-panel .rz-dropdown-filter,
.rz-multiselect-panel .rz-multiselect-filter,
.rz-dropdown-panel .rz-dropdown-item.rz-state-empty,
.rz-multiselect-panel .rz-multiselect-item.rz-state-empty { font-size: var(--ls-fs-base); }

/* Rich-text editor (first use: Announcements admin) — pulled onto the theme centrally. */
.rz-html-editor { border: 1px solid var(--ls-border-mid); border-radius: 3px; background: var(--ls-surface); }
.rz-html-editor .rz-toolbar { background: var(--ls-surface-alt); border-bottom: 1px solid var(--ls-border-light); }
.rz-html-editor-content { color: var(--ls-text); font-family: var(--ls-font); font-size: var(--ls-fs-base); }

/* Stat tiles — the YTD/pipeline summary strips (report pages + dashboard summaries). */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(184px, 1fr)); gap: 8px; }
.v3-card.stat { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0;
  position: relative; overflow: hidden; }
/* Meaning stripe — a 3px left accent so a stat's status reads at a glance. Default sky; modifiers recolor. */
.v3-card.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ls-sky); }
.v3-card.stat.good::before { background: var(--ls-success); }
.v3-card.stat.warn::before { background: var(--ls-warning-text); }
.v3-card.stat.neutral::before { background: var(--ls-steel); }
.v3-card.stat.bad::before { background: var(--ls-danger); }
.s-label { font-size: var(--ls-fs-sm); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ls-text-label); }
/* Keep the figure + its trailing "then" on one line (long money values were wrapping "then" below). */
.s-value { font-size: var(--ls-fs-3xl); font-weight: 700; color: var(--ls-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.s-value.neg { color: var(--ls-danger-text); }
/* A figure that is also the way into a related report (My Sales' overdue re-contacts → Press Dates):
   the value keeps its own ink — including .neg's danger red — and underlines on hover/focus. */
.v3-card.stat .s-value-link { text-decoration: none; color: inherit; }
.v3-card.stat .s-value-link:hover .s-value,
.v3-card.stat .s-value-link:focus-visible .s-value { text-decoration: underline; }

/* Horizontal bar chart (dashboards) — magnitude, single navy→steel ramp, recessive track. */
.hbars { display: grid; gap: 11px; margin-top: 2px; }
.hbar-row { display: grid; grid-template-columns: 116px 1fr auto; align-items: center; gap: 12px; font-size: var(--ls-fs-md); }
.hbar-name { color: var(--ls-text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 12px; border-radius: 6px; background: var(--ls-panel); overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--ls-primary), var(--ls-steel)); }
.hbar-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 74px; color: var(--ls-text); }

/* YTD trend area (single-series magnitude-over-time; colour via tokens since SVG attrs can't read vars). */
.ytd-trend { width: 100%; height: 132px; display: block; margin: 6px 0 2px; }
.ytd-trend .ytd-line { fill: none; stroke: var(--ls-primary); stroke-width: 2.5px; stroke-linecap: round; stroke-linejoin: round; }
.ytd-trend .ytd-end { fill: var(--ls-primary); }
.ytd-months { display: flex; justify-content: space-between; font-size: var(--ls-fs-sm); color: var(--ls-text-muted); margin: 0 0 12px; }
.ytd-months .now { color: var(--ls-primary); font-weight: 700; }

/* Report head — a card-styled section header: title + subtitle on the left, controls (refresh / filter)
   on the right. Used by the Sales dashboard tabs (Pipeline / YTD / Performance) so they read alike. */
.report-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.report-head .rh-text { min-width: 0; }
.report-head .rh-title { font-size: var(--ls-fs-xl); font-weight: 700; color: var(--ls-text); }
.report-head .rh-sub { font-size: var(--ls-fs-base); color: var(--ls-text-muted); margin-top: 2px; }
.report-head .rh-actions { display: flex; align-items: center; gap: 8px; flex: none; }

/* Quick-filter chips (legacy flat row) — kept for the Employees list; Site Central, Companies
   and Clients use the grouped/segmented toolbar below instead. */
.chip-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip-lbl { font-size: var(--ls-fs-sm); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ls-text-muted); margin-right: 2px; }
.chip-sep { width: 1px; height: 18px; background: var(--ls-border); margin: 0 4px; }
.qchip {
  border: 1px solid var(--ls-border); border-radius: 20px; padding: 3px 12px; font-size: var(--ls-fs-base);
  color: var(--ls-text-secondary); background: var(--ls-surface); cursor: pointer; font-family: var(--ls-font);
}
.qchip:hover { border-color: var(--ls-primary); }
.qchip.on { background: var(--ls-primary); border-color: var(--ls-primary); color: #fff; font-weight: 600; }
.qchip.attn { color: var(--ls-danger-text); }
.qchip.attn.on { background: var(--ls-danger); border-color: var(--ls-danger); color: #fff; }

/* Grouped quick-filter toolbar: labelled groups separated by dividers, each control shaped by
   its semantics instead of one flat chip row — exclusive switch, pick-one-of-many cluster, or
   independent boolean toggles. Shared by Site Central, Companies and Clients. */
.qf-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 0; }
.qf-group { display: flex; flex-direction: column; gap: 6px; }
.qf-group-label {
  font-size: var(--ls-fs-sm); font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ls-text-label);
}
.qf-divider { width: 1px; align-self: stretch; background: var(--ls-border-mid); margin: 2px 0; }

/* Switch: mutually-exclusive binary — a segmented switch, not a pair of chips. */
.qf-switch {
  display: inline-flex; background: var(--ls-panel); border: 1px solid var(--ls-border-mid);
  border-radius: 999px; padding: 3px; gap: 2px;
}
.qf-switch-opt {
  border: none; background: transparent; padding: 6px 14px; font-size: var(--ls-fs-base); font-family: var(--ls-font);
  cursor: pointer; color: var(--ls-text-secondary); display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; border-radius: 999px;
}
.qf-switch-opt:hover:not(.active) { color: var(--ls-primary); }
.qf-switch-opt.active { background: var(--ls-primary); color: #fff; font-weight: 600; }
.qf-switch-opt .n { font-variant-numeric: tabular-nums; opacity: .8; }
.qf-switch-opt.active .n { opacity: .9; }

/* Cluster: pick-one-of-many (or none) — a chip cluster, kept visually apart from the switch. */
.qf-cluster { display: inline-flex; gap: 4px; background: var(--ls-panel); border-radius: 999px; padding: 3px; }
.qf-chip {
  border: none; background: transparent; border-radius: 999px; padding: 6px 12px; font-size: var(--ls-fs-base);
  color: var(--ls-text-secondary); cursor: pointer; font-family: var(--ls-font);
}
.qf-chip:hover { background: var(--ls-surface); }
.qf-chip.on { background: var(--ls-surface); color: var(--ls-primary); font-weight: 600; box-shadow: var(--ls-shadow-1); }
/* A count riding a chip (the follow-up status cluster) — the chip is inline text, not a flex row like
   the switch option, so the gap is explicit or "Open861" is what renders. */
.qf-chip .n { margin-left: 6px; font-variant-numeric: tabular-nums; opacity: .8; }

/* Toggle: independent boolean flags, each its own pill; .danger for an alert-style toggle
   (e.g. Needs attention / Re-contact due). */
.qf-toggles { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.qf-toggle {
  border: 1px solid var(--ls-border-mid); background: var(--ls-surface); border-radius: 999px; padding: 6px 14px;
  font-size: var(--ls-fs-base); color: var(--ls-text-secondary); cursor: pointer; font-family: var(--ls-font);
  display: inline-flex; align-items: center; gap: 6px;
}
.qf-toggle:hover { border-color: var(--ls-primary); }
.qf-toggle.on { background: var(--ls-primary); border-color: var(--ls-primary); color: #fff; font-weight: 600; }
.qf-toggle .dot { font-size: var(--ls-fs-xs); }
.qf-toggle .n { font-variant-numeric: tabular-nums; opacity: .85; }
.qf-toggle.danger { color: var(--ls-danger-text); }
.qf-toggle.danger.on { background: var(--ls-danger); border-color: var(--ls-danger); color: #fff; }

/* Compact variant (7 Sep 2026, first consumer: the Communication logs filter bar) — one quiet row for a
   bar that lives inside a grid card's toolbar rather than above a page's grid: 28px line, 11.5px pills,
   the active state a navy tint instead of a solid fill, thin `.qf-sep` rules instead of `.qf-divider`
   + group labels, so it reads as a control strip under the card title, not a second header. The
   search box leads the row. Radzen controls keep the house metrics. */
.qf-toolbar.compact { gap: 6px; margin-bottom: 0; }
.qf-toolbar.compact .qf-switch, .qf-toolbar.compact .qf-cluster { padding: 2px; }
.qf-toolbar.compact .qf-switch-opt { padding: 3px 10px; font-size: var(--ls-fs-sm); }
.qf-toolbar.compact .qf-switch-opt.active { background: var(--ls-primary-tint-2); color: var(--ls-primary); }
.qf-toolbar.compact .qf-chip { padding: 3px 9px; font-size: var(--ls-fs-sm); }
.qf-toolbar.compact .qf-toggle { padding: 3px 10px; font-size: var(--ls-fs-sm); }
.qf-toolbar.compact .qf-toggle.on { background: var(--ls-primary-tint-2); border-color: transparent; color: var(--ls-primary); }
.qf-toolbar.compact .n { font-size: var(--ls-fs-xs); }
.qf-toolbar.compact .qf-sep { width: 1px; height: 20px; background: var(--ls-border-mid); margin: 0 2px; }
.qf-toolbar.compact .v3-input { padding-top: 4px; padding-bottom: 4px; font-size: var(--ls-fs-base); }
.qf-toolbar.compact .v3-btn.sm { padding: 3px 10px; font-size: var(--ls-fs-sm); }

.cell-main { display: block; font-weight: 600; }
/* Wraps instead of Radzen's default single-line ellipsis — a sub-line exists to carry extra
   detail; silently truncating it defeats the point (11 Aug, quote cost-breakdown clipping). */
.cell-sub { display: block; font-size: var(--ls-fs-sm); color: var(--ls-text-muted); white-space: normal; }
.cell-sub .unverified { color: var(--ls-warning-text); }

/* Setup-progress dot rail — a lift's pipeline milestones as a compact row of dots (filled once
   done), paired with a .cell-sub naming the current/next one. Promoted here (30 Aug 2026) once a
   second grid (Site Central's Lifts tab) wanted the same look Project Summary's own Lifts grid
   already had — was page-scoped on ProjectSummaryPage.razor.css. */
.setup-rail { display: flex; align-items: center; gap: 4px; }
.setup-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ls-border-mid); flex: none; }
.setup-dot.done { background: var(--ls-success); }
.money { font-weight: 600; font-variant-numeric: tabular-nums; }
/* A money value with a small badge riding beside it on the same line (e.g. a grid cell's
   price + its over/under chip) — the badge is a fact about the value, not a second row.
   flex-wrap here is load-bearing, not decorative: justify-content:flex-end packs content to the
   RIGHT edge, so a column too narrow for a big price + its chip overflows to the LEFT — and a
   fixed-width column with no wrap clips whatever falls off that edge, which is the price's own
   LEADING digit (a $53,690 quote rendering as "3,690"), the one failure mode worse than a busier
   two-line cell. Wrapping drops the chip to its own line instead once a large enough price no
   longer fits, so no price digit is ever silently lost regardless of how big the number gets. */
.price-cell-row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: flex-end; width: 100%; }
.stale { color: var(--ls-danger-text); font-weight: 600; }
.notice { color: var(--ls-warning-text); font-weight: 600; }
.quiet { color: var(--ls-text-muted); }
.quiet-link { color: var(--ls-text-muted); text-decoration: none; }
.quiet-link:hover { text-decoration: underline; }
.v3-chip.tiny { font-size: var(--ls-fs-xs); margin-left: 5px; }


/* ---- Sign-in page (Shared.UI/Auth/LoginPanel). Global so it loads on the pre-auth /login route
   (EmptyLayout). Retains the Entra SSO card; navy backdrop with depth, no images. */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  position: relative; overflow: hidden;
  background:
    radial-gradient(90% 70% at 78% 15%, rgba(90, 150, 210, .20), transparent 60%),
    radial-gradient(70% 60% at 10% 95%, rgba(0, 80, 140, .28), transparent 60%),
    linear-gradient(155deg, #012540 0%, var(--ls-primary) 45%, var(--ls-primary-hover) 100%);
}
.login-page::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .05;
  background-image: linear-gradient(135deg, #fff 1px, transparent 1px); background-size: 26px 26px;
}
.login-card {
  position: relative; z-index: 1; width: 384px; max-width: 100%;
  background: var(--ls-surface); border-radius: 14px; padding: 40px 36px 30px; text-align: center;
  box-shadow: 0 26px 64px rgba(0, 0, 0, .40); border-top: 3px solid var(--ls-primary);
}
.login-logo { max-width: 232px; margin: 0 auto 10px; display: block; }
.login-subtitle {
  font-size: var(--ls-fs-base); color: var(--ls-text-muted); margin: 2px 0 26px; letter-spacing: .02em;
}
.login-warning {
  background: var(--ls-warning-bg); color: var(--ls-warning-text); border: 1px solid var(--ls-warning-text);
  border-radius: 8px; font-size: var(--ls-fs-base); padding: 9px 11px; margin-bottom: 18px; text-align: left; line-height: 1.4;
}
.login-signin { display: block; text-decoration: none; }
.login-msbtn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--ls-primary); color: #fff; border-radius: 8px; padding: 13px 16px;
  font-size: var(--ls-fs-lg); font-weight: 600; transition: background .15s;
}
.login-signin:hover .login-msbtn { background: var(--ls-primary-hover); }
.login-msbtn svg { width: 18px; height: 18px; flex-shrink: 0; }
.login-divider {
  display: flex; align-items: center; gap: 10px; margin: 22px 2px 4px;
  color: var(--ls-text-label); font-size: var(--ls-fs-sm); letter-spacing: .06em; text-transform: uppercase;
}
.login-divider::before, .login-divider::after { content: ""; height: 1px; flex: 1; background: var(--ls-border-light); }
.login-hint { font-size: var(--ls-fs-base); color: var(--ls-text-label); margin-top: 12px; }

/* My Leave content (Shared.UI/Leave/MyLeave) — hosted by the /leave page or a modal. */
.my-leave .ml-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.my-leave .ml-top .hint { margin: 0; }
.my-leave .v3-table td.ml-actions { text-align: right; white-space: nowrap; }
.my-leave .grid-link.danger { color: var(--ls-danger); }

/* Edit customer info form (BackOffice/Clients/ClientDetailPanel) — in shared.css since it renders in a dialog. */
.client-edit .ce-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 6px; }
.client-edit .ce-field { display: flex; flex-direction: column; gap: 5px; }
.client-edit .ce-field.ce-wide { grid-column: 1 / -1; }
/* A section label inside an editor grid always owns its full row (the Sales divider in the
   Site information editor) — without this it sits in a cell and the next field rides beside it. */
.client-edit .ce-grid .mc-section-label { grid-column: 1 / -1; margin: 8px 2px 0; padding-top: 10px; border-top: 1px solid var(--ls-border-light); }
/* Sentence-case labels — caps stay on pane titles and table headers (declutter rules). */
.client-edit .ce-field > label { font-size: var(--ls-fs-base); font-weight: 500; color: var(--ls-text-muted); }
.client-edit .ce-field > label .ce-req { color: var(--ls-sky); font-weight: 700; }
/* A full-width row of three inside the editor grid: the middle slot narrow (post code between
   state and region; even split for lifts · stops · opening via .even). */
.client-edit .ce-grid .ce-trio { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr .8fr 1.4fr; gap: 10px 12px; }
.client-edit .ce-grid .ce-trio.even { grid-template-columns: 1fr 1fr 1fr; }
/* A whole editor grid split into three equal columns, rather than the default two — for a row of
   short fields plus a trailing action (Install Budget's Ops/Estimated/Adjust value) or a compact
   6-field grid that reads better as two rows of three (Install's Lost Hours buckets). */
.client-edit .ce-grid.three { grid-template-columns: 1fr 1fr 1fr; }
/* The client dialog's three legacy columns (Client | Contact | Billing, Clients_edit.aspx's placement):
   each column is its own one-column label-left grid headed by a section label; they stack in the
   same order when the dialog is narrow. .ce-ro-val is the read-only mode's value (text or link). */
.client-edit .ce-grid.ce-cols { gap: 10px 28px; align-items: start; --ce-label-w: 118px; }
.client-edit .ce-grid .ce-col { grid-template-columns: minmax(0, 1fr); margin-top: 0; align-content: start; min-width: 0; }
.client-edit .ce-grid .ce-col > .mc-section-label:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.client-edit .ce-state-pc .ce-inline-lab { font-size: var(--ls-fs-base); color: var(--ls-text-secondary); white-space: nowrap; }
.client-edit .ce-ro-val { display: flex; align-items: center; min-height: 28px; overflow-wrap: anywhere; white-space: pre-line; }
.client-edit .ce-ro-val.muted { color: var(--ls-text-muted); }
.client-edit .ce-cols + * { margin-top: 18px; }
.dlg-sub.ce-hero-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
@media (max-width: 900px) { .client-edit .ce-grid.ce-cols { grid-template-columns: 1fr; } }
/* Grid children default to min-width:auto, letting a wide dropdown label (state/region) blow past
   its fraction and crush the post-code column — pin them so the fr split wins and labels truncate. */
.client-edit .ce-grid .ce-trio > .ce-field { min-width: 0; }
@media (max-width: 560px) { .client-edit .ce-grid .ce-trio, .client-edit .ce-grid .ce-trio.even { grid-template-columns: 1fr; } }
/* A full-width row of fields sized to their OWN content instead of the grid's fr split (Contract
   Setup's GST status/date, Supplier pricing's price/currency/price) — grouped together with the
   leftover row width left empty, rather than each field stretching to fill its column. */
.client-edit .ce-grid .ce-compact-row { grid-column: 1 / -1; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.client-edit .ce-grid .ce-compact-row > .ce-field { flex: 0 0 auto; }
.client-edit .ce-grid .ce-compact-row > .ce-compact-check { padding-bottom: 6px; }
/* Quick-date chips under a date field (Key dates editor): shortcuts, not data — small ghost
   pills that stamp/bump the date; clearing stays in the picker. */
.qd-chips { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.qd-chip {
  border: 1px solid var(--ls-border); background: var(--ls-surface); border-radius: 12px;
  padding: 2px 10px; font-size: var(--ls-fs-sm); font-weight: 600; color: var(--ls-text-muted);
  cursor: pointer; font-family: inherit;
}
.qd-chip:hover { background: var(--ls-primary-tint); color: var(--ls-primary); border-color: var(--ls-primary-tint-2); }
.client-edit .ce-error { color: var(--ls-danger); font-size: var(--ls-fs-base); margin-top: 8px; }
/* Low-fill-rate fields (Address/Suburb/State/Post code/Notes on the client editor — under 15% of
   clients created in the last year carry any of them) tucked behind a native <details> instead of
   six always-open fields most reps never touch. No JS: open/close is free. */
.client-edit .ce-grid details.ce-more { grid-column: 1 / -1; }
.client-edit .ce-grid details.ce-more > summary {
  cursor: pointer; list-style: none; font-size: var(--ls-fs-base); font-weight: 500; color: var(--ls-text-muted);
  padding: 10px 2px 8px; border-top: 1px solid var(--ls-border-light);
}
.client-edit .ce-grid details.ce-more > summary::-webkit-details-marker { display: none; }
.client-edit .ce-grid details.ce-more > summary::before { content: '▸ '; }
.client-edit .ce-grid details.ce-more[open] > summary::before { content: '▾ '; }
.client-edit .ce-grid details.ce-more > .ce-grid { margin-top: 6px; }
/* A control and its one-click helper on a single line inside a field (a date + "Today", an amount +
   "Record deposit"): the control takes the width, the button hugs it. Not .dlg-row — that is the
   picker's hover-tinted, pointer-cursor result row, which reads as clickable on a plain form row. */
.client-edit .ce-inline { display: flex; align-items: center; gap: 8px; }
.client-edit .ce-inline > :first-child { flex: 1; min-width: 0; }
/* A .ce-inline that carries more than a control-plus-hint (a pair of buttons and a hint, e.g. the
   contract editor's renewal actions) drops to a second line on a narrow dialog instead of crowding
   or clipping — the plain .ce-inline stays single-line since its usual shape (control + one hugging
   button) never needs it. */
.client-edit .ce-inline.wrap { flex-wrap: wrap; }
/* Job-notes editor: chip toolbar above the journal, character count riding the footer's left. */
.jn-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dlg-foot .dlg-count { margin-right: auto; font-size: var(--ls-fs-sm); color: var(--ls-text-label); }
.client-edit .ce-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
/* A row of radios/check options inside a .ce-field (the call-out fee choice): wraps, aligned to the
   28px control line without a fixed height. */
.client-edit .ce-radios { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; min-height: 28px; }
/* A display-only value in a form grid: the .v3-input.readonly look without being an input. */
.client-edit .ce-readonly { display: flex; align-items: center; min-height: 28px; padding: 0 8px;
  font-size: var(--ls-fs-base); color: var(--ls-text-secondary); background: var(--ls-surface-alt);
  border: 1px solid var(--ls-border-mid); border-radius: 3px; }
/* Label-left editor rows (Je, 23 Sep 2026 — the Quote Editor's row shape for the sectioned
   editors): add .lbl-left to a .ce-grid and every .ce-field becomes label | control. Section
   labels, .ce-wide and hints keep spanning. --ce-label-w tunes the column per dialog. */
.client-edit .ce-grid.lbl-left .ce-field { display: grid; grid-template-columns: var(--ce-label-w, 128px) minmax(0, 1fr);
  column-gap: 10px; row-gap: 3px; align-items: center; }
.client-edit .ce-grid.lbl-left .ce-field > label { grid-column: 1; color: var(--ls-text-secondary); }
.client-edit .ce-grid.lbl-left .ce-field > :not(label) { grid-column: 2; min-width: 0; }
.client-edit .ce-grid.lbl-left .ce-field > label.v3-check { grid-column: 2; }
.client-edit .ce-grid.lbl-left .ce-field.ce-top { align-items: start; }
.client-edit .ce-grid.lbl-left .ce-field.ce-top > label { padding-top: 7px; }
/* A field with no label of its own, named by its card title, spans both columns instead of leaving
   the label column empty. */
.client-edit .ce-grid.lbl-left .ce-field.ce-full { display: block; }
@media (max-width: 720px) { .client-edit .ce-grid.lbl-left .ce-field { grid-template-columns: 1fr; }
  .client-edit .ce-grid.lbl-left .ce-field > * { grid-column: 1; } }
/* A .ce-trio nested inside a label-left grid (Emergency phone 1/2/3, the create-mode period trio)
   keeps its own compact three-up look rather than adopting label | control — the shared label
   column would leave almost nothing for a third-width cell, so these fields opt back out and stay
   label-above-control, same as before .lbl-left existed. */
.client-edit .ce-grid.lbl-left .ce-trio > .ce-field { display: flex; flex-direction: column; gap: 5px; }
.client-edit .ce-grid.lbl-left .ce-trio > .ce-field > label { color: var(--ls-text-muted); }
.pane-title .ce-edit-link { float: right; font-size: var(--ls-fs-base); font-weight: 600; }

/* ============================================================================
   STANDARD MODAL / PICKER UI  (the .dlg-* set) — the house dialog look.
   Search-picker dialogs (Add client, Change company, …) compose these: an
   optional lead line, a search field, a scrollable result list of avatar rows,
   tidy empty states, and a single outlined "create" action. Rendered inside a
   Radzen dialog, so it lives in shared.css. See skills/frontend-design.
   ========================================================================= */
.dlg-lead { color: var(--ls-text-muted); font-size: var(--ls-fs-base); margin: 0 0 8px; line-height: 1.5; }

.dlg-search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--ls-border);
  border-radius: 9px; background: color-mix(in srgb, var(--ls-border) 20%, var(--ls-surface));
  padding: 0 12px; transition: border-color .14s, background .14s, box-shadow .14s; }
.dlg-search:focus-within { border-color: var(--ls-primary); background: var(--ls-surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ls-primary) 16%, transparent); }
.dlg-search > .rz-icon, .dlg-search .lead-icon { color: var(--ls-text-muted); flex: none; font-size: var(--ls-icon-lg); }
.dlg-search input { border: none; outline: none; background: transparent; flex: 1; font: inherit; font-size: var(--ls-fs-lg);
  color: var(--ls-text); padding: 11px 0; }
.dlg-search input::placeholder { color: var(--ls-text-muted); }
.dlg-search .dlg-clear { border: none; background: transparent; color: var(--ls-text-muted); cursor: pointer;
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; flex: none; }
.dlg-search .dlg-clear:hover { background: color-mix(in srgb, var(--ls-border) 55%, var(--ls-surface)); color: var(--ls-text); }

/* The list/grid search box (Service Hub, Install Hub, Invoices): the picker's .dlg-search icon +
   clear shape, sized to the 28px/12px control scale so it sits level with the toolbar's pills. */
.dlg-search.grid-search { flex: 1 1 auto; min-width: 220px; max-width: 420px; height: 28px;
  padding: 0 8px; gap: 6px; border-radius: 3px; border-color: var(--ls-border-mid); background: var(--ls-field); }
.dlg-search.grid-search input { font-size: var(--ls-fs-base); padding: 0; }
.dlg-search.grid-search > .rz-icon, .dlg-search.grid-search .lead-icon { font-size: var(--ls-icon); }

.dlg-count { font-size: var(--ls-fs-sm); color: var(--ls-text-muted); font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; margin: 14px 2px 6px; }

.dlg-list { display: flex; flex-direction: column; gap: 3px; min-height: 150px; max-height: 300px;
  overflow-y: auto; margin: 4px 0 2px; }

.dlg-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit;
  color: var(--ls-text); background: transparent; border: 1px solid transparent; border-radius: 10px;
  padding: 9px 10px; cursor: pointer; transition: background .12s, border-color .12s; }
.dlg-row:hover:not(:disabled) { background: color-mix(in srgb, var(--ls-primary) 7%, var(--ls-surface));
  border-color: color-mix(in srgb, var(--ls-primary) 22%, transparent); }
.dlg-row:disabled { opacity: .55; cursor: default; }
.dlg-avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 700; font-size: var(--ls-fs-md); letter-spacing: .02em; color: var(--ls-primary);
  background: color-mix(in srgb, var(--ls-primary) 13%, var(--ls-surface)); }
.dlg-row .dlg-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dlg-row .dlg-name { font-weight: 600; font-size: var(--ls-fs-md); display: flex; align-items: center; gap: 7px; }
.dlg-row .dlg-sub { font-size: var(--ls-fs-sm); color: var(--ls-text-muted); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.dlg-row .dlg-go { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: var(--ls-primary); background: color-mix(in srgb, var(--ls-primary) 12%, var(--ls-surface));
  opacity: 0; transition: opacity .12s; }
.dlg-row:hover .dlg-go { opacity: 1; }

.dlg-empty { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; color: var(--ls-text-muted); padding: 12px; }
.dlg-empty .glyph { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ls-text-muted); background: color-mix(in srgb, var(--ls-border) 26%, var(--ls-surface));
  border: 1px solid var(--ls-border); }
.dlg-empty p { margin: 0; font-size: var(--ls-fs-md); max-width: 320px; line-height: 1.5; }
.dlg-empty strong { color: var(--ls-text); }

/* Grouped picker (the Audit employee picker): several .dlg-lists stacked under .dlg-count headings
   inside ONE .dlg-scroll. `.dlg-list` above assumes it is the picker's only list and owns the
   scroll (150px min / 300px max) — stacked, every one-person group reserves 150px of blank space
   and gets its own scrollbar. Put `.dlg-groups` on the `.dlg-scroll` so the body scrolls as a whole,
   headings stick while their group passes, and rows tighten to a 30px avatar (~40px rows) so a
   whole roster reads without paging. Search field tightens to match. */
.dlg-scroll.dlg-groups { padding: 10px 12px 8px; }
.dlg-groups .dlg-search { border-radius: 8px; padding: 0 10px; gap: 8px; }
.dlg-groups .dlg-search input { padding: 8px 0; font-size: var(--ls-fs-md); }
.dlg-groups .dlg-list { min-height: 0; max-height: none; overflow: visible; margin: 0; gap: 1px; }
.dlg-groups .dlg-count { position: sticky; top: -10px; z-index: 1; margin: 6px 0 2px; padding: 8px 8px 4px;
  background: var(--ls-surface); }
.dlg-groups .dlg-list + .dlg-count { margin-top: 4px; border-top: 1px solid var(--ls-border); padding-top: 10px; }
.dlg-groups .dlg-row { gap: 10px; padding: 5px 8px; border-radius: 8px; }
.dlg-groups .dlg-avatar { width: 30px; height: 30px; font-size: var(--ls-fs-sm); }
.dlg-groups .dlg-avatar .rz-icon { font-size: var(--ls-icon) !important; }
.dlg-groups .dlg-row .dlg-info { gap: 0; }
.dlg-groups .dlg-row .dlg-name { font-size: var(--ls-fs-md); line-height: 1.3; }
.dlg-groups .dlg-row .dlg-sub { font-size: var(--ls-fs-base); line-height: 1.3; }
.dlg-groups .dlg-row .dlg-go { width: 22px; height: 22px; }
.dlg-groups .dlg-row.selected { background: color-mix(in srgb, var(--ls-primary) 7%, var(--ls-surface)); }
.dlg-groups .dlg-empty { min-height: 120px; }
/* Wider than a phone the picker is a fixed box of a few groups' height — not 92vh of roster. */
@media (min-width: 769px) { .dlg-scroll.dlg-groups { max-height: 460px; } }

.dlg-create { margin-top: 10px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px; border-radius: 9px; border: 1.5px dashed color-mix(in srgb, var(--ls-primary) 42%, var(--ls-border));
  background: transparent; color: var(--ls-primary); font: inherit; font-weight: 600; font-size: var(--ls-fs-md);
  cursor: pointer; transition: background .14s, border-color .14s, color .14s; }
.dlg-create:hover:not(:disabled) { background: var(--ls-primary); border-style: solid; border-color: var(--ls-primary); color: #fff; }
.dlg-create:disabled { opacity: .55; cursor: default; }

/* Standard dialog footer + error — GLOBAL (any dialog, not only .client-edit forms). Use these so a
   dialog's action row and inline error look identical everywhere. Helper text (.hint) left-aligns. */
.dlg-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 14px; }
.dlg-actions > .hint { margin-right: auto; }
.dlg-error { color: var(--ls-danger); font-size: var(--ls-fs-base); margin-top: 10px; }
/* Install page (legacy InstallV2) dialogs: QuickLoadNotice's green success line; the archive popup's MAIN label sits
   above the fields, so it needs no top gap. */
.load-notice .ln-done { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 14px; border-radius: var(--ls-radius-tile);
  background: var(--ls-success-bg); color: var(--ls-success-text); font-weight: 600; }
.load-notice .ln-done::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.load-notice .ln-warning { margin-top: 12px; }
.dlg-error.main-contact-blocked { margin: 0 0 10px; }
/* Storage invoice dialog (legacy logistics_storage_invoice): the recipient and Lift ID checkbox lists. */
.si-checks { display: flex; flex-direction: column; gap: 6px; }
.si-checks.si-lifts { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; }

/* Standard in-dialog warning callout (single-source — was duplicated byte-for-byte in
   RecordPaymentDialog.razor.css and AssignLiftDialog.razor.css). Use for a consequential heads-up
   that isn't an error, e.g. "this creates the lift record" / "this creates a copy". */
.dlg-warn {
  background: var(--ls-warning-bg); color: var(--ls-warning-text); border: 1px solid var(--ls-warning-text);
  border-radius: 8px; font-size: var(--ls-fs-base); padding: 10px 12px; line-height: 1.4; font-weight: 600;
}

/* Full custom dialog chrome (matches the concept): a hero header with an icon tile, title + subtitle
   and our own close (×), a scrolling body, and a tinted footer bar. Open the dialog with
   DialogOptions{ ShowTitle=false, CssClass="dlg-modal" } so Radzen's own title/padding get out of the way. */
.rz-dialog.dlg-modal { max-height: 92vh; }
/* Every DialogOptions.Width in the codebase is a fixed pixel value (560–1150px). Clamped here,
   those widths become maximums: on a phone the dialog takes the viewport minus a small gutter
   instead of overflowing it sideways. Applies to ALL Radzen dialogs, dlg-modal or not. */
.rz-dialog { max-width: calc(100vw - 16px); }

/* Phones (the shell's 768px mobile breakpoint): a floating clamped box wastes edge pixels and
   double-scrolls — dlg-modal dialogs go full-screen instead. min/max-width beat Radzen's inline
   width, and 100dvh tracks the real visible height under the browser chrome.
   Radzen renders DialogOptions.CssClass directly on the .rz-dialog element itself — not on a
   wrapper around it — so this must be a same-element compound selector, not a descendant one:
   `.dlg-modal .rz-dialog` never matched anything, and the override silently never fired. */
@media (max-width: 768px) {
  .rz-dialog.dlg-modal {
    min-width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
}
.dlg-modal .rz-dialog-content { padding: 0 !important; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.dlg-shell { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.dlg-hero { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--ls-border); flex: none; }
.dlg-hero .dlg-ic { width: 34px; height: 34px; border-radius: var(--ls-radius-tile); background: var(--ls-primary-tint);
  color: var(--ls-primary); display: grid; place-items: center; flex: none; }
.dlg-hero .dlg-htext { flex: 1; min-width: 0; }
/* File-type / folder badge (`FileKind`, Shared.UI images/filetypes) — in a grid row, a picker list, or the
   dialog hero tile for the item being renamed or deleted. */
.ft-badge { width: var(--ls-icon-lg); height: var(--ls-icon-lg); flex: none; vertical-align: middle; }
.dlg-hero .dlg-ic .ft-badge { width: 22px; height: 22px; }
.dlg-hero .dlg-title { font-size: var(--ls-fs-xl); font-weight: 700; color: var(--ls-text); line-height: 1.25; }
.dlg-hero .dlg-sub { display: block; font-size: var(--ls-fs-base); font-weight: 400; color: var(--ls-text-muted); margin-top: 1px; }
.dlg-x { width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent; color: var(--ls-text-muted);
  cursor: pointer; display: grid; place-items: center; flex: none; }
.dlg-x:hover { background: var(--ls-surface-alt); color: var(--ls-text); }
.dlg-scroll { padding: 16px 18px; overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.dlg-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 13px 18px;
  border-top: 1px solid var(--ls-border); background: var(--ls-panel); flex: none; }
.dlg-foot > .dlg-error, .dlg-foot > .hint { margin-right: auto; margin-top: 0; }

/* QuoteMaker editor hosted as a near-fullscreen dialog (Site Central Quotes tab). The editor's
   own page-header acts as the chrome; the content pane is the scroll container, which is what
   the editor's sticky sidebar anchors to. Uncapped since 21 Aug (Je): the dialog IS its 95vw —
   the editor's panes are fluid, so wide monitors get columns, not stranded margin. */
.qe-dialog { max-width: none; }
.qe-dialog .rz-dialog-content { height: 100%; overflow: auto; padding: 0 16px 16px; }

/* Normalise Radzen dropdown popup fonts (the panel renders at <body>, so it can't inherit page --rz vars).
   Legacy CRM parity, 18 Sep 2026, Je: was 14px, a leftover from when the trigger itself was
   de-facto 14px (Radzen's .rz-input-md shadow) — the trigger is 12px now (--rz-input-font-size
   in the compact-field pass), so this stale 14px cascaded AFTER and beat the 12px item rule
   above, leaving the open panel visibly bigger than the field it belongs to. */
.rz-dropdown-panel .rz-dropdown-item,
.rz-dropdown-panel .rz-multiselect-item { font-size: var(--ls-fs-base); }
.rz-dropdown-panel .rz-dropdown-filter-container input,
.rz-dropdown-panel input.rz-inputtext { font-size: var(--ls-fs-base); }
.rz-dropdown .rz-dropdown-label, .rz-dropdown .rz-placeholder { font-size: var(--ls-fs-base); }

/* Manage-client dialog: roles as selectable toggle-cards (each with a one-line meaning) and a
   visually separated verification block, so a data-quality status is not shown as a peer role. */
.mc-section-label { font-size: var(--ls-fs-sm); font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ls-text-label); margin: 2px 2px 9px; }
.mc-section-gap { margin-top: 16px; }
.mc-roles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
/* Quiet selectable tiles: hairline off, soft tint on — the eye reads only what's ON. */
.v3-check.mc-role { display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px; font-size: inherit;
  border: 1px solid var(--ls-border-light); border-radius: 10px; background: var(--ls-surface);
  transition: border-color .12s, background .12s; }
.v3-check.mc-role:hover { border-color: var(--ls-border-mid); }
.v3-check.mc-role.on { border-color: var(--ls-primary-tint-2); background: var(--ls-primary-tint); }
/* The checkbox as a small filled tick, not a stock square. */
.mc-role input { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 2px 0 0;
  border: 1.5px solid var(--ls-border); border-radius: 5px; background: var(--ls-surface);
  display: grid; place-items: center; flex: none; cursor: pointer; }
.mc-role input:checked { background: var(--ls-primary); border-color: var(--ls-primary); }
.mc-role input:checked::after { content: "✓"; color: #fff; font-size: var(--ls-fs-xs); font-weight: 700; line-height: 1; }
.mc-role input:focus-visible { outline: 2px solid var(--ls-primary); outline-offset: 2px; }
.mc-role .v3-check-label { display: flex; flex-direction: column; gap: 1px; }
.mc-role-name { font-weight: 600; font-size: var(--ls-fs-md); color: var(--ls-text); }
.mc-role-desc { color: var(--ls-text-muted); font-size: var(--ls-fs-sm); line-height: 1.35; }

/* One quiet switch row — the colour lives in the small icon and the switch, not a full band. */
.mc-verify { display: flex; align-items: center; gap: 12px; padding: 8px 2px; cursor: pointer; }
.mc-verify-ic { display: grid; place-items: center; flex: none; color: var(--ls-text-muted); }
.mc-verify.on .mc-verify-ic { color: var(--ls-success-text); }
.mc-verify-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mc-verify-name { font-weight: 600; font-size: var(--ls-fs-md); color: var(--ls-text); display: flex; align-items: center; gap: 7px; }
.mc-verify-desc { color: var(--ls-text-muted); font-size: var(--ls-fs-sm); }
.mc-switch { -webkit-appearance: none; appearance: none; width: 42px; height: 24px; border-radius: 999px; margin: 0;
  background: var(--ls-border); position: relative; flex: none; cursor: pointer; transition: background .15s; }
.mc-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.mc-switch:checked { background: var(--ls-success); }
.mc-switch:checked::after { left: 21px; }
.mc-switch:focus-visible { outline: 2px solid var(--ls-primary); outline-offset: 2px; }
.mc-foot .mc-remove { margin-right: auto; }
.mc-remove-link { background: none; border: none; padding: 0; cursor: pointer; font-family: inherit;
  font-size: var(--ls-fs-base); font-weight: 600; color: var(--ls-danger); }
.mc-remove-link:hover { text-decoration: underline; }
.mc-remove-link:disabled { opacity: .5; cursor: default; text-decoration: none; }
.mc-foot > .dlg-error { margin-right: 0; }

/* Record-detail card (contact / company dialogs + their pages) — the house pattern for a record's
   at-a-glance facts: a status band of chips, then icon-led contact rows where the whole row is the
   mailto/tel target (contact-links standard). Reused by ClientDetailPanel + CompanyDetailPanel. */
.detail-status { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.contact-rows { display: grid; gap: 2px; }
.contact-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--ls-radius-tile);
  text-decoration: none; color: inherit; transition: background .12s; }
a.contact-row { cursor: pointer; }
a.contact-row:hover { background: var(--ls-surface-active); }
.contact-row .cr-ic { width: 26px; height: 26px; border-radius: var(--ls-radius-tile); background: var(--ls-surface-active);
  color: var(--ls-primary); display: grid; place-items: center; flex: none; }
.contact-row .cr-lab { font-size: var(--ls-fs-sm); font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ls-text-label); width: 62px; flex: none; }
.contact-row .cr-val { font-size: var(--ls-fs-md); color: var(--ls-text); font-weight: 500; min-width: 0; word-break: break-word; }
a.contact-row .cr-val { color: var(--ls-link); }
.contact-row .cr-val.muted { color: var(--ls-text-muted); font-weight: 400; }

/* Role chips in a detail grid's Role column (Main highlighted; the rest quiet). */
.role-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.role-chip { font-size: var(--ls-fs-xs); font-weight: 700; padding: 2px 7px; border-radius: 5px; letter-spacing: .02em;
  white-space: nowrap; background: var(--ls-surface-active); color: var(--ls-text-secondary); }
.role-chip.main { background: var(--ls-primary-tint-2); color: var(--ls-primary); }
.role-empty { color: var(--ls-text-muted); }

/* Grid cell that must stay one line — ellipsis + native tooltip instead of wrapping or a hard cut. */
.cell-ellipsis { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Recipient-list editor: mailbox chips for addresses with no employee record. */
.rl-editor { display: flex; flex-direction: column; gap: 14px; }
.rl-mailbox { display: flex; gap: 8px; align-items: center; }
.rl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rl-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px 3px 10px;
  border-radius: var(--ls-radius-badge); background: var(--ls-primary-tint); color: var(--ls-primary);
  font-size: var(--ls-fs-base); font-weight: 600;
}
.rl-chip-x {
  display: inline-flex; background: none; border: none; padding: 0; cursor: pointer;
  color: var(--ls-primary); opacity: .7;
}
.rl-chip-x:hover { opacity: 1; }

/* Top-bar refresh button, mid-refresh. */
.spinning { animation: ls-spin 900ms linear infinite; }
@keyframes ls-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .spinning { animation: none; opacity: .6; }
}

/* ---- notification bell (top bar, before the account menu) ---- */

.bell { position: relative; }
/* The trigger must LOOK like the shell's other top-bar icons, but their .icon-btn rule lives in
   AppShell.razor.css — page-scoped, so it cannot reach into this component. Restated here
   (same metrics, same hover) so the bell sits flush with its neighbours instead of rendering
   as a stock browser button. */
.bell-btn {
  position: relative; display: flex;
  background: none; border: none; cursor: pointer;
  padding: 6px; border-radius: var(--ls-radius-control);
  color: var(--ls-text-secondary);
}
.bell-btn:hover { background: var(--ls-surface-alt); color: var(--ls-primary); }
.bell-badge {
  position: absolute; top: 1px; right: 1px;
  min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 8px;
  background: var(--ls-danger);
  color: #fff;
  font-size: var(--ls-fs-xs); font-weight: 700; line-height: 15px; text-align: center;
  /* A surface ring so the count reads cleanly where it overlaps the icon. */
  box-shadow: 0 0 0 2px var(--ls-surface);
}
.bell-backdrop { position: fixed; inset: 0; z-index: 39; }
.bell-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  width: 340px; max-height: 420px; overflow-y: auto;
  background: var(--ls-surface);
  border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-card);
  box-shadow: var(--ls-shadow-pop);
}
.bell-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--ls-border-light);
  font-size: var(--ls-fs-md); font-weight: 700; color: var(--ls-text);
}
.bell-readall {
  border: 0; background: none; padding: 0; cursor: pointer;
  font-size: var(--ls-fs-base); color: var(--ls-link); text-decoration: underline;
}
.bell-empty { padding: 22px 16px; font-size: var(--ls-fs-md); color: var(--ls-text-muted); text-align: center; }
.bell-item {
  display: flex; flex-direction: column; gap: 2px; width: 100%;
  padding: 10px 14px; border: 0; border-bottom: 1px solid var(--ls-border-light);
  background: none; text-align: left; cursor: pointer; font: inherit;
}
.bell-item:hover { background: var(--ls-surface-alt); }
.bell-item.unread { background: var(--ls-primary-tint); }
.bell-item.unread:hover { background: var(--ls-primary-tint-2); }
.bell-item-title { font-size: var(--ls-fs-md); font-weight: 600; color: var(--ls-text); }
/* Marks the items whose click saves a file instead of opening a page. */
.bell-item-dl { color: var(--ls-text-muted); margin-right: 5px; vertical-align: -1px; }
.bell-item-body { font-size: var(--ls-fs-base); color: var(--ls-text-secondary); }
.bell-item-when { font-size: var(--ls-fs-sm); color: var(--ls-text-label); margin-top: 2px; }
/* Quiet footer action — clears the whole tray. Muted until hovered so it never competes with the
   notifications above it. */
.bell-clear {
  display: block; width: 100%; padding: 9px 14px; border: 0; border-top: 1px solid var(--ls-border-light);
  background: none; cursor: pointer; font: inherit; font-size: var(--ls-fs-base); color: var(--ls-text-muted); text-align: center;
}
.bell-clear:hover { background: var(--ls-surface-alt); color: var(--ls-primary); }

/* ---- new features (top bar button + What's new "New for you", 23 Nov 2026) ----
   The button reuses the bell's classes; its count is a primary pill, not danger red - a new
   feature is an invitation, not an alarm. Rows read like bell items with two small text actions. */
.new-features .bell-badge { background: var(--ls-primary); }
.whats-new-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-bottom: 1px solid var(--ls-border-light); }
.whats-new-row:last-child { border-bottom: 0; }
.whats-new-row.is-new { background: var(--ls-primary-tint); }
.whats-new-title { display: flex; align-items: center; gap: 4px; font-size: var(--ls-fs-md); font-weight: 600; color: var(--ls-text); }
.whats-new-foot { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.whats-new-foot .bell-item-when { margin-top: 0; margin-right: auto; }
.whats-new-act {
  border: 0; background: none; padding: 0; cursor: pointer; font: inherit;
  font-size: var(--ls-fs-base); font-weight: 600; color: var(--ls-link);
}
.whats-new-act:hover { text-decoration: underline; }
.whats-new-act.is-quiet { font-weight: 400; color: var(--ls-text-muted); }
.whats-new-act:focus-visible { outline: 2px solid var(--ls-primary); outline-offset: 2px; border-radius: 2px; }

/* ---- chat indicator (top bar, beside the bell) ----
   Built on the bell's own classes so the two read as one cluster; only the chat-specific bits
   (a row that is a link, the per-conversation count chip) are restated here. */
.chat-ind-item { text-decoration: none; }
.chat-ind-item .bell-item-title { display: flex; align-items: center; gap: 8px; }
.chat-ind-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-ind-count { margin-left: auto; background: var(--ls-primary); color: #fff; min-width: 20px; text-align: center; }
.chat-ind-item .bell-item-body { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The footer link uses .bell-clear's metrics but is an anchor, so it needs the link reset. */
.chat-ind .bell-clear { text-decoration: none; }

/* Phones: the notification bell's BUTTON folds into the account menu as a "Notifications" item
   (AppShell opens this same bell instance's panel by @ref — one poller/badge either way). The
   chat indicator keeps its button (:not(.chat-ind) — it shares .bell-btn). Both popovers become
   a full-width sheet under the top bar: the notification pop's anchor is the now-hidden button
   (a zero-size box), and 340px anchored right was cramped on a phone anyway. */
@media (max-width: 768px) {
  .bell:not(.chat-ind) > .bell-btn { display: none; }
  .bell-pop { position: fixed; left: 8px; right: 8px; top: 60px; width: auto; }
}

/* ---- shared toast stack (top-right, below the top bar) ----
   Owned by ToastStack.razor; ChatToastHost and NotificationToastHost render only their own rows
   into it (27 Aug 2026), so the two toast types share one corner instead of two overlapping ones.
   Anchored under the top bar (52px) rather than the bottom-right corner (27 Aug 2026, moved) — the
   draggable "Ask AI" launcher defaults to that exact corner (AssistantLauncher.razor.css .asst-fab),
   so a persistent notification toast sitting there would permanently cover it. The +8px gap matches
   the bell's own popover offset (.bell-pop's top: calc(100% + 8px)) for the same top-right column. */
.toast-stack {
  position: fixed; top: 60px; right: 16px; z-index: 1100;
  display: flex; flex-direction: column; gap: 8px; width: 360px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 76px); overflow-y: auto;
}
.chat-toast {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 8px 10px 12px;
  background: var(--ls-surface);
  border: 1px solid var(--ls-border);
  border-left: 3px solid var(--ls-primary);
  border-radius: var(--ls-radius-card);
  box-shadow: var(--ls-shadow-pop);
}
.chat-toast-open { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; }
/* Modal-mode toasts render as buttons — strip the native button chrome, keep the toast look.
   (.chat-toast's own rules already win over UA styles; only the row button needs a full reset.) */
button.chat-toast-open { border: 0; background: none; font: inherit; text-align: left; cursor: pointer; padding: 0; color: inherit; }
button.chat-toast-more { font: inherit; cursor: pointer; }
.chat-toast-avatar { width: 30px; height: 30px; font-size: var(--ls-fs-sm); }
.chat-toast-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.chat-toast-name { font-size: var(--ls-fs-md); font-weight: 600; color: var(--ls-text); }
.chat-toast-snippet {
  font-size: var(--ls-fs-base); color: var(--ls-text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-toast-dismiss {
  border: 0; background: none; cursor: pointer; padding: 0 4px; line-height: 1;
  font-size: var(--ls-fs-xl); color: var(--ls-text-label);
}
.chat-toast-dismiss:hover { color: var(--ls-text); }
/* The collapse line: one row standing in for everything past the second toast. */
.chat-toast-more {
  justify-content: center; padding: 8px 12px;
  font-size: var(--ls-fs-base); font-weight: 600; color: var(--ls-primary); text-decoration: none;
}

/* ---- notification toasts (27 Aug 2026) — built on the chat toast's own metrics (same row shape)
   so the two read as one family in the shared stack, but deliberately bolder and modelled on the
   app's existing Radzen success toast (QuoteEditorPage's "Quote saved") rather than invented from
   scratch: plain coloured glyph (no icon-chip background), bold title + subtitle line, dismiss at
   the far right, no left accent bar. Warning/amber rather than that toast's green — a bell push
   isn't always a "success" (a failed send is one too), so it reads as "a heads-up" rather than
   claiming an outcome it doesn't know. --ls-warning-bg is a solid hex per theme (never rgba) —
   this card sits over page content, so it must be fully opaque or whatever's behind it bleeds
   through and both become illegible. ---- */
.notif-toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 14px 14px 16px;
  background: var(--ls-warning-bg);
  border-radius: var(--ls-radius-card);
  box-shadow: var(--ls-shadow-pop);
}
.notif-toast-open {
  display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 0; text-align: left;
  border: 0; background: none; font: inherit; cursor: pointer; padding: 0; color: inherit;
}
.notif-toast-icon {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 18px; height: 18px; margin-top: 1px;
  color: var(--ls-warning-text);
}
.notif-toast-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-toast-title {
  font-size: var(--ls-fs-md); font-weight: 700; color: var(--ls-warning-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Two lines rather than one — a single clipped line was cutting the site/lift reference off
   mid-word (e.g. "...27 Aug 26 - A-Slidi…"), which is exactly the detail someone opening the
   toast needs to read. */
.notif-toast-body {
  font-size: var(--ls-fs-base); color: var(--ls-warning-text); opacity: .85; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notif-toast-dismiss {
  border: 0; background: none; cursor: pointer; padding: 0 2px; line-height: 1;
  color: var(--ls-warning-text); opacity: .75; font-size: var(--ls-fs-xl);
}
.notif-toast-dismiss:hover { opacity: 1; }

/* The bell popover's desktop-notification opt-in row — built on the chat workspace's own .cw-notify,
   just narrower to fit the 340px bell-pop. */
.bell-notify {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  border-bottom: 1px solid var(--ls-border-light);
  cursor: pointer;
}
.bell-notify .rz-icon { font-size: var(--ls-icon); color: var(--ls-text-secondary); }
.bell-notify-label { flex: 1; font-size: var(--ls-fs-base); color: var(--ls-text); }

/* ---- promoted with the Site Central declutter (25 Jul 2026) ---- */

/* Definition list, the calm form: sentence-case muted labels, readable values. Replaces
   per-page ALL-CAPS label grids — caps stay on pane titles and table headers only. */
.v3-dl { display: grid; grid-template-columns: minmax(120px, 150px) 1fr; row-gap: 9px; column-gap: 16px; font-size: var(--ls-fs-md); }
.v3-dl dt { color: var(--ls-text-muted); font-weight: 400; }
.v3-dl dd { color: var(--ls-text); font-weight: 500; margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Two-line table cells ride on the existing .cell-sub (defined with the record-detail set above):
   the primary value with a muted sub-line beneath — how a table sheds columns without shedding
   information. */

/* Slim stat tiles — the flight-path treatment for an in-page vitals strip: two lines per tile,
   tight padding, the qualifier (.s-note) riding beside the value instead of a third line. */
.stat-grid.slim { gap: 10px; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
.stat-grid.slim .v3-card.stat { padding: 7px 12px 8px; gap: 1px; }
.stat-grid.slim .s-label { font-size: var(--ls-fs-xs); }
.stat-grid.slim .s-value { font-size: var(--ls-fs-xl); line-height: 19px; }
.s-note { font-size: var(--ls-fs-sm); font-weight: 400; color: var(--ls-text-muted); margin-left: 5px; }

/* A time read relatively ("2h ago", RegionClock.Ago) with the absolute Sydney stamp (RegionClock.Stamp)
   on a muted line under it: `<span class="when">2h ago<span class="abs">05 Nov 2026 12:14</span></span>`.
   Promoted for the four Platform tabs (5 Nov 2026). */
.when { white-space: nowrap; }
.when .abs { display: block; font-size: var(--ls-fs-sm); color: var(--ls-text-muted); }

/* A record-id link that anchors its row (RO-17, Q17): the row's headline weight. */
.grid-link.strong { font-weight: 700; }

/* Two-line clamp for a list cell's long text — the full text lives in the tooltip. */
.cell-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }

/* Avatar + name (+ .cell-sub) cell — requester, assignee, contact. */
.who-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }

/* THE house grid row action: rests as a quiet icon, shows a floating tooltip bubble below-left of
   itself on hover/focus ("Send to Sign", "View", "Manage"). The bubble is NOT part of this button
   — it is the single body-level .v3-tip element driven by shared-ui.js (see the .v3-tip rule
   below). Constant padding so the row never jumps; the caption stays in the DOM (permanently
   display:none — .cap is never revealed any more), so accessibility and tests read the text
   either way.
   Markup: <a class="icon-cap-link" aria-label/data-tip><RadzenIcon/><span class="cap">…</span></a>
   9 Sep 2026, Je: "instead of show on hover to this actions, just show a tooltip, the behavior is
   not ok when it pushes icons as you hover" — reverses the inline-growing-caption design this
   block used until then (that pattern itself replaced a native title tooltip on 11 Aug, because
   the native tooltip trailed the cursor and could spill into the row below). A hovered icon still
   never pushes a sibling aside: the bubble is out of flow entirely.
   16 Sep 2026, Je: "behaves like a browser tooltip — does not affect the scrollbars and always
   shows on top" — which is why the bubble left this element for <body>. */
.icon-cap-link {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 4px 8px; border-radius: var(--ls-radius-control);
  color: var(--ls-link-muted); text-decoration: none; position: relative;
  /* RowAction renders a real <button>; neutralise the stock chrome. */
  background: none; border: 0; font-family: inherit;
}
.icon-cap-link:disabled { opacity: .45; cursor: default; }
/* Destructive row action: red fill on hover, quiet like the rest until then. */
.icon-cap-link.danger:hover, .icon-cap-link.danger:focus-visible { background: var(--ls-danger); }
/* Completing row action: green fill on hover. */
.icon-cap-link.success:hover, .icon-cap-link.success:focus-visible { background: var(--ls-success-text); }
.icon-cap-link .cap { display: none; }
.icon-cap-link:hover, .icon-cap-link:focus-visible { background: var(--ls-primary); color: #fff; }
/* The tooltip bubble itself — ONE element at the end of <body>, filled and positioned by
   shared-ui.js's delegated [data-tip] listener, never a child of the hovered button.
   It was ::after content on the button until 16 Sep 2026, and living inside the grid's
   horizontally-scrolling wrapper cost it everything a native tooltip gives for free: clipped at
   the wrapper's edge, its width counted towards the scrollable area (hovering an icon made the
   horizontal scrollbar appear or shift), and it could still paint under a later-stacked sibling.
   Je: "behaves like a browser tooltip — does not affect the scrollbars and always shows on top".
   The placement stays the one chosen 9 Sep 2026 ("the tooltip got covered"): below the anchor and
   left-aligned to it, because an above-centered bubble sat under the grid's own sticky header on
   row 1 and asked for space past the table's left edge on the leftmost (Actions) column.
   pointer-events:none keeps it out of hit-testing and out of the tab order, as generated content
   was; z-index sits well above anything a grid header, toolbar or popup would plausibly use —
   this is a leaf tooltip, it always wins. top/left here are placeholders: the script writes the
   real viewport coordinates before showing it. */
.v3-tip {
  position: fixed; top: 0; left: 0; display: none;
  padding: 4px 9px; border-radius: 6px;
  background: var(--ls-text); color: var(--ls-surface);
  font-size: var(--ls-fs-sm); font-weight: 600; white-space: nowrap;
  pointer-events: none; z-index: 10000; box-shadow: var(--ls-shadow-1);
}
.v3-tip.show { display: block; }
/* An action column is narrow by design (Width="44px") and Radzen clips its cells: the stock td is
   overflow:hidden and .rz-cell-data adds text-overflow:ellipsis, opted out only for
   :has(.rz-button) — which a plain <button class="icon-cap-link"> does not match. With
   AllowColumnResize on (table-layout:fixed) and Compact density's 16px horizontal padding, a 34px
   row action doesn't fit the 28px content box and would be sliced, with a stray ellipsis beside
   it. Opt those cells out platform-wide, so no grid has to remember to — it also stops the cell
   itself clipping RowActionsMenu's .row-menu-pop at its CSS fallback position. */
.rz-grid-table td:has(.icon-cap-link) { overflow: visible; }
.rz-grid-table td .rz-cell-data:has(.icon-cap-link) { overflow: visible; text-overflow: clip; }

/* RowActionsMenu (27 Aug 2026) — the "worst-case single hover" sizing above stops holding once a
   row can carry a variable NUMBER of actions (permissions + record state), not just one wide
   caption; this is the escape valve, same open/backdrop/close shape as the notification bell's
   .bell-pop, sized for a short icon+label list rather than the bell's multi-line items. */
.row-menu { position: relative; display: inline-flex; }
.row-menu-backdrop { position: fixed; inset: 0; z-index: 39; }
.row-menu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
  min-width: 190px; padding: 4px;
  background: var(--ls-surface); border: 1px solid var(--ls-border);
  border-radius: var(--ls-radius-card); box-shadow: var(--ls-shadow-pop);
  text-align: left;
}
.row-menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 6px;
  background: none; text-align: left; cursor: pointer; font: inherit; font-size: var(--ls-fs-md);
  color: var(--ls-text); white-space: nowrap;
}
.row-menu-item .rz-icon { flex: none; color: var(--ls-text-secondary); }
.row-menu-item:hover:not(:disabled) { background: var(--ls-surface-alt); color: var(--ls-primary); }
.row-menu-item:hover:not(:disabled) .rz-icon { color: var(--ls-primary); }
.row-menu-item.danger { color: var(--ls-danger-text); }
.row-menu-item.danger .rz-icon { color: var(--ls-danger-text); }
.row-menu-item.danger:hover:not(:disabled) { background: var(--ls-danger-bg); }
.row-menu-item:disabled { opacity: .5; cursor: default; }

/* Communication-log grid row anatomy (promoted at the second consumer: Site Central Summary tab +
   the Lift Workspace's lift-filtered logs tab). Notes are the row's click target: one line with an
   ellipsis so the grid scans as a list (Je, 7 Sep 2026 — a three-line clamp was tried and reverted
   the same day), download icon parked at the cell's right edge; full text lives in the title tooltip +
   the detail dialog. */
.log-date { white-space: nowrap; }
.log-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.log-link {
  flex: 1; min-width: 0; cursor: pointer; color: var(--ls-link);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.log-link:hover { text-decoration: underline; }
.log-dl { flex: none; display: inline-flex; cursor: pointer; color: var(--ls-link-muted); }
.log-dl:hover { color: var(--ls-link); }
.log-dl .rz-icon { font-size: var(--ls-icon); }
/* Ticketed downloads (Shared.UI DownloadIcon / DownloadLink): the control itself carries the
   click→browser hand-off — Preparing (ring spins on a navy tint), Done (green check), Failed (red
   mark) — same footprint in every phase, so nothing in the row shifts. .dl-link is the house text
   download link; it lives here because page-scoped CSS cannot reach inside the component. */
:where(button.dl-icon) { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: inherit; border-radius: var(--ls-radius-control); }
.dl-link { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; color: var(--ls-link); text-decoration: none; }
.dl-link:hover { text-decoration: underline; }
.dl-link .rz-icon { font-size: var(--ls-icon); }
.dl-spin, .dl-mark { display: inline-flex; line-height: 1; }
/* Outcome announced to screen readers; the phase otherwise only changes the aria-label. */
.dl-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dl-mark:not(.lead) { margin-left: 4px; }
.dl-icon[aria-busy="true"], .dl-link[aria-busy="true"] {
  cursor: progress; color: var(--ls-primary); background: var(--ls-primary-tint); text-decoration: none;
}
.dl-icon.dl-done, .dl-link.dl-done { color: var(--ls-success-text); background: var(--ls-success-bg); }
.dl-icon.dl-fail, .dl-link.dl-fail { color: var(--ls-danger-text); background: var(--ls-danger-bg); }
/* A hover mid-phase keeps the phase's colours; the navy hover fill waits for rest. */
.dl-icon[aria-busy="true"]:hover { color: var(--ls-primary); background: var(--ls-primary-tint); }
.dl-icon.dl-done:hover { color: var(--ls-success-text); background: var(--ls-success-bg); }
.dl-icon.dl-fail:hover { color: var(--ls-danger-text); background: var(--ls-danger-bg); }
/* Author (· lift) folded under the date. Always rendered by the grids; the query below is what
   shows it, so no width logic lives in C#. The card is the container it is measured against — the
   squeeze is the CARD's, not the window's: AppShell's expanded side nav plus the app rail, and the
   Lift Workspace's 320px right rail, take several hundred px off a 1366px laptop, so a viewport
   breakpoint would sit unfired exactly where the fold is needed. */
.log-grid { container-type: inline-size; }
.log-grid .log-meta { display: none; }

/* The fold: once the card itself is under 1050px the Author and Lift columns give their width to
   the note and read from the date's sub-line instead — one nowrap line, ellipsised, with the full
   text on the span's own title. Radzen renders a <colgroup> and lays the table out fixed, so a
   display:none cell would shift the row's remaining cells onto the wrong <col> widths — the columns
   are collapsed instead: their <col> goes to zero width (width being one of the few properties a
   <col> honours), and the cells give up their width, padding, border and contents. The project
   grids fold cols 3+4 (Author, Lift); the lift-scoped copy has no Lift column, so it folds col 3. */
@container (max-width: 1050px) {
  .log-grid .log-meta { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .log-grid:not(.log-grid-lift) .rz-grid-table col:nth-child(3),
  .log-grid:not(.log-grid-lift) .rz-grid-table col:nth-child(4),
  .log-grid.log-grid-lift .rz-grid-table col:nth-child(3) { width: 0 !important; }
  .log-grid .rz-grid-table th.log-fold,
  .log-grid .rz-grid-table td.log-fold {
    width: 0 !important; padding: 0 !important; border: 0 !important; overflow: hidden;
  }
  .log-grid .rz-grid-table th.log-fold > *,
  .log-grid .rz-grid-table td.log-fold > * { display: none; }
}

/* Phones: the grid rule above (line ~915) sizes the table to its CONTENT, so a nowrap note would
   set the table's width from its full length. The card still scrolls sideways here — the cap only
   keeps one long note from being what decides how far — and the folded sub-line wraps again here,
   so a long author name can't stretch the Date column the same way. */
@media (max-width: 900px) {
  .log-grid .log-cell { max-width: 60ch; }
  .log-grid .log-meta { white-space: normal; }
}

/* A grid tab's "back to the whole project" link (Communication logs, Follow-up actions) —
   promoted at the second consumer, same as .log-date above. */
.cl-all-link { font-size: var(--ls-fs-base); font-weight: 600; white-space: nowrap; align-self: center; }

/* Follow-up actions grid row anatomy — promoted at the second consumer: Site Central Summary tab +
   the Lift Workspace's lift-filtered follow-ups tab. Heading is the row's anchor; overdue reads in
   danger ink both in the state chip and the remind date. Assignee reuses the same avatar-cell
   shape the Clients grid uses. */
.fu-heading { font-weight: 600; }
.fu-remind-overdue { color: var(--ls-danger-text); font-weight: 600; }
.fu-overdue { background: var(--ls-danger-bg); color: var(--ls-danger-text); }
.fu-closed { opacity: 0.65; }
.client-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* Clients grid siblings — avatar+name cell, VIP dot, contract-role marks, remarks preview.
   Promoted from ProjectSummaryPage's own scope at the second consumer (the Service Hub
   Clients tab, ServiceClientsSubTab). */
.client-text { min-width: 0; }
.vip-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ls-warning-text); margin-left: 6px; vertical-align: middle;
}
.nowrap { white-space: nowrap; }
.sep { color: var(--ls-border-mid); margin: 0 2px; }
/* The Company cell is one row that stays inside its column. The name gives way ("…", full name on
   hover) so the Change pencil never overlaps the Email column (Nathan, 23 Oct 2026). */
.co-cell { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.co-cell .co-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-cell .vip-dot, .co-cell .cell-edit-link { flex: none; }
.co-cell .cell-edit-link:not(:first-child) { margin-left: 4px; }

/* Role marks — a flag that IS the control, as a round mark in a column of its own (Site Central's
   client roles + Verified, 8 Sep 2026): the flag is set by clicking its own disc, no popup between
   the eye and the write. The flag's NAME is in the column header, read once, so the cell carries no
   words at all — a row's set roles read as a pattern down the columns instead of as the same four
   labels repeated on every row. ON is the role's colour filled with a tick; OFF is the same disc
   hollow and quiet. (This supersedes the labelled toggle chips the same cells shipped as.) The disc
   is 18px, down from the 26px it first shipped at: six mark columns on one row (the four roles,
   Quote and Verified) read as a row of buttons at 26px and as a pattern at 18px (Je, 8 Sep 2026). */
.role-mark {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 18px; height: 18px; padding: 0; border-radius: 50%; vertical-align: middle;
  border: 1px solid var(--ls-border-mid); background: transparent;
  color: var(--ls-text-muted); font-family: inherit; line-height: 1;
}
button.role-mark { cursor: pointer; }
button.role-mark:not(.on):hover { border-color: var(--ls-text-muted); background: var(--ls-primary-tint); }
button.role-mark:focus-visible { outline: 2px solid var(--ls-primary); outline-offset: 1px; }
.role-mark.on          { border-color: transparent; }
.role-mark.on.main     { background: var(--ls-primary); color: #fff; }
.role-mark.on.install  { background: var(--ls-primary-tint-2); color: var(--ls-primary); }
.role-mark.on.service  { background: var(--ls-success-bg); color: var(--ls-success-text); }
.role-mark.on.billing  { background: var(--ls-warning-bg); color: var(--ls-warning-text); }
.role-mark.on.verified { background: var(--ls-success-bg); color: var(--ls-success-text); }
/* Quote gets its own violet pair rather than borrowing another mark's colour: Bill (warning), the
   lift marks (info) and Verified (success) all sit in the same row, and two identical discs would
   read as the same kind of thing. */
.role-mark.on.quote    { background: var(--ls-quote-bg); color: var(--ls-quote-text); }
/* A lift is a mark too (8 Sep 2026), so its disc carries the lift's number instead of a tick —
   the one mark in the family whose content varies per record. Same disc, same states; only the
   ON colour and the numeral type are its own. min-width rather than width: a suffix of one or two
   digits stays the family's 18px circle, and the rare id that has no project prefix to trim (so it
   reads in full) stretches the disc into a pill instead of spilling out of it — with an explicit
   9px radius rather than the family's 50%, which on a stretched box would draw an ellipse whose
   curved ends crowd the text instead of a stadium. Identical at 18x18. */
.role-mark.lift {
  width: auto; min-width: 18px; padding: 0 3px; border-radius: 9px;
  font-size: var(--ls-fs-xs); font-weight: 700; font-variant-numeric: tabular-nums;
}
.role-mark.on.lift { background: var(--ls-info-bg); color: var(--ls-link); }
/* In flight: dimmed and inert, with the spinner inside the disc rather than over the row. */
.role-mark.saving { opacity: .6; pointer-events: none; }
.role-mark .spin {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid currentColor; border-top-color: transparent;
  animation: ls-spin 700ms linear infinite;
}
/* Landed: one ring pulse that fades itself out — the write's receipt, without a toast. */
.role-mark.saved { animation: ls-mark-pulse 1.1s ease-out forwards; }
@keyframes ls-mark-pulse {
  0%   { box-shadow: 0 0 0 0 var(--ls-primary-tint-2); }
  55%  { box-shadow: 0 0 0 4px var(--ls-primary-tint-2); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
/* Failed: the ring the chip's border used to carry. The sentence goes under the row's Name cell —
   an 18px disc cannot hold one — as .role-err. */
.role-mark.failed { border-color: var(--ls-danger); box-shadow: 0 0 0 2px var(--ls-danger-bg); }
.role-err { display: block; font-size: var(--ls-fs-sm); color: var(--ls-danger-text); margin-top: 4px; }
/* The Lifts cell: the site's lifts as marks that WRAP inside a fixed-width column, rather than a
   row that grows with every lift a contact picks up. The column is what bounds them (108px), so
   this only has to lay them out. Same declarations as .role-chips, deliberately NOT that class: a
   cluster of marks is not a cluster of chips (they diverge the moment either grows a rule of its
   own), and this is the hook the un-clipping rule below needs — .role-chips also rides in detail
   grids that must keep Radzen's clipping. */
.lift-marks { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
/* A landed lift mark's .saved pulse and a rejected one's .failed ring draw OUTSIDE the mark's
   border box, and the marks on the cluster's first line sit against the cell's 4px top padding —
   Radzen's default data cell is overflow:hidden, so the ring would be clipped to an arc, or to
   nothing. The pulse is now the ONLY receipt a landed write gets (the tick went with the chips),
   so this is the receipt working at all, not polish. Same shape as the row-action rule above.
   .mark-col is NOT the fix: it also centres its cell, which would fight the left-aligned wrap. */
.rz-grid-table td:has(.lift-marks) { overflow: visible; }
.rz-grid-table td .rz-cell-data:has(.lift-marks) { overflow: visible; text-overflow: clip; }
/* A mark's column: the word is in the header, the disc is centred under it. Centring is Radzen's
   own `TextAlign="TextAlign.Center"` on the column, NOT text-align here — `.rz-column-title` is an
   inline-flex item, so text-align can't move it, and the Radzen class is also what drops the 8px
   leading inset the header label needs back — the abbreviated labels get the column's own width in
   full (each of the four sized to its own label, not a shared number — ClientMarkState.ColumnWidth,
   8 Sep 2026). This class only fixes the cell: `.rz-cell-data` is a block with overflow:hidden on a
   text line-height, which would clip the disc top and bottom and cut the .failed ring off. */
.rz-grid-table td.mark-col .rz-cell-data {
  display: flex; justify-content: center; overflow: visible; line-height: 1;
}
@media (prefers-reduced-motion: reduce) {
  .role-mark .spin { animation: none; }
  .role-mark.saved { animation: none; }
}

.remarks-empty { color: var(--ls-text-muted); font-style: italic; }
.remarks-warning { color: var(--ls-danger-text); font-weight: 600; }
.remarks-text { color: inherit; }
.row-archived { color: var(--ls-text-muted); }

/* Hero utility row: icon + label actions at top-bar weight — no button chrome, navy tint on
   hover; the headline stays the band's only strong element. Promoted at the second consumer
   (project summary + lift workspace). */
.util-row { display: flex; align-items: center; gap: 2px; }
.u-act {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
  border: 0; background: none; border-radius: 8px; cursor: pointer; text-decoration: none;
  color: var(--ls-text-secondary); font-family: var(--ls-font); font-size: var(--ls-fs-md); font-weight: 600;
}
.u-act:hover, .u-act:focus-visible { background: var(--ls-primary-tint); color: var(--ls-primary); text-decoration: none; }
.u-act .rz-icon { color: var(--ls-text-muted); }
.u-act:hover .rz-icon, .u-act:focus-visible .rz-icon { color: var(--ls-primary); }
.u-sep { width: 1px; height: 18px; background: var(--ls-border-light); margin: 0 6px; }
/* Narrow screens: labels drop, icons stay — the row never wraps under the headline. */
@media (max-width: 900px) { .u-lab { display: none; } }

/* A record's headline state as a pill beside the page title. */
.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--ls-primary-tint); color: var(--ls-primary);
  border: 1px solid var(--ls-primary-tint-2); border-radius: 16px;
  padding: 4px 14px; font-size: var(--ls-fs-base); font-weight: 600; white-space: nowrap;
}
/* Attention variant — an inactive/blocked record state (e.g. a deactivated employee). */
.status-pill.danger { background: var(--ls-danger-bg); color: var(--ls-danger-text); border-color: var(--ls-danger-bg); }
.status-pill.success { background: var(--ls-success-bg); color: var(--ls-success-text); border-color: var(--ls-success-bg); }
/* A record's headline state beside a DIALOG title (the Service Event editor's Open / Serviced) — the
   page-title pill, one size down so it sits in the hero's 16px title line. */
.dlg-hero .dlg-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dlg-hero .status-pill { padding: 2px 11px; font-size: var(--ls-fs-sm); }

/* Header actions menu — the "everything else" of a dialog behind ONE trigger in the hero (declutter
   rule: one primary action per surface). A trigger button, a fixed transparent backdrop that closes
   on any outside click without JS, and a small popover of plain-text items. First consumer: the
   Service Event edit dialog's email sends (3 Sep 2026). */
.dlg-menu { position: relative; flex: none; }
.dlg-menu-backdrop { position: fixed; inset: 0; z-index: 4; background: transparent; }
.dlg-menu-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; min-width: 190px;
  display: flex; flex-direction: column; padding: 4px; background: var(--ls-surface);
  border: 1px solid var(--ls-border); border-radius: var(--ls-radius-tile); box-shadow: var(--ls-shadow-card-hover); }
.dlg-menu-item { text-align: left; border: none; background: transparent; padding: 7px 10px; border-radius: 4px;
  font: inherit; font-size: var(--ls-fs-base); color: var(--ls-text); cursor: pointer; white-space: nowrap; }
.dlg-menu-item:hover, .dlg-menu-item:focus-visible { background: var(--ls-primary-tint); color: var(--ls-primary); outline: none; }
/* An item that NAVIGATES is an <a>, not a button (the Sales pages' Reports menu) — same plain-text
   item, without the anchor's hover underline. */
a.dlg-menu-item:hover, a.dlg-menu-item:focus-visible { text-decoration: none; }
.dlg-menu-group { font-size: var(--ls-fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ls-text-label); padding: 8px 10px 3px; }

/* Document rows — the record-detail contact row reused for a record's attached documents (slip, work
   order): a wider label column for the document names and an action cluster pinned right. */
.contact-rows.docs .cr-lab { width: 96px; }
.contact-rows.docs .cr-val { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.contact-row .cr-acts { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; flex: none; }

/* A photo inside the initials avatar circle (Employees directory/profile). */
.v3-avatar > img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* Envelope detail dialog (LiftShop Sign) — the chain-of-custody view. Promoted from the BackOffice
   dialog's scoped CSS when the Home Signing oversight modal became a second consumer (2+-page rule).
   Layout only — colours come from the tokens. */
.env-detail { display: flex; flex-direction: column; gap: 18px; }

.env-sec { display: flex; flex-direction: column; gap: 9px; }

.env-sec-label {
  font-size: var(--ls-fs-sm); font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ls-text-label);
}

/* Why a declined/voided envelope ended that way, said once and up front. */
.env-outcome {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 13px; border-radius: var(--ls-radius-tile);
  background: var(--ls-danger-bg); color: var(--ls-danger-text);
}

.env-outcome div { display: flex; flex-direction: column; gap: 2px; font-size: var(--ls-fs-md); }

.env-message {
  margin: 0; padding: 9px 12px; border-left: 2px solid var(--ls-border-mid);
  font-size: var(--ls-fs-md); color: var(--ls-text-secondary); white-space: pre-wrap;
}

/* Getting at the document itself. A completed envelope leads with the signed copy and keeps the
   original reachable under it; anything still in flight offers the one document there is. */
.env-doc-actions { display: flex; flex-direction: column; gap: 4px; }

.env-doc-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.env-doc-name { font-size: var(--ls-fs-md); font-weight: 600; color: var(--ls-text); }

.env-doc-row.secondary .env-doc-name { font-weight: 400; color: var(--ls-text-muted); }

/* The address sits under the name in the same row, so the row stays one target. */
.env-email { display: block; font-size: var(--ls-fs-base); color: var(--ls-text-muted); }

.env-provenance {
  font-size: var(--ls-fs-base); color: var(--ls-text-muted); padding: 0 0 2px 46px; margin-top: -4px;
}

/* The chain of custody. Ordered on purpose: the sequence is the information, so the rail and the
   dots encode real progression rather than decorating a list. */
.env-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; }

.env-timeline li { position: relative; padding: 0 0 14px 16px; border-left: 2px solid var(--ls-border); }

.env-timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }

.env-timeline li::before {
  content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--ls-primary);
  box-shadow: 0 0 0 3px var(--ls-surface);
}

.env-timeline li.setback::before { background: var(--ls-danger); }
/* Good-news milestones (agreements, signed, completed) read green at a glance. */
.env-timeline li.milestone::before { background: var(--ls-success); }

/* What happened, then when, on a label track (CTO, 26 Oct 2026: no stamp pinned across the dialog):
   the stamps start on one line under each other, the same 120-150px track as .v3-dl above them. */
.env-ev { display: grid; grid-template-columns: minmax(120px, 150px) minmax(0, 1fr); column-gap: 12px; align-items: baseline; }

.env-ev-what { font-size: var(--ls-fs-md); color: var(--ls-text); }

.env-ev-when {
  flex: none; font-size: var(--ls-fs-base); color: var(--ls-text-muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.env-ev-who { font-size: var(--ls-fs-base); color: var(--ls-text-muted); margin-top: 1px; }

@media (max-width: 560px) {
  .env-ev { grid-template-columns: minmax(0, 1fr); row-gap: 1px; }
  .env-provenance { padding-left: 0; }
}

/* Credential / confirmation reveal panels inside Signing dialogs (register-app one-time secrets,
   test-send success). Promoted from SignAppEditorDialog's scoped CSS when TestSendDialog became a
   second consumer (2+-page rule). Layout only — colours are V3 tokens. */
.reveal { display: flex; flex-direction: column; gap: 14px; }

.reveal-lead { display: flex; align-items: flex-start; gap: 10px; font-size: var(--ls-fs-md); line-height: 1.45;
  color: var(--ls-text); padding: 11px 12px; border-radius: 10px;
  background: var(--ls-primary-tint); border: 1px solid var(--ls-primary-tint-2); }
.reveal-lead .rz-icon { color: var(--ls-primary); flex: none; margin-top: 1px; }

.reveal-cred { display: flex; flex-direction: column; gap: 5px; }
.reveal-cred > label { font-size: var(--ls-fs-base); font-weight: 600; color: var(--ls-text); }
.reveal-cred .reveal-use { font-weight: 400; color: var(--ls-text-muted); }
.reveal-cred > code { display: block; font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: var(--ls-fs-base); color: var(--ls-text); background: var(--ls-surface-alt);
  border: 1px solid var(--ls-border); border-radius: 8px; padding: 9px 11px;
  word-break: break-all; user-select: all; }

/* Boot overlay host: fixed over the app root. Blazor boots and renders beneath it; the shell
   calls lsBoot.done() once genuinely ready (auth resolved, menu rendered) and the overlay
   fades away — the loading frame is one uninterrupted timeline, then a single reveal. */
#ls-boot { position: fixed; inset: 0; z-index: 5000; background: var(--ls-canvas); opacity: 1; transition: opacity 0.25s ease; }

/* ---- Boot / transition frame ------------------------------------------------------------ */
/* One set of classes shared by (a) the static boot shell each app's index.html paints before
   the WASM runtime loads (this stylesheet is a plain <link>, so it applies pre-boot) and
   (b) the BootFrame component shown during auth transitions — the frame never visibly changes
   from first paint to signed-in app. */
.boot-shell { height: 100vh; display: flex; flex-direction: column; font-family: var(--ls-font); }
.boot-top { height: 52px; flex: none; background: var(--ls-surface); border-bottom: 1px solid var(--ls-border);
  display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.boot-top img { height: 30px; }
.boot-appname { font-size: var(--ls-fs-lg); font-weight: 600; color: var(--ls-primary);
  border-left: 1px solid var(--ls-border-mid); padding-left: 10px; }
/* Static twins of the top bar's right side (search, bell, account, assistant), so the whole
   bar is present during loading and nothing pops in at reveal. */
/* .boot-search / .boot-search-btn mirror .top-bar-search's input + Search button exactly (size,
   aliceblue fill, inline magnifier, navy button) — a refresh paints this skeleton first, so any
   drift here shows as the bar visibly changing shape at reveal. */
.boot-search { position: relative; height: 36px; width: 420px; max-width: 40vw; margin-left: 16px; padding: 0 12px 0 36px;
  border: 1px solid var(--ls-border-mid); border-radius: var(--ls-radius-control);
  background: var(--ls-search-fill); color: var(--ls-text-muted); font-size: var(--ls-fs-md);
  display: flex; align-items: center; white-space: nowrap; overflow: hidden; }
.boot-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ls-primary); }
.boot-search-btn { height: 36px; padding: 0 16px; margin-left: 6px; display: inline-flex; align-items: center;
  background: var(--ls-primary); color: #fff; border-radius: var(--ls-radius-control);
  font-size: var(--ls-fs-md); font-weight: 600; box-shadow: var(--ls-shadow-1); }
@media (max-width: 700px) {
  .boot-search { width: 120px; }
  .boot-search-btn { padding: 0 9px; font-size: 0; }
}
.boot-spacer { flex: 1; }
.boot-topic { color: var(--ls-text-secondary); display: grid; place-items: center; padding: 6px; }
.boot-account { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px;
  color: var(--ls-text-secondary); font-size: var(--ls-fs-md); }
.boot-account svg, .boot-topic svg { display: block; }
.boot-body { flex: 1; display: flex; min-height: 0; }
/* Sizes mirror AppShell.razor.css's own .app-rail/.app-tile/.app-glyph exactly (30 Aug 2026 fix) —
   this boot-time skeleton is what's on screen the moment a full navigation lands on a DIFFERENT app
   (Home/Back Office/Calendar switch is a real page load, not client-side routing), rendered from
   plain index.html markup before Blazor WASM has even started. Left at the pre-compaction sizes
   after the real rail was shrunk, the skeleton showed at the OLD larger dimensions and then visibly
   snapped down to the new compact size the instant AppShell.razor took over — "becomes bigger again,
   then goes back to compact" (Je, 30 Aug 2026). Every app's index.html carries an identical copy of
   this markup, so this one shared rule fixes all of them. */
.boot-rail { width: 64px; flex: none; background: linear-gradient(180deg, var(--ls-nav-top), var(--ls-nav-bot));
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 0; }
.boot-tile { width: 54px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0; color: var(--ls-nav-ink-dim); }
.boot-tile .g { width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08); display: grid; place-items: center; color: var(--ls-nav-ink); }
.boot-tile.active { color: #fff; }
.boot-tile.active .g { background: linear-gradient(135deg, var(--ls-sky), var(--ls-steel));
  border-color: rgba(255,255,255,.22); color: #fff; }
/* Overrides the inline width="20" height="20" on each tile's <svg> — same trick AppShell.razor.css
   uses for the real rail's own glyphs, needed here for the identical reason. */
.boot-tile .g svg { display: block; width: 16px; height: 16px; }
.boot-tile b { font-size: var(--ls-fs-xs); font-weight: 600; }
.boot-rail-foot { margin-top: auto; padding-top: 10px; }
.boot-side { width: 216px; flex: none; background: var(--ls-nav-bg); border-right: 1px solid rgba(0, 0, 0, .15);
  padding: 18px 12px; }
.boot-sk { border-radius: 8px; background: linear-gradient(90deg, var(--ls-surface-alt) 25%, var(--ls-panel) 40%, var(--ls-surface-alt) 60%);
  background-size: 300% 100%; animation: boot-shimmer 1.3s ease-in-out infinite; }
/* Skeleton rows on the navy side nav shimmer in white-alpha, not the light surface tints. */
.boot-side .boot-sk { background-image: linear-gradient(90deg, rgba(255,255,255,.08) 25%, rgba(255,255,255,.16) 40%, rgba(255,255,255,.08) 60%); }
.boot-sk-head { height: 9px; width: 64px; margin: 4px 10px 10px; border-radius: 5px; }
.boot-sk-row { height: 32px; margin-bottom: 7px; }
.boot-canvas { flex: 1; background: var(--ls-canvas); display: grid; place-items: center; }
.boot-load { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.boot-load-label { font-size: var(--ls-fs-md); color: var(--ls-text-muted); }
.boot-bar { width: 220px; height: 6px; border-radius: 3px; background: var(--ls-panel); overflow: hidden; }
.boot-bar i { display: block; height: 100%; border-radius: 3px; width: var(--blazor-load-percentage, 0%);
  background: linear-gradient(90deg, var(--ls-sky), var(--ls-primary)); transition: width 0.4s ease; }
/* Indeterminate bar: glides edge to edge and back — alternate keeps the loop seamless,
   with no snap back to the start between cycles. */
.boot-bar.indet i { width: 40%; animation: boot-slide 0.9s ease-in-out infinite alternate; }
@keyframes boot-slide { 0% { margin-left: 0%; } 100% { margin-left: 60%; } }
@keyframes boot-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .boot-sk, .boot-bar.indet i { animation: none; } }
/* Field-staff boot frame — applied by lsBoot.fill() when the cached shell kind is 'field'
   (lsBoot.rememberShell). Redraws the skeleton as the field chrome: white brand header over a
   navy menu bar, no office rail / side nav / search — a field tech never stares at office
   chrome while the app boots. */
#ls-boot.boot-field .boot-rail,
#ls-boot.boot-field .boot-side,
#ls-boot.boot-field .boot-search,
#ls-boot.boot-field .boot-search-btn { display: none; }
#ls-boot.boot-field .boot-body { flex-direction: column; }
#ls-boot.boot-field .boot-body::before { content: ""; flex: none; height: 42px;
  background: linear-gradient(180deg, var(--ls-nav-top), var(--ls-nav-bot)); }
/* Office boot frame without the app rail — applied by lsBoot.fill() when the last office shell
   hid the rail (lsBoot.rememberRail: platform rule off, or nothing to switch to). The skeleton
   must match what the live shell will draw, or the rail pops in and vanishes at reveal. */
#ls-boot.boot-no-rail .boot-rail { display: none; }
/* Collapsed side-nav skeleton — applied by lsBoot.fill() unless the last office shell had the
   menu open (lsBoot.rememberNav). Mirrors .side-nav.collapsed in AppShell.razor.css (52px, icon
   strip): the skeleton must match what the live shell will draw, or the menu reads as open and
   then snapping shut at reveal. */
#ls-boot.boot-nav-collapsed .boot-side { width: 52px; padding: 14px 6px; }
#ls-boot.boot-nav-collapsed .boot-sk-head { display: none; }
#ls-boot.boot-nav-collapsed .boot-sk-row { width: 40px; height: 32px; margin: 0 auto 7px; }

/* ---- Route progress bar (Components/RouteProgressBar.razor) ----------------------------- */
/* Same gradient + slide technique as .boot-bar, reshaped as a full-width pinned strip instead
   of a centered pill — the two visuals are deliberately similar but not the same markup, since
   .boot-bar's fixed 220px width doesn't read as a top-of-viewport indicator. */
.route-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 2100;
  overflow: hidden; }
.route-bar i { display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, var(--ls-sky), var(--ls-primary));
  animation: boot-slide 0.9s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .route-bar i { animation: none; width: 100%; } }

/* ---- Busy overlay (Components/BusyOverlay.razor) ----------------------------------------- */
/* The inner bar + label reuse .boot-load/.boot-bar/.boot-load-label as-is (same block above) —
   this is only the full-viewport blocking backdrop wrapper around them. */
.busy-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0, 0, 0, .35);
  display: grid; place-items: center; }

/* Page transition: the shell content column's direct children are the page roots — they are
   replaced on every navigation and when sign-in resolves, and only then. A short delay holds
   the fresh page invisible while its first full render composes, then everything fades in
   together as one unit — no movement, no element-by-element appearance. Plain re-renders keep
   their DOM and never replay it. */
/* translateZ(0) keeps these regions on their own compositor layer permanently. Without it,
   Chrome on Windows switches text antialiasing when the opacity animation starts and ends,
   which reads as the text/icons growing slightly bolder then snapping back thinner.
   .ls-overlay-host is exempt: a non-none transform makes an element the CONTAINING BLOCK for
   position:fixed descendants, so a modal overlay rendered inside a transformed page root centres
   on the PAGE (scroll down to find it) instead of the viewport. Pages render their fixed
   overlays inside a sibling .ls-overlay-host root, which gets neither the transform nor the
   entrance fade (a modal must not fade in with the page).
   The exemption is wrapped in :where() to keep this selector at the bare-:not() specificity of
   (0,2,0): page roots that hide themselves with their own transform (WidgetDrawer's scoped
   translateX(100%)) tie with this rule and win only through stylesheet order — the scoped-CSS
   bundle loads after shared.css. A bare :not(.class) lifts this rule to (0,3,0) and overrides
   them, parking the "closed" widget drawer fully visible at the screen edge (2 Sep 2026). */
.shell .content > :where(:not(.ls-overlay-host)) { animation: ls-page-in 0.3s ease 0.06s both; transform: translateZ(0); }
/* The module menu reveals the same way: held as a skeleton until auth resolves (see AppShell),
   then the whole list fades in as one unit. */
.side-nav .nav-ready { display: flex; flex-direction: column; gap: 3px; animation: ls-page-in 0.3s ease 0.06s both; transform: translateZ(0); }

/* Icon-font guard: until Material Symbols loads, an rz-icon's ligature text ("dashboard",
   "event", …) renders in a wider fallback font, so menus visibly grow then shrink when the
   font lands. Pin the box to the glyph's final 1em square and keep it invisible until the
   boot script marks the font live (html.ls-icons-ready, with a timeout fallback). */
.rz-icon { width: 1em; height: 1em; overflow: hidden; visibility: hidden; }
html.ls-icons-ready .rz-icon { visibility: visible; }
@keyframes ls-page-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .shell .content > *, .side-nav .nav-ready { animation: none; } }

/* ============================================================================
   TRANSFER LIST (Shared.UI/Components/V3TransferList) — the house dual-pane
   picker: an Available pane, a Selected pane, the Add/Remove actions between
   them. For choosing a SET where position carries no meaning.
   ========================================================================= */
.v3-transfer { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; }

.v3-tl-pane { display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border: 1px solid var(--ls-border); border-radius: var(--ls-radius-tile); background: var(--ls-field); }

.v3-tl-head { display: flex; align-items: baseline; gap: 6px; padding: 7px 10px;
  background: var(--ls-surface-alt, rgba(1, 45, 80, 0.05));
  border-bottom: 1px solid var(--ls-border-light); font-size: var(--ls-fs-sm); font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--ls-text-muted);
  border-radius: calc(var(--ls-radius-tile) - 1px) calc(var(--ls-radius-tile) - 1px) 0 0; }
.v3-tl-count { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ls-text-label); }

.v3-tl-list { display: flex; flex-direction: column; gap: 1px; padding: 4px;
  min-height: 220px; max-height: 420px; overflow-y: auto; }

.v3-tl-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  font: inherit; font-size: var(--ls-fs-md); color: var(--ls-text); background: transparent;
  border: 1px solid transparent; border-radius: var(--ls-radius-control);
  padding: 5px 8px; cursor: pointer; }
.v3-tl-item:hover:not(:disabled) { background: var(--ls-surface-alt); }
.v3-tl-item[aria-selected="true"] { background: var(--ls-primary-tint);
  border-color: var(--ls-primary-tint-2); color: var(--ls-primary); font-weight: 600; }
.v3-tl-item:focus-visible { outline: 2px solid var(--ls-primary); outline-offset: -2px; }
.v3-tl-item:disabled { cursor: default; opacity: .55; }
.v3-tl-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.v3-tl-empty { padding: 14px 10px; font-size: var(--ls-fs-base); color: var(--ls-text-muted); text-align: center; }

.v3-tl-actions { display: flex; flex-direction: column; gap: 6px; justify-content: center; }

/* A filter box above a V3TransferList's Available pane — the compact size (matching
   .v3-fl-search) rather than .dlg-search's default lead-search sizing, since it sits over a
   pane of small list rows, not as a dialog's own lead search. */
.v3-tl-search { border-radius: var(--ls-radius-tile); padding: 0 10px; }
.v3-tl-search input { padding: 6px 0; font-size: var(--ls-fs-md); }

/* Narrow: the panes stack, so the actions become a row between them. */
@media (max-width: 700px) {
  .v3-transfer { grid-template-columns: 1fr; }
  .v3-tl-actions { flex-direction: row; justify-content: center; }
}

/* ============================================================================
   FLAG LIST (Shared.UI/Components/V3FlagList) — the house single-pane flag
   picker: a chip tray of what's flagged, search + All/Flagged scope, and one
   list where a click toggles the row. For marking a SUBSET of a catalogue
   where nothing transfers; V3TransferList remains the two-set picker.
   ========================================================================= */
.v3-fl-tray-label { font-size: var(--ls-fs-sm); font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ls-text-muted); }
.v3-fl-count { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ls-text-label); }

.v3-fl-tray { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.v3-fl-tray-empty { margin: 8px 0 12px; font-size: var(--ls-fs-base); color: var(--ls-text-muted); }
.v3-fl-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  padding: 3px 5px 3px 11px; border-radius: var(--ls-radius-badge);
  background: var(--ls-primary-tint); border: 1px solid var(--ls-primary-tint-2);
  color: var(--ls-primary); font-size: var(--ls-fs-base); font-weight: 600; }
.v3-fl-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3-fl-chip-x { border: 0; background: none; cursor: pointer; color: var(--ls-primary);
  opacity: .65; font: inherit; font-size: var(--ls-fs-md); line-height: 1; padding: 2px 5px;
  border-radius: var(--ls-radius-badge); }
.v3-fl-chip-x:hover:not(:disabled) { opacity: 1;
  background: color-mix(in srgb, var(--ls-primary) 12%, transparent); }
.v3-fl-chip-x:disabled { cursor: default; opacity: .35; }

.v3-fl-controls { display: flex; gap: 8px; align-items: stretch; }
.v3-fl-search { flex: 1; min-width: 0; border-radius: var(--ls-radius-tile); padding: 0 10px; }
/* Legacy CRM parity, 18 Sep 2026: matches .v3-input's compacted 12px field text — this list
   predates that pass and was left on the old 13px scale, reading oversized next to it. */
.v3-fl-search input { padding: 4px 0; font-size: var(--ls-fs-base); }
.v3-fl-scope { display: inline-flex; flex: none; border: 1px solid var(--ls-border-mid);
  border-radius: var(--ls-radius-tile); overflow: hidden; }
.v3-fl-scope button { font: inherit; font-size: var(--ls-fs-base); padding: 6px 12px; border: 0;
  background: var(--ls-surface); color: var(--ls-text-secondary); cursor: pointer;
  white-space: nowrap; }
.v3-fl-scope button + button { border-left: 1px solid var(--ls-border-mid); }
.v3-fl-scope button.on { background: var(--ls-primary); color: #fff; font-weight: 600; }
.v3-fl-scope button:focus-visible { outline: 2px solid var(--ls-primary); outline-offset: -2px; }
.v3-fl-scope button:disabled { cursor: default; opacity: .55; }
.v3-fl-scope-n { opacity: .7; }

.v3-fl-list { display: flex; flex-direction: column; gap: 1px; padding: 4px; margin-top: 8px;
  border: 1px solid var(--ls-border); border-radius: var(--ls-radius-tile);
  background: var(--ls-surface); min-height: 150px; max-height: 300px; overflow-y: auto; }
.v3-fl-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  font: inherit; font-size: var(--ls-fs-base); color: var(--ls-text); background: transparent;
  border: 1px solid transparent; border-radius: var(--ls-radius-control);
  padding: 5px 8px; cursor: pointer; }
.v3-fl-item:hover:not(:disabled) { background: var(--ls-surface-alt); }
.v3-fl-item:focus-visible { outline: 2px solid var(--ls-primary); outline-offset: -2px; }
.v3-fl-item:disabled { cursor: default; opacity: .55; }
/* Legacy CRM parity, 18 Sep 2026: sized and radiused like .v3-check's own box (13px, flat 3px) —
   var(--ls-radius-control) is 8px, meant for a card/row-sized surface; on a 15px box it rounded
   past 50% into a full circle, reading as a radio button next to every other checkbox. */
.v3-fl-box { flex: none; width: 13px; height: 13px; border: 1.5px solid var(--ls-border-mid);
  border-radius: 3px; background: var(--ls-surface);
  display: grid; place-items: center; }
.v3-fl-item.on .v3-fl-box { background: var(--ls-primary); border-color: var(--ls-primary); }
.v3-fl-box svg { width: 8px; height: 8px; color: #fff; }
.v3-fl-item.on .v3-fl-text { font-weight: 600; color: var(--ls-primary); }
.v3-fl-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3-fl-text mark { background: none; color: inherit; font-weight: 700; }

.v3-fl-empty { margin-top: 8px; padding: 20px 10px; font-size: var(--ls-fs-base); color: var(--ls-text-muted);
  text-align: center; border: 1px solid var(--ls-border); border-radius: var(--ls-radius-tile); }
.v3-fl-foot { margin-top: 5px; font-size: var(--ls-fs-sm); color: var(--ls-text-muted); }

@media (max-width: 700px) {
  .v3-fl-controls { flex-direction: column; }
  .v3-fl-scope button { flex: 1; text-align: center; }
}

/* =========================================================================
   CHAT THREAD
   ========================================================================= */

/* Day heading and the "where I stopped reading" divider — both a centred label on a hairline. */
.chat-day, .chat-new {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 0 2px;
  font-size: var(--ls-fs-sm); font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ls-text-label);
}
.chat-day::before, .chat-day::after, .chat-new::before, .chat-new::after {
  content: ""; flex: 1; height: 1px; background: var(--ls-border-light);
}
.chat-new { color: var(--ls-danger); }
.chat-new::before, .chat-new::after { background: var(--ls-danger); opacity: .35; }

/* Message bubble */
.chat-bubble { display: flex; align-items: flex-end; gap: 8px; margin: 2px 0; }
.chat-bubble.own { justify-content: flex-end; }
.chat-bubble.other { justify-content: flex-start; }
/* Sender initials beside a received message — the small twin of the grid avatar. */
.bubble-avatar { width: 26px; height: 26px; font-size: var(--ls-fs-xs); }

.bubble-body {
  max-width: 70%;
  padding: 8px 12px;
  border-radius: var(--ls-radius-card);
  font-size: var(--ls-fs-md);
  line-height: 1.4;
}

.chat-bubble.own .bubble-body {
  background: var(--ls-primary);
  color: #fff;
}

.chat-bubble.other .bubble-body {
  background: var(--ls-surface-alt);
  color: var(--ls-text);
  border: 1px solid var(--ls-border);
}

/* Pending: slightly dimmed */
.chat-bubble.pending .bubble-body { opacity: .7; }
/* Failed: danger tint */
.chat-bubble.failed .bubble-body { background: var(--ls-danger-bg); border: 1px solid var(--ls-danger-text); color: var(--ls-danger-text); }

/* Group threads: who said it, printed atop the received bubble. */
.bubble-sender { display: block; font-size: var(--ls-fs-sm); font-weight: 700; color: var(--ls-steel); margin-bottom: 2px; }

/* ---- chat identity hues ----
   Each user wears a stable colour (ChatDisplay.HueIndex → .hue-0…5) on their badge, and on
   received bubbles the same hue tints the bubble + sender name. Palette = existing theme accent
   tokens, so every theme re-colours it for free; keep the count in step with ChatDisplay.HueCount. */
.bubble-avatar.hue-0 { background: color-mix(in srgb, var(--ls-steel) 18%, var(--ls-surface)); color: var(--ls-steel); }
.bubble-avatar.hue-1 { background: color-mix(in srgb, var(--ls-sky) 18%, var(--ls-surface)); color: var(--ls-sky); }
.bubble-avatar.hue-2 { background: color-mix(in srgb, var(--ls-vip) 18%, var(--ls-surface)); color: var(--ls-vip); }
.bubble-avatar.hue-3 { background: color-mix(in srgb, var(--ls-success-text) 18%, var(--ls-surface)); color: var(--ls-success-text); }
.bubble-avatar.hue-4 { background: color-mix(in srgb, var(--ls-warning-text) 18%, var(--ls-surface)); color: var(--ls-warning-text); }
.bubble-avatar.hue-5 { background: color-mix(in srgb, var(--ls-danger-text) 18%, var(--ls-surface)); color: var(--ls-danger-text); }

.chat-bubble.other .bubble-body.hue-0 { background: color-mix(in srgb, var(--ls-steel) 9%, var(--ls-surface)); border-color: color-mix(in srgb, var(--ls-steel) 30%, transparent); }
.chat-bubble.other .bubble-body.hue-1 { background: color-mix(in srgb, var(--ls-sky) 9%, var(--ls-surface)); border-color: color-mix(in srgb, var(--ls-sky) 30%, transparent); }
.chat-bubble.other .bubble-body.hue-2 { background: color-mix(in srgb, var(--ls-vip) 9%, var(--ls-surface)); border-color: color-mix(in srgb, var(--ls-vip) 30%, transparent); }
.chat-bubble.other .bubble-body.hue-3 { background: color-mix(in srgb, var(--ls-success-text) 9%, var(--ls-surface)); border-color: color-mix(in srgb, var(--ls-success-text) 30%, transparent); }
.chat-bubble.other .bubble-body.hue-4 { background: color-mix(in srgb, var(--ls-warning-text) 9%, var(--ls-surface)); border-color: color-mix(in srgb, var(--ls-warning-text) 30%, transparent); }
.chat-bubble.other .bubble-body.hue-5 { background: color-mix(in srgb, var(--ls-danger-text) 9%, var(--ls-surface)); border-color: color-mix(in srgb, var(--ls-danger-text) 30%, transparent); }

.bubble-sender.hue-0 { color: var(--ls-steel); }
.bubble-sender.hue-1 { color: var(--ls-sky); }
.bubble-sender.hue-2 { color: var(--ls-vip); }
.bubble-sender.hue-3 { color: var(--ls-success-text); }
.bubble-sender.hue-4 { color: var(--ls-warning-text); }
.bubble-sender.hue-5 { color: var(--ls-danger-text); }

.bubble-text { display: block; white-space: pre-wrap; word-break: break-word; }

.bubble-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--ls-fs-xs);
  margin-top: 4px;
  opacity: .65;
}

.bubble-status.sending { letter-spacing: 2px; }

/* Composer */
.chat-composer {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--ls-border);
}

.composer-input { flex: 1; resize: none; }
.composer-send { align-self: flex-end; }

/* =========================================================================
   CHAT WORKSPACE (Shared.UI ChatWorkspacePanel — hosted by Home's /chat page
   and by the Back Office / Calendar modal, so the whole look lives here)
   ========================================================================= */

.cw-card { display: flex; padding: 0; overflow: hidden; height: 100%; }

/* ---- list pane ---- */
.cw-list { width: 320px; flex: none; border-right: 1px solid var(--ls-border);
  display: flex; flex-direction: column; min-height: 0; }
.cw-list-top { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; flex: none; }
.cw-search { flex: 1; display: flex; align-items: center; gap: 6px; border: 1px solid var(--ls-border-mid);
  border-radius: var(--ls-radius-control); background: var(--ls-field); padding: 0 8px; min-width: 0; }
.cw-search .rz-icon { font-size: var(--ls-icon); color: var(--ls-text-muted); }
.cw-search input { border: none; outline: none; background: transparent; flex: 1; min-width: 0;
  font: inherit; font-size: var(--ls-fs-md); color: var(--ls-text); padding: 7px 0; }
.cw-search input::placeholder { color: var(--ls-text-muted); }
.cw-search:focus-within { border-color: var(--ls-primary); box-shadow: 0 0 0 3px var(--ls-primary-tint); }
.cw-new-btn { flex: none; width: 32px; height: 32px; border: none; border-radius: var(--ls-radius-control);
  background: var(--ls-primary); color: #fff; cursor: pointer; display: grid; place-items: center; }
.cw-new-btn:hover { background: var(--ls-primary-hover); }
.cw-rows { flex: 1; overflow-y: auto; padding: 2px 8px; display: flex; flex-direction: column; gap: 2px; }
.cw-row { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.cw-row:hover { background: var(--ls-surface-alt); }
.cw-row.selected { background: var(--ls-primary-tint); box-shadow: inset 3px 0 0 var(--ls-primary); }
.cw-avatar { width: 38px; height: 38px; font-size: var(--ls-fs-md); }
.cw-avatar .rz-icon { font-size: var(--ls-icon-lg); }
.cw-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cw-name { font-size: var(--ls-fs-md); font-weight: 600; color: var(--ls-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-row.unread .cw-name { font-weight: 700; }
.cw-snippet { font-size: var(--ls-fs-base); color: var(--ls-text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-row.unread .cw-snippet { color: var(--ls-text-secondary); font-weight: 600; }
.cw-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.cw-when { font-size: var(--ls-fs-sm); color: var(--ls-text-label); white-space: nowrap; }
.cw-row.unread .cw-when { color: var(--ls-primary); font-weight: 700; }
.cw-unread { background: var(--ls-primary); color: #fff; min-width: 20px; text-align: center; }
.cw-list-empty { padding: 28px 14px; }
.cw-notify { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-top: 1px solid var(--ls-border-light); color: var(--ls-text-secondary); cursor: pointer; }
.cw-notify .rz-icon { font-size: var(--ls-icon); }
.cw-notify-label { flex: 1; font-size: var(--ls-fs-base); }
.cw-notify-hint { padding: 0 14px 10px; }

/* ---- main pane ---- */
.cw-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.cw-idle { flex: 1; justify-content: center; }
.cw-thread-head, .cw-compose-head { flex: none; display: flex; align-items: center; gap: 12px;
  padding: 11px 18px; border-bottom: 1px solid var(--ls-border); }
.cw-back { display: none; border: none; background: none; color: var(--ls-text-secondary);
  cursor: pointer; padding: 4px; border-radius: var(--ls-radius-control); }
.cw-back:hover { background: var(--ls-surface-alt); color: var(--ls-primary); }
.cw-thread-names { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cw-thread-title { font-size: var(--ls-fs-lg); font-weight: 700; color: var(--ls-text); }
.cw-participants { font-size: var(--ls-fs-base); color: var(--ls-text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-main .chat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 18px;
  display: flex; flex-direction: column; gap: 3px; }
.cw-thread-empty { flex: 1; justify-content: center; }
.cw-main .chat-composer { flex: none; padding: 10px 18px 14px; margin: 0; }

/* ---- compose pane ---- */
.cw-compose { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cw-to-row, .cw-group-row { flex: none; display: flex; align-items: center; flex-wrap: wrap;
  gap: 7px; padding: 12px 18px; border-bottom: 1px solid var(--ls-border-light); }
.cw-field-label { font-size: var(--ls-fs-sm); font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ls-text-label); }
.cw-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 11px;
  border-radius: var(--ls-radius-badge); background: var(--ls-primary-tint); color: var(--ls-primary);
  font-size: var(--ls-fs-base); font-weight: 600; }
.cw-chip button { display: inline-flex; border: none; background: none; padding: 0; cursor: pointer;
  color: var(--ls-primary); opacity: .7; }
.cw-chip button:hover { opacity: 1; }
.cw-chip .rz-icon { font-size: var(--ls-fs-lg); }
.cw-to-input { flex: 1; min-width: 160px; border: none; outline: none; background: transparent;
  font: inherit; font-size: var(--ls-fs-md); color: var(--ls-text); padding: 4px 0; }
.cw-to-input::placeholder { color: var(--ls-text-muted); }
.cw-group-name { flex: 1; max-width: 360px; }
.cw-results { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 14px; }
.cw-people { max-height: none; }
.cw-picked-tick { width: 22px; height: 22px; border-radius: 50%; background: var(--ls-primary);
  color: #fff; display: grid; place-items: center; flex: none; }
.cw-picked-tick .rz-icon { font-size: var(--ls-fs-lg); }
.cw-first-message { flex: none; padding: 10px 18px 14px; border-top: 1px solid var(--ls-border);
  display: flex; flex-direction: column; gap: 6px; }
.cw-first-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---- modal hosting (ChatWorkspaceDialog) ---- */
.chat-ws-dialog-body { height: min(72vh, 700px); display: flex; flex-direction: column;
  min-height: 0; flex: 1 1 auto; }
.chat-ws-dialog-body .cw-card { border: none; border-radius: 0; box-shadow: none; flex: 1; min-height: 0; }

/* ---- narrow: one pane at a time ---- */
@media (max-width: 900px) {
  .cw-card.has-selection .cw-list { display: none; }
  .cw-card:not(.has-selection) .cw-main { display: none; }
  .cw-card:not(.has-selection) .cw-list { width: 100%; border-right: none; }
  .cw-back { display: grid; }
}

/* ============================================================================
   CHAT — groups, attachments, message actions
   ========================================================================= */

/* Selected-people tray on the new-group page */
.group-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; padding: 0; list-style: none; }
.group-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 6px 3px 11px; border-radius: var(--ls-radius-badge);
  background: var(--ls-primary-tint); border: 1px solid var(--ls-primary-tint-2);
  color: var(--ls-primary); font-size: var(--ls-fs-base); font-weight: 600;
}
.group-chip-x {
  border: 0; background: none; cursor: pointer; color: var(--ls-primary);
  opacity: .65; font: inherit; font-size: var(--ls-fs-lg); line-height: 1; padding: 2px 4px;
  border-radius: var(--ls-radius-badge);
}
.group-chip-x:hover { opacity: 1; background: var(--ls-surface-active); }

/* Group details */
.group-meta { display: flex; gap: 16px; font-size: var(--ls-fs-sm); color: var(--ls-text-muted); margin-bottom: 12px; }
.group-role { font-weight: 600; color: var(--ls-text-secondary); }
.group-rename { display: flex; gap: 8px; align-items: center; }
.group-members { list-style: none; padding: 0; margin: 0; }
.group-member {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--ls-border);
}
.group-member:last-child { border-bottom: 0; }
.group-member-name { flex: 1 1 auto; min-width: 0; font-size: var(--ls-fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-owner-badge {
  font-size: var(--ls-fs-sm); font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ls-primary); background: var(--ls-primary-tint);
  padding: 2px 7px; border-radius: var(--ls-radius-badge);
}

/* Composer attachment tray */
.composer-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; }
.composer-attachment {
  display: inline-flex; align-items: center; gap: 6px; max-width: 240px;
  padding: 4px 6px 4px 9px; border-radius: var(--ls-radius-control);
  background: var(--ls-surface-alt); border: 1px solid var(--ls-border);
  font-size: var(--ls-fs-base); color: var(--ls-text-secondary);
}
.composer-attachment-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-attachment-x {
  border: 0; background: none; cursor: pointer; color: var(--ls-text-muted);
  font: inherit; font-size: var(--ls-fs-lg); line-height: 1; padding: 0 3px;
}
.composer-attachment-x:hover { color: var(--ls-danger-text); }
.composer-file { font-size: var(--ls-fs-base); max-width: 190px; }

/* Attachments inside a bubble */
.bubble-attachments { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.bubble-image { max-width: 240px; max-height: 240px; border-radius: var(--ls-radius-control); cursor: pointer; display: block; }
.bubble-image-loading { width: 120px; }
.bubble-file {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 6px 9px; border-radius: var(--ls-radius-control);
  background: var(--ls-surface); border: 1px solid var(--ls-border);
  font: inherit; font-size: var(--ls-fs-base); color: var(--ls-link); text-align: left;
}
.bubble-file:hover { background: var(--ls-surface-active); }
.bubble-file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Message actions + inline edit */
.bubble-actions { display: flex; gap: 4px; margin-top: 4px; opacity: 0; transition: opacity .12s ease; }
.chat-bubble:hover .bubble-actions,
.chat-bubble:focus-within .bubble-actions { opacity: 1; }
.bubble-action {
  border: 0; background: none; cursor: pointer; font: inherit; font-size: var(--ls-fs-sm);
  color: var(--ls-text-muted); padding: 2px 5px; border-radius: var(--ls-radius-badge);
}
.bubble-action:hover { color: var(--ls-primary); background: var(--ls-surface-active); }
.bubble-edit { display: flex; flex-direction: column; gap: 6px; }
.bubble-edit .v3-input { font-size: var(--ls-fs-md); }
.bubble-edited { font-size: var(--ls-fs-sm); color: var(--ls-text-muted); margin-left: 5px; }
.bubble-text.deleted { color: var(--ls-text-muted); }

/* Forward picker */
.forward-picker {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .35);
}
.forward-picker-body {
  background: var(--ls-surface); border-radius: var(--ls-radius-card);
  border: 1px solid var(--ls-border); padding: 18px;
  width: min(420px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto;
}
.forward-picker-list { list-style: none; padding: 0; margin: 10px 0 14px; }
.forward-picker-row {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 0; background: none; font: inherit; font-size: var(--ls-fs-md);
  padding: 9px 10px; border-radius: var(--ls-radius-control); color: var(--ls-text);
}
.forward-picker-row:hover:not(:disabled) { background: var(--ls-surface-active); color: var(--ls-primary); }
.forward-picker-row:disabled { opacity: .5; cursor: default; }
.cw-thread-link { color: inherit; text-decoration: none; border: 0; background: none;
  padding: 0; font: inherit; text-align: left; cursor: pointer; }
.cw-thread-link:hover { color: var(--ls-primary); text-decoration: underline; }
/* Attach control: the native file input is hidden behind the paperclip label. */
.composer-attach { flex: none; display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: var(--ls-radius-control); cursor: pointer; color: var(--ls-text-muted); }
.composer-attach:hover { background: var(--ls-surface-active); color: var(--ls-primary); }
.composer-attach input[type=file] { display: none; }
.bubble-image.expanded { max-width: min(70vw, 640px); max-height: 70vh; }
.bubble-file:disabled { opacity: .6; cursor: default; }
.bubble-attachment { display: flex; align-items: center; gap: 6px; }
.bubble-attachment .bubble-file { cursor: default; }
.bubble-download { flex: none; border: 0; background: none; cursor: pointer; padding: 3px;
  border-radius: var(--ls-radius-badge); color: var(--ls-text-muted); line-height: 0; }
.bubble-download:hover:not(:disabled) { background: var(--ls-surface-active); color: var(--ls-primary); }
.bubble-download:disabled { opacity: .5; cursor: default; }

/* ==== Map pin popup (Calendar /priority-map) ====
   The popup DOM is created by priority-map.js inside Google's InfoWindow — outside any Blazor
   component, so page-scoped CSS cannot reach it and these rules are global by necessity. Tokens
   only, so it themes with the rest of the app. The .gm-style rules strip Google's own chrome
   (16px Roboto, oversized close button, inner padding) so the card reads as ours. */
.gm-style .gm-style-iw-c { padding: 0 !important; border-radius: var(--ls-radius-card); box-shadow: var(--ls-shadow-pop);
  background: var(--ls-surface); max-width: 340px !important; }
.gm-style .gm-style-iw-d { overflow: hidden !important; padding: 0 !important; max-height: none !important; }
.gm-style .gm-style-iw-tc::after { background: var(--ls-surface); }
.gm-style .gm-style-iw-chr { position: absolute; top: 6px; right: 6px; height: auto; z-index: 1; }
.gm-style .gm-style-iw-chr button { width: 26px !important; height: 26px !important; opacity: .55; }
.gm-style .gm-style-iw-chr button:hover { opacity: 1; }
.gm-style .gm-style-iw-chr button span { width: 14px !important; height: 14px !important; margin: 0 !important; }

.sm-pop { font-family: var(--ls-font); color: var(--ls-text); width: 292px; padding: 14px 16px 13px;
  display: flex; flex-direction: column; gap: 10px; }
.sm-pop-head { display: flex; flex-direction: column; gap: 3px; padding-right: 22px; }
.sm-pop-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sm-pop-id { font-size: var(--ls-fs-xl); font-weight: 700; color: var(--ls-primary); text-decoration: none; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums; }
a.sm-pop-id:hover { color: var(--ls-link); text-decoration: underline; }
.sm-pop-addr { font-size: var(--ls-fs-md); line-height: 1.4; color: var(--ls-text); }
.sm-pop-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0;
  padding-top: 10px; border-top: 1px solid var(--ls-border-light); }
.sm-pop-lab { margin: 0; padding-top: 2px; font-size: var(--ls-fs-sm); font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ls-text-label); white-space: nowrap; }
.sm-pop-val { margin: 0; font-size: var(--ls-fs-md); line-height: 1.35; color: var(--ls-text); overflow-wrap: anywhere; }
.sm-pop-actions { display: flex; gap: 8px; padding-top: 2px; }
.sm-pop-actions .v3-btn { text-decoration: none; }

/* V3SlideOver — a generic right-edge drawer. First two consumers: the Lift Workspace's
   Communication-log drawer and Contract Setup's Documents drawer (promote-at-2). */
.v3-slideover-backdrop { position: fixed; inset: 0; background: rgba(1, 45, 80, .15); z-index: 40; }
.v3-slideover {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw);
  background: var(--ls-surface); border-left: 1px solid var(--ls-border);
  box-shadow: var(--ls-shadow-2); z-index: 41; display: flex; flex-direction: column;
}
.v3-slideover-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 16px; border-bottom: 1px solid var(--ls-border-mid);
  font-size: var(--ls-fs-md); font-weight: 700; color: var(--ls-primary);
}
.v3-slideover-close {
  background: none; border: none; cursor: pointer; color: var(--ls-text-muted);
  font-size: var(--ls-fs-md); padding: 4px; line-height: 1;
}
.v3-slideover-close:hover { color: var(--ls-primary); }
.v3-slideover-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.v3-slideover-foot { padding: 12px 16px; border-top: 1px solid var(--ls-border-mid); }

/* Comms header action's unread/total count badge, and the Comms/Communication-logs drawer's
   recent-thread rows — promoted at the second consumer (Lift Workspace, then Project Summary). */
.u-badge {
  background: var(--ls-primary); color: #fff; border-radius: 9px;
  font-size: var(--ls-fs-xs); font-weight: 700; padding: 1px 6px; margin-left: 2px;
  font-variant-numeric: tabular-nums;
}
.drawer-thread { padding: 10px 0; border-bottom: 1px solid var(--ls-border-light); }
.drawer-thread:last-child { border-bottom: none; }
.drawer-thread-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--ls-fs-base); }
.drawer-thread-when { color: var(--ls-text-muted); font-weight: 600; white-space: nowrap; }
.drawer-thread-notes { display: block; margin: 4px 0 0; font-size: var(--ls-fs-base); color: var(--ls-text); cursor: pointer; }
.drawer-thread-notes:hover { text-decoration: underline; }

/* Comms/Follow-ups drawer action row: a "+ New …" create action (permission-gated, so it can render
   nothing) beside the "Open full …" link — promoted straight to shared.css since both drawers on
   both pages (Site Central Summary, Lift Workspace) need the identical row (30 Aug 2026, Je: "add
   feature to create log and create follow up" from the slide-over). Now leads the drawer body rather
   than sitting in the slide-over's own footer slot (30 Aug 2026, Je: "move the new/open full to the
   top instead of the bottom") — .drawer-foot-top gives it the separator the old FooterContent slot's
   border-top used to provide. */
.drawer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drawer-foot-top { padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--ls-border-light); }

/* Group dialog — the thread header's members/settings panel */
.chat-group-dialog-body { padding: 14px 16px; max-height: 62vh; overflow-y: auto; display: flex;
  flex-direction: column; gap: 12px; }

/* ---- Sales report pages (Live Quotes / New Lift Orders / Press Dates) ----
   The rep-scope chip, the filter card's "Showing" foot line, the two-column summary layout and the
   roll-up cell set (company band, conversion bar, totals row, month tiles, month band), plus Press
   Dates' relative due line. All three report pages share them, so the metrics live here and each
   page's .razor.css keeps only its own layout. */

/* Scope chip: the rep filter's locked state and its header twin, sized to sit beside a .v3-input. */
.rep-lock { gap: 6px; padding: 6px 12px; font-size: var(--ls-fs-base); height: 32px; }
.rep-lock .rzi { font-size: var(--ls-icon); }

/* A filter card is a stack: the grouped toolbar, then the "Showing" foot line under a hairline. */
.filters .qf-toolbar { margin-bottom: 0; }
/* A row of controls inside one labelled .qf-group (date presets beside the two pickers). */
.qf-group .ctl-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters .rf-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--ls-border-light);
}
.filters .rf-foot .reset { margin-left: auto; }
.active-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
/* The x that clears one filter - a real <button> so it keyboard-activates, styled back to plain text. */
.active-chips .v3-chip .x {
  border: none; background: none; padding: 0; margin-left: 1px; color: inherit;
  cursor: pointer; display: inline-flex; align-items: center; opacity: .6;
}
.active-chips .v3-chip .x:hover { opacity: 1; }
.active-chips .v3-chip .x .rzi { font-size: var(--ls-fs-lg); }

/* Two-column summary: the wide roll-ups lead, the narrow ones ride beside them. */
.summ-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.summ-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (max-width: 900px) { .summ-layout { grid-template-columns: 1fr; } }

/* A company band inside a roll-up table: the company named once above its rows instead of prefixed
   onto every label. Rendered only when the roll-up actually spans more than one company. The :hover
   twin is what beats .v3-table tbody tr:hover td on specificity rather than !important - a band is
   not a row you can act on, so it must not light up under the pointer. */
.v3-table tbody tr.co-row td,
.v3-table tbody tr.co-row:hover td {
  background: var(--ls-surface-alt); font-size: var(--ls-fs-sm); font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--ls-text-label); padding: 5px 10px;
}
/* Conversion rate as a bar beside the figure, so a column of rates reads as a shape. */
.rate { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; min-width: 110px; }
.rate .bar { width: 56px; height: 6px; border-radius: 3px; background: var(--ls-panel); overflow: hidden; flex: none; }
.rate .bar i { display: block; height: 100%; background: var(--ls-sky); border-radius: 3px; }
.rate b { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }
/* The trailing all-rows row of a roll-up table - a sum, not a row, so it keeps the card's surface
   under the pointer too. */
.v3-table tbody tr.total-row td,
.v3-table tbody tr.total-row:hover td { border-top: 1px solid var(--ls-border-mid); font-weight: 700; background: none; }

/* Month roll-up as a tile strip - twelve table rows read as a wall, twelve tiles read as a trend. */
.mini-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.mm { border: 1px solid var(--ls-border-light); border-radius: var(--ls-radius-control); padding: 7px 8px 6px; min-width: 0; }
.mm .l { font-size: var(--ls-fs-xs); font-weight: 700; color: var(--ls-text-label); text-transform: uppercase; letter-spacing: .04em; }
.mm .v { font-size: var(--ls-fs-xl); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 19px; }
.mm .c { font-size: var(--ls-fs-sm); color: var(--ls-text-muted); font-variant-numeric: tabular-nums; }
.mm .t { margin-top: 4px; height: 4px; border-radius: 2px; background: var(--ls-panel); overflow: hidden; }
.mm .t i { display: block; height: 100%; background: var(--ls-sky); }

/* A month band inside a details table, carrying that month's units/value/average on its right edge -
   which is what lets the trailing "March 2026 total" row go. */
.v3-table tbody tr.month-band td,
.v3-table tbody tr.month-band:hover td {
  background: var(--ls-surface-alt); padding: 6px 10px;
  border-bottom: 1px solid var(--ls-border-mid);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.mb-name { font-weight: 700; color: var(--ls-primary); }
.mb-sum { font-size: var(--ls-fs-base); color: var(--ls-text-muted); font-variant-numeric: tabular-nums; }
.mb-sum b { color: var(--ls-text); }

/* Press date cell: the date with a relative line under it - overdue in warning ink, today in danger. */
.due-cell { display: block; }
.due-cell.over .cell-sub { color: var(--ls-warning-text); font-weight: 600; }

/* ============================================================================
   DROP ZONE (Shared.UI/Components/V3DropZone) — a persistent dashed tray so
   drag-and-drop is visible at rest, not just discovered mid-drag: icon + "Drag
   files here" over "or" + the caller's own add-trigger (a file LIST the caller
   renders belongs above this, not inside it). lsSharedUi.fileDrop
   (js/shared-ui.js) wires the actual drag/drop DOM events and toggles
   "drag-over" on the zone; this is only the tray's look, at rest and hovered.
   ========================================================================= */
.v3-dropzone-tray {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 12px; border: 2px dashed var(--ls-border-mid); border-radius: var(--ls-radius-control);
  background: var(--ls-surface-alt, rgba(1, 45, 80, 0.03));
  color: var(--ls-text-muted); transition: border-color .15s, background-color .15s, color .15s;
}
.v3-dropzone-row { display: flex; align-items: center; gap: 6px; }
.v3-dropzone-label { font-size: var(--ls-fs-md); font-weight: 600; color: var(--ls-text-label); }
.v3-dropzone-or { font-size: var(--ls-fs-base); color: var(--ls-text-muted); }
.v3-dropzone.drag-over .v3-dropzone-tray {
  border-color: var(--ls-primary); color: var(--ls-primary);
  background: color-mix(in srgb, var(--ls-primary) 6%, var(--ls-field));
}
.v3-dropzone.drag-over .v3-dropzone-label { color: var(--ls-primary); }

/* Compact look — a dense single-row context (Project Plan's Replace row) has no room for the
   tray's icon/label stack; the dashed border itself is the affordance, backed by a title tooltip. */
.v3-dropzone-compact {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px; border: 1.5px dashed var(--ls-border-mid); border-radius: var(--ls-radius-control);
  background: var(--ls-surface-alt, rgba(1, 45, 80, 0.03));
  transition: border-color .15s, background-color .15s;
}
.v3-dropzone-compact.drag-over {
  border-color: var(--ls-primary);
  background: color-mix(in srgb, var(--ls-primary) 6%, var(--ls-field));
}

/* V3LengthInput imperial pair: inch box + sixteenths dropdown on one row */
.v3-length.imperial { display: flex; gap: 6px; align-items: center; }

.due-cell.today .cell-sub { color: var(--ls-danger-text); font-weight: 600; }

/* Compose-window layout (lift emails, quote emails, pre-sale drawing, service booking): label
   column + rows. Promoted from three scoped copies, 23 Sep 2026. */
.email-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 18px; }
.email-row { display: flex; align-items: center; gap: 10px; }
.email-row.body-row, .email-row.chips-row { align-items: flex-start; }
.email-label { width: 64px; flex: none; font-size: var(--ls-fs-base); font-weight: 600; text-align: right; color: var(--ls-text-label); }
.email-row.body-row .email-label, .email-row.chips-row .email-label { padding-top: 7px; }
.email-warning { padding: 6px 10px; border-radius: var(--ls-radius-tile); background: var(--ls-warning-bg); color: var(--ls-warning-text); font-size: var(--ls-fs-base); }
.email-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.foot-actions { display: flex; gap: 8px; margin-left: auto; }

/* ---------- dispatch board time grid (Calendar/Bookings/TimeGrid.razor) ----------
   Day and Week share this. Hour lines and the working-day band are BACKGROUNDS on the column, not
   elements: Week at 32 technicians is 224 columns, and a div per hour line would be ~3,000 elements
   before a single booking. The gutter and the headers are sticky because at that width you lose
   both who and when the moment you scroll. */
.tg-wrap {
  /* No sideways scroll, as legacy calendarv2's scheduler: however many technicians are on the board,
     the columns divide the width between them (user ruling 12 Nov 2026, after the coordinator cutover
     where 17 EB techs needed a horizontal scroll). Only the hours scroll. */
  display: flex; align-items: flex-start; overflow-x: hidden; overflow-y: auto; max-height: 72vh; background: var(--ls-surface);
  /* The grid's own rules. A booking board is read by scanning ACROSS a row of columns, so the
     column rules must stay visible over the working-hours wash - the theme's border greys do not,
     which is what made the week read as one grey slab. */
  --tg-line: #c7d2dc;
  --tg-line-soft: #e6ecf1;
  /* The 15-minute line: lighter than the half hour, but clear enough that each 15-minute section reads as its own
     cell, as legacy's do (Lance, 14 Nov 2026; darker, Aiden, 24 Nov 2026). */
  --tg-line-quarter: #ccd5de;
  --tg-line-strong: var(--ls-primary);
  /* Columns have no floor: they share the width like legacy's, and the grid never scrolls sideways.
     Heads and blocks already ellipsise, so a narrow column still reads as far as legacy's did. */
  --tg-col-min: 0px;
  /* Legacy calendarv2 draws the 07:00–15:30 working day white and the hours outside it shaded
     (TimeGrid.WorkStart/WorkEnd; the grid sets --tg-work-start/--tg-work-end for the window it draws).
     The working hours are white on every light theme, so the shade stays clear on Soft too, whose
     surface was the same grey (Aiden, 24 Nov 2026). */
  --tg-work: #fff;
  --tg-nonwork: #e3e8ee;
}
:root[data-theme="dark"] .tg-wrap { --tg-line: #2c3b4a; --tg-line-soft: #1d2936; --tg-line-quarter: #243241; --tg-line-strong: #5a96cd; --tg-work: var(--ls-surface); --tg-nonwork: #16222e; }
/* Week is technicians x days, so it is wide by construction; like Day it now shares the width with no
   floor and no sideways scroll, as legacy's week does. The narrow-width text steps below still apply. */
.tg-wrap.grouped { --tg-col-min: 0px; container: tg-wrap / inline-size; }
.tg-head-line { display: flex; align-items: center; justify-content: center; gap: 4px; max-width: 100%; }
.tg-wrap.grouped .tg-head-name { font-size: var(--ls-fs-sm); padding: 0 2px; }
.tg-wrap.grouped .tg-block { font-size: var(--ls-fs-xs); padding: 2px 3px; }
.tg-gutter { position: sticky; left: 0; z-index: 3; width: 62px; flex: 0 0 62px; background: var(--ls-canvas); border-right: 1px solid var(--ls-border); }
.tg-gutter-head { height: 44px; border-bottom: 1px solid var(--tg-line); background: var(--ls-canvas); position: sticky; top: 0; z-index: 1; box-sizing: border-box; }
.tg-gutter-head.grouped { height: calc(var(--tg-band-h, 24px) + 54px); }
/* 36px per 30-minute row = legacy's 72px hour (RowHeightPx in TimeGrid.razor must match).
   Legacy's time column (Lance, 13 Nov 2026, fix27.png): every row boxed by the same semi-visible line as
   the grid, its time inside the row at the top right, every label the same size with a small am/pm. */
.tg-hour { height: 36px; box-sizing: border-box; border-bottom: 1px solid var(--tg-line); display: flex; justify-content: flex-end; align-items: flex-start; padding: 3px 7px 0 0; }
.tg-hour span { font-size: var(--ls-fs-sm); font-weight: 600; color: var(--ls-text); line-height: 1.2; }
/* The closing time, inside the bottom of the final row. No height of its own, so the gutter stays
   exactly as long as the columns beside it. */
.tg-hour-end { height: 0; position: relative; }
.tg-hour-end span { position: absolute; top: -17px; right: 7px; font-size: var(--ls-fs-sm); font-weight: 600; color: var(--ls-text-muted); line-height: 1.2; }
/* Legacy's labels (fix25.png): "2:00" with a small "pm" beside it. */
.tg-hour sup, .tg-hour-end sup { font-size: var(--ls-fs-xs); font-weight: 400; margin-left: 2px; vertical-align: super; line-height: 0; color: var(--ls-text-muted); }
/* As wide as its columns, never just the window: the heads' grey band, their bottom rule and the day
   bands run to the last column instead of stopping where the screen did and running white past it
   (Lance, 04 Nov 2026). Nothing inside a head or a band may size its column (contain: inline-size on
   each), so the column minimum alone does, exactly as before. */
.tg-cols { flex: 1 0 auto; min-width: 0; display: flex; flex-direction: column; }
.tg-groups, .tg-heads { display: flex; position: sticky; z-index: 2; background: var(--ls-canvas); }
.tg-groups { top: 0; }
.tg-heads { top: 0; border-bottom: 1px solid var(--tg-line); }
.tg-heads.grouped { top: var(--tg-band-h, 24px); }
.tg-group { height: var(--tg-band-h, 24px); flex: 1 1 0; min-width: 0; contain: inline-size; container-type: inline-size; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: var(--ls-fs-sm); font-weight: 700; color: #fff; background: var(--ls-primary); border-right: 2px solid rgba(255, 255, 255, 0.55); }
/* A band action (the week view's "Copy / Move…") fits the 24px band by construction - a plain
   .v3-btn.sm is about 26px tall - and the person's name gives way to it, never the band. */
/* The name comes first and gives way last: legacy's band at 13 techs still reads "Dave H." with a small
   Select beside it. The button shrinks and clips before the name does (fix16.png, 12 Nov 2026). */
.tg-group-name { flex: 0 1 auto; min-width: 3ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-group-lead { display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.tg-group .v3-btn { flex: 0 1000 auto; min-width: 0; height: 18px; padding: 0 5px; line-height: 1; font-size: var(--ls-fs-xs); box-shadow: none; white-space: nowrap; overflow: hidden; }
/* The name wins the band (fix50.png, 24 Nov 2026): the Select button's flex-shrink of 1000 means it gives up its width
   before the name loses a letter, where both used to shrink together and a 17-technician week read "L...". */
/* Too narrow for the name and Select side by side (a 17-technician week on a small screen), the band grows to two rows
   (TimeGrid sets --tg-band-h to 38px for that board width) and Select sits under the name, always there, greyed until a day
   is ticked (Lance, 24 Nov 2026). The band, the heads' sticky top and the gutter's top cell all read --tg-band-h. */
@container (max-width: 120px) {
  .tg-group-lead { flex-direction: column; gap: 1px; width: 100%; padding: 0 2px; }
  .tg-group-name { min-width: 0; max-width: 100%; font-size: var(--ls-fs-xs); line-height: 1.15; }
  .tg-group .v3-btn { flex: none; height: 15px; max-width: 100%; padding: 0 4px; font-size: var(--ls-fs-xs); }
}
/* A ticked head is tick + day name inside a 62px grouped column: the tick keeps its box, the name
   ellipses before it overflows. */
/* The tick is the head's last row, centred in the column like legacy's cbSelect; gap 0 so its label is
   exactly the 13px box and can never reach into the next column. */
.tg-head-pick { flex: none; gap: 0; margin-top: 1px; line-height: 0; }
.tg-head-pick input { margin: 0; }
.tg-head-line .tg-head-name { min-width: 0; }
.tg-wrap.grouped .tg-head-line { gap: 2px; }
.tg-head { flex: 1 1 0; min-width: var(--tg-col-min); contain: inline-size; container-type: inline-size; height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; overflow: hidden; border-right: 1px solid var(--tg-line); }
/* Week's head has three rows (day, Map, tick), so it is taller; the gutter's top cell grows to match
   (band 24px + head 54px). */
.tg-heads.grouped .tg-head { height: 54px; }
.tg-head-name { font-size: var(--ls-fs-sm); font-weight: 700; color: var(--ls-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 4px; }
.tg-head-sub { font-size: var(--ls-fs-xs); color: var(--ls-text-muted); }
/* Legacy's "Map" under every technician-day head: the day's route in Google Maps. */
.tg-head-map { display: inline-flex; align-items: center; gap: 2px; margin-top: 1px; font-size: var(--ls-fs-xs); line-height: 1; color: var(--ls-text-muted); text-decoration: none; }
.tg-head-map:hover { color: var(--ls-primary); text-decoration: underline; }
.tg-head-map.empty { opacity: 0.45; cursor: default; }
.tg-head-map.empty:hover { color: var(--ls-text-muted); text-decoration: none; }
.tg-body { display: flex; flex: 1 1 auto; min-height: var(--tg-body-h, 728px); }
.tg-col {
  flex: 1 1 0; min-width: var(--tg-col-min); position: relative; container-type: inline-size;
  /* Legacy's gaps (fix24.png): blocks start 3px in and stop short of the next column, up to 14px,
     shrinking with a narrow week column so a 20px day still shows its colour. */
  --tg-inset-l: 3px; --tg-inset-r: min(14px, 12%);
  /* ...and a gap above and below each block (Lance, 13 Nov 2026, fix24.png), so back-to-back bookings read as
     separate cards, 4px apart, as legacy draws them. */
  --tg-inset-t: 2px; --tg-inset-b: 2px;
  border-right: 1px solid var(--tg-line);
  background-color: var(--tg-work);
  background-image:
    repeating-linear-gradient(transparent 0, transparent calc(var(--tg-hour) - 1px), var(--tg-line) calc(var(--tg-hour) - 1px), var(--tg-line) var(--tg-hour)),
    /* Every half hour the same semi-visible line, as legacy (fix27.png). */
    repeating-linear-gradient(transparent 0, transparent calc(var(--tg-step) - 1px), var(--tg-line) calc(var(--tg-step) - 1px), var(--tg-line) var(--tg-step)),
    /* ...and a lighter line every 15 minutes, as legacy (fix28.png, 14 Nov 2026), so a quarter-hour booking lines up. */
    repeating-linear-gradient(transparent 0, transparent calc(var(--tg-hour) / 4 - 1px), var(--tg-line-quarter) calc(var(--tg-hour) / 4 - 1px), var(--tg-line-quarter) calc(var(--tg-hour) / 4)),
    linear-gradient(var(--tg-nonwork) 0, var(--tg-nonwork) var(--tg-work-start, 0%), transparent var(--tg-work-start, 0%), transparent var(--tg-work-end, 100%), var(--tg-nonwork) var(--tg-work-end, 100%), var(--tg-nonwork) 100%);
}
/* Where one person's week ends and the next begins. Without it 28 identical columns run together
   and the band above is the only thing saying whose day you are looking at. */
.tg-col.group-end, .tg-head.group-end { border-right: 2px solid var(--tg-line-strong); }
.tg-col.clickable { cursor: copy; }
/* Saturday and Sunday are outside the working week, so the whole day is the out-of-hours grey (Aiden, 24 Nov 2026). */
.tg-col.weekend { --tg-work-start: 100%; --tg-work-end: 100%; }
/* The 15-minute slot under the mouse (Aiden, 24 Nov 2026: legacy lights it yellow), in the board's own blue, with
   the slot's time. It fits the slot between its two lines and never takes a click. */
.tg-hover {
  position: absolute; left: 0; right: 0; z-index: 0; pointer-events: none; box-sizing: border-box;
  background: color-mix(in srgb, var(--ls-primary) 12%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--ls-primary) 45%, transparent);
  font-size: var(--ls-fs-xs); line-height: 1; color: var(--ls-primary); overflow: hidden;
}
.tg-hover span { display: block; padding: 2px 4px; white-space: nowrap; font-weight: 600; }
:root[data-theme="dark"] .tg-hover { color: #9cc4ea; }
/* No top padding and a 1.2 line (Lance, 13 Nov 2026, fix25.png): a 15-minute booking such as N6 - Annual
   still shows its one line, as legacy's does, instead of a clipped sliver. */
/* Every card, whatever its colour, has the same 1px light black border (#6b6b6b; Lance, 19 Nov 2026, replacing
   legacy's khaki #d2c27b), so white Lunch/Travel and pale job cards stand apart from the grid and from each
   other. Month chips carry the same edge. */
.tg-block { position: absolute; box-sizing: border-box; padding: 0 4px; border: 1px solid #6b6b6b; border-radius: 3px; font-size: var(--ls-fs-sm); line-height: 1.2; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.tg-block:hover { filter: brightness(0.94); }
/* The text inside a block never takes events, so a drag landing on a booking is always measured
   from the block itself. Static, not applied mid-drag: restyling the source element during a drag
   is what broke the gesture. */
.tg-block-text, .tg-block-more { pointer-events: none; }
/* Title only, wrapping into the block's full height, as legacy draws a booking (fix19.png, 12 Nov 2026). */
.tg-block-text { overflow: hidden; overflow-wrap: anywhere; }
/* Narrow columns read as legacy's do (fix16.png, 12 Nov 2026: 13 techs x 7 days with no sideways scroll).
   Legacy's week heads are one letter each, M T W T F S S, over a tick and a tiny Map, and its bars carry
   colour only. The head and the column are inline-size containers, so each column decides for itself. */
.tg-head-initial { display: none; font-size: var(--ls-fs-sm); font-weight: 700; color: var(--ls-text); }
@container (max-width: 64px) {
  /* Only Week swaps the name for its day letter. Day has no letter to fall back to, so hiding the name there
     left a narrow column with nothing but the Map pin (fix50.png, 24 Nov 2026: 17 technicians on a small
     screen). Day keeps the technician's name, smaller and wrapped onto two lines; the tooltip has it in full. */
  .tg-wrap.grouped .tg-head-name { display: none; }
  .tg-wrap.grouped .tg-head-initial { display: inline; }
  .tg-wrap:not(.grouped) .tg-head-line { max-width: 100%; }
  .tg-wrap:not(.grouped) .tg-head-name {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    white-space: normal; overflow-wrap: anywhere; text-align: center;
    font-size: var(--ls-fs-xs); line-height: 1.1; padding: 0 1px; letter-spacing: -0.2px;
  }
  .tg-head-map-text { display: none; }
  .tg-head-line { gap: 2px; }
}
@container (max-width: 64px) {
  /* A narrow Week column still shows the title, wrapped through the block's height as legacy's does
     (fix20.png, 12 Nov 2026: at 7 technicians the board showed colour only and no details). */
  .tg-block { padding: 1px 2px; font-size: var(--ls-fs-xs); line-height: 1.15; }
}
@container (max-width: 20px) {
  /* Only at legacy's own densest (13+ technicians, ~17px) is a bar colour alone; tooltip and click carry it. */
  .tg-block { padding: 1px; }
  .tg-block-text, .tg-block-more { display: none; }
}
.tg-block-more { font-weight: 700; opacity: 0.8; }
.tg-block.recurring { outline: 1px dashed rgba(0, 0, 0, 0.35); }
.tg-skeleton { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px 0 0; }
.tg-skeleton .tg-sk-grid { height: 60vh; }

/* The block's bottom edge, for dragging the finish time. Sized to a comfortable grab without
   eating a short block's text — a 15-minute block is 14px tall at the default grid height. */
.tg-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; cursor: ns-resize; }
/* The top edge, for dragging the start time — the same grab, mirrored. */
.tg-resize.top { top: 0; bottom: auto; }
.tg-block:hover .tg-resize { background: rgba(0, 0, 0, 0.18); }
/* Legacy calendarv2's RadScheduler delete: a × in a booking's top-right corner, shown only while the
   card is hovered (Lance, 18 Nov 2026). Shared by the Day/Week block and the Month chip. */
.tg-delete { position: absolute; top: 1px; right: 1px; z-index: 2; display: none; width: 14px; height: 14px; padding: 0; border: none; border-radius: 2px; background: rgba(255, 255, 255, 0.85); color: var(--ls-danger-text, #b42318); font-size: var(--ls-fs-sm); font-weight: 700; line-height: 14px; text-align: center; cursor: pointer; }
.tg-block:hover .tg-delete, .mg-chip:hover .tg-delete, .tg-delete:focus-visible { display: block; }
.tg-delete:hover { background: #fff; outline: 1px solid currentColor; }
.mg-chip { position: relative; }
.mg-chip:has(.tg-delete):hover { padding-right: 18px; }
.tg-col.tg-drop-target { outline: 2px dashed var(--ls-primary); outline-offset: -2px; }

/* Where the booking will land if it is let go here, drawn at the snapped half hour with its times.
   Never a drag target itself, or it would steal the offsets the column needs. */
.tg-preview {
  position: absolute; left: 2px; right: 2px; z-index: 2; pointer-events: none;
  box-sizing: border-box; border: 2px dashed var(--ls-primary); border-radius: 3px;
  background: var(--ls-primary-tint);
  display: flex; align-items: flex-start; justify-content: center;
}
.tg-preview span {
  padding: 0 5px; border-radius: 0 0 3px 3px; white-space: nowrap;
  background: var(--ls-primary); color: #fff; font-size: var(--ls-fs-xs); font-weight: 700; line-height: 14px;
}
/* Nothing is restyled mid-drag. A drag event measured against a block is translated in the
   component instead — see TimeGrid's ColumnY. */

/* ---------- dispatch board month grid (Calendar/Bookings/BoardMonthView.razor) ----------
   Legacy calendarv2 groups the scheduler by technician, horizontally: in Month view that is one
   month grid per technician, side by side, scrolling sideways like Week. A day cell lists that
   person's bookings by time; a full cell scrolls (legacy OverflowBehavior="Scroll"). The rules
   reuse the time grid's line colours so the two boards read as one. */
.mg-wrap {
  display: flex; align-items: flex-start; overflow: auto; max-height: 72vh; background: var(--ls-surface);
  --mg-line: #c7d2dc; --mg-day-min: 92px;
}
:root[data-theme="dark"] .mg-wrap { --mg-line: #2c3b4a; }
.mg-tech { flex: none; width: calc(7 * var(--mg-day-min)); border-right: 2px solid var(--ls-primary); }
.mg-tech:last-child { border-right: 0; }
.mg-tech-head { position: sticky; top: 0; z-index: 2; height: 24px; display: flex; align-items: center; justify-content: center; font-size: var(--ls-fs-sm); font-weight: 700; color: #fff; background: var(--ls-primary); }
.mg-dows { display: grid; grid-template-columns: repeat(7, minmax(var(--mg-day-min), 1fr)); position: sticky; top: 24px; z-index: 2; background: var(--ls-canvas); border-bottom: 1px solid var(--mg-line); }
.mg-dow { height: 24px; display: flex; align-items: center; justify-content: center; font-size: var(--ls-fs-sm); font-weight: 700; color: var(--ls-text); border-right: 1px solid var(--mg-line); }
.mg-weeks { display: grid; grid-template-columns: repeat(7, minmax(var(--mg-day-min), 1fr)); }
/* One fixed height for every day of every technician (fix22.png, 12 Nov 2026): each person's month is its
   own grid, and a row that grew to fit its busiest day (104-136px) put the same week at different heights
   side by side. A full day scrolls inside its cell, as before, instead of stretching its row. Five chips show. */
.mg-day { height: 120px; box-sizing: border-box; display: flex; flex-direction: column; gap: 2px; padding: 2px; border-right: 1px solid var(--mg-line); border-bottom: 1px solid var(--mg-line); overflow-y: auto; cursor: pointer; }
.mg-day.other { background: var(--ls-surface-alt); color: var(--ls-text-muted); }
.mg-day.weekend { background: color-mix(in srgb, var(--ls-surface-alt) 55%, var(--ls-surface)); }
.mg-day-num { font-size: var(--ls-fs-xs); font-weight: 700; color: var(--ls-text-muted); padding: 1px 3px; align-self: flex-end; }
.mg-day.today .mg-day-num { color: #fff; background: var(--ls-primary); border-radius: 10px; }
.mg-chip { flex: none; display: flex; gap: 4px; padding: 1px 4px; border: 1px solid #6b6b6b; border-radius: 3px; font-size: var(--ls-fs-xs); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.mg-chip:hover { filter: brightness(0.94); }
.mg-chip.recurring { outline: 1px dashed rgba(0, 0, 0, 0.35); }
/* Drag in Month, as legacy's month view allows: a chip drags to another day cell, which outlines
   itself the way Week's columns do. */
.mg-chip[draggable="true"] { cursor: grab; }
.mg-day.mg-drop-target { outline: 2px dashed var(--ls-primary); outline-offset: -2px; }
.mg-chip b { font-weight: 700; }
.mg-chip span { overflow: hidden; text-overflow: ellipsis; }

/* A drag the server refused. Sits above the grid rather than replacing it — the board stays usable
   and the block is already back where it started. */
.board-move-error {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
  padding: 8px 10px; border-radius: var(--ls-radius-control);
  background: var(--ls-danger-bg); color: var(--ls-danger-text);
  font-size: var(--ls-fs-md);
}
.board-move-error span { flex: 1; }

/* Print: Radzen's notification and dialog hosts sit outside AppShell's scope, so they are hidden here. */
/* Phones: the same no-floor, no-sideways-scroll rule as desktop (the board is an office surface);
   each band's name + action stays pinned just right of the time gutter. */
@media (max-width: 900px) {
  .tg-group { justify-content: flex-start; }
  .tg-group-lead { position: sticky; left: 70px; padding: 0 8px; }
}

@media print {
  .rz-notification, .rz-dialog-wrapper, .rz-dialog-mask { display: none !important; }
}
