/* "hidden" always wins over a display style */
[hidden] { display: none !important; }

/* Layout: left rail navigation on desktop, bottom tab bar on phones; content column max 1080px.
   Palette: cool workshop greys with a deep teal accent; priority colors follow Todoist's convention. */
:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --sunk: #eef1f0;
  --ink: #17201e;
  --muted: #5b6765;
  --faint: #8a9593;
  --rule: #dde3e1;
  --accent: #1d5e58;
  --accent-ink: #ffffff;
  --accent-soft: #e0eeeb;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  --warn: #8a5a12;
  --warn-soft: #f7eddb;
  --ok: #2e6b33;
  --p1: #d1453b; --p2: #eb8909; --p3: #246fe0; --p4: #8a9593;
  --c-teal: #1d7a70; --c-blue: #2d6bc4; --c-plum: #8a4a8f; --c-amber: #b7791f; --c-rust: #b4532a; --c-olive: #6b7a2a; --c-slate: #56656e;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(20, 30, 28, .06), 0 4px 16px rgba(20, 30, 28, .06);
  --f-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-num: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111615; --surface: #192120; --sunk: #141a19; --ink: #e4ebe9; --muted: #9caaa7; --faint: #6f7d7a;
    --rule: #2a3533; --accent: #5fb8ac; --accent-ink: #0d1514; --accent-soft: #1d3532;
    --danger: #f2877e; --danger-soft: #3a1f1d; --warn: #e3b66a; --warn-soft: #3a2f1b; --ok: #8bc58f;
    --p1: #ff7b72; --p2: #f5a623; --p3: #6ea8ff; --p4: #6f7d7a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
svg[aria-hidden="true"] { width: 18px; height: 18px; flex: none; vertical-align: -4px; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-ui); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0; text-wrap: balance; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }

/* Shell */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.rail { background: var(--surface); border-right: 1px solid var(--rule); padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.brand { font-weight: 750; font-size: 16px; padding: 4px 10px 14px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--ink); font-weight: 500; }
.nav a:hover { background: var(--sunk); text-decoration: none; }
.nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .sep { height: 1px; background: var(--rule); margin: 10px 4px; }
.nav .grp { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--faint, #8a918f); padding: 12px 10px 4px; }
.nav .grp:first-child { padding-top: 2px; }
.morenav { display: flex; flex-direction: column; gap: 2px; }
.morenav .grp { padding-left: 0; }
.morenav a { padding-left: 0; padding-right: 0; }
.rail .foot { margin-top: auto; font-size: 13px; color: var(--muted); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.topbar .in { max-width: 1080px; margin: 0 auto; display: flex; gap: 10px; align-items: center; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); }
.topbar form.search { flex: 1; max-width: 420px; }
.topbar input[type=search] { width: 100%; }
.bell { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; color: var(--ink); }
.bell:hover { background: var(--sunk); }
.bell svg { width: 22px; height: 22px; }
.bell .dot[hidden] { display: none; }
.bell .dot { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--p1); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.content { max-width: 1080px; margin: 0 auto; padding: 22px max(16px, env(safe-area-inset-right, 0px)) 96px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 20px; }
.tabbar { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--rule);
    padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 0; }
  .tabbar a.on { color: var(--accent); font-weight: 650; }
  .tabbar svg { width: 22px; height: 22px; }
  h1 { font-size: 21px; }
}

/* Page header */
.phead { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.phead .sub { margin-top: 4px; color: var(--muted); font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 4px; }

/* Controls */
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 8px 10px; min-width: 0; }
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); font-size: 14px; }
.btn { display: inline-flex; align-items: center; gap: 6px; font: 600 14px var(--f-ui); padding: 8px 14px; border-radius: 6px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { background: var(--sunk); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: none; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.span { grid-column: 1 / -1; }
.form { display: flex; flex-direction: column; gap: 18px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.form legend { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; padding: 0; }

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card > h2 { margin-bottom: 10px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.flash { padding: 10px 14px; border-radius: 6px; background: var(--accent-soft); color: var(--ink); border-left: 3px solid var(--accent); }
.flash.error { background: var(--danger-soft); border-left-color: var(--danger); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.stats { display: flex; gap: 24px; flex-wrap: wrap; }
.stat b { display: block; font-size: 22px; font-family: var(--f-num); }
.stat span { font-size: 13px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--accent-soft); color: var(--accent); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.c-teal { background: var(--c-teal); } .c-blue { background: var(--c-blue); } .c-plum { background: var(--c-plum); } .c-amber { background: var(--c-amber); }
.c-rust { background: var(--c-rust); } .c-olive { background: var(--c-olive); } .c-slate { background: var(--c-slate); }

/* Tables */
.tablewrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
table.list td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: var(--sunk); }
table.list td.r, table.list th.r { text-align: right; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); overflow-x: auto; }
.tabs a { padding: 8px 12px; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 7px; overflow: hidden; background: var(--surface); }
.seg a { padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--muted); border-right: 1px solid var(--rule); }
.seg a:last-child { border-right: 0; }
.seg a.on { background: var(--accent-soft); color: var(--accent); }
.seg a:hover { text-decoration: none; }

/* Quick add */
.quickadd { display: flex; gap: 8px; }
.quickadd input { flex: 1; font-size: 15px; padding: 10px 12px; }
.qa-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.qa-hint code { font-family: var(--f-num); font-size: 12px; background: var(--sunk); padding: 1px 4px; border-radius: 3px; }

/* Task rows */
.tasklist { list-style: none; margin: 0; padding: 0; }
.task { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 4px; border-bottom: 1px solid var(--rule); }
.task:last-child { border-bottom: 0; }
.task .title { font-weight: 500; overflow-wrap: anywhere; }
.task .title a { color: var(--ink); }
.task.done .title { color: var(--faint); text-decoration: line-through; }
.task .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--muted); margin-top: 2px; align-items: center; }
.bcard .meta .late, .task .meta .late { color: var(--danger); font-weight: 600; }
.task .meta .soon { color: var(--ok); font-weight: 600; }
.check-btn { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--p4); background: transparent; cursor: pointer; margin-top: 2px; padding: 0; display: grid; place-items: center; }
.check-btn.p1 { border-color: var(--p1); background: color-mix(in srgb, var(--p1) 10%, transparent); }
.check-btn.p2 { border-color: var(--p2); background: color-mix(in srgb, var(--p2) 10%, transparent); }
.check-btn.p3 { border-color: var(--p3); background: color-mix(in srgb, var(--p3) 10%, transparent); }
.check-btn:hover::after, .task.done .check-btn::after { content: ""; width: 8px; height: 4px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translate(1px, -1px); color: var(--muted); }
.task.done .check-btn { background: var(--p4); border-color: var(--p4); }
.task.done .check-btn::after { color: var(--surface); }
.label-chip { font-size: 12px; color: var(--c-plum); }
.daygroup { margin-top: 6px; }
.daygroup h3 { font-size: 13px; padding: 10px 4px 4px; border-bottom: 1px solid var(--rule); display: flex; gap: 8px; align-items: baseline; }
.daygroup h3 .muted { font-weight: 500; }

/* Board */
.board { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.col { background: var(--sunk); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.col h3 { display: flex; justify-content: space-between; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 2px 4px; }
.col .cards { display: flex; flex-direction: column; gap: 8px; min-height: 40px; flex: 1; }
.col.drop { outline: 2px dashed var(--accent); outline-offset: -2px; }
.bcard { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 10px; cursor: grab; box-shadow: var(--shadow); }
.bcard.dragging { opacity: .5; }
.bcard .title { font-weight: 500; overflow-wrap: anywhere; }
.bcard .meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.bcard.p1 { border-left: 3px solid var(--p1); } .bcard.p2 { border-left: 3px solid var(--p2); } .bcard.p3 { border-left: 3px solid var(--p3); }
.col form input { width: 100%; font-size: 14px; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--rule); border-top: 1px solid var(--rule); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.cal .dow { font-size: 12px; font-weight: 650; color: var(--muted); padding: 6px 8px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--sunk); }
.cal .day { min-height: 104px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .day.other { background: var(--sunk); }
.cal .day .n { font-size: 12px; font-weight: 650; color: var(--muted); font-family: var(--f-num); }
.cal .day.today .n { color: var(--accent-ink); background: var(--accent); border-radius: 10px; padding: 0 6px; align-self: flex-start; }
.cal .ev { font-size: 12px; padding: 2px 5px; border-radius: 4px; background: var(--accent-soft); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cal .ev.done { text-decoration: line-through; color: var(--faint); background: var(--sunk); }
.cal .ev.p1 { box-shadow: inset 3px 0 0 var(--p1); }
.calwrap { min-width: 0; }
@media (max-width: 640px) { .cal .day { min-height: 64px; padding: 3px; } .cal .ev { font-size: 10.5px; padding: 1px 3px; } .cal .dow { padding: 4px; font-size: 11px; } }

/* Activity timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.timeline li:last-child { border-bottom: 0; }
.kind { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); color: var(--muted); }
.kind svg { width: 16px; height: 16px; }
.kind.call { background: color-mix(in srgb, var(--c-blue) 15%, transparent); color: var(--c-blue); }
.kind.email { background: color-mix(in srgb, var(--c-plum) 15%, transparent); color: var(--c-plum); }
.kind.meeting { background: color-mix(in srgb, var(--c-amber) 18%, transparent); color: var(--c-amber); }
.timeline .body { overflow-wrap: anywhere; }
.timeline .when { font-size: 12.5px; color: var(--muted); }
.timeline .when b { color: var(--ink); }
.timeline .tools { margin-top: 4px; }

/* Detail layout */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
details.inline summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; list-style: none; }
details.inline summary::-webkit-details-marker { display: none; }
details.inline[open] summary { margin-bottom: 10px; }
.comment { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.comment:last-child { border-bottom: 0; }
.comment .who { font-size: 13px; font-weight: 650; }
.comment .who span { font-weight: 400; color: var(--muted); }

/* Auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); }
.auth .card { width: 100%; max-width: 400px; padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); }

.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 50; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.toast[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Clock status in the top bar */
.clockpill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 650; font-size: 13px; white-space: nowrap; max-width: 46vw; }
.clockpill .txt { overflow: hidden; text-overflow: ellipsis; }
.clockpill:hover { text-decoration: none; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); flex: none; }
@media (max-width: 520px) { .clockpill .txt { display: none; } }

/* Clock screen */
.clockface { display: flex; flex-direction: column; gap: 14px; }
.clockface .now { font-family: var(--f-num); font-size: 44px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.clockface .job { font-size: 18px; font-weight: 650; }
.bigbtn { font-size: 18px; padding: 16px 20px; justify-content: center; width: 100%; border-radius: 10px; }
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.newjob { border: 1px dashed var(--rule); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.req { color: var(--danger); }
.geo-note { font-size: 12.5px; color: var(--muted); }
.entry-day { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 4px 6px; border-bottom: 1px solid var(--rule); }
.entry-day.over b { color: var(--warn); }
.entry { display: grid; grid-template-columns: 158px minmax(0, 1fr) auto; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--rule); align-items: start; }
.entry .when { font-family: var(--f-num); font-size: 13px; white-space: nowrap; }
.entry .mats { font-size: 13px; color: var(--muted); margin-top: 2px; }
@media (max-width: 640px) { .entry { grid-template-columns: minmax(0, 1fr) auto; } .entry .when { grid-column: 1 / -1; } }
.stagebar { display: flex; flex-wrap: wrap; gap: 6px; }
.stagebar button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.urg-urgent { background: var(--warn-soft); color: var(--warn); }
.urg-emergency { background: var(--danger-soft); color: var(--danger); }
.notice { background: var(--warn-soft); color: var(--ink); border-left: 3px solid var(--warn); padding: 10px 14px; border-radius: 6px; }

/* Kiosk */
.kiosk { min-height: 100vh; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.ktile { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--ink); min-height: 110px; }
.ktile:hover { text-decoration: none; border-color: var(--accent); }
.ktile b { font-size: 18px; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; }
.pinpad button { font: 700 24px var(--f-num); padding: 18px 0; border-radius: 10px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer; }
.pindots { font: 700 30px var(--f-num); letter-spacing: 10px; min-height: 40px; }

/* Locked (sent) documents read as text, not as editable boxes */
.form input[readonly], .form textarea[readonly], .doclines input[readonly], .doclines textarea[readonly] { background: transparent; border-color: transparent; box-shadow: none; resize: none; padding-left: 0; }
.doclines select:disabled { background: transparent; border-color: transparent; appearance: none; color: var(--ink); opacity: 1; padding-left: 0; }

.quickadd { flex-wrap: wrap; }
.quickadd .qa-client { flex: 0 1 220px; min-width: 0; font-size: 15px; padding: 9px 10px; }
@media (max-width: 640px) { .quickadd .qa-client { flex-basis: 100%; } }

/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.photo { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--rule); display: block; }
.photo .cap { font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.photo .meta { font-size: 12px; color: var(--faint); overflow-wrap: anywhere; }
.photo-grid.pick .pickable { position: relative; cursor: pointer; }
.photo-grid.pick input { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; z-index: 1; }
.photo-grid.pick input:checked + img { outline: 3px solid var(--accent); outline-offset: -3px; }
.filebtn { position: relative; overflow: hidden; align-self: flex-start; cursor: pointer; }
.filebtn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.billcard { border-left: 4px solid var(--accent); }
.sheet { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 60; max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.sheet .actions { flex-wrap: wrap; }
@media (min-width: 900px) { .sheet { bottom: 24px; } }

.jobdone { display: flex; flex-direction: column; gap: 8px; border: 2px solid var(--accent, #5bb5a2); border-radius: 10px; padding: 10px 14px; }
.jobdone legend { font-weight: 700; padding: 0 6px; }
.jobdone .check { font-weight: 500; }
/* Equipment: each device is a main row plus a details row */
table.list tr:has(+ tr.subrow) td { border-bottom: 0; padding-bottom: 4px; }
table.list tr.subrow:hover td { background: transparent; }

/* Two-step confirm: the armed button is unmistakable */
[data-armed] { background: var(--danger, #d9534f) !important; border-color: var(--danger, #d9534f) !important; color: #fff !important; }

/* Files: non-photo rows */
.filelist { display: flex; flex-direction: column; margin-top: 10px; }
.filerow { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--rule); }
.filerow:first-child { border-top: 0; }
.fileicon { flex: none; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--sunk); color: var(--muted); }
.fileicon svg { width: 20px; height: 20px; }
.fileicon.k-audio { background: var(--accent-soft); color: var(--accent); }
.fileicon.k-plan { color: var(--c-blue); }
.fileicon.k-receipt { color: var(--c-amber); }
.fileicon.k-config { color: var(--c-plum); }
.fileinfo { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fileinfo .meta { font-size: 12px; color: var(--faint); }
.fileinfo audio { display: block; width: 100%; max-width: 360px; height: 36px; margin-top: 6px; }
.fileacts { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.filebtn svg, .js-record svg { width: 16px; height: 16px; }
.js-record.recording { background: var(--danger); border-color: var(--danger); color: #fff; }

/* Client files: one group per job */
.filegroup { padding: 0; }
.filegroup > summary { list-style: none; cursor: pointer; padding: 12px 16px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.filegroup > summary::-webkit-details-marker { display: none; }
.filegroup > summary::before { content: "▸"; color: var(--faint); }
.filegroup[open] > summary::before { content: "▾"; }
.filegroup > .groupbody { padding: 0 16px 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink); text-decoration: none; background: var(--surface); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip .num { opacity: .7; margin-left: 2px; }

/* Site notes */
.note { display: flex; flex-direction: column; gap: 10px; }
.note .notehead { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.notebody { font-family: var(--f-num); font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--sunk); border-radius: 8px; padding: 10px 12px; margin: 0; }
.logins td { vertical-align: middle; }
.logins .pwcell { white-space: nowrap; }
.logins .pwcell .js-pw { font-family: var(--f-num); }
.cat { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.lockpill { display: inline-flex; gap: 3px; align-items: center; font-size: 11px; color: var(--faint); }
.lockpill svg { width: 12px; height: 12px; }
textarea.mono { font-family: var(--f-num); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.js-copypw svg { width: 14px; height: 14px; vertical-align: -2px; }
.logins input { min-width: 110px; }
.filebtn { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; }
@media (max-width: 640px) {
  .logins.view thead { display: none; }
  .logins.view tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .logins.view td { display: block; border: 0; padding: 0; min-width: 0; overflow-wrap: anywhere; }
  .logins.view td[data-label="Login"] { grid-column: 1 / -1; }
  .logins.view td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
  .logins.view td[data-label="Login"]::before { display: none; }
}
fieldset { min-width: 0; }
@media (max-width: 640px) {
  .logins.edit thead { display: none; }
  .logins.edit tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .logins.edit tr[hidden] { display: none; }
  .logins.edit td { display: block; border: 0; padding: 0; min-width: 0; }
  .logins.edit td:empty { display: none; }
  .logins.edit td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--faint); margin-bottom: 2px; }
  .logins.edit input:not([type=checkbox]) { width: 100%; min-width: 0; }
}

/* Parts of a job */
.partgroup { padding: 0; }
.partgroup > summary { list-style: none; cursor: pointer; padding: 12px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.partgroup > summary::-webkit-details-marker { display: none; }
.partgroup > summary::before { content: "▸"; color: var(--faint); }
.partgroup[open] > summary::before { content: "▾"; }
.partgroup > .groupbody { padding: 0 16px 14px; }
.partbar { flex: 1; min-width: 60px; max-width: 160px; height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; margin-left: auto; }
.partbar > span { display: block; height: 100%; background: var(--accent); }

/* Dispatch board */
.dispatch { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .dispatch { grid-template-columns: 1fr; } }
.dqueue { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dcard { border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; background: var(--surface); cursor: grab; }
.dcard.urgent { border-left: 3px solid var(--danger); }
.dcard a { color: inherit; }
.dgrid { border-collapse: collapse; width: 100%; min-width: 860px; table-layout: fixed; }
.dgrid th, .dgrid td { border-bottom: 1px solid var(--rule); border-left: 1px solid var(--rule); padding: 6px; vertical-align: top; text-align: left; }
.dgrid thead th { font-size: 13px; font-weight: 600; background: var(--sunk); }
.dgrid th.tech { width: 130px; font-size: 14px; background: var(--surface); position: sticky; left: 0; z-index: 1; }
.dgrid thead th:first-child { width: 130px; position: sticky; left: 0; z-index: 2; }
.dgrid .today { background: var(--accent-soft); }
.dgrid .weekend { width: 9%; }
.dcell { min-height: 70px; height: 70px; }
.dcell.over { outline: 2px dashed var(--accent); outline-offset: -3px; background: var(--accent-soft); }
.dchip { font-size: 12px; line-height: 1.3; padding: 5px 7px; margin-bottom: 5px; border-radius: 6px; background: var(--sunk); border-left: 3px solid var(--accent); cursor: grab; overflow-wrap: anywhere; }
.dchip .small { font-size: 11px; }
.dchip.c-teal { border-left-color: var(--c-teal); } .dchip.c-blue { border-left-color: var(--c-blue); }
.dchip.c-plum { border-left-color: var(--c-plum); } .dchip.c-amber { border-left-color: var(--c-amber); }
.dchip.c-rust { border-left-color: var(--c-rust); } .dchip.c-olive { border-left-color: var(--c-olive); }
.dchip.c-slate { border-left-color: var(--c-slate); }
.dchip.dragging, .dcard.dragging { opacity: .5; }
/* Schedule list (home, job page) */
.sched { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.sched .when { flex: none; width: 110px; font-weight: 600; font-size: 13px; }
.dchip .dtime { font-weight: 700; font-size: 11px; color: var(--accent); }
.dgrid .dcell.over.copy { outline-style: solid; }
.dchange[open] > summary { font-weight: 700; }
.dpop { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(360px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); overflow: auto; z-index: 60; background: var(--surface); border: 1px solid var(--rule);
  border-radius: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); padding: 14px 16px; font-size: 14px; }

/* How-to library */
.howrow { display: block; padding: 12px 16px; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none; }
.howrow:hover { background: var(--sunk); text-decoration: none; }
.howrow:last-child { border-bottom: 0; }
.howbody { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; font-size: 15px; }

/* Signature pad */
.sigpad { width: 100%; height: 200px; border: 2px dashed var(--rule); border-radius: 10px; background: #fff; touch-action: none; display: block; }

/* ======================================================================================================
   Soft look (0.11): panels share the page color and are lifted by a light and a dark shadow; fields and
   tracks are pressed in. Teal stays the accent. Later rules override the flat look above.
   ====================================================================================================== */
:root {
  --bg: #e4eae8;
  --surface: #e8edeb;
  --sunk: #dde4e2;
  --rule: #d2dad8;
  --accent-soft: #d2e4e0;
  --hi: rgba(255, 255, 255, .92);       /* light from the top left */
  --lo: rgba(146, 164, 160, .55);       /* shade to the bottom right */
  --raise: 9px 9px 20px var(--lo), -9px -9px 20px var(--hi);
  --raise-sm: 4px 4px 10px var(--lo), -4px -4px 10px var(--hi);
  --press: inset 3px 3px 7px var(--lo), inset -3px -3px 7px var(--hi);
  --press-sm: inset 2px 2px 4px var(--lo), inset -2px -2px 4px var(--hi);
  --radius: 20px;
  --r-ctl: 12px;
  --shadow: var(--raise);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c2423; --surface: #1f2827; --sunk: #182020; --rule: #2b3634; --accent-soft: #1f3a36;
    --hi: rgba(255, 255, 255, .045); --lo: rgba(0, 0, 0, .5);
    --raise: 8px 8px 18px var(--lo), -6px -6px 16px var(--hi);
    --raise-sm: 4px 4px 9px var(--lo), -3px -3px 8px var(--hi);
    --press: inset 3px 3px 7px var(--lo), inset -2px -2px 6px var(--hi);
    --press-sm: inset 2px 2px 4px var(--lo), inset -1px -1px 3px var(--hi);
    --shadow: var(--raise);
  }
}
body { background: var(--bg); }
h1 { font-size: 27px; font-weight: 760; letter-spacing: -.022em; }
h2 { font-weight: 680; letter-spacing: -.005em; }

/* Shell: the rail is part of the page; the current page is pressed in */
.rail { background: var(--bg); border-right: 0; box-shadow: 1px 0 0 var(--rule); padding: 18px 14px; }
.brand-mark { border-radius: 9px; box-shadow: var(--raise-sm); }
.nav a { border-radius: var(--r-ctl); padding: 9px 12px; transition: box-shadow .15s, color .15s; }
.nav a:hover { background: none; box-shadow: var(--raise-sm); }
.nav a.on { background: var(--bg); box-shadow: var(--press); color: var(--accent); }
.nav .grp { color: var(--accent); opacity: .75; letter-spacing: .14em; font-size: 10.5px; }
.topbar { background: color-mix(in srgb, var(--bg) 86%, transparent); border-bottom: 0; }
.bell { border-radius: 50%; box-shadow: var(--raise-sm); }
.bell:hover { background: none; box-shadow: var(--press-sm); }
.content { gap: 26px; padding-top: 26px; }

/* Panels */
.card { background: var(--surface); border: 0; border-radius: var(--radius); box-shadow: var(--raise); padding: 20px; }
.card.flush { padding: 0; }
.col { background: var(--bg); box-shadow: var(--press); border-radius: var(--radius); }
.bcard { border: 0; border-radius: 14px; background: var(--surface); box-shadow: var(--raise-sm); }
.cal { border: 0; box-shadow: var(--raise); border-radius: var(--radius); }
.sheet, .ktile, .chip { border: 0; box-shadow: var(--raise-sm); background: var(--surface); }
.sheet { border-radius: var(--radius); box-shadow: var(--raise); }
.newjob { border: 0; box-shadow: var(--press); border-radius: 16px; padding: 14px; }
.jobdone { border: 0; box-shadow: var(--press); border-radius: 16px; }
.billcard { border-left: 0; box-shadow: var(--raise), inset 4px 0 0 var(--accent); }
.notebody, .fileicon, .kind { background: var(--bg); box-shadow: var(--press-sm); }

/* Fields are pressed into the panel */
input, select, textarea {
  background: var(--bg); border: 1px solid transparent; border-radius: var(--r-ctl); box-shadow: var(--press);
  padding: 10px 13px; transition: box-shadow .15s, border-color .15s;
}
input[type=checkbox], input[type=radio] { box-shadow: none; padding: 0; accent-color: var(--accent); width: 17px; height: 17px; }
input[type=file] { box-shadow: none; background: none; padding: 4px 0; border: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: var(--press), 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
label { color: var(--muted); font-weight: 620; }
.form legend { color: var(--accent); letter-spacing: .14em; font-size: 11.5px; }

/* Buttons are raised and press in when clicked */
.btn { border: 0; border-radius: var(--r-ctl); background: var(--surface); box-shadow: var(--raise-sm); padding: 9px 16px;
  transition: box-shadow .15s, transform .05s, filter .15s; color: var(--ink); }
.btn:hover { background: var(--surface); box-shadow: 6px 6px 14px var(--lo), -6px -6px 14px var(--hi); }
.btn:active { box-shadow: var(--press-sm); transform: translateY(1px); }
.btn.primary { background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent));
  box-shadow: 5px 5px 12px color-mix(in srgb, var(--accent) 35%, var(--lo)), -4px -4px 10px var(--hi); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:active { box-shadow: inset 2px 2px 5px rgba(0, 0, 0, .25); }
.btn.ghost { box-shadow: none; background: none; }
.btn.ghost:hover { box-shadow: var(--raise-sm); }
.btn.sm { padding: 6px 12px; border-radius: 10px; }
.btn.danger { color: var(--danger); }
.bigbtn { border-radius: 16px; padding: 18px 22px; }

/* Segmented filters and tabs: a pressed track with the current choice raised */
.seg { border: 0; border-radius: 14px; background: var(--bg); box-shadow: var(--press); padding: 4px; gap: 4px; overflow: visible; }
.seg a { border: 0; border-radius: 10px; padding: 6px 13px; }
.seg a.on { background: var(--surface); color: var(--accent); box-shadow: var(--raise-sm); }
.tabs { border-bottom: 0; gap: 6px; padding: 4px; background: var(--bg); box-shadow: var(--press); border-radius: 14px; align-self: flex-start; max-width: 100%; }
.tabs a { border-bottom: 0; margin-bottom: 0; border-radius: 10px; padding: 6px 14px; }
.tabs a.on { background: var(--surface); box-shadow: var(--raise-sm); color: var(--accent); }
.stagebar .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 700;
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, .25); }
.chip.on { background: var(--accent); color: var(--accent-ink); }

/* Lists and tables */
table.list th { color: var(--accent); opacity: .8; letter-spacing: .1em; font-size: 11px; border-bottom-color: var(--rule); }
table.list td { border-bottom-color: color-mix(in srgb, var(--rule) 70%, transparent); }
table.list tr:hover td { background: color-mix(in srgb, var(--hi) 35%, transparent); }
.task, .entry, .entry-day, .comment, .filerow, .daygroup h3 { border-color: color-mix(in srgb, var(--rule) 75%, transparent); }
.check-btn { border: 0; background: var(--bg); box-shadow: var(--press-sm); width: 22px; height: 22px; }
.task.done .check-btn { background: var(--accent); box-shadow: none; }
.pill { background: var(--bg); box-shadow: var(--press-sm); }
.pill.ok { background: var(--accent-soft); box-shadow: none; }
.pill.warn, .pill.bad, .urg-urgent, .urg-emergency { box-shadow: none; }
.flash { border-left: 0; border-radius: 14px; background: var(--surface); box-shadow: var(--raise-sm), inset 4px 0 0 var(--accent); }
.flash.error { box-shadow: var(--raise-sm), inset 4px 0 0 var(--danger); background: var(--surface); }
.notice { border-left: 0; border-radius: 12px; box-shadow: inset 4px 0 0 var(--warn); }
.clockpill { box-shadow: var(--press-sm); background: var(--bg); }
.toast { border-radius: 14px; }
.qa-hint code { background: var(--bg); box-shadow: var(--press-sm); border-radius: 6px; }

/* Phone tab bar */
@media (max-width: 860px) {
  .tabbar { background: var(--bg); border-top: 0; box-shadow: 0 -6px 18px var(--lo); }
  .tabbar a.on { color: var(--accent); }
  .tabbar a.on svg { filter: drop-shadow(0 2px 3px color-mix(in srgb, var(--accent) 40%, transparent)); }
  .card { padding: 16px; border-radius: 18px; box-shadow: 6px 6px 14px var(--lo), -6px -6px 14px var(--hi); }
}

/* Input with a button inside (barcode fields) */
.inputbtn { display: flex; gap: 6px; align-items: center; }
.inputbtn input { flex: 1; min-width: 0; }

/* On/off switch (Billable on service calls) */
.switch { flex-direction: row; align-items: center; gap: 10px; cursor: pointer; color: var(--ink); font-weight: 600; font-size: 14px; }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 24px; border-radius: 999px; background: var(--bg);
  box-shadow: var(--press); position: relative; cursor: pointer; margin: 0; flex: none; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); box-shadow: 2px 2px 5px var(--lo), -1px -1px 3px var(--hi); transition: transform .2s; }
.switch input:checked { background: var(--accent); box-shadow: inset 2px 2px 5px rgba(0, 0, 0, .25); }
.switch input:checked::after { transform: translateX(20px); }
.billtoggle { margin: 0; }

/* Camera scanner */
.scanner { position: fixed; inset: 0; z-index: 90; background: rgba(20, 28, 27, .55); display: grid; place-items: center; padding: 16px; }
.scanner-box { width: 100%; max-width: 560px; background: var(--surface); border-radius: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.scanner-head { display: flex; justify-content: space-between; align-items: center; }
.scanner-view { position: relative; border-radius: 18px; overflow: hidden; background: #0d1312; aspect-ratio: 4 / 3; box-shadow: var(--press); }
.scanner-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner-line { position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: #ff4d4d; box-shadow: 0 0 10px #ff4d4d; }
.scanner-view::after { content: ""; position: absolute; left: 6%; right: 6%; top: 30%; bottom: 30%; border-radius: 14px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .28); border: 2px solid rgba(255, 255, 255, .55); pointer-events: none; }
.scanner-msg { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; color: #fff; font-size: 14px; text-shadow: 0 1px 3px #000; padding: 0 12px; }
.scanner-tools { display: flex; gap: 10px; align-items: center; }
.scanner-type { display: flex; gap: 8px; }
.scanner-type input { flex: 1; }
body.scanning { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Sign-in: a soft padlock beside the form */
.auth .authcard { width: 100%; max-width: 820px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 0;
  padding: 0; border-radius: 28px; box-shadow: var(--raise); overflow: hidden; }
.auth .authcard > form { padding: 40px 38px; display: flex; flex-direction: column; gap: 16px; }
.lockpanel { margin: 18px; border-radius: 22px; background: var(--bg); box-shadow: var(--press); display: flex; flex-direction: column;
  justify-content: space-between; padding: 22px; min-height: 380px; }
.lockpanel svg { width: 62%; max-width: 220px; height: auto; align-self: center; margin: auto; filter: drop-shadow(14px 18px 22px var(--lo)) drop-shadow(-8px -8px 16px var(--hi)); }
.lockpanel .foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.lockpanel .live { width: 7px; height: 7px; display: inline-block; margin-right: 6px; vertical-align: 1px; box-shadow: none; }
.authcard .kicker { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 6px; }
.authcard h1 { font-size: 34px; line-height: 1.1; }
.authcard .codebox { font: 700 26px var(--f-num); letter-spacing: .45em; text-align: center; padding: 14px 10px 14px 22px; }
@media (max-width: 720px) {
  .auth .authcard { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
  .lockpanel { display: none; }
  .auth .authcard > form { padding: 28px 22px; }
  .authcard h1 { font-size: 28px; }
}

/* To order (0.12) */
.orderadd { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, .7fr) minmax(0, 1.4fr); gap: 12px; align-items: end; }
.orderadd .job { grid-column: 1; }
.orderadd .note { grid-column: 2 / 4; }
.orderadd .go { grid-column: 1 / -1; justify-self: end; }
.orderadd:not(:has(.job)) .note { grid-column: 1 / 3; }
.orderadd:not(:has(.job)) .go { grid-column: 3; }
.card .orderadd { margin-top: 10px; }
table.orders td { vertical-align: middle; }
table.orders tr.received td { opacity: .6; }
table.orders.compact td { padding: 8px 4px; }
.oedit { display: block; text-align: left; }
.oedit summary { text-align: right; }
.oedit[open] { min-width: 220px; }
.markbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; align-self: flex-start;
  background: var(--surface); padding: 10px 14px; border-radius: 16px; box-shadow: var(--raise); }
/* In narrow side columns (job/task pages) and on phones, stack the add form */
.split aside .orderadd, .side .orderadd { grid-template-columns: minmax(0, 1fr) minmax(0, .45fr); }
.split aside .orderadd .what, .side .orderadd .what { grid-column: 1 / -1; }
.split aside .orderadd .vendor, .side .orderadd .vendor { grid-column: 1 / -1; }
.split aside .orderadd .note, .side .orderadd .note, .split aside .orderadd .go, .side .orderadd .go { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .orderadd { grid-template-columns: minmax(0, 1fr) minmax(0, .45fr); }
  .orderadd .what, .orderadd .vendor, .orderadd .job, .orderadd .note, .orderadd .go { grid-column: 1 / -1; }
  .orderadd .go { justify-self: stretch; } .orderadd .go .btn { width: 100%; justify-content: center; }
}

/* Job page "⋯" menu (archive / delete) */
.jobmenu { position: relative; }
.jobmenu > summary { list-style: none; cursor: pointer; font-weight: 700; letter-spacing: .05em; }
.jobmenu > summary::-webkit-details-marker { display: none; }
.jobmenu .menu-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 250px; background: var(--surface);
  border-radius: 16px; box-shadow: var(--raise); padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.jobmenu .menu-pop form { margin: 0; }
.jobmenu .menu-pop .btn { width: 100%; justify-content: flex-start; }
.jobmenu .menu-pop p { margin: 6px 8px; }

/* Attendance fixes */
.fixshift { display: inline-block; text-align: left; }
.fixshift[open] { min-width: 270px; }
.fixshift summary { text-align: right; }
.editlog { display: block; }

/* ---- 0.12.3 layout fixes ---------------------------------------------------------------------------- */
/* Forms that open inside a row ("Edit", "Change", "Fix times"…) take the card's full width instead of pushing
   past its right edge; grid and form children may shrink below their content's natural width. */
.actions > details[open] { flex: 1 1 100%; min-width: 0; }
.grid > *, .form > *, form, fieldset, label { min-width: 0; }
.card { min-width: 0; }
fieldset { margin-inline: 0; }
input, select, textarea { max-width: 100%; }
.logins.edit input:not([type=checkbox]) { width: 100%; }

/* Wide pages (Dispatch): use the screen */
.content.wide { max-width: 1680px; }
/* Dispatch: the job list scrolls on its own beside the calendar, so any job can be dragged onto a day */
.js-dfind { width: 100%; }
@media (min-width: 901px) {
  .dispatch { grid-template-columns: 290px minmax(0, 1fr); }
  .dqueue { position: sticky; top: 74px; max-height: calc(100vh - 90px); overflow-y: auto; overscroll-behavior: contain;
    padding: 4px 12px 16px 4px; margin: -4px -12px 0 -4px; scrollbar-width: thin; }
  .dqueue .card { box-shadow: var(--raise-sm); }
  /* The calendar stays in view beside the list too (0.13.2): it scrolls inside its own box, day names stay on top */
  .dboard { position: sticky; top: 74px; }
  .dboard > .tablewrap { max-height: calc(100vh - 90px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .dboard .dgrid thead th { position: sticky; top: 0; z-index: 2; }
  .dboard .dgrid thead th:first-child { z-index: 3; }
}
.dcard[hidden] { display: none; }
/* A photo whose Edit is open takes the whole row of the grid */
.photo-grid figure:has(details[open]) { grid-column: 1 / -1; }
.photo-grid figure details[open] form { width: 100%; }
/* Filter buttons wrap on narrow screens */
.seg { flex-wrap: wrap; max-width: 100%; }
/* "To order" in narrow side columns: each line is a block, and its Change form gets the full width */
table.orders.compact, table.orders.compact tbody { display: block; width: 100%; }
table.orders.compact tr { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 8px; padding: 8px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 70%, transparent); }
table.orders.compact td { display: block; border: 0; padding: 0; }
table.orders.compact td:first-child { flex: 1 1 150px; min-width: 0; }
table.orders.compact td.r { flex: 0 0 auto; margin-left: auto; }
table.orders.compact td.r:has(details[open]) { flex-basis: 100%; }
table.orders.compact .oedit[open] { min-width: 0; }
@media (max-width: 720px) {
  table.orders:not(.compact) .oedit[open] { min-width: 0; }
  table.orders:not(.compact), table.orders:not(.compact) tbody { display: block; }
  table.orders:not(.compact) tr { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
  table.orders:not(.compact) td { display: block; border: 0; padding: 0; }
  table.orders:not(.compact) td:nth-child(2) { flex: 1 1 150px; min-width: 0; }
  table.orders:not(.compact) td.r { margin-left: auto; }
  table.orders:not(.compact) td.r:has(details[open]) { flex-basis: 100%; }
}

/* ---- Jobs: one compact list (0.12.4) ------------------------------------------------------------------ */
.joblist { display: flex; flex-direction: column; }
.jobrow { display: flex; flex-direction: column; gap: 3px; padding: 11px 18px; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 70%, transparent); }
.jobrow:last-child { border-bottom: 0; }
.jobrow:hover { background: color-mix(in srgb, var(--hi) 40%, transparent); text-decoration: none; }
.jobrow.urgent { box-shadow: inset 3px 0 0 var(--danger); }
.jobrow .l1 { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.jobrow .l1 .pill { margin-left: auto; flex: none; }
.jobrow .l1 .pill + .pill { margin-left: 0; }
.jnum { font-weight: 700; color: var(--accent); flex: none; }
.jtag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); flex: none; }
.jclient { font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jobrow .l2 { display: flex; align-items: baseline; gap: 6px 12px; font-size: 13.5px; color: var(--muted); min-width: 0; }
.jwhat { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); opacity: .85; }
.jmeta { flex: none; white-space: nowrap; }
.jmeta + .jmeta::before, .jwhat + .jmeta::before { content: "·"; margin-right: 10px; opacity: .6; }
.jmeta.late { color: var(--warn); font-weight: 600; }
.pill.stage-in_progress { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); box-shadow: none; }
.pill.stage-scheduled { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.pill.stage-completed { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.reqbox { gap: 6px; }
.reqrow { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; padding: 6px 0; color: var(--ink);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 70%, transparent); }
.reqrow:last-child { border-bottom: 0; }
@media (max-width: 720px) {
  .jobrow { padding: 10px 14px; }
  .jobrow .l2 { flex-wrap: wrap; }
  .jwhat { flex-basis: 100%; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .jwhat + .jmeta::before { content: none; }
  .jobactions { width: 100%; }
  .jobactions .iconbtn .lbl { display: none; }
  .jobactions .btn.primary { flex: 1; justify-content: center; }
}

/* ---- Dispatch: a color per technician (row + bookings), a stripe per job (0.12.4) ---------------------- */
:root {
  --p0: #2d6bc4; --p1: #c27c0e; --p2: #8a4a8f; --p3: #1d8a7c; --p4: #c0502a; --p5: #5f7d1f; --p6: #c2416b; --p7: #4f5bd5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --p0: #5b9cf0; --p1: #e0a23a; --p2: #c07fd0; --p3: #3cbfae; --p4: #e57a52; --p5: #9bbf4a; --p6: #ee6f97; --p7: #8c95ff;
  }
}
.dgrid tr.techrow > th.tech { background: color-mix(in srgb, var(--tc) 18%, var(--surface)); box-shadow: inset 4px 0 0 var(--tc); }
.dgrid tr.techrow > td { background: color-mix(in srgb, var(--tc) 7%, transparent); }
.dgrid tr.techrow > td.today { background: color-mix(in srgb, var(--tc) 12%, var(--accent-soft)); }
.dgrid tr.techrow .dchip { background: color-mix(in srgb, var(--tc) 24%, var(--surface)); border-left-width: 5px; }
.dgrid tr.techrow .dchip .dtime { color: color-mix(in srgb, var(--tc) 70%, var(--ink)); font-weight: 700; }
.tdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--tc); margin-right: 7px; vertical-align: 1px; }
.dgrid tr.techrow .dcell.over { background: color-mix(in srgb, var(--tc) 25%, transparent); }

/* Work notes card (0.13.0) */
.wnote-add { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.wnote-add textarea { width: 100%; min-height: 64px; resize: vertical; }
.wnote-add .actions { justify-content: space-between; align-items: center; gap: 8px; }
.wnotes { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; }
.wnote { padding: 10px 0; border-top: 1px solid color-mix(in srgb, var(--rule) 75%, transparent); min-width: 0; }
.wnotes > .wnote:first-child { border-top: 0; }
.wnote .who { font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
.wnote .txt { margin-top: 3px; overflow-wrap: anywhere; }
.wnote.pinned { background: var(--warn-soft); border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; border-top: 0; }
.wnote-act { display: flex; gap: 14px; margin-top: 4px; }
.wnote-more { margin-top: 6px; }
.wnote-more .wnotes { margin-top: 4px; }
/* Jobs list: latest note under each job */
.jobrow .l3 { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.jobrow .l3 b { font-weight: 600; color: var(--ink); opacity: .8; }
@media (max-width: 700px) { .jobrow .l3 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } }

/* How-to categories (0.13.1): empty ones are quieter; on a phone the row scrolls sideways */
.chip.empty { color: var(--muted); border-style: dashed; background: transparent; }
@media (max-width: 700px) {
  .howcats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .howcats .chip { flex: none; }
}
/* To order quick list (0.13.2): full width of the add form */
.orderadd .orderquick { grid-column: 1 / -1; }
.orderquick textarea { width: 100%; margin-top: 4px; }
/* Dispatch side list tabs (0.13.3) */
.dtabs { display: flex; width: 100%; }
.dtabs button { flex: 1 1 0; border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 8px 6px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.dtabs button[aria-selected="true"] { background: var(--surface); color: var(--accent); box-shadow: var(--raise-sm, 0 1px 3px rgba(0,0,0,.12)); }
.dtabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dqhead { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 901px) {
  .dqhead { position: sticky; top: -4px; z-index: 3; background: var(--bg); padding: 4px 0 8px; margin-top: -4px; }
}

/* ======================================================================================================
   Clean look (0.14): flat and sharp. A gray page with near-white panels, thin borders instead of shadows,
   small corners, a dark teal menu, and checkboxes that are always easy to see. One look for everyone
   (the page is pinned to light; the dark blocks above no longer apply). Overrides the soft look above.
   ====================================================================================================== */
:root {
  --bg: #d6dddb;
  --surface: #f4f7f6;
  --sunk: #e6ebea;
  --field: #ffffff;
  --rule: #bcc7c4;
  --line: #a9b6b3;               /* control borders */
  --ink: #131c1a;
  --muted: #485754;
  --faint: #6b7a77;
  --accent: #1d5e58;
  --accent-dark: #164a45;
  --accent-ink: #ffffff;
  --accent-soft: #d2e5e1;
  --menu: #1f4f49;
  --hi: transparent;
  --lo: transparent;
  --raise: none;
  --raise-sm: none;
  --press: none;
  --press-sm: none;
  --shadow: none;
  --pop: 0 6px 20px rgba(19, 28, 26, .16);   /* only for things that float: menus, popups */
  --radius: 8px;
  --r-ctl: 6px;
  color-scheme: light;
}
body { background: var(--bg); color: var(--ink); }

/* Menu: solid dark teal */
.rail { background: var(--menu); border-right: 0; box-shadow: none; }
.rail .brand, .rail .brand:hover { color: #fff; }
.rail .brand-mark { background: #fff; color: var(--menu); box-shadow: none; border-radius: 6px; }
.rail .nav a { color: #e9f4f2; border-radius: 6px; box-shadow: none; }
.rail .nav a:hover { background: rgba(255, 255, 255, .09); box-shadow: none; color: #fff; }
.rail .nav a.on { background: rgba(255, 255, 255, .17); color: #fff; box-shadow: inset 3px 0 0 #7fd3c6; }
.rail .nav .grp { color: #9fd0c8; opacity: 1; }
.rail .foot, .rail .foot a { color: #b9ddd7; }
.rail .foot a:hover { color: #fff; }
.rail hr, .rail .nav hr { border-color: rgba(255, 255, 255, .18); }
.topbar { background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: 1px solid var(--rule); }
.bell, .clockpill { box-shadow: none; border: 1px solid var(--line); background: var(--field); }
.bell:hover { background: var(--sunk); box-shadow: none; }

/* Panels: near-white with a thin border, no shadow */
.card, .sheet, .cal, .bcard, .ktile, .chip, .flash { background: var(--surface); border: 1px solid var(--rule); box-shadow: none; }
.card, .sheet, .cal { border-radius: var(--radius); }
.bcard, .ktile { border-radius: 6px; }
.col, .newjob, .jobdone, .lockpanel { background: var(--sunk); border: 1px solid var(--rule); box-shadow: none; border-radius: var(--radius); }
.billcard { box-shadow: inset 3px 0 0 var(--accent); }
.notebody, .fileicon, .kind, .qa-hint code { background: var(--sunk); box-shadow: none; }
.flash { border-radius: 6px; box-shadow: inset 4px 0 0 var(--accent); }
.flash.error { box-shadow: inset 4px 0 0 var(--danger); background: var(--surface); }
.notice { border-radius: 6px; }
.toast { border-radius: 6px; box-shadow: var(--pop); }

/* Fields: white with a visible border */
input, select, textarea { background: var(--field); border: 1px solid var(--line); border-radius: var(--r-ctl); box-shadow: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
input[type=file] { border: 0; background: none; }
input::placeholder, textarea::placeholder { color: #7d8a87; }

/* Checkboxes: a clear square box; teal with a white check when ticked */
input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 19px; height: 19px; flex: none; margin: 0; padding: 0;
  border: 2px solid #6f7f7c; border-radius: 4px; background: var(--field); display: inline-grid; place-content: center;
  cursor: pointer; box-shadow: none; vertical-align: middle; }
input[type=checkbox]:hover { border-color: var(--accent); }
input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:checked::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0;
  transform: translate(0, -1px) rotate(45deg); }
input[type=checkbox]:disabled { opacity: .5; cursor: default; }
input[type=radio] { accent-color: var(--accent); box-shadow: none; }
/* Task circles */
.check-btn { width: 21px; height: 21px; border: 2px solid #6f7f7c; background: var(--field); box-shadow: none; }
.check-btn:hover { border-color: var(--accent); }
.check-btn:hover::after { color: var(--accent); }
.task.done .check-btn { background: var(--accent); border-color: var(--accent); box-shadow: none; }
.task.done .check-btn::after { color: #fff; }

/* Buttons: flat */
.btn { background: var(--field); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-ctl); box-shadow: none; }
.btn:hover { background: var(--sunk); box-shadow: none; }
.btn:active { box-shadow: none; transform: none; background: #dbe2e0; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: none; }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); filter: none; }
.btn.primary:active { background: var(--accent-dark); box-shadow: none; }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--sunk); box-shadow: none; }
.btn.sm { border-radius: 5px; }
.btn.danger { color: var(--danger); }
.bigbtn { border-radius: var(--radius); }

/* Segmented filters and tabs: a bordered strip, the current one white */
.seg, .tabs { background: var(--sunk); border: 1px solid var(--rule); box-shadow: none; border-radius: var(--r-ctl); padding: 3px; }
.seg a, .tabs a { border-radius: 4px; }
.seg a.on, .tabs a.on { background: var(--field); color: var(--accent); box-shadow: 0 0 0 1px var(--rule); font-weight: 650; }
.dtabs button { border-radius: 4px; }
.dtabs button[aria-selected="true"] { background: var(--field); box-shadow: 0 0 0 1px var(--rule); }
.stagebar .btn[aria-pressed="true"] { box-shadow: none; }

/* Lists */
table.list th { color: var(--muted); opacity: 1; }
table.list td { border-bottom-color: var(--rule); }
table.list tr:hover td { background: var(--sunk); }
.task, .entry, .entry-day, .comment, .filerow, .daygroup h3, .wnote { border-color: var(--rule); }
.pill { background: var(--sunk); box-shadow: none; border: 1px solid var(--rule); }
.pill.ok { background: var(--accent-soft); border-color: transparent; }
.pill.warn, .pill.bad, .urg-urgent, .urg-emergency { border-color: transparent; }

/* On/off switch */
.switch input { background: #b6c2bf; box-shadow: none; }
.switch input::after { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.switch input:checked { background: var(--accent); box-shadow: none; }

/* Things that float keep a light shadow so they stand out */
.dpop, .scanner-box, .menu-pop, details.more > :not(summary) { box-shadow: var(--pop); }
.scanner-view { box-shadow: none; }

/* Sign-in page */
.auth .authcard { box-shadow: none; border: 1px solid var(--rule); border-radius: 10px; }
.lockpanel { margin: 14px; }
.lockpanel svg { filter: none; }

/* Phone */
@media (max-width: 860px) {
  .tabbar { background: var(--surface); border-top: 1px solid var(--rule); box-shadow: none; }
  .tabbar a.on svg { filter: none; }
  .card { border-radius: var(--radius); box-shadow: none; }
}
.rail .foot, .rail .foot a, .rail .foot .linkbtn, .rail .foot .faint { color: #b9ddd7; }
.rail .foot a:hover, .rail .foot .linkbtn:hover { color: #fff; }

/* Vendors and brands (0.15) */
.vendgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.vendcard { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; }
.vendcard:hover { border-color: var(--accent); text-decoration: none; }
.vendcard h2 { margin: 0; color: var(--accent); }
.vbrands { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; align-items: center; }
.vbrands .chip, .bvend .chip { font-size: 12px; padding: 2px 8px; }
.brandrow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto; gap: 6px 14px; align-items: center;
  padding: 9px 16px; border-top: 1px solid var(--rule); }
.card:not(.flush) .brandrow { padding: 8px 0; }
.card .brandrow:first-of-type { border-top: 0; }
.brandrow .bname { font-weight: 650; min-width: 0; overflow-wrap: anywhere; }
.bvend { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.blink { font-size: 13px; white-space: nowrap; }
.letters { display: flex; flex-wrap: wrap; gap: 2px; padding: 10px 12px; border-bottom: 1px solid var(--rule); position: sticky; top: 66px; background: var(--surface); z-index: 2; }
.letters a { min-width: 28px; text-align: center; padding: 4px 6px; border-radius: 4px; font-weight: 650; }
.letters a:hover { background: var(--sunk); text-decoration: none; }
.letterhead { margin: 0; padding: 10px 16px 4px; font-size: 13px; color: var(--accent); background: var(--sunk); border-top: 1px solid var(--rule); }
.chipwrap { display: inline-flex; align-items: center; }
.chipx { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 15px; padding: 0 4px 0 2px; line-height: 1; }
.chipx:hover { color: var(--danger); }
.branch { padding: 8px 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 2px; }
.card .branch:first-of-type { border-top: 0; padding-top: 2px; }
.branchform { gap: 8px; margin-top: 8px; }
@media (max-width: 700px) {
  .brandrow { grid-template-columns: minmax(0, 1fr) auto; }
  .brandrow .bvend { grid-column: 1 / -1; order: 3; }
  .letters { top: 0; }
}
@media (hover: hover) { .chipx { opacity: 0; } .chipwrap:hover .chipx, .chipx:focus-visible { opacity: 1; } }

/* Job picker (0.15.1) */
.jp-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.jp-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; font: inherit; color: var(--ink);
  background: var(--field); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 38px 10px 12px; min-height: 48px; cursor: pointer;
  position: relative; }
.jp-btn::after { content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0;
  transform: translateY(-70%) rotate(45deg); }
.jp-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.jp-ph { color: #7d8a87; }
.jp-client { font-weight: 650; font-size: 16px; line-height: 1.3; }
.jp-what { font-size: 14px; color: var(--muted); line-height: 1.35; }
.jp-where { font-size: 13px; color: var(--faint); }
.jp-sheet { position: fixed; inset: 0; z-index: 200; background: rgba(19, 28, 26, .45); display: flex; align-items: center; justify-content: center; padding: 24px; }
.jp-sheet[hidden] { display: none; }
.jp-panel { background: var(--surface); width: min(560px, 100%); max-height: min(720px, 86vh); display: flex; flex-direction: column;
  border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--pop); overflow: hidden; }
.jp-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 6px 16px; font-size: 17px; }
.jp-close { border: 0; background: none; font-size: 28px; line-height: 1; width: 44px; height: 44px; cursor: pointer; color: var(--muted); }
.jp-find { margin: 0 12px 10px; width: calc(100% - 24px); min-height: 44px; font-size: 16px; }
.jp-list { overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--rule); }
.jp-group { position: sticky; top: 0; z-index: 1; background: var(--sunk); color: var(--accent); font-weight: 700; font-size: 13px;
  padding: 7px 16px; border-bottom: 1px solid var(--rule); }
.jp-row { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: none;
  border: 0; border-bottom: 1px solid var(--rule); padding: 11px 16px; min-height: 58px; cursor: pointer; }
.jp-row:hover { background: var(--sunk); }
.jp-row.on { background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent); }
.jp-new { color: var(--accent); font-weight: 650; min-height: 50px; justify-content: center; }
.jp-none { padding: 16px; margin: 0; }
body.jp-open { overflow: hidden; }
@media (max-width: 700px) {
  .jp-sheet { padding: 0; align-items: stretch; }
  .jp-panel { width: 100%; max-height: none; height: 100%; border-radius: 0; border: 0;
    padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
}
