/* Layout: one-column workbench app. Sticky header + tab bar, big scan target first, lists below. */
:root {
  --bg: #f6f5f8;
  --surface: #ffffff;
  --surface-2: #eeecf2;
  --fg: #1c1b1f;
  --muted: #5f5b66;
  --line: #d3d0d9;
  --accent: #7851a9;      /* 25.8: Amethyst (Chris picked it 2026-11-22; was service-van blue #0f6a8b) */
  --accent-fg: #ffffff;
  --out: #b4471b;          /* take out */
  --in: #17786b;           /* put away, done. Review 2026-12-05: teal-green to sit with Amethyst (was grass green #2d7a3e) */
  --warn: #8a5900;
  --warn-bg: #fbefd6;
  --danger: #b0234a;       /* Review 2026-12-05: berry red to sit with Amethyst (was #b3261e) */
  --font-display: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;   /* 25.8: one family, Public Sans */
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 6px;
  /* 24.21: anything you can tap has an edge, so it never looks like plain info. New look B (Chris, 2026-11-26): secondary
     buttons are white with a gray edge (3.6:1), so purple marks only the main button and the picked choice. */
  --btn-bg: #ffffff; --btn-line: #8a8592; --btn-fg: #1c1b1f; --btn-hover: #eeecf2;
  /* 24.51: how wide the page gets. A phone or tablet uses all of it; a computer gets a wider page (see the end of this file). */
  --page: 900px;
  /* 24.63: the edge of a typed box, at least 3:1 against the page and the card it sits on (--line was 1.3:1). */
  --field-line: #8a8592;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #141217; --surface: #1d1a21; --surface-2: #27232d; --fg: #eceaf0; --muted: #a9a3b3; --line: #3d3944;
  --accent: #bba0df; --accent-fg: #141217; --out: #f08a5d; --in: #62c9b4; --warn: #f2c063; --warn-bg: #3a2e14; --danger: #f48aa4;
  --btn-bg: #1d1a21; --btn-line: #7e7888; --btn-fg: #eceaf0; --btn-hover: #27232d; --field-line: #7e7888;
  color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #141217; --surface: #1d1a21; --surface-2: #27232d; --fg: #eceaf0; --muted: #a9a3b3; --line: #3d3944;
  --accent: #bba0df; --accent-fg: #141217; --out: #f08a5d; --in: #62c9b4; --warn: #f2c063; --warn-bg: #3a2e14; --danger: #f48aa4;
  --btn-bg: #1d1a21; --btn-line: #7e7888; --btn-fg: #eceaf0; --btn-hover: #27232d; --field-line: #7e7888;
  color-scheme: dark }

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--fg); font: 16px/1.45 var(--font-body); min-height: 100vh; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
/* 24.27: plain links in the theme's blue (they were the browser's default blue, hard to read in the dark theme). */
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

header.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px 6px; max-width: var(--page); margin: 0 auto; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: .02em; text-transform: uppercase; }
.brand span { color: var(--accent); }
/* 24.75: the logo mark (a wrench in a scanner's corners) before the name. icon-mark.svg is the heavier small-size
   drawing; icon.svg is the full one for home screens. 24.76: only on the sign-in card. In the top bar it pushed the
   name onto a second line on a phone once the property button and item count were there. */
.login-card .brand::before { content: ""; display: inline-block; width: 1.05em; height: 1.05em; margin-right: .3em; vertical-align: -.16em; background: url("icon-mark.svg") center / contain no-repeat; }
.sync { font-size: .8rem; color: var(--muted); }
nav.tabs { display: flex; gap: 4px; max-width: var(--page); margin: 0 auto; overflow-x: auto; }
nav.tabs button {
  flex: 1 0 auto; background: none; border: 0; border-bottom: 3px solid transparent;
  padding: 8px 6px 9px; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0; color: var(--muted);
  white-space: nowrap;
}
nav.tabs button[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }
.badge { display: inline-block; min-width: 1.4em; padding: 0 .4em; border-radius: 999px; background: var(--warn); color: var(--surface); font-family: var(--font-body); font-size: .75rem; font-weight: 600; text-align: center; vertical-align: 2px; }

main { max-width: var(--page); margin: 0 auto; padding-block: 16px 96px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
section.view { display: grid; gap: 16px; }
h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: .01em; margin: 0; text-wrap: balance; }
.hint { color: var(--muted); font-size: .9rem; margin: 0; }
/* 24.40: Team > See the app as a tech. Stays at the top of every screen until Back to my view. */
.as-tech-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--radius); background: var(--warn-bg); color: var(--fg); border: 2px solid var(--warn); }
.as-tech-bar .as-tech-msg { flex: 1 1 220px; min-width: 0; }
.as-tech-bar .btn { flex: 0 0 auto; }
.as-tech-pick { width: 100%; text-align: left; }
.banner { padding: 12px 14px; border-radius: var(--radius); background: var(--warn-bg); color: var(--fg); border: 1px solid var(--warn); }

/* Scan */
.mode { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
@media (max-width: 420px) { .mode button { font-size: 1.1rem; padding: 12px 6px; } .mode button small { font-size: .72rem; } }
.mode button[data-mode="count"][aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-fg); }
.mode button {
  border: 2px solid var(--btn-line); background: var(--btn-bg); color: var(--btn-fg); border-radius: var(--radius);
  padding: 14px 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: 0;
}
.mode button small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .8rem; letter-spacing: 0; text-transform: none; color: var(--muted); }
.mode button[data-mode="out"][aria-pressed="true"] { border-color: var(--out); background: var(--out); color: var(--surface); }
.mode button[data-mode="in"][aria-pressed="true"] { border-color: var(--in); background: var(--in); color: var(--surface); }
.mode button[aria-pressed="true"] small { color: inherit; opacity: .9; }
.scanbox { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.scanrow { display: flex; gap: 8px; }
.scanrow input { flex: 1; min-width: 0; }
/* Every typed box looks the same, whatever its type (24.27: password, date, email and month boxes were the browser's
   plain gray ones, on the sign-in screen too). */
input[type="text"], input[type="number"], input[type="search"], input[type="password"], input[type="email"], input[type="tel"],
input[type="url"], input[type="date"], input[type="month"], input[type="time"], input[type="datetime-local"], select, textarea {
  width: 100%; border: 1px solid var(--field-line); background: var(--bg); border-radius: 8px; padding: 12px; font-size: 1.05rem;
}
/* 24.63: 16px or more, or an iPhone zooms the whole page in when the box is tapped. */
textarea { min-height: 8em; font-family: var(--font-mono); font-size: 1rem; }
.btn { border: 1px solid var(--btn-line); background: var(--btn-bg); color: var(--btn-fg); border-radius: 8px; padding: 10px 14px; font-weight: 600; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.big { padding: 14px 18px; font-size: 1.1rem; }
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn.go-out { background: var(--out); border-color: var(--out); color: var(--surface); }
.btn.go-in { background: var(--in); border-color: var(--in); color: var(--surface); }
.btn:disabled { opacity: .5; cursor: default; }
.camera-btn { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 8px; }
.camera-btn input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 100px; }
.camera-btn:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.camera-btn svg { width: 22px; height: 22px; }
.suggest { display: grid; gap: 6px; }
.suggest button { text-align: left; background: var(--btn-bg); border: 1px solid var(--btn-line); border-radius: 8px; padding: 10px 12px; display: flex; justify-content: space-between; gap: 10px; }

.recent h3 { margin: 0 0 6px; font-size: .8rem; letter-spacing: 0; color: var(--muted); font-weight: 600; }

/* Lists */
.list { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; padding: 12px 14px; border-top: 1px solid var(--line); align-items: center; }
.row:first-child { border-top: 0; }
button.row { width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; }
button.row:first-child { border-top: 0; }
.row .name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.row .meta { grid-column: 1; color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.row .num { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.row .num b { display: block; font-size: 1.4rem; line-height: 1.1; }
.row .num small { color: var(--muted); font-family: var(--font-body); font-size: .75rem; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; border: 1px solid currentColor; }
.chip.low { color: var(--warn); }
.chip.ex { color: var(--muted); }
.chip.pack { color: var(--muted); }
.neg { color: var(--danger); }
.d-out { color: var(--out); } .d-in { color: var(--in); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar input[type="search"] { flex: 1 1 220px; min-width: 0; }
.supplier { display: grid; gap: 0; }
.supplier-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; background: var(--surface-2); }
.supplier-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.2rem; letter-spacing: 0; }
.supplier-head .toolbar .btn { padding: 8px 12px; min-height: 44px; font-size: .9rem; }
.need { color: var(--warn); }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty strong { display: block; color: var(--fg); font-size: 1.05rem; margin-bottom: 4px; }

/* Sheet */
.scrim { position: fixed; inset: 0; background: rgb(0 0 0 / .45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
/* A sheet is a fixed header (title + close), a body that scrolls on its own, and an action row that always stays on screen. */
.sheet {
  background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; overflow: hidden;
  border-radius: 16px 16px 0 0; display: flex; flex-direction: column;
}
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 14px max(18px, env(safe-area-inset-right, 0px)) 10px max(18px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); flex: none; }
.sheet-head h2 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sheet-x { flex: none; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--btn-line); background: var(--btn-bg); color: var(--btn-fg); font-size: 1.2rem; line-height: 1; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 14px max(18px, env(safe-area-inset-right, 0px)) 14px max(18px, env(safe-area-inset-left, 0px)); display: grid; gap: 14px; flex: 1 1 auto; min-height: 0; }
.sheet > .actions { flex: none; border-top: 1px solid var(--line); background: var(--surface);
  padding: 12px max(18px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); }
.scrim { overscroll-behavior: contain; touch-action: none; }
.scrim .sheet { touch-action: auto; }
body.sheet-open { overflow: hidden; }
html:has(body.sheet-open) { overflow: hidden; overscroll-behavior: none; }
@media (min-width: 640px) { .scrim { align-items: center; } .sheet { border-radius: 16px; } }
.sheet h2 { font-size: 1.5rem; }
.sheet:focus { outline: none; }
/* 24.63: Take 1 / Count / Put away at the top of a part opened from Items */
.item-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.item-quick .btn { min-height: 48px; font-size: 1.05rem; }
.item-quick .hint { grid-column: 1 / -1; }
/* 24.63: Your last scans. A count reads "Counted 18 / was 20"; an undo is plain words, not a colored label. */
.row .num b.r-count { font-size: 1.05rem; }
.row .num b.r-undone { color: var(--muted); text-decoration: line-through; }
.row .num .r-note { display: block; color: var(--muted); font-size: .9rem; font-weight: 500; }
.field { display: grid; gap: 4px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
/* 24.51: nothing in a window may be wider than the window. A grid column sized "1fr" grows to fit its widest box (a date
   box or a long button name), which pushed windows 20-60px past a small phone's edge; every box can shrink instead. */
.sheet-body > *, .field, .grid2 > *, .mm-form > *, .seg > * { min-width: 0; }
input, select, textarea { max-width: 100%; min-width: 0; }
.seg button { overflow-wrap: anywhere; }
@media (max-width: 360px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.actions .spacer { flex: 1; }
.stepper { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; align-items: stretch; }
.stepper button { font-size: 1.8rem; font-weight: 600; border-radius: 8px; border: 1px solid var(--btn-line); background: var(--btn-bg); color: var(--btn-fg); }
.stepper input { text-align: center; font-size: 2rem; font-family: var(--font-mono); padding: 8px; }
/* 24.77: the one box on a bin-label count: big, so a number can be typed fast with gloves on. */
.fc-qty { width: 100%; text-align: center; font-size: 2.2rem; font-family: var(--font-mono); padding: 10px; }
.iteminfo { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .9rem; }
.label-preview { max-width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; }

/* Toast. 24.63: #toast-root holds two live regions that stay on the page (screen readers only announce changes to a
   region that was already there): .toast-say (polite) and .toast-alert (errors, role=alert). Above the camera (z 35),
   so Take out's "Took 1 ... N left" with +1 more and Undo shows between scans, clear of the camera's Done bar. */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 36;
  width: min(560px, calc(100% - 32px)); background: var(--fg); color: var(--bg); border-radius: 12px; padding: 12px 14px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; box-shadow: 0 8px 24px rgb(0 0 0 / .25);
  padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px));
}
.toast .msg { flex: 1 1 12em; min-width: 0; }
.toast button { background: transparent; color: inherit; border: 1px solid currentColor; border-radius: 6px; padding: 8px 12px; min-height: 44px; min-width: 44px; font-weight: 600; }
.toast .toast-x { border-color: transparent; font-size: 1.15rem; line-height: 1; padding: 8px; }
/* 24.63: dark text on the error red (white on the dark theme's light red was 2.6:1). */
.toast.err { background: var(--danger); color: var(--surface); }
body.camera-on .toast { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
@media (prefers-reduced-motion: no-preference) { .toast { animation: rise .18s ease-out; } @keyframes rise { from { transform: translate(-50%, 12px); opacity: 0; } } }

/* Standalone additions: sign-in screen and live camera */
html, body { margin: 0; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
[hidden] { display: none !important; }
/* 24.63: i18n.js holds the first screen back (2.5 s at most) until the Spanish word list is in, so English doesn't flash. */
html.i18n-wait body { visibility: hidden; }
.login { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: grid; place-items: center; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.login-card { width: 100%; max-width: 380px; display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.login-card .brand { font-size: 2rem; }
/* 24.65: Terms of Use agreement after sign-in. Above everything (sheets, the camera) and scrolls on a short phone. */
.terms-gate { z-index: 60; overflow-y: auto; align-items: start; padding-top: max(16px, env(safe-area-inset-top, 0px)); padding-bottom: 24px; }
.terms-gate .login-card { margin: auto 0; }
.terms-gate h2 { margin: 0; font-size: 1.25rem; }
.terms-gate .hint { margin: 0; }
.safety-note { border-left: 3px solid var(--warn, #c98a00); padding-left: 8px; }
.terms-short { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; line-height: 1.4; }
.login-card form { display: grid; gap: 10px; }
/* 24.45: the set-password screen */
.login-card form h2 { margin: 0; font-size: 1.25rem; }
.login-card form .hint { margin: 0; }
.login-show { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.login-show input { width: auto; min-height: 0; }
#first-code-box { display: grid; gap: 10px; }
#first-code-box[hidden] { display: none; }
/* 24.66: Sign in with Google, in Google's own look (white button, gray edge, the four-color G, dark gray words) in both
   themes, so people recognize it. The G is a data: picture (img-src allows data:), so nothing loads from Google. */
.login-or { display: flex; align-items: center; gap: 10px; margin: 2px 0; color: var(--muted); font-size: .9rem; }
.login-or::before, .login-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.gsi-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 14px;
  background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }
.gsi-btn:disabled { opacity: .6; cursor: default; }
.gsi-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.gsi-g { flex: none; width: 20px; height: 20px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z'/%3E%3Cpath fill='%23FBBC05' d='M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z'/%3E%3C/svg%3E"); }
@media (hover: hover) { .gsi-btn:not(:disabled):hover { background: #e8eaed; border-color: #1f1f1f; } }
#first-code { font-size: 1.4rem; letter-spacing: 0.3em; }
.camera { position: fixed; inset: 0; z-index: 35; background: #000; display: grid; }
.camera video { width: 100%; height: 100%; object-fit: cover; }
.camera-frame { position: absolute; left: 50%; top: 45%; width: min(70vw, 320px); aspect-ratio: 1; transform: translate(-50%, -50%); border: 3px solid rgb(255 255 255 / .9); border-radius: 18px; box-shadow: 0 0 0 100vmax rgb(0 0 0 / .35); }
.camera-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #fff; font-weight: 600;
  padding-block: 16px calc(16px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: linear-gradient(transparent, rgb(0 0 0 / .7)); }
.camera-bar .btn { background: #fff; color: #111; border-color: #fff; }
.camera-x { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); z-index: 1; background: rgb(0 0 0 / .6); color: #fff; border-color: rgb(255 255 255 / .7); font-size: 1.05rem; }
.camera.flash .camera-frame { border-color: var(--in); }
@media (max-width: 460px) {
  nav.tabs { gap: 0; }
  nav.tabs button { flex: 0 0 auto; padding: 8px 9px 9px; font-size: .92rem; letter-spacing: .01em; }
  nav.tabs .badge { font-size: .68rem; }
}
/* item photos */
.photo { display: block; width: 100%; max-height: 220px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.row.pic { grid-template-columns: 48px minmax(0,1fr) auto; }
.row.pic .thumb { grid-row: 1 / span 2; grid-column: 1; width: 48px; height: 48px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.row.pic .name, .row.pic .meta { grid-column: 2; }
.row.pic .num { grid-column: 3; }
/* help, team, quick undo */
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
/* 24.63: small in looks only; still 44px tall for a gloved thumb. */
.btn.small { padding: 6px 12px; min-height: 44px; font-size: .85rem; margin-top: 4px; }
.team-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* Team rows: the role and Remove buttons sit on their own line under the name, so long names never get squeezed. */
.row.team-row .team-actions { grid-row: 3; grid-column: 1 / -1; justify-content: flex-start; font-family: var(--font-body); margin-top: 6px; }
#view-activity .toolbar input[type="search"] { flex: 1 1 140px; min-width: 0; }
/* equipment */
.summary-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.summary-chips .chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: .85rem; font-weight: 600; }

/* Help > Check setup results */
.row.check .name { display: flex; gap: 8px; align-items: baseline; }
.row.check .mark { display: inline-block; width: 1.3em; text-align: center; font-weight: 700; flex: none; }
.row.check.pass .mark { color: var(--in); }
.row.check.warn .mark { color: var(--warn); }
.row.check.fail .mark { color: var(--danger); }
.row.check .meta, .row.check .fix { grid-column: 1 / -1; }
.row.check .fix { background: var(--warn-bg); border-radius: 8px; padding: 8px 10px; font-size: .9rem; }
.row.check.fail .fix { border-left: 3px solid var(--danger); }

/* Link-style buttons (the guide links) keep the button text color instead of the browser link color. */
a.btn { color: var(--btn-fg); text-decoration: none; }
a.btn.primary { color: var(--accent-fg); }

/* Demo ribbon (maintstock.com/demo only) */
.demo-ribbon { position: relative; z-index: 6; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); background: var(--warn-bg); color: var(--fg); font-size: .9rem; border-bottom: 1px solid var(--line); }
.demo-ribbon b { color: var(--warn); margin-right: 6px; text-transform: uppercase; letter-spacing: .04em; }
.demo-ribbon a { color: var(--accent); margin-left: 4px; display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }

/* Help > Appearance */
.theme-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-pick .btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }

/* Pool tab */
.pool-inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 12px; }
.pool-inputs input { font-size: 1.15rem; }
#pool-result { display: grid; gap: 10px; margin-top: 12px; }
#pool-result h3 { margin: 6px 0 0; }
.chip.pool-ok { color: var(--in); }
.chip.pool-low, .chip.pool-high { color: var(--warn); background: var(--warn-bg) !important; }
.row.dose .num b { font-size: 1.15rem; white-space: nowrap; }
.row.dose .meta { grid-column: 1 / -1; }
.pool-notes { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.pool-safety { border-left: 3px solid var(--warn); padding-left: 10px; }
.targets { display: grid; gap: 8px; }
.target-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px auto 72px; gap: 8px; align-items: center; }
.target-row input { min-width: 0; }
.hint.err { color: var(--danger); }

/* v16: put-away kind, reorder tabs and pick lists */
.sheet .mode button { font-size: 1.1rem; padding: 10px 8px; }
.mode button[data-kind][aria-pressed="true"] { border-color: var(--in); background: var(--in); color: var(--surface); }
.reorder-tabs { grid-template-columns: 1fr 1fr; }
.reorder-tabs button { font-size: 1.15rem; padding: 10px 8px; }
.reorder-tabs button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-fg); }
.mode-help { min-height: 2.6em; }
.pickrow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; border-top: 1px solid var(--line); }
.ro-qty { display: grid; justify-items: end; gap: 2px; padding-right: 14px; text-align: right; }
.ro-qty small { color: var(--muted); font-size: .75rem; max-width: 9em; }
.supplier-head .pick-count { display: block; }
.pickrow:first-of-type { border-top: 0; }
.supplier-head + .pickrow { border-top: 0; }
.pickrow > .row { border-top: 0; padding-left: 4px; }
.pickrow > label.pick { display: grid; place-items: center; align-self: stretch; cursor: pointer; padding-left: 10px; }
.pickrow input[type="checkbox"], .row input[type="checkbox"] { width: 26px; height: 26px; accent-color: var(--accent); }
/* 24.63: the whole 44px column around a Reorder tick box toggles it, at least 44px tall. */
.pickrow > label.pick { min-height: 44px; min-width: 44px; }
.pickrow .qty { width: 4.2em; text-align: center; padding: 8px 4px; font-family: var(--font-mono); font-size: 1.15rem; }
.pickrow:has(input.pickbox:not(:checked)) > .row { opacity: .55; }
/* 24.46: on a phone the how-many box and its note go under the part, so a long name (or one with a photo) gets the
   whole width instead of a letter or two a line. Reorder lists and Print labels both use these rows. */
@media (max-width: 520px) {
  .pickrow { grid-template-columns: 44px minmax(0, 1fr); }
  .pickrow > label.pick { grid-row: 1 / span 2; }
  .pickrow > .row { padding-bottom: 6px; }
  .pickrow > .ro-qty { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; text-align: left; padding: 0 14px 12px 4px; }
  .ro-qty small { max-width: none; font-size: .8rem; }
}
.pick-count { color: var(--muted); font-size: .85rem; font-weight: 600; }
details.danger-zone { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
details.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 600; }
details.danger-zone[open] { display: grid; gap: 10px; }
/* 24.46: Suggested keep-on-hand, one part per card read top to bottom (name, bin and part #, checkbox + new level, why).
   The number box needs .sugrow in front: the shared "every typed box is full width" rule outranks a lone class. */
.sugrow { display: grid; gap: 6px; padding: 12px 14px; border-top: 1px solid var(--line); }
.sugrow:first-child { border-top: 0; }
.sugrow .name { font-weight: 600; min-width: 0; overflow-wrap: break-word; }
.sugrow .meta { color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sugrow .sug-set { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.sugrow label.pick { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-weight: 600; }
.sugrow input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); }
.sugrow .sug-set small { color: var(--muted); font-size: .85rem; }
.sugrow:has(input.pickbox:not(:checked)) > :not(.sug-set) { opacity: .55; }
.sugrow input.sug-in { width: 4.6em; text-align: center; padding: 8px 4px; font-family: var(--font-mono); font-size: 1.15rem; }
/* 24.59: Quick count, one part per card: photo, name, bin/keep/app count, then three big buttons (Out, Low, Plenty)
   and two small ones. Number boxes need .qc-row / .qc-chips in front (the shared full-width box rule outranks a class). */
.qc-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 14px; border-top: 1px solid var(--line); }
.qc-row:first-child { border-top: 0; }
.qc-row.pic { grid-template-columns: 56px minmax(0, 1fr); column-gap: 12px; }
.qc-row.pic .thumb { grid-row: 1 / span 3; width: 56px; height: 56px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.qc-row.pic > :not(.thumb) { grid-column: 2; }
.qc-row.pic > .qc-acts { grid-column: 1 / -1; }
.qc-row .name { font-weight: 600; min-width: 0; overflow-wrap: break-word; }
.qc-row .meta { color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.qc-row .qc-mark { font-size: .85rem; color: var(--muted); }
.qc-row .qc-mark.ok-text { color: var(--in); font-weight: 600; }
.qc-row.done { background: color-mix(in srgb, var(--in) 7%, transparent); }
.qc-acts { display: grid; gap: 8px; }
.qc-main { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qc-main .btn { min-height: 52px; font-weight: 700; font-size: 1.05rem; }
.qc-main .qc-out { border-left: 6px solid var(--out); }
.qc-main .qc-low { border-left: 6px solid var(--warn); }
.qc-main .qc-plenty { border-left: 6px solid var(--in); }
.qc-more, .qc-exact { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qc-keep { display: grid; gap: 8px; }
.qc-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qc-chips .btn { min-width: 48px; min-height: 48px; font-weight: 700; }
.qc-chips .btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.qc-row input.qc-num, .qc-chips input.qc-num { width: 5em; text-align: center; padding: 10px 4px; font-family: var(--font-mono); font-size: 1.1rem; }
/* While a sheet is open, notes show at the top so they never cover the sheet's buttons. */
body.sheet-open .toast { bottom: auto; top: calc(12px + env(safe-area-inset-top, 0px)); }

/* Mold & moisture reports */
.mm-form { display: grid; gap: 14px; }
.mm-form h3 { margin: 10px 0 0; font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0; border-top: 1px solid var(--line); padding-top: 12px; }
.mm-form h4 { margin: 0; font-size: 1rem; }
.mm-sub { display: grid; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.mm-sub[hidden], .field[hidden] { display: none; }
textarea.mm-area { min-height: 4.5em; font-family: var(--font-body); font-size: 1rem; }
.field .lbl { font-size: .85rem; font-weight: 600; color: var(--muted); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 500; cursor: pointer; }
.check-opt input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: none; }
.check-opt:has(input:checked) { border-color: var(--accent); }
.seg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; max-width: 320px; }
.seg button { min-height: 44px; border: 1px solid var(--btn-line); border-radius: 8px; background: var(--btn-bg); color: var(--btn-fg); font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.mm-svc { display: grid; gap: 8px; }
.mm-svc-row { display: grid; grid-template-columns: minmax(0, 1fr) 9.5em; gap: 8px; align-items: center; }
.rp-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rp-photo { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.rp-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.rp-photo .meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; color: var(--muted); font-size: .75rem; }
.rp-photo .meta .btn { margin-top: 0; }
.hint.err { color: var(--danger); }
@media (max-width: 340px) { .mm-svc-row { grid-template-columns: 1fr; } }

/* Count list (17.2) */
.ok-text { color: var(--in); font-weight: 600; }
.err-text { color: var(--danger); font-weight: 600; }
/* unit inspections (v18) */
.insp-progress { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); font-weight: 600; position: sticky; top: 0; z-index: 1; }
.insp-progress.done { color: var(--in); }
.insp-item { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 10px; background: var(--surface); }
.insp-item.ok { border-left-color: var(--in); }
.insp-item.flag { border-left-color: var(--danger); }
.insp-head { display: flex; gap: 10px; align-items: flex-start; }
.insp-num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: .85rem; font-weight: 700; }
.insp-title { font-weight: 700; }
.insp-head .hint { margin: 2px 0 0; }
.seg.insp-opts { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); max-width: none; }
.seg.insp-opts button.bad[aria-pressed="true"] { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.insp-other { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.insp-other input { flex: 1 1 140px; }
.insp-strip { display: flex; gap: 8px; overflow-x: auto; }
.insp-thumb { display: grid; gap: 4px; flex: none; width: 110px; }
.insp-thumb img { width: 110px; height: 82px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.sig-box { display: grid; gap: 6px; }
.sig-pad { width: 100%; max-width: 600px; aspect-ratio: 600 / 180; background: #fff; border: 1px dashed var(--line); border-radius: 8px; touch-action: none; }
.sig-img { max-width: 240px; height: 60px; object-fit: contain; object-position: left; background: #fff; border-radius: 6px; }
.sig-row { display: grid; gap: 6px; }
.insp-form .btn.small { min-height: 40px; padding: 8px 14px; font-size: .9rem; margin-top: 0; }
.insp-progress { box-shadow: 0 2px 6px rgba(0,0,0,.12); }

/* HVAC troubleshooter (hvac.js) */
.hvac-wrap { display: grid; gap: 14px; }
.hvac-wrap h3 { margin: 4px 0 0; }
.hvac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.hvac-pick { display: grid; gap: 2px; text-align: left; padding: 14px; border: 1px solid var(--btn-line); border-radius: var(--radius); background: var(--btn-bg); }
.hvac-pick b { font-family: var(--font-display); font-size: 1.25rem; }
.hvac-pick small { color: var(--muted); font-size: .85rem; }
/* 25.10: Safety first, above the equipment on the HVAC tab */
.hvac-safety { width: 100%; background: var(--warn-bg); border-left: 4px solid var(--danger); }
.hvac-card { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.hvac-card p { margin: 0; }
.hvac-q { font-size: 1.3rem; line-height: 1.25; margin: 0; }
.hvac-how { color: var(--muted); }
.hvac-kicker { color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: 0; }
.hvac-end { border-left: 4px solid var(--accent); }
.hvac-answers { display: grid; gap: 8px; }
.hvac-answers .btn { text-align: left; }
.hvac-note { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); font-size: .92rem; }
.hvac-note.warn { background: var(--warn-bg); border-left: 4px solid var(--warn); }
.hvac-note.danger { background: var(--warn-bg); border-left: 4px solid var(--danger); color: var(--fg); font-weight: 600; }
.hvac-trail summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.hvac-trail ol { margin: 8px 0 0; padding-left: 1.4em; display: grid; gap: 4px; font-size: .9rem; }
.hvac-parts { display: grid; gap: 8px; }
.hvac-inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.hvac-out { display: grid; gap: 6px; }
.hvac-out p { margin: 0; }
.hvac-verdict { font-weight: 700; padding: 8px 12px; border-radius: 8px; border: 1px solid currentColor; }
.hvac-verdict.pass { color: var(--in); }
.hvac-verdict.fail { color: var(--danger); }
.hvac-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.hvac-table td { padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.hvac-table td:first-child { font-weight: 600; width: 42%; }
.hvac-seq { margin: 0; padding-left: 1.4em; display: grid; gap: 4px; }
/* Appliance repair (appliance.js) reuses the HVAC styles above */
.appl-job { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border: 1px dashed var(--accent); border-radius: var(--radius); background: var(--surface); }
.appl-job b { font-size: 1.05rem; }
.appl-job small { color: var(--muted); font-size: .85rem; }
.appl-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.appl-link { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: inherit; text-decoration: none; }
.appl-link b { color: var(--accent); }
.appl-link small { color: var(--muted); font-size: .8rem; }
.appl-row { display: flex; gap: 8px; }
.appl-row input { flex: 1; min-width: 0; }
.appl-photo { display: contents; } /* 24.96: Take photo + Pick from photos sit in the toolbar like any other button */
.appl label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.appl .linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; }
.hvac-verdict.close { color: var(--warn); }

/* ---------- PM tab (pm.js) ---------- */
#pm-root { display: grid; gap: 14px; }
.pm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 10px; }
.pm-card h3, .pm-card p { margin: 0; }
.pm-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.pm-seg button { flex: 1 1 0; min-width: 0; border: 1px solid var(--btn-line); background: var(--btn-bg); color: var(--btn-fg); border-radius: 8px; padding: 10px 8px; font-weight: 600; }
.pm-seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.pm-due, .pm-plan, .pm-units { display: grid; gap: 12px; }
.pm-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pm-tile { display: grid; gap: 2px; text-align: left; background: var(--btn-bg); border: 1px solid var(--btn-line); border-radius: var(--radius); padding: 10px 12px; }
.pm-tile b { font-family: var(--font-mono); font-size: 1.6rem; line-height: 1.1; }
.pm-tile span { color: var(--muted); font-size: .8rem; font-weight: 600; }
.pm-tile[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pm-tile.late b { color: var(--danger); }
.pm-tile:disabled { cursor: default; color: inherit; background: var(--surface); border-color: var(--line); }
.pm-filters select, .pm-filters input { flex: 1 1 140px; min-width: 0; }
#pm-f-task { flex-basis: 100%; }   /* task names are long: give them the whole row */
.pm-group { display: grid; gap: 6px; }
.pm-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pm-group-head h3 { margin: 0; }
.pm-row { padding: 8px 10px 8px 4px; }
.pm-row-main { display: grid; gap: 2px; text-align: left; background: none; border: 0; padding: 4px 10px; min-width: 0; }
.pm-row.late { box-shadow: inset 4px 0 0 var(--danger); }
.pm-done { min-width: 5.5em; padding: 12px 14px; }
.pm-late { color: var(--danger); font-weight: 600; }
.pm-missed { color: var(--warn); font-weight: 600; }
.pm-none { text-align: center; padding: 18px 0; }
.pm-parts summary { cursor: pointer; font-weight: 600; }
.pm-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.pm-table th, .pm-table td { text-align: left; padding: 6px 4px; border-top: 1px solid var(--line); }
.pm-table th:not(:first-child), .pm-table td:not(:first-child) { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.pm-table tr.short td { color: var(--danger); font-weight: 600; }
.pm-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
.pm-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-reasons .btn { padding: 6px 10px; min-height: 44px; font-size: .85rem; }
.pm-task.off, .pm-units .row.off { opacity: .6; }
.pm-check { display: flex; align-items: center; gap: 10px; }
.pm-check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.pm-pick { display: grid; margin-top: 6px; }
.pm-pick .row { border: 1px solid var(--line); border-top-width: 0; background: var(--surface); }
.pm-pick .row:first-child { border-top-width: 1px; border-radius: 8px 8px 0 0; }
.pm-part { grid-template-columns: minmax(0, 1fr) auto auto; }
.pm-qty { width: 4.2em; text-align: center; padding: 8px 4px; font-family: var(--font-mono); }
.pm-bldg summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.pm-bldg .list { margin-top: 6px; }
@media (max-width: 420px) { .pm-tile b { font-size: 1.3rem; } .pm-done { min-width: 4.5em; padding: 12px 10px; } }

/* Shop map (20) */
.shopmap { width: 100%; height: auto; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.shopmap.editing { touch-action: none; user-select: none; -webkit-user-select: none; }
.sm-floor { fill: var(--surface); stroke: var(--fg); stroke-width: 0.15; }
.sm-grid { stroke: var(--line); stroke-width: 0.05; }
.sm-obj rect { fill: var(--surface-2, #e8eef0); stroke: var(--muted); stroke-width: 0.1; }
.sm-other rect { fill: none; stroke-dasharray: 0.3 0.2; }
.sm-wall rect { fill: var(--fg); stroke: none; }
.sm-obj rect.sm-hit { fill: transparent; stroke: none; }
.sm-sel.sm-wall rect:not(.sm-hit) { fill: var(--accent); }
.sm-name { fill: var(--fg); font-weight: 700; font-family: var(--font-body, sans-serif); }
.sm-label, .rf-hi-t { fill: var(--muted); font-family: var(--font-body, sans-serif); }
.sm-hi rect { fill: var(--accent); stroke: var(--accent); }
.sm-hi .sm-name { fill: var(--accent-fg); }
.sm-hi .sm-label { fill: var(--accent); font-weight: 700; }
.sm-dim { opacity: .45; }
.editing .sm-obj { cursor: grab; }
.sm-sel rect { stroke: var(--accent); stroke-width: 0.25; }
.rackfront-wrap { display: grid; gap: 6px; max-width: 180px; }
.rackfront { width: 100%; height: auto; }
.rf-shelf { fill: var(--surface-2, #e8eef0); stroke: var(--line); stroke-width: 0.08; }
.rf-hi { fill: var(--accent); }
.rf-hi-t { fill: var(--accent-fg); font-weight: 700; }
.where-line { font-size: 1.1rem; font-weight: 600; margin: 0; }

/* Make Ready board (21) */
.mr-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
/* 24.51: makeready.js adds .mr-cards when the whiteboard is wider than the screen (a tablet, a small laptop, or a property
   with a long checklist), so the board turns into cards instead of scrolling sideways. A phone always gets cards. */
.mr-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .9rem; }
.mr-table th, .mr-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.mr-table thead th { font-size: .8rem; color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--surface); }
.mr-table .mr-unit { position: sticky; left: 0; background: var(--surface); z-index: 1; text-align: left; border-right: 1px solid var(--line); }
.mr-unit-btn { all: unset; cursor: pointer; display: grid; min-width: 4.5em; min-height: 44px; align-content: center; }
/* 24.63: all: unset took the focus ring away too; put it back for keyboards. */
.mr-unit-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.mr-unit-btn b { font-size: 1.05rem; color: var(--accent); text-decoration: underline; }
.mr-unit-btn small { color: var(--muted); font-size: .75rem; }
.mr-late .mr-unit-btn small, .mr-late-t { color: var(--danger); font-weight: 700; }
.mr-ready .mr-unit-btn small { color: var(--in); font-weight: 700; }
.mr-notes { text-align: left !important; white-space: normal !important; min-width: 12em; color: var(--muted); }
.mr-step { display: inline-block; min-width: 5.5em; min-height: 44px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--btn-line); background: var(--btn-bg); color: var(--muted); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.mr-prog { background: var(--warn-bg); border-color: var(--warn); color: var(--fg); }
/* 24.68: finished after the scheduled day */
.mr-step .mr-late-by { display: block; font-size: .72rem; font-weight: 700; color: var(--surface); }
.mr-latedone { box-shadow: inset 0 0 0 3px var(--danger); }
.mr-done { background: var(--in); border-color: var(--in); color: var(--surface); }   /* 24.63: dark text on the dark theme's light green */
.mr-na { background: var(--surface-2); color: var(--muted); border-style: dashed; }
.mr-legend { display: flex; flex-wrap: wrap; gap: 6px; font-size: .8rem; }
.mr-legend .mr-step { cursor: default; min-height: 0; }
.mr-legend .mr-step:not(.mr-prog):not(.mr-done):not(.mr-na) { background: var(--surface); border-color: var(--line); }
/* 24.60: a board someone can only look at: plain cells, no button edge, no pointer, no hover fill. */
.mr-step.mr-ro { cursor: default; border-color: transparent; }
.mr-step.mr-ro:not(.mr-done):not(.mr-na):not(.mr-prog) { background: transparent; }
.mr-step.mr-ro.mr-due { border-color: var(--danger); }
.mr-unit-btn.mr-ro { cursor: default; }
.mr-unit-btn.mr-ro b { color: var(--fg); text-decoration: none; }
.mr-chip-ready { color: var(--in); font-weight: 700; }
.mr-lab { display: none; }
/* 24.11: on a phone each apartment is a card with every step in view, so nobody swipes the board sideways.
   Same table underneath (computers and the printout keep the whiteboard layout); each cell shows its own label. */
@media (max-width: 700px) {
  .mr-wrap { overflow: visible; border: 0; background: none; }
  .mr-table, .mr-table tbody { display: block; }
  .mr-table thead { display: none; }
  .mr-table tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 10px; padding: 10px 12px 12px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
  .mr-table tr.mr-late { border-left: 4px solid var(--danger); }
  .mr-table tr.mr-ready { border-left: 4px solid var(--in); }
  .mr-table th, .mr-table td { display: flex; flex-direction: column; gap: 2px; padding: 0; border: 0; text-align: left; white-space: normal; }
  .mr-table .mr-unit { position: static; grid-column: 1 / -1; border: 0; background: none; }
  .mr-unit-btn { display: flex; align-items: baseline; gap: 8px; min-height: 44px; }
  .mr-unit-btn b { font-size: 1.3rem; }
  .mr-lab { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); }
  .mr-step { width: 100%; min-width: 0; min-height: 44px; }
  .mr-table .mr-notes { grid-column: 1 / -1; min-width: 0; color: var(--fg); order: 9; }
  .mr-table .mr-notes.mr-empty { display: none; }
  .mr-table .mr-full { grid-column: 1 / -1; order: 10; }
}
.mr-wrap.mr-cards { overflow: visible; border: 0; background: none; }
.mr-cards .mr-table, .mr-cards .mr-table tbody { display: block; }
.mr-cards .mr-table thead { display: none; }
.mr-cards .mr-table tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 10px; padding: 10px 12px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mr-cards .mr-table tr.mr-late { border-left: 4px solid var(--danger); }
.mr-cards .mr-table tr.mr-ready { border-left: 4px solid var(--in); }
.mr-cards .mr-table th, .mr-cards .mr-table td { display: flex; flex-direction: column; gap: 2px; padding: 0; border: 0; text-align: left; white-space: normal; }
.mr-cards .mr-table .mr-unit { position: static; grid-column: 1 / -1; border: 0; background: none; }
.mr-cards .mr-unit-btn { display: flex; align-items: baseline; gap: 8px; min-height: 44px; }
.mr-cards .mr-unit-btn b { font-size: 1.3rem; }
.mr-cards .mr-lab { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); }
.mr-cards .mr-step { width: 100%; min-width: 0; min-height: 44px; }
.mr-cards .mr-table .mr-notes { grid-column: 1 / -1; min-width: 0; color: var(--fg); order: 9; }
.mr-cards .mr-table .mr-notes.mr-empty { display: none; }
.mr-cards .mr-table .mr-full { grid-column: 1 / -1; order: 10; }
.mr-chip-late { color: var(--danger); font-weight: 700; }
.mr-col-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 6px; }
/* 25.12: Edit steps, Needs confirming under each step; a vendor step (no confirming) is never red. */
.mr-col-item { display: grid; gap: 4px; }
.mr-col-conf { display: flex; gap: 8px; align-items: center; font-size: 0.9em; font-weight: 500; }
.mr-col-conf input { width: auto; }
.mr-ck-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.mr-ck-sec { font-weight: 600; }
.mr-ck-add { justify-self: start; }
.mr-step small { display: block; font-size: .75rem; font-weight: 500; }
.mr-sched { background: var(--surface); color: var(--fg); }
.mr-none { color: var(--muted); }
.mr-due { border-color: var(--danger); color: var(--danger); background: var(--surface); }
.mr-state-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.mr-state-pick .btn { flex: 1 1 auto; }

/* City complaints (24.17) */
.cc-status { font-family: var(--font-body); font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.cc-open { color: var(--danger); border-color: var(--danger); }
.cc-fixed { background: var(--warn-bg); border-color: var(--warn); color: var(--fg); }
.cc-closed { background: var(--in); border-color: var(--in); color: var(--surface); }
.cc-row.cc-late { border-left: 4px solid var(--danger); }
.cc-soon { color: var(--warn); font-weight: 700; }
.cc-chip-late { color: var(--danger); font-weight: 700; }
.cc-chip-soon { color: var(--warn); font-weight: 700; }
.cc-err { color: var(--danger); font-weight: 600; }
.cc-photos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cc-thumb { position: relative; }
.cc-thumb-btn { display: block; width: 76px; height: 76px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); cursor: pointer; }
.cc-thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-thumb-x { position: absolute; top: -10px; right: -10px; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; }
.cc-thumb-x::after { content: "✕"; display: grid; place-items: center; width: 24px; height: 24px; margin: auto; border-radius: 50%; background: var(--danger); color: #fff; font-size: .8rem; font-weight: 700; }
.cc-big { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }

/* Chat (24.90). Someone else's message is a plain card on the left; yours sits on the right. A message you can delete
   (yours, or anyone's for owners and the admin) is a button, so it gets the blue tap tint like everything tappable. */
.chat-room select { width: 100%; }
.chat-log { display: flex; flex-direction: column; gap: 8px; max-height: calc(100dvh - 330px); min-height: 220px; overflow-y: auto; padding: 10px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); overscroll-behavior: contain; }
.chat-day { align-self: center; font-size: .8rem; font-weight: 600; color: var(--muted); padding: 2px 10px; margin-top: 4px; }
.chat-msg { align-self: flex-start; max-width: 85%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--surface); border: 1px solid var(--line);
  color: var(--fg); font: inherit; text-align: left; }
.chat-msg.mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; }
.chat-msg.chat-tap { background: var(--btn-bg); border-color: var(--btn-line); cursor: pointer; }
.chat-who { display: flex; gap: 8px; align-items: baseline; font-size: .8rem; color: var(--muted); margin-bottom: 2px; }
.chat-who strong { color: var(--fg); }
.chat-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.35; }
.chat-older { align-self: center; }
.chat-empty { align-self: stretch; }
.chat-compose { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.chat-compose textarea { flex: 1 1 auto; min-height: 48px; max-height: 160px; resize: none; }
.chat-compose .btn { min-height: 48px; }
.chat-quote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fg); }
.more-tile strong .badge { margin-left: 6px; }
/* Notifications (24.91): each kind with its App and Email ticks side by side; the ticks are tappable, so they get the tap tint. */
.nt-row .num { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; font-family: var(--font-body); }
.nt-row .check-opt { background: var(--btn-bg); border-color: var(--btn-line); color: var(--btn-fg); }
/* 25.7: on the smallest phones the App and Email ticks squeezed each kind's name to a few letters a line, so there the
   ticks go under the words. */
@media (max-width: 400px) { .nt-row .num { grid-row: auto; grid-column: 1; justify-content: flex-start; } }
.chat-tools { justify-content: flex-end; }

/* Ideas and problems (21) */
.fr-status { font-family: var(--font-body); font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.fr-new { color: var(--accent); border-color: var(--accent); }
.fr-planned { background: var(--warn-bg); border-color: var(--warn); color: var(--fg); }
.fr-done { background: var(--in); border-color: var(--in); color: var(--surface); }
.fr-not-now { color: var(--muted); border-style: dashed; }
.fr-reply { grid-column: 1 / -1; font-size: .85rem; color: var(--fg); border-left: 3px solid var(--accent); padding-left: 8px; }
.fr-body { white-space: pre-wrap; margin: 0; font-size: 1rem; }
.fr-new-count { color: var(--accent); font-weight: 600; }
#mr-root, #fr-root { min-width: 0; display: grid; gap: 12px; align-content: start; }

/* Find unit tab (finder.js) */
#view-find select { width: 100%; padding: 10px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--surface); }
.fd-search input[type="search"] { flex: 1 1 180px; min-width: 0; padding: 12px; font-size: 1.1rem; border: 1px solid var(--field-line); border-radius: 8px; background: var(--surface); }
.fd-result { display: grid; gap: 8px; }
.fd-target { display: grid; gap: 2px; }
.fd-target b { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: .02em; }
.fd-door { color: var(--warn); font-weight: 600; }
.fd-miss { color: var(--danger); margin: 0; font-weight: 600; }
.fd-dir { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.fd-dir > .hint, .fd-dir > .toolbar, .fd-dir > .fd-here { grid-column: 1 / -1; }
.fd-arrow { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-fg); font-size: 2.4rem; font-weight: 700; line-height: 1; }
@media (prefers-reduced-motion: no-preference) { .fd-arrow { transition: transform .3s; } }
.fd-far { margin: 0; font-size: 1.2rem; }
.fd-far b { font-family: var(--font-mono); }
.fd-far .meta { display: block; font-size: .8rem; color: var(--muted); }
.fd-here { margin: 0; font-size: 1.3rem; font-weight: 700; color: var(--in); }
.fd-map { height: min(60vh, 460px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); z-index: 0; }
.fd-full { height: 70vh; height: 70dvh; border-radius: var(--radius); background: var(--surface-2); z-index: 0; }
.fd-pin { display: grid !important; place-items: center; border-radius: 50%; background: #fff; color: #111; border: 2px solid #111; font: 700 .85rem/1 var(--font-body); box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.fd-pin.on { background: #facc15; border-width: 3px; font-size: 1.1rem; }
.fd-pin.fd-office { border-radius: 8px; font-size: .8rem; }
.fd-ring { border: 6px solid #facc15; border-radius: 50%; box-shadow: 0 0 0 3px rgba(0,0,0,.6), inset 0 0 0 2px rgba(0,0,0,.6); animation: fd-pulse 1.4s ease-in-out infinite; }
@keyframes fd-pulse { 50% { box-shadow: 0 0 0 10px rgba(250,204,21,.35), inset 0 0 0 2px rgba(0,0,0,.6); } }
@media (prefers-reduced-motion: reduce) { .fd-ring { animation: none; } }
.fd-modes { display: flex; gap: 8px; }
.fd-modes[hidden] { display: none; }
.fd-modes .btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.fd-target .meta { color: var(--muted); }
/* 24.99 Main menu: five rooms (Home, Shop, Units, Guides, People) along the top at every size. nav.tabs stays in the
   page as the list of screens but is never shown. It lives in the header because in-app browsers cover the bottom of
   the page with their own toolbar. */
nav.tabs { display: none !important; }
.roombar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); max-width: var(--page); margin: 0 auto; }
.roombar button { position: relative; height: 52px; padding: 6px 2px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted);
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0; line-height: 1.1; overflow-wrap: anywhere; }
.roombar button[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }
.roombar .badge { position: absolute; top: 2px; right: 2px; }
@media (min-width: 701px) { .roombar button { font-size: 1.15rem; } .roombar .badge { position: static; margin-left: 6px; } }
@media (max-width: 700px) { .roombar { margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); } }
/* The row of a room's screens at the top of each one: one tap to the next screen in the same room. Scrolls sideways
   on a narrow phone instead of wrapping into a tall block. */
.room-sub { display: flex; gap: 8px; overflow-x: auto; margin: -4px -16px 14px; padding: 2px 16px 4px; scrollbar-width: none; }
.room-sub[hidden] { display: none; }
.room-sub::-webkit-scrollbar { display: none; }
.room-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; border: 1px solid var(--btn-line); border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 600; font-size: .95rem; white-space: nowrap; }
.room-chip[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
@media (min-width: 701px) { .room-sub { flex-wrap: wrap; overflow-x: visible; margin-inline: 0; padding-inline: 0; } }
/* A room's page: its screens as rows, with what needs doing on each. */
.room-page h2 { margin-bottom: 2px; }
.room-page .hint { margin-top: -10px; }
.room-row .name { font-size: 1.1rem; }
.room-row .meta { font-size: .92rem; }
.room-row .meta.late { color: var(--danger); }
.room-row .badge { grid-row: 1 / span 2; grid-column: 2; }
/* 24.51 Responsive: tablets and computers.
   - Wider than a phone, every screen's name shows in the tab bar (it wraps to a second line instead of hiding the last
     few off the right edge, where Activity and Help were out of sight even on a 1920px monitor).
   - On a computer the page grows to 1320px, and plain lists (Items, Reorder, Equipment, ...) show two columns, so a big
     monitor isn't a narrow strip down the middle. Lists with day or type headings stay one column so they read in order.
   - Windows get a little wider on a computer. */
@media (min-width: 1000px) {
  :root { --page: 1320px; }
  main .list:not(:has(> :not(.row))):not(:has(> .team-group)):has(> :nth-child(4)) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sheet { max-width: 640px; }
  /* Reading pages stay a comfortable line length. */
  #view-help > * { max-width: 900px; }
}
.more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
/* 24.99: in All screens (the menu button at the top) each screen is a row, not a tile. */
.more-sections .more-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.more-sections .more-tile { display: grid; min-height: 0; padding: 11px 14px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; color: var(--fg); }
.more-sections .more-tile:first-child { border-top: 0; }
.more-sections .more-tile strong { font-family: var(--font-body); font-size: 1rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.more-sections .more-tile[aria-current="page"] { border: 0; border-top: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--accent); }
.more-sections .more-tile[aria-current="page"]:first-child { border-top: 0; }
.more-tile { display: grid; gap: 2px; align-content: start; text-align: left; min-height: 78px; padding: 12px; border: 1px solid var(--btn-line); border-radius: var(--radius); background: var(--btn-bg); }
.more-tile strong { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0; }
.more-tile span { font-size: .85rem; color: var(--muted); }
.more-tile[aria-current="page"], .more-tile.picked { border: 2px solid var(--accent); }
.more-tile.picked { background: var(--surface-2); }
/* 24.67: More in sections, with Find a screen and a Recent row */
.more-q { width: 100%; min-height: 48px; font-size: 1.05rem; margin-bottom: 4px; }
.more-sections { display: grid; gap: 18px; margin-top: 14px; }
.more-sec h3 { margin: 0 0 8px; font-size: .8rem; letter-spacing: 0; color: var(--muted); }
.more-recent { display: flex; flex-wrap: wrap; gap: 8px; }
.more-recent-btn { min-height: 44px; }
/* Items: quick filters above the list */
.item-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.item-filters .chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; }
.item-filters select { flex: 1 1 160px; min-width: 0; padding: 8px 10px; min-height: 44px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--surface); }
.fchip { min-height: 44px; padding: 7px 12px; border: 1px solid var(--btn-line); border-radius: 999px; background: var(--btn-bg); color: var(--btn-fg); font-weight: 600; font-size: .92rem; }
/* 24.63: Type, Supplier and Sort sit behind Filters on a phone (app.js renderItems). */
.item-more { display: contents; }
.item-more-btn { display: none; }
@media (max-width: 480px) {
  .item-more-btn { display: inline-flex; align-items: center; min-height: 44px; }
  .item-more { display: none; }
  .item-filters.open .item-more { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; width: 100%; }
  .item-filters.open .item-more select { width: 100%; }
}
.fchip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
#view-items .toolbar input[type="search"] { flex: 1 1 120px; }
/* PM due list: unit tasks fold up by building, each with Done for all */
.pm-bldg-due { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-top: 8px; }
.pm-bldg-wrap { position: relative; }
.pm-bldg-wrap > .pm-done { position: absolute; top: 8px; right: 10px; }
.pm-bldg-due > summary { display: flex; align-items: center; gap: 10px; padding: 8px 140px 8px 14px; min-height: 60px; cursor: pointer; list-style: none; }
.pm-bldg-due > summary::-webkit-details-marker { display: none; }
.pm-bldg-due > summary::before { content: "▸"; color: var(--muted); }
.pm-bldg-due[open] > summary::before { content: "▾"; }
.pm-bldg-name { font-weight: 600; }
.pm-bldg-due > summary .hint { flex: 1; margin: 0; }
.pm-bldg-due > .list { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.pm-all-list { display: grid; gap: 4px; }
/* Team tab, admin view: each property's people under its name */
.row.team-group { background: transparent; border: 0; padding-bottom: 0; }
.row.team-group .name { font-weight: 700; color: var(--muted, inherit); }
/* Team tab, admin: a tick box per property under each person (version 22.3) */
.row.team-row .team-props { grid-row: 4; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-family: var(--font-body); }
.prop-chk { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; cursor: pointer; }
.prop-chk input { width: 18px; height: 18px; margin: 0; }
.brand .tm { font-size: .45em; vertical-align: super; margin-left: .1em; text-transform: none; }
.legal { font-size: .75rem; color: var(--muted); }
.legal a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: .9rem; }
.license-text { white-space: pre-wrap; font: .85rem/1.5 var(--font-body); margin: 0; }
/* Map zoom buttons and building pins big enough for a thumb. */
.fd-map.leaflet-touch .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; font-size: 22px; }

/* Properties tab (22.17) */
.prop-row .meta { grid-column: 1 / -1; }
.prop-row .name .chip { margin-left: 8px; vertical-align: middle; }
.prop-row .prop-notes { flex-basis: 100%; white-space: pre-wrap; }
/* A tap-to-call number is a thumb target, not a 20 px line of text (24.9). */
.prop-row .meta a[href^="tel:"] { display: inline-flex; align-items: center; min-height: 40px; padding: 0 4px; }

/* Header search button (23.0): Search everything from any screen */
.top-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-right .sync { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 25.7: a long property name ("Terrace Gardens") on a phone was cut off at the button's edge, and on the smallest phones
   the button had no room at all. The name now shortens with "…" inside the button, and on phones the brand and the gaps
   are a little smaller so the whole name fits from about 390px up. On the narrowest phones (380px and under) someone
   with the property button sees the property instead of the MaintStock name, which the sign-in screen already shows. */
.prop-switch { max-width: 100%; min-width: 0; }
.prop-switch > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 440px) { header.top .brand { font-size: 1.25rem; } .top-right { gap: 6px; } .top-row { gap: 8px; } }
.btn.search-all { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; flex: none; }
.btn.search-all svg { width: 22px; height: 22px; }
/* 24.90: Chat in the header, next to Search, on every screen; its count sits on the button's corner. */
.btn.chat-open { position: relative; }
.btn.chat-open .badge { position: absolute; top: -6px; right: -6px; }
/* 24.91 (Chris): the Chat button flashes while there are unread messages. 24.92 (Chris): "Change it to orange".
   With reduced motion it stays lit orange instead. */
:root { --chat-flash: #e8730c; --chat-flash-fg: #ffffff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --chat-flash: #ff9a3c; --chat-flash-fg: #1b1208; } }
:root[data-theme="dark"] { --chat-flash: #ff9a3c; --chat-flash-fg: #1b1208; }
.btn.chat-open.unread { animation: chat-flash 1.2s ease-in-out infinite; }
@keyframes chat-flash { 0%, 100% { background: var(--btn-bg); color: var(--btn-fg); } 50% { background: var(--chat-flash); color: var(--chat-flash-fg); border-color: var(--chat-flash); } }
@media (prefers-reduced-motion: reduce) { .btn.chat-open.unread { animation: none; background: var(--chat-flash); color: var(--chat-flash-fg); border-color: var(--chat-flash); } }
/* Today screen (23.0) */
.td-hello { font-size: 1.6rem; }
.td-search { display: grid; gap: 10px; }
.td-q { width: 100%; padding: 12px 14px; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--surface); font-size: 1.05rem; }
/* Unit # and Go (24.66): on Today, Scan and Appliances by unit, opens a unit straight to its appliances */
.ub { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.ub label { font-weight: 700; white-space: nowrap; }
.ub .ub-q { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--surface); font-size: 1.15rem; font-family: var(--font-mono); }
.ub .ub-go { min-height: 48px; min-width: 64px; }
#view-scan > .ub { margin-bottom: 4px; }
.uh-unknown { margin: 0; padding: 10px 12px; border: 1px solid var(--danger); border-left-width: 5px; border-radius: var(--radius); background: var(--surface); }
#view-unitgear .ug-tools input[type="search"] { flex: 1 1 160px; min-width: 0; }
.td-results { display: grid; gap: 8px; }
.td-results:empty { display: none; }
.td-group { font-size: .95rem; margin: 6px 0 0; color: var(--muted); }
.td-group .ct-main { color: var(--accent); font-weight: 600; }
.td-more .name { color: var(--accent); }
/* 25.15: Other shops (othershops.js) */
.td-others .name { color: var(--accent); }
.os-shop { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.os-name { margin: 0; font-size: 1.1rem; }
.os-part { grid-template-columns: minmax(0,1fr); }
.os-stock { font-weight: 700; }
.os-has { color: var(--in); }
.os-none { color: var(--muted); }
.os-unknown { color: var(--warn); }
.os-calls { flex-wrap: wrap; gap: 8px; }
.os-calls .btn { text-decoration: none; }
/* 25.0: Today's counts are one "At a glance" list of rows (they were tinted cards in a grid). */
.td-glance h3, .td-next h3, .td-photo-sec h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 600; }
.td-card .td-title { font-weight: 600; }
.td-card .num b { font-size: 1.5rem; }
.td-card.alert .td-sub, .td-card.alert b { color: var(--danger); }
.td-card[data-card="oncall"] .num b { font-family: var(--font-body); font-size: 1.1rem; font-weight: 600; }
.td-late { color: var(--danger); font-weight: 600; }
.td-next { display: grid; gap: 8px; }
.td-next:empty { display: none; }
/* Unit history (23.0) */
.uh-list .uh-kind { font-family: var(--font-body); font-weight: 600; }
.uh-list .row.uh-now { box-shadow: inset 4px 0 0 var(--accent); }
.uh-list .row.uh-warn { box-shadow: inset 4px 0 0 var(--warn); }
/* Contacts (23.0) */
#view-contacts .toolbar select, #view-contacts .toolbar input[type="search"] { flex: 1 1 180px; min-width: 0; }
.ct-row .ct-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; font-family: var(--font-body); }
.ct-row[data-contact] .meta { grid-column: 1 / -1; }
.ct-row[data-contact] .ct-btns { grid-row: 3; grid-column: 1 / -1; justify-content: flex-start; margin-top: 4px; }
.ct-row .ct-call { min-height: 44px; }
.ct-row .ct-notes { flex-basis: 100%; white-space: pre-wrap; }
/* Vendor details (24.58): insurance turns orange 30 days before it ends and red once it has ended. */
.ct-row .ct-addr { flex-basis: 100%; }
.ct-ins.soon { color: var(--warn); font-weight: 600; }
.ct-ins.expired { color: var(--danger); font-weight: 600; }
/* Preferred vendors (24.86): each property marks its own; Preferred only shows just those. */
#ct-pref[aria-pressed="true"], .ct-star[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.ct-row .name .ct-pref-tag { margin-left: 8px; font-size: .8rem; font-weight: 600; color: var(--warn); white-space: nowrap; }
.ct-pref-field { display: flex; gap: 10px; align-items: flex-start; }
.ct-pref-field input { margin-top: 4px; width: 20px; height: 20px; flex: none; }
.ct-star { min-width: 44px; font-size: 1.15rem; padding-inline: 10px; }
details.ct-vendor { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
details.ct-vendor summary { cursor: pointer; color: var(--accent); font-weight: 600; min-height: 44px; padding-block: 10px; margin-block: -10px; }
details.ct-vendor[open] { display: grid; gap: 12px; }
.ct-copy-row { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; cursor: pointer; }
.ct-copy-row input { grid-row: 1 / span 2; }
.ct-copy-row .meta { grid-column: 2; }
.ct-copy-row.dim { opacity: .6; cursor: default; }
/* Property window: screens this property uses (version 23.2) */
.pp-uses { display: grid; gap: 4px; margin: 0; padding: 10px 14px 6px; border: 1px solid var(--line); border-radius: var(--radius); }
.pp-uses legend { font-weight: 600; padding: 0 4px; }
.pp-uses .hint { margin-bottom: 4px; }
.pp-use { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.pp-use input { width: 22px; height: 22px; margin: 0; flex: none; }
.pp-use > span { display: grid; gap: 0; line-height: 1.25; }
.pp-use small { color: var(--muted); font-size: .85rem; }
.team-off { color: var(--warn); }
/* Make Ready: fill in from a photo (23.6) */
.mr-photo-pick { position: relative; justify-content: center; }
.mr-photo-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(10em, 1fr)); gap: 8px; }
.mr-photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mr-photo-prev { max-width: 100%; max-height: 40vh; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); }
.mr-imp-row { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.mr-imp-off { opacity: .6; }
.mr-imp-head { display: grid; grid-template-columns: auto minmax(0, 1fr) 5.5em; gap: 8px; align-items: center; }
.mr-imp-unit { font-weight: 700; font-size: 1.05rem; }
.mr-imp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5em, 1fr)); gap: 8px; }
.mr-imp-grid .field { display: grid; gap: 4px; min-width: 0; align-content: start; }
.mr-imp-grid input { min-width: 0; width: 100%; }
.mr-imp-checks { display: flex; flex-wrap: wrap; gap: 12px; }
.mr-imp-ex { margin: 0; color: var(--warn, #9a6700); }
.mr-unsure { background: var(--warn-bg) !important; border-color: var(--warn) !important; }

/* Activity > Everything (24.4): the count by area at the top, and a header for each day. */
.act-sum { display: grid; gap: 4px; padding: 12px 14px; }
.list .act-day { background: var(--surface-2); padding: 6px 14px; }
.list .act-day .name { font-size: .9rem; color: var(--muted); font-weight: 600; }
.list .type-head { background: var(--surface-2); padding: 6px 14px; font-size: .9rem; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); }
.act-dates input[type="date"] { flex: 1 1 130px; min-width: 0; min-height: 44px; }

/* View-only logins (24.5): buttons that only add or change things are hidden. The database refuses their changes
   anyway, and the app explains it if they find another way to try. */
body.view-only :is(#add-item, #import-items, #suggest-levels, #equip-add, #pool-edit, #pool-add, #pool-save, #pool-clear,
  #rep-new-insp, #rep-new, #team-form, #props-add, .vo-hide) { display: none !important; }
.team-vo { color: var(--warn); }
/* 24.11: a person's changes in one window, each with what it does. */
.team-chg { display: grid; gap: 12px; }
.team-chg-row { display: grid; gap: 4px; }
.team-chg-row .btn { justify-self: start; min-width: 10em; }

/* Switch property from the header (24.18): the property name is a button for people with more than one property */
.prop-switch { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px; border: 1px solid var(--btn-line); border-radius: var(--radius); background: var(--btn-bg); color: var(--btn-fg); font: inherit; font-weight: 600; cursor: pointer; }
.prop-switch .caret { font-size: .75em; color: var(--accent); }
.prop-switch:hover, .prop-switch:focus-visible { border-color: var(--accent); }
.prop-pick { display: grid; gap: 8px; margin-top: 12px; }
.prop-pick-btn { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 52px; font-size: 1.05rem; text-align: left; }
.prop-pick-btn.here { border-color: var(--accent); }

/* 24.21: tappable things look different from plain info. Buttons, tiles and pickers above use --btn-bg/--btn-line
   (a blue tint and blue edge in both themes); cards and info rows keep --surface/--line. A list row you can tap
   gets a blue › on the right; a row that is only information has none. */
button.row { position: relative; padding-right: 34px; color: inherit; }
button.row::after { content: "\203A"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; line-height: 1; color: var(--accent); pointer-events: none; }
/* 24.48, made stronger in 24.52: with a mouse, a button changes color while the pointer is over it (Chris: "change the
   color when pointer is over a button"; the 24.48 shade was too faint to notice). Plain blue-tint buttons fill solid blue
   with white (light theme) or dark (dark theme) words; filled buttons (primary, Take out, Put away, the picked choice)
   go darker in the light theme and brighter in the dark one; red-edged buttons fill red; tiles, cards, list rows and tabs
   get a strong blue tint (--btn-hover). Phones never see this: (hover: hover) only. */
@media (hover: hover) {
  .btn:not(:disabled):not(.primary):not(.danger):not(.go-out):not(.go-in):not([aria-pressed="true"]):hover,
  .fchip:not([aria-pressed="true"]):hover, .seg button:not([aria-pressed="true"]):hover, .pm-seg button:not([aria-pressed="true"]):hover,
  .mode button[aria-pressed="false"]:hover, .sheet-x:hover, .stepper button:not(:disabled):hover, .suggest button:hover, .mr-step:not(.mr-ro):hover, .prop-switch:hover {
    background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
  .mode button[aria-pressed="false"]:hover small, .suggest button:hover *, .prop-switch:hover .caret { color: inherit; }
  .more-tile:hover, .td-card:hover, .hvac-pick:hover, .pm-tile:not(:disabled):hover, button.row:hover { background: var(--btn-hover); border-color: var(--accent); }
  .btn.primary:not(:disabled):hover, .btn.go-out:not(:disabled):hover, .btn.go-in:not(:disabled):hover, .mode button[aria-pressed="true"]:hover,
  .seg button[aria-pressed="true"]:hover, .pm-seg button[aria-pressed="true"]:hover, .fchip[aria-pressed="true"]:hover { filter: brightness(.8); }
  .btn.danger:not(:disabled):hover { background: var(--danger); border-color: var(--danger); color: var(--surface); }
  nav.tabs button:hover, .phonebar button:hover { color: var(--accent); background: var(--btn-hover); }
  nav.tabs button[aria-current="page"]:hover { color: var(--fg); }
}
@media (hover: hover) { :root[data-theme="dark"] .btn.primary:not(:disabled):hover, :root[data-theme="dark"] .btn.go-out:not(:disabled):hover, :root[data-theme="dark"] .btn.go-in:not(:disabled):hover,
  :root[data-theme="dark"] .mode button[aria-pressed="true"]:hover, :root[data-theme="dark"] .seg button[aria-pressed="true"]:hover,
  :root[data-theme="dark"] .pm-seg button[aria-pressed="true"]:hover, :root[data-theme="dark"] .fchip[aria-pressed="true"]:hover { filter: brightness(1.25); } }
@media (hover: hover) and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary:not(:disabled):hover, :root:not([data-theme="light"]) .btn.go-out:not(:disabled):hover,
  :root:not([data-theme="light"]) .btn.go-in:not(:disabled):hover, :root:not([data-theme="light"]) .mode button[aria-pressed="true"]:hover,
  :root:not([data-theme="light"]) .seg button[aria-pressed="true"]:hover, :root:not([data-theme="light"]) .pm-seg button[aria-pressed="true"]:hover,
  :root:not([data-theme="light"]) .fchip[aria-pressed="true"]:hover { filter: brightness(1.25); } }

/* 24.47: the mouse-over tip bubble (tips.js). Dark in both themes so it stands out from the page. */
.tip { position: fixed; z-index: 1000; max-width: min(320px, calc(100vw - 16px)); padding: 6px 10px; border-radius: 6px; background: #24202a; color: #f4f1f8;
  border: 1px solid #bba0df; font-size: .85rem; font-weight: 500; line-height: 1.35; text-transform: none; letter-spacing: 0; box-shadow: 0 4px 14px rgba(0,0,0,.28);
  pointer-events: none; opacity: 0; transition: opacity .12s; }
.tip.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .tip { transition: none; } }
button.row:active, .btn:not(:disabled):active, .more-tile:active, .td-card:active { filter: brightness(.95); }

/* On-call schedule (24.35, oncall.js) */
.oc-row .oc-label { display: block; font-family: var(--font-body); font-size: .75rem; font-weight: 600; letter-spacing: 0; color: var(--muted, inherit); }   /* 24.63: no opacity, it dropped the 12 px label below 4.5:1 */
.oc-row.oc-current { border-left: 5px solid var(--accent); }
#oc-now .oc-row .name span { font-size: 1.15rem; font-weight: 700; }
.oc-row .oc-call { min-height: 44px; }
.oc-hol { font-weight: 600; color: var(--warn); }
.oc-tag { font-weight: 600; color: var(--accent); }
.oc-warn { padding: 10px 12px; border-radius: var(--radius); background: var(--warn-bg); border: 1px solid var(--warn); }
.oc-updated { margin: 0; }
.oc-month { margin: 14px 0 4px; }
.oc-dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.oc-dates > * { min-width: 0; }
@media (max-width: 360px) { .oc-dates { grid-template-columns: minmax(0, 1fr); } }
.oc-years { display: flex; gap: 6px; flex-wrap: wrap; }
.oc-years .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.oc-person { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; padding-bottom: 10px; border-bottom: 1px solid var(--line, rgba(127,127,127,.25)); }
.oc-person .oc-n { padding-top: 10px; min-width: 1.4em; text-align: right; }
.oc-person-boxes { display: grid; gap: 6px; }
.oc-person-btns { display: flex; flex-direction: column; gap: 4px; }
.oc-person-btns .btn { min-width: 44px; min-height: 40px; padding: 0 8px; }
/* 24.38: For unit box on the Scan screen (Take out) */
.forunit { display: grid; gap: 6px; margin: 4px 0 12px; }
.forunit label { font-weight: 600; }
.forunit label small { font-weight: 400; color: var(--muted, inherit); }
.forunit-row { display: flex; gap: 8px; }
.forunit-row input { flex: 1; min-width: 0; }
#forunit-note { display: grid; gap: 6px; justify-items: start; }
#forunit-note .hint { margin: 0; }
.forunit-repeat { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--radius); background: var(--warn-bg); border: 1px solid var(--warn); color: var(--fg); }

/* 24.38: Regional screen and property setup checklist */
.rg-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.rg-head h2 { margin: 0; }
.rg-list { display: grid; gap: 14px; margin-top: 12px; }
.rg-card { border: 1px solid var(--line, rgba(127,127,127,.35)); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 10px; background: var(--surface); }
.rg-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.rg-top h3 { margin: 0; font-size: 1.05rem; }
.rg-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.rg-stat { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--bg); }
.rg-stat b { font-size: 1.3rem; font-family: var(--font-mono, monospace); }
.rg-stat span { font-size: .85rem; }
.rg-stat small { font-size: .8rem; opacity: .85; }
.rg-stat.bad b, .rg-stat.bad small { color: var(--danger); }
.rg-stat.warn b { color: var(--warn); }
.su-list { display: grid; gap: 8px; }
.su-step { display: grid; grid-template-columns: 1.6em 1fr; gap: 4px 8px; align-items: start; }
.su-step .su-mark { font-weight: 700; text-align: center; }
.su-step.done .su-mark { color: var(--in); }
.su-step:not(.done) .su-mark { color: var(--warn); }
.su-step .su-body { display: grid; gap: 4px; justify-items: start; }
.su-step .su-body p { margin: 0; }

/* S'gaw Karen (24.36, demo only for now): Myanmar script needs its own font, no letter spacing or capitals, and taller lines. */
:lang(ksw) body, [lang="ksw"] { font-family: "Noto Sans Myanmar", "Padauk", "Myanmar Text", var(--font-body), sans-serif; }
:lang(ksw) * { letter-spacing: 0 !important; text-transform: none !important; }
:lang(ksw) body { line-height: 1.6; }

/* Mileage (24.43) */
.ml-month { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ml-month strong { font-size: 1.1rem; }
.ml-month-label { display: grid; justify-items: center; gap: 2px; text-align: center; }
.ml-month .btn { min-width: 48px; font-size: 1.3rem; }
.ml-late { color: var(--danger); font-weight: 700; }
.ml-sent { color: var(--in); font-weight: 600; }
.ml-year { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ml-year th, .ml-year td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.ml-year th:nth-child(2), .ml-year td:nth-child(2), .ml-year th:nth-child(3), .ml-year td:nth-child(3) { text-align: right; }
.ml-year-total td { font-weight: 700; }
.ml-again { display: flex; flex-wrap: wrap; gap: 6px; }
.ml-rules { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
/* 24.69: Reports > Send several. Each saved report gets a tick box; the bar with Send stays in view at the bottom. */
.rep-saved-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rep-saved-h h3 { margin: 0; }
.row.rep-pick { grid-template-columns: auto minmax(0, 1fr); cursor: pointer; }
.row.rep-pick input[type="checkbox"] { grid-row: 1 / span 3; width: 24px; height: 24px; margin: 0; accent-color: var(--accent); }
.row.rep-pick .meta, .row.rep-pick .hint { grid-column: 2; }
.row.rep-pick-off { cursor: default; opacity: .75; }
.rep-bulk { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 4; display: grid; gap: 8px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 16px rgb(0 0 0 / .18); }
.rep-bulk[hidden] { display: none; }
.rep-bulk-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* 24.74 GL codes (gl.js): Items > GL codes, the GL code line on a part, GL on Reorder */
.gl-results { display: grid; gap: 10px; min-width: 0; }
.gl-results h3 { margin: 6px 0 0; font-size: .85rem; color: var(--muted); letter-spacing: 0; }
.gl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; overflow-wrap: anywhere; }
.gl-card.gl-best { border: 2px solid var(--accent); }
.gl-label { font-size: .72rem; font-weight: 700; letter-spacing: 0; color: var(--muted); }
.gl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.gl-head .btn { margin-left: auto; }
.gl-code { font-size: 1.15rem; color: var(--accent); }
.gl-best .gl-code { font-size: 1.4rem; }
.gl-name { font-weight: 650; }
.gl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.gl-match { margin-top: 6px; font-size: .92rem; }
.gl-card mark { background: var(--warn-bg); color: inherit; border-radius: 3px; padding: 0 2px; }
.gl-card details summary { cursor: pointer; color: var(--accent); font-size: .88rem; margin-top: 6px; }
.gl-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; overflow-wrap: anywhere; }
.gl-btns { display: inline-flex; gap: 6px; margin-left: auto; }
.gl-tag { display: block; color: var(--muted); }
.gl-panel { display: grid; gap: 10px; min-width: 0; }
.gl-pick { display: grid; gap: 8px; margin-top: 8px; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; min-width: 0; }
.gl-pick > .btn { justify-self: start; }
/* 24.78: one part, several suppliers. Reorder's "Order from" box sits under the part on its own line. */
.ro-from { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); padding: 0 14px 10px 44px; }
.ro-from select { flex: 1; min-width: 0; max-width: 28em; }
.alt-add input { min-width: 0; }
.dupe-list { display: grid; gap: 10px; }
.dupe-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.dupe-row .toolbar { grid-column: 1 / -1; }
.dupe-side { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.dupe-side small { color: var(--muted); }
@media (max-width: 420px) { .dupe-row { grid-template-columns: 1fr; } }
/* 24.79: Don't stock on a Reorder line: one line of text; on a phone it drops below the number when there's no room. */
.ro-nostock { white-space: nowrap; }
.gl-tag { white-space: nowrap; }

/* Unit photos (24.93, unitphotos.js) */
.up-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.up-head h3 { margin: 0; }
.up-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.up-thumb { position: relative; display: block; width: 84px; height: 84px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); cursor: pointer; }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-queued { border: 2px dashed var(--warn, #b26a00); }
.up-tag { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 4px; background: rgba(0, 0, 0, .62); color: #fff; font-size: .75rem; font-weight: 600; text-align: center; }
.up-big { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.up-unit { max-width: 9em; font-size: 1.1rem; }
.up-tags { flex-wrap: wrap; }
.up-sort-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 10px; align-items: center; }
.up-sort-row img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; }
.up-sort-what { display: grid; gap: 2px; min-width: 0; }
.up-sort-row .up-unit { width: 6.5em; }
.up-dup { background: var(--warn-bg); }
.up-wait { color: var(--warn, #b26a00); font-weight: 600; }
.td-photos { margin-top: -4px; }
.up-head-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

/* Resident notices (notices.js, 24.95). The preview is paper, so it stays white in dark mode. */
.nt-logo-row { display: grid; gap: 8px; justify-items: start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.nt-logo-thumb { max-width: min(320px, 100%); max-height: 110px; object-fit: contain; border: 1px solid var(--line); background: #fff; }
.nt-logo-name { font-size: 1.2rem; }
.nt-logo-row .hint, .nt-logo-field .hint { margin: 0; }
.nt-h { margin: 16px 0 8px; font-size: 1rem; }
.nt-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nt-two .field { min-width: 0; }
.nt-two input { width: 100%; min-width: 0; }
#nt-body { width: 100%; font: inherit; line-height: 1.4; }
.nt-preview { overflow: hidden; }
.nt-paper { background: #fff; color: #111; border: 1px solid #c8cdd0; box-shadow: 0 1px 4px rgba(0,0,0,.15); padding: 6% 7%; aspect-ratio: 8.5 / 11; overflow: hidden; display: grid; grid-template-rows: 1fr; font-family: Helvetica, Arial, sans-serif; font-size: clamp(9px, 2.6vw, 14px); }
.nt-paper.half { grid-template-rows: 1fr auto 1fr; gap: 4%; font-size: clamp(7px, 1.7vw, 10px); }
.nt-paper-in { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.nt-paper-logo { display: block; margin: 0 auto; max-width: 66%; max-height: 7em; object-fit: contain; }
.nt-paper-name { text-align: center; font-weight: 700; font-size: 1.8em; }
.nt-paper-rule { border-top: 1.5px solid #3c3c3c; margin: .9em 0 1.4em; }
.nt-paper-title { text-align: center; font-weight: 700; font-size: 2.1em; line-height: 1.15; margin-bottom: .4em; overflow-wrap: anywhere; }
.nt-paper-when { text-align: center; font-size: 1.05em; }
.nt-paper-body { white-space: pre-wrap; margin-top: 1.2em; line-height: 1.35; flex: 0 1 auto; min-height: 0; overflow: hidden; overflow-wrap: anywhere; }
.nt-paper-sign { margin-top: 1em; }
.nt-paper-foot { white-space: pre-line; text-align: center; color: #555; font-size: .75em; border-top: 1px solid #aaa; padding-top: .4em; margin-top: auto; }
.nt-paper-sign + .nt-paper-foot { margin-top: auto; }
.nt-cut { border-top: 1px dashed #999; }

/* ---------- 25.8: Chris's new look (picked 2026-11-22, thread "Mock up MaintStock's new look") ----------
   Amethyst purple only for the open tab, main buttons, screen names and the logo; Public Sans; outline main buttons;
   each list item in its own box; plain icons in the top bar; underlined screen tabs; the main menu along the bottom
   with bold filled icons and a line over the open room. Light and dark follow the phone (or Help > This phone). */
h2 { letter-spacing: -0.01em; }

/* Top of every screen: the logo (Home) beside the property and the screen's name. The wordmark is gone from here
   (the sign-in card still has it). */
.top-row { padding-block: 10px 10px; }
.top-id { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.top-home { flex: none; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.top-home svg { display: block; width: 46px; height: 46px; }
.top-home .mark-bg { fill: var(--accent); }
.top-titles { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.top-prop { max-width: 100%; min-width: 0; }
.top-prop .prop-switch { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; max-width: 100%; padding: 0; border: 0; border-radius: 4px;
  background: none; color: var(--fg); font: 600 .9rem/1.2 var(--font-body); }
.top-prop .prop-switch:hover, .top-prop .prop-switch:focus-visible { background: none; color: var(--accent); }
.top-prop .prop-switch > span:first-child, .top-prop .prop-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-prop .prop-name { display: block; font: 600 .9rem/1.2 var(--font-body); color: var(--muted); }
.top-prop .caret { flex: none; width: 16px; height: 16px; color: inherit; }
.top-title { margin: 0; max-width: 100%; font: 700 1.6rem/1.15 var(--font-display); color: var(--accent); letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-right { flex: none; }
.top-right .sync { max-width: 7em; }
@media (max-width: 440px) { .top-title { font-size: 1.35rem; } .top-home, .top-home svg { width: 40px; height: 40px; } .top-id { gap: 10px; } }

/* Chat, Search and All screens: plain icons, no tinted boxes. */
.btn.search-all { background: transparent; border-color: transparent; color: var(--fg); }
.btn.search-all:hover { background: var(--btn-hover); }

/* The main menu along the bottom, like the Amazon app (Shop, Units, Guides, People; the logo is Home). In-app browsers
   (a link opened from Facebook or Gmail) may cover it with their own toolbar; "Open in browser" or the installed app
   shows it. The page leaves room for it so nothing hides behind it. */
body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
.roombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; max-width: none; margin: 0 !important; padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface); border-top: 1px solid var(--line); }
.roombar button { height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-bottom: 0; border-top: 3px solid transparent; font: 500 .8rem/1.1 var(--font-body); color: var(--muted); }
.roombar button[aria-current="page"] { color: var(--accent); border-top-color: var(--accent); font-weight: 700; }
.roombar .room-ico { width: 26px; height: 26px; flex: none; }
.roombar .badge { position: absolute; top: 5px; left: 50%; right: auto; margin-left: 6px; background: var(--fg); color: var(--surface); }
@media (min-width: 701px) { .roombar button { font-size: .9rem; } .roombar .badge { position: absolute; margin-left: 6px; } }

/* A room's screens (Scan, Reorder, Items, Equipment): underlined tabs, not pills. */
.room-sub { gap: 22px; margin-bottom: 16px; padding-bottom: 0; border-bottom: 1px solid var(--line); }
.room-chip { min-height: 44px; padding: 8px 0 6px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--muted); font-weight: 500; }
.room-chip[aria-current="page"] { background: none; border-color: var(--accent); color: var(--accent); font-weight: 700; }
.room-chip .badge, nav.tabs .badge { background: var(--fg); color: var(--surface); }

/* Main buttons: a purple outline, no fill. Switches that show which one is on (Take out / Put away / Count, To order /
   On order, Light / Dark) stay filled purple on the chosen one. */
.btn.primary, a.btn.primary { background: transparent; border: 2px solid var(--accent); color: var(--accent); }
.btn.primary:hover { background: var(--btn-hover); }
.camera-btn { background: transparent; border: 2px solid var(--accent); color: var(--accent); }
.mode button[aria-pressed="true"], .mode button[data-mode][aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-fg); }
.mode button { font-size: 1.05rem; padding: 12px 4px; }
.mode button small { font-size: .72rem; }
.btn, .mode button, input, select, textarea { border-radius: 6px; }

/* Lists: each item in its own box. */
.list { background: transparent; border: 0; border-radius: 0; gap: 8px; overflow: visible; }
.list > .row, .list > button.row, .list > .row:first-child, .list > button.row:first-child { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
@media (max-width: 380px) { .top-title { font-size: 1.2rem; } .top-home, .top-home svg { width: 36px; height: 36px; } .top-id { gap: 8px; } }
@media (min-width: 701px) { .roombar { padding-inline: max(16px, calc((100% - var(--page)) / 2)); } }
/* 25.9: each To order line's part # copies just that number; the supplier list opened from the Friday order email is
   outlined so it's easy to find. */
.ro-copy { white-space: nowrap; font-family: var(--font-mono); max-width: 14em; overflow: hidden; text-overflow: ellipsis; }
.list.supplier.ro-from-email { outline: 3px solid var(--accent); outline-offset: 2px; }
#pp-order-send { justify-self: start; margin-top: 6px; }

/* ---------- Review fixes (2026-12-05): a review of the new look against Chris's picks (Nov 22 and Look B, Nov 26),
   for contrast, phone sizes and the HVAC and inventory screens. Purple stays on the open tab, main buttons, screen
   names and the logo; everything else is black, white and gray. ---------- */

/* Mouse-over (24.52, kept in the new look): Chris asked for a button to "change the color when pointer is over a button"
   and couldn't see a faint shade, so a plain button still fills solid purple with light (or, dark theme, dark) words, and
   a main button's purple outline fills in the same way. Tiles and list rows get a purple edge. The property name up top
   is bare text, so it is underlined instead. Phones never see this: (hover: hover) only. */
@media (hover: hover) {
  .btn:not(:disabled):not(.primary):not(.danger):not(.go-out):not(.go-in):not([aria-pressed="true"]):hover,
  .fchip:not([aria-pressed="true"]):hover, .seg button:not([aria-pressed="true"]):hover, .pm-seg button:not([aria-pressed="true"]):hover,
  .mode button[aria-pressed="false"]:hover, .sheet-x:hover, .stepper button:not(:disabled):hover, .suggest button:hover, .mr-step:not(.mr-ro):hover,
  .btn.primary:not(:disabled):hover, a.btn.primary:hover, .btn.go-out:not(:disabled):hover, .btn.go-in:not(:disabled):hover {
    background: var(--accent); border-color: var(--accent); color: var(--accent-fg); filter: none !important; }
  .more-tile:hover, .td-card:hover, .hvac-pick:hover, .pm-tile:not(:disabled):hover, button.row:hover { border-color: var(--accent); }
  .top-prop .prop-switch:hover { background: none; border-color: transparent; color: var(--accent); }
  .top-prop .prop-switch:hover > span:first-child { text-decoration: underline; text-underline-offset: 3px; }
}

/* Take out / Put away: purple outline like the other main buttons; the picked kind (Make ready, Work order) is purple. */
.btn.go-in, .btn.go-out { background: transparent; border: 2px solid var(--accent); color: var(--accent); }
.mode button[data-kind][aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.mode button small { font-size: .75rem; }
.mode button[aria-pressed="true"] small { color: inherit; }

/* No pills: small corners everywhere. */
.chip, .summary-chips .chip, .fchip, .prop-chk, .cc-status, .fr-status, .sheet-x { border-radius: 6px; }
.badge { background: var(--fg); color: var(--surface); border-radius: 6px; }

/* Purple only where Chris picked it: these go black (dark: white). */
button.row::after { color: var(--muted); }
.td-group .ct-main, .td-more .name, .td-others .name, details.ct-vendor summary, .oc-tag, .appl-link b, .fr-new, .fr-new-count { color: var(--fg); }
.fr-new { border-color: var(--field-line); }
.appl-job { border: 1px solid var(--line); }
.brand { text-transform: none; letter-spacing: 0; }
.demo-ribbon b { text-transform: none; letter-spacing: 0; }

/* Look B (Nov 26): bins look like shelf labels, in the number font. */
.bin { display: inline-flex; align-items: center; gap: 5px; }
.bin b { padding: 1px 6px; border: 1px solid var(--field-line); border-left: 4px solid var(--fg); border-radius: 3px; background: var(--surface);
  color: var(--fg); font: 600 .82rem/1.35 var(--font-mono); letter-spacing: .02em; }

/* Look B: rows you can't tap are plain lines, not boxes; tappable ones stay boxed. Day and team headings sit bare. */
.list > .row:not(button):not(.team-group):not(.act-day) { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; padding-inline: 2px; }
.list > .row:not(button):last-child { border-bottom: 0; }
.list > .row.act-day, .list > .row.team-group { border: 0; background: transparent; }
/* Reorder's pick lines and supplier heads sit in boxes like the rest. */
.list > .pickrow { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.list > .pickrow + .pickrow { border-top: 1px solid var(--line); }
.supplier-head { border-radius: 6px; }
/* No boxes inside boxes: All screens' rows and Other shops' lists are lines. */
.more-sections .more-grid > .row, .os-shop .list > .row { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.more-sections .more-grid > .row:first-child, .os-shop .list > .row:first-child { border-top: 0; }

/* Contrast: placeholders as dark as hint text (they were too faint on white). */
::placeholder { color: var(--muted); opacity: 1; }

/* The bottom menu: messages, the sticky Select bar and jumped-to fields sit above it, never under it. */
body:not(.sheet-open):not(.camera-on) .toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
.rep-bulk { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
html { scroll-padding-top: calc(80px + env(safe-area-inset-top, 0px)); scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
.chat-log { max-height: calc(100dvh - 400px - env(safe-area-inset-bottom, 0px)); }
/* :root already leaves room for the iPhone home bar, so the page adds only the menu's own height. */
body { padding-bottom: 64px; }
/* Big text (phone font size up): the menu grows instead of clipping its words. */
.roombar button { height: auto; min-height: 64px; }
.roombar button:focus-visible { outline-offset: -3px; }
/* While the keyboard is up, the menu steps aside so the field stays in view. */
body.typing .roombar { display: none; }
body.typing { padding-bottom: 0; }
/* Wide screens: the four rooms sit together in the middle, not spread edge to edge. */
.roombar { display: flex; justify-content: center; }
.roombar button { flex: 1; max-width: 225px; }

/* Room tabs (Scan, Reorder, Items, Equipment): full 44px targets that still fit on a small phone. */
.room-sub { gap: 10px; }
.room-chip { padding-inline: 6px; min-width: 44px; justify-content: center; }
.room-chip:focus-visible { outline-offset: -3px; border-radius: 4px; }

/* Top bar: the property switch and the logo are full-size tap targets. */
.top-prop .prop-switch { min-height: 44px; margin-block: -8px; }
.top-home { position: relative; }
.top-home::after { content: ""; position: absolute; inset: -4px; }
/* Long screen names (Spanish) shrink a step before they cut off. */
.top-title[data-len="l"] { font-size: 1.3rem; }
.top-title[data-len="xl"] { font-size: 1.1rem; }
.top-titles .sync { margin-top: 2px; font-size: .8rem; }

/* Printing a screen leaves the menus off the paper. */
@media print { .roombar, header.top { display: none; } body { padding-bottom: 0; } }
/* Chris (2026-12-05): the top bar shows the property, big and purple, and tapping it switches properties (a down
   arrow says so). The screen's own name stays on the screen (tabs, headings); #top-title is kept for screen readers. */
.top-title { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.top-prop .prop-switch, .top-prop .prop-name { font: 700 1.5rem/1.15 var(--font-display); color: var(--accent); letter-spacing: -0.01em; }
.top-prop .prop-switch:hover, .top-prop .prop-switch:focus-visible { color: var(--accent); }
.top-prop .caret { width: 22px; height: 22px; }
/* Phones: the property name may take two lines rather than cut off after a few letters. */
@media (max-width: 560px) {
  .top-prop .prop-switch, .top-prop .prop-name { font-size: 1.2rem; line-height: 1.1; text-align: start; }
  .top-prop .prop-switch > span:first-child, .top-prop .prop-name { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  .top-prop .caret { width: 20px; height: 20px; }
}
@media (max-width: 380px) { .top-prop .prop-switch, .top-prop .prop-name { font-size: 1.05rem; } }
/* HVAC cards side by side: the short card's description stays under its title, not pushed down to match its taller neighbour. */
.hvac-pick { align-content: start; }
/* All screens menu (and other properties' shop lists): the first row of a group was keeping the boxed card style while
   the rows under it were plain. Each group is now one box with plain rows divided inside it. */
.more-sections .more-grid > .row:first-child, .os-shop .list > .row:first-child { border: 0; border-radius: 0; background: none; }
.more-sections .more-grid { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); overflow: hidden; }
