/* Layout: a working console. Top bar, one content column; the dispatch board
   runs wide with horizontally scrolling driver lanes. Brand color per company
   comes in as --brand on the shell. */
:root {
  --link: color-mix(in srgb, var(--brand, #3d4f7c) 78%, var(--ink, #111));
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eceef2;
  --line: #d9dce3;
  --ink: #15171c;
  --ink-2: #545a66;
  --ink-3: #868c98;
  --accent: #8a6420;
  --accent-ink: #ffffff;
  --brand: #3d4f7c;
  --focus: #2f6fde;
  --ok: #1f7a4d;
  --ok-bg: #e3f3ea;
  --warn: #9a5b00;
  --warn-bg: #fdf0d9;
  --info: #2a5db0;
  --info-bg: #e4ecfa;
  --violet: #6b3fb0;
  --violet-bg: #efe7fb;
  --bad: #b3261e;
  --bad-bg: #fbe5e3;
  --muted-bg: #eceef2;
  --shadow: 0 1px 2px rgba(20, 22, 28, .06), 0 6px 20px rgba(20, 22, 28, .06);
  --font-ui: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1114; --surface: #171a1f; --surface-2: #20242b; --line: #2e333c;
    --ink: #eceef2; --ink-2: #aab0bb; --ink-3: #7b828e; --accent: #d4ad5f; --accent-ink: #1a1408;
    --focus: #7aa7ff; --ok: #5fd39a; --ok-bg: #133325; --warn: #f0b45a; --warn-bg: #3a2a10;
    --info: #8db4ff; --info-bg: #17284a; --violet: #bc9cf5; --violet-bg: #2b1f45;
    --bad: #ff8a80; --bad-bg: #431c1a; --muted-bg: #242830;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1114; --surface: #171a1f; --surface-2: #20242b; --line: #2e333c;
  --ink: #eceef2; --ink-2: #aab0bb; --ink-3: #7b828e; --accent: #d4ad5f; --accent-ink: #1a1408;
  --focus: #7aa7ff; --ok: #5fd39a; --ok-bg: #133325; --warn: #f0b45a; --warn-bg: #3a2a10;
  --info: #8db4ff; --info-bg: #17284a; --violet: #bc9cf5; --violet-bg: #2b1f45;
  --bad: #ff8a80; --bad-bg: #431c1a; --muted-bg: #242830;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 28px; font-weight: 700; font-stretch: 112%; letter-spacing: -.01em; }
h2 { font-size: 20px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0; }
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mono { font-family: var(--font-ui); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.code { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.label { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* Top bar */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 0 16px; display: flex; align-items: center; gap: 16px; min-height: 56px; flex-wrap: wrap;
}
.topbar::before { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand); }
.wordmark { display: flex; align-items: center; gap: 10px; font-weight: 700; font-stretch: 118%; letter-spacing: .02em; white-space: nowrap; }
.wordmark .seal { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 12px; font-stretch: 100%; letter-spacing: 0; }
.wordmark small { display: block; font-weight: 500; font-stretch: 100%; font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }
.navrow { display: flex; align-items: center; flex: 1; min-width: 0; position: relative; align-self: stretch; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs.fade-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.tabs.fade-l { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px); mask-image: linear-gradient(to right, transparent, #000 40px); }
.tabs.fade-l.fade-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.tabmore { flex: none; background: none; border: 0; border-left: 1px solid var(--line); padding: 8px 4px 8px 12px; margin-left: 4px; cursor: pointer; color: var(--ink-2); font: inherit; font-weight: 550; white-space: nowrap; }
.tabmore:hover, .tabmore[aria-expanded="true"] { color: var(--ink); }
.tabmenu { position: absolute; right: 0; top: calc(100% + 2px); z-index: 40; min-width: 200px; max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: grid; }
.tabmenu[hidden] { display: none; }
.tabmenu button { text-align: left; background: none; border: 0; border-radius: 8px; padding: 10px 12px; font: inherit; color: var(--ink); cursor: pointer; }
.tabmenu button:hover { background: var(--surface-2); }
.tabmenu button[aria-current="true"] { font-weight: 650; background: var(--surface-2); }
.topbar.manytabs { padding-top: 8px; }
.topbar.manytabs .navrow { order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 16px; border-top: 1px solid var(--line); }
.topbar.manytabs .tabs button { padding: 12px 10px 11px; }
.topbar.manytabs .wordmark { margin-right: auto; }
.tabs button { background: none; border: 0; padding: 17px 12px 15px; cursor: pointer; color: var(--ink-2); font-weight: 550; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-current="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.whoname { display: flex; flex-direction: column; line-height: 1.2; text-align: right; color: var(--ink); font-weight: 550; }
.whoname small { color: var(--ink-3); font-weight: 450; font-size: 11.5px; }
@media (max-width: 640px) {
  .topbar { gap: 10px; padding-top: 6px; padding-bottom: 6px; }
  .topbar.manytabs { padding-bottom: 0; }
  .whoname { display: none; }
  .who { gap: 6px; margin-left: auto; }
  .wordmark small { display: none; }
}

.demobar { background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 8px 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.demobar .label { margin-right: 4px; }
.demobar button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 13px; }
.demobar button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.demobar .sp { flex: 1; }

main { padding: 24px 16px 64px; max-width: 1280px; margin: 0 auto; }
main.wide { max-width: none; }
main.narrow { max-width: 600px; }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: var(--r); cursor: pointer; font-weight: 550; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { opacity: .9; }
.btn.brand { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.danger { color: var(--bad); }
.btn.big { padding: 14px 18px; font-size: 16px; width: 100%; }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; color: var(--link); cursor: pointer; padding: 0; text-decoration: underline; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea, .input {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 9px 11px; min-height: 40px;
}
.field textarea { min-height: 70px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent); }
.field .hint { font-size: 12.5px; color: var(--ink-3); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 8px 14px; cursor: pointer; color: var(--ink-2); font-weight: 550; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.panel.flat { box-shadow: none; }
.err { background: var(--bad-bg); color: var(--bad); padding: 10px 12px; border-radius: var(--r); font-size: 14px; }
.note { background: var(--surface-2); color: var(--ink-2); padding: 10px 12px; border-radius: var(--r); font-size: 13px; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--muted-bg); color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-confirmed { background: var(--muted-bg); color: var(--ink-2); }
.s-assigned { background: var(--warn-bg); color: var(--warn); }
.s-accepted { background: var(--info-bg); color: var(--info); }
.s-en_route { background: var(--info-bg); color: var(--info); }
.s-arrived { background: var(--violet-bg); color: var(--violet); }
.s-on_board { background: var(--ok-bg); color: var(--ok); }
.s-completed { background: var(--ok-bg); color: var(--ok); }
.s-cancelled { background: var(--bad-bg); color: var(--bad); }
.pill.count::before { display: none; }
.pill.paid { background: var(--ok-bg); color: var(--ok); }
.pill.unpaid { background: var(--warn-bg); color: var(--warn); }
.pill.off { background: var(--muted-bg); color: var(--ink-3); }

/* Tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
td.r, th.r { text-align: right; }
td.mono, td .mono, td .num, .ref { white-space: nowrap; }
@media (max-width: 640px) {
  .tablewrap { overflow: visible; }
  .tablewrap table, .tablewrap tbody, .tablewrap tfoot { display: block; }
  .tablewrap thead { display: none; }
  .tablewrap tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tablewrap tbody tr:last-child, .tablewrap tfoot tr:last-child { border-bottom: 0; }
  .tablewrap tfoot tr { background: var(--surface-2); }
  .tablewrap td { padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
  .tablewrap td.r { text-align: left; }
  .tablewrap td:first-child, .tablewrap td[colspan] { grid-column: 1 / -1; }
  .tablewrap td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }
  .tablewrap td[data-label=""] { grid-column: 1 / -1; }
  .tablewrap td[data-label=""]::before { display: none !important; }
  .tablewrap td:empty { display: none; }
  .tablewrap tr.click:hover td { background: none; }
  .tablewrap tr.click:hover { background: var(--surface-2); }
}

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.tile b { display: block; font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; }

.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.subtabs button { white-space: nowrap; flex: none; }
@media (max-width: 640px) { .subtabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; } .subtabs::-webkit-scrollbar { display: none; } }
.subtabs button { border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 999px; cursor: pointer; font-weight: 550; color: var(--ink-2); }
.subtabs button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Booking */
.booking { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 860px) { .booking { grid-template-columns: 1fr; } }
.quote { position: sticky; top: 80px; }
.quote .total { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; font-stretch: 110%; }
.qline { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.qline span:first-child { color: var(--ink-2); }
.vehicles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.vcard { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; cursor: pointer; background: var(--surface); text-align: left; display: flex; flex-direction: column; gap: 2px; }
.vcard b { font-weight: 650; }
.vcard span { font-size: 12.5px; color: var(--ink-3); }
.vcard[aria-pressed="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.vcard:disabled { opacity: .45; cursor: not-allowed; }

.brandhead { border-radius: 14px; padding: 22px 24px; background: var(--brand); color: #fff; margin-bottom: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.brandhead h1 { color: #fff; }
.brandhead p { opacity: .85; }

/* Trips (customer) */
.trip { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.route { display: grid; grid-template-columns: 14px 1fr; gap: 2px 10px; font-size: 14px; }
.route i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--ink); margin-top: 6px; }
.route i.end { background: var(--ink); }
.route .bar { width: 2px; background: var(--line); margin-left: 4px; min-height: 8px; }
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.steps div { height: 4px; border-radius: 2px; background: var(--line); }
.steps div.on { background: var(--brand); }
.steplabels { display: grid; grid-template-columns: repeat(6, 1fr); font-size: 11.5px; color: var(--ink-3); gap: 4px; }
.steplabels span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Driver */
.drv-current { border: 2px solid var(--ink); }
.drv-next { font-size: 18px; padding: 16px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { width: 40px; height: 22px; appearance: none; background: var(--line); border-radius: 999px; position: relative; cursor: pointer; transition: background .15s; margin: 0; flex-shrink: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }

/* Dispatch board */
.boardbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.board { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 820px) { .board { grid-template-columns: minmax(0, 1fr); } }
.lanes { display: grid; grid-auto-flow: column; grid-auto-columns: 270px; gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
@media (max-width: 820px) { .lanes { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); } }
.lane { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 140px; min-width: 0; transition: background .12s, border-color .12s; }
.lane.over { border-color: var(--focus); background: color-mix(in srgb, var(--focus) 10%, var(--surface-2)); }
.lane.unassigned { border-style: dashed; }
.lanehead { display: flex; gap: 10px; align-items: center; padding: 2px 4px 6px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 650; font-size: 11px; flex: none; position: relative; }
.avatar.on::after { content: ""; position: absolute; right: -4px; bottom: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); border: 2px solid var(--surface-2); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; box-shadow: var(--shadow); }
.card:hover { border-color: var(--ink-3); }
.card[draggable="true"] { cursor: grab; }
.card.dragging { opacity: .4; }
.card .t { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 14px; }
.card .addr { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.done { opacity: .7; box-shadow: none; }
.empty { color: var(--ink-3); font-size: 13px; padding: 14px 6px; text-align: center; }

/* Modal */
.overlay { position: fixed; inset: 0; background: rgba(10, 12, 16, .5); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 640px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); display: flex; flex-direction: column; }
.modal.wide { max-width: 980px; }
.modal header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal .body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.modal footer { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.x { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-3); padding: 4px 8px; }
.tripedit { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
@media (max-width: 820px) { .tripedit { grid-template-columns: 1fr; } }
.side { display: flex; flex-direction: column; gap: 14px; }
.sidebox { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.timeline li { display: flex; gap: 8px; }
.timeline .mono { color: var(--ink-3); font-size: 12px; min-width: 110px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 80; font-size: 14px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.bad { background: var(--bad); color: #fff; }

/* Sign-in */
.signin { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .signin { grid-template-columns: 1fr; } }
.lede { font-size: 17px; color: var(--ink-2); max-width: 52ch; }
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .roles { grid-template-columns: 1fr; } }
.role { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.role:hover { border-color: var(--ink); }
.role b { font-size: 15px; }
.role span { font-size: 13px; color: var(--ink-2); }
.role .mono { font-size: 12px; color: var(--ink-3); }

.msg { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.msg:last-child { border-bottom: 0; }

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

/* v2: flights, alerts, pricing rules, fleet, driver schedules */
.flightbox { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 8px; background: var(--surface); }
.qline.disc span:last-child { color: var(--ok); }
.alerts { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: var(--r); padding: 10px 14px; margin-bottom: 16px; }
.alerts summary { cursor: pointer; }
.alerts ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.alerts li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; padding: 6px 0; border-top: 1px dashed var(--line); }
.alerts li.al-bad { color: var(--ink); }
.alerts li.al-warn { color: var(--ink-2); }
.warnbox { background: var(--warn-bg); color: var(--warn); border-radius: var(--r); padding: 10px 12px; font-size: 13px; }
.warnbox ul { margin: 4px 0 0; padding-left: 18px; }
.fs { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px 12px; margin: 0; display: grid; gap: 10px; min-width: 0; }
.fs legend { float: left; width: 100%; padding: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.fs legend + * { clear: both; }
.fs:has(> #bk-retf[hidden]) { border-color: transparent; padding: 0; }
.rule { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.rule > div:first-child { flex: 1 1 260px; min-width: 0; }
.rule p { margin: 2px 0 0; }
.sched { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 6px 10px; align-items: center; }
.sched .switch { min-width: 70px; }
.stars { color: var(--accent); letter-spacing: 1px; white-space: nowrap; }
.stars.rate button { background: none; border: 0; padding: 2px 3px; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink-3); }
.stars.rate:hover button { color: var(--accent); }
.stars.rate button:hover ~ button { color: var(--ink-3); }

/* Address autofill */
.acwrap { position: relative; }
.ac { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); max-height: 320px; overflow-y: auto; }
.ac li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.ac li[aria-selected="true"], .ac li[data-i]:hover { background: var(--surface-2); }
.ac .achead { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); cursor: default; padding: 6px 10px 4px; }
.ac .acico { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--muted-bg); color: var(--ink-2); }
.ac .ac-airport { background: var(--info-bg); color: var(--info); }
.ac .ac-recent { background: var(--violet-bg); color: var(--violet); }
.ac .actext { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ac .actext b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac .actext span { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac .actag { flex: none; font-size: 11px; color: var(--ink-3); }

/* Company network */
.lane.partners { border-style: dashed; background: var(--surface-2); }
.partnertag { color: var(--info); font-weight: 600; }
.partnertag.in { color: var(--violet); }
.partnerbox { border-left: 3px solid var(--info); }
.partnerbox.in { border-left-color: var(--violet); }
.partnerpick { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; cursor: pointer; background: var(--surface); }
.partnerpick:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.partnerpick .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.partner { display: grid; gap: 10px; align-content: start; }
.trip.offer { border-left: 3px solid var(--warn); }
td.bad { color: var(--bad); }
.chat { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; min-height: 420px; }
.chatlist { display: flex; flex-direction: column; gap: 4px; }
.chatlist button { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; cursor: pointer; color: var(--ink); }
.chatlist button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.chatpane { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.chathead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.msgs { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 52vh; min-height: 200px; }
.bubble { max-width: 78%; align-self: flex-start; background: var(--surface-2); border-radius: 12px; padding: 8px 12px; display: grid; gap: 2px; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: var(--info-bg); }
.sysmsg { align-self: center; text-align: center; color: var(--ink-2); background: var(--muted-bg); border-radius: 999px; padding: 4px 12px; max-width: 92%; }
@media (max-width: 720px) { .chat { grid-template-columns: minmax(0, 1fr); } .chatlist { flex-direction: row; overflow-x: auto; } .chatlist button { flex: none; } }
.partnerpick input[type="radio"] { appearance: auto; -webkit-appearance: radio; width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; flex: none; border: 0; box-shadow: none; accent-color: var(--ink); }
.partnerpick .grow { flex: 1 1 auto; }
.partnerpick .pill { flex: none; }

/* Live tracking */
.trackmap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); max-width: 680px; }
.trackmap svg { display: block; width: 100%; height: 190px; background-color: var(--surface-2); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 28px 28px; }
.tm-route { fill: none; stroke: var(--ink-3); stroke-width: 3; stroke-dasharray: 2 7; stroke-linecap: round; }
.tm-start { fill: var(--surface); stroke: var(--ink-3); stroke-width: 2; }
.tm-pin { fill: var(--brand); }
.tm-pinhole { fill: #fff; }
.tm-car { fill: var(--info); stroke: #fff; stroke-width: 3; }
.tm-pulse { fill: var(--info); transform-box: fill-box; transform-origin: center; animation: tm-pulse 1.8s ease-out infinite; }
@keyframes tm-pulse { from { transform: scale(.6); opacity: .35; } to { transform: scale(1.7); opacity: 0; } }
.tm-info { display: grid; gap: 1px; padding: 10px 12px; border-top: 1px solid var(--line); }
.card .eta { color: var(--info); font-weight: 600; }
.gpsnote { margin: 0; }

/* Auto-dispatch */
.offertag { color: var(--warn); font-weight: 600; }
.needtag { color: var(--bad); font-weight: 600; }
.suggest { display: grid; gap: 6px; padding: 8px 0 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.suggest .sg { display: flex; gap: 8px; align-items: center; padding: 6px 0; }
.suggest .sg + .sg { border-top: 1px dashed var(--line); }
.suggest .sg.no b { color: var(--ink-3); }
.suggest .bad { color: var(--bad); }

/* Passenger messages and review page */
.cmgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 20px; }
.stars.rate.big button { font-size: 40px; padding: 2px 6px; }
.stars.rate button.on { color: var(--accent); }

/* Company accounts and invoices */
.accttag { color: var(--ink-2); font-weight: 600; }
.tile b.bad, .num.bad { color: var(--bad); }
.invoice { display: grid; gap: 16px; }
@media print {
  body.printing-invoice * { visibility: hidden; }
  body.printing-invoice #inv-print, body.printing-invoice #inv-print * { visibility: visible; }
  body.printing-invoice #inv-print { position: absolute; left: 0; top: 0; width: 100%; padding: 24px; }
}

/* Phone app */
body { padding-bottom: env(safe-area-inset-bottom, 0px); }
.notebanner { position: fixed; z-index: 90; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); width: min(420px, calc(100% - 24px));
  display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; font: inherit; }
.notebanner[hidden] { display: none; }
.notebanner span { color: var(--ink-2); font-size: 14px; }
.steps-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
@media (max-width: 640px) {
  .topbar.fewtabs { padding-bottom: 0; }
  .topbar.fewtabs .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); justify-content: space-around; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .topbar.fewtabs .tabs button { flex: 1; padding: 14px 8px; border-bottom: 0; border-top: 2px solid transparent; }
  .topbar.fewtabs .tabs button[aria-current="true"] { border-top-color: var(--brand); color: var(--ink); }
  body:has(.topbar.fewtabs) main { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}

/* Reports */
.repbar { margin-bottom: 16px; align-items: flex-end; gap: 12px; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
.field.inline input, .field.inline select { width: auto; }
.repchart { margin: 16px 0; }
.repchart h2, .repgrid h2 { font-size: 16px; margin: 0; }
.chart { position: relative; margin-top: 10px; overflow: hidden; }
.chart svg { display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .grid.base { stroke: var(--ink-3); }
.chart .ax { fill: var(--ink-3); font-size: 11.5px; font-family: var(--font-ui); font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--accent); }
.chart .bar.on { fill: color-mix(in srgb, var(--accent) 70%, var(--ink)); }
.chart .hit { fill: transparent; cursor: default; }
.charttip { position: absolute; pointer-events: none; display: grid; gap: 1px; padding: 7px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 13px; white-space: nowrap; box-shadow: var(--shadow); font-variant-numeric: tabular-nums; }
.charttip[hidden] { display: none; }
.repgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.repgrid .panel { display: grid; gap: 12px; align-content: start; }
.shares { display: grid; gap: 10px; }
.share { display: grid; gap: 4px; font-size: 14px; }
.share .track { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.share .track i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.rephead { font-size: 16px; margin: 24px 0 10px; }
.printonly { display: none; }
@media print {
  body:not(.printing-invoice) .topbar, body:not(.printing-invoice) .repbar, body:not(.printing-invoice) .pagehead .row, body:not(.printing-invoice) .demobar, body:not(.printing-invoice) #rp-more, body:not(.printing-invoice) .repchart .seg { display: none !important; }
  .printonly { display: block; }
  .panel, .tablewrap, .tile { break-inside: avoid; }
}
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile b { font-size: 20px; } }

/* Event quotes */
.ride { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0; display: grid; gap: 12px; background: var(--surface); min-width: 0; }
.ride .grid3, .ride .grid2 { gap: 10px; }
.ridepay { display: grid; grid-template-columns: minmax(0, 200px) 1fr auto; gap: 12px; align-items: end; padding-top: 10px; border-top: 1px dashed var(--line); }
.ridepay .r { text-align: right; display: grid; }
.ridepay b.num { font-size: 18px; }
.qtotal { display: grid; align-content: end; gap: 2px; }
.qtotal b { font-size: 22px; font-variant-numeric: tabular-nums; }
.qride { display: grid; gap: 3px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.eventlink { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 16px; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; }
.eventlink b { color: var(--brand); }
.eventlink:hover { border-color: var(--brand); }
a.quotecard { display: grid; gap: 6px; color: inherit; text-decoration: none; }
a.quotecard:hover { border-color: var(--brand); }
@media (max-width: 640px) {
  .ride .grid3, .ride .grid2 { grid-template-columns: 1fr; }
  .ridepay { grid-template-columns: 1fr 1fr; }
  .ridepay > div.small { grid-column: 1 / -1; order: 3; }
}

/* Message delivery status */
.dtag { font-weight: 600; color: var(--ink-2); }
.dtag.ok { color: var(--ok, #1f7a4d); }
.dtag.bad { color: var(--bad, #b42318); }

/* Premium booking: stops, vehicle models, name sign */
.route i.mid { width: 7px; height: 7px; margin-left: 1px; border-width: 2px; border-color: var(--ink-3); }
.vcard .vmodel { font-size: 12px; color: var(--ink-3); font-style: italic; }
.stoprow { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.stoprow .grow { flex: 1 1 220px; }
.stoprow .swait { flex: 0 0 110px; }
.namesign { position: fixed; inset: 0; z-index: 1000; background: #fff; color: #111; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; cursor: pointer; }
.namesign .ns-name { font-size: clamp(44px, 13vw, 140px); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; word-break: break-word; }
.namesign .ns-co { font-size: clamp(18px, 4vw, 32px); font-weight: 600; color: #444; }
.namesign .ns-hint { position: absolute; bottom: 18px; font-size: 13px; color: #888; }
.policy div { line-height: 1.4; }
.switch > input[type="checkbox"] { width: 40px; height: 22px; min-height: 0; padding: 0; border: 0; flex-shrink: 0; }
.waitbox { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line, #e3e5ea); border-radius: 10px; }
.err-text { color: var(--bad); }
.clockbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.sheet { display: grid; gap: 10px; padding: 4px 0 18px; border-bottom: 1px dashed var(--line); margin-bottom: 18px; }
.sheet h2 { margin: 0; font-size: 18px; }
.sheettable { width: 100%; border-collapse: collapse; font-size: 13px; }
.sheettable th, .sheettable td { text-align: left; vertical-align: top; padding: 6px 6px; border-bottom: 1px solid var(--line); }
.sheettable th.r, .sheettable td.r { text-align: right; }
.sheetsign { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--ink-2); padding-top: 6px; }
@media print {
  body.printing-sheet * { visibility: hidden; }
  body.printing-sheet #sheet-print, body.printing-sheet #sheet-print * { visibility: visible; color: #000 !important; }
  body.printing-sheet #sheet-print { position: absolute; left: 0; top: 0; width: 100%; padding: 16px; background: #fff; }
  body.printing-sheet .sheet { break-after: page; border: 0; }
  body.printing-sheet .modal, body.printing-sheet .overlay { position: static; overflow: visible; max-height: none; box-shadow: none; }
}
.check { display: flex; gap: 8px; align-items: flex-start; }
.check input { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.termstext { white-space: pre-wrap; line-height: 1.5; }
.termsbox { z-index: 60; }

/* Live map on the dispatch board */
.fleetmap { margin-bottom: 16px; }
.fm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.fm-head h2 { margin: 0; }
.fm-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; flex: 1; }
.fm-legend > span { white-space: nowrap; }
.fm-legend > span:last-child { white-space: normal; }
.fm-legend .fm-dot { margin-right: 5px; vertical-align: -1px; }
.fm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ink-3); }
.fm-dot.en_route { background: var(--info); }
.fm-dot.arrived { background: var(--warn); }
.fm-dot.on_board { background: var(--ok); }
.fm-dot.free { background: var(--ink-2); }
.fm-dot.off { background: var(--ink-3); opacity: .6; }
.fm-dot.pin { background: var(--bad); border-radius: 50% 50% 50% 0; }
.fm-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; margin-top: 10px; }
.fm-canvas { min-width: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface-2); }
.fm-svg { display: block; width: 100%; height: auto; }
.fm-bg { fill: var(--surface-2); }
.fm-mark rect { fill: var(--ink-3); opacity: .55; }
.fm-mark text { fill: var(--ink-3); font: 12px var(--font-ui); }
.fm-route { stroke-width: 3; stroke-dasharray: 7 6; stroke-linecap: round; opacity: .7; stroke: var(--info); }
.fm-route.on_board { stroke: var(--ok); }
.fm-pin { cursor: pointer; }
.fm-pin path, .fm-pin circle { fill: var(--surface); stroke: var(--ink-2); stroke-width: 2; }
.fm-pin.open path, .fm-pin.open circle { fill: var(--bad); stroke: var(--surface); }
.fm-car { cursor: default; }
.fm-car[data-trip] { cursor: pointer; }
.fm-car circle { stroke: var(--surface); stroke-width: 2.5; fill: var(--ink-2); }
.fm-car.en_route circle { fill: var(--info); }
.fm-car.arrived circle { fill: var(--warn); }
.fm-car.on_board circle { fill: var(--ok); }
.fm-car.off circle { fill: var(--ink-3); }
.fm-car.off { opacity: .6; }
.fm-car text { fill: #fff; font: 700 11px var(--font-ui); pointer-events: none; }
.fm-car circle.fm-halo { fill: none; stroke-width: 2; stroke: currentColor; opacity: .35; }
.fm-pin text { fill: var(--ink-2); font: 600 11px var(--font-ui); paint-order: stroke; stroke: var(--surface-2); stroke-width: 3px; }
.fm-car.en_route { color: var(--info); }
.fm-car.arrived { color: var(--warn); }
.fm-car.on_board { color: var(--ok); }
.fm-car:hover circle:not(.fm-halo), .fm-pin:hover path { filter: brightness(1.15); }
.fm-scale line { stroke: var(--ink-2); stroke-width: 2; }
.fm-scale text { fill: var(--ink-2); font: 11px var(--font-ui); }
.fm-google { height: 420px; width: 100%; }
.fm-side { max-height: 420px; overflow-y: auto; }
.fm-list { list-style: none; margin: 0; padding: 0; }
.fm-list li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: 13px; }
.fm-list li:last-child { border-bottom: 0; }
.fm-list li .fm-dot { margin-top: 4px; }
.fm-list li.click { cursor: pointer; border-radius: 6px; }
.fm-list li.click:hover { background: var(--surface-2); }
.fm-list li div { min-width: 0; }
@media (max-width: 760px) {
  .fm-head h2 { flex: 1; }
  .fm-legend { order: 3; flex-basis: 100%; }
  .fm-body { grid-template-columns: 1fr; }
  .fm-side { max-height: 220px; }
  .fm-google { height: 320px; }
}
@media print { .fleetmap { display: none; } }

/* Card on file */
.note.ok { background: var(--ok-bg); color: var(--ok); }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.cardbox { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; background: var(--surface); }
.cardbox p { margin: 6px 0 0; }
.paylist { margin: 6px 0 0; padding: 0; list-style: none; }
.paylist li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.paylist li:last-child { border-bottom: 0; }

/* Past rides as compact rows */
.pastlist { padding: 0; overflow: hidden; }
.pastrow { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pastrow:last-child { border-bottom: 0; }
.pr-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pr-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.stars.sm { font-size: 13px; }
.stars.rate.sm button { font-size: 18px; padding: 0 2px; }
@media (max-width: 640px) {
  .steplabels { display: block; text-align: left; }
  .steplabels span { display: none; }
  .steplabels span.cur { display: inline; color: var(--ink-2); font-weight: 600; }
}

/* Polish v27 */
.pwhint { text-transform: none; letter-spacing: 0; font-weight: 500; }
@media (max-width: 640px) { .tiles.three, .tiles:has(> .tile:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .tiles.three .tile, .tiles:has(> .tile:nth-child(3):last-child) .tile { padding: 10px; } .tiles.three .tile b, .tiles:has(> .tile:nth-child(3):last-child) .tile b { font-size: 18px; } .tiles.three .label, .tiles:has(> .tile:nth-child(3):last-child) .label { font-size: 10px; letter-spacing: .04em; } }
.drv-btns .btn { width: 100%; justify-content: center; text-align: center; }
.drv-inc { justify-self: start; align-self: flex-start; color: var(--ink-2); }
@media (max-width: 860px) { .signin > form { order: -1; } }
.panel.empty { display: grid; gap: 4px; padding: 28px 16px; font-size: 14px; color: var(--ink); text-align: center; }
.warntext { color: var(--warn); font-weight: 550; }
.nowrap { white-space: nowrap; }
.alerts li { flex-wrap: nowrap; align-items: flex-start; }
.alerts li .pill { flex: none; }
.alerts li .linkbtn { text-align: left; }
.savebar { position: sticky; bottom: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); padding: 12px 0; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .boardbar > .row.small { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: calc(100% + 16px); margin-right: -16px; padding-right: 16px; }
  .boardbar > .row.small::-webkit-scrollbar { display: none; }
  .boardbar > .row.small > * { flex: none; white-space: nowrap; }
  .boardbar #d-new { width: 100%; }
}

/* Ride calendar */
.calbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.caltitle { margin: 0 0 0 6px; font-size: 20px; }
.calsum { margin: 0 0 10px; }
.calmonth { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); gap: 1px; }
.calhead { background: var(--surface-2); padding: 8px 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.calcell { background: var(--surface); min-height: 118px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.calcell.out { background: var(--bg); }
.calcell.out .calday { color: var(--ink-3); }
.calday { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: none; border: 0; padding: 2px 4px; border-radius: 6px; font: inherit; font-weight: 650; font-size: 13px; color: var(--ink); cursor: pointer; text-align: left; }
.calday:hover { background: var(--surface-2); }
.calcell.today .calday { color: var(--brand); }
.calcell.today { box-shadow: inset 0 0 0 2px var(--brand); }
.calcount { font-size: 11px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.calchips { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.calchip { display: block; width: 100%; text-align: left; border: 0; border-radius: 6px; padding: 3px 6px; font: inherit; font-size: 12px; line-height: 1.3; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calchip b { font-weight: 650; font-variant-numeric: tabular-nums; }
.calchip:hover, .calcard:hover { filter: brightness(.96); }
.calmore { background: none; border: 0; padding: 2px 6px; font: inherit; font-size: 12px; color: var(--link); cursor: pointer; text-align: left; }
.calweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.calcol { display: flex; flex-direction: column; gap: 6px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-height: 160px; }
.calcol.today { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.calcolhead { display: flex; flex-direction: column; padding: 2px 4px 6px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.calcard { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 0; border-radius: 8px; padding: 7px 8px; font: inherit; font-size: 13px; cursor: pointer; min-width: 0; }
.calcard > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.calcard .spread { flex-wrap: nowrap; }
.calname { font-weight: 600; color: var(--ink); }
@media (max-width: 900px) {
  .calweek { grid-template-columns: minmax(0, 1fr); }
  .calcol { min-height: 0; }
  .calcolhead { flex-direction: row; justify-content: space-between; align-items: baseline; }
}
@media (max-width: 640px) {
  .calcell { min-height: 58px; padding: 3px; }
  .calchips { display: none; }
  .calday { flex-direction: column; align-items: flex-start; gap: 3px; padding: 2px; width: 100%; height: 100%; }
  .calcount { background: var(--brand); color: #fff; }
  .calhead { padding: 6px 2px; text-align: center; letter-spacing: 0; font-size: 10.5px; }
  .caltitle { font-size: 17px; }
}
.calcard .spread > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calcard .spread > b { flex: none; }

/* Automatic farm-out */
.autofarm { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .autofarm { grid-template-columns: minmax(0, 1fr); } }
.num-in { width: 84px !important; min-height: 36px; padding: 6px 8px; }
.aflist { list-style: decimal; margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.aflist li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.aflist li > * { vertical-align: middle; }
.aflist li { display: list-item; }
.aflist li .check { display: inline-flex; max-width: calc(100% - 90px); }
.aflist li > .row { float: right; }
.aflist li.off { color: var(--ink-3); }
.aflist li.off b { color: var(--ink-2); font-weight: 550; }
.check input[type="checkbox"] { accent-color: var(--brand); }

/* Chauffeur photo and car */
.face { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); font-weight: 650; font-size: 16px; color: var(--ink-2); }
.face.sm { width: 34px; height: 34px; font-size: 11px; }
.face.lg { width: 84px; height: 84px; font-size: 24px; }
.chauffeur { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.panel > .chauffeur { border: 0; padding: 0; background: none; }
.photofield { display: flex; align-items: center; gap: 16px; }

/* Text allowance */
.txbar { height: 8px; border-radius: 99px; background: var(--muted-bg); overflow: hidden; }
.txbar span { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.txbar.low span { background: var(--warn); }
.txbar.out span { background: var(--bad); }
.texts details summary { cursor: pointer; color: var(--ink-2); }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .grid4 { grid-template-columns: 1fr 1fr; } }

/* Ride when you land */
.landfs #bk-land-info { margin: 0 0 8px; }
.landtag { color: var(--info); }

/* Account, privacy, store apps */
.appfoot { max-width: 1200px; margin: 0 auto; padding: 8px 16px 28px; text-align: center; color: var(--ink-3); }
.appfoot a { color: var(--ink-2); }
.danger-zone { border-color: var(--bad-bg); }
html.native-app .appfoot { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }

/* Travel agents */
.agentbox { border: 1px solid var(--line, #e3e5ea); border-radius: 10px; padding: 12px; background: var(--soft, #f7f8fa); }
.agentbox .seg { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.forline { color: var(--ink, inherit); }

/* Home page (v43) */
.lp { display: flex; flex-direction: column; gap: 56px; }
.lp-hero { padding-top: 12px; }
.lp-hero h1 { font-size: clamp(30px, 5vw, 46px); }
.lp-cta { padding: 12px 18px; font-size: 15.5px; }
.lp-ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); }
.lp-ticks li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 6px; }
.lp-sec { scroll-margin-top: 80px; }
.lp-head { display: grid; gap: 6px; margin-bottom: 18px; max-width: 70ch; }
.lp-head h2 { font-size: 26px; }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.lp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: grid; gap: 6px; align-content: start; }
.lp-steps { list-style: none; counter-reset: lp; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.lp-steps li { counter-increment: lp; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: grid; gap: 4px; }
.lp-steps li::before { content: counter(lp); width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.lp-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; align-items: stretch; }
.lp-plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 20px; display: flex; flex-direction: column; gap: 8px; }
.lp-plan.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
.lp-plan ul { margin: 6px 0 10px; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; flex: 1; }
.lp-plan .btn { width: 100%; }
.lp-flag { position: absolute; top: -11px; left: 18px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 650; padding: 2px 10px; border-radius: 999px; }
.lp-price { display: flex; align-items: baseline; gap: 4px; }
.lp-price b { font-size: 36px; font-weight: 750; font-variant-numeric: tabular-nums; }
.lp-price span { color: var(--ink-2); }
.lp-trial { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: start; }
@media (max-width: 760px) { .lp-trial { grid-template-columns: 1fr; padding: 18px; } }
.lp-faq { display: grid; gap: 8px; max-width: 800px; }
.lp-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.lp-faq summary { cursor: pointer; font-weight: 600; }
.lp-faq details p { margin-top: 8px; }
.lp-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; color: var(--ink-3); }
