/* Vokkos Dispatch demo. The real app's layout and behaviour, with the Vokkos brand on top. */
@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo.ttf') format('truetype');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --navy: #182A3E;
  --blue: #075CC4;
  --blue-dark: #054CA2;
  --ice: #F2F6FB;
  --slate: #526174;
  --ink: #16212E;
  --line: #DCE3EC;
  --line-soft: #E8EDF3;
  --bg: #EEF2F7;
  --amber: #8A5300;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(24, 42, 62, .06), 0 1px 3px rgba(24, 42, 62, .08);
  --shadow-lg: 0 12px 32px rgba(24, 42, 62, .18), 0 2px 6px rgba(24, 42, 62, .1);
  --card-w: 232px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px; line-height: 1.45; font-stretch: 100%;
}
body.no-scroll { overflow: hidden; }
body.is-resizing, body.is-resizing * { cursor: row-resize !important; user-select: none; }
body.is-col-resizing, body.is-col-resizing * { cursor: col-resize !important; user-select: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; }
p, li, .card-title, .ph-job-title, .bell-text { text-wrap: pretty; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.topbar :focus-visible, .toast :focus-visible, .lightbox :focus-visible { outline-color: #7DB3F5; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--slate); }
.strong { font-weight: 650; }
.green { color: #106B42; font-weight: 600; }
.amber { color: var(--amber); }
.ico { flex: none; display: inline-block; vertical-align: middle; }
.noscript { padding: 24px; }
.untitled { color: var(--slate); font-style: italic; font-weight: 500; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; background: var(--navy); color: #fff;
  display: flex; align-items: center; gap: 16px; padding: 8px 24px; min-height: 58px;
}
.topbar-brand { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.wordmark { height: 17px; width: auto; display: block; }
.topbar-demo { font-size: 13px; color: #C9D6E6; border-left: 1px solid rgba(255,255,255,.25); padding-left: 14px; white-space: nowrap; }
.role-switch { display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(255,255,255,.1); border-radius: 8px; padding: 3px; gap: 2px; }
.role-switch button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 6px; background: transparent; color: #DCE6F2; font-weight: 600; font-size: 14px; }
.role-switch button:hover { background: rgba(255,255,255,.1); color: #fff; }
.role-switch button[aria-pressed="true"] { background: #fff; color: var(--navy); }
.topbar-tools { display: flex; gap: 8px; flex: 1; justify-content: flex-end; }
.tb-btn { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; font-size: 14px; font-weight: 550; white-space: nowrap; }
.tb-btn:hover { background: rgba(255,255,255,.1); }

/* ---------- app bar and bell ---------- */
.appbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 24px; min-height: 56px; }
.appbar-co { display: flex; align-items: center; gap: 10px; min-width: 0; }
.co-mark { width: 34px; height: 34px; border-radius: 8px; border: 2px solid #1f3a5f; color: #1f3a5f; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.co-name { font-weight: 700; font-size: 15px; }
.co-sub { font-size: 13px; color: var(--slate); }
.bell-wrap { position: relative; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); position: relative; flex: none; }
.icon-btn:hover { background: var(--ice); }
.icon-btn:disabled { opacity: .4; cursor: default; background: #fff; }
.icon-btn-quiet, .bell { border-color: transparent; background: transparent; }
.badge { position: absolute; top: 1px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #D93838; color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.bell-menu { position: absolute; right: 0; top: 48px; width: 420px; max-width: calc(100vw - 24px); max-height: min(70vh, 640px); overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 40; }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: #fff; z-index: 1; }
.bell-head-acts { display: flex; gap: 4px; }
.bell-filter { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); }
.bell-list { list-style: none; margin: 0; padding: 0; }
.bell-row { display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--line-soft); }
.bell-row.is-dismissed { background: #FAFBFC; }
.bell-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-top: 16px; flex: none; }
.bell-dot.off { background: transparent; }
.bell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; border: 0; background: transparent; padding: 6px 0; font-size: 14px; min-height: 44px; border-radius: 8px; }
.bell-main:hover .open-hint { visibility: visible; }
.bell-meta { color: var(--slate); font-size: 13px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.open-hint { color: var(--blue); visibility: hidden; }
.bell-acts { display: flex; align-items: center; gap: 2px; padding-top: 2px; }
.mini-btn { min-height: 40px; padding: 0 8px; border: 0; background: transparent; border-radius: 8px; font-size: 13px; color: var(--slate); font-weight: 600; }
.mini-btn:hover { background: var(--ice); }
.mini-btn.amber { color: var(--amber); }
.bell-foot { padding: 10px 16px 12px; font-size: 13px; color: var(--slate); }

/* ---------- buttons, links, inputs ---------- */
.btn { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: var(--ice); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: default; background: #fff; }
.btn-sm { min-height: 40px; padding: 0 12px; font-size: 13px; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-primary:disabled, .btn-primary[aria-disabled="true"] { background: #9DB5D6; border-color: #9DB5D6; color: #fff; opacity: 1; }
.btn-danger { background: #C62E2E; border-color: #C62E2E; color: #fff; }
.btn-danger:hover { background: #A82222; }
.btn-amber { background: #FFF1D6; border-color: #F1C676; color: var(--amber); }
.btn-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-on:hover { background: var(--blue-dark); }
.btn-wide { width: 100%; margin-top: 10px; }
.link { border: 0; background: transparent; color: var(--blue); font-weight: 600; font-size: 14px; padding: 0 6px; min-height: 40px; border-radius: 8px; display: inline-flex; align-items: center; gap: 4px; text-align: left; }
.link:hover { text-decoration: underline; }
.link-amber { color: var(--amber); }
.inp, .sel { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #fff; font-size: 15px; }
textarea.inp { resize: vertical; line-height: 1.4; }
.inp.short { max-width: 140px; }
.inp:focus, .sel:focus { border-color: var(--blue); outline: 2px solid rgba(7,92,196,.2); outline-offset: 0; }
.search { position: relative; display: inline-flex; align-items: center; }
.search .ico { position: absolute; left: 12px; color: var(--slate); pointer-events: none; }
.search input { min-height: 40px; width: 260px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px 0 36px; background: #fff; font-size: 14px; }
.search input:focus { border-color: var(--blue); outline: 2px solid rgba(7,92,196,.2); }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); margin: 0; flex: none; }
.check-big { font-weight: 650; font-size: 15px; }
.check-big input { width: 24px; height: 24px; }
.checks { display: flex; flex-direction: column; }
.checks.row { flex-direction: row; flex-wrap: wrap; column-gap: 18px; }
.count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 13px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.count.muted { background: var(--slate); color: #fff; }

/* ---------- board ---------- */
.dispatch { display: flex; flex-direction: column; gap: 10px; padding: 0 24px 16px; height: calc(100vh - var(--chrome, 114px)); height: calc(100dvh - var(--chrome, 114px)); min-height: 960px; }
.board-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 0 2px; flex: none; }
.owner .board-head { padding: 18px 24px 4px; }
.board-head h1 { font-size: 22px; font-weight: 750; letter-spacing: -.01em; position: relative; }
.plain-h1 { font-size: 22px; font-weight: 750; }
.date-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; font-weight: 750; font-size: 22px; padding: 4px 8px; margin-left: -8px; border-radius: 8px; min-height: 40px; }
.date-btn:hover { background: #E2E8F0; }
.date-btn .ico { color: #8391A2; }
.date-input { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.head-gap, .bar-gap { flex: 1; }
.datenav { display: flex; gap: 8px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #1C7A47; font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #23A35A; }
.help-tip { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--slate); flex: none; }
.help-tip:hover { background: #E2E8F0; color: var(--navy); }
.help-tip.warn { color: var(--amber); }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pool { flex: none; height: var(--pool-h); max-height: calc(100% - 260px); overflow-y: auto; padding: 12px 16px 14px; }
.pool.collapsed { height: auto; }
.pool-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pool-head h2 { font-size: 16px; font-weight: 700; white-space: nowrap; }
.pool-acts { margin-left: auto; display: flex; gap: 8px; }
.count-line { font-size: 14px; color: var(--slate); margin: 8px 0 10px; }
.pool-cards { display: flex; flex-wrap: wrap; gap: 12px; }
.pool-slot { width: var(--card-w); display: flex; flex-direction: column; }
.pool-slot .card { flex: 1; }
.result-line { font-size: 13px; color: var(--slate); line-height: 40px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-line.other { color: var(--amber); }
.crew-more { cursor: help; font-weight: 700; display: inline-block; min-width: 40px; line-height: 40px; text-align: center; border-radius: 6px; }
.pool-empty { color: var(--slate); font-size: 14px; text-align: center; padding: 6px 0 2px; }
.pool.drop-over, .trow.drop-over { background: #EAF2FD; }

.section-bar { display: flex; align-items: center; gap: 10px; flex: none; padding: 0 2px; min-height: 40px; }
.section-bar h2 { font-size: 15px; font-weight: 700; }
.grip-bar { cursor: row-resize; user-select: none; }
.grip { color: #9AA6B5; display: inline-flex; }
.park-toggle { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; font-weight: 700; font-size: 15px; min-height: 40px; padding: 0 8px; margin-left: -6px; border-radius: 8px; }
.park-toggle:hover { background: #E2E8F0; }
.park-count { font-weight: 400; color: var(--slate); font-size: 14px; }

.rows-box { flex: 1 1 auto; min-height: 170px; display: flex; position: relative; }
.rows { flex: 1 1 auto; min-height: 0; min-width: 0; overflow: auto; }
.rows-box::after { content: ''; position: absolute; top: 1px; bottom: calc(var(--sbh, 0px) + 1px); right: calc(var(--sbw, 0px) + 1px); width: 64px; pointer-events: none; border-radius: 0 12px 12px 0; background: linear-gradient(to right, rgba(255,255,255,0), #fff); opacity: 0; transition: opacity .2s; }
.rows-box.more-right::after { opacity: 1; }
.parking { flex: none; height: var(--park-h); overflow: auto; }
.rows-inner { min-width: max-content; }
.rows-empty { padding: 48px 16px; text-align: center; color: var(--slate); }
.trow { display: flex; border-bottom: 1px solid var(--line-soft); min-height: 132px; }
.trow:last-child { border-bottom: 0; }
.trow.collapsed { min-height: 48px; }
.tname {
  position: sticky; left: 0; z-index: 5; width: var(--tech-col); flex: none; display: flex; align-items: center; gap: 8px;
  padding: 8px 10px 8px 6px; background: #fff; border-right: 1px solid var(--line-soft); box-shadow: 2px 0 4px rgba(24,42,62,.06);
}
.trow.drop-over .tname { background: #EAF2FD; }
.caret-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; background: transparent; border-radius: 8px; color: var(--slate); }
.caret-btn:hover { background: var(--ice); }
.tname-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tname-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-name { font-weight: 500; }
.tname-list { font-size: 13px; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plus-btn { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; background: transparent; color: #8391A2; display: grid; place-items: center; }
.plus-btn:hover { background: #DDF3D0; color: #2F6A12; }
.col-resize { position: absolute; right: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 6; }
.col-resize:hover, body.is-col-resizing .col-resize { background: linear-gradient(to right, transparent 3px, var(--blue) 3px, var(--blue) 5px, transparent 5px); }
.lane-acts { display: flex; }
@media (hover: hover) { .lane-acts { opacity: 0; transition: opacity .15s; } .trow:hover .lane-acts, .lane-acts:focus-within { opacity: 1; } }
.lane-input { flex: 1; min-width: 0; min-height: 40px; border: 1px solid var(--blue); border-radius: 8px; padding: 0 8px; }
.tcards { display: flex; gap: 14px; padding: 12px 14px; align-items: stretch; }
.add-slot, .drop-slot { width: var(--card-w); min-height: 108px; flex: none; border: 2px dashed var(--line); border-radius: 12px; background: transparent; color: var(--slate); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 14px; text-align: center; padding: 8px; }
.add-slot:hover { border-color: #B9C6D6; color: var(--slate); }
.add-plus { width: 34px; height: 34px; border-radius: 50%; background: var(--ice); display: grid; place-items: center; }
body.is-dragging .add-label { font-size: 0; }
body.is-dragging .add-label::after { content: 'Drop to add'; font-size: 14px; }
.drop-over .add-slot, .drop-over .drop-slot { border-color: var(--blue); color: var(--blue); }
.new-lane { position: sticky; left: 0; bottom: 0; z-index: 6; background: #fff; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line-soft); }
.new-lane input { width: 280px; max-width: 70vw; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; font-size: 14px; }
.new-lane .muted { font-size: 13px; }

/* ---------- cards ---------- */
.card {
  width: var(--card-w); flex: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px 10px 12px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; cursor: grab; position: relative; min-height: 104px;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; transition: box-shadow .15s, border-color .15s;
}
.card:hover { border-color: #B9C6D6; box-shadow: 0 2px 8px rgba(24,42,62,.12); }
.card.dragging { opacity: .35; }
.card.twin { box-shadow: 0 0 0 2px var(--blue); border-color: var(--blue); }
.card.flash { animation: flash 2.4s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px rgba(7,92,196,.55); border-color: var(--blue); } 100% { box-shadow: var(--shadow); } }
.card.ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; box-shadow: var(--shadow-lg); opacity: .96; cursor: grabbing; }
.ghost-add { display: none; position: absolute; right: 8px; bottom: -12px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.card.ghost.adding .ghost-add { display: block; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }
.card-top { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 26px; }
.card-no { font-size: 13px; color: var(--slate); font-weight: 600; }
.card-btns { display: flex; align-items: center; margin: -7px -4px -7px 0; }
.card-btn { width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--slate); display: inline-grid; place-items: center; flex: none; }
.card-btn:hover { background: var(--ice); color: var(--navy); }
.card-btn.danger:hover { color: #C62E2E; }
.card-btn:disabled { opacity: .35; cursor: default; background: transparent; }
@media (hover: hover) { .card .card-edit { opacity: 0; } .card:hover .card-edit, .card .card-edit:focus-visible { opacity: 1; } }
.muted-mark { color: var(--amber); display: inline-flex; margin-right: 4px; }
.card-title { font-weight: 700; font-size: 15px; line-height: 1.3; width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 2px; }
.card-cust { font-size: 14px; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-addr { font-size: 13px; color: var(--slate); width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-foot { margin-top: auto; padding-top: 6px; width: 100%; display: flex; align-items: center; gap: 6px; }
.crew-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; background: #DCEBFE; color: #1846A3; border-radius: 6px; padding: 0 9px; min-height: 26px; font-size: 13px; font-weight: 700; cursor: help; position: relative; }
.crew-badge::before { content: ''; position: absolute; inset: -8px; }
.warn-dot { position: absolute; top: -14px; left: -14px; width: 40px; height: 40px; border: 0; background: transparent; padding: 0; display: grid; place-items: center; cursor: help; z-index: 2; }
.warn-dot span { width: 12px; height: 12px; border-radius: 50%; background: #A86A00; box-shadow: 0 0 0 2px #fff; }
.run { font-size: 13px; font-weight: 600; background: #D4EEF2; color: #0B5F6B; padding: 1px 7px; border-radius: 6px; }
.run-warn { background: #FFF1D6; color: var(--amber); }
.run-stale { background: #FDE2E1; color: #A3231F; }
.float-tip { position: fixed; z-index: 120; background: var(--navy); color: #fff; font-size: 13px; padding: 8px 10px; border-radius: 8px; box-shadow: var(--shadow-lg); pointer-events: none; max-width: 260px; }

.pill, .tag { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 8px; border-radius: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.st-none { background: #EEF1F5; color: #4A5666; }
.st-notsent { background: #fff; color: var(--amber); border: 1px dashed #C98A1E; }
.st-dispatched { background: #DCEBFE; color: #1846A3; }
.st-route { background: #E5E2FD; color: #4335A8; }
.st-onsite { background: #D4EEF2; color: #0B5F6B; }
.st-hold { background: #FFE9C7; color: #8A4B00; }
.st-done { background: #DDF3D0; color: #2F6A12; }
.st-checked { background: #DDF3D0; color: #2F6A12; }
.st-handed { background: #E6EAF0; color: #3B4756; }
.tag-follow { background: #F3E8FD; color: #6B2CA8; }
.tag-day { background: #E3EEFB; color: #1E4F8F; }

/* ---------- menus, dialogs, modals, tips ---------- */
.menu-scrim, .dlg-scrim { position: fixed; inset: 0; z-index: 60; }
.dlg-scrim { background: rgba(15, 25, 38, .4); }
.menu { position: fixed; z-index: 61; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; max-height: calc(100vh - 16px); overflow: auto; max-width: calc(100vw - 16px); }
.menu-head, .menu-cap { font-size: 13px; color: var(--slate); font-weight: 700; padding: 8px 10px 4px; }
.menu-sep { height: 1px; background: var(--line-soft); margin: 4px 0; }
.menu-input { padding: 4px; }
.menu-input input { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 12px 0 10px; border: 0; background: transparent; border-radius: 8px; text-align: left; font-size: 14px; font-weight: 550; white-space: nowrap; }
.menu-item:hover:not([aria-disabled]), .menu-item:focus-visible { background: var(--ice); }
.menu-item:disabled, .menu-item[aria-disabled="true"] { color: var(--slate); cursor: default; }
.menu-item.danger { color: #C62E2E; }
.mi-ico { color: var(--slate); display: inline-flex; }
.mi-label { flex: 1; }
.mi-note { font-size: 13px; color: var(--slate); font-weight: 400; }
.dlg { position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 440px; max-width: calc(100vw - 32px); background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 20px; }
.dlg h3 { font-size: 18px; margin-bottom: 8px; }
.dlg-body { color: var(--slate); margin-bottom: 16px; }
.dlg-btns { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.modal { position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 540px; max-width: calc(100vw - 24px); max-height: calc(100vh - 48px); background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line-soft); }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 12px 20px 16px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: space-between; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line-soft); }
.modal-foot:empty { display: none; }
.modal-sheet { top: auto; bottom: 0; transform: translateX(-50%); border-radius: 12px 12px 0 0; max-height: 85vh; }
.opt-group { font-size: 13px; color: var(--slate); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 16px 0 4px; }
.opt-note { font-size: 13px; color: var(--slate); margin-top: 6px; }
.opt-sec { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.opt-sec:last-child { border-bottom: 0; }
.opt-sec h4 { font-size: 15px; font-weight: 650; margin-bottom: 8px; }
.opt-row { display: flex; justify-content: space-between; align-items: baseline; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { background: var(--ice); }
.chip.on { border-color: var(--blue); background: #EAF2FD; color: #0B4A9C; font-weight: 600; }
.radios { display: flex; flex-direction: column; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; font-size: 14px; }
.radio input { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; }
.roster { display: flex; flex-direction: column; }
.roster-row { display: flex; align-items: center; gap: 4px; border-radius: 8px; }
.roster-row:hover { background: #FAFBFD; }
.roster-move { display: flex; }
.roster-row .check { flex: 1; }
.roster-row .count { margin-left: auto; margin-right: 6px; }
.roster-acts { display: flex; gap: 4px; margin-top: 6px; }
.roster-acts .push { margin-left: auto; }
.tip-pop { position: fixed; z-index: 61; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 12px 16px; width: 340px; max-width: calc(100vw - 16px); font-size: 14px; }
.tip-pop:focus { outline: none; }
.tip-title { font-weight: 700; margin: 4px 0 4px; }
.tip-pop ul { margin: 0 0 6px; padding-left: 18px; color: var(--slate); }
.tip-pop li { margin: 3px 0; }
.tip-pop b { color: var(--ink); }
.tip-pop b.blue { color: var(--blue); }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(15, 25, 38, .35); z-index: 50; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; max-width: 100%; background: #fff; z-index: 51; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slidein .2s ease-out; }
@keyframes slidein { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.dr-resize { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 2; }
.dr-resize:hover { background: linear-gradient(to right, transparent 3px, var(--blue) 3px, var(--blue) 5px, transparent 5px); }
.drawer-head { display: flex; justify-content: space-between; gap: 8px; padding: 14px 12px 12px 20px; border-bottom: 1px solid var(--line-soft); }
.dr-titles { min-width: 0; }
.drawer-head h2 { font-size: 19px; font-weight: 750; }
.dr-meta { font-size: 14px; color: var(--slate); margin-top: 2px; }
.dr-link { padding: 0; min-height: 40px; font-size: 14px; }
.dr-kids { font-size: 14px; display: flex; align-items: center; flex-wrap: wrap; }
.dr-kids .link { padding: 0 4px; min-height: 40px; }
.dr-icons { display: flex; align-items: flex-start; flex: none; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 20px 24px; }
.drawer-foot { padding: 10px 20px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.dr-msg { margin-right: auto; font-size: 14px; }
.dr-msg.ok { color: #1C7A47; font-weight: 600; }
.mute-note { display: flex; align-items: center; gap: 8px; background: #FFF6E5; color: var(--amber); border-radius: 8px; padding: 6px 8px 6px 12px; margin-bottom: 10px; font-size: 14px; }
.mute-note span { flex: 1; }
.status-card { border: 1px solid var(--line); background: #F8FAFC; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.status-card.warn { background: #FFF8E8; border-color: #F1D49A; }
.status-card .strong { display: flex; align-items: center; gap: 8px; }
.status-card .btn-primary { align-self: flex-start; }
.dsec { border-top: 1px solid var(--line-soft); }
.dsec-h { margin: 0; font: inherit; }
.dsec-head { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; min-height: 44px; padding: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--slate); text-align: left; }
.dsec-head:hover { color: var(--navy); }
.sec-extra { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--blue); }
.dsec-body { padding: 2px 0 16px; display: flex; flex-direction: column; gap: 12px; }
.fld { display: flex; flex-direction: column; gap: 4px; }
.fld > label, .sub { font-size: 14px; font-weight: 600; color: #39475A; }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cust-card { display: flex; gap: 8px; justify-content: space-between; border: 1px solid var(--line); background: #F8FAFC; border-radius: 8px; padding: 10px 6px 10px 12px; font-size: 14px; }
.pick-list { display: flex; flex-direction: column; max-height: 220px; overflow: auto; border: 1px solid var(--line-soft); border-radius: 8px; margin-top: 4px; }
.pick-list:empty { display: none; }
.pick-list .muted { padding: 10px 12px; font-size: 14px; }
.pick { display: flex; flex-direction: column; gap: 1px; text-align: left; border: 0; background: #fff; padding: 8px 12px; min-height: 40px; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.pick:hover { background: var(--ice); }
.prev-note { background: var(--ice); border-radius: 8px; padding: 8px 10px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.crew-list { display: flex; flex-direction: column; gap: 6px; }
.crew-row { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-soft); border-radius: 8px; padding: 0 4px 0 10px; min-height: 44px; }
.crew-name { flex: 1; font-weight: 600; font-size: 14px; }
.crew-row.removing { background: #FDECEC; border-color: #F3B7B7; }
.crew-row.removing .crew-name { text-decoration: line-through; color: #A3231F; }
.crew-row.adding { border: 1px dashed var(--blue); background: #F2F7FE; }
.crew-note { font-size: 13px; color: var(--slate); }
.visit { border: 1px solid var(--line-soft); border-radius: 8px; margin-top: 8px; }
.visit.gone { border-style: dashed; background: #FAFBFC; }
.visit-head { display: flex; align-items: center; gap: 4px; padding-right: 4px; }
.visit-toggle { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 0; background: transparent; min-height: 48px; padding: 4px 10px; text-align: left; font-size: 14px; }
.gone-tag { font-size: 13px; color: var(--slate); border: 1px dashed var(--line); border-radius: 6px; padding: 0 6px; }
.visit-body { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.clock-sum { font-size: 15px; }
.clock-log { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.clock-log li { display: flex; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.clock-log li span:first-child { width: 90px; color: var(--slate); }
.writeup { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.writeup textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; resize: vertical; font-size: 14px; }
.writeup-acts, .visit-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.writeup-acts .muted { font-size: 13px; }
.hist-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.hist-list li { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.hist-list li .muted { font-size: 13px; }
.note-box { background: var(--ice); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.note-box.warn { background: #FFF6E5; }
.pgroup + .pgroup { margin-top: 10px; }
.pgroup-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; min-height: 28px; flex-wrap: wrap; }
.pgroup-head h4 { font-size: 14px; font-weight: 700; }
.pg-acts { margin-left: auto; display: flex; gap: 6px; }
.pcount { font-size: 13px; color: var(--slate); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.ptile { position: relative; display: flex; flex-direction: column; gap: 2px; }
.pcap { font-size: 13px; color: var(--slate); }
.pdel { position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; border: 0; border-radius: 8px; background: rgba(255,255,255,.9); color: #A3231F; display: grid; place-items: center; }
.thumb { padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #D5DBE3; aspect-ratio: 1 / 1; min-height: 40px; width: 100%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb:hover { border-color: var(--blue); }
.empty { color: var(--slate); font-size: 14px; }
.pad { padding: 4px 16px 8px; font-size: 14px; }
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(10, 16, 24, .92); color: #fff; display: flex; flex-direction: column; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; font-size: 14px; }
.lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 12px; min-height: 0; }
.lb-stage img { max-width: min(100%, 1000px); max-height: 100%; min-width: 0; border-radius: 8px; object-fit: contain; flex: 0 1 auto; }
.lb-count { text-align: center; padding: 12px; font-size: 13px; color: #C9D6E6; }
.icon-btn-dark { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; }
.icon-btn-dark:hover { background: rgba(255,255,255,.22); }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.sheet-grid .thumb { aspect-ratio: 4 / 3; }

/* ---------- technician ---------- */
.tech-wrap { display: flex; justify-content: center; align-items: flex-start; gap: 40px; padding: 24px 24px 120px; }
.tech-side { width: 260px; padding-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.tech-side label { font-weight: 700; font-size: 14px; }
.select-wrap { position: relative; }
.select-wrap select { width: 100%; min-height: 44px; appearance: none; -webkit-appearance: none; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 40px 0 12px; font-size: 15px; font-weight: 600; }
.select-wrap .ico { position: absolute; right: 12px; top: 14px; pointer-events: none; color: var(--slate); }
.tech-side .muted { font-size: 14px; }
.phone { width: 390px; flex: none; border-radius: 44px; background: var(--navy); padding: 12px; box-shadow: 0 24px 60px rgba(24, 42, 62, .28); }
.phone-screen { background: #F7F9FC; border-radius: 34px; height: 780px; overflow-y: auto; overflow-x: hidden; position: relative; display: flex; flex-direction: column; }
.ph-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 8px; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 14px 10px; min-height: 64px; }
.ph-logo { width: 30px; height: 30px; border-radius: 8px; border: 2px solid #1f3a5f; color: #1f3a5f; font-weight: 800; font-size: 12px; display: grid; place-items: center; }
.ph-name { font-weight: 700; flex: 1; }
.ph-back { width: 40px; height: 40px; border: 0; background: transparent; color: var(--blue); display: grid; place-items: center; border-radius: 8px; flex: none; }
.ph-back:hover { background: var(--ice); }
.ph-bar-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ph-bar-name { font-size: 15px; line-height: 1.45; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-bar-sub { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--slate); flex-wrap: wrap; }
.ph-strip { padding: 8px 16px; font-size: 14px; font-weight: 600; }
.ph-body { padding: 14px 16px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.ph-titlerow { display: flex; align-items: center; justify-content: space-between; }
.ph-h1 { font-size: 22px; font-weight: 750; }
.ph-datenav { display: flex; gap: 6px; align-items: center; }
.ph-date { flex: 1; min-width: 0; }
.ph-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ph-tab { min-height: 44px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; }
.ph-tab span { color: var(--slate); font-weight: 500; }
.ph-tab.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.ph-tab.on span { color: #D5E4F8; }
.ph-search input { width: 100%; }
.ph-search { display: flex; }
.ph-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ph-job { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-height: 64px; }
.ph-job:hover { border-color: #B9C6D6; }
.ph-job-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; width: 100%; }
.ph-job-title { font-weight: 700; font-size: 15px; display: flex; align-items: center; }
.ph-job-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ph-job-tags:empty { display: none; }
.ph-job-meta { display: flex; flex-wrap: wrap; column-gap: 12px; font-size: 13px; color: var(--slate); }
.clock-pill { font-size: 13px; font-weight: 600; background: #D4EEF2; color: #0B5F6B; padding: 1px 8px; border-radius: 6px; }
.clock-pill.grey { background: #EEF1F5; color: #3B4756; }
.clock-pill.amber { background: #FFF1D6; color: var(--amber); }
.clock-pill.red { background: #FDE2E1; color: #A3231F; }
.ph-empty { background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.ph-empty .muted { font-size: 14px; }
.btn-big { width: 100%; min-height: 60px; border: 0; border-radius: 8px; color: #fff; font-size: 19px; font-weight: 750; }
.btn-go { background: var(--blue); }
.btn-go:hover { background: var(--blue-dark); }
.btn-done { background: #1C7A47; }
.btn-done:hover { background: #166239; }
.btn-big + .btn-wide { margin-top: 12px; }
.ph-dateline { font-size: 14px; color: var(--slate); font-weight: 600; }
.ph-sec { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.ph-sec h2 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; color: var(--navy); }
.ph-sec-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ph-sec .sub { margin-top: 4px; font-size: 13px; color: var(--slate); }
.ph-notes { min-height: 96px; }
.ph-foot { position: sticky; bottom: 0; z-index: 3; background: #fff; border-top: 1px solid var(--line); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.ph-foot-row { display: flex; align-items: center; gap: 10px; }
.ph-foot-msg { flex: 1; font-size: 14px; color: var(--amber); font-weight: 600; }
.ph-foot .btn-big { min-height: 52px; font-size: 17px; }
.icon-btn.spin .ico { animation: spin .45s linear; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- owner ---------- */
.owner { padding-bottom: 120px; }
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; padding: 14px 24px 0; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.tile-n { font-size: 30px; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-l { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--ink); }
.tile-l .dot { width: 10px; height: 10px; border-radius: 50%; }
.st-done-text .dot { background: #3F8A1F; } .st-onsite-text .dot { background: #1E9BB0; } .st-route-text .dot { background: #5B4BD6; }
.st-dispatched-text .dot { background: #1846A3; } .st-hold-text .dot { background: #D08A00; } .st-none-text .dot { background: #8391A2; }
.tile-s { font-size: 13px; color: var(--slate); }
.owner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 24px; align-items: start; }
.opanel { padding-bottom: 8px; min-width: 0; }
.opanel.wide { grid-column: 1 / -1; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 4px; flex-wrap: wrap; }
.panel-head h2 { font-size: 16px; font-weight: 700; }
.panel-note { color: var(--slate); font-size: 13px; }
.hours { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 14px; }
.hours th, .hours td { padding: 9px 16px; text-align: left; border-top: 1px solid var(--line-soft); }
.hours thead th { font-size: 13px; color: var(--slate); font-weight: 600; border-top: 0; }
.hours tbody th { font-weight: 600; }
.th-in { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hours .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.clock-table td { white-space: nowrap; }
.clock-table .link { padding: 0; min-height: 40px; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.bar-col { width: 30%; }
.bar { display: block; height: 8px; background: var(--ice); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.on-clock { font-size: 12px; font-weight: 600; color: #0B5F6B; background: #D4EEF2; border-radius: 6px; padding: 1px 6px; }
.running { color: #0B5F6B; font-weight: 600; }
.ready { list-style: none; margin: 0; padding: 0 8px; }
.ready li { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line-soft); padding: 6px 8px; }
.ready-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; border: 0; background: transparent; padding: 6px 0; font-size: 14px; min-height: 44px; }
.ready-main:hover b { color: var(--blue); }
.av { width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 13px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.av.sm { width: 26px; height: 26px; font-size: 12px; }

/* ---------- guide: a strip under the top bar, in the flow, so it never covers the app ---------- */
.guide { background: #E3EEFB; border-bottom: 1px solid #C9DBF2; }
.guide[hidden] { display: none; }
.guide-in { display: flex; align-items: center; gap: 8px 16px; padding: 6px 12px 6px 24px; min-height: 52px; }
.guide-n { flex: none; font-size: 13px; font-weight: 700; color: var(--navy); }
.guide-text { flex: 1; min-width: 0; font-size: 14px; color: var(--ink); }
.guide-text.ok { color: #2F6A12; font-weight: 600; }
.guide-x { flex: none; min-height: 40px; padding: 0 12px; border: 1px solid #B9CDE6; border-radius: 8px; background: #fff; color: var(--navy); font-size: 13px; font-weight: 600; }
.guide-x:hover { background: var(--ice); }
body.is-dragging .toasts { opacity: .15; pointer-events: none; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { background: var(--navy); color: #fff; padding: 10px 12px 10px 16px; border-radius: 8px; font-size: 14px; box-shadow: var(--shadow-lg); animation: toastin .2s ease-out; transition: opacity .4s, transform .4s; display: flex; align-items: center; gap: 12px; pointer-events: auto; }
.toast-text { display: flex; flex-direction: column; }
.toast-text span { color: #C9D6E6; }
.toast-x { width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: #C9D6E6; display: grid; place-items: center; margin-left: -6px; }
.toast-x:hover { color: #fff; background: rgba(255,255,255,.12); }
.toast-act { min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; font-weight: 700; }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- narrower screens ---------- */
@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .owner-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .topbar-tools { flex: none; }
  .role-switch { order: 3; width: 100%; }
  .role-switch button { flex: 1; }
  .tech-side { display: none; }
}
@media (max-width: 700px) {
  .dispatch { height: auto; min-height: 0; padding: 0 12px 150px; }
  .pool { height: auto; max-height: none; overflow: visible; }
  .rows, .parking { height: auto; min-height: 0; overflow-x: auto; overflow-y: visible; }
  .grip { display: none; }
  .grip-bar { cursor: default; }
  .search input { width: 100%; }
  .pool-head .search { flex: 1 1 100%; order: 3; }
  .pool-acts { margin-left: auto; }
  .pool-cards { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .pool-slot { flex: none; }
  .trow { flex-direction: column; min-height: 0; }
  .tname { position: sticky; left: 0; width: 100vw; max-width: calc(100vw - 26px); border-right: 0; border-bottom: 1px solid var(--line-soft); box-shadow: none; }
  .col-resize { display: none; }
  .card, .pool-slot, .add-slot, .drop-slot { --card-w: 236px; }
}
@media (max-width: 640px) {
  .topbar { padding: 8px 12px 10px; }
  .topbar-brand { flex-direction: column; align-items: flex-start; gap: 3px; }
  .topbar-demo { border-left: 0; padding-left: 0; }
  .tb-btn { padding: 0 10px; }
  .appbar { padding: 8px 12px; }
  .board-head h1, .date-btn { font-size: 18px; }
  .board-head .live { display: none; }
  .drawer { width: 100% !important; }
  .dr-resize { display: none; }
  .fld-row { grid-template-columns: 1fr; }
  .tech-wrap { padding: 0 0 140px; display: block; }
  .tech-side { display: flex; width: auto; padding: 12px 16px 4px; }
  .tech-side .muted { display: none; }
  .phone { width: 100%; border-radius: 0; padding: 0; box-shadow: none; background: transparent; }
  .phone-screen { height: auto; border-radius: 0; overflow: visible; }
  .ph-bar { position: static; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px 12px 0; gap: 8px; }
  .tile { padding: 10px; }
  .tile-n { font-size: 24px; }
  .tile-l { font-size: 13px; gap: 5px; }
  .tile-s { display: none; }
  .owner .board-head { padding: 14px 12px 2px; }
  .owner-grid { padding: 12px; }
  .hours th, .hours td { padding: 9px 10px; }
  .bar-col { display: none; }
  .ready li { flex-wrap: wrap; }
  .guide-in { flex-wrap: wrap; padding: 8px 12px; }
  .guide-text { flex-basis: 100%; order: 3; }
  .guide-x { margin-left: auto; }
  .sheet-grid { grid-template-columns: repeat(2, 1fr); }
  .lb-nav { display: none; }
  .bell-menu { position: fixed; left: 12px; right: 12px; top: 120px; width: auto; }
  .modal { top: auto; bottom: 0; transform: translateX(-50%); border-radius: 12px 12px 0 0; max-height: 88vh; width: 100%; max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .card.flash { animation: none; box-shadow: 0 0 0 3px rgba(7,92,196,.55); border-color: var(--blue); }
}
/* Leave demo: the way back to the site */
a.tb-btn { display: inline-flex; align-items: center; text-decoration: none; }
.wordmark-link { display: inline-flex; border-radius: 4px; }
@media (max-width: 520px) { .topbar-demo { display: none; } }
/* Round chips: the digits are centred on their cap height, not the font's line box, so "21" sits dead centre at any zoom */
.count, .badge, .av { display: inline-grid; place-items: center; line-height: 1; text-box: trim-both cap alphabetic; font-variant-numeric: tabular-nums; }
.badge { line-height: 1; }
