/* View-specific styles: work order card, detail screen, inventory, photos. */

/* ---------- Work order card ---------- */

.wo-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4) var(--s-8);
  max-width: var(--content-max);
  margin-inline: auto;
}

/* Container only — the tappable pieces are .wo-open and .wo-map inside it. */
.wo-card {
  display: flex;
  align-items: stretch;
  width: 100%;
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Priority as a colored rail: readable at a glance, doesn't fight the title. */
.wo-rail {
  flex: none;
  width: 5px;
  background: var(--prio-0);
}
.wo-card[data-priority="1"] .wo-rail { background: var(--prio-1); }
.wo-card[data-priority="2"] .wo-rail { background: var(--prio-2); }

/* Primary target: opens the work order. Fills everything except the map column. */
.wo-open {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4);
  text-align: left;
  color: var(--text);
  transition: background var(--dur-fast) var(--ease-out);
}
.wo-open:active { background: var(--surface-sunk); }

/* Accessory target: Directions. Its own column behind a divider so a thumb aiming
   at the card can't hit it by accident. */
.wo-map {
  flex: none;
  width: var(--tap-min);
  display: grid;
  place-items: center;
  color: var(--accent-text);
  border-left: 1px solid var(--border);
  transition: background var(--dur-fast) var(--ease-out);
}
.wo-map:active { background: var(--accent-soft); }
.wo-map .ico { width: 19px; height: 19px; }

/* Every nested flex box needs min-width:0. A flex item defaults to min-width:auto,
   which refuses to shrink below its min-content size — one nowrap pill or timestamp
   then pushes the whole page wider than the viewport and the tab bar scrolls off. */
.wo-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-2);
  min-width: 0;
}
.wo-title {
  min-width: 0;
  font-size: var(--text-md);
  font-weight: var(--weight-semi);
  line-height: var(--leading-snug);
  color: var(--text);
}
.wo-unit {
  min-width: 0;
  font-size: var(--text-sm);
  color: var(--text-dim);
}
/* Plain text now, not a link — the link moved to the .wo-map accessory. */
.wo-addr-text {
  min-width: 0;
  font-size: var(--text-sm);
  color: var(--text-faint);
}

.wo-foot {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-width: 0;
  font-size: var(--text-xs);
  color: var(--text-faint);
  white-space: nowrap;
}
.wo-foot > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wo-foot .wo-num { font-weight: var(--weight-semi); color: var(--text-dim); }
.wo-foot .dot::before { content: "·"; margin: 0 2px; }

.wo-sync {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-2xs);
  font-weight: var(--weight-bold);
  color: var(--warn-text);
}
.wo-sync .ico { width: 13px; height: 13px; }

/* ---------- Detail: hero ---------- */

.hero {
  position: relative;
  background: var(--surface-alt);
}
.hero img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}
/* Shown when the unit photo 404s, which is common. Beats the browser's
   broken-image glyph and keeps the hero's height so nothing shifts. */
.hero-fallback {
  height: 210px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--blue-800), var(--blue-600));
  color: rgb(255 255 255 / 45%);
}
.hero-fallback .ico { width: 54px; height: 54px; }
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 58%;
  background: linear-gradient(to top, rgb(6 10 18 / 88%), transparent);
  pointer-events: none;
}
.hero-body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4);
  color: var(--white);
}
.hero-body h1 {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  text-shadow: 0 1px 3px rgb(0 0 0 / 45%);
}
.hero-body .sub {
  font-size: var(--text-sm);
  opacity: 0.9;
  text-shadow: 0 1px 3px rgb(0 0 0 / 45%);
}
.hero-dir {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 var(--s-3);
  border-radius: var(--r-full);
  background: rgb(255 255 255 / 94%);
  color: var(--blue-700);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}
.hero-dir .ico { width: 16px; height: 16px; }

.hero-pills {
  position: absolute;
  top: var(--s-3);
  left: var(--s-3);
  right: var(--s-3);
  z-index: 1;
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
}

/* ---------- Detail: step indicator ---------- */

.steps {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
}
.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--text-2xs);
  font-weight: var(--weight-semi);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.step .bar {
  height: 4px;
  border-radius: var(--r-full);
  background: var(--border);
  transition: background var(--dur-slow) var(--ease-out);
}
.step[data-on="1"] { color: var(--accent-text); }
.step[data-on="1"] .bar { background: var(--accent); }
.step[data-done="1"] { color: var(--ok-text); }
.step[data-done="1"] .bar { background: var(--ok); }

/* ---------- Detail: content ---------- */

.detail-body {
  max-width: var(--content-max);
  margin-inline: auto;
  /* Bottom padding clears the sticky .action-dock. A sticky element occupies its own
     flow space, but while it's stuck above that position it overlaps whatever precedes
     it — without this the last cards sit underneath the End Job button. */
  padding: 0 var(--s-4) calc(50px + var(--s-6));
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.kv { display: flex; flex-direction: column; gap: var(--s-3); }
.kv-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
}
.kv-row dt {
  flex: none;
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kv-row dd {
  margin: 0;
  text-align: right;
  font-size: var(--text-sm);
  color: var(--text);
  min-width: 0;
  overflow-wrap: anywhere;
}

.prose {
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.prose.empty-text { color: var(--text-faint); font-style: italic; }

/* ---------- Notes ---------- */

.notes-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  color: var(--text-faint);
  min-height: 18px;
}
.notes-status[data-state="saving"] { color: var(--accent-text); }
.notes-status[data-state="saved"]  { color: var(--ok-text); }
.notes-status[data-state="queued"] { color: var(--warn-text); }
.notes-status[data-state="error"]  { color: var(--danger-text); }
.notes-status .ico { width: 13px; height: 13px; }

@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}
.shake { animation: shake 0.5s var(--ease-in-out); }

/* ---------- Inventory ---------- */

.inv-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) 0;
}
.inv-row + .inv-row { box-shadow: inset 0 1px 0 var(--border); }
.inv-qty {
  min-width: 30px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: var(--r-xs);
  background: var(--surface-alt);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
}
.inv-desc { min-width: 0; font-size: var(--text-sm); }
.inv-amount { font-size: var(--text-sm); font-weight: var(--weight-semi); font-variant-numeric: tabular-nums; }
.inv-row[data-pending="1"] { opacity: 0.6; }

.inv-total {
  display: flex;
  justify-content: space-between;
  padding-top: var(--s-3);
  margin-top: var(--s-2);
  border-top: 1px solid var(--border);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
}

.inv-form {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--s-2);
}
.inv-form .span-2 { grid-column: 1 / -1; }

/* ---------- Photos ---------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: var(--s-2);
}
.photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-alt);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-del {
  position: absolute;
  top: 4px; right: 4px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: rgb(8 12 20 / 62%);
  color: var(--white);
  backdrop-filter: blur(4px);
}
.photo-del .ico { width: 14px; height: 14px; }

.photo-progress {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(8 12 20 / 45%);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}
.photo[data-error="1"]::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 2px var(--danger);
  border-radius: var(--r-sm);
}

.photo-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  border: 1.5px dashed var(--border-strong);
  color: var(--text-faint);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semi);
}
.photo-add .ico { width: 22px; height: 22px; }

/* Fullscreen viewer */
#viewer {
  position: fixed;
  inset: 0;
  z-index: var(--z-viewer);
  display: grid;
  place-items: center;
  background: rgb(4 6 10 / 96%);
}
#viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  touch-action: pinch-zoom;
}
#viewer .close {
  position: absolute;
  top: calc(var(--sat) + var(--s-3));
  right: var(--s-3);
  width: var(--tap-min); height: var(--tap-min);
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: rgb(255 255 255 / 14%);
  color: var(--white);
}

/* ---------- Copyable value rows (keys, wifi, codes) ---------- */

.copy-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  min-height: 52px;
  padding: var(--s-2) 0;
  text-align: left;
}
.copy-row + .copy-row { box-shadow: inset 0 1px 0 var(--border); }
.copy-row .label { flex: 1 1 auto; min-width: 0; font-size: var(--text-sm); color: var(--text-dim); }
.copy-row .value {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: var(--weight-semi);
  letter-spacing: 0.02em;
}
.copy-row .copy-ico { flex: none; width: 18px; height: 18px; color: var(--text-faint); }
button.copy-row:active { opacity: 0.6; }

/* Read-only values (router model, TV count, ISP). Words, so not mono — and right-aligned
 * so they still share a column edge with the mono values above and below them. */
.copy-row .value-text {
  font-family: inherit;
  font-size: var(--text-md);
  letter-spacing: normal;
  text-align: right;
}

/* Connect-a-device row. Two trailing icons, so the chevron carries "this opens something"
   and the QR glyph says what. */
.connect-row .copy-ico + .copy-ico { margin-left: calc(var(--s-2) * -1); }

/* The code itself. Sized in vmin so it stays scannable on a small phone without running off
   a large one — a scanner needs physical size, not CSS pixels. White plate always, including
   in dark mode: an inverted QR does not scan. */
.qr-holder {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: var(--s-3);
  border-radius: var(--r-md);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--border);
}
.qr-code {
  width: min(62vmin, 300px);
  height: min(62vmin, 300px);
  display: block;
  /* Crisp module edges instead of the browser smoothing them into grey. */
  shape-rendering: crispEdges;
}
.qr-hint { text-align: center; margin: 0; }

/* WiFi encryption state — deliberately quiet, sitting after the network name rather than
   taking a banner. The open case adds a word because the icon alone can't carry it. */
.sec-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  color: var(--ok-text);
}
.sec-badge .ico { width: 15px; height: 15px; }
.sec-badge.is-open { color: var(--warn-text); font-weight: var(--weight-semi); }

/* ---------- Map ---------- */

/* Fills the view exactly: the canvas takes the slack and the note strip pins to the bottom,
   so nothing here scrolls and every drag reaches Leaflet. */
.map-view {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
/* The map and its empty-state overlay share one box, so the overlay can sit on top of a
   live map instead of replacing it. */
.map-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;         /* without this the flex child refuses to shrink and overflows */
}
.map-canvas {
  position: absolute;
  inset: 0;
  background: var(--surface-alt);
}
.map-overlay:empty { display: none; }
.map-overlay {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 500;          /* over Leaflet's panes, under its controls (600+) */
  padding: var(--s-3);
  pointer-events: none;  /* never blocks a pan */
}
.map-overlay-card {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.map-overlay-card .ico { flex: none; width: 20px; height: 20px; color: var(--text-dim); }
.map-loading {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  color: var(--text-faint);
  font-size: var(--text-sm);
}
.map-loading .ico { width: 28px; height: 28px; }

/* Leaflet paints its own chrome; keep it inside our type and colour system. */
.map-canvas .leaflet-container { font: inherit; background: var(--surface-alt); }
.map-canvas .leaflet-control-attribution {
  font-size: var(--text-2xs);
  background: rgb(255 255 255 / 78%);
}
.map-canvas .leaflet-bar a {
  width: 34px; height: 34px; line-height: 34px;
  color: var(--text); background: var(--surface);
}

/* Pins. Colour carries status, the ring carries "more than one job here", and the flag
   state gets a halo — three signals a tech can read at arm's length without tapping. */
.map-pin {
  border-radius: var(--r-full);
  border: 2.5px solid var(--white);
  box-shadow: 0 1px 4px rgb(0 0 0 / 45%);
  background: var(--text-dim);
}
.map-pin-open   { background: var(--accent); }
.map-pin-active { background: var(--accent-text); }
.map-pin-paused { background: var(--warn-text); }
.map-pin-done   { background: var(--ok-text); }
.map-pin-flag1  { background: var(--danger-text); }
.map-pin-flag2  { background: var(--warn-text); }
.map-pin.is-flag { box-shadow: 0 1px 4px rgb(0 0 0 / 45%), 0 0 0 4px rgb(239 68 68 / 35%); }
.map-pin.is-multi { border-width: 4px; }

/* "You are here" — a class because Leaflet writes colours into SVG attributes, which do
   not resolve CSS custom properties. */
.map-me { fill: var(--accent); fill-opacity: 1; stroke: var(--white); }

/* Off-map jobs. A full-width strip rather than a toast: it is a standing fact about the
   current filter, not an event, and it has to stay tappable. */
.map-note:empty { display: none; }
.map-note { flex: none; border-top: 1px solid var(--border); background: var(--surface); }
.map-note-btn {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--s-3) var(--s-4);
  padding-bottom: calc(var(--s-3) + var(--sab));
  text-align: left;
  font-size: var(--text-sm);
  color: var(--warn-text);
}
.map-note-btn > span { flex: 1 1 auto; }
.map-note-btn .ico { flex: none; width: 18px; height: 18px; }
.map-note-btn .chev { color: var(--text-faint); }

/* The red-flag toggle is not a status, so it reads as a distinct control even when both
   it and the status chips are active. */
.map-chips .map-flag-toggle[aria-pressed="true"] {
  background: var(--danger-soft);
  color: var(--danger-text);
}

/* Job rows inside the map sheets. */
.map-job-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  min-height: 56px;
  padding: var(--s-2) 0;
  text-align: left;
}
.map-job-row + .map-job-row { box-shadow: inset 0 1px 0 var(--border); }
.map-job-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.map-job-title { font-weight: var(--weight-semi); }
.map-job-meta { color: var(--text-faint); }
.map-job-row .chev { flex: none; color: var(--text-faint); }
.map-job-row:active { opacity: 0.6; }

/* ---------- Login ---------- */

.login-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-6);
  padding: var(--s-8) var(--s-5) calc(var(--s-8) + var(--sab));
  max-width: 420px;
  margin-inline: auto;
}
.login-mark {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  background: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.login-mark .ico { width: 32px; height: 32px; }
.login-wrap h1 { font-size: var(--text-2xl); font-weight: var(--weight-bold); }

/* ---------- Login: keypad ----------
   The sign-in screen is deliberately dark in both themes. It is a brand moment with no
   content to read, the tech sees it for four seconds, and a fixed dark field makes the
   keypad the only lit thing on screen. */

/* --login-bg lives in tokens.css (every custom property does — check-assets enforces it)
   and is shared with login.html's <body>, because the wrap is a 420px column and the
   gradient has to reach the edges of a tablet window, not stop at the content. */
.login-wrap {
  justify-content: center;
  gap: var(--s-5);
  background: var(--login-bg);
  color: #eaf2ff;
}
.login-wrap .pin-brand { text-align: center; display: grid; gap: var(--s-2); justify-items: center; }
.login-wrap .pin-brand h1 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: #7db4f5;
  margin: 0;
}
.pin-tagline { margin: 0; font-size: var(--text-sm); color: rgb(234 242 255 / 55%); }

.pin-mark {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  color: #f5b301;
  /* The glow is the mark's only background — a filled tile would read as a button. */
  filter: drop-shadow(0 0 14px rgb(245 179 1 / 45%));
}
.pin-mark .ico { width: 40px; height: 40px; stroke-width: 1.6; }

/* Entry slots. Digits are shown rather than dotted; an empty slot is a dim ring so the
   row reads as "this many so far" at a glance. */
.pin-slots {
  display: flex;
  justify-content: center;
  gap: var(--s-3);
  min-height: 34px;
}
.pin-slot {
  width: 30px; height: 34px;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: var(--weight-semi);
  color: #eaf2ff;
  border-bottom: 2px solid rgb(234 242 255 / 22%);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.pin-slot.is-filled { border-bottom-color: #7db4f5; }

.pin-error {
  min-height: 1.2em;             /* reserved, so an error never shifts the keypad */
  text-align: center;
  font-size: var(--text-sm);
  color: #ffb4ab;
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
  max-width: 300px;
  width: 100%;
  margin-inline: auto;
}
.pin-key {
  height: 64px;                  /* well over the 44px minimum: gloves, one hand, moving van */
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: rgb(255 255 255 / 7%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 8%);
  color: #eaf2ff;
  font-size: var(--text-xl);
  font-weight: var(--weight-semi);
  font-variant-numeric: tabular-nums;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.pin-key:active { background: rgb(255 255 255 / 16%); transform: scale(0.96); }
.pin-key-blank { pointer-events: none; }
.pin-key-back { color: #ff8f85; }
.pin-key-back .ico { width: 24px; height: 24px; }

.pin-submit { margin-top: var(--s-2); }
.pin-submit:disabled { opacity: 0.45; }
.login-wrap .pin-forgot { color: rgb(234 242 255 / 62%); }

@media (prefers-reduced-motion: reduce) {
  .pin-key:active { transform: none; }
}

/* Short phones: the keypad is the thing that must survive, so the mark gives up its space
   before the keys do. */
@media (max-height: 700px) {
  .login-wrap { gap: var(--s-3); padding-block: var(--s-5); }
  .pin-mark { width: 40px; height: 40px; }
  .pin-mark .ico { width: 28px; height: 28px; }
  .pin-key { height: 54px; }
}

/* ---------- Me ---------- */

.me-head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-5) var(--s-4);
}
.me-avatar {
  width: 52px; height: 52px;
  flex: none;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent-text);
}
.me-avatar .ico { width: 26px; height: 26px; }

/* ---------- Units screen ---------- */

.unit-list {
  display: flex;
  flex-direction: column;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: var(--s-3) var(--s-4) 0;
  gap: 1px;
}

.unit-row {
  display: flex;
  background: var(--surface);
  overflow: hidden;
}
/* Rounded ends only, so a long list reads as one grouped table rather than
   dozens of floating cards. */
.unit-row:first-child { border-radius: var(--r-md) var(--r-md) 0 0; }
.unit-row:last-child  { border-radius: 0 0 var(--r-md) var(--r-md); }
.unit-row:only-child  { border-radius: var(--r-md); }

.unit-open {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 58px;
  padding: var(--s-2) var(--s-4);
  text-align: left;
  color: var(--text);
  transition: background var(--dur-fast) var(--ease-out);
}
.unit-open:active { background: var(--surface-sunk); }

/* Fixed width and tabular figures so the numbers form a scannable column. */
.unit-no {
  flex: none;
  width: 58px;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.unit-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.unit-name {
  min-width: 0;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
}
.unit-detail {
  min-width: 0;
  font-size: var(--text-xs);
  color: var(--text-faint);
}

.unit-more { min-height: 1px; }

/* ---------- Reservations ---------- */

.res-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) 0;
  min-width: 0;
}
.res-row + .res-row { box-shadow: inset 0 1px 0 var(--border); }

.res-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.res-guest {
  min-width: 0;
  font-size: var(--text-md);
  font-weight: var(--weight-semi);
}
.res-row[data-emphasis="1"] .res-guest { color: var(--danger-text); }
.res-stay { color: var(--text-dim); }

.res-meta {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.t-2xs { font-size: var(--text-2xs); }

/* Skeleton matches the banner + two rows it replaces, so nothing jumps. */
.res-skel .skel-line { height: 14px; }
.res-skel .skel-line:first-child { height: 52px; border-radius: var(--r-sm); }
