/* Siebert Clean — components that only the cleaner app has.
 * Same rules as the rest of the ecosystem: semantic tokens only (never a raw hex), 44px
 * targets, 16px inputs. Loaded after tech2's tokens/base/components/views. */

/* The hidden attribute must win over component display rules (.progress-card is a grid,
 * which otherwise left an empty white bar on screen with no jobs). */
[hidden] { display: none !important; }

/* Installed-app shell: extend past the bottom by the measured iOS viewport shortfall
 * (index.html sets --app-gap; 0 everywhere else). */
#app { bottom: calc(0px - var(--app-gap, 0px)); }

/* ---------- Readability ----------
 * Cleaners read this at arm's length, outdoors, often mid-task. Every tech2 size is in
 * rem, so one root bump scales the whole type ramp; the headline pieces below go further. */
html[data-app="clean"] { font-size: 17px; }

/* ---------- Today's progress ---------- */
.progress-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--s-4);
  /* Same inset and max width as tech2's .wo-list, so the card lines up with the jobs. */
  margin: var(--s-3) var(--s-4) 0;
  display: grid;
  gap: var(--s-2);
}
@media (min-width: 752px) { .progress-card { max-width: calc(var(--content-max) - 2 * var(--s-4)); margin-inline: auto; } }
.progress-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.progress-label { font-size: var(--text-sm); font-weight: var(--weight-semi); color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.progress-big { font-size: var(--text-2xl); font-weight: var(--weight-bold); line-height: var(--leading-tight); font-variant-numeric: tabular-nums; }
.progress-bar { height: 12px; border-radius: var(--r-full); background: var(--surface-alt); overflow: hidden; }
.progress-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--ok); transition: width var(--dur-slow) var(--ease-out); }
.progress-note { display: flex; align-items: center; gap: var(--s-2); font-size: var(--text-md); color: var(--text-dim); }
.dot-info { width: 10px; height: 10px; border-radius: var(--r-full); background: var(--accent); flex: none; }

/* ---------- Job list ---------- */
.job-list {
  display: grid;
  gap: var(--s-5);
  padding: var(--s-4) var(--s-4) var(--s-8);
  max-width: var(--content-max);
  margin-inline: auto;
}
.job-group { display: grid; gap: var(--s-3); }
.job-group-title {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin: 0;
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text);
}
.job-group[data-group="earlier"] .job-group-title { color: var(--warn-text); }
.job-group-count {
  min-width: 28px; height: 28px; padding: 0 8px;
  display: inline-grid; place-items: center;
  border-radius: var(--r-full);
  background: var(--surface-alt);
  font-size: var(--text-sm);
  color: var(--text-dim);
}

.job-card {
  position: relative;
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.job-rail { width: 8px; flex: none; background: var(--border-strong); }
.job-card[data-status="in_progress"] .job-rail { background: var(--accent); }
.job-card[data-status="completed"] .job-rail { background: var(--ok); }
.job-card[data-guests-today="1"] .job-rail { background: var(--danger); }

.job-open {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: var(--s-2);
  padding: var(--s-4);
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.job-open:active { background: var(--surface-sunk); }
.job-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.job-unit {
  font-size: 1.65rem; /* about 28px: the number on the house */
  font-weight: var(--weight-bold);
  line-height: 1.1;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.job-status { flex: none; font-size: var(--text-sm); }
.job-name { font-size: var(--text-lg); color: var(--text-dim); line-height: var(--leading-snug); }
.job-card[data-status="completed"] .job-unit,
.job-card[data-status="completed"] .job-name { color: var(--text-dim); }

.job-tags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-1); }
.big-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--r-md);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
}
.big-tag .ico { width: 20px; height: 20px; flex: none; }

.job-sync { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--accent-text); }
.job-sync .ico { width: 18px; height: 18px; }
.job-sync.is-failed { color: var(--danger-text); }

.job-map {
  flex: none;
  width: 56px;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--border);
  color: var(--accent-text);
}
.job-map .ico { width: 24px; height: 24px; }

/* ---------- Detail ---------- */
.hero-compact, .hero-compact img, .hero-compact .hero-fallback { height: 200px; }
.hero-unit { font-size: 2rem; line-height: 1.05; margin: 0; font-variant-numeric: tabular-nums; }
.hero-name { font-size: var(--text-lg); opacity: .95; }
.hero-date { font-size: var(--text-md); font-weight: var(--weight-semi); opacity: .9; }

/* 6-column grid: full-width tiles span 6, pairs span 3, the three numbers span 2. */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-3); }
.tiles > .tile { grid-column: span 3; }
.tiles > .tile-num { grid-column: span 2; }
.tiles > .tile-wide { grid-column: 1 / -1; }

.tile {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 88px;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
}
.tile-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tile-label .ico { width: 18px; height: 18px; flex: none; }
.tile-value { font-size: var(--text-2xl); font-weight: var(--weight-bold); line-height: 1.15; }
.tile-value-md { font-size: var(--text-xl); }
.tile-num { padding: var(--s-3); }
.tile-num .tile-value { font-size: 1.85rem; font-variant-numeric: tabular-nums; }
.tile-hint { font-size: var(--text-sm); color: var(--text-dim); }
.tile-sub { font-size: var(--text-md); font-weight: var(--weight-semi); color: var(--text-dim); }
.tile.is-urgent .tile-sub { color: var(--danger-text); }

.tile.is-urgent { background: var(--danger-soft); border-color: transparent; }
.tile.is-urgent .tile-label, .tile.is-urgent .tile-value { color: var(--danger-text); }

.tile-beds { border-color: transparent; }
.tile-beds .tile-value { font-size: 1.85rem; }
.tile-beds.is-make  { background: var(--ok-soft); }
.tile-beds.is-make .tile-label, .tile-beds.is-make .tile-value { color: var(--ok-text); }
.tile-beds.is-strip { background: var(--accent-soft); }   /* routine, so blue: red is for guests arriving today */
.tile-beds.is-strip .tile-label, .tile-beds.is-strip .tile-value { color: var(--accent-text); }
.tile-beds.is-call  { background: var(--warn-soft); }
.tile-beds.is-call .tile-label, .tile-beds.is-call .tile-value { color: var(--warn-text); }

.tile-code { cursor: pointer; }
.tile-code:active { background: var(--surface-sunk); }
.code-digits { font-family: var(--font-mono); font-size: 2.2rem; letter-spacing: .2em; }

.notes-card {
  margin-block: var(--s-1);
  display: grid;
  gap: var(--s-2);
  padding: var(--s-4);
  border-radius: var(--r-lg);
  background: var(--warn-soft);
  border-left: 6px solid var(--warn);
}
.notes-title { display: flex; align-items: center; gap: var(--s-2); font-weight: var(--weight-bold); font-size: var(--text-md); color: var(--warn-text); text-transform: uppercase; letter-spacing: .04em; }
.notes-title .ico { width: 20px; height: 20px; }
.notes-text { margin: 0; font-size: var(--text-lg); line-height: var(--leading-snug); color: var(--text); white-space: pre-wrap; }

.status-block { display: grid; gap: var(--s-2); }
.times-line { display: flex; align-items: center; gap: var(--s-2); font-size: var(--text-md); color: var(--text-dim); }
.times-line .ico { width: 18px; height: 18px; flex: none; }

.big-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.big-actions .btn { min-height: 64px; white-space: normal; line-height: 1.2; }
.big-actions-wide { grid-column: 1 / -1; }

.pill .ico { width: 14px; height: 14px; margin-right: 4px; }
.pill { display: inline-flex; align-items: center; }

/* ---------- Photo picker ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: var(--s-2);
}
.photo-thumb, .photo-add {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 0;
  border-radius: var(--r-full);
  background: var(--scrim);
  color: var(--white);
  cursor: pointer;
}
.photo-remove .ico { width: 16px; height: 16px; }
.photo-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  border: 1.5px dashed var(--border-strong);
  background: var(--surface-sunk);
  color: var(--accent-text);
  font: inherit;
  font-size: var(--text-xs);
  cursor: pointer;
}
.photo-add .ico { width: 24px; height: 24px; }

/* ---------- Big form controls (views/controls.js) ----------
 * Short option sets are large buttons, not dropdowns: every option visible, the choice
 * obvious at a glance, 48px targets. */
.choice-field { display: grid; gap: var(--s-2); }
.choice-label { font-size: var(--text-md); font-weight: var(--weight-bold); color: var(--text); }
.choice-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: var(--s-2); }
.choice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 var(--s-2);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--text-md);
  font-weight: var(--weight-semi);
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
}
.choice-btn .ico { width: 18px; height: 18px; flex: none; }
.choice-btn[aria-checked="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-brand);
}
.choice-btn:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }

.stepper { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: var(--s-2); max-width: 260px; }
.stepper-btn {
  height: 52px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--accent-text);
  font: inherit;
  font-size: 1.6rem;
  font-weight: var(--weight-bold);
  line-height: 1;
  cursor: pointer;
}
.stepper-btn:disabled { opacity: .35; cursor: default; }
.stepper-value { text-align: center; font-size: var(--text-2xl); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }

.big-select {
  width: 100%;
  min-height: 52px;
  font-size: var(--text-lg);
  font-weight: var(--weight-semi);
}

/* ---------- Inventory item cards ---------- */
.inv-card {
  display: grid;
  gap: var(--s-4);
  padding: var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-sunk);
}
.inv-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.inv-card-title { font-size: var(--text-lg); font-weight: var(--weight-bold); }
.inv-remove { color: var(--danger-text); }

/* ---------- Guide ---------- */
/* Single-column grids are pinned to the container width: an implicit grid column sizes to
 * its widest content, which pushed the guide cards ~30px past the edge of a phone screen. */
.guide, .guide-rooms, .check-list, .photocheck, .job-list, .job-group, .tiles, .big-actions, .progress-card, .spot-card, .inv-card { min-width: 0; }
.guide, .guide-rooms, .check-list, .photocheck, .job-list, .job-group { grid-template-columns: minmax(0, 1fr); }
.guide { display: grid; gap: var(--s-4); padding: var(--s-3) var(--s-4) var(--s-8); max-width: var(--content-max); margin-inline: auto; }
.guide .progress-card { margin: 0; }
.guide-banner { margin: 0; }

.guide-before {
  display: grid;
  gap: var(--s-2);
  padding: var(--s-4);
  border-radius: var(--r-lg);
  background: var(--warn-soft);
  border-left: 6px solid var(--warn);
}
.guide-before-title { display: flex; align-items: center; gap: var(--s-2); font-weight: var(--weight-bold); font-size: var(--text-md); color: var(--warn-text); text-transform: uppercase; letter-spacing: .04em; }
.guide-before-title .ico { width: 20px; height: 20px; }
.guide-before-list { margin: 0; padding-left: 1.2em; display: grid; gap: var(--s-2); font-size: var(--text-lg); line-height: var(--leading-snug); color: var(--text); }

.guide-rooms-title { margin-top: var(--s-2); }
.guide-rooms { display: grid; gap: var(--s-2); }
.guide-room-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 72px;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.guide-room-row:active { background: var(--surface-sunk); }
.guide-room-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-text); }
.guide-room-icon .ico { width: 22px; height: 22px; }
.guide-room-row.is-done .guide-room-icon { background: var(--ok-soft); color: var(--ok-text); }
.guide-room-name { font-size: var(--text-lg); font-weight: var(--weight-bold); line-height: 1.2; }
.guide-room-bar { display: block; height: 6px; margin-top: 8px; border-radius: var(--r-full); background: var(--surface-alt); overflow: hidden; }
.guide-room-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.guide-room-count { flex: none; font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--text-dim); font-variant-numeric: tabular-nums; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.check-row {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  min-height: 60px;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.check-row:active { background: var(--surface-sunk); }
.check-box {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border: 2px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--white);
}
.check-box .ico { width: 20px; height: 20px; stroke-width: 3; }
.check-text { flex: 1; padding-top: 3px; font-size: var(--text-lg); line-height: var(--leading-snug); }
.check-row.is-on { background: var(--ok-soft); border-color: transparent; }
.check-row.is-on .check-box { background: var(--ok); border-color: var(--ok); }
.check-row.is-on .check-text { color: var(--text-dim); text-decoration: line-through; }
.guide-room-nav { padding-top: var(--s-2); }

/* ---------- Photo check ---------- */
.tile-photos { cursor: pointer; background: var(--accent-soft); border-color: transparent; }
.tile-photos .tile-label, .tile-photos .tile-value { color: var(--accent-text); }
.tile-photos.is-complete { background: var(--ok-soft); }
.tile-photos.is-complete .tile-label, .tile-photos.is-complete .tile-value { color: var(--ok-text); }

.photocheck { display: grid; gap: var(--s-4); }
.photocheck-intro { margin: 0; font-size: var(--text-lg); line-height: var(--leading-snug); }
.photocheck-progress { display: grid; gap: var(--s-2); }
.spot-card {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.spot-card.is-done { background: var(--ok-soft); border-color: transparent; }
.spot-head { display: flex; align-items: flex-start; gap: var(--s-3); }
.spot-num {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--text-on-brand);
  font-weight: var(--weight-bold);
  font-size: var(--text-lg);
}
.spot-card.is-done .spot-num { background: var(--ok); }
.spot-num .ico { width: 20px; height: 20px; stroke-width: 3; }
.spot-label { font-size: var(--text-xl); font-weight: var(--weight-bold); line-height: 1.2; }
.spot-hint { margin-top: 2px; font-size: var(--text-md); color: var(--text-dim); line-height: var(--leading-snug); }
.spot-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: var(--text-sm); font-weight: var(--weight-semi); color: var(--text-dim); }
.spot-status .ico { width: 16px; height: 16px; }
.spot-status.is-uploaded { color: var(--ok-text); }
.spot-status.is-queued { color: var(--accent-text); }
.spot-status.is-failed { color: var(--danger-text); }
.spot-thumb {
  display: grid; place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-alt);
  color: var(--text-faint);
}
.spot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spot-thumb .ico { width: 32px; height: 32px; }
.photocheck-footer { display: grid; gap: var(--s-2); padding-top: var(--s-2); }

.photo-viewer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.viewer-item { margin: 0; display: grid; gap: var(--s-1); }
.viewer-item figcaption { font-size: var(--text-sm); font-weight: var(--weight-semi); }

/* ---------- History ---------- */
.history-day + .history-day { margin-top: var(--s-4); }
.history-icon { color: var(--ok-text); }
.history-item + .history-item, .history-item + .list-row, .list-row + .history-item { border-top: 1px solid var(--border); }
.history-photos {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--tap-min);
  padding: 0 var(--s-4) var(--s-3) calc(var(--s-4) + 40px);
  border: 0;
  background: none;
  color: var(--accent-text);
  font: inherit;
  font-weight: var(--weight-semi);
  text-align: left;
  cursor: pointer;
}
.history-photos .ico { width: 20px; height: 20px; }
.history-photos .chev { margin-left: auto; }

/* ---------- Login extras ---------- */
.login-lang {
  position: absolute;
  top: calc(var(--sat) + var(--s-3));
  right: calc(var(--sar) + var(--s-3));
  min-height: var(--tap-min);
  color: var(--white);
}
/* Room above the logo for the language button, which otherwise sits on it at 320px. */
[data-app="clean"] .login-wrap { padding-top: calc(var(--sat) + var(--tap-min) + var(--s-4)); }
/* The instruction is what tells a cleaner what to type; it was the faintest text on screen. */
[data-app="clean"] .pin-tagline { font-size: var(--text-lg); color: rgb(234 242 255 / 85%); }
[data-app="clean"] .pin-slot { border-bottom-color: rgb(234 242 255 / 45%); }
[data-app="clean"] .pin-slot.is-filled { border-bottom-color: #7db4f5; }
/* Disabled Next: still visibly a button, just not lit. */
[data-app="clean"] .pin-submit:disabled { opacity: 0.6; background: var(--blue-600); }
/* Short phones (an SE in Safari is ~548px of page): the keys give up a little height and the
   logo shrinks, so Next and Forgot PIN fit without scrolling. */
@media (max-height: 640px) {
  [data-app="clean"] .login-wrap { gap: var(--s-2); padding-top: calc(var(--sat) + var(--tap-min) + var(--s-3)); padding-bottom: calc(var(--s-3) + var(--sab)); }
  [data-app="clean"] .pin-key { height: 48px; }     /* still over the 44px minimum */
  [data-app="clean"] .pin-logo { width: 96px; margin-bottom: 0; }
  [data-app="clean"] .pin-pad { gap: var(--s-2); }
  [data-app="clean"] .login-wrap .pin-brand { gap: var(--s-1); }
}
.pin-logo {
  display: block;
  width: 140px;
  height: auto;
  margin: 0 auto var(--s-3);
  border-radius: var(--r-sm);
}
.pin-who { color: var(--white); opacity: .8; margin-top: calc(var(--s-2) * -1); }

/* Test logins only (config TEST.vendors): "Reset job" on the job screen. */
.test-card { display: grid; gap: var(--s-2); margin-top: var(--s-2); padding: var(--s-4); border: 2px dashed var(--border); border-radius: var(--r-lg); }
.test-card-text { margin: 0; font-size: var(--text-md); color: var(--text-dim); }
.test-card-btn { width: 100%; color: var(--danger); border-color: var(--danger); }

/* ---------- Mobile polish (design review, 2026-11-04) ----------
   Measured at 320x568 and 375x812, EN and ES, light and dark. Each rule says what it fixes. */

/* In progress is the one status a card names, as a solid chip: it must read at a glance, and
   it is separate from the rail so a started job with guests today shows both. */
.job-status.is-active {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--blue-600); color: var(--white);
  font-size: var(--text-sm); font-weight: var(--weight-bold);
}
.job-status.is-active .ico { width: 14px; height: 14px; }

/* The directions column is always there; until the address is known it is dimmed and inert. */
.job-map.is-pending { color: var(--text-faint); opacity: .45; }

/* Banner and search in the list body, on the same inset as the progress card and the jobs. */
.list-banner { margin: var(--s-3) var(--s-4) 0; }
.list-banner[hidden], .list-search[hidden] { display: none; }
.list-search { margin: var(--s-3) var(--s-4) 0; }
@media (min-width: 752px) {
  .list-banner, .list-search { max-width: calc(var(--content-max) - 2 * var(--s-4)); margin-inline: auto; }
}
.list-search .search { padding: 0; }
.list-search .search input {
  min-height: var(--tap-min);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.list-search .search input::placeholder { color: var(--text-faint); }
.list-search .search .search-icon { left: var(--s-3); color: var(--text-faint); }

/* Group heading: the count sits beside the words, not flung to the far edge when they wrap. */
.job-group-title { flex-wrap: wrap; justify-content: flex-start; }

/* Tap targets: 44px minimum everywhere a thumb goes. */
[data-app="clean"] .segment { min-height: var(--tap-min); font-size: var(--text-md); padding-inline: var(--s-4); }
[data-app="clean"] .btn-sm { min-height: var(--tap-min); }

/* Start and End Job: white on green-500 was 3.1:1 and white on dark-mode blue-400 3.7:1. */
[data-app="clean"] .btn-success { background: var(--green-600); }
[data-app="clean"] .btn-primary { background: var(--blue-600); }

/* Tab bar labels were 11.7px in the faintest grey; the badge 10px. */
[data-app="clean"] .tab { font-size: var(--text-xs); }
[data-app="clean"] .tab-badge { font-size: 12px; min-width: 19px; height: 19px; }

/* Card edges disappeared in dark mode (border 1.1:1 against the surface). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .job-card,
  :root:not([data-theme="light"]) .progress-card { border-color: var(--border-strong); }
}
[data-theme="dark"] .job-card,
[data-theme="dark"] .progress-card { border-color: var(--border-strong); }

/* Narrow phones and Spanish: times, labels and the number tiles must not wrap or touch. */
.tile-value.is-time, .tile-num .tile-value { white-space: nowrap; }   /* "10:00 a.m." stays on one line; dates and words wrap */
@media (max-width: 360px) {
  .tile { padding-inline: var(--s-3); }
  .tile-label { letter-spacing: 0; font-size: var(--text-xs); }
  .tile-value { font-size: var(--text-xl); }
  .tile-num .tile-value, .tile-beds .tile-value { font-size: 1.5rem; }
  .tiles > .tile-num { min-width: 0; }
}
/* At 320 the unit number and the In progress chip do not fit side by side: the chip drops
   below the number rather than running into the directions column. */
.job-top { flex-wrap: wrap; row-gap: var(--s-1); }
/* On the photo: the house name as the headline (the number is in the header bar above). */
.hero-unit-name { font-size: var(--text-2xl); }
@media (max-width: 360px) {
  /* "CAPACIDAD" in a third of 320px: less inset so the label clears the edge. */
  .tile-num { padding-inline: var(--s-2); }
  /* Two half-width buttons wrapped "Reportar un problema" onto three lines: stack them. */
  .big-actions { grid-template-columns: minmax(0, 1fr); }
  .big-actions .btn { min-height: 56px; }
}

/* Ten digits (a phone number as the login id) must fit across 320px: past seven the slots narrow. */
.pin-slots.is-long { gap: 6px; }
.pin-slots.is-long .pin-slot { width: 22px; font-size: var(--text-lg); }

/* ---------- The office's note (Track backend) ----------
   One short message the office sets on the dashboard, above everything else in the list. Amber
   rather than blue so it does not read as the app's own "saved copy" banner, and large: it is the
   one thing on the screen the office wrote for today. */
.list-notice { margin: var(--s-3) var(--s-4) 0; }
.list-notice[hidden] { display: none; }
@media (min-width: 752px) {
  .list-notice { max-width: calc(var(--content-max) - 2 * var(--s-4)); margin-inline: auto; }
}
.office-note {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--warn-soft);
  color: var(--warn-text);
  border-left: 4px solid currentColor;
}
.office-note .ico { flex: none; width: 22px; height: 22px; margin-top: 2px; }
.office-note-body { min-width: 0; }
.office-note-text {
  margin: 0;
  font-size: var(--text-md);
  font-weight: var(--weight-semi);
  line-height: var(--leading-snug);
  white-space: pre-line;          /* the office's line breaks, kept as text */
  overflow-wrap: anywhere;
}
.office-note-meta { margin: var(--s-1) 0 0; font-size: var(--text-sm); opacity: .85; }

/* ---------- Sign in: phone first (Track backend) ---------- */
/* The phone number is one formatted line, (757) 555-0100, not ten digit slots. */
.pin-slots.is-phone { align-items: center; }
.pin-phone {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semi);
  letter-spacing: .02em;
  color: rgb(234 242 255 / 40%);
  border-bottom: 2px solid rgb(234 242 255 / 45%);
  padding: 0 var(--s-2) 2px;
  font-variant-numeric: tabular-nums;
}
.pin-phone.is-filled { color: #eaf2ff; border-bottom-color: #7db4f5; }
.pin-note {
  margin: 0;
  text-align: center;
  font-size: var(--text-sm);
  color: rgb(234 242 255 / 75%);
  line-height: var(--leading-snug);
}
/* The code is a real input, so the phone can offer the texted code above its keyboard. */
.pin-code {
  display: block;
  width: 100%;
  max-width: 260px;
  margin-inline: auto;
  min-height: 64px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  letter-spacing: .4em;
  color: #eaf2ff;
  background: rgb(255 255 255 / 7%);
  border: 0;
  border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 18%);
}
.pin-code:focus { outline: none; box-shadow: inset 0 0 0 2px #7db4f5; }
.pin-code::placeholder { color: rgb(234 242 255 / 30%); }
