/* Tarrytown House Estate — Housekeeping.
   Layout: a deep-blue top bar, content in cards on estate cream, a bottom tab bar on phones and a
   left menu on wide screens. Status is shown by color AND a glyph/label, never color alone. */
@font-face { font-family: "Albert Sans"; src: url(fonts/albert-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url(fonts/albert-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url(fonts/albert-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url(fonts/albert-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "DM Serif Display"; src: url(fonts/dmserif-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #F1ECE4; --surface: #FFFFFF; --surface-2: #F8F5EF; --ink: #23262B; --ink-2: #565A61; --ink-3: #7D8188; --line: #E2DACD; --line-2: #EFE9DF;
  --brand: #436092; --brand-deep: #2F4770; --brand-soft: #E3E9F3; --on-brand: #FFFFFF; --gold: #A37407; --gold-ink: #7E5A05; --gold-soft: #F4E8C8;
  --ok: #2D6A3E; --ok-bg: #DDF0E2; --warn: #8A5A00; --warn-bg: #FCEFD3; --bad: #A1271B; --bad-bg: #FBDAD5;
  --s-todo: #8A3324; --s-todo-bg: #F8E5E0; --s-prog: #8A5A00; --s-prog-bg: #FCEFD3; --s-clean: #24508F; --s-clean-bg: #E1EAF8;
  --s-insp: #2D6A3E; --s-insp-bg: #DDF0E2; --s-redo: #A1271B; --s-redo-bg: #FBDAD5; --s-dnd: #55585E; --s-dnd-bg: #ECEDEF;
  --s-hold: #5E3F96; --s-hold-bg: #ECE3F7; --s-ooo: #3A3A3A; --s-ooo-bg: #E2E2E2; --s-none: #8A8D93;
  --shadow: 0 1px 2px rgba(35,38,43,.06), 0 4px 14px rgba(35,38,43,.06);
  --shadow-lg: 0 10px 40px rgba(20,24,32,.22);
  --r: 14px; --r-sm: 10px;
  --font: "Albert Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --top: 56px; --tabs: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15191F; --surface: #1F242C; --surface-2: #262C35; --ink: #ECE8E1; --ink-2: #B9B4AA; --ink-3: #8F8B83; --line: #343B46; --line-2: #2B313A;
    --brand: #8EA9DB; --brand-deep: #1E2E4A; --brand-soft: #26324A; --on-brand: #0F1520; --gold: #D9A53A; --gold-ink: #E2B652; --gold-soft: #3B3120;
    --ok: #8FD3A0; --ok-bg: #1E3626; --warn: #F1C46C; --warn-bg: #3A2E15; --bad: #F2A196; --bad-bg: #44211C;
    --s-todo: #F0A898; --s-todo-bg: #3E231D; --s-prog: #F1C46C; --s-prog-bg: #3A2E15; --s-clean: #A9C4F2; --s-clean-bg: #1F2D45;
    --s-insp: #8FD3A0; --s-insp-bg: #1E3626; --s-redo: #F2A196; --s-redo-bg: #44211C; --s-dnd: #B9BCC2; --s-dnd-bg: #2C3037;
    --s-hold: #C9B2F0; --s-hold-bg: #33284A; --s-ooo: #D8D8D8; --s-ooo-bg: #333333; --s-none: #6F737A;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25); --shadow-lg: 0 10px 40px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15191F; --surface: #1F242C; --surface-2: #262C35; --ink: #ECE8E1; --ink-2: #B9B4AA; --ink-3: #8F8B83; --line: #343B46; --line-2: #2B313A;
  --brand: #8EA9DB; --brand-deep: #1E2E4A; --brand-soft: #26324A; --on-brand: #0F1520; --gold: #D9A53A; --gold-ink: #E2B652; --gold-soft: #3B3120;
  --ok: #8FD3A0; --ok-bg: #1E3626; --warn: #F1C46C; --warn-bg: #3A2E15; --bad: #F2A196; --bad-bg: #44211C;
  --s-todo: #F0A898; --s-todo-bg: #3E231D; --s-prog: #F1C46C; --s-prog-bg: #3A2E15; --s-clean: #A9C4F2; --s-clean-bg: #1F2D45;
  --s-insp: #8FD3A0; --s-insp-bg: #1E3626; --s-redo: #F2A196; --s-redo-bg: #44211C; --s-dnd: #B9BCC2; --s-dnd-bg: #2C3037;
  --s-hold: #C9B2F0; --s-hold-bg: #33284A; --s-ooo: #D8D8D8; --s-ooo-bg: #333333; --s-none: #6F737A;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25); --shadow-lg: 0 10px 40px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh; }
body.noscroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -5px; }
.ic.dim { opacity: .45; }
.ic.big { width: 56px; height: 56px; stroke-width: 1.5; }
.ic.ok { color: var(--ok); } .ic.warn { color: var(--warn); }

/* ---------- shell ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; background: var(--brand-deep); color: #fff; padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px; min-height: var(--top); }
.topbar a, .topbar button { color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand img { width: 34px; height: auto; }
.brand-t { display: flex; flex-direction: column; line-height: 1.05; }
.brand-t b { font-family: var(--serif); font-weight: 400; font-size: 20px; letter-spacing: .2px; }
.brand-t small { font-size: 11px; opacity: .78; letter-spacing: .4px; text-transform: uppercase; }
.tb-back { background: none; border: 0; padding: 8px; margin-left: -4px; border-radius: 10px; display: flex; }
.tb-title { flex: 1; min-width: 0; font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand:not([hidden]) + .tb-title { display: none; }
.tb-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.langbtn { display: inline-flex; border: 1px solid rgba(255,255,255,.45); background: transparent; border-radius: 999px; padding: 2px; font-size: 12px; font-weight: 700; letter-spacing: .5px; min-height: 32px; align-items: center; }
.langbtn span { padding: 4px 8px; border-radius: 999px; opacity: .75; }
.langbtn span.on { background: #fff; color: var(--brand-deep); opacity: 1; }
.tb-icon { position: relative; display: flex; padding: 8px; border-radius: 10px; }
.tb-me { display: flex; text-decoration: none; padding: 4px; }
.nbadge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; border-radius: 9px; background: #D9412E; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.nbadge.static { position: static; margin-left: 4px; background: var(--brand); color: var(--on-brand); }
.practicebar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 16px; background: var(--gold-soft); color: var(--gold-ink); font-weight: 600; font-size: 14px; }
.statusbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 16px; font-size: 14px; font-weight: 600; }
.statusbar.off { background: var(--s-dnd-bg); color: var(--ink); }
.statusbar.pend { background: var(--warn-bg); color: var(--warn); }
.statusbar span { display: inline-flex; align-items: center; gap: 6px; }
.statusbar.warn { background: var(--bad); color: #fff; }
.statusbar.warn .linkbtn { color: #fff; }
.linkbtn { background: none; border: 0; padding: 4px 2px; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.layout { display: flex; min-height: calc(100vh - var(--top)); }
main#view { flex: 1; min-width: 0; outline: none; padding-bottom: calc(var(--tabs) + 24px + env(safe-area-inset-bottom, 0px)); }
.sidenav { display: none; }
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px env(safe-area-inset-bottom, 0px); box-shadow: 0 -2px 12px rgba(0,0,0,.05); }
.tab { flex: 1 1 0; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 2px; text-decoration: none; color: var(--ink-3); font-size: 11.5px; font-weight: 600; border: 0; background: none; border-radius: 12px; }
.tab span:not(.nbadge) { text-align: center; line-height: 1.15; overflow-wrap: anywhere; }
.tab .ic { width: 24px; height: 24px; }
.tab.on { color: var(--brand); }
.tab.on::before { content: ""; position: absolute; top: 2px; width: 28px; height: 3px; border-radius: 2px; background: var(--brand); }
.tab .nbadge { top: 4px; right: calc(50% - 22px); }
@media (min-width: 960px) {
  .sidenav:not([hidden]) { display: block; width: 236px; flex: none; padding: 16px 12px; border-right: 1px solid var(--line); background: var(--surface); position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow: auto; }
  .sn-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 600; }
  .sn-item:hover { background: var(--surface-2); }
  .sn-item.on { background: var(--brand-soft); color: var(--brand); }
  .sn-item .nbadge { position: static; margin-left: auto; }
  .tabbar { display: none; }
  main#view { padding-bottom: 48px; }
}

/* ---------- page & cards ---------- */
.page { max-width: 720px; margin: 0 auto; padding: 16px 16px 0; display: flex; flex-direction: column; gap: 14px; }
.page.wide { max-width: 1240px; }
.has-sticky { padding-bottom: 96px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card-t { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 17px; font-weight: 700; }
.count { display: inline-flex; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; font-weight: 700; align-items: center; justify-content: center; margin-left: 4px; }
.sec { display: flex; align-items: center; gap: 6px; margin: 8px 0 -4px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-2); }
.glabel { margin: 14px 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2); }
.muted { color: var(--ink-2); } .small { font-size: 13.5px; } .center { text-align: center; justify-content: center; } .mt { margin-top: 12px; } .block { display: block; }
.row { display: flex; align-items: center; } .gap { gap: 10px; } .end { justify-content: flex-end; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; } .grow { flex: 1; } .nowrap { white-space: nowrap; }
.err { color: var(--bad); font-weight: 600; margin: 4px 0; min-height: 0; }
.err:empty { display: none; }
.note { margin: 6px 0 0; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-line { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); font-size: 14px; }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; }
.warnt { color: var(--warn); font-weight: 700; } .badt { color: var(--bad); font-weight: 700; } .badt .ic { width: 15px; height: 15px; vertical-align: -2px; } .ok-t { color: var(--ok); font-weight: 700; } .danger-t { color: var(--bad) !important; }
.empty { text-align: center; padding: 32px 16px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty .ic { width: 44px; height: 44px; opacity: .55; }
.empty h3 { margin: 6px 0 0; color: var(--ink); font-size: 18px; }
.empty p { margin: 0 0 8px; max-width: 42ch; }

/* ---------- buttons & chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 650; text-decoration: none; cursor: pointer; line-height: 1.15; text-align: center; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.btn.ghost { background: transparent; }
.btn.big { min-height: 54px; font-size: 17px; padding: 12px 20px; border-radius: 14px; }
.btn.wide { width: 100%; }
.btn.small { min-height: 34px; padding: 6px 10px; font-size: 14px; border-radius: 9px; }
.btn.icon-only { padding: 8px; min-width: 44px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 20px; white-space: nowrap; border: 1px solid transparent; }
.chip .ic { width: 14px; height: 14px; vertical-align: -2px; }
.chip.type { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.chip.type-departure { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.chip.type-deep { background: var(--gold-soft); color: var(--gold-ink); border-color: transparent; }
.chip.rush, .chip.esc { background: var(--gold-soft); color: var(--gold-ink); }
.chip.role { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); margin: 1px 0; }
.st-todo { --c: var(--s-todo); --cb: var(--s-todo-bg); } .st-progress, .st-paused { --c: var(--s-prog); --cb: var(--s-prog-bg); }
.st-cleaned { --c: var(--s-clean); --cb: var(--s-clean-bg); } .st-inspected { --c: var(--s-insp); --cb: var(--s-insp-bg); }
.st-redo { --c: var(--s-redo); --cb: var(--s-redo-bg); } .st-dnd, .st-refused { --c: var(--s-dnd); --cb: var(--s-dnd-bg); }
.st-hold { --c: var(--s-hold); --cb: var(--s-hold-bg); } .st-ooo { --c: var(--s-ooo); --cb: var(--s-ooo-bg); } .st-none { --c: var(--s-none); --cb: transparent; }
.chip.st { background: var(--cb); color: var(--c); }
.chip.prio-urgent { background: var(--bad-bg); color: var(--bad); } .chip.prio-today { background: var(--warn-bg); color: var(--warn); } .chip.prio-later { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.chip.ist-open { background: var(--bad-bg); color: var(--bad); } .chip.ist-ack, .chip.ist-progress { background: var(--warn-bg); color: var(--warn); } .chip.ist-waiting { background: var(--s-dnd-bg); color: var(--s-dnd); }
.chip.ist-done, .chip.ist-closed { background: var(--ok-bg); color: var(--ok); } .chip.ist-cancelled { background: var(--surface-2); color: var(--ink-3); }
.avatar { --av: #436092; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--av); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .3px; flex: none; }
.avatar.xs { width: 22px; height: 22px; font-size: 10px; vertical-align: middle; }
.avatar.sm { width: 28px; height: 28px; font-size: 11.5px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }
.avatar.empty { background: var(--line); color: var(--ink-3); }
.topbar .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.6); }

/* ---------- toast & sheet ---------- */
.toast { position: fixed; z-index: 90; left: 50%; top: calc(var(--top) + 10px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -12px); opacity: 0; pointer-events: none; display: flex; gap: 10px; align-items: flex-start; max-width: min(92vw, 520px); padding: 12px 16px; border-radius: 14px; background: #23262B; color: #fff; box-shadow: var(--shadow-lg); font-weight: 600; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #8E2318; } .toast.ok { background: #245A33; }
.toast.show { pointer-events: auto; cursor: pointer; }
.sheet-wrap { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(15,18,24,.5); opacity: 0; transition: opacity .2s; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; background: var(--surface); border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateY(30px); opacity: 0; transition: transform .22s, opacity .22s; box-shadow: var(--shadow-lg); }
.sheet.wide { max-width: 860px; }
.sheet-wrap.open .sheet { transform: none; opacity: 1; } .sheet-wrap.open .sheet-scrim { opacity: 1; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 20px; } }
.sheet-x { position: absolute; top: 10px; right: 10px; border: 0; background: var(--surface-2); border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sheet-title { margin: 0 44px 12px 0; font-size: 20px; display: flex; gap: 8px; align-items: center; }
.sheet-body { display: flex; flex-direction: column; gap: 10px; }
.menu-list { display: flex; flex-direction: column; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 13px 6px; border: 0; border-bottom: 1px solid var(--line-2); background: none; text-decoration: none; color: var(--ink); font-weight: 600; text-align: left; cursor: pointer; width: 100%; }
.menu-item:last-child { border-bottom: 0; }
.menu-item > span:not(.avatar):not(.chip) { flex: 1; }
.photo-full { margin: 0; } .photo-full img { width: 100%; border-radius: 12px; } .photo-full figcaption { margin-top: 8px; color: var(--ink-2); }
.steps { margin: 4px 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.steps.big { font-size: 17px; font-weight: 600; gap: 10px; }
.tips { margin: 4px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.form label, label.block { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); min-width: 0; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 500; }
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 2px solid var(--brand-soft); }
.check { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 10px; font-weight: 600; color: var(--ink) !important; cursor: pointer; padding: 6px 0; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.check.sm { font-size: 14px; padding: 0; } .check.locked { opacity: .55; }
.search { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 11px; padding: 0 10px; background: var(--surface); min-height: 44px; }
.search input { border: 0 !important; outline: 0 !important; min-height: 40px; padding: 6px 0; background: transparent; }
.search.sm { max-width: 220px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: 14.5px; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.seg legend { grid-column: 1 / -1; }
.seg label { position: relative; display: block; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 700; color: var(--ink); background: var(--surface); }
.seg small { font-weight: 500; color: var(--ink-2); font-size: 12.5px; }
.seg input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.seg input:focus-visible + span { outline: 3px solid var(--gold); }
.segbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.segbtns button { flex: 1 1 110px; min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 700; cursor: pointer; padding: 8px 10px; }
.segbtns button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.seg-inline { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg-inline button { border: 0; background: none; padding: 8px 12px; border-radius: 9px; font-weight: 650; cursor: pointer; color: var(--ink-2); min-height: 38px; }
.seg-inline button.on { background: var(--brand); color: var(--on-brand); }
.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; overflow-x: auto; }
.tabs button { flex: 1; border: 0; background: none; padding: 9px 12px; border-radius: 9px; font-weight: 700; cursor: pointer; color: var(--ink-2); white-space: nowrap; min-height: 40px; }
.tabs button.on { background: var(--brand); color: var(--on-brand); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.grid2 > *, .grid3 > *, .grid4 > * { min-width: 0; }
.fchips, .bchips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.fchips::-webkit-scrollbar, .bchips::-webkit-scrollbar { display: none; }
.fchip, .bchip { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 38px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 650; font-size: 14px; cursor: pointer; color: var(--ink-2); white-space: nowrap; }
.fchip b { color: var(--ink); }
.fchip.on, .bchip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.fchip.on b { color: var(--surface); }
.fchip .ic { width: 16px; height: 16px; }

/* ---------- login ---------- */
.login { max-width: 520px; margin: 0 auto; padding: calc(24px + env(safe-area-inset-top, 0px)) 16px 40px; display: flex; flex-direction: column; gap: 16px; }
body[data-view="login"] .topbar, body[data-view="pin"] .topbar, body[data-view="join"] .topbar { display: none; }
.login-top { display: flex; justify-content: flex-end; }
.login-lang { border-color: var(--line); background: var(--surface); color: var(--ink-2); }
.login-lang span.on { background: var(--brand); color: var(--on-brand); }
.login-brand { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 8px; }
.login-brand img { width: 88px; }
.login-brand h1 { margin: 6px 0 0; font-family: var(--serif); font-weight: 400; font-size: 28px; letter-spacing: .2px; }
.login-brand p { margin: 0; color: var(--gold-ink); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; }
.login h2 { margin: 0 0 10px; font-size: 20px; }
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.name { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-weight: 650; cursor: pointer; text-align: left; }
.name:hover { border-color: var(--brand); }
.name.on { border-color: var(--brand); background: var(--brand-soft); }
.name > span:last-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.login-pin { display: flex; flex-direction: column; gap: 12px; }
.who { display: flex; align-items: center; gap: 12px; }
.who b { display: block; font-size: 19px; }
.pinbox { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pdots { display: flex; gap: 12px; min-height: 18px; }
.pdot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink-3); }
.pdot.on { background: var(--brand); border-color: var(--brand); }
.pinpad { display: grid; grid-template-columns: repeat(3, minmax(72px, 96px)); gap: 10px; }
.pk { min-height: 62px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); font-size: 26px; font-weight: 650; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pk:active { background: var(--brand-soft); }
.pk.ghost { background: transparent; font-size: 15px; color: var(--ink-2); }
.practice-check { font-size: 14px; color: var(--ink-2) !important; }

/* ---------- attendant: lists and rooms ---------- */
.shift { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.shift-txt { display: flex; flex-direction: column; gap: 2px; }
.shift-txt b { font-size: 17px; }
.shift.on { border-left: 5px solid var(--ok); } .shift.brk { border-left: 5px solid var(--warn); } .shift.off { border-left: 5px solid var(--gold); }
.progress-card .pc-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.pbar { height: 10px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.pbar span { display: block; height: 100%; background: var(--ok); border-radius: 6px; }
.rlist { display: flex; flex-direction: column; gap: 8px; }
.rcard { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.rcard::before { content: ""; align-self: stretch; width: 6px; background: var(--c, var(--line)); flex: none; }
.rc-no { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 64px; letter-spacing: -.5px; }
.rc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rc-l1 { display: flex; flex-wrap: wrap; gap: 4px; }
.rc-l2 { color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.rc-l3 { font-size: 14px; }
.rc-timer { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--warn); font-variant-numeric: tabular-nums; }
.redo-why { color: var(--s-redo); font-weight: 600; }
.done-list summary { list-style: none; cursor: pointer; }
.done-list summary::-webkit-details-marker { display: none; }
.done-list[open] summary { margin-bottom: 10px; }
.room-head { display: flex; align-items: center; gap: 14px; }
.rh-no { font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.rh-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rh-info > div:first-child { display: flex; gap: 4px; flex-wrap: wrap; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); font-size: 15px; }
.banner b { margin-right: 4px; }
.banner.hold { background: var(--s-hold-bg); color: var(--s-hold); border-color: transparent; }
.banner.ooo { background: var(--s-ooo-bg); color: var(--s-ooo); border-color: transparent; }
.banner.redo { background: var(--s-redo-bg); color: var(--s-redo); border-color: transparent; }
.timer-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-left: 5px solid var(--s-prog); }
.timer-card.paused { border-left-color: var(--s-dnd); }
.bigtimer { font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -1px; line-height: 1.1; }
.timer { font-variant-numeric: tabular-nums; }
.ptiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.ptiles.small { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.ptile { position: relative; aspect-ratio: 4 / 3; max-width: 100%; border-radius: 12px; border: 2px dashed var(--line); background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; cursor: pointer; overflow: hidden; color: var(--ink-2); text-align: center; }
.ptile.need { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-ink); }
.ptile.has { border-style: solid; border-color: var(--line); padding: 0; }
.ptile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ptile .pl { position: relative; z-index: 1; font-size: 13px; font-weight: 700; line-height: 1.2; }
.ptile.has .pl { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; background: linear-gradient(transparent, rgba(0,0,0,.72)); color: #fff; text-align: left; }
.pcam .ic { width: 30px; height: 30px; }
.pok { position: absolute; z-index: 2; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center; }
.pok .ic { width: 16px; height: 16px; stroke-width: 3; }
.pdel { position: absolute; z-index: 2; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ptile.busy::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.55); }
.pspin { position: absolute; z-index: 3; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--brand-soft); border-top-color: var(--brand); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ck { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; min-height: 52px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font-weight: 550; font-size: 15.5px; }
.ck .box { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--ink-3); display: flex; align-items: center; justify-content: center; flex: none; color: transparent; }
.ck .box .ic { width: 18px; height: 18px; stroke-width: 3; }
.ck.on { border-color: var(--ok); background: var(--ok-bg); }
.ck.on .box { background: var(--ok); border-color: var(--ok); color: #fff; }
.pchips { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pchip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 52px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); text-decoration: none; color: var(--ink); font-weight: 650; font-size: 14.5px; }
.pchip.pc-odor { color: var(--s-hold); } .pchip.pc-maintenance { color: var(--brand); } .pchip.pc-pests { color: var(--s-redo); }
.sticky { position: fixed; z-index: 25; left: 0; right: 0; bottom: calc(var(--tabs) + env(safe-area-inset-bottom, 0px)); padding: 10px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.sticky.two { flex-direction: row; }
.sticky-hint { font-size: 13.5px; font-weight: 600; color: var(--gold-ink); text-align: center; }
@media (min-width: 960px) { .sticky { left: 236px; bottom: 0; padding-left: max(16px, calc((100% - 720px) / 2)); padding-right: max(16px, calc((100% - 720px) / 2)); } }
.done-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.done-card h2 { margin: 4px 0 0; }
.done-card p { margin: 0; }

/* ---------- report wizard ---------- */
.q { margin: 4px 0 0; font-size: 22px; line-height: 1.25; text-wrap: balance; }
.crumbs { margin: 0; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tiles.compact { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.tile { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 96px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; font-weight: 700; font-size: 15.5px; box-shadow: var(--shadow); }
.tiles.compact .tile { min-height: 64px; flex-direction: row; align-items: center; justify-content: flex-start; }
.tile .ic { width: 28px; height: 28px; color: var(--brand); }
.tile small { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.tile.danger { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.tile.danger .ic { color: var(--bad); }
.tile.ty-odor .ic, .tile.ty-pests .ic { color: var(--s-hold); }
.emerg-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 14px; border: 0; background: var(--bad); color: #fff; cursor: pointer; text-align: left; }
.emerg-btn .ic { width: 34px; height: 34px; }
.emerg-btn b { display: block; font-size: 17px; }
.emerg-btn small { opacity: .9; }
.emerg { background: var(--bad-bg); color: var(--ink); border-radius: var(--r); padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; border: 2px solid var(--bad); }
.emerg.amber { background: var(--warn-bg); border-color: var(--warn); }
.emerg.compact { gap: 6px; } .emerg.compact p { margin: 0; }
.emerg h2 { margin: 0; color: var(--bad); display: flex; gap: 8px; align-items: center; font-size: 21px; }
.emerg.amber h2 { color: var(--warn); }
.phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
.phone { background: var(--surface); border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-decoration: none; color: var(--ink); min-height: 56px; }
.phone .ic { grid-row: 1 / span 2; width: 22px; height: 22px; color: var(--bad); }
.phone span { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.phone small { color: var(--ink-2); font-weight: 600; }
a.phone:active { transform: scale(.99); }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; padding: 14px; min-height: 56px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; font-weight: 650; font-size: 16px; }
.opt.on { border-color: var(--brand); background: var(--brand-soft); }
.opt > span:not(.chip):not(.lvn) { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.opt small { font-weight: 500; color: var(--ink-2); font-size: 14px; }
.opt .ic { color: var(--brand); }
.lvn { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; flex: none; background: var(--surface-2); }
.lvl-0 .lvn { background: var(--ok-bg); color: var(--ok); } .lvl-1 .lvn { background: var(--warn-bg); color: var(--warn); }
.lvl-2 .lvn { background: var(--s-todo-bg); color: var(--s-todo); } .lvl-3 .lvn { background: var(--bad-bg); color: var(--bad); }
.chips-sel { display: flex; flex-wrap: wrap; gap: 8px; }
.csel { min-height: 42px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 650; cursor: pointer; }
.csel.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.steps-card { background: var(--gold-soft); border-color: transparent; }
.steps-card h3 { margin: 0 0 6px; color: var(--gold-ink); }

/* ---------- board ---------- */
.board-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.datenav { display: flex; align-items: center; gap: 6px; }
.dn-label { display: flex; flex-direction: column; align-items: center; min-width: 180px; text-align: center; }
.dn-label b { font-size: 17px; } .dn-label small { color: var(--ok); font-weight: 700; }
.board-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.assignbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--gold-soft); border-color: transparent; }
.assignbar label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.assignbar select { min-width: 180px; }
.board-filters { display: flex; flex-direction: column; gap: 10px; }
.staffstrip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.sp { display: flex; align-items: center; gap: 8px; flex: none; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; }
.sp.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.sp-t { display: flex; flex-direction: column; line-height: 1.2; }
.sp-t small { color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.sp.ss-off, .sp.ss-none { opacity: .62; }
.sp.ss-break .avatar { box-shadow: 0 0 0 2px var(--warn); }
.bgroup { display: flex; flex-direction: column; gap: 8px; }
.bg-h { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .5px; display: flex; align-items: center; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
.rt { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 1px; min-height: 84px; padding: 10px 8px 7px; border-radius: 12px; border: 1.5px solid color-mix(in srgb, var(--c, var(--line)) 35%, transparent); background: var(--cb, var(--surface)); color: var(--ink); cursor: pointer; text-align: left; box-shadow: var(--shadow); overflow: hidden; }
.rt::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c); }
.rt::after { position: absolute; right: 6px; bottom: 4px; font-size: 13px; font-weight: 800; color: var(--c); }
.rt.st-todo::after { content: "•"; } .rt.st-progress::after { content: "▶"; } .rt.st-paused::after { content: "❚❚"; font-size: 10px; } .rt.st-cleaned::after { content: "✓"; }
.rt.st-inspected::after { content: "✓✓"; } .rt.st-redo::after { content: "↺"; } .rt.st-dnd::after { content: "⊘"; } .rt.st-refused::after { content: "✕"; } .rt.st-hold::after { content: "≈"; } .rt.st-ooo::after { content: "!"; }
.rt.st-ooo { background-image: repeating-linear-gradient(135deg, transparent 0 7px, rgba(0,0,0,.06) 7px 9px); }
.rt.st-none { background: transparent; border-style: dashed; box-shadow: none; color: var(--ink-3); }
.rt.sel { outline: 3px solid var(--gold); outline-offset: 1px; }
.rt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
.rt-no { font-size: 20px; line-height: 24px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.rt-mid { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; min-height: 16px; }
.rt-type { font-size: 11px; font-weight: 800; color: var(--ink-2); letter-spacing: .3px; }
.rt-meta { font-size: 12.5px; font-weight: 700; color: var(--c); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rt-meta.fast { color: var(--bad); }
.rt-att { min-height: 22px; margin-top: auto; padding-right: 18px; }
.rt-flags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; max-width: 36px; padding-top: 3px; }
.rt-flags:empty { display: none; }
.tf { display: inline-flex; width: 17px; height: 17px; border-radius: 5px; align-items: center; justify-content: center; }
.tf .ic { width: 12px; height: 12px; stroke-width: 2.4; }
.tf.rush { background: var(--gold); color: #fff; } .tf.hold { background: var(--s-hold); color: #fff; } .tf.ooo { background: var(--s-ooo); color: var(--surface); } .tf.cmp { background: var(--bad); color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 0 16px; font-size: 13px; color: var(--ink-2); }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg i { width: 14px; height: 14px; border-radius: 4px; background: var(--cb); border: 2px solid var(--c); }
.rs-head { display: flex; align-items: center; gap: 14px; margin-right: 44px; }
.hist-item { padding: 10px 0; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.hist-item:last-child { border-bottom: 0; }
.hist-item.link { flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.thumbs img, .th img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
.thumbs.big img, .thumbs.big .th img { width: 120px; height: 90px; }
.th { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 8px; overflow: hidden; }
.th.missing, .thumbs .missing { display: inline-flex; width: 64px; height: 48px; align-items: center; justify-content: center; border: 1.5px dashed var(--bad); color: var(--bad); border-radius: 8px; cursor: default; }
.th.missing .ic { width: 20px; height: 20px; }
.preview { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.pv-row { padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.pv-rooms { display: flex; flex-wrap: wrap; gap: 4px; }
.rchip { display: inline-flex; padding: 2px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- inspections & issues ---------- */
.icard { display: flex; flex-direction: column; gap: 6px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); min-width: 0; }
.icard.prio-urgent { border-left-color: var(--bad); } .icard.prio-today { border-left-color: var(--warn); } .icard.prio-later { border-left-color: var(--line); }
.icard.closed { opacity: .75; }
.ic-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ic-place { font-size: 17px; margin: 0; }
.ic-what { display: flex; align-items: center; gap: 6px; font-weight: 650; }
.ic-what.big { font-size: 18px; margin: 4px 0; }
.ic-desc { color: var(--ink-2); font-size: 14.5px; overflow-wrap: anywhere; }
.ic-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ic-meta .ic { width: 15px; height: 15px; vertical-align: -3px; }
.ic-meta .rc-no, .icard .rc-no { font-size: 24px; min-width: 0; }
.waitt { color: var(--warn); font-weight: 650; }
.gallery { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.gal { flex: 0 0 min(84%, 440px); scroll-snap-align: start; border: 0; padding: 0; border-radius: 14px; overflow: hidden; background: var(--surface-2); position: relative; cursor: zoom-in; }
.gal img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gal span { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 10px 8px; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; font-weight: 700; font-size: 14px; text-align: left; }
.gal.missing { aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2px dashed var(--bad); color: var(--bad); cursor: default; }
.gal.missing .ic { width: 32px; height: 32px; }
.gal.missing span { position: static; background: none; color: var(--bad); padding: 0 12px; text-align: center; }
.th.reused img, .thumbs img.reused { outline: 3px solid var(--bad); outline-offset: -3px; }
.gal.reused { outline: 3px solid var(--bad); outline-offset: -3px; }
.gal.reused span { background: var(--bad); color: #fff; }
.chip.locked { background: var(--bad); color: #fff; }
.holdnote { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.holdnote .ic { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 16px; }
.kv > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kv > div.full { grid-column: 1 / -1; }
.kv span { font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-2); font-weight: 700; }
.kv b { font-weight: 650; overflow-wrap: anywhere; }
.urgent-line { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--bad-bg); color: var(--bad); font-weight: 700; }
.fab { position: fixed; z-index: 24; right: 18px; bottom: calc(var(--tabs) + 18px + env(safe-area-inset-bottom, 0px)); width: 58px; height: 58px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); }
.fab .ic { width: 28px; height: 28px; stroke-width: 2.4; }
@media (min-width: 960px) { .fab { bottom: 28px; right: 28px; } }
.timeline { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.timeline li:last-child { border-bottom: 0; }
.timeline li > .ic { color: var(--ink-3); margin-top: 2px; }
.timeline li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
#note-form input { flex: 1; min-width: 0; }
.odor-panel { border-top: 5px solid var(--s-hold); display: flex; flex-direction: column; gap: 10px; }
.odor-panel.emergency { border-top-color: var(--bad); }
.odor-panel details { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.odor-panel summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.osteps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: s; }
.ostep { width: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.ostep[disabled] { cursor: default; }
.ostep .box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--ink-3); display: flex; align-items: center; justify-content: center; color: transparent; flex: none; margin-top: 1px; }
.ostep .box .ic { width: 16px; height: 16px; stroke-width: 3; }
.osteps li.done .ostep { border-color: var(--ok); background: var(--ok-bg); }
.osteps li.done .box { background: var(--ok); border-color: var(--ok); color: #fff; }
.otext { display: flex; flex-direction: column; gap: 4px; font-weight: 550; }
.otext small { color: var(--ink-2); font-weight: 500; }
.who { display: inline-flex; align-self: flex-start; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.who-hk { background: var(--brand-soft); color: var(--brand); } .who-eng { background: var(--warn-bg); color: var(--warn); } .who-dir { background: var(--s-hold-bg); color: var(--s-hold); } .who-vendor { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.feebox { border-top: 1px solid var(--line-2); padding-top: 6px; }
.feebox p { margin: 4px 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); }
.stat b { font-size: 28px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat span { color: var(--ink-2); font-size: 13.5px; font-weight: 600; }
.stat.warn b { color: var(--warn); }

/* ---------- reports ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); min-width: 0; }
.kpi-l { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-2); }
.kpi-v { font-size: 30px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-s { font-size: 13px; color: var(--ink-2); }
.kpi.good .kpi-v { color: var(--ok); } .kpi.bad .kpi-v { color: var(--bad); }
.chart { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.chart figcaption { font-weight: 700; margin-bottom: 8px; }
.chart-wrap { overflow-x: auto; }
.chart svg { width: 100%; min-width: 480px; height: auto; display: block; }
.chart .grid { stroke: var(--line-2); stroke-width: 1; }
.chart .ax { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.chart .bar { fill: var(--brand); }
.chart .bar-g:hover .bar, .chart .bar-g:focus .bar { fill: var(--brand-deep); }
:root:not([data-theme="light"]) .chart .bar-g:hover .bar { fill: var(--gold); }
.chart .bar-g { outline: none; cursor: default; }
.tablewrap { overflow-x: auto; margin: 0 -4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-2); font-weight: 700; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 6px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl .n { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .c { text-align: center; }
.tbl .good { color: var(--ok); font-weight: 700; } .tbl .bad { color: var(--bad); font-weight: 700; }
.tbl input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bars li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.bars li:last-child { border-bottom: 0; }

/* ---------- me, inbox, admin ---------- */
.me-card { display: flex; align-items: center; gap: 14px; }
.me-card h2 { margin: 0; }
.me-card p { margin: 2px 0 6px; }
.nitem { display: flex; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); }
.nitem .ndot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex: none; background: transparent; }
.nitem.unread .ndot { background: var(--brand); }
.nitem.urgent { border-left: 5px solid var(--bad); }
.nbody { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nbody span { color: var(--ink-2); overflow-wrap: anywhere; }
.nitem.unread .nbody b { font-weight: 800; }
.bigpin { font-size: 44px; font-weight: 800; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; margin: 6px 0; user-select: all; }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2px 12px; }
.roles legend { grid-column: 1 / -1; }
.roomtoggles { display: flex; flex-wrap: wrap; gap: 6px; }
.rtog { position: relative; display: inline-flex; cursor: pointer; }
.rtog input { position: absolute; opacity: 0; }
.rtog span { display: inline-flex; min-width: 56px; justify-content: center; padding: 8px 10px; border-radius: 10px; border: 1.5px dashed var(--line); color: var(--ink-3); font-weight: 700; font-variant-numeric: tabular-nums; text-decoration: line-through; }
.rtog.on span { border-style: solid; border-color: var(--ok); color: var(--ink); text-decoration: none; background: var(--ok-bg); }
.rtog input:focus-visible + span { outline: 3px solid var(--gold); }

@media (max-width: 420px) {
  .rc-no { font-size: 24px; min-width: 54px; }
  .rh-no { font-size: 38px; }
  .brand-t b { font-size: 18px; }
  .brand-t small { display: none; }
  .rgrid { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); }
  .pinpad { grid-template-columns: repeat(3, minmax(64px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .topbar, .tabbar, .sidenav, .statusbar, .practicebar, .fab, .sticky { display: none !important; } }

/* Saved items waiting to be sent (Me screen) */
.plist { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; }
.plist li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.plist li:last-child { border-bottom: 0; }

/* Phone sign-up (Settings > Phones, and the printable sheet) */
.enroll-box { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.qr { display: block; background: #fff; border-radius: 8px; max-width: 100%; height: auto; }
.enroll-code { font-size: 30px; font-weight: 800; letter-spacing: 2px; font-variant-numeric: tabular-nums; margin: 4px 0; }
.break { overflow-wrap: anywhere; }
.print-sheet { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.print-sheet h2 { margin: 0; }
.print-sheet ol { text-align: left; max-width: 520px; display: flex; flex-direction: column; gap: 6px; }
@media print {
  body * { visibility: hidden; }
  .print-sheet, .print-sheet * { visibility: visible; }
  .print-sheet { position: absolute; left: 0; top: 0; right: 0; color: #000; }
  .noprint, .sheet-x { display: none !important; }
}
