/*
 * Dashboard BODY — CR-A116-33 (dashboard-r2.html, "the first impression").
 * Full rewrite of the CR-A116-4 quick-link-tiles layout (metrics/next-
 * delivery-strip/recent-orders-list/quicklinks-row — all removed, this is a
 * different page). The SHELL (sidebar, brand lockup, nav, user chip) is
 * CR-A116-16 (shell.css) — out of scope here, unchanged.
 *
 * Values are transcribed from dashboard-r2.html's own <style> block, mapped
 * onto this app's real tokens.css custom properties (the card's standalone
 * :root uses slightly different names for the identical colors —
 * --green/--green-soft -> --good/--good-soft, --red/--red-soft ->
 * --danger/--danger-soft — see tokens.css's own header for why those two
 * pairs were renamed at CR-A116-23). Two values tokens.css does not carry
 * (--r-xl: 16px, the lighter --shadow-card) are defined locally below rather
 * than added to the shared tokens file, which is outside this CR's
 * touched_paths_allowlist.
 *
 * All new selectors are `dash-` prefixed (job-sites.css's own `jsv-`
 * precedent, CR-A116-32) — every stylesheet in this app is loaded globally
 * (index.html has no per-view <link>), so generic names like `.hero`/
 * `.map`/`.pin`/`.rail`/`.door` would be a live collision risk against any
 * future page CSS even though today's other files happen not to clash.
 */

:root {
  --dash-r-xl: 16px;
  --dash-shadow-card: 0 1px 3px rgba(15, 23, 42, .07), 0 1px 2px rgba(15, 23, 42, .04);
}

/* ---------- greeting band ---------- */
.dash-hello { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-5); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.dash-hello h2 { margin: 0; font-size: 24px; font-weight: 700; color: var(--navy); letter-spacing: -.01em; }
.dash-hello-sub { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.dash-hello-sub b { color: var(--ink-soft); }

.dash-cta {
  height: 44px; padding: 0 20px; border-radius: var(--r-md); background: var(--blue); color: #fff;
  font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .4); font-family: var(--font); white-space: nowrap;
  transition: background var(--dur-1) var(--ease);
}
@media (hover: hover) {
  .dash-cta:hover { background: var(--blue-deep); }
}
.dash-cta:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: 2px; }
.dash-cta .icon { stroke: #fff; }

/* ---------- HERO: map + rail as one component ---------- */
.dash-hero { display: grid; grid-template-columns: 1fr 320px; gap: 0; border: 1px solid var(--line); border-radius: var(--dash-r-xl);
  overflow: hidden; background: var(--bg); box-shadow: var(--shadow-pop); margin-bottom: var(--sp-5); }

/* [[BF-522]]: .dash-map's own gradient + this ::after grid-line pattern stay
   — same underlay role as job-sites.css's .jsv-map-canvas ([[BF-520]]):
   visible while tiles load and in the (no-sites-skip-hero) empty state
   before this rule even applies, fully covered once real tiles paint. */
/* [[BF-528]]: `isolation: isolate` — this container needs to satisfy TWO
   constraints that are otherwise in tension: (1) its own chrome
   (.dash-map-chip/.dash-map-expand, both 1004 below) must keep beating
   Leaflet's internal panes/controls (600-1000, the +1000 shift note below)
   — that's still required, BF-519 needs it; AND (2) the whole map, chrome
   included, must never be comparable against the app's shared modal scrim
   (.modal-scrim, assets/css/modal.css, z-index:1000, the CR-A116-30
   contract) — without this, 1004 beats 1000 at the PAGE level and the New
   Order modal's click area gets hijacked by ".dash-map-expand" underneath
   it (BF-520 proof finding, 2026-08-18). `isolation: isolate` makes both
   true at once: it scopes every z-index inside .dash-map into ITS OWN
   stacking context, so 1004 only has to out-rank Leaflet's numbers *within
   that context* (still does), while from the outside the entire .dash-map
   box paints as a single unit at its DOM-order slot — always below a
   fixed-position, higher-stacking-context element like .modal-scrim,
   regardless of any number written inside .dash-map. Do NOT remove this
   isolation "to simplify" — the 1004+ values alone are not sufficient
   without it; removing it silently reopens the modal-hijack bug while
   every z-index in this file still reads correct on paper. */
.dash-map { position: relative; isolation: isolate; min-height: 360px; background: linear-gradient(160deg, #E8EEF6 0%, #DCE5F0 55%, #D3DEEC 100%); }
.dash-map::after { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(148, 163, 184, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, .35) 1px, transparent 1px);
  background-size: 58px 58px; }

/* [[BF-522]]: Leaflet's host div. z-index:1 is a LOCAL ordering need only —
   clears .dash-map::after's grid-line pseudo-element (which, having no
   z-index of its own, would otherwise paint on top of this element by DOM/
   paint order: a generated ::after paints after all real earlier siblings)
   so the real tiles show instead of the grid texture once loaded. This is
   NOT part of the +1000 chrome shift below — Leaflet's OWN panes/controls
   (600-1000+) still compare directly against it and win, which is exactly
   what's wanted: tiles/pins render normally, only the flat CSS grid
   underneath gets covered. */
#dashLeafletHost { position: absolute; inset: 0; z-index: 1; }
.dash-map .leaflet-container { background: transparent; font-family: var(--font); }
/* [[BF-522]] — prophylactic application of [[BF-519]]'s fix, same mechanism:
   Leaflet's internal panes/controls (assets/vendor/leaflet.css) carry
   z-index values this file's overlay scale (formerly 4) never anticipated —
   .leaflet-marker-pane=600, .leaflet-control=800, .leaflet-top/.leaflet-
   bottom=1000. #dashLeafletHost and .dash-map-chip/.dash-map-expand are
   DIRECT SIBLINGS inside #dashMap — same flattened-comparison mechanism as
   job-sites.css (see the full mechanism note there, above .jsv-ov-brand).
   Fix: shifted +1000 (4->1004). [[BF-528]] update: #dashMap now carries
   `isolation: isolate` (comment above .dash-map) — the flattened comparison
   below is still real and still required, but it is now SCOPED to #dashMap's
   own stacking context rather than the whole page, which is what keeps this
   +1000 shift from also beating the app's shared modal scrim. Do NOT lower
   these back into a single-digit range. Exempt, deliberately unchanged:
   .dash-pin (and its .live::before/
   ::after) — placed by Leaflet L.divIcon HTML INSIDE .leaflet-marker-pane
   itself (views/dashboard.js's initDashboardLeafletMap()/pinHtml()), so its
   z-index:3 is a LOCAL order within that one pane, never a page-level
   comparison against these values — same exemption reasoning as
   .jsv-map-pin in job-sites.css, verified against this file's own DOM
   structure before applying, not copied blind. */
.dash-map-chip { position: absolute; left: 16px; top: 16px; z-index: 1004; background: rgba(255, 255, 255, .94); backdrop-filter: blur(4px);
  border: 1px solid var(--line); border-radius: var(--r-full); padding: 7px 14px; display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 700; color: var(--ink); box-shadow: var(--dash-shadow-card); }
.dash-map-chip .lv { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .2); }

.dash-map-expand { position: absolute; right: 16px; bottom: 16px; z-index: 1004; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 15px; border-radius: var(--r-full); background: rgba(255, 255, 255, .96); backdrop-filter: blur(4px);
  border: 1px solid var(--line); box-shadow: var(--dash-shadow-card); font-size: 12.5px; font-weight: 700; color: var(--navy);
  text-decoration: none; cursor: pointer; }
.dash-map-expand:hover { border-color: var(--blue-soft); }
.dash-map-expand:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.dash-map-expand .icon { color: var(--blue); }

/* [[BF-524]]: two Leaflet controls now live here — attribution (bottom-left,
   mandatory per OSM/CARTO terms, see shared/map-tiles.js) and zoom (top-
   right, initDashboardLeafletMap()'s `L.control.zoom({position:'topright'})`,
   restyled below to match the ratified card's `.map-zoom`). Hide only the
   two corners that never carry anything — top-left (Leaflet's own default
   zoom position, unused since we place it explicitly at topright) and
   bottom-right — same scoped treatment job-sites.css uses (never a blanket
   `.leaflet-control-container{display:none}`, which would hide both
   controls this rule exists to protect). */
.dash-map .leaflet-control-container .leaflet-top.leaflet-left,
.dash-map .leaflet-control-container .leaflet-bottom.leaflet-right {
  display: none;
}

/* [[BF-524]]: restyle Leaflet's own zoom control to match dashboard-r2.html's
   `.map-zoom` card spec exactly (vertical stacked pair, top-right, 30x30
   each, white, hairline border, rounded as one unit) — Leaflet's control,
   not a hand-rolled second one, so zoom behaviour, disabled-at-limit state,
   and keyboard/ARIA semantics come from Leaflet for free. Card tokens
   (--line, --r-md, --ink-soft, --shadow-card) map to this file's own scale;
   --dash-shadow-card is this file's existing name for --shadow-card, already
   used by .dash-map-chip/.dash-map-expand above. */
.dash-map .leaflet-control-zoom {
  margin: 16px 16px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--dash-shadow-card);
  overflow: hidden;
}
.dash-map .leaflet-control-zoom a,
.dash-map .leaflet-control-zoom a:hover,
.dash-map .leaflet-control-zoom a:focus {
  width: 30px;
  height: 30px;
  line-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 400 15px var(--font);
  color: var(--ink-soft);
  background: #fff;
  border: none;
  border-radius: 0;
}
.dash-map .leaflet-control-zoom a.leaflet-control-zoom-out {
  border-top: 1px solid var(--line);
}
.dash-map .leaflet-control-zoom a.leaflet-disabled {
  opacity: .5;
  cursor: not-allowed;
}
.dash-map .leaflet-control-zoom a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.dash-pin { position: absolute; transform: translate(-50%, -50%); z-index: 3; cursor: pointer;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.dash-pin .dot { display: block; width: 15px; height: 15px; border-radius: 50%; background: var(--navy); border: 3px solid #fff; box-shadow: 0 3px 8px rgba(15, 23, 42, .35); transition: transform var(--dur-1) var(--ease); }
.dash-pin.live .dot { background: var(--blue); }
.dash-pin:focus-visible .dot { outline: 2px solid var(--blue-deep); outline-offset: 2px; }
.dash-pin.hi .dot { transform: scale(1.35); box-shadow: 0 0 0 5px rgba(37, 99, 235, .3), 0 3px 8px rgba(15, 23, 42, .35); }
.dash-pin.live::before { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%; background: rgba(37, 99, 235, .18); pointer-events: none; }
.dash-pin.live::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(1);
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid rgba(37, 99, 235, .45); pointer-events: none;
  animation: dash-pin-pulse 2.2s cubic-bezier(.23, 1, .32, 1) infinite; }
@keyframes dash-pin-pulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: .7; }
  100% { transform: translate(-50%, -50%) scale(2.1); opacity: 0; }
}
/* Belt-and-braces on top of tokens.css's own global reduced-motion collapse
   (`* { animation-duration: .001ms !important }`) — the pulse is a
   DoD-gated invariant, not left to a shared rule alone. */
@media (prefers-reduced-motion: reduce) {
  .dash-pin.live::after { animation: none; opacity: .4; }
}
.dash-pin-lbl { display: block; position: absolute; left: 50%; transform: translateX(-50%); bottom: 20px; white-space: nowrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-full); padding: 3px 10px;
  font-size: 11px; font-weight: 700; color: var(--ink); box-shadow: var(--dash-shadow-card); pointer-events: none; }
.dash-pin-lbl .d { color: var(--blue-deep); font-family: var(--mono); margin-left: 6px; }

/* [[BF-525]] cluster count bubble — same L.markerClusterGroup config as the
   admin map and views/job-sites.js's hero (maxClusterRadius/
   spiderfyOnMaxZoom/showCoverageOnHover/zoomToBoundsOnClick,
   initDashboardLeafletMap() in dashboard.js), icon markup built from this
   file's own tokens rather than the admin's inline-styled bubble: same
   navy/blue fill + 3px solid white ring `.dash-pin .dot` already uses
   above, 36px bubble in a 40px L.divIcon (admin's geometry, unchanged — it
   reads fine here too). `.dash-cluster-hi` mirrors `.dash-pin.hi .dot`'s
   own hover/focus treatment — set by highlightPin() when the rail row
   being hovered/focused maps to a marker currently collapsed inside this
   cluster, so hovering that row highlights the cluster instead of nothing. */
.dash-cluster-bubble {
  width: 36px; height: 36px; border-radius: var(--r-full); background: var(--blue);
  border: 3px solid #fff; box-shadow: 0 3px 8px rgba(15, 23, 42, .35);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--mono); font-weight: 700; font-size: 12px;
  cursor: pointer; transition: transform var(--dur-1) var(--ease);
}
.dash-cluster-icon.dash-cluster-hi .dash-cluster-bubble {
  transform: scale(1.12);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, .3), 0 3px 8px rgba(15, 23, 42, .35);
}

.dash-rail { border-left: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; }
.dash-rail-h { padding: 15px 17px 12px; border-bottom: 1px solid var(--line); }
.dash-rail-h .t { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.dash-rail-h .s { font-size: 16px; font-weight: 700; color: var(--navy); margin-top: 3px; }
.dash-rail-b { padding: 6px 0; flex: 1; overflow: hidden; }

.dash-dl { display: flex; gap: 12px; padding: 12px 17px; border-bottom: 1px solid var(--line-soft); cursor: default;
  transition: background var(--dur-1) var(--ease); }
.dash-dl:last-child { border-bottom: none; }
@media (hover: hover) {
  .dash-dl:hover { background: var(--blue-soft); }
}
.dash-dl:focus-visible { background: var(--blue-soft); outline: none; }
.dash-dl.on { background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.dash-dl .day { width: 42px; flex-shrink: 0; text-align: center; }
.dash-dl .day .dw { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.dash-dl .day .dn { font-family: var(--mono); font-size: 18px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.dash-dl .info { min-width: 0; }
.dash-dl .site { font-size: 13.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-dl .what { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.dash-dl .what .ref { font-family: var(--mono); color: var(--blue-deep); font-weight: 600; }
.dash-tag { margin-top: 5px; display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: var(--r-full); background: var(--good-soft); color: var(--good); }
.dash-tag.wait { background: var(--amber-soft); color: var(--amber); }

.dash-rail-f { padding: 11px 17px; border-top: 1px solid var(--line); background: var(--field);
  font-size: 12.5px; font-weight: 600; color: var(--blue-deep); display: flex; align-items: center; justify-content: space-between;
  width: 100%; border-left: none; border-right: none; border-bottom: none; cursor: pointer; font-family: var(--font); }
.dash-rail-f:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

.dash-rail-empty { padding: 26px 18px; text-align: center; }
.dash-rail-empty .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--field); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 11px; color: var(--faint); }
.dash-rail-empty .t { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.dash-rail-empty .s { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin-bottom: 13px; }
.dash-rail-cta { height: 36px; padding: 0 15px; border-radius: var(--r-md); background: var(--blue); color: #fff;
  font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 7px; border: none; cursor: pointer; font-family: var(--font); }
.dash-rail-cta:hover { background: var(--blue-deep); }
.dash-rail-cta .icon { stroke: #fff; }
.dash-rail-next { background: var(--field); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px;
  font-size: 12px; color: var(--muted); text-align: left; margin-top: 4px; }
.dash-rail-next b { color: var(--ink); font-family: var(--mono); }

/* ---------- Case A: the hero becomes one invitation ---------- */
.dash-invite { border: 1px solid var(--line); border-radius: var(--dash-r-xl); overflow: hidden; background: var(--bg);
  box-shadow: var(--shadow-pop); margin-bottom: var(--sp-5); }
.dash-invite-map { position: relative; height: 260px; background: linear-gradient(160deg, #EDF1F7 0%, #E4EAF3 100%);
  display: flex; align-items: center; justify-content: center; }
.dash-invite-map::after { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(148, 163, 184, .22) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, .22) 1px, transparent 1px);
  background-size: 58px 58px; }
.dash-invite-in { position: relative; z-index: 2; text-align: center; max-width: 420px; padding: 0 20px; }
.dash-invite-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--blue-soft); border: 1px solid #BFDBFE;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 13px; color: var(--blue); }
.dash-invite-in .t { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 5px; }
.dash-invite-in .s { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 15px; }
.dash-invite-b { height: 40px; padding: 0 20px; border-radius: var(--r-md); background: var(--blue); color: #fff;
  font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer; font-family: var(--font); }
.dash-invite-b:hover { background: var(--blue-deep); }
.dash-invite-b .icon { stroke: #fff; }

/* ---------- the four doors ---------- */
.dash-doors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dash-door { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--dash-shadow-card); display: flex; flex-direction: column; text-align: left; cursor: pointer;
  transition: box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease); }
@media (hover: hover) {
  .dash-door:hover { box-shadow: var(--shadow-pop); border-color: var(--blue-soft); }
}
.dash-door:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.dash-door-h { display: flex; align-items: center; gap: 9px; padding: 13px 15px 10px; }
.dash-door-h .ic { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dash-door-h .ic .icon { stroke: #fff; width: 15px; height: 15px; }
.dash-door-h .tt { font-size: 13px; font-weight: 700; color: var(--navy); flex: 1; }
.dash-door-h .ar { color: var(--faint); font-size: 16px; line-height: 1; }
.dash-door-b { padding: 0 15px 14px; flex: 1; }

.big { font-family: var(--mono); font-size: 27px; font-weight: 800; color: var(--navy); line-height: 1.05; letter-spacing: -.02em; }
.big.sm { font-size: 21px; }
.cap { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.cap b { color: var(--ink-soft); }

.dash-pipe { display: flex; height: 8px; border-radius: 99px; overflow: hidden; margin: 12px 0 9px; background: var(--line-soft); }
.dash-pipe i { display: block; }
.dash-pipe-key { display: flex; flex-wrap: wrap; gap: 9px; }
.dash-pipe-key span { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.dash-pipe-key i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dash-pipe-key b { color: var(--ink); font-family: var(--mono); }

.dash-money-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; font-size: 12px; border-top: 1px solid var(--line-soft); }
.dash-money-row span { color: var(--muted); }
.dash-money-row b { font-family: var(--mono); color: var(--ink); }
.dash-money-row.bad b { color: var(--danger); }
.dash-settled { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--good);
  background: var(--good-soft); border: 1px solid #A7F3D0; border-radius: var(--r-full); padding: 4px 11px; margin-top: 2px; }
.dash-settled .icon { stroke: var(--good); width: 13px; height: 13px; }

.dash-doc { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-top: 1px solid var(--line-soft); font-size: 12px; }
.dash-doc .pill { font-size: 8.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #fff; padding: 2px 6px; border-radius: 3px; }
.dash-doc .pill.inv { background: var(--navy); }
.dash-doc .pill.slip { background: var(--teal); }
.dash-doc .rf { font-family: var(--mono); font-weight: 700; color: var(--ink); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-doc .dt { color: var(--faint); font-size: 11px; flex-shrink: 0; }

.dash-mini-map { height: 72px; border-radius: var(--r-md); margin: 10px 0 9px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #E8EEF6, #D3DEEC); border: 1px solid var(--line); }
.dash-mini-map i { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--navy); border: 2px solid #fff; transform: translate(-50%, -50%); }
.dash-mini-map i.a { background: var(--blue); }

.dash-door.quiet .big { color: var(--faint); }
.dash-door-empty { padding: 2px 0 4px; }
.dash-door-empty .t { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.dash-door-empty .s { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.55; }
.dash-door-cta { margin-top: 10px; height: 32px; padding: 0 12px; width: 100%; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg);
  font-size: 12px; font-weight: 700; color: var(--blue-deep); display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font-family: var(--font); }
.dash-door-cta:hover { border-color: var(--blue-soft); background: var(--blue-soft); }

/* ---------- shared `.link` utility ----------
   NOT dashboard-specific — this page no longer uses it (the old "View all"
   text-link pattern was replaced by .dash-rail-f / .dash-map-expand).
   Corrected 2026-08-16 (motion-gate fix pass, CR-A116-33): a prior version
   of this comment claimed invoices.js / order-success.js / packing-slips.js
   / job-sites.js / auth.js depend on `class="link"` — re-grepped the whole
   tenant-client tree and that is false; none of them render `class="link"`
   today (order-success.js uses the unrelated `.secondary-link`, defined
   elsewhere). This rule is currently unused app-wide. Kept defensively
   rather than deleted, since removing dead CSS with no live consumer to
   verify against carries more risk than leaving an inert rule in place. A
   follow-up CR can drop it once confirmed safe, or give it a proper shared
   home (e.g. tokens.css) if a future page needs it. */
.link { color: var(--blue-deep); font-weight: 700; font-size: 13px; line-height: 1.45; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; background: none; border: none; cursor: pointer; font-family: var(--font); padding: 0; text-align: left; }
.link .icon { width: 14px; height: 14px; }
.link:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- honest error region (same shape as QA scenario 2 always used) ---------- */
.dash-error-state {
  border: 1.5px dashed var(--line); border-radius: var(--r-lg); background: var(--field);
  padding: var(--sp-8) var(--sp-6); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
}
.dash-error-state h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); }
.dash-error-state p { margin: 0; font-size: 13px; color: var(--muted); max-width: 380px; }
.dash-error-state .dash-cta { margin-top: 14px; }
.empty-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--band); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.empty-icon .icon { width: 24px; height: 24px; color: var(--navy); }

/* ---------- skeleton (loading) ---------- */
.skel { background: linear-gradient(90deg, var(--field) 25%, var(--line-soft) 37%, var(--field) 63%); background-size: 400% 100%; animation: dash-skel-shine 1.4s ease infinite; border-radius: var(--r-sm); }
.skel-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--sp-5); }
.skel-strip { border-radius: var(--dash-r-xl); margin-bottom: var(--sp-5); }
.skel-row { border-radius: var(--r-lg); }
@keyframes dash-skel-shine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* ---------- phone / narrow reflow (~390px, matches shell.css's breakpoint) ----------
   DoD: map first, rail as cards, tiles 2x2, New order lives in the Orders
   tab at this width (nav.js's own mobile tab bar already covers it — same
   precedent the old Quick Links section used to hide itself here). */
@media (max-width: 480px) {
  .dash-hello { flex-direction: column; align-items: stretch; gap: var(--sp-3); } /* dead — .dash-hello wrapper no longer rendered (CR-A126-2), left per the CR's "don't delete CSS speculatively" */
  .dash-hello .dash-cta { display: none; } /* dead, same reason — real rule is .shell-header .dash-cta below (CR-A126-2: #dashNewOrderBtn now renders in the shell header, not inside .dash-hello) */
  .shell-header .dash-cta { display: none; }

  .dash-hero { grid-template-columns: 1fr; }
  .dash-map { min-height: 220px; }
  .dash-rail { border-left: none; border-top: 1px solid var(--line); }

  .dash-doors { grid-template-columns: 1fr 1fr; }
}
