/* Nucleus Service Path — Nucleus colors (teal, cyan, navy). Phone first. */
:root {
  color-scheme: light;
  --brand: #0e7490; --brand-2: #0b7f9c; --brand-3: #e3f6fa; --brand-ink: #ffffff;
  --accent: #d97706;
  --bg: #f4f7fa; --surface: #ffffff; --surface-2: #eef3f7; --line: #dde3ea; --line-2: #e8edf2;
  --ink: #0f172a; --ink-2: #3b4a5a; --ink-3: #5b6777;
  --good: #0f7a3d; --good-bg: #e2f4e8; --warn: #9a5b00; --warn-bg: #fdf1dc; --bad: #b42318; --bad-bg: #fde8e6; --info-bg: #e7f0fb; --info: #1d4f91;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a;
  --chart-grid: #e4e9ef; --chart-surface: #fcfcfb;
  --radius: 12px; --radius-s: 8px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 14px rgba(15,23,42,.06);
  --tap: 44px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand: #22d3ee; --brand-2: #67e8f9; --brand-3: #0e3a4f; --brand-ink: #07131c;
    --bg: #07131c; --surface: #0c1f2c; --surface-2: #123044; --line: #1d3b52; --line-2: #16304a;
    --ink: #e6eef5; --ink-2: #b8c7d4; --ink-3: #8da0b3;
    --good: #5fd08f; --good-bg: #173326; --warn: #f2b74f; --warn-bg: #352812; --bad: #ff8a80; --bad-bg: #3a1c1a; --info-bg: #182a40; --info: #9cc3f5;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70;
    --chart-grid: #1d3346; --chart-surface: #0c1a26;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] { color-scheme: dark; --brand: #22d3ee; --brand-2: #67e8f9; --brand-3: #0e3a4f; --brand-ink: #07131c; --bg: #07131c; --surface: #0c1f2c; --surface-2: #123044; --line: #1d3b52; --line-2: #16304a; --ink: #e6eef5; --ink-2: #b8c7d4; --ink-3: #8da0b3; --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --chart-grid: #1d3346; --chart-surface: #0c1a26; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--font); overflow-x: hidden; }
a { color: var(--brand-2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--ink-3); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; min-height: var(--tap); padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 15px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--brand-2); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-2); }
.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { min-height: 34px; padding: 0 10px; font-size: 14px; }
.btn.big { min-height: 56px; font-size: 17px; padding: 0 22px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
label { display: block; font-weight: 600; font-size: 14px; color: var(--ink-2); margin: 0 0 4px; }
input, select, textarea { width: 100%; min-height: var(--tap); padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 16px var(--font); }
textarea { min-height: 84px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; min-height: 0; accent-color: var(--brand); vertical-align: middle; }
.field { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; }
.chip-toggle input { width: 18px; height: 18px; }
.chip-toggle:has(input:checked) { background: var(--brand-3); border-color: var(--brand-2); }

/* ---------- shell ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); min-height: 58px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: -.01em; }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand .brand-mark { width: 40px; height: auto; flex: none; display: block; }
/* Full-name logo (road runs through the whole name); mark only on phones */
.brand .lk { display: block; flex: none; }
.brand .lk img { height: 42px; width: auto; display: block; }
.brand .lk-dark { display: none !important; }
.brand .lk-mark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand .lk-light { display: none !important; } :root:not([data-theme="light"]) .brand .lk-dark { display: block !important; } }
:root[data-theme="dark"] .brand .lk-light { display: none !important; }
:root[data-theme="dark"] .brand .lk-dark { display: block !important; }
@media (max-width: 640px) { .topbar .brand .lk { display: none; } .topbar .brand .lk-mark { display: block; } .landing .topbar .brand .lk { display: block; } .landing .topbar .brand .lk img { height: 30px; } .landing .topbar .brand .lk-mark { display: none; } }
.tagline { text-align: center; color: var(--ink-2); font-weight: 600; font-size: 14px; margin: -6px 0 16px; }
.owner-sub { margin-top: 0 !important; }
.brand .sub { font-weight: 600; color: var(--ink-3); font-size: 13px; display: block; margin-top: -2px; }
.co-badge { display: flex; align-items: center; gap: 8px; margin-left: 6px; padding-left: 12px; border-left: 1px solid var(--line); min-width: 0; }
.co-badge img { height: 44px; width: 44px; object-fit: contain; border-radius: 6px; background: #fff; }
.co-badge span { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.topbar .spacer { flex: 1; }
.topnav { display: flex; gap: 2px; }
.topnav a { padding: 8px 10px; white-space: nowrap; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.topnav a.active { background: var(--brand-3); color: var(--brand); }
.bottomnav { display: none; }
.dev-chip { font-size: 12px; font-weight: 700; background: var(--warn-bg); color: var(--warn); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
main { max-width: 1480px; margin: 0 auto; padding: 18px 16px 90px; }
@media (max-width: 900px) {
  .topnav { display: none; }
  .co-badge span { max-width: 38vw; }
  .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58px; font-size: 12px; font-weight: 700; color: var(--ink-3); text-decoration: none; gap: 2px; }
  .bottomnav a svg { width: 22px; height: 22px; }
  .bottomnav a.active { color: var(--brand); }
  main { padding: 14px 16px 96px; }
}
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.page-head h1 { margin: 0; }
.page-head .spacer { flex: 1; }

/* ---------- cards, tiles, badges ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.stack > * + * { margin-top: 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.tile .k { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.tile .v { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.tile .d { font-size: 13px; font-weight: 600; }
.tile .d.better { color: var(--good); } .tile .d.worse { color: var(--bad); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.good { background: var(--good-bg); color: var(--good); } .badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.info { background: var(--info-bg); color: var(--info); }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--info-bg); color: var(--info); font-weight: 600; margin-bottom: 12px; }
.notice.warn { background: var(--warn-bg); color: var(--warn); } .notice.bad { background: var(--bad-bg); color: var(--bad); } .notice.good { background: var(--good-bg); color: var(--good); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl th { font-size: 12.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; max-width: 100%; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }

/* ---------- toast, modal ---------- */
#toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: 84px; display: flex; flex-direction: column; gap: 8px; width: min(520px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); }
.toast.bad { background: var(--bad); color: #fff; }
.modal-back { position: fixed; inset: 0; z-index: 90; background: rgba(10,20,17,.45); display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--surface); width: min(560px, 100vw); max-height: 90vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 18px 16px 24px; }
@media (min-width: 700px) { .modal-back { align-items: center; } .modal { border-radius: 16px; } }

/* ---------- sign-in ---------- */
.signin { max-width: 400px; margin: 8vh auto 0; }
.signin .brand { justify-content: center; font-size: 1.3rem; margin-bottom: 18px; }
.signin .brand svg { width: 44px; height: 44px; }
.signin .brand .lk img { height: auto; width: min(100%, 300px); }

/* ---------- month board ---------- */
.board-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .board-wrap { grid-template-columns: 1fr; } }
.board { overflow-x: auto; }
.board table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 640px; }
.board th { position: sticky; top: 0; background: var(--surface-2); z-index: 2; padding: 8px; font-size: 14px; text-align: left; border-bottom: 1px solid var(--line); }
.board td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); padding: 6px; vertical-align: top; background: var(--surface); }
.board td.date { width: 96px; font-weight: 700; font-size: 14px; background: var(--surface-2); }
.board td.date .dow { display: block; color: var(--ink-3); font-weight: 600; font-size: 12.5px; }
.board td.date.weekend { opacity: .7; }
.cell { min-height: 54px; border-radius: 8px; padding: 2px; transition: background .15s; }
.cell.drop { background: var(--brand-3); outline: 2px dashed var(--brand-2); }
.cell-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 4px; }
.cell-head a { font-weight: 700; color: var(--ink); text-decoration: none; }
.cell-head .over { color: var(--bad); font-weight: 700; }
.fill { height: 4px; background: var(--line-2); border-radius: 4px; overflow: hidden; margin-bottom: 4px; }
.fill > i { display: block; height: 100%; background: var(--brand-2); border-radius: 4px; }
.fill > i.hot { background: var(--accent); }
.stopchip { display: flex; align-items: center; gap: 4px; padding: 3px 6px; margin: 2px 0; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 12.5px; cursor: grab; user-select: none; min-height: 28px; }
.stopchip:hover { border-color: var(--brand-2); }
.stopchip .n { font-weight: 800; color: var(--ink-3); min-width: 14px; }
.stopchip .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stopchip .lock { font-size: 11px; }
.stopchip.done { opacity: .55; text-decoration: line-through; }
.stopchip.dragging { opacity: .4; }
.stopchip.insert-before { box-shadow: 0 -3px 0 var(--brand-2); }
.side-list .stopchip { background: var(--warn-bg); }
.daylist .day { border-top: 1px solid var(--line); padding: 10px 0; }

/* ---------- day route ---------- */
.route-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .route-wrap { grid-template-columns: 1fr; } }
.mapbox { position: relative; height: 520px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
@media (max-width: 1000px) { .mapbox { height: 300px; } }
.map-note { position: absolute; z-index: 500; left: 8px; bottom: 8px; background: var(--surface); color: var(--ink-2); font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); }
.svgmap { width: 100%; height: 100%; display: block; }
.stop { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: start; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stop .num { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; }
.stop .t { font-weight: 800; }
.stop .addr { color: var(--ink-2); font-size: 14px; }
.stop .svc { font-size: 13.5px; color: var(--ink-3); }
.stop .acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-content: flex-start; max-width: 230px; }
@media (max-width: 640px) { .stop { grid-template-columns: 40px 1fr; } .stop .acts { grid-column: 1 / -1; max-width: none; justify-content: flex-start; } }
.leg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 12px 6px 28px; font-size: 13.5px; color: var(--ink-2); border-left: 3px dotted var(--line); margin-left: 28px; }
.leg .tr { color: var(--warn); font-weight: 700; }
.places { width: 100%; }
.place { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.place .nm { flex: 1; }

/* ---------- today (tech) ---------- */
.today { max-width: 640px; margin: 0 auto; }
.next { border: 2px solid var(--brand-2); }
.next .who { font-size: 1.35rem; font-weight: 800; }
.next .eta { font-size: 15px; font-weight: 700; color: var(--brand); }
.info-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.big-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.big-actions .btn { width: 100%; }
.big-actions .full { grid-column: 1 / -1; }
.queue-bar { position: sticky; top: 58px; z-index: 5; }
.mini-stop { display: flex; gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line-2); }
.mini-stop .n { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex: none; }
.mini-stop.done .n { background: var(--good-bg); color: var(--good); }
.mini-stop.skipped .n { background: var(--warn-bg); color: var(--warn); }
.mini-stop .nm { flex: 1; min-width: 0; }

/* ---------- import ---------- */
.drop-zone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 36px 16px; text-align: center; background: var(--surface); cursor: pointer; }
.drop-zone.over { border-color: var(--brand-2); background: var(--brand-3); }
.map-table td { vertical-align: middle; }
.map-table select { min-height: 38px; padding: 4px 8px; font-size: 14px; }
.map-table .sample { color: var(--ink-3); font-size: 13px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 12px; background: var(--line-2); border-radius: 12px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand-2); width: 0; transition: width .2s; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.steps span { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-3); font-size: 13px; font-weight: 700; }
.steps span.on { background: var(--brand); color: var(--brand-ink); }

/* ---------- charts ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .axis text, .chart text { fill: var(--ink-3); font: 12px var(--font); }
.chart .lbl { fill: var(--ink); font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--ink-2); margin: 4px 0 8px; }
.tip { position: fixed; z-index: 120; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 8px; padding: 6px 10px; font-size: 13px; }

/* ---------- list rows ---------- */
.row-list .row { display: flex; gap: 10px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
.row-list .row:hover { background: var(--surface-2); }
.row-list .row .main { flex: 1; min-width: 0; }
.row-list .row .main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-list .row .main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wizard-steps { counter-reset: s; }
.offline-banner { background: var(--warn-bg); color: var(--warn); font-weight: 700; text-align: center; padding: 6px; font-size: 14px; }

/* ---------- phone polish ---------- */
.brand > span { white-space: nowrap; }
.big-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.big-actions .btn { white-space: normal; min-width: 0; text-align: center; line-height: 1.2; }
.today .page-head { flex-wrap: nowrap; }
.today .page-head > div { flex: 1; min-width: 0; }
@media (max-width: 560px) {
  .dev-chip { display: none; }
  .topbar { gap: 8px; }
  .co-badge { padding-left: 8px; margin-left: 2px; }
  .co-badge img { height: 32px; width: 32px; }
  .page-head h1 { font-size: 1.3rem; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* text-style button (Forgot password?, Back) */
.linkish { background: none; border: 0; padding: 6px 4px; color: var(--brand-2); font: 600 15px var(--font); text-decoration: underline; cursor: pointer; min-height: 0; }
.linkish:hover { color: var(--brand); }

/* ---------- Map page (accounts + tech areas) ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.seg a { padding: 8px 14px; font-weight: 700; font-size: 14px; color: var(--ink-2); text-decoration: none; min-height: 38px; display: inline-flex; align-items: center; }
.seg a.on { background: var(--brand); color: var(--brand-ink); }
.map-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.map-tools input[type=search] { flex: 1 1 260px; min-width: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 10px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.map-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i, .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; vertical-align: middle; }
.map-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.mapbox.map-big { height: calc(100vh - 230px); min-height: 460px; }
.map-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; max-height: calc(100vh - 230px); overflow: auto; }
.map-side .card { margin: 0; }
.map-count { font-weight: 700; color: var(--ink-2); font-size: 14px; }
.map-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.map-list .map-row { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line-2); font: inherit; cursor: pointer; }
.map-list .map-row.on { background: var(--brand-3); }
.map-side .row .main small { white-space: normal; }
.map-card-head { display: flex; align-items: flex-start; gap: 8px; }
.map-card-head h2 { flex: 1; margin: 0; font-size: 1.1rem; }
.svc-list { margin: 6px 0 10px; padding-left: 18px; }
.svgmap-zoom { position: absolute; right: 8px; top: 8px; z-index: 500; display: flex; flex-direction: column; gap: 4px; }
.svgmap-zoom .btn { width: 36px; padding: 0; font-size: 18px; }
@media (max-width: 1000px) {
  .map-split { grid-template-columns: 1fr; }
  .mapbox.map-big { height: 58vh; min-height: 320px; }
  .map-side { max-height: none; overflow: visible; }
  .map-list { max-height: 50vh; overflow: auto; }
}

/* seats (logins page + owner) */
.seat { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); }
.seat span { color: var(--ink-2); font-weight: 600; }
.seat .fill { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.seat .fill i { display: block; height: 100%; background: var(--brand-2); border-radius: 4px; }
.seat.full { border-color: var(--warn); }
.seat.full .fill i { background: var(--warn); }
.price-box { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; background: var(--surface-2); }
.price-box .big { font-size: 1.4rem; font-weight: 800; }

/* ======================================================================
   Top bar, Nucleus style: row 1 = logos + Refresh + Company ▾ + you ▾,
   row 2 = quick buttons (white letters outlined in red, cyan ring) + big red "New ▾" + Menu ▾
   ====================================================================== */
#topbar.topbar { display: block; padding: 0; min-height: 0; box-shadow: 0 2px 10px rgba(7,19,28,.12); }
.tb-row1 { display: flex; align-items: center; gap: 10px; padding: 8px 16px; min-height: 60px; }
.co-badge .co-lines { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.co-badge .co-name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.co-badge .co-sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.tb-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 700 14px var(--font); cursor: pointer; white-space: nowrap; }
.tb-btn:hover, .tb-btn[aria-expanded="true"] { border-color: var(--brand-2); background: var(--brand-3); }
.tb-btn .tb-ic svg { width: 18px; height: 18px; display: block; }
.tb-btn .caret { font-size: 11px; color: var(--ink-3); }
.tb-btn.spin .tb-ic svg { animation: tbspin .8s linear infinite; }
@keyframes tbspin { to { transform: rotate(360deg); } }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: 12px; font-weight: 800; }
.tb-user { padding-left: 6px; }

.qbar { display: flex; align-items: center; gap: 8px; padding: 8px 16px 10px; background: linear-gradient(180deg, #0b2233 0%, #07131c 100%); border-top: 1px solid #12324a; overflow-x: auto; scrollbar-width: none; }
.qbar::-webkit-scrollbar { display: none; }
.qbar .spacer { flex: 1; }
.tfs { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 14px; border-radius: 11px; border: 2.5px solid #2bd0dd; background: linear-gradient(180deg, #16384d 0%, #0a1c29 100%); box-shadow: 0 0 10px rgba(43,208,221,.35), inset 0 1px 0 rgba(255,255,255,.08); color: #fff; text-decoration: none; cursor: pointer; white-space: nowrap; flex: none; font: 900 15px/1 "Arial Black", "Segoe UI Black", system-ui, sans-serif; letter-spacing: .02em; text-transform: uppercase; }
.tfs:hover { box-shadow: 0 0 16px rgba(43,208,221,.6); }
.tfs.active { background: linear-gradient(180deg, #1d5b74 0%, #0e3348 100%); box-shadow: 0 0 18px rgba(43,208,221,.75); }
.tfs .tfs-ic svg { width: 19px; height: 19px; display: block; color: #9cf0f7; }
.tfs-t { color: #fff; -webkit-text-stroke: 1.2px #e11d2e; paint-order: stroke fill; text-shadow: 0 1px 0 rgba(0,0,0,.35); }
.tfs-chip { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: #2bd0dd; color: #07131c; font: 900 11px var(--font); }
.tfs-big { min-height: 48px; padding: 0 18px; border-color: #fff; background: linear-gradient(180deg, #ef3b45 0%, #b91c26 100%); box-shadow: 0 0 14px rgba(239,59,69,.55); font-size: 18px; }
.tfs-big:hover { box-shadow: 0 0 20px rgba(239,59,69,.8); }
.tfs-big .tfs-ic svg { color: #fff; width: 22px; height: 22px; }
.tfs-big .tfs-t { -webkit-text-stroke: 1.2px #7f0d14; }
.tfs-big .tfs-chip { background: #fff; color: #b91c26; }
.nav-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #f59e0b; color: #1a1205; font: 800 12px var(--font); margin-left: auto; }
.tfs .nav-badge { position: absolute; top: -8px; right: -6px; margin: 0; }

.dd-panel { position: fixed; z-index: 200; min-width: 250px; max-width: calc(100vw - 16px); overflow: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(7,19,28,.28); padding: 6px; }
.dd-head { padding: 8px 10px 4px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.dd-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: 600 15px var(--font); text-decoration: none; cursor: pointer; text-align: left; }
.dd-item:hover, .dd-item:focus-visible { background: var(--brand-3); }
.dd-ic svg { width: 19px; height: 19px; display: block; color: var(--brand); }
.dd-l { flex: 1; }
.dd-who { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.dd-foot { padding: 8px 10px 4px; margin-top: 4px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--ink-3); }
.bottomnav, .topnav { display: none !important; }
main { padding-bottom: 40px; }

@media (max-width: 1100px) {
  .tfs { padding: 0 11px; font-size: 13px; min-height: 40px; }
  .tfs-big { font-size: 15px; min-height: 44px; }
}
@media (max-width: 900px) { main { padding-bottom: 40px; } }
/* phones: icon-only quick buttons (the big red New keeps its word), labels for logo buttons hidden */
@media (max-width: 700px) {
  .tb-row1 { padding: 6px 12px; gap: 6px; min-height: 54px; }
  .tb-btn { padding: 0 9px; min-height: 40px; }
  .tb-btn .tb-l, .tb-btn .caret { display: none; }
  .tb-user { padding: 0 6px; }
  .co-badge .co-name, .co-badge .co-sub { max-width: 34vw; }
  .qbar { padding: 7px 10px 9px; gap: 6px; }
  .tfs { padding: 0; width: 40px; min-height: 40px; justify-content: center; border-width: 2px; }
  #pro-menu { display: none; } /* its pages are in Menu ▾ on phones */
  .tfs-big { min-height: 42px; }
  .tfs .tfs-t, .tfs .tfs-chip { display: none; }
  .tfs .tfs-ic svg { width: 21px; height: 21px; }
  .tfs-big { width: auto; padding: 0 12px; }
  .tfs-big .tfs-t { display: inline; font-size: 15px; }
  .qbar .spacer { flex: 1 0 0; min-width: 0; }
}

/* small (i) help buttons */
.info-btn { display: inline-grid; place-items: center; width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0 2px; vertical-align: middle; border-radius: 50%; border: 1.5px solid var(--brand-2); background: var(--surface); color: var(--brand); font: italic 800 12px/1 Georgia, "Times New Roman", serif; cursor: pointer; position: relative; flex: none; }
.info-btn::after { content: ""; position: absolute; inset: -12px; } /* bigger tap target */
.info-btn:hover, .info-btn[aria-expanded="true"] { background: var(--brand); color: var(--brand-ink); }
.info-tip { position: absolute; z-index: 300; background: var(--ink); color: var(--surface); border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.4; box-shadow: 0 10px 30px rgba(7,19,28,.3); }
.info-tip b { display: block; margin-bottom: 3px; }
.with-info { display: flex; align-items: center; gap: 4px; }

/* documents (estimates, reports, training files) on screen and in print */
.doc-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding-bottom: 12px; border-bottom: 2px solid var(--brand); margin-bottom: 14px; }
.doc-logo { max-height: 72px; max-width: 160px; object-fit: contain; }
.doc-co { font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.doc-co-name { font-size: 17px; font-weight: 800; color: var(--ink); }
.doc-lic { font-weight: 700; }
.doc-title { text-align: right; }
.doc-title-main { font-size: 18px; font-weight: 800; }
.doc-title-meta { font-size: 13px; color: var(--ink-3); }
@media (max-width: 560px) { .doc-head { grid-template-columns: auto 1fr; } .doc-title { grid-column: 1 / -1; text-align: left; } }
.print-holder { display: none; }
@media print {
  body.printing > *:not(.print-holder) { display: none !important; }
  body.printing .print-holder { display: block !important; }
  body.printing { background: #fff !important; color: #000 !important; }
  .topbar, .qbar, #toasts, .info-btn { display: none !important; }
}

/* map level picker (Settings) */
.level-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.level-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; min-height: 120px; }
.level-card:hover { border-color: var(--brand-2); }
.level-card.on { border-color: var(--brand); background: var(--brand-3); }
.level-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.level-top b { font-size: 16px; }
.level-about { font-size: 14px; color: var(--ink-2); flex: 1; }
.level-price { font-weight: 800; font-size: 14px; color: var(--brand); }
@media (max-width: 760px) { .level-grid { grid-template-columns: 1fr; } .level-card { min-height: 0; } }
/* while a sheet/modal is open, toasts move to the top so they never cover its buttons */
body:has(.modal-back) #toasts { top: 12px; bottom: auto; }
/* day start / end points (route page) */
.day-points { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.day-points .tag { margin-left: 6px; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--brand-3); color: var(--brand); font-weight: 700; }
.day-points .btn { margin-left: auto; }
.end-custom { margin-top: 6px; }
/* Today: download for offline */
.offline-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 12px; }
/* Growth & hiring */
.gr-head { display: grid; gap: 10px; padding: 14px 16px; margin: 0 0 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.gr-head.bad { border-color: #dc2626; } .gr-head.warn { border-color: #d97706; } .gr-head.good { border-color: #16a34a; }
.gr-meter { position: relative; height: 18px; border-radius: 999px; background: var(--surface-2); overflow: visible; }
.gr-meter.small { height: 10px; }
.gr-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--brand); }
.gr-head.bad .gr-fill { background: #dc2626; } .gr-head.warn .gr-fill { background: #d97706; }
.gr-target, .gr-alert { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; background: var(--ink); transform: translateX(-1px); }
.gr-alert { background: #dc2626; }
.gr-ok { color: #15803d; font-weight: 700; } .gr-no { color: #dc2626; font-weight: 700; } .gr-warn { color: #b45309; }
.gr-hot td { background: color-mix(in srgb, #f59e0b 14%, transparent); }
.gr-goal-out p { margin: 4px 0 10px; }
#scale-card input[type=range] { width: 100%; }
/* Settings → day-before reminder emails */
.rem-text { white-space: pre-wrap; background: var(--surface-2); padding: 12px; border-radius: 8px; font: inherit; font-size: 14px; max-height: 50vh; overflow: auto; margin: 10px 0; }
#reminders-card .notice { margin-bottom: 12px; }
#rem-table td:last-child { white-space: nowrap; }
@media (max-width: 600px) { #rem-table th:nth-child(2), #rem-table td:nth-child(2) { display: none; } }
/* Terms + data agreement (accept in the app) */
.lg-modal { max-width: 760px; }
.lg-box { max-height: 42vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--surface-2); margin: 10px 0 14px; }
.lg-doc h3 { margin: 6px 0 0; font-size: 1.02rem; } .lg-doc h4 { margin: 12px 0 2px; font-size: .95rem; } .lg-doc p { margin: 0 0 6px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.lg-doc + .lg-doc { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 8px; }
.lg-check { align-items: flex-start; border-radius: 12px; padding: 8px 12px; min-height: 0; line-height: 1.4; font-weight: 600; }
.lg-check input { margin-top: 2px; flex: none; }
.co-legal { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 0 6px 10px; }
/* ---------- Overview (efficiency, look-ahead, post-it board) ---------- */
.ov-hello { font-weight: 600; }
.seg button { padding: 8px 14px; font-weight: 700; font-size: 14px; color: var(--ink-2); background: none; border: 0; min-height: 38px; cursor: pointer; }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.ov-eff-head, .ov-la-head, .ov-board-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ov-eff-head h2, .ov-la-head h2, .ov-board-head h2 { margin: 0; font-size: 1.1rem; }
.ov-datenav { display: flex; align-items: center; gap: 6px; }
.ov-range { font-weight: 700; min-width: 120px; text-align: center; }
.ov-la, .ov-board { margin-top: 14px; }
.ov-techs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ov-tech { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); display: grid; gap: 6px; align-content: start; }
.ov-tech.off { background: var(--surface-2); }
.ov-tech-h { display: flex; align-items: center; gap: 8px; }
.ov-line { font-size: 15px; }
.ov-sub, .ov-status { font-size: 13px; color: var(--ink-2); }
.ov-warn { font-size: 13px; font-weight: 700; color: var(--warn); }
.ov-meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ov-meter i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.ov-meter.over i { background: var(--warn); }
.ov-stops summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--brand); padding: 4px 0; }
.ov-stops ol { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.ov-stops li { display: grid; grid-template-columns: 64px 1fr auto; gap: 8px; align-items: baseline; font-size: 13.5px; padding: 5px 0; border-top: 1px solid var(--line-2); }
.ov-stops li small { display: block; color: var(--ink-3); }
.ov-stops .ov-t { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ov-stops .ov-s { font-size: 12px; font-weight: 700; white-space: nowrap; }
.ov-stops li.st-done .ov-s { color: var(--good); } .ov-stops li.st-skipped .ov-s { color: var(--bad); } .ov-stops li.st-in_progress .ov-s { color: var(--info); }
.ov-stops li.st-done .ov-c, .ov-stops li.st-skipped .ov-c { color: var(--ink-3); }
/* week grid: how full each day is — one hue, light to dark; over 100% uses the warning colour plus ⚠ */
.ov-week { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 640px; }
.ov-week th { font-size: 13px; text-align: left; font-weight: 700; color: var(--ink-2); padding: 4px 6px; white-space: nowrap; }
.ov-week thead th { text-align: center; } .ov-week thead th small { display: block; font-weight: 600; color: var(--ink-3); }
.ov-week thead th.is-today { color: var(--brand); }
.ov-week tbody th .dot { margin-right: 6px; }
.ov-cell { border-radius: 8px; text-align: center; padding: 0; height: 48px; }
.ov-cell button { width: 100%; height: 100%; min-height: 48px; border: 0; background: none; color: inherit; cursor: pointer; display: grid; place-content: center; gap: 1px; font: inherit; border-radius: 8px; }
.ov-cell button:hover, .ov-cell button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.ov-cell b { font-size: 15px; } .ov-cell small { font-size: 12px; font-weight: 600; }
.ov-cell.off { background: var(--surface-2); font-size: 13px; vertical-align: middle; }
.ov-cell.h0 { background: var(--surface-2); color: var(--ink-3); }
.ov-cell.h1 { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); color: var(--ink); }
.ov-cell.h2 { background: color-mix(in srgb, var(--brand) 24%, var(--surface)); color: var(--ink); }
.ov-cell.h3 { background: color-mix(in srgb, var(--brand) 45%, var(--surface)); color: var(--ink); }
.ov-cell.h4 { background: color-mix(in srgb, var(--brand) 78%, var(--surface)); color: var(--brand-ink); }
.ov-cell.over { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 2px var(--warn); }
.ov-total td, .ov-total th { font-size: 13px; text-align: center; padding: 6px 4px; border-top: 1px solid var(--line); }
.ov-total th { text-align: left; } .ov-total td small { display: block; color: var(--ink-3); }
.ov-legend { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13px; margin-top: 10px; }
.ov-key { display: inline-flex; align-items: center; gap: 5px; }
.ov-key i { display: inline-block; width: 18px; height: 14px; border-radius: 4px; }
/* post-it board */
.pi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.pi-empty { grid-column: 1 / -1; }
.pi { --pi: #fff6c7; --pi-edge: #e9c84a; background: var(--pi); border: 1px solid var(--pi-edge); border-top-width: 5px; border-radius: 10px; padding: 8px 10px 10px; display: grid; gap: 6px; align-content: start; color: #1e293b; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); min-height: 120px; }
.pi.pinned { box-shadow: 0 3px 10px rgba(15, 23, 42, .14); }
.pi.done .pi-text { text-decoration: line-through; opacity: .6; }
.pi-yellow { --pi: #fff6c7; --pi-edge: #e9c84a; } .pi-blue { --pi: #e3f0ff; --pi-edge: #6aa5ec; } .pi-green { --pi: #e3f6e8; --pi-edge: #5cbf7c; }
.pi-pink { --pi: #ffe6ef; --pi-edge: #ec7fa6; } .pi-orange { --pi: #ffeedd; --pi-edge: #f0a35a; } .pi-purple { --pi: #efe8ff; --pi-edge: #a48ae8; }
.pi-top { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.pi-kind { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #475569; }
.pi-due { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.7); color: #334155; }
.pi-due.today { background: #fdf1dc; color: #9a5b00; } .pi-due.over { background: #fde8e6; color: #b42318; }
.pi-act { border: 0; background: none; cursor: pointer; font-size: 15px; color: #475569; min-width: 30px; min-height: 30px; border-radius: 6px; }
.pi-act:hover { background: rgba(255,255,255,.6); } .pi-act.on { color: #b7791f; } .pi-act.warn { color: #b42318; font-size: 12px; font-weight: 800; }
.pi-check input { width: 20px; height: 20px; }
.pi-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.45; }
.pi-foot { font-size: 12px; color: #64748b; margin-top: auto; }
.pi-composer { --pi: #fff6c7; --pi-edge: #e9c84a; background: var(--pi); border: 1px solid var(--pi-edge); border-top-width: 5px; border-radius: 10px; padding: 10px; display: grid; gap: 8px; margin-bottom: 10px; color: #1e293b; }
.pi-composer textarea { background: rgba(255,255,255,.75); color: #1e293b; }
.pi-comp-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pi-comp-row select, .pi-comp-row input[type=date] { width: auto; background: rgba(255,255,255,.85); color: #1e293b; }
.pi-due-l { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.pi-swatches { display: inline-flex; gap: 6px; }
.pi-sw { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--pi-edge); background: var(--pi); cursor: pointer; padding: 0; }
.pi-sw.on { box-shadow: 0 0 0 3px #1e293b; }
@media (max-width: 600px) { .ov-range { min-width: 0; } .ov-la-head .spacer { display: none; } .pi-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .tfs.tfs-extra { display: none; } } /* 6th quick button (Clients) lives in the Menu on phones */
.cl-filters { margin: -4px 0 12px; } .cl-filters select { width: auto; max-width: 100%; }
/* Services & areas */
.ins-tbl td.num, .ins-tbl th.num { text-align: right; white-space: nowrap; }
.ins-bar { display: inline-grid; grid-template-columns: 3.2em 90px; gap: 8px; align-items: center; }
.ins-bar-n { text-align: right; font-variant-numeric: tabular-nums; }
.ins-bar-t { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; display: block; }
.ins-bar-t i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.ins-matrix { min-width: 0; }
.ins-matrix thead th { vertical-align: bottom; max-width: 90px; }
.ins-col { display: block; font-size: 12px; line-height: 1.2; white-space: normal; }
.ins-matrix .ov-cell { height: 40px; min-width: 56px; }
.ins-cell { display: grid; place-content: center; height: 100%; min-height: 40px; color: inherit; text-decoration: none; border-radius: 8px; }
.ins-cell:hover, .ins-cell:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
/* Settings → customer service agreement */
.sa-current { display: grid; gap: 6px; margin-bottom: 12px; }
.sa-drop { display: grid; gap: 4px; place-items: center; text-align: center; border: 2px dashed var(--line); border-radius: 14px; padding: 22px 16px; margin-top: 12px; cursor: pointer; color: var(--ink-2); background: var(--surface-2); }
.sa-drop.on, .sa-drop:hover { border-color: var(--brand); color: var(--ink); }
.sa-drop b { color: var(--ink); }
.sa-fields { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.sa-fields .chip-toggle { min-height: 32px; font-size: 13px; }
#sa-text { font-size: 14px; line-height: 1.5; min-height: 320px; }

/* devices per login (login sharing limit) */
.dv-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.dv-acts { margin: 0; flex-wrap: nowrap; }
.dv-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.dv-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.dv-row.cur { border-color: var(--brand); }
.dv-ic { font-size: 22px; flex: none; }
.dv-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.dv-t b { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dv-t small { color: var(--ink-2); }
.dv-limit select { max-width: 220px; }
.dv-sheet h3 { margin: 14px 0 4px; font-size: 1rem; }
.dv-recent { margin-top: 10px; font-size: .9rem; }
.dv-recent ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }
.co-sharing small { overflow-wrap: anywhere; }
@media (max-width: 480px) { #login-list .row { flex-wrap: wrap; } #login-list .dv-acts { width: 100%; justify-content: flex-end; } }

/* ---------- Notifications (bell in the top bar) ---------- */
.tb-notif { position: relative; }
.tb-badge { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 999px; background: #dc2626; color: #fff; font: 800 12px var(--font); box-shadow: 0 0 0 2px var(--surface); }
.tb-badge.hidden { display: none; }
.dd-panel:has(.nt-panel) { width: 380px; padding: 0; }
.nt-panel { display: flex; flex-direction: column; }
.nt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.nt-head b { font-size: 16px; }
.nt-attn, .nt-list { padding: 4px 6px; }
.nt-attn:empty { display: none; }
.nt-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 10px; color: var(--ink); text-decoration: none; position: relative; }
a.nt-item:hover, a.nt-item:focus-visible { background: var(--brand-3); }
.nt-item.unread { background: color-mix(in srgb, var(--brand-3) 70%, transparent); }
.nt-ic { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-3); color: var(--brand-2); }
.nt-ic svg { width: 18px; height: 18px; }
.nt-ic.ic-video { background: #fee2e2; color: #b91c1c; }
.nt-ic.ic-bell { background: #fef3c7; color: #92400e; }
.nt-warn .nt-ic { background: #fef3c7; color: #92400e; }
.nt-t { display: grid; gap: 2px; min-width: 0; flex: 1; }
.nt-t b { font-size: 14px; line-height: 1.3; }
.nt-t small { color: var(--ink-2); font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.nt-t .nt-when { color: var(--ink-3); font-size: 12px; }
.nt-dot { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: #dc2626; }
.nt-empty { display: flex; gap: 10px; align-items: center; padding: 18px 12px; }
.nt-empty small { display: block; color: var(--ink-3); }
.nt-ok { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #dcfce7; color: #15803d; font-weight: 800; }
@media (max-width: 700px) { .dd-panel:has(.nt-panel) { width: calc(100vw - 16px); } .tb-badge { top: -6px; right: -6px; } }

/* More from PestPac (#/import/more) */
.more-link { display: block; text-decoration: none; color: inherit; margin-top: 12px; }
.more-link:hover b { text-decoration: underline; }
.more-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.more-kind { text-align: left; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.more-kind h2 { margin: 0; }
.more-kind p { margin: 0; }
.more-kind .btn, .more-kind .badge { margin-top: auto; }
.more-kind.off { opacity: .6; cursor: not-allowed; }
.more-map { display: grid; gap: 8px; margin: 10px 0 14px; }
.more-map-row { display: grid; grid-template-columns: minmax(140px, 220px) minmax(160px, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; }
.more-map-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .more-map-row { grid-template-columns: 1fr; gap: 2px; } }
.cc-imported .cc-visit { border-left: 3px solid var(--line); }

/* ---- Website requests (#/webrequests) ---- */
.rqo-form .rqo-fhead { display: flex; align-items: center; gap: 10px; }
.rqo-form .rqo-fhead h2 { margin: 0; }
.rqo-copyrow { display: flex; gap: 8px; align-items: stretch; }
.rqo-copyrow input, .rqo-copyrow textarea { flex: 1 1 auto; min-width: 0; font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); color: var(--ink); resize: none; }
.rqo-copyrow .btn { flex: none; }
.rqo-form .btn-row { margin-top: 4px; }
.rq-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.rq-pill.good { background: var(--good-bg); color: var(--good); } .rq-pill.warn { background: var(--warn-bg); color: var(--warn); } .rq-pill.info { background: var(--info-bg); color: var(--info); }
.rqo-h2 { margin: 22px 0 8px; }
.rqo-inbox .chip-toggle.on { background: var(--brand-3); border-color: var(--brand-2); color: var(--ink); }
.rqo-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.rqo-card { border-left: 4px solid var(--line); }
.rqo-card.st-new { border-left-color: var(--brand); }
.rqo-card.st-won { border-left-color: var(--good); }
.rqo-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.rqo-name { font-size: 1.05rem; }
.rqo-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2px 16px; margin-bottom: 6px; overflow-wrap: anywhere; }
.rqo-msg { white-space: pre-wrap; background: var(--surface-2); border-radius: var(--radius-s); padding: 8px 10px; margin: 6px 0 10px; overflow-wrap: anywhere; }
.rqo-notes { margin: 0 0 10px; padding-left: 18px; }
.rqo-more { margin-top: 8px; }
.rqo-more select { width: auto; flex: 0 0 auto; min-height: 36px; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0 8px; background: var(--surface); color: var(--ink); font: inherit; }
.rqo-how { margin: 10px 0; } .rqo-how ol { margin: 4px 0 0; padding-left: 20px; }
.rqo-set .check { display: flex; align-items: center; gap: 8px; margin: 6px 0 12px; font-weight: 600; }
.rqo-set .rq-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rqo-set .rq-chips label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; }
.rqo-copy { width: 100%; font: 13px ui-monospace, monospace; }
@media (max-width: 560px) { .rqo-copyrow { flex-direction: column; } }

/* Settings → Service packages (shared/packages.js) */
.pk-groups { display: grid; gap: 8px; }
.pk-group > small { display: block; margin: 2px 0 4px; font-weight: 600; }
.pk-choose .pk-group-h { grid-column: 1 / -1; }
.pk-group-h { margin: 6px 0 0; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.pk-choose { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.pk-option { display: grid; grid-template-columns: auto auto 1fr; align-items: start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.pk-option.on { border-color: var(--brand-2); background: var(--brand-3); box-shadow: inset 0 0 0 1px var(--brand-2); }
.pk-option input { width: 20px; height: 20px; margin-top: 10px; }
.pk-option .pk-txt { display: grid; gap: 2px; min-width: 0; }
.pk-option small { color: var(--ink-2); font-size: 13px; line-height: 1.35; }
.pk-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-3); color: var(--brand); flex: none; }
.pk-option.on .pk-ic { background: var(--surface); }
.pk-ic svg { width: 24px; height: 24px; }
.pk-preview { display: grid; gap: 10px; }
.pk-preview h3 { margin: 4px 0 0; }
.pk-sum { border: 1px solid var(--line-2, var(--line)); border-radius: var(--radius); padding: 12px; background: var(--surface-2, var(--surface)); }
.pk-sum-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pk-sum-head .pk-ic { width: 32px; height: 32px; }
.pk-sum-head .pk-ic svg { width: 20px; height: 20px; }
.pk-svcs { margin: 0 0 6px; padding-left: 1.1em; }
.pk-svcs li { margin-bottom: 3px; }
.pk-svcs small { color: var(--ink-3, var(--ink-2)); }
.pk-svcs .badge { margin-left: 6px; }
