/* NV2Go Ops admin page. The staff iPad's design system (web/screens/ds.css) carried to a computer: the same neutral
   palette, one blue for the action to take and for selection, green for done, red only for problems, the same icons,
   and the same corners (10 for controls, 12 for groups). Type is a step smaller than on the iPad (15 body, 13
   secondary) because it is read at a desk. Light or dark follows the computer's setting. The NV2Go logo carries the
   brand; brand blue (#00A1FE) stays in the logo and is not used for buttons. */
:root {
  --bg: #f5f5f7; --card: #ffffff; --side: #fbfbfd; --surface: #f2f2f5; --raised: #e5e5ea; --press: #d8d8de;
  --sep: rgba(60, 60, 67, .14); --sep-strong: rgba(60, 60, 67, .26);
  --text: #1d1d1f; --text-2: #5c5c63; --text-3: #65656a;
  --accent: #0071e3; --on-accent: #ffffff; --accent-text: #0059b2; --accent-tint: rgba(0, 113, 227, .10);
  --good: #1a7330; --good-tint: rgba(36, 138, 61, .12); --bad: #c80014; --bad-tint: rgba(215, 0, 21, .08);
  --logo-text: #0b161e; --logo-2: #00a1fe; --logo-ring: #ed240f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 1px rgba(0, 0, 0, .02); --sheet-shadow: -12px 0 40px rgba(0, 0, 0, .12); --scrim: rgba(0, 0, 0, .18);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Inter", "Archivo", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "IBM Plex Mono", Menlo, Consolas, monospace;
  /* The names the tabs not yet redesigned use (Money, Fleet, Tutorials, Feedback, Renter IDs, Customer messages). */
  --panel: var(--card); --line: var(--sep); --fg: var(--text); --fg2: #3a3a3f; --muted: var(--text-2);
  --accent-soft: var(--accent-tint); --good-soft: var(--good-tint); --bad-soft: var(--bad-tint);
  --warn: var(--accent-text); --warn-soft: var(--accent-tint); --body: var(--font);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161618; --card: #1c1c1f; --side: #1a1a1d; --surface: #232326; --raised: #2f2f33; --press: #3a3a3f;
    --sep: rgba(255, 255, 255, .09); --sep-strong: rgba(255, 255, 255, .18);
    --text: #f2f2f4; --text-2: #a1a1a8; --text-3: #98989e;
    --accent: #0a72e8; --on-accent: #ffffff; --accent-text: #68b1ff; --accent-tint: rgba(10, 132, 255, .17);
    --good: #30d158; --good-tint: rgba(48, 209, 88, .14); --bad: #ff6961; --bad-tint: rgba(255, 69, 58, .15);
    --logo-text: #ffffff;
    --shadow: none; --sheet-shadow: -12px 0 40px rgba(0, 0, 0, .5); --scrim: rgba(0, 0, 0, .4);
    --fg2: #d1d1d6;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.4 var(--font); letter-spacing: -.003em; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.25; text-wrap: balance; font-weight: 600; }
h1 { font-size: 28px; line-height: 34px; letter-spacing: -.015em; }
h2 { font-size: 17px; line-height: 22px; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }
a { color: var(--accent-text); }
.muted { color: var(--text-2); }
.mono { font-family: var(--mono); font-size: .92em; font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
::selection { background: var(--accent-tint); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.logo { display: block; height: auto; flex: none; }
.logo .l-text { fill: var(--logo-text); } .logo .l-2 { fill: var(--logo-2); } .logo .l-ring { fill: var(--logo-ring); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { width: 88px; }
.brand span { font-size: 13px; font-weight: 600; color: var(--text-2); padding-left: 10px; border-left: 1px solid var(--sep-strong); line-height: 16px; }

/* ───────── the frame: a sidebar like the staff iPad's, daily work first and setup below */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--sep); padding: 18px 12px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { padding: 2px 10px 18px; }
.side .brand .logo { width: 84px; }
.nav { display: grid; gap: 1px; }
.nav-i { display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: 500 15px var(--font); text-align: left; cursor: pointer; width: 100%; }
.nav-i .ic { color: var(--text-2); }
.nav-i:hover { background: var(--surface); }
.nav-i.on { background: var(--accent-tint); color: var(--accent-text); font-weight: 600; }
.nav-i.on .ic { color: var(--accent-text); }
.nav-i .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 12px; font-weight: 600; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.nav-i .count.quiet { background: var(--raised); color: var(--text-2); }
.navlabel { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 18px 10px 6px; }
.side-foot { margin-top: auto; border-top: 1px solid var(--sep); padding: 12px 6px 0; display: flex; align-items: center; gap: 10px; }
.side-foot .who { display: grid; line-height: 18px; min-width: 0; }
.side-foot .who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who small { color: var(--text-2); font-size: 13px; }
.icon-btn { margin-left: auto; width: 32px; height: 32px; border-radius: 8px; border: 0; background: none; color: var(--text-2); display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--surface); color: var(--text); }
.av { width: 32px; height: 32px; border-radius: 50%; background: var(--raised); color: var(--text-2); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.av.lg { width: 40px; height: 40px; font-size: 15px; }
.av.accent { background: var(--accent-tint); color: var(--accent-text); }

.main { padding: 28px 36px 64px; min-width: 0; }
.page { max-width: 1240px; display: grid; gap: 20px; }
.page > * { min-width: 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head h1 { margin: 0; }
.head .sub { color: var(--text-2); margin-top: 3px; max-width: 760px; }
.head .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.mtop { display: none; }

/* ───────── buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 0 14px; border-radius: 8px; border: 0; background: var(--raised); color: var(--text); font: 600 14px var(--font); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn .ic { width: 16px; height: 16px; }
.btn:hover:not(:disabled) { background: var(--press); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.danger { background: var(--bad-tint); color: var(--bad); }
.btn.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--bad) 16%, transparent); }
.btn.ghost, .btn.text { background: transparent; color: var(--accent-text); font-weight: 500; padding: 0 8px; }
.btn.ghost:hover:not(:disabled), .btn.text:hover:not(:disabled) { background: var(--accent-tint); }
.btn.text.danger { color: var(--bad); }
.btn.text.danger:hover:not(:disabled) { background: var(--bad-tint); }
.btn.small { display: inline-flex; min-height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn.lg { min-height: 40px; padding: 0 18px; font-size: 15px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: progress; }

/* ───────── badges: a word and a tint, never color alone */
.pill, .badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--raised); color: var(--text-2); letter-spacing: 0; vertical-align: middle; }
.pill.good, .badge.good { background: var(--good-tint); color: var(--good); }
.pill.bad, .badge.bad { background: var(--bad-tint); color: var(--bad); }
.pill.warn, .badge.accent { background: var(--accent-tint); color: var(--accent-text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); display: inline-block; flex: none; }
.dot.good { background: var(--good); } .dot.accent { background: var(--accent); } .dot.bad { background: var(--bad); }
.count { font: 600 12.5px var(--font); color: var(--text-3); }

/* ───────── cards and grouped lists */
.card { background: var(--card); border: 1px solid var(--sep); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.card.rows { padding: 0; display: grid; overflow: hidden; }
.sec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.sec h2 { margin: 0; }
.sec h2 .n { color: var(--text-3); font-weight: 500; }
.stack { display: grid; gap: 28px; align-content: start; min-width: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.cols.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-height: 58px; position: relative; width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
button.row { cursor: pointer; }
button.row:hover { background: var(--surface); }
.row + .row::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--sep); }
.rows.flush .row + .row::before, .row.flush + .row::before { left: 16px; }
.row .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface); color: var(--text-2); flex: none; }
.row .ico.accent { background: var(--accent-tint); color: var(--accent-text); }
.row .ico.bad { background: var(--bad-tint); color: var(--bad); }
.row .ico.good { background: var(--good-tint); color: var(--good); }
.row .main2 { display: grid; gap: 1px; min-width: 0; flex: 1; }
.row .main2 strong { font-weight: 600; }
.row .main2 > span { color: var(--text-2); font-size: 14px; }
.row .end { text-align: right; display: grid; gap: 2px; justify-items: end; flex: none; }
.row .end small { color: var(--text-2); font-size: 13px; }
.row .chev { color: var(--text-3); width: 16px; height: 16px; }
.row.sel { background: var(--accent-tint); }
.row.dim { opacity: .62; }
.row.slim { min-height: 46px; padding: 9px 18px; }
.row.slim .main2 strong { font-weight: 500; }
.row.slim > .ic { color: var(--text-2); }
.row.bad .main2 strong { color: var(--bad); }
.meta { font-size: 13px; line-height: 18px; color: var(--text-2); }
.none-yet { padding: 18px 20px; color: var(--text-2); margin: 0; }

/* key numbers */
.figs { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.figs.n2 { --n: 2; } .figs.n4 { --n: 4; } .figs.n5 { --n: 5; } .figs.n6 { --n: 6; }
.figs.second { border-top: 1px solid var(--sep); }
.fig { padding: 16px 20px; position: relative; }
.fig + .fig::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 1px; background: var(--sep); }
.fig .k { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.fig b { display: flex; align-items: center; gap: 8px; font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.fig b.good { color: var(--good); }
.fig b.neg { color: var(--bad); }
.fig b .of { font-size: 15px; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.fig b .ic { width: 22px; height: 22px; stroke-width: 2.5; }
.fig small { display: block; margin-top: 3px; font-size: 13px; color: var(--text-2); }

/* the night's progress, as on the staff iPad's Tonight */
.prog { display: flex; gap: 3px; height: 6px; margin: 4px 0 10px; }
.prog i { display: block; border-radius: 3px; background: var(--raised); min-width: 4px; }
.prog i.p-out { background: var(--accent); } .prog i.p-table { background: color-mix(in srgb, var(--accent) 45%, var(--raised)); } .prog i.p-back { background: var(--good); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--text-2); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend b { color: var(--text); font-weight: 600; }
.legend .dot.p-table { background: color-mix(in srgb, var(--accent) 45%, var(--raised)); }
.ev-card { padding: 0; display: grid; grid-template-rows: auto auto 1fr; }
.ev-top { padding: 16px 18px 12px; }
.ev-top > .meta { display: block; }
.ev-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.ev-title strong { font-size: 17px; font-weight: 600; display: block; }
.ev-prog { margin-top: 14px; }
.ev-card .rows { border-top: 1px solid var(--sep); }
.ev-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--sep); min-height: 50px; align-self: end; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }

/* ───────── notices and messages */
.notice { padding: 10px 12px 10px 16px; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); }
.notice.good { background: var(--good-tint); color: var(--good); }
.notice.bad { background: var(--bad-tint); color: var(--bad); }
.notice.warn { background: var(--accent-tint); color: var(--accent-text); }
.error { color: var(--bad); font-weight: 600; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface); font-size: 14px; line-height: 19px; }
.note .ic { width: 17px; height: 17px; margin-top: 1px; color: var(--text-2); }
.note.accent { background: var(--accent-tint); } .note.accent .ic { color: var(--accent-text); }
.note.bad { background: var(--bad-tint); } .note.bad .ic { color: var(--bad); }
.note.good { background: var(--good-tint); } .note.good .ic { color: var(--good); }
.bad-t { color: var(--bad); }
.hint { font-size: 13px; color: var(--text-2); line-height: 18px; margin: 0; }
.card + .hint, .rows + .hint { margin-top: 8px; }

/* ───────── fields */
label { display: grid; gap: 6px; font-weight: 500; font-size: 13px; color: var(--text-2); }
input, select, textarea { font: 15px var(--font); color: var(--text); background: var(--card); border: 1px solid var(--sep-strong); border-radius: 8px; padding: 7px 11px; min-height: 36px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { min-height: 0; accent-color: var(--accent); }
.row-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-bottom: 14px; }
.row-form label { flex: 1 1 160px; }
.seg { border: 0; margin: 0; padding: 0; display: flex; gap: 14px; align-items: center; min-height: 36px; flex-wrap: wrap; }
.seg legend { font-weight: 500; font-size: 13px; color: var(--text-2); padding: 0; margin-bottom: 6px; float: left; width: 100%; }
.seg label { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 15px; color: var(--text); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; color: var(--text); }
.field { display: grid; gap: 6px; }
.form-grid { display: grid; gap: 14px; }

/* ───────── tables */
table { width: 100%; border-collapse: collapse; margin: 4px 0 14px; }
th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--text-2); padding: 9px 12px; border-bottom: 1px solid var(--sep); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--sep); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
td .muted { font-size: 13px; }
tr.dim td { color: var(--text-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.act { text-align: right; white-space: nowrap; }
.act .btn + .btn { margin-left: 6px; }
.card > table:first-child { margin-top: 0; }
table.tbl { margin: 0; }
table.tbl td { vertical-align: middle; }
table.tbl tr.click { cursor: pointer; }
table.tbl tr.click:hover td { background: var(--surface); }
table.tbl tr.sel td { background: var(--accent-tint); }
table.tbl td.chevc { width: 34px; padding-left: 0; color: var(--text-3); }
table.tbl th:first-child, table.tbl td:first-child { padding-left: 18px; }
.tbl .who { display: flex; align-items: center; gap: 10px; }
/* Lists of events: fixed column widths, the same in every table, so the archive's year tables line up (Paulo,
   2026-11-17). The Event column takes the rest; long names wrap. */
table.ev-tbl { table-layout: fixed; }
.ev-tbl .c-dates { width: 20%; }
.ev-tbl .c-book { width: 25%; }
.ev-tbl.money .c-dates { width: 18.5%; }
.ev-tbl.money .c-book { width: 19.5%; }
.ev-tbl .c-web { width: 13%; }
.ev-tbl .c-net { width: 12%; }
.ev-tbl .c-open { width: 34px; }
.ev-tbl td { overflow-wrap: anywhere; }
.t3 { color: var(--text-3); }

/* ───────── the side sheet: details open beside the list instead of a stack of buttons or a new page */
.sheet-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 4; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--card); border-left: 1px solid var(--sep); box-shadow: var(--sheet-shadow); display: flex; flex-direction: column; z-index: 5; }
.sh-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--sep); display: flex; align-items: flex-start; gap: 12px; }
.sh-head h2 { margin: 0; font-size: 20px; line-height: 26px; letter-spacing: -.01em; display: block; }
.sh-head h2:focus { outline: none; }
.sh-head .icon-btn { background: var(--surface); border-radius: 15px; width: 30px; height: 30px; }
.sh-body { padding: 18px 20px 24px; overflow-y: auto; display: grid; gap: 22px; align-content: start; flex: 1; }
.sh-sec { display: grid; gap: 10px; }
.sh-sec + .sh-sec { border-top: 1px solid var(--sep); padding-top: 18px; }
.sh-sec h3 { margin: 0; font-size: 15px; }
.sh-sec form { display: grid; gap: 10px; }
.sh-sec form.sh-line { display: flex; gap: 8px; align-items: flex-end; }
.sh-sec h3 .meta { font-weight: 400; }
.name-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
.name-btn:hover { color: var(--accent-text); }
.sh-line label { flex: 1; }
.sh-foot { padding: 14px 20px; border-top: 1px solid var(--sep); display: flex; gap: 8px; align-items: center; }
.sh-foot .push { margin-left: auto; }
.dkv { margin: 0; display: grid; grid-template-columns: 130px 1fr; gap: 9px 12px; font-size: 14px; }
.dkv dt { color: var(--text-2); }
.dkv dd { margin: 0; overflow-wrap: anywhere; }

/* ───────── enrolling an iPad */
.enroll-code { display: grid; gap: 14px; }
.qr-wrap { background: #fff; border-radius: 12px; padding: 10px; border: 1px solid var(--sep); width: min(240px, 100%); }
.qr { display: block; width: 100%; height: auto; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.steps { padding-left: 20px; margin: 0; display: grid; gap: 6px; font-size: 14px; }
.code { font-size: 1.1em; font-weight: 500; letter-spacing: .08em; background: var(--surface); padding: 1px 7px; border-radius: 6px; white-space: nowrap; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 0 0 18px; }
.facts div { background: var(--surface); border-radius: 10px; padding: 12px 14px; }
.facts dt { font-size: 13px; color: var(--text-2); font-weight: 500; }
.facts dd { margin: 4px 0 0; font-size: 17px; font-weight: 600; }
.facts dd small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; }
.list { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }

/* the older tabs' pop-up dialogs (Money) */
.scrim { position: fixed; inset: 0; z-index: 5; background: var(--scrim); display: grid; place-items: center; padding: 16px; }
.dialog { width: min(460px, 100%); display: grid; gap: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.dialog h2 { margin: 0; }
.dialog p { margin: 0; }
.dialog-acts { display: flex; justify-content: flex-end; gap: 10px; }

/* ───────── sign-in */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(400px, 100%); display: grid; gap: 14px; padding: 26px 26px 24px; }
.login-card h1 { margin: 6px 0 0; font-size: 24px; line-height: 30px; }
.login-card p { margin: 0; }
.login-card .btn { min-height: 40px; }
/* Two-step sign-in (two-step.ts): setup steps, the QR code, and recovery codes to save. */
.ts ol.ts-steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 14px; line-height: 20px; }
.ts .ts-qr { justify-self: center; }
.ts details summary { cursor: pointer; font-size: 14px; color: var(--accent-text); }
.ts details .hint { margin-top: 8px; overflow-wrap: anywhere; }
.ts .ts-codes { margin: 0; padding: 12px 16px 12px 40px; background: var(--surface); border-radius: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; font-size: 15px; }
.ts .ts-btns { display: flex; gap: 8px; }
.ts input[name=code] { font-size: 18px; letter-spacing: .08em; }

/* Money tab (finance.ts) */
.pill.warn, .notice.warn { background: var(--warn-soft); color: var(--warn); }
td.nowrap, .pill { white-space: nowrap; }
tr.group th { padding-top: 22px; font-size: 14px; color: var(--fg2); }
.row-form label.wide { flex: 3 1 280px; }
.row-form label.narrow { flex: 0 1 360px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.btn.link, button.link { background: none; border: 0; padding: 0; font: inherit; font-family: var(--mono); color: inherit; text-decoration: underline; cursor: pointer; }
.dialog.wide { width: min(880px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.report-photo { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 8px; background: #000; }
.dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.dlg-head .eyebrow { text-transform: none; letter-spacing: 0; display: flex; gap: 8px; align-items: center; }
.dlg-head h2:focus { outline: none; }
.big-amount { font: 700 26px var(--body); font-variant-numeric: tabular-nums; white-space: nowrap; }
.exp-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.kv { margin: 0; display: grid; gap: 10px; }
.kv div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.kv dt { color: var(--muted); font-size: 14px; font-weight: 600; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.receipts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.receipt-tile { display: block; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--raised); color: var(--fg); text-decoration: none; }
.receipt-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.receipt-tile.empty { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 14px; font-weight: 600; font-size: 14px; }
.receipt-tile.empty .muted { font-weight: 400; }
.reading { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.reading h3 { margin: 0 0 6px; font-size: 14px; color: var(--fg2); }
.reading .list { margin-bottom: 6px; }
.reading p { margin: 0 0 8px; font-size: 13.5px; }
a.receipt-tile:hover { border-color: var(--accent); }
.history summary { cursor: pointer; font-weight: 600; color: var(--fg2); }
.history .list { margin-top: 8px; }
.review { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.review .row-form { margin: 0; }

.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-text); cursor: pointer; text-align: left; }
.link:hover { text-decoration: underline; }
.sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.sort.on { color: var(--fg); }
th.num .sort { text-align: right; }
.neg { color: var(--bad); }
.small { font-size: 13px; display: block; margin-top: 2px; }
.scroll { overflow-x: auto; }
.filters label { flex: 1 1 180px; }
.row-form .wide { flex: 2 1 320px; }
.row-form .check { flex: 0 0 auto; min-height: 40px; }
.back { margin: -6px 0 12px -10px; }
.h4 { font-size: 15px; margin: 18px 0 6px; }

/* ───────── Tutorials tab (tutorials.ts); the player's own styles are tutorial.css */
.tut-scrim { padding: 12px; }
.tut-preview { width: min(1240px, 100%); height: min(96vh, 100%); display: flex; flex-direction: column; background: #0b0e12; color: #eef1f5; border-radius: 14px; overflow: hidden; }
.tut-preview-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid #28313d; }
.tut-preview-bar .muted { color: #97a2b3; flex: 1; }
.tut-preview-frame { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.tut-preview-host { position: absolute; left: calc(50% - var(--tut-w, 0px) / 2); top: 0; transform-origin: 0 0; display: flex; flex-direction: column; }
.tut-preview-bar .btn { color: #eef1f5; border-color: #3a4554; background: #1a2029; }

/* Fleet: mounting hardware, inventory check, inventory import */
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-head .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.facts div.bad { background: var(--bad-soft); }
.facts div.bad dd { color: var(--bad); }
.seg-bar { display: inline-flex; gap: 4px; padding: 4px; background: var(--raised); border-radius: 10px; margin: 4px 0 14px; }
.seg-btn { font: 600 14.5px var(--body); color: var(--fg2); background: none; border: 0; border-radius: 7px; padding: 7px 14px; cursor: pointer; }
.seg-btn.on { background: var(--panel); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.file-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.file-pick { position: relative; }
.file-pick:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.drop { transition: border-color .15s, background-color .15s; }
.drop.over { border: 2px dashed var(--accent); background: var(--accent-soft); }
.issues { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; }
td .issues { margin: 0; font-size: 13.5px; min-width: 240px; }
.issues .error { color: var(--bad); }
.issues .warning { color: var(--fg2); }
tr.has-error td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.import-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
table.preview td { font-size: 14.5px; }
table.preview td:nth-child(2), table.preview td.mono div { white-space: nowrap; }
.filters label.narrow { flex: 0 1 340px; }

/* Money tab: rental net and commissions */
table.breakdown { max-width: 640px; }
table.breakdown td, table.breakdown th { padding: 7px 10px; }
table.breakdown tr.total th { color: var(--fg); font-size: 15px; border-bottom: 0; border-top: 2px solid var(--line); }
table.cuts input, table.cuts select { width: 100%; }
table.cuts select { min-width: 140px; }
table.cuts td.act .icon-btn { margin-left: auto; }
table.cuts input.narrow { max-width: 96px; }
table.cuts tfoot th { color: var(--fg); border-bottom: 0; }
table.cuts tfoot th.num { font-size: 15px; }
.row-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-bottom: 10px; }
/* Renter IDs (ids.ts): the two photos in the side panel */
.id-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.id-tile { margin: 0; display: grid; gap: 6px; }
.id-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; background: var(--raised); border: 1px solid var(--line); border-radius: 10px; }
.id-tile.empty > span { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; background: var(--raised); border: 1px dashed var(--line); border-radius: 10px; }
.id-tile figcaption { font-weight: 600; font-size: 14px; color: var(--fg2); }

/* ───────── Feedback tab (feedback.ts) */
.fb-bars { display: grid; gap: 8px; margin: 0 0 14px; }
.fb-bars > div { display: grid; grid-template-columns: 40px minmax(0, 1fr) 32px; align-items: center; gap: 10px; font-size: 14px; }
.fb-bar { height: 10px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.fb-bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.fb-bars .num { text-align: right; color: var(--muted); }

/* ───────── Events and event pages (events.ts), Expenses and an event's Money (finance.ts) */
.crumb { justify-self: start; display: inline-flex; align-items: center; gap: 2px; margin: -8px 0 -10px -2px; padding: 4px 2px; border: 0; background: none; color: var(--accent-text); font: 500 15px var(--font); cursor: pointer; }
.crumb:hover { text-decoration: underline; }
.head h1 .badge { margin-left: 8px; position: relative; top: -2px; }
.seg-bar.tabs { justify-self: start; max-width: 100%; overflow-x: auto; margin: 0; scrollbar-width: none; }
.seg-bar.tabs .seg-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-family: var(--font); }
.seg-btn .n { font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.seg-btn .n.bad { color: var(--bad); }
.seg-btn.on .n { color: var(--accent-text); }
.seg-btn.on .n.bad { color: var(--bad); }
.tools { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--sep); flex-wrap: wrap; }
.tools .search { position: relative; flex: 1 1 240px; display: block; }
.tools .search .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 16px; height: 16px; }
.tools .search input { width: 100%; padding-left: 32px; background: var(--surface); border-color: transparent; }
.tools .search input:focus { background: var(--card); }
.tools .show { display: block; }
.tools .meta { margin-left: auto; }
.flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.card-head .badge { flex: none; }
.card .note + .note, .card .note + .hint, .wf + .note { margin-top: 10px; }
.card > h2 + .hint { margin: -6px 0 14px; }
.card .note + .hint, .wf + .hint { margin-top: 12px; }

/* from orders to what NV2Go keeps: bars that step down like a staircase */
.wf { display: grid; gap: 2px; margin: 4px 0 14px; }
.wf-row { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr) 104px; align-items: center; gap: 14px; padding: 7px 0; }
.wf-k { display: grid; line-height: 19px; min-width: 0; }
.wf-k strong { font-weight: 500; }
.wf-k .meta { font-size: 12.5px; line-height: 16px; }
.wf-track { height: 14px; display: flex; }
.wf-bar { display: block; height: 100%; border-radius: 3px; min-width: 0; }
.wf-bar.in { background: color-mix(in srgb, var(--accent) 55%, var(--raised)); }
.wf-bar.out { background: var(--press); }
.wf-bar.total { background: var(--good); }
.wf-amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.wf-row.total { border-top: 1px solid var(--sep); padding-top: 10px; margin-top: 4px; }
.wf-row.total strong, .wf-row.total .wf-amt { font-weight: 650; }
.wf-row.total + .wf-row:not(.total) { margin-top: 2px; }
.wf-amt.neg { color: var(--bad); }

/* the side column's short lists and the form to enter money */
.row.wrap .main2 > span { white-space: normal; overflow-wrap: anywhere; }
.row .end s { color: var(--text-3); }
.row .end .btn.text { min-height: 24px; padding: 0 4px; margin-right: -4px; }
.side-form { display: grid; gap: 12px; padding: 14px 16px 16px; border-top: 1px solid var(--sep); }
.rows > .side-form:first-child { border-top: 0; }
.side-form .pair { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 10px; }
.side-form input, .side-form select { width: 100%; }

/* one expense, in the side panel */
.sheet.wide { width: min(560px, 100%); }
.sh-amount { display: grid; gap: 2px; }
.sh-amount b { font-size: 30px; line-height: 36px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sh-head .meta .pill { margin-right: 4px; }
.sh-body .receipts { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.sh-body .reading { margin-top: 0; }
.sh-body form.sh-sec { border-top: 1px solid var(--sep); padding-top: 18px; }
.sh-body form.sh-sec label { display: grid; }

/* ───────── Fleet, a device's page, Tutorials, Customer messages, Feedback and Renter IDs */
.name-btn.mono { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.meta.mono { white-space: nowrap; }
.name-btn.acc { color: var(--accent-text); }
.name-btn.acc:hover { text-decoration: underline; }
/* a small list that filters what is shown: a word and the choice, in one pill */
.pick { display: inline-flex; align-items: center; gap: 0; padding-left: 11px; border-radius: 8px; background: var(--surface); font-size: 14px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.pick:hover { background: var(--raised); }
.pick:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; }
.pick select { appearance: none; -webkit-appearance: none; min-height: 34px; max-width: 230px; padding: 4px 30px 4px 6px; border: 0; font: 600 14px var(--font); color: var(--text); background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E") no-repeat right 10px center; text-overflow: ellipsis; cursor: pointer; field-sizing: content; }
.pick select:focus { outline: none; }
.pick select option { color: var(--text); background: var(--card); }
.pick.boxed { padding-left: 0; gap: 8px; background: none; }
.pick.boxed:focus-within { outline: none; }
.pick.boxed select { min-width: 220px; padding-left: 10px; border: 1px solid var(--sep-strong); background-color: var(--card); font-weight: 500; }
.pick.boxed select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.tools .pick { flex: none; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid > p { margin: 0; }
.form-grid textarea, .form-grid input:not([type=checkbox]):not([type=radio]), .form-grid select { width: 100%; }
.form-grid .check { align-self: end; min-height: 36px; }
textarea { resize: vertical; line-height: 1.45; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface); color: var(--text-2); }
.form-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.model-set { border: 1px solid var(--sep); border-radius: 10px; padding: 8px 14px 14px; margin: 0; }
.model-set legend { font-weight: 600; font-size: 14px; color: var(--text); padding: 0 6px; }
.sh-sec .hint { margin-top: -4px; }
.stack.tight { gap: 12px; }
.stack > .btn.text { justify-self: start; }
.btn.wide-btn { width: 100%; min-height: 38px; }
.error.pad { padding: 10px 18px 0; margin: 0; }
.row-form.pad { padding: 12px 18px; margin: 0; border-top: 1px solid var(--sep); }
.tbl .c-tick { width: 44px; }
.check.also { align-items: flex-start; font-weight: 400; margin-top: 4px; }
.check.also input { margin-top: 3px; }

/* a device's "…" menu */
.pop-wrap { position: relative; }
.pop-scrim { position: fixed; inset: 0; z-index: 3; }
.pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 4; min-width: 250px; padding: 6px; display: grid; background: var(--card); border: 1px solid var(--sep); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .16); }
.pop button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: 500 14px var(--font); text-align: left; cursor: pointer; }
.pop button:hover { background: var(--surface); }
.pop button .ic { width: 16px; height: 16px; color: var(--text-2); }
.pop button.danger, .pop button.danger .ic { color: var(--bad); }

/* a device's history: date, what happened, and money when there was any */
.card.hist { padding-bottom: 10px; }
.card.hist .card-head { margin-bottom: 4px; }
.hrow { display: grid; grid-template-columns: 92px 28px minmax(0, 1fr) auto; gap: 2px 12px; align-items: start; padding: 11px 0; }
.hrow + .hrow { border-top: 1px solid var(--sep); }
.hrow .hd { display: grid; line-height: 20px; font-size: 14px; }
.hrow .hd b { font-weight: 500; color: var(--text-2); }
.hrow .hd small { font-size: 12.5px; line-height: 16px; color: var(--text-3); }
.hrow .ico { width: 26px; height: 26px; border-radius: 13px; display: grid; place-items: center; background: var(--surface); color: var(--text-2); }
.hrow .ico .ic { width: 15px; height: 15px; }
.hrow .ico.accent { background: var(--accent-tint); color: var(--accent-text); }
.hrow .ico.bad { background: var(--bad-tint); color: var(--bad); }
.hrow .ico.good { background: var(--good-tint); color: var(--good); }
.hrow .main2 { display: grid; gap: 1px; min-width: 0; line-height: 20px; }
.hrow .main2 strong { font-weight: 500; }
.hrow .main2 > span { color: var(--text-2); font-size: 13.5px; line-height: 18px; }
.hrow .amt { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 20px; }
.card.hist .more { margin: 4px 0 2px -8px; }

/* its condition: the last check's photos */
.card.cond { display: grid; gap: 10px; }
.cond-head, .cond-base { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cond-head b { font-weight: 600; }
.card.cond > p.meta { margin: -6px 0 0; }
.cond-base { border-top: 1px solid var(--sep); padding-top: 12px; margin-top: 2px; }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.thumb { aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; border: 0; padding: 0; background: var(--raised); display: grid; place-items: center; color: var(--text-3); cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.empty { cursor: default; }
button.thumb:hover { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Tutorials: the steps on the left, one step and its instructions on the right */
.cols.ta-cols { grid-template-columns: 320px minmax(0, 1fr); }
.row .ico.step-n { font-weight: 650; font-size: 14px; }
.card.ta-step { display: grid; gap: 14px; }
.ta-top { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 20px; align-items: start; }
.ta-top p { margin: 0; }
.ta-top h2 { display: block; font-size: 18px; line-height: 24px; margin: 4px 0 8px; }
.ta-still { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: #111; }
.ta-still.none { display: grid; place-items: center; background: var(--surface); color: var(--text-3); font-size: 13px; }
table.tut-claims th:first-child, table.tut-claims td:first-child { padding-left: 0; }
table.tut-claims td { vertical-align: top; }
table.tut-claims td.meta { width: 32%; padding-top: 13px; }
.tut-claim { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14.5px; font-weight: 400; color: var(--text); line-height: 20px; }
.tut-claim small { display: block; margin-top: 3px; font-size: 13px; line-height: 17px; color: var(--text-2); }
.tut-claim input { width: 20px; height: 20px; margin: 0; flex: none; }
.ta-nav { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--sep); padding-top: 12px; }

/* Customer messages: the list, the message being edited, and what a customer gets */
.cu-cols { display: grid; grid-template-columns: 290px minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.cu-cols > * { min-width: 0; }
.cu-edit .card-head { margin-bottom: 0; }
.cu-edit .card-head .btn.text { margin-right: -8px; }
.cu-edit .note .inline-acts { display: flex; gap: 8px; margin-top: 8px; }
#cu-preview { display: grid; gap: 16px; }
.bubble-wrap { display: grid; gap: 8px; }
.bubble-wrap > .meta:first-child { text-align: center; }
.bubble { justify-self: start; max-width: 94%; padding: 10px 14px; border-radius: 18px; background: var(--raised); color: var(--text); font-size: 14.5px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble .lnk { color: var(--accent-text); text-decoration: underline; }
.mail { display: grid; gap: 6px; border-top: 1px solid var(--sep); padding-top: 14px; }
.mail b { font-weight: 600; }
.mail pre { margin: 0; font: 14px/1.45 var(--font); color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Feedback */
.stars { white-space: nowrap; letter-spacing: 1px; }
.fb-bars > div { grid-template-columns: 36px minmax(0, 1fr) 28px; }

.show-s { display: none; }

/* the phone tab bar: hidden on a computer */
.tabbar { display: none; }

/* ───────── narrow windows and phones: the sidebar becomes a menu */
@media (max-width: 900px) {
  .shell { display: block; }
  .side { position: fixed; z-index: 7; top: 0; left: 0; bottom: 0; width: 272px; transform: translateX(-102%); transition: transform .2s ease; }
  .shell.menu-open .side { transform: none; box-shadow: 12px 0 40px rgba(0, 0, 0, .2); }
  .menu-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 6; }
  .mtop { display: flex; position: sticky; top: 0; z-index: 3; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--sep); }
  .mtop .logo { width: 72px; }
  .mtop .icon-btn { margin: 0; color: var(--text); }
  .mtop .icon-btn .ic { width: 22px; height: 22px; }
  .mtop .t { font-weight: 600; margin-left: auto; margin-right: auto; }
  .mtop .av { width: 30px; height: 30px; font-size: 12px; }
  .main { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
  .cols, .cols.even { grid-template-columns: 1fr; }
  .tabbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; background: color-mix(in srgb, var(--side) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--sep); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tabbar.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabbar button { position: relative; display: grid; justify-items: center; gap: 3px; padding: 4px 0; border: 0; background: none; color: var(--text-2); font: 500 11px var(--font); cursor: pointer; }
  .tabbar button .ic { width: 24px; height: 24px; }
  .tabbar button.on { color: var(--accent-text); }
  .tabbar .count { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; display: grid; place-items: center; }
}
@media (max-width: 760px) {
  h1 { font-size: 26px; line-height: 32px; }
  .card { padding: 16px; }
  .card.rows { padding: 0; }
  .split, .exp-detail { grid-template-columns: 1fr; }
  .dialog-acts { flex-wrap: wrap; }
  .figs { grid-template-columns: 1fr; }
  .fig + .fig::before { left: 20px; right: 20px; top: 0; bottom: auto; width: auto; height: 1px; }
  .ev-grid { grid-template-columns: 1fr; }
  table:not(.tbl), table:not(.tbl) thead, table:not(.tbl) tbody, table:not(.tbl) tr, table:not(.tbl) td { display: block; }
  table:not(.tbl) thead { display: none; }
  table:not(.tbl) tr { border-bottom: 1px solid var(--sep); padding: 8px 0; }
  table:not(.tbl) td { border: 0; padding: 3px 0; }
  .num, .act { text-align: left; }
  .tbl .hide-s { display: none; }
  .ev-tbl .c-dates, .ev-tbl.money .c-dates { width: 42%; }
  .tbl .show-s { display: inline; }
  .wf-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .wf-track { grid-column: 1 / -1; grid-row: 2; height: 10px; }
  .tools .meta { display: none; }
  .head h1 .badge { display: flex; width: fit-content; margin: 6px 0 0; top: 0; }
  .row .end small { display: none; }
  .dkv { grid-template-columns: 110px 1fr; }
}

/* the wider pages on a laptop: key numbers in two rows, the message preview under the editor */
@media (max-width: 1300px) and (min-width: 761px) {
  .figs.n5, .figs.n6 { --n: 3; }
  .figs.n5 > .fig:nth-child(4)::before, .figs.n6 > .fig:nth-child(4)::before { display: none; }
  .figs.n5 > .fig:nth-child(n+4), .figs.n6 > .fig:nth-child(n+4) { border-top: 1px solid var(--sep); }
  .cu-cols { grid-template-columns: 270px minmax(0, 1fr); }
  .cu-preview { grid-column: 2; }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .cols.ta-cols { grid-template-columns: 260px minmax(0, 1fr); }
  .ta-top { grid-template-columns: 1fr; }
  .ta-still { max-width: 320px; }
}
@media (max-width: 900px) {
  .cols.ta-cols, .cu-cols { grid-template-columns: 1fr; }
  .cu-preview { grid-column: auto; }
}
@media (max-width: 760px) {
  .ta-top { grid-template-columns: 1fr; }
  .ta-still { max-width: 360px; }
  table.tut-claims thead { display: none; }
  table.tut-claims tr { display: grid; border-bottom: 1px solid var(--sep); padding: 10px 0; }
  table.tut-claims td { display: block; border: 0; padding: 0; }
  table.tut-claims td.meta { width: auto; padding: 6px 0 0 32px; }
  .hrow { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .hrow .hd { grid-column: 1 / -1; display: flex; gap: 6px; align-items: baseline; }
  .hrow .hd small::before { content: "· "; }
  .form-grid.three { grid-template-columns: 1fr 1fr; }
  .pick.boxed select { min-width: 0; }
  .head .acts .pick { flex: 1 1 100%; }
  .head .acts .pick select { flex: 1; }
  .tools .pick { flex: 1 1 40%; }
  .tools .pick select { flex: 1; max-width: none; }
  /* key numbers two to a row */
  .figs.n4, .figs.n5, .figs.n6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figs.n4 > .fig::before, .figs.n5 > .fig::before, .figs.n6 > .fig::before { display: none; }
  .figs.n4 > .fig:nth-child(n+3), .figs.n5 > .fig:nth-child(n+3), .figs.n6 > .fig:nth-child(n+3) { border-top: 1px solid var(--sep); }
  .figs.n4 > .fig:nth-child(even), .figs.n5 > .fig:nth-child(even), .figs.n6 > .fig:nth-child(even) { border-left: 1px solid var(--sep); }
  .figs.n4 .fig, .figs.n5 .fig, .figs.n6 .fig { padding: 14px 16px; }
  .figs.n4 .fig b, .figs.n5 .fig b, .figs.n6 .fig b { font-size: 22px; }
}

/* ───────── Analytics (analytics.ts): columns and bars drawn in HTML. One hue for the figures (the page's blue), gray
   for the year before (the blue one is the year being looked at), blue stripes for bookings for events still to come,
   and a gray hatch for months no records cover. Every figure is also in a table, and on hover or tap. */
:root { --an-bar: var(--accent); --an-then: #aeaeb2; --an-track: color-mix(in srgb, var(--accent) 12%, var(--surface)); --an-hatch: rgba(60, 60, 67, .13); }
@media (prefers-color-scheme: dark) { :root { --an-then: #636366; --an-hatch: rgba(255, 255, 255, .10); } }
.an-stripes, .an-b.ahead, .an-legend .sw.ahead { background: repeating-linear-gradient(135deg, var(--an-bar) 0 3px, color-mix(in srgb, var(--an-bar) 32%, var(--card)) 3px 6px); }
.an-acts { align-items: center; }
.an-card { display: grid; gap: 14px; }
.an-card > .sec { margin: 0; flex-wrap: wrap; row-gap: 6px; }
.an-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text-2); }
.an-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.an-legend .sw { width: 10px; height: 10px; border-radius: 2px; background: var(--an-bar); display: inline-block; flex: none; }
.an-legend .sw.then { background: var(--an-then); }
.an-legend .sw.part { background: repeating-linear-gradient(135deg, var(--an-hatch) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--sep-strong); }
.an-chart { position: relative; --gut: 0px; }
.an-chart.months, .an-chart.year { --gut: 48px; }
.an-plot { position: relative; height: 200px; margin-top: 24px; }
.an-chart.months .an-plot, .an-chart.year .an-plot { height: 190px; margin-top: 22px; }
.an-grid { position: absolute; inset: 0; pointer-events: none; }
.an-grid span { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--sep); }
.an-grid span:first-child { border-top-color: var(--sep-strong); }
.an-grid em { position: absolute; left: 0; bottom: 3px; width: calc(var(--gut) - 8px); font: 500 11.5px/14px var(--font); font-style: normal; color: var(--text-3); font-variant-numeric: tabular-nums; }
.an-bars { position: absolute; top: 0; bottom: 0; right: 0; left: var(--gut); display: flex; gap: 8px; }
.an-bars.dense { gap: 0; }
.an-c { position: relative; min-width: 0; }
.an-b { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: min(24px, calc(100% - 2px)); min-height: 2px; background: var(--an-bar); border-radius: 4px 4px 0 0; }
.an-b.flat { border-radius: 0; }
.an-b.ahead { border-bottom: 2px solid var(--card); }
.an-c.then .an-b { background: var(--an-then); }
.an-c:hover .an-b { filter: brightness(1.12); }
.an-c.gapcol { background: repeating-linear-gradient(135deg, var(--an-hatch) 0 2px, transparent 2px 6px); border-radius: 4px 4px 0 0; }
.an-v { position: absolute; left: -12px; right: -12px; margin-bottom: 4px; text-align: center; font: 600 12.5px/16px var(--font); color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; }
.an-gap { position: relative; margin: 0 1px; border-radius: 6px 6px 0 0; background: repeating-linear-gradient(135deg, var(--an-hatch) 0 2px, transparent 2px 6px); display: flex; align-items: center; justify-content: center; text-align: center; min-width: 0; }
.an-gap > span { font-size: 12px; line-height: 16px; color: var(--text-2); background: var(--card); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.an-yl { position: absolute; top: calc(100% + 7px); left: 0; font: 600 12px/14px var(--font); color: var(--text-2); white-space: nowrap; pointer-events: none; }
.an-yl::before { content: ""; position: absolute; left: 0; top: -7px; height: 5px; border-left: 1px solid var(--sep-strong); }
.an-x-space { height: 24px; }
.an-x { display: flex; gap: 8px; margin-top: 8px; padding-left: var(--gut); }
.an-chart.year .an-x { gap: 8px; }
.an-x > span { min-width: 0; display: grid; justify-items: center; gap: 1px; font-size: 13px; color: var(--text-2); text-align: center; }
.an-x b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.an-x .an-d { white-space: normal; line-height: 15px; }
.an-d { display: inline-flex; align-items: center; gap: 1px; font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.an-d.up, .an-vs.up { color: var(--good); }
.an-d .ic { width: 13px; height: 13px; stroke-width: 2.6; }
.an-vs { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; color: var(--text); }
.an-vs .ic { width: 14px; height: 14px; stroke-width: 2.6; }
.fig small.an-vs { display: flex; font-weight: 600; }
.fig small.an-vs.down, .fig small.an-vs.same { color: var(--text); }
.an-g { position: relative; display: flex; justify-content: center; gap: 2px; min-width: 0; }
.an-g > .an-c { flex: 0 1 24px; }
.an-scroll { overflow-x: auto; scrollbar-width: thin; }
.an-tbl-wrap { margin: 0 -20px -18px; border-top: 1px solid var(--sep); overflow-x: auto; }
/* The orders that used a coupon, in a card with no padding of its own: the table scrolls sideways on a phone. */
.an-cpn { border-top: 1px solid var(--sep); overflow-x: auto; }
table.an-tbl th.num, table.an-tbl td.num { white-space: nowrap; }
table.an-tbl td .meta { white-space: normal; }
table.an-tbl .an-vscol { min-width: 150px; }
.an-details summary { cursor: pointer; color: var(--accent-text); font-size: 14px; font-weight: 500; width: max-content; }
.an-details[open] summary { margin-bottom: 8px; }
.an-details table { border-top: 1px solid var(--sep); }
.an-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.an-split > .card > .sec { margin-bottom: 14px; }
.an-meters { display: grid; gap: 12px; }
.an-mr { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(70px, 1fr) minmax(64px, auto) 38px; align-items: center; gap: 12px; font-size: 14px; }
.an-mr .nm { min-width: 0; display: grid; font-weight: 500; line-height: 18px; }
.an-mr .nm small { color: var(--text-2); font-size: 12.5px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-m { display: block; height: 8px; border-radius: 4px; background: var(--an-track); overflow: hidden; }
.an-m i { display: block; height: 100%; min-width: 2px; border-radius: 4px; background: var(--an-bar); }
.an-mr b { font-weight: 600; }
.an-mr .sh { color: var(--text-2); font-size: 13px; }
/* "Other" opens to list each device, phosphor or host in it, indented under it. */
.an-other > summary { list-style: none; cursor: pointer; }
.an-other > summary::-webkit-details-marker { display: none; }
.an-open { color: var(--accent-text); font-size: 12.5px; font-weight: 500; }
.an-other .an-open .hide, .an-other[open] .an-open .show { display: none; }
.an-other[open] .an-open .hide { display: inline; }
.an-rest { margin: 12px 0 0 6px; padding-left: 12px; border-left: 2px solid var(--sep); }
.an-cust { margin: 0 -20px 16px; border-top: 1px solid var(--sep); border-bottom: 1px solid var(--sep); }
.an-cust + .an-meters + .hint, .an-meters + .hint { margin-top: 14px; }
.an-more { display: flex; justify-content: center; padding: 8px 14px; border-top: 1px solid var(--sep); }
.an-ev .meta { font-weight: 400; }
.an-notes { max-width: 920px; }
.an-tip { position: fixed; z-index: 60; pointer-events: none; display: grid; gap: 1px; max-width: 280px; padding: 7px 11px; border-radius: 8px; background: var(--card); color: var(--text); border: 1px solid var(--sep-strong); box-shadow: 0 6px 20px rgba(0, 0, 0, .16); font: 13px/17px var(--font); }
.an-tip[hidden] { display: none; }
.an-tip b { font-weight: 600; font-variant-numeric: tabular-nums; }
.an-tip span { color: var(--text-2); font-size: 12.5px; }
@media (max-width: 1100px) {
  .an-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .an-chart.months { min-width: 760px; }
  .an-chart.years { min-width: 520px; }
  .an-chart.year { --gut: 40px; }
  .an-chart.year .an-bars, .an-chart.year .an-x { gap: 3px; }
  .an-g > .an-c { flex-basis: 12px; }
  .an-x > span { font-size: 12px; }
  .an-v { font-size: 11.5px; }
  .an-tbl-wrap { margin: 0 -16px -16px; }
  table.an-tbl .an-vscol { min-width: 0; }
  .an-cust { margin: 0 -16px 16px; }
  .an-mr { grid-template-columns: minmax(0, 1fr) minmax(56px, auto) 34px; row-gap: 6px; }
  .an-mr .nm { grid-column: 1 / -1; }
}

/* The Claude key on the Staff page: shown once, in full, to copy. */
.card.ck { margin-top: 20px; }
.ck-key { flex: 1 1 320px; font-size: 13px; }
.card.ck .hint { margin-top: 10px; }
/* Notes under an import's figures: what was left out on purpose. */
.hint-list { margin: 12px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.hint-list li + li { margin-top: 2px; }
/* The import review's tables scroll inside their card on a phone, instead of the whole page scrolling sideways. */
form[data-form="hist-review"] > div { min-width: 0; }

/* ───────── Expenses > Spending (spending.ts) uses the Analytics styles above; Expenses > Old receipts (old-receipts.ts):
   the Drive folder, reading in progress, and the review table with ticks for importing. */
.sp-view { display: grid; gap: 20px; }
.sp-view > .note, .sp-view > .hint { margin: 0; }
.sp-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.or-setup { display: grid; gap: 10px; }
.or-setup > .sec { margin: 0; }
.or-setup p { margin: 0; }
.or-setup .acts { display: flex; gap: 8px; }
.or-setup .sh-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.or-folder { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--sep); border-radius: 10px; }
.or-folder input { width: 100%; }
.or-run { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; }
.or-run > span:not(.spin) { flex: 1; min-width: 220px; }
.spin { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--sep-strong); border-top-color: var(--accent); animation: or-spin 0.9s linear infinite; }
@keyframes or-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
.or-tabs { margin-top: 4px; }
.or-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--sep); }
.or-bar .push { margin-left: auto; }
.or-tbl td.tick, .or-tbl th.tick { width: 36px; padding-right: 0; }
.or-tbl td.tick input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.or-tbl td .meta { overflow-wrap: anywhere; }
.form-grid.two > .wide { grid-column: 1 / -1; }
.or-why { margin: 0; font-size: 13.5px; color: var(--text-2); }
@media (max-width: 760px) {
  .form-grid.two { grid-template-columns: minmax(0, 1fr); }
}
