/* FreshPure Field Service portal — FPW Brand Guidelines 2022 */
/* Poppins is the corporate font (Helvetica as fallback); bundled locally
   because LAN clients (and the corporate proxy) can't reach Google Fonts. */
@font-face {
  font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/poppins-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/poppins-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/poppins-700.woff2') format('woff2');
}
:root {
  --surface-1: #fcfcfb;
  --page: #f9f9f7;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #6b6a66;   /* a11y: was #898781 (3.50:1 on surface) — darkened to meet WCAG AA */
  --grid: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11,11,11,0.10);
  --series-1: #00afce;  /* FreshPure Blue */
  --series-2: #1baf7a;  /* aqua */
  --series-3: #eda100;  /* yellow */
  --series-4: #008300;  /* green */
  --series-5: #4a3aa7;  /* violet */
  --series-6: #e34948;  /* red */
  --status-good: #0ca30c;
  --status-warning: #fab219;
  --status-serious: #ec835a;
  --status-critical: #d03b3b;
  --brand: #00afce;       /* FreshPure Blue — Pantone 3125 C */
  --brand-dark: #004c9d;  /* Dark Blue — Pantone 2945 C (Alkaline) */
  --brand-light: #3fcce3; /* Light Blue — Pantone 2226 C (Deionized) */
  --accent: #004c9d;      /* links/accents: dark blue for legibility on light bg */
}
* { box-sizing: border-box; }
button, input, select, textarea { font-family: inherit; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.45 "Poppins", Helvetica, Arial, system-ui, sans-serif;
  color: var(--ink); background: var(--page);
}
.hidden { display: none !important; }
code { background: #eeede8; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
h2, h3, h4 { margin: 0 0 8px; }
a { color: var(--accent); cursor: pointer; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- login */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #004c9d 0%, #00afce 55%, #3fcce3 100%);
}
.login-card {
  background: var(--surface-1); border-radius: 14px; padding: 34px 38px;
  width: 400px; box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.login-brand { text-align: center; margin-bottom: 20px; }
.login-brand h1 { font-size: 22px; margin: 8px 0 2px; }
.login-brand p { color: var(--ink-2); margin: 0; font-size: 13px; }
.login-wordmark { display: block; width: 190px; max-width: 70%; height: auto; margin: 0 auto 10px; }
.login-card label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 13px; }
.login-card input {
  width: 100%; padding: 9px 11px; border: 1px solid var(--baseline); border-radius: 8px;
  font-size: 14px; margin-top: 4px;
}
/* Show/hide password (#78). A reveal is the accessibility half of removing
   the •••••••• placeholder: without it there is still no way to confirm what
   was typed, which is what drives the retype-it-three-times loop on a phone
   keyboard in a van. The button sits inside the field's box rather than beside
   it so the input keeps its full width, and it is type="button" so Enter in
   the password field still submits the form. */
.pw-field { position: relative; display: block; }
.pw-field input { padding-right: 64px; }
.pw-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 600; color: var(--brand-dark);
  padding: 4px 8px; border-radius: 6px; line-height: 1;
}
.pw-toggle:hover { background: rgba(0,175,206,.12); }
.pw-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.login-error { color: var(--status-critical); margin-top: 10px; min-height: 18px; font-size: 13px; }
.login-hint { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.7; }
/* Forgot password (#329). */
.login-notice {
  color: var(--ink); background: #eaf6ea; border-left: 3px solid var(--status-good);
  border-radius: 6px; padding: 8px 10px; margin-top: 10px; font-size: 13px; line-height: 1.5;
}
.login-notice:empty { display: none; }
.login-forgot { margin: 10px 0 0; text-align: center; }
.login-sub { font-size: 16px; margin: 16px 0 4px; }
.login-help { font-size: 13px; color: var(--ink-2); margin: 0 0 4px; line-height: 1.5; }
#forgot-redeem { border-top: 1px solid var(--baseline); margin-top: 18px; padding-top: 4px; }
.link-btn {
  border: 0; background: transparent; padding: 2px 4px; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--brand-dark); text-decoration: underline;
}
.link-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ----------------------------------------------------------------- shell */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 218px; flex: 0 0 218px; background: var(--brand-dark); color: #eaf6fa;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
/* #344: the brand block is the way home. */
.brand {
  display: flex; gap: 10px; align-items: center; padding: 18px 16px 14px;
  color: inherit; text-decoration: none; cursor: pointer; border-radius: 10px; margin: 4px 6px 0;
}
.brand:hover { background: rgba(255,255,255,.06); }
.brand:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.brand-icon { width: 36px; height: 36px; border-radius: 9px; flex: 0 0 36px; }
.brand b { display: block; font-size: 17px; letter-spacing: .5px; line-height: 1.1; }
.brand small { display: block; opacity: .8; font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase; }
#nav { flex: 1; overflow-y: auto; padding: 6px 8px; }
.nav-item {
  display: flex; gap: 10px; align-items: center; width: 100%;
  padding: 9px 12px; margin: 1px 0; border: 0; background: none; color: #d6ecf3;
  border-radius: 8px; cursor: pointer; font-size: 13.5px; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.08); }
.nav-item.active { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.nav-badge {
  margin-left: auto; background: var(--status-critical); color: #fff; border-radius: 10px;
  font-size: 11px; padding: 0 7px; line-height: 17px;
}
.sidebar-footer { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.15); font-size: 12.5px; }
#whoami b { display: block; }
#whoami { margin-bottom: 8px; }
/* a11y: .muted (#898781) on the dark-blue sidebar measured 2.32:1 — far below AA.
   Scope a light variant here rather than changing the global token. */
.sidebar .muted, #whoami .muted { color: #c9dcf0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: var(--surface-1); border-bottom: 1px solid var(--grid);
  position: sticky; top: 0; z-index: 40;
}
.bell { background: none; border: 0; font-size: 19px; cursor: pointer; position: relative; }
.bell-count {
  position: absolute; top: -6px; right: -8px; background: var(--status-critical); color: #fff;
  font-size: 10px; border-radius: 9px; padding: 0 5px; line-height: 15px;
}
.notif-panel {
  position: absolute; right: 18px; top: 54px; z-index: 60; width: 420px; max-height: 480px;
  overflow-y: auto; background: var(--surface-1); border: 1px solid var(--grid);
  border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 8px;
}
.notif-item { padding: 9px 10px; border-radius: 8px; border-bottom: 1px solid var(--grid); }
.notif-item:last-child { border-bottom: 0; }
.notif-item.unread { background: #e5f7fb; }
.notif-item b { display: block; font-size: 13px; }
.notif-item small { color: var(--muted); }
.notif-item p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-2); }

.view { padding: 22px 24px 60px; }

/* ------------------------------------------------------------ components */
.btn {
  border: 1px solid var(--baseline); background: var(--surface-1); color: var(--ink);
  border-radius: 8px; padding: 7px 14px; font-size: 13px; cursor: pointer; font-weight: 500;
}
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { background: var(--status-critical); border-color: var(--status-critical); color: #fff; }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.4); color: inherit; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.wide { width: 100%; margin-top: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.grid { display: grid; gap: 16px; }
/* The same rule as .form-grid: a card's content must not widen the grid past the page. */
.grid > * { min-width: 0; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface-1); border: 1px solid var(--grid); border-radius: 12px;
  padding: 16px 18px;
}
.card h3 { font-size: 14px; color: var(--ink-2); font-weight: 600; margin-bottom: 12px; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface-1); border: 1px solid var(--grid); border-radius: 12px; padding: 14px 16px; }
.tile .num { font-size: 26px; font-weight: 700; }
.tile .lbl { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
/* The population a rate is measured over (#62). A percentage with no
   denominator beside a count with no denominator is what made
   "100% on time" and "27 past due" read as a contradiction. */
.tile .sub { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.tile.alert .num { color: var(--status-critical); }
.tile.warn .num { color: #b25f00; }
.tile.good .num { color: #006300; }

/* The governing metric (#62, AC3). Thirteen tiles at one weight let colour
   carry all the meaning and hierarchy none; the two zero-touch tiles are the
   measure the programme is judged on, so they get their own row, a heading
   that says what they count, and more weight than anything after them. */
.headline { margin-bottom: 18px; }
.headline h2 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0; }
.headline > p { font-size: 12px; margin: 2px 0 10px; }
.tiles-primary { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 0; }
.tiles-primary .tile { border: 2px solid var(--accent); padding: 18px 20px; }
.tiles-primary .tile .num { font-size: 40px; line-height: 1.1; }
.tiles-primary .tile .lbl { font-size: 14px; font-weight: 600; color: var(--ink); }
.tiles-primary .tile .sub { font-size: 12px; }

/* tables */
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; color: var(--ink-2); font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .4px; padding: 7px 10px; border-bottom: 1px solid var(--baseline);
}
table.data td { padding: 8px 10px; border-bottom: 1px solid var(--grid); vertical-align: top; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover { background: #f4f6f3; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* badges */
.badge {
  display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: 11.5px;
  font-weight: 600; border: 1px solid transparent; white-space: nowrap;
}
.b-open      { background: #eef1f6; color: #444; }
.b-scheduled { background: #e4edfa; color: #1c5cab; }
.b-enroute   { background: #fdf2d7; color: #8a6100; }
.b-onsite    { background: #dff3ea; color: #0d6b4a; }
.b-completed { background: #e2f3e2; color: #006300; }
.b-posted    { background: #ececf7; color: #4a3aa7; }
.b-cancelled { background: #f6e7e7; color: #8f2f2f; }
.b-grade-A { background: #e2f3e2; color: #006300; }
.b-grade-B { background: #fdf2d7; color: #8a6100; }
.b-grade-C { background: #fbe9e0; color: #a34411; }
.b-crit { background: #f9dcdc; color: #a02222; }
.b-high { background: #fbe9e0; color: #a34411; }
.b-norm { background: #eef1f6; color: #444; }
.b-low  { background: #f2f2ef; color: #5c5c5c; }
.b-neutral { background: #eef1f6; color: #444; }
.b-good { background: #e2f3e2; color: #006300; }
.b-bad  { background: #f9dcdc; color: #a02222; }
.b-vip  { background: #fcefc7; color: #7a5b00; }
.b-warn { background: #fdf2d7; color: #8a6100; }

/* #339 fleet capture */
.fc-bar { height: 8px; border-radius: 999px; background: var(--grid); overflow: hidden; }
.fc-bar span { display: block; height: 100%; background: var(--status-good); }
.fc-machine { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--grid); }
.fc-machine:first-of-type { border-top: 0; }
.fc-photos { grid-template-columns: repeat(2, 120px); }
.fc-missing { display: grid; place-items: center; height: 90px; border: 1px dashed var(--grid); border-radius: 8px; font-size: 11px; color: var(--muted); text-align: center; }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.dot-active { background: var(--status-good); }
.dot-issue { background: var(--status-warning); }
.dot-down { background: var(--status-critical); }
.dot-inactive { background: var(--muted); }
/* #100: a store that has not opened yet — neither healthy nor a problem. */
.dot-pending { background: transparent; border: 2px solid var(--muted); box-sizing: border-box; }
.pending-card { border-left: 3px solid var(--accent); margin-bottom: 16px; }

/* toolbar / filters */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar select, .toolbar input, .form-grid select, .form-grid input, .form-grid textarea,
.modal select, .modal input, .modal textarea {
  padding: 7px 10px; border: 1px solid var(--baseline); border-radius: 8px; font-size: 13px;
  background: var(--surface-1); font-family: inherit;
}
.toolbar .spacer { flex: 1; }
/* #632: a server-search picker in a toolbar: its box, select and count on one line. */
.picker-inline { display: inline-flex; gap: 6px; align-items: center; }
.picker-inline input[type="search"] { width: 150px; }
.picker-inline small:empty { display: none; }

/* modal */
/* #184: the dispatch map covered the Assign window, on the workflow dispatch
   runs all day. Two independent reports, and the cause is that Leaflet brings
   its own z-index scale into the page: .leaflet-pane is 400, its controls 800,
   its corners 1000 — all of which beat this overlay's 100 in the root stacking
   context, because the card holding the map creates no context of its own.

   Raising the overlay above 1000 would work until Leaflet changes a number.
   Containing the map is the fix that cannot drift: `isolation` gives the map
   container its own stacking context, so every z-index Leaflet sets is scoped
   inside it and the app's own scale below stays authoritative. Layout is
   untouched, unlike a position/z-index pair. */
.leaflet-container { isolation: isolate; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(10,25,35,.45); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px;
}
.modal {
  background: var(--surface-1); border-radius: 14px; width: 640px; max-width: 96vw;
  max-height: 86vh; overflow-y: auto; padding: 22px 24px; box-shadow: 0 24px 70px rgba(0,0,0,.35);
}
.modal.wide { width: 900px; }
.modal h3 { margin-bottom: 14px; }
/* #142: minmax(0, 1fr), not 1fr. A grid column's minimum is its content's, so one
   select with a long option (the work order types) pushed both columns past the
   dialog and made it scroll sideways. Controls fill their column instead. */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.form-grid > * { min-width: 0; }
.form-grid select, .form-grid input:not([type="checkbox"]):not([type="radio"]), .form-grid textarea { width: 100%; min-width: 0; box-sizing: border-box; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.form-grid label, .modal label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.form-grid .full { grid-column: 1 / -1; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
/* #594: a question asked in the page opens above any dialog already open, and
   below the toasts, which may report on it. */
.ask-overlay { z-index: 150; }
.ask-overlay .modal { width: 480px; }
.ask-message { white-space: pre-line; margin: 0 0 12px; }
.ask-fields { display: flex; flex-direction: column; gap: 10px; }
.ask-error { color: var(--status-critical); font-size: 12.5px; margin: 10px 0 0; }

/* #594: the session's last minutes, above the screen they would interrupt. */
.session-banner {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin: 0 24px 12px; padding: 10px 14px; border-radius: 10px;
  background: #fff6e0; border: 1px solid #f0d58a; color: var(--ink); font-size: 13px;
}
.session-banner[hidden] { display: none; }
.reauth-overlay { z-index: 160; }
.reauth-overlay .modal { width: 420px; }

/* toast */
#toast-root { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--ink); color: #fff; border-radius: 10px; padding: 11px 16px; font-size: 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); max-width: 420px; animation: slide-in .18s ease-out;
}
.toast.error { background: var(--status-critical); }
@keyframes slide-in { from { transform: translateY(12px); opacity: 0; } }

/* map */
#dispatch-map { height: 420px; border-radius: 12px; border: 1px solid var(--grid); }
/* #70: the queues take the larger share and the map a bounded one, or none; identifier
   columns never wrap, so a single-line row stays a single line. */
.dispatch-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.dispatch-layout.map-hidden { grid-template-columns: minmax(0, 1fr); }
.dispatch-layout.map-hidden .dispatch-map-card { display: none; }
@media (max-width: 1100px) { .dispatch-layout { grid-template-columns: minmax(0, 1fr); } }
table.data td.id, table.data th.id, table.data td.nowrap { white-space: nowrap; }
.dispatch-table td:first-child { white-space: nowrap; }
.dispatch-table .clip { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: clamp(16ch, 17vw, 42ch); }
/* Tabs — the store record's and Dispatch's. */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; border-bottom: 1px solid var(--grid); margin: -4px 0 12px; }
.tabs [role="tab"] { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 10px; font: inherit;
  font-size: 13px; color: var(--muted); cursor: pointer; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--series-1); font-weight: 600; }
.tabs [role="tab"]:focus-visible { outline: 2px solid var(--series-1); outline-offset: 2px; }

/* charts (inline SVG) */
/* Drill-through affordances (#122, #124, #136): a clickable count has to
   look clickable, or nobody finds it. */
.tile.click { cursor: pointer; }
.tile.click:hover { box-shadow: 0 2px 10px rgba(0,0,0,.10); transform: translateY(-1px); }
.bar-row.click { cursor: pointer; }
.bar-row.click:hover .bar-track { outline: 2px solid var(--series-2); outline-offset: 2px; }
.notif-item.click { cursor: pointer; }
.notif-item.click:hover { background: #f4f6f3; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 60px; align-items: center; gap: 10px; margin: 7px 0; font-size: 12.5px; }
.bar-track { background: transparent; height: 16px; position: relative; }
.bar-fill { height: 16px; border-radius: 0 4px 4px 0; background: var(--series-1); min-width: 2px; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* work order detail */
.wo-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.wo-head h2 { margin: 0; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 4px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.blockers { background: #fff6e8; border: 1px solid #f2ddb0; border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.blockers li { margin: 3px 0; font-size: 13px; }
.reading-flag { font-weight: 700; }
.rf-ok { color: var(--status-good); }
.rf-bad { color: var(--status-critical); }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-grid figure { margin: 0; }
.photo-grid img { width: 100%; border-radius: 8px; border: 1px solid var(--grid); }
.photo-grid figcaption { font-size: 11px; color: var(--muted); margin-top: 2px; }

.chat-box { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.chat-msg { max-width: 75%; padding: 8px 12px; border-radius: 12px; font-size: 13px; background: #eef1f6; align-self: flex-start; }
.chat-msg.mine { background: #d2f1f8; align-self: flex-end; }
.chat-msg small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 2px; }
.chat-send { display: flex; gap: 8px; margin-top: 10px; }
.chat-send input { flex: 1; }

.sig-img { max-width: 260px; border: 1px solid var(--grid); border-radius: 8px; background: #fff; }

.md h1, .md h2, .md h3 { margin: 12px 0 6px; }
.md ul, .md ol { padding-left: 22px; }
.md p { margin: 6px 0; }

.muted { color: var(--muted); }
.right { text-align: right; }
.mt { margin-top: 14px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; }

/* IAM: the one-time password is meant to be read aloud once, so it is set large,
   monospaced and unambiguous rather than styled as ordinary body copy. */
.temp-password {
  margin: 14px 0; padding: 12px 14px; text-align: center;
  background: #f2f2ef; border: 1px solid var(--series-1); border-radius: 8px;
}
.temp-password code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 20px; font-weight: 600; letter-spacing: 0.08em; user-select: all;
}

/* #187: a technician's month. Booked work is solid, projected route visits are
   outlined — never the same look, because one is a work order and the other is
   the agreement engine's intention as things stand today. */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px;
  background: var(--grid); border: 1px solid var(--grid); border-radius: 10px; overflow: hidden; }
.cal-head { background: var(--page); font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; }
.cal-day { background: var(--surface-1); min-height: 92px; padding: 6px; display: flex;
  flex-direction: column; gap: 3px; min-width: 0; }
.cal-day.out { background: var(--page); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--series-1); }
.cal-num { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-item { font-size: 11px; line-height: 1.25; padding: 3px 5px; border-radius: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-item.booked { background: #e4edfa; color: #1c5cab; cursor: pointer; }
.cal-item.booked.done { background: #eef1f6; color: #444; }
.cal-item.projected { border: 1px dashed var(--baseline); color: var(--ink-2); background: transparent; }
.cal-item.projected.covering { border-color: #8a6100; color: #8a6100; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.cal-legend .cal-item { display: inline-block; }

/* #76: the screen on show, while it re-renders after a save. */
/* …and a region of it, while a save that names it is with the server. */
.view.refreshing, .view .refreshing { opacity: .55; transition: opacity .12s ease-in; }
@media (prefers-reduced-motion: reduce) { .view.refreshing, .view .refreshing { transition: none; } }

/* Dispatch map with no basemap provider configured - see /api/settings mapTiles. */
.map-unconfigured{display:flex;flex-direction:column;justify-content:center;align-items:center;
  height:100%;min-height:220px;padding:24px;text-align:center;color:#5A6478;
  background:#F5F6F7;border-radius:8px;font-size:14px;}
