/* Tended prototype. Same tokens as the site, denser layout. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/assets/fonts/archivo.woff2") format("woff2-variations"), url("/assets/fonts/archivo.woff2") format("woff2");
}

:root {
  --paper: #eef1ef;
  --paper-sunk: #e2e8e4;
  --card: #fafbfa;
  --ink: #17221e;
  --ink-2: #4a5752;
  --ink-3: #6f7b76;
  --line: #ccd5d0;
  --line-strong: #a9b5af;
  --spruce: #1f4d3f;
  --spruce-hover: #163b30;
  --spruce-tint: #dbe7e1;
  --ok: #2e7d52;
  --ok-tint: #dcefe3;
  --due: #a06e08;
  --due-tint: #f6ebcf;
  --down: #b73b29;
  --down-tint: #f6ddd8;
  --radius-s: 4px;
  --radius-m: 8px;
  --radius-l: 12px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* , *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
a { color: var(--link); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--spruce); outline-offset: 2px; border-radius: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.h1 { margin: 0; font-size: clamp(1.6rem, 3.6vw, 2.2rem); font-weight: 740; font-variation-settings: "wdth" 112; letter-spacing: -0.02em; line-height: 1.1; }
.h2 { margin: 0; font-size: 1.12rem; font-weight: 690; font-variation-settings: "wdth" 106; line-height: 1.25; }
.h3 { margin: 0; font-size: 1rem; font-weight: 660; line-height: 1.3; }
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; }
.sub { display: block; font-size: 0.84rem; color: var(--ink-2); line-height: 1.35; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-variation-settings: "wdth" 78; letter-spacing: 0.02em; }
.note { font-size: 0.84rem; color: var(--ink-3); margin: 10px 0 0; }

/* ---------- Bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--header-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar-in { max-width: 1280px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 12px; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 760; font-size: 1.15rem; font-variation-settings: "wdth" 120; letter-spacing: -0.02em; }
.brand-mark { width: 22px; height: 22px; }
.demo-tag { font-size: 0.72rem; font-weight: 640; padding: 2px 8px; border-radius: 999px; background: var(--spruce-tint); color: var(--link); }
.roles { margin-left: auto; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.roles::-webkit-scrollbar { display: none; }
.role { white-space: nowrap; padding: 7px 11px; border-radius: var(--radius-m); color: var(--ink-2); text-decoration: none; font-size: 0.9rem; font-weight: 560; }
.topbar .theme-toggle { width: 36px; height: 36px; }
.role:hover { background: var(--paper-sunk); color: var(--ink); }
.role.on { background: var(--ink); color: var(--on-ink); }
@media (max-width: 760px) {
  .bar-in { height: auto; flex-wrap: wrap; padding: 10px 16px 0; gap: 8px 12px; }
  .roles { order: 3; margin: 0 -16px; padding: 0 16px 8px; width: calc(100% + 32px); }
  .topbar .theme-toggle { margin-left: auto; }
}

/* ---------- Page ---------- */
.page { max-width: 1280px; margin: 0 auto; padding: 24px 16px 56px; }
.page.narrow { max-width: 760px; }
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.head-row p { margin: 6px 0 0; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 0.92rem; color: var(--ink-2); text-decoration: none; }
.back::before { content: ""; width: 7px; height: 7px; border-left: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(45deg); }
.back:hover { color: var(--ink); }
.controls { display: flex; gap: 10px; flex-wrap: wrap; }
.ctl { display: flex; flex-direction: column; gap: 3px; font-size: 0.78rem; color: var(--ink-2); font-weight: 560; }
.ctl select, .ctl input { min-height: 38px; padding: 6px 10px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-m); background: var(--field); font: inherit; font-size: 0.94rem; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-m); border: 1.5px solid transparent; font: inherit; font-weight: 640; font-size: 0.97rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--spruce); color: #fff; }
.btn-primary:hover { background: var(--spruce-hover); color: #fff; }
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-danger { background: var(--card); color: var(--down); border-color: var(--danger-line); }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 0.88rem; }
.btn-block { width: 100%; }
.btn-col { display: grid; gap: 10px; margin-top: 8px; }
.btn-row-app { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: var(--radius-m); border: 1.5px solid var(--line-strong); background: var(--card); font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--ink); display: inline-grid; place-items: center; }
.link-sm { font-size: 0.88rem; font-weight: 600; }

/* ---------- Pills, dots ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 0.8rem; font-weight: 620; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.big { font-size: 0.92rem; padding: 4px 12px; }
.pill-ok { background: var(--ok-tint); color: var(--ok); }
.pill-due { background: var(--due-tint); color: var(--due); }
.pill-down { background: var(--down-tint); color: var(--down); }
.pill-plain { background: var(--paper-sunk); color: var(--ink-2); }
.pill-plain::before { display: none; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 0.7rem; font-weight: 640; background: var(--spruce-tint); color: var(--link); vertical-align: 2px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.sdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.s-ok { background: var(--ok); }
.s-due { background: var(--due); }
.s-overdue { background: var(--down); }
.s-down { background: var(--down); box-shadow: 0 0 0 3px var(--down-tint); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.84rem; color: var(--ink-2); margin-bottom: 14px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Panels, lists, tables ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); margin-bottom: 16px; overflow: hidden; }
.panel.pad, .panel .pad { padding: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; flex-wrap: wrap; }
.panel > .note { padding: 0 18px 14px; }
.empty { padding: 4px 18px 18px; color: var(--ink-2); margin: 0; }
.empty-big { text-align: center; padding: 48px 16px; }
.empty-big p { margin: 8px 0 20px; }
.alert { background: var(--down-tint); color: var(--alert-ink); padding: 10px 14px; border-radius: var(--radius-m); font-size: 0.92rem; margin: 0 0 16px; }
.ok-note { background: var(--ok-tint); color: var(--ok-ink); padding: 10px 14px; border-radius: var(--radius-m); font-size: 0.92rem; margin: 0 0 12px; }

.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list > li { border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; color: var(--ink); text-decoration: none; min-height: 56px; }
a.list-row:hover { background: var(--paper); }
.list-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; text-align: right; }
.tasks .list-end { flex-direction: row; align-items: center; gap: 10px; }
.row-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.panel .list { border-top: 1px solid var(--line); }
.tab-body > .list, .tab-body > .room > .list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
@media (max-width: 520px) {
  .tasks .list-row { flex-direction: column; align-items: stretch; }
  .tasks .list-end { justify-content: space-between; }
}

.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.t th { text-align: left; font-weight: 600; font-size: 0.78rem; color: var(--ink-3); padding: 9px 18px; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); white-space: nowrap; background: var(--card); }
.t td { padding: 10px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.t tr:last-child td { border-bottom: 0; }
.t .right { text-align: right; }
.t.compact td { padding: 7px 0; }
.row-link { font-weight: 640; color: var(--ink); text-decoration: none; }
.row-link:hover { text-decoration: underline; }
.bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--paper-sunk); width: 64px; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--ok); }
.bar.warn > span { background: var(--due); }
.bar.bad > span { background: var(--down); }

/* ---------- Dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 14px 18px; }
.kpi-v { font-size: 1.9rem; font-weight: 720; font-variation-settings: "wdth" 108; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-v.down { color: var(--down); }
.kpi-v.due { color: var(--due); }
.kpi-k { font-size: 0.84rem; color: var(--ink-2); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.side .panel:last-child { margin-bottom: 0; }
@media (max-width: 1080px) { .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi-v { font-size: 1.5rem; } }

.hbars { list-style: none; margin: 0; padding: 4px 18px 16px; display: grid; gap: 9px; }
.hbars li { display: grid; grid-template-columns: 130px minmax(0, 1fr) 64px; gap: 10px; align-items: center; font-size: 0.88rem; }
.hb-k { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-bar { height: 10px; background: var(--paper-sunk); border-radius: 3px; overflow: hidden; }
.hb-bar > span { display: block; height: 100%; background: var(--spruce); border-radius: 3px; }
.hb-bar > span.warn { background: var(--due); }
.hb-bar > span.bad { background: var(--down); }
.hb-v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- Office ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 10px 14px; color: var(--ink-2); text-decoration: none; font-weight: 600; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); }
.room { margin-bottom: 20px; }
.room .h3 { margin: 0 0 8px; }

.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 16px; }
.fields.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 10px 0 14px; }
.field { padding: 9px 12px; border-radius: var(--radius-m); background: var(--card); border: 1px solid var(--line); min-width: 0; }
.panel .field, .job .field { background: var(--paper); border-color: transparent; }
.field-k { font-size: 0.74rem; color: var(--ink-3); }
.field-v { font-weight: 650; font-variation-settings: "wdth" 84; overflow-wrap: anywhere; }
.asset-photo { border-radius: var(--radius-m); margin: 0 0 16px; max-height: 260px; object-fit: cover; border: 1px solid var(--line); }

/* ---------- Repair ---------- */
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 720px) { .two { grid-template-columns: 1fr; } }
.timeline { list-style: none; margin: 14px 0 0; padding: 0; }
.tl { display: flex; gap: 12px; position: relative; padding-bottom: 20px; color: var(--ink-3); }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--card); flex: none; margin-top: 2px; position: relative; z-index: 1; }
.tl.done { color: var(--ink); }
.tl.done .tl-dot { background: var(--ok); border-color: var(--ok); }
.tl.done::before { background: var(--ok); }
.tl.now .tl-dot { background: var(--card); border-color: var(--due); box-shadow: 0 0 0 4px var(--due-tint); }
.resolved { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.tech { display: flex; gap: 12px; margin: 12px 0 14px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--spruce); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }

/* ---------- Technician (phone-sized) ---------- */
.phone { max-width: 440px; margin: 0 auto; }
.phone-top { margin-bottom: 14px; }
.phone-top .ctl select { width: 100%; }
.sms { background: var(--field); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-size: 0.92rem; margin-bottom: 14px; }
.sms-from { display: block; font-size: 0.74rem; font-weight: 700; color: var(--ink-3); margin-bottom: 2px; }
.job { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px; }
.job-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.job-sym { font-size: 1.05rem; margin: 12px 0 4px; }
.job .h3 { margin-top: 6px; }
.job .list { margin: 8px -18px 0; }
.job-actions { margin-top: 18px; display: grid; gap: 10px; }

/* ---------- Admin ---------- */
.assign { display: flex; gap: 6px; }
.assign select { min-height: 36px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-m); padding: 4px 8px; font: inherit; font-size: 0.88rem; background: var(--field); color: var(--ink); }
.inline-form { display: flex; gap: 8px; align-items: flex-end; padding: 0 18px 12px; flex-wrap: wrap; }
#all-walks .note { padding: 0 18px 14px; }
#all-walks .alert { margin: 0 18px 16px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.fld { display: grid; gap: 5px; border: 0; margin: 0; padding: 0; min-width: 0; }
.fld > label, .fld > legend { font-weight: 600; font-size: 0.9rem; padding: 0; display: flex; justify-content: space-between; gap: 8px; }
.fld input[type="text"], .fld input[type="number"], .fld input[type="date"], .fld input[type="password"], .fld select, .fld textarea, .fld input[type="file"] {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-m); background: var(--field); color: var(--ink); font: inherit; font-size: 1rem;
}
.fld input[type="file"] { padding: 9px; font-size: 0.9rem; }
.fld textarea { min-height: 90px; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--spruce); box-shadow: 0 0 0 3px var(--spruce-tint); }
.fld .hint { font-size: 0.82rem; color: var(--ink-3); }
.fld.check input { border-color: var(--due); background: var(--flag-bg); }
.check-note { font-size: 0.76rem; font-weight: 640; color: var(--due); }
.fld-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 420px) { .fld-row { grid-template-columns: 1fr; } }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.choice span { display: inline-block; padding: 8px 13px; border: 1.5px solid var(--line-strong); border-radius: 999px; font-size: 0.92rem; background: var(--field); }
.choice input:checked + span { background: var(--spruce); border-color: var(--spruce); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--spruce); outline-offset: 2px; }
#a-cat-other { margin-top: 8px; min-height: 40px; }
.stepper { display: flex; gap: 8px; align-items: center; }
.stepper input { width: 80px !important; text-align: center; }
.bulk-row { grid-template-columns: 1fr auto; align-items: center; }

/* ---------- Sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(23, 34, 30, 0.42); }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--card); border-radius: 18px 18px 0 0; padding: 18px 18px calc(22px + env(safe-area-inset-bottom)); animation: up 0.18s ease-out; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 18px; } }
@keyframes up { from { transform: translateY(24px); opacity: 0.6; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.sheet .muted { margin: 0 0 14px; }
.reading { text-align: center; padding: 18px 0 8px; }
.reading .muted { margin: 6px 0 14px; }
.spinner { width: 36px; height: 36px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid var(--spruce-tint); border-top-color: var(--spruce); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.preview { max-height: 220px; margin: 0 auto 12px; border-radius: var(--radius-m); object-fit: contain; }
.preview.sm { max-height: 84px; width: 84px; object-fit: cover; margin: 0; }
.confirm-top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }

/* ---------- Walkthrough ---------- */
.walk-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--deep); border: 1px solid var(--line); color: #e9eeeb; border-radius: var(--radius-l); margin-bottom: 18px; }
.walk-bar .sub { color: #a8b4ae; }
.walk-stats { display: flex; gap: 18px; }
.walk-stats > span { display: grid; text-align: right; }
.walk-stats .num { font-size: 1.3rem; font-weight: 720; line-height: 1.1; }
#sync[data-state="offline"] { color: #f0c96a; }
.rooms { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.room-tile { display: flex; flex-direction: column; gap: 4px; width: 100%; min-height: 76px; padding: 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-l); color: var(--ink); text-decoration: none; font: inherit; font-weight: 650; text-align: left; cursor: pointer; }
.room-tile.has { border-color: var(--ok); }
.room-tile.has .room-count { color: var(--ok); }
.room-tile.add { border-style: dashed; background: transparent; }
.room-count { font-size: 0.82rem; font-weight: 500; color: var(--ink-3); }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--paper) 30%); }
.capture { display: flex; align-items: center; gap: 16px; padding: 22px 20px; margin: 16px 0 10px; background: var(--spruce); color: #fff; border-radius: var(--radius-l); cursor: pointer; }
.capture svg { width: 40px; height: 40px; flex: none; }
.capture strong { font-size: 1.15rem; display: block; }
.capture .sub { color: #cfe2d8; }
.capture:hover { background: var(--spruce-hover); }
.capture:focus-within { outline: 3px solid var(--spruce); outline-offset: 3px; }
.capture-alts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.recorded { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.recorded:empty { display: none; }
.thumb { width: 48px; height: 48px; border-radius: var(--radius-s); object-fit: cover; flex: none; }
.thumb.ph { background: var(--paper-sunk); }
.room-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }

/* ---------- Report ---------- */
.report { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(18px, 4vw, 32px); }
.report-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-end; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.report-head p { margin: 4px 0 0; }
.report-kpis { display: flex; gap: 22px; }
.report-kpis > div { display: grid; }
.report-kpis .big { font-size: 1.7rem; font-weight: 720; font-variation-settings: "wdth" 108; line-height: 1.1; }
.report-sec { padding: 20px 0; border-bottom: 1px solid var(--line); }
.report-sec:last-of-type { border-bottom: 0; }
.report-sec .h2 { margin-bottom: 10px; }
.report-sec .table-wrap { margin: 0 -18px; }
.report-sec .table-wrap .t { min-width: 600px; }
.report .hbars { padding: 4px 0; }
.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.flags li { display: grid; gap: 2px; padding: 10px 14px; border-left: 3px solid var(--due); background: var(--flag-bg); border-radius: 0 var(--radius-m) var(--radius-m) 0; font-size: 0.93rem; }
.flags span { color: var(--ink-2); }
.report-foot { padding-top: 16px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 80; background: var(--ink); color: var(--on-ink); padding: 12px 18px; border-radius: var(--radius-m); font-size: 0.94rem; max-width: calc(100% - 32px); transition: opacity 0.2s, transform 0.2s; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.4); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-warn { background: #7a4f05; }

/* ---------- Footer ---------- */
.app-foot { border-top: 1px solid var(--line); }
.app-foot-in { max-width: 1280px; margin: 0 auto; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; font-size: 0.86rem; color: var(--ink-2); }
.app-foot-in.narrow { max-width: 760px; }
.app-foot a { color: var(--ink-2); }
.app-foot a:hover { color: var(--ink); }

@media print {
  .topbar, .app-foot, .no-print, .back, .toast { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
  .report { border: 0; padding: 0; }
  .t th, .t td { padding: 6px 8px; }
  .report-sec { break-inside: avoid-page; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
