/* Option A: clean and light. Each company sets --accent and --on-accent on <body>. */
:root {
  --bg: #F6F7F9; --surface: #FFFFFF; --border: #E3E6EB; --ink: #18202B; --muted: #5B6675;
  --accent: #0F766E; --on-accent: #FFFFFF;
  --ok-bg: #E7F6EE; --ok-ink: #14532D; --err-bg: #FDECEC; --err-ink: #8A1C1C; --warn-bg: #FFF4DB; --warn-ink: #7A4B00;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- frame ---- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; min-width: 0; }
.brand img { height: 36px; width: auto; max-width: 140px; object-fit: contain; border-radius: 6px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; flex: none; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spacer { flex: 1; }
.who { color: var(--muted); font-size: .9rem; display: none; }
.linkbtn { background: none; border: 0; padding: 10px 6px; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; }

.nav { background: var(--surface); border-bottom: 1px solid var(--border); }
.nav-in { max-width: 1200px; margin: 0 auto; padding: 0 12px; display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nav a { padding: 12px 12px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; min-height: 44px; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

.page { max-width: 1200px; margin: 0 auto; padding: 20px 16px 48px; }
.narrow { max-width: 440px; margin: 0 auto; }
.center-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; }

/* ---- cards, forms, buttons ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat b { display: block; font-size: 1.9rem; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .9rem; }

label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=file], select {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #C9CFD8; border-radius: 10px; font: inherit; color: var(--ink); background: #fff;
}
input[type=color] { width: 64px; height: 46px; padding: 3px; border: 1px solid #C9CFD8; border-radius: 10px; background: #fff; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--ink); border-color: #C9CFD8; }
.btn.danger { background: #B42318; color: #fff; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.alert { border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-weight: 500; }
.alert.ok { background: var(--ok-bg); color: var(--ok-ink); }
.alert.err { background: var(--err-bg); color: var(--err-ink); }
.alert.warn { background: var(--warn-bg); color: var(--warn-ink); }
.secret { font: 700 1.25rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: #F1F3F6; border: 1px dashed #AEB6C2; border-radius: 10px; padding: 12px 14px; word-break: break-all; user-select: all; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 560px; }
th, td { text-align: left; padding: 14px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
thead th { border-top: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--ok-bg); color: var(--ok-ink); }
.pill.off { background: var(--err-bg); color: var(--err-ink); }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; border: 1px solid rgba(0,0,0,.15); }
.logo-preview { max-height: 64px; max-width: 220px; border: 1px solid var(--border); border-radius: 8px; padding: 6px; background: #fff; margin-bottom: 8px; display: block; }
.head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }

@media (min-width: 720px) {
  .who { display: block; }
  .page { padding: 28px 24px 56px; }
  .card { padding: 24px; }
}

/* ---- driver jobs (phone first) ---- */
.daybar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.daytitle { text-align: center; flex: 1; }
.daydate { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.daytitle h1 { font-size: 1.35rem; margin: 0; }
.daysub { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.chip { display: inline-block; background: color-mix(in srgb, var(--accent) 14%, #fff); color: var(--accent); font-weight: 700; font-size: .75rem; padding: 1px 8px; border-radius: 999px; }
.daybtn { width: 48px; height: 48px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; color: var(--ink); flex: none; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.pick { margin-bottom: 12px; }
.pick summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 8px 0; list-style: none; min-height: 44px; display: flex; align-items: center; }
.pick summary::-webkit-details-marker { display: none; }
.pick summary::after { content: " \25BE"; margin-left: 4px; }
.notice { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 10px 12px; font-size: .9rem; margin: 0 0 16px; }
.notice svg { flex: none; margin-top: 2px; }
.empty { text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed #C9CFD8; border-radius: var(--radius); padding: 32px 16px; }
.empty p { margin: 8px 0 0; }
.joblist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 24px; align-items: start; }
.job { background: var(--surface); border: 1px solid #C9CFD8; border-radius: 16px; overflow: hidden; box-shadow: 0 3px 10px rgba(16,24,40,.10); display: flex; flex-direction: column; }
.job::before { content: ""; height: 5px; background: #18202B; }
.job.in::before { background: #2563EB; }
.job.is-started { background: #FBFEFC; border-color: #BFE5CF; }
.job.is-started::before { background: #16A34A; }
.job-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 0; }
.job-time { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.job-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag { padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800; background: #EEF0F3; color: #18202B; }
.tag.in { background: #DBEAFE; color: #1E3A8A; }
.tag.ok { background: #DCFCE7; color: #14532D; }
.details { margin: 12px 16px 0; padding: 0; border-top: 1px solid var(--border); }
.drow { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.drow dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.drow dd { margin: 0; overflow-wrap: anywhere; }
.drow dd.strong { font-weight: 700; font-size: 1.05rem; }
.k { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.hidden-note { color: #B42318; font-size: .9rem; font-weight: 600; }
.job-actions { padding: 14px 16px 0; }
.btn.block { width: 100%; min-height: 56px; font-size: 1.05rem; }
.btn.start { letter-spacing: .02em; }
.btn.receive { background: #18202B; color: #fff; letter-spacing: .02em; }
.step-hint { margin: 6px 0 0; text-align: center; color: var(--muted); font-size: .85rem; }
.tag.grey { background: #E3E6EB; color: #3A4452; }
.btn.done { background: #E3E6EB; color: #5B6675; cursor: default; }
.job-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 16px 16px; }
.job-links .btn { min-height: 46px; }
.kv { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--border); }
.kv:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 560px) { .kv { flex-direction: row; gap: 16px; } .kv .k { flex: 0 0 170px; padding-top: 2px; } }

@media (min-width: 720px) { .daybar { max-width: 560px; margin-left: auto; margin-right: auto; } }

/* date / filter panel */
.pick-panel { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin: 4px 0 8px; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.fld { display: flex; flex-direction: column; gap: 4px; flex: 1 1 160px; position: relative; }
.fld label { margin: 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.ctl { -webkit-appearance: none; appearance: none; width: 100%; height: 48px; min-height: 48px; padding: 0 44px 0 14px; border: 1px solid #C9CFD8; border-radius: 12px; font: inherit; color: var(--ink); background-color: #fff; background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; cursor: pointer; position: relative; }
.ctl.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6675' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
.ctl.date { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6675' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.ctl.date::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ctl:hover { border-color: #9AA4B2; }
.pick-actions { display: flex; gap: 8px; flex: 1 1 100%; }
.pick-actions .btn { flex: 1; }
@media (min-width: 720px) { .pick-actions { flex: 0 0 auto; } .pick-actions .btn { flex: none; } }

/* holidays, job list, multi-date picker */
.chips { display: flex; gap: 8px; margin-bottom: 8px; }
.chipbtn { padding: 8px 16px; border-radius: 999px; border: 1px solid #C9CFD8; background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; min-height: 40px; display: inline-flex; align-items: center; }
.chipbtn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.hlist { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.hrow { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid #C9CFD8; border-radius: 14px; padding: 12px 14px; box-shadow: 0 2px 6px rgba(16,24,40,.08); flex-wrap: wrap; }
.hdate { width: 52px; text-align: center; background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); border-radius: 12px; padding: 6px 0; flex: none; }
.hday { display: block; font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.hmon { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.hinfo { flex: 1 1 160px; min-width: 0; }
.hact { display: flex; gap: 8px; align-items: flex-start; }
.hact .btn { min-height: 40px; padding: 0 14px; }
.del summary { list-style: none; cursor: pointer; }
.del summary::-webkit-details-marker { display: none; }
.del form { position: absolute; right: 14px; margin-top: 6px; background: #fff; border: 1px solid #C9CFD8; border-radius: 12px; padding: 12px; box-shadow: 0 8px 24px rgba(16,24,40,.18); z-index: 3; }
.del form p { margin: 0 0 8px; }
.hrow { position: relative; }
.formcard { max-width: 520px; }
.types { border: 0; padding: 0; margin: 0 0 16px; }
.types legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; padding: 0; }
.opt { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 1rem; padding: 10px 12px; border: 1px solid #C9CFD8; border-radius: 12px; margin-bottom: 8px; min-height: 46px; cursor: pointer; }
.opt input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.md { border: 1px solid #C9CFD8; border-radius: 14px; padding: 12px; background: #fff; }
.md-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.md-title { font-weight: 700; }
.md-nav { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #C9CFD8; background: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink); }
.md-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.md-dow { text-align: center; font-size: .7rem; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 4px 0; }
.md-day { min-height: 44px; border: 1px solid transparent; border-radius: 10px; background: #F6F7F9; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); }
.md-day.on { background: var(--accent); color: var(--on-accent); }
.md-chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.md-chip { border: 0; background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; cursor: pointer; min-height: 34px; }
[hidden] { display: none !important; }
.summary { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; margin: 12px 0; }
.table-wrap.stack table { min-width: 0; }
.stack td .tag { white-space: nowrap; }
@media (max-width: 719px) {
  .stack table, .stack thead, .stack tbody, .stack tr, .stack td { display: block; }
  .stack thead { position: absolute; left: -9999px; }
  .stack tr { border-top: 1px solid var(--border); padding: 10px 14px; }
  .stack tr:first-child { border-top: 0; }
  .stack td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 96px 1fr; gap: 8px; }
  .stack td::before { content: attr(data-label); font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; align-self: center; }
}

/* holiday approval */
.tag.hs-pending { background: #FEF3C7; color: #92400E; }
.tag.hs-approved { background: #DCFCE7; color: #166534; }
.tag.hs-declined { background: #FEE2E2; color: #000000; }
.hsum { margin-bottom: 12px; }
.hrow.req { align-items: flex-start; }
h2 { font-size: 1.1rem; margin: 28px 0 10px; }

/* ===== holidays: modern look ===== */
.small { font-size: .85rem; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: .92rem; }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: color-mix(in srgb, var(--accent) 14%, #fff); color: var(--accent); }
.avatar.lg { width: 48px; height: 48px; font-size: 1.15rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: #EEF0F3; color: #3A4452; width: fit-content; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.st-pending { background: #FEF3C7; color: #92400E; }
.pill.st-approved { background: #DCFCE7; color: #166534; }
.pill.st-declined { background: #FEE2E2; color: #991B1B; }
.pill.st-none { background: #EEF0F3; color: #3A4452; }

.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin: 0 0 8px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(16,24,40,.05); border-top: 4px solid #C9CFD8; }
.tile.ok { border-top-color: #22A559; } .tile.warn { border-top-color: #F2A100; } .tile.accent { border-top-color: var(--accent); }
.tile.wide { grid-column: 1 / -1; }
.tile-k { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.tile-v { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.tile-v.small { font-size: 1.3rem; }
.tile-s { color: var(--muted); font-size: .8rem; }
.bar-wrap { grid-column: 1 / -1; }
.bar { height: 10px; border-radius: 999px; background: #E9ECF1; display: flex; overflow: hidden; }
.bar.small { height: 6px; margin: 6px 0 4px; }
.bar i { display: block; height: 100%; }
.b-ok { background: #22A559; } .b-warn { background: #F2A100; }

.hgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.hcard { position: relative; display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-left: 5px solid #C9CFD8; border-radius: 16px; padding: 12px 14px; box-shadow: 0 2px 8px rgba(16,24,40,.06); flex-wrap: wrap; }
.hcard.st-approved { border-left-color: #22A559; } .hcard.st-pending { border-left-color: #F2A100; } .hcard.st-declined { border-left-color: #D92D20; }
.hcard .hdate { width: 58px; display: flex; flex-direction: column; align-items: center; background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent); border-radius: 12px; padding: 6px 0; flex: none; }
.hcard .hmon { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.hcard .hday { font-size: 1.5rem; font-weight: 800; line-height: 1.05; }
.hcard .hwd { font-size: .68rem; opacity: .8; font-weight: 600; }
.hcard .hinfo { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hcard .htitle { font-size: 1rem; }
.hcard .hact { display: flex; gap: 8px; align-items: flex-start; }
.del form { right: 10px; }

.yearbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.yearlabel { font-weight: 700; background: var(--surface); border: 1px solid var(--border); padding: 9px 16px; border-radius: 999px; }
h2.sec { margin: 28px 0 12px; font-size: 1.05rem; letter-spacing: -.01em; }
.reqlist { display: grid; gap: 12px; }
.req { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; background: var(--surface); border: 1px solid #F3D48A; border-left: 5px solid #F2A100; border-radius: 16px; padding: 14px 16px; box-shadow: 0 2px 8px rgba(16,24,40,.06); }
.req-main { flex: 1 1 220px; min-width: 0; }
.req-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.req-dates { color: var(--ink); font-size: .95rem; }
.req-act { display: flex; gap: 8px; flex: 1 1 100%; }
.req-act .btn { flex: 1; }
@media (min-width: 720px) { .req-act { flex: 0 0 auto; } .req-act .btn { flex: none; } }
.card.flat { box-shadow: none; }
.alloc { display: grid; gap: 4px; }
.alloc-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.alloc-row:first-child { border-top: 0; }
.alloc-name { flex: 1; min-width: 0; }
.alloc-in { width: 92px; flex: none; }
.alloc-in label { font-size: .7rem; margin: 0 0 2px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* admin home notice */
.hnotice { display: block; background: #FFF8E6; border: 1px solid #F3D48A; border-radius: 16px; padding: 8px; margin-bottom: 20px; }
.hn-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: #7A4B00; }
.hn-dot { width: 10px; height: 10px; border-radius: 50%; background: #F2A100; box-shadow: 0 0 0 4px rgba(242,161,0,.25); }
.hn-row { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 10px 12px; margin-top: 6px; text-decoration: none; color: var(--ink); min-height: 56px; }
.hn-row:hover { box-shadow: 0 2px 8px rgba(16,24,40,.12); }
.hn-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hn-text small { color: var(--muted); font-size: .82rem; font-weight: 400; }
.hn-go { color: var(--accent); font-weight: 700; white-space: nowrap; }
.opt { transition: border-color .15s, background .15s; }
.opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, #fff); font-weight: 700; }
.formcard { border-radius: 16px; box-shadow: 0 2px 8px rgba(16,24,40,.06); }

/* logo shown at 250 x 54, no name beside it */
.brand img.brand-logo { width: 250px; height: 54px; max-width: 100%; object-fit: contain; object-position: left center; border-radius: 0; }
.logo-preview { width: 250px; height: 54px; max-width: 100%; max-height: none; object-fit: contain; }
@media (max-width: 520px) { .brand { flex: 1 1 auto; min-width: 0; } .brand img.brand-logo { width: auto; max-width: 100%; } }
.stack tr.received td { background: #E6E6E6; }
.stack tr.received { background: #E6E6E6; }
.stack tr.started td { background: #EAF7EE; }
.jl-status .btn { white-space: nowrap; }

/* booking management */
.fld.grow { flex: 1 1 220px; }
.pick-panel.jobid { margin-top: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; word-break: break-all; }
.red { color: #D92D20; font-weight: 600; }
.bk-act { white-space: nowrap; }
.btn.danger-text { color: #B42318; border-color: #F3B8B2; }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 16px 0; }
.bk table { width: 100%; }
@media (max-width: 719px) { .bk-act { display: flex !important; gap: 8px; padding-top: 8px !important; } .bk-act::before { content: none !important; } }

/* ===== add booking ===== */
.bform .card { border-radius: 16px; box-shadow: 0 2px 8px rgba(16,24,40,.06); }
.bform h2 { font-size: 1.05rem; margin: 0 0 14px; }
.cols { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cols { grid-template-columns: repeat(4, 1fr); } }
textarea.ctl, .bform input.ctl, .bform select.ctl { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #C9CFD8; border-radius: 10px; font: inherit; color: var(--ink); background: #fff; }
textarea.ctl { min-height: 72px; resize: vertical; }
.errs { margin: 6px 0 0 18px; padding: 0; }
.results { border: 1px solid var(--border); border-radius: 12px; background: #fff; margin-top: 6px; overflow: hidden; box-shadow: 0 8px 24px rgba(16,24,40,.12); }
.res { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 10px 14px; border: 0; border-top: 1px solid var(--border); background: #fff; font: inherit; text-align: left; cursor: pointer; min-height: 52px; }
.res:first-child { border-top: 0; }
.res:hover, .res:focus-visible { background: color-mix(in srgb, var(--accent) 8%, #fff); }
.res-none { padding: 12px 14px; color: var(--muted); }
.pills { border: 0; padding: 0; margin: 0 0 16px; }
.pills legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: 6px; }
.pill-opt { display: inline-block; margin: 0 8px 8px 0; }
.pill-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill-opt span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid #C9CFD8; border-radius: 999px; background: #fff; font-weight: 600; cursor: pointer; }
.pill-opt input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pill-opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 0; font-size: 1.05rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { width: 52px; height: 30px; border-radius: 999px; background: #C9CFD8; position: relative; flex: none; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + .sw { background: var(--accent); }
.switch input:checked + .sw::after { transform: translateX(22px); }
.switch input:focus-visible + .sw { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }
.sw-label { font-weight: 700; }
.leg-body { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.leg.off { background: #FAFBFC; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 0 0 4px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.note { border-radius: 10px; padding: 10px 12px; margin: 0 0 16px; background: var(--warn-bg); color: var(--warn-ink); font-size: .9rem; }
.note.ok { background: var(--ok-bg); color: var(--ok-ink); margin-top: 8px; }
.note-line + .note-line { margin-top: 6px; }
.note .linkbtn { min-height: 32px; padding: 0 4px; }

/* provisional / late notices on the admin home page */
.hnotice.late{border-color:#f0b8b8;background:#fff5f5}.hnotice.late .hn-dot{background:#d33}.hnotice.late .avatar{background:#d33;color:#fff}
.hnotice.wait .avatar{background:#e8f3f2}
.head-actions{display:flex;gap:8px;flex-wrap:wrap}
.dup{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:8px}

/* ===== add booking: modern layout ===== */
.bform { max-width: 920px; margin: 0 auto; padding-bottom: 96px; }
.bform .card.step { padding: 0; border-radius: 18px; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.05); overflow: hidden; }
.step-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, #fff), #fff); border-bottom: 1px solid var(--border); }
.step-head h2 { margin: 0; font-size: 1.1rem; }
.step-no { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; font-size: .95rem; flex: none; }
.bform .card.step > :not(.step-head) { margin-left: 20px; margin-right: 20px; }
.bform .card.step > .step-head + * { margin-top: 20px; }
.bform .card.step > :last-child { margin-bottom: 20px; }
.bform .leg-body { margin: 0; padding: 20px; border-top: 0; }
.bform .leg-body > * { margin-left: 0; margin-right: 0; }
.bform .leg.off .step-head { background: #FAFBFC; border-bottom-color: transparent; }
.bform .leg.off .step-no { background: #C9CFD8; }

.seg { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 18px; }
@media (min-width: 640px) { .seg { grid-template-columns: 1fr 1fr; } }
.seg-opt { display: block; cursor: pointer; margin: 0; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-card { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px 16px 52px; border: 2px solid var(--border); border-radius: 16px; background: #fff; position: relative; transition: border-color .15s, box-shadow .15s, background .15s; }
.seg-card::before { content: ""; position: absolute; left: 18px; top: 19px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #C9CFD8; background: #fff; }
.seg-card b { font-size: 1.05rem; }
.seg-card small { color: var(--muted); font-size: .88rem; line-height: 1.35; }
.seg-opt input:checked + .seg-card { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 16%, transparent); }
.seg-opt input:checked + .seg-card::before { border-color: var(--accent); background: radial-gradient(var(--accent) 0 45%, #fff 50%); }
.seg-opt input:focus-visible + .seg-card { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 2px; }

.bform .field { margin-bottom: 14px; }
.bform .field > label, .bform .pills legend { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); margin-bottom: 6px; }
.bform input.ctl, .bform select.ctl, .bform textarea.ctl { border: 1.5px solid #D5DAE1; border-radius: 12px; background: #FBFCFD; transition: border-color .15s, box-shadow .15s, background .15s; }
.bform input.ctl:hover, .bform select.ctl:hover, .bform textarea.ctl:hover { border-color: #B8C0CB; }
.bform input.ctl:focus, .bform select.ctl:focus, .bform textarea.ctl:focus { outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.bform .find input.ctl { min-height: 52px; padding-left: 44px; border-radius: 14px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235B6675' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center; }
.cols.c2 { grid-template-columns: 1fr; } .cols.c3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .cols.c2 { grid-template-columns: repeat(2, 1fr); } .cols.c3 { grid-template-columns: repeat(3, 1fr); } }

.sec { padding: 4px 0 6px; margin-bottom: 14px; }
.sec + .sec { border-top: 1px dashed var(--border); padding-top: 16px; }
.sec h3 { margin: 0 0 12px; font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); font-weight: 800; }
.bform .pill-opt span { min-height: 40px; padding: 0 16px; border-radius: 999px; border-width: 1.5px; font-size: .92rem; }
.bform .md { border: 1.5px solid #D5DAE1; border-radius: 14px; background: #fff; padding: 10px; }
.bform [hidden] { display: none !important; }

.actionbar { position: sticky; bottom: 0; z-index: 4; margin: 8px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.actionbar .check { margin: 0; }
.actionbar .btn.lg { min-height: 50px; padding: 0 28px; font-size: 1.02rem; border-radius: 14px; }
@media (max-width: 639px) { .actionbar .btn.lg { width: 100%; } }
.note.warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #F1D9A0; border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.note.warn .dup { margin-top: 10px; }

/* option buttons sit side by side and wrap only when there is no room */
.bform .pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bform .pills legend { flex: 0 0 100%; float: none; width: 100%; }
.bform .pill-opt { margin: 0; }
.hdr-preview { border: 1px solid var(--border); border-radius: 12px; padding: 8px; background: #fff; margin-bottom: 12px; overflow: hidden; }
.hdr-preview img { display: block; max-width: 100%; height: auto; }
.tag.warn { background: var(--warn-bg); color: var(--warn-ink); }
.step-head .tag { margin-left: auto; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.fld.grow { position: relative; }
.results.suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; max-height: 340px; overflow: auto; }
.res.active { background: color-mix(in srgb, var(--accent) 10%, #fff); }

/* Daily Booksheet */
.bs-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.bs-date { display: flex; gap: 6px; align-items: center; margin: 0; }
.bs-date input { min-height: 40px; }
.bs-types { margin-left: auto; display: flex; gap: 6px; }
.bs-layout { display: grid; grid-template-columns: 1fr 260px; gap: 16px; align-items: start; }
.bs-row { display: grid; grid-template-columns: 1fr auto; column-gap: 14px; background: #fff; border: 2px solid #a7a7a7; border-left: 6px solid #C9CFD8; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.bs-row.st-started { background: #d7ebdc; border: 2px solid #a7a7a7; border-left: 6px solid #4ADE80; }
.bs-row.st-completed { background: #ddf2ff; border-left-color: #60A5FA; }
.bs-row.st-workshop { background: #FFF8DB; border-left-color: #EAB308; }
.bs-row.st-allocate { background: #FBEAF6; border-left-color: #DE81CA; }
.bs-row.st-office { background: #F1F2F4; border-left-color: #9AA3B0; }
.bs-row.st-received { background: #ebebeb; border-color: #AEB5C0; border-left-color: #5B6472; }
.bs-row.st-received .bs-box { background: rgba(255,255,255,.55); border-color: #AEB5C0; }
.bs-row.prov { border-left-color: #F59E0B; border-style: dashed; border-left-style: solid; }
.bs-row.late { background: #FEE2E2; border-color: #F87171; border-left-color: #DC2626; color: #000000; }
.bs-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bs-time { font-weight: 800; font-size: 1.15rem; margin-right: 4px; }
.bs-id { margin-left: auto; font-size: .75rem; color: #6B7482; }
.bs-body { margin: 6px 0; }
.bs-assign { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 6px 0; }
.bs-assign label { font-size: .78rem; font-weight: 700; display: grid; gap: 2px; }
.bs-assign select { min-height: 40px; }
.bs-msg { font-size: .85rem; } .bs-msg.good { color: #166534; } .bs-msg.bad { color: #B91C1C; font-weight: 700; }
.bs-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chipbtn.sm { padding: 4px 12px; min-height: 34px; font-size: .85rem; cursor: pointer; font-family: inherit; }
.bs-total { text-align: right; margin: 8px 0; }
.bs-side section { background: #fff; border: 1px solid #E3E6EB; border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; }
.bs-side h2 { font-size: 1rem; margin: 0 0 6px; }
.bs-avail { list-style: none; margin: 0; padding: 0; }
.bs-avail li { padding: 4px 0; border-bottom: 1px solid #F0F2F5; }
.bs-avail li.off { color: #B91C1C; font-weight: 700; }
.bs-avail small { display: block; font-weight: 500; }
@media (max-width: 860px) { .bs-layout { grid-template-columns: 1fr; } .bs-types { margin-left: 0; } }

.bs-row > .bs-top, .bs-row > .bs-body, .bs-row > .bs-assign, .bs-row > .bs-links { grid-column: 1; }
.bs-row > .bs-btns { grid-column: 2; grid-row: 1 / span 4; display: flex; flex-direction: column; gap: 6px; align-items: center; margin: 0; }
.bs-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.bs-links .inl { margin: 0; }
.bsw { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #9AA3B0; padding: 0; cursor: pointer; background: #fff; }
.bsw.on { outline: 3px solid var(--accent); outline-offset: 2px; }
.bsw-started { background: lightgreen; } .bsw-completed { background: #ddf2ff; } .bsw-workshop { background: gold; }
.bsw-allocate { background: #DE81CA; } .bsw-office { background: #D6D6D6; } .bsw-received { background: #E6E6E6; }
.bsw-reset { background: #fff linear-gradient(135deg, transparent 45%, #B91C1C 45%, #B91C1C 55%, transparent 55%); }
.bsw { -webkit-appearance: none; appearance: none; box-sizing: border-box; flex: 0 0 auto; }
.bs-links { align-items: center; align-self: start; }
.bs-row > .bs-assign { align-self: start; }

.bs-date input[type=date] { min-height: 40px; padding: 0 14px; border: 1px solid #C9CFD8; border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; }
.bs-date input[type=date]:focus { border-color: var(--accent); }
.bs-date .btn.sm { border-radius: 999px; min-height: 40px; }
.bs-assign { align-items: flex-end; }
.bs-assign .chipbtn.sm { min-height: 40px; box-sizing: border-box; margin-bottom: 0; }
.bs-assign select { display: block; margin: 0; }
.bs-assign label { line-height: 1.2; }
.bs-assign .bs-msg:empty { display: none; }
.bs-assign .bs-msg { align-self: center; flex-basis: 100%; }
.bs-assign { align-items: flex-start; }
.bs-assign .chipbtn.sm { margin-top: 17px; }
.bs-assign .bs-msg { margin-top: 0; }
.bs-assign .chipbtn.np { margin-top: 0; }
.bs-mail { display: flex; gap: 6px; margin: 0 0 0 8px; } .bs-mail .btn { border-radius: 999px; min-height: 40px; }
.bs-mail > div { display: flex; flex-direction: column; gap: 2px; } .bs-stamp { font-size: .72rem; color: #6B7482; padding-left: 10px; }
.bs-bar { align-items: flex-end; }
.bform .type-how { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; } .bform .type-how .field.how { margin: 0 0 16px; min-width: 180px; }
.bs-drive { font-size: .9rem; font-weight: 600; color: var(--accent); margin-top: 2px; } .bs-drive.muted { font-weight: 400; color: #6B7482; }
.bs-drive a { color: inherit; text-decoration: underline dotted; } .bs-drive a:hover { text-decoration: underline; }
.bform .pa-row { margin-top: 4px; } .bform .pa-row .pa-pick { max-width: 360px; margin-top: 10px; }
.bform label .linkbtn { min-height: 0; padding: 0 4px; font-size: .9em; }
.vdot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.2); }
.vtags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag.warn.bad { background: #FEE4E2; color: #7A271A; }
input.colorpick { padding: 4px; width: 90px; cursor: pointer; }

.waitbar-wrap { background: #FFF3CD; border-bottom: 1px solid #F3D48A; }
.waitbar { display: flex; align-items: center; gap: 10px; max-width: 1200px; margin: 0 auto; padding: 10px 16px; color: #5C4300; text-decoration: none; flex-wrap: wrap; }
.waitbar:hover { background: #FFEDB3; }
.waitbar-dot { width: 10px; height: 10px; border-radius: 50%; background: #E8A400; flex: none; }
.waitbar-n { background: #E8A400; color: #fff; border-radius: 999px; padding: 1px 10px; font-weight: 800; font-size: .85rem; }
.waitbar-go { margin-left: auto; font-weight: 700; }

.paxlux .pl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.paxlux .pl .ctl { min-width: 0; }

/* buttons never wrap onto two lines */
.btn { white-space: nowrap; }
.tag.route { background: #E0E7FF; color: #1E2A78; }

/* + button for extra pick up / drop off addresses */
.addr-row { display: flex; gap: 6px; align-items: stretch; position: relative; }
.addr-row > .ctl { flex: 1 1 auto; min-width: 0; }
.addr-more .addr-row { margin-top: 6px; }
.addbtn { flex: 0 0 auto; width: 34px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.addbtn:hover { background: #f3f5f8; }
.copy-row { margin: 0 0 12px; clear: both; }
.copy-row .copy-leg { float: none; min-height: 36px; padding: 0 14px; font-weight: 600; }

/* booksheet: customer, pick up and drop off each in their own box; long text is cut off, click a box to read it all */
.bs-boxes { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.bs-box { background: rgba(255,255,255,.7); border: 1px solid #D9DEE5; border-radius: 8px; padding: 5px 9px; min-width: 0; cursor: pointer; }
.bs-box:hover, .bs-box:focus-visible { border-color: var(--accent); outline: none; }
.bs-box > small { display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #6B7482; }
.bs-box .bs-val { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-box .bs-sub { display: block; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-box.open .bs-val, .bs-box.open .bs-sub { white-space: normal; overflow: visible; word-break: break-word; }
.bs-row .bs-drive { margin-top: 4px; }
@media (max-width: 700px) { .bs-boxes { grid-template-columns: 1fr; } }
.bs-flight { font-weight: 700; text-decoration: underline; }

/* booksheet: drive time, its messages and the job number in black */
.bs-row .bs-drive, .bs-row .bs-drive.muted, .bs-row .bs-drive a, .bs-row .bs-drive .muted, .bs-row .bs-id { color: #000000; }
.addr-row .fav-open2 { flex: 0 0 auto; align-self: center; white-space: nowrap; }

/* "(most used)" and address suggestion lists: compact rows */
.fav-list .res, .results.suggest .res { padding: 5px 10px; min-height: 0; line-height: 1.25; font-size: .92rem; }

/* Offer Job: row colour and the list of who accepted (tick) and declined (red x) */
.bs-row.st-offered { background: #f6f9cf; }
.bs-offer { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; max-width: 300px; font-size: .9rem; margin-top: 17px; }
.bs-offer small { flex-basis: 100%; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #6B7482; margin: 0 0 -3px; }
.bs-offer .of-yes { color: #166534; font-weight: 700; }
.bs-offer .of-no { color: #B91C1C; font-weight: 700; }

/* booksheet Edit / Delete in the theme colour, like Offer Job */
.bs-assign .chipbtn.themebtn { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.bs-assign .chipbtn.themebtn:hover { filter: brightness(1.1); }

/* booksheet: editable pick up / drop off boxes (save by themselves) and a red Delete */
.bs-box.bs-edit { cursor: text; position: relative; }
.bs-box.bs-edit .bs-addr { display: block; width: 100%; border: 0; background: transparent; padding: 1px 0; font: inherit; color: inherit; text-overflow: ellipsis; min-width: 0; outline: none; }
.bs-box.bs-edit:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.bs-box.bs-edit .bs-saved { position: absolute; right: 8px; top: 4px; font-size: .68rem; font-weight: 700; }
.bs-box.bs-edit .bs-saved.ok { color: #166534; } .bs-box.bs-edit .bs-saved.bad { color: #B91C1C; }
.bs-box.bs-edit.err { border-color: #DC2626; }
.bs-assign .chipbtn.themebtn-red { background: #B42318; border-color: #B42318; color: #fff; font-weight: 700; }
.bs-assign .chipbtn.themebtn-red:hover { filter: brightness(1.1); }
.bs-box.bs-edit .bs-addr { font-weight: 400; }

/* Job Offered dropdown on the booksheet */
.bs-offer { display: block; margin-top: 17px; max-width: 300px; font-size: .9rem; position: relative; }
.bs-offer > summary { cursor: pointer; list-style: none; border: 1px solid #7FC8D6; background: #fff; border-radius: 8px; padding: 6px 10px; font-weight: 700; }
.bs-offer > summary::-webkit-details-marker { display: none; }
.bs-offer > summary::after { content: ' \25BE'; }
.bs-offer[open] > summary::after { content: ' \25B4'; }
.bs-offer .of-count { font-weight: 700; margin-left: 6px; }
.bs-offer .of-list { list-style: none; margin: 4px 0 0; padding: 4px; border: 1px solid #7FC8D6; background: #fff; border-radius: 8px; }
.bs-offer .of-list li { padding: 3px 6px; }
.bs-offer .of-pick { background: none; border: 0; padding: 3px 6px; margin: -3px -6px; width: calc(100% + 12px); text-align: left; font: inherit; font-weight: 700; color: #166534; cursor: pointer; border-radius: 6px; }
.bs-offer .of-pick:hover { background: #E7F6EC; }
.bs-offer .of-msg { display: block; font-size: .8rem; color: #B91C1C; font-weight: 700; }

/* Suggest driver */
.bs-suggest{margin-top:17px}
.bs-suggest .sg-out{margin-top:6px;padding:6px 8px;border:1px solid #a7a7a7;border-radius:6px;background:#fff;font-size:.85rem;min-width:16rem}
.sg-pick{background:none;border:0;padding:0;font:inherit;font-weight:600;cursor:pointer;color:inherit;text-decoration:underline}
.allow-tbl td{vertical-align:middle;padding:.25rem .4rem}
.sg-warn{color:#b91c1c;margin:4px 0}.sg-veh,.sg-skip{background:none;border:0;padding:0;font:inherit;cursor:pointer;text-decoration:underline}

/* pick up / drop off boxes on the booksheet: one line while resting, the whole address when you click in */
.bs-box.bs-edit textarea.bs-addr { resize: none; overflow: hidden; white-space: nowrap; height: 1.4em; line-height: 1.4; }
.bs-box.bs-edit textarea.bs-addr:focus { white-space: pre-wrap; overflow-wrap: anywhere; }
#pwa-install[hidden], #pwa-notify[hidden], #pwa-hint[hidden] { display: none !important; }

/* settings: allowance rules and customers as blocks on a phone */
.allow-tbl td { vertical-align: middle; }
.allow-days .check { margin-right: .5rem; }
@media (max-width: 719px) {
  .allow-wrap { border: 0; background: none; }
  .allow-wrap tr { border: 1px solid var(--border) !important; border-radius: 12px; margin-bottom: 10px; background: var(--surface); }
  .allow-wrap td { grid-template-columns: 82px 1fr !important; align-items: center; }
  .allow-wrap td.allow-days { display: block; }
  .allow-wrap td.allow-days::before { display: block; margin-bottom: 4px; }
  .allow-wrap input.ctl { max-width: 100% !important; width: 100%; }
  .stack.cards { border: 0; background: none; overflow: visible; }
  .stack.cards tr { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; background: var(--surface); padding: 12px 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
  .stack.cards tr:first-child { border-top: 1px solid var(--border); }
  .stack.cards td:first-child { font-size: 1.05rem; margin-bottom: 4px; }
  .stack.cards td { grid-template-columns: 78px 1fr; overflow-wrap: anywhere; }
  .stack.cards td.cust-act { display: block; padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--border); }
  .stack.cards td.cust-act::before { content: none; }
}

/* icon buttons in the top bar: install (download) and notifications (bell, with a line through it when off) */
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: none; color: var(--accent); cursor: pointer; padding: 0; }
.iconbtn:hover, .iconbtn:focus-visible { background: color-mix(in srgb, var(--accent) 12%, #fff); }
#pwa-notify[data-state=on] .ic-off, #pwa-notify[data-state=off] .ic-on { display: none; }
#pwa-install[hidden], #pwa-notify[hidden] { display: none !important; }

/* past jobs: driver, vehicle and PA shown greyed and fixed */
.bs-locked{display:flex;flex-wrap:wrap;gap:8px;align-items:stretch}
.bs-locked span{display:block;background:#eee;color:#666;border:1px solid #ddd;border-radius:6px;padding:4px 10px;min-width:120px}
.bs-locked small{display:block;font-size:11px;color:#888}
.bs-locked b{font-weight:600}

.bs-box.bs-edit textarea.bs-addr.locked{color:#777;cursor:not-allowed}
.bs-box.bs-edit:has(textarea.locked){background:#eee;border-color:#ddd;cursor:not-allowed}
.cb-list{display:flex;flex-direction:column;gap:16px;margin:12px 0}
.cb-row{border:1px solid var(--line,#ddd);border-radius:8px;padding:8px 10px;display:grid;grid-template-columns:minmax(150px,auto) 1fr auto;gap:10px;align-items:center;background:#fff}
.cb-row.cb-past{background:#f6f6f6}
.cb-when{display:flex;flex-direction:column;gap:2px}
.cb-row .bs-boxes{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.cb-act{display:flex;gap:6px}
@media (max-width:760px){.cb-row{grid-template-columns:1fr}.cb-row .bs-boxes{grid-template-columns:1fr}}

.bs-row.old, .bs-row.old.late, .bs-row.old.st-started, .bs-row.old.st-offered, .bs-row.old.st-received { background: #f1f1f1; border-color: #c8c8c8; border-left-color: #b5b5b5; }
.leg-locked { opacity: .65; background: #f1f1f1; }

.cb-facts{grid-column:1 / -1}
.card.step > .step-head[role=button]{cursor:pointer;user-select:none}
.card.step > .step-head[role=button]::after{content:"\25BE";margin-left:auto;color:#666;transition:transform .15s}
.card.step.shut > .step-head[role=button]::after{transform:rotate(-90deg)}
.bform .card.step.shut > :not(.step-head), .card.step.shut > :not(.step-head){display:none !important}
.card.step.shut > .step-head{border-bottom-color:transparent}

/* ---- public pages: welcome and Get a quote ---- */
.pub-home { max-width: 560px; margin: 28px auto; text-align: center; }
.pub-choices { display: grid; gap: 12px; margin-top: 18px; }
.pub-card { display: block; background: #fff; border: 1px solid #DDE2E9; border-radius: 14px; padding: 20px 18px; text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.pub-card b { display: block; font-size: 1.2rem; color: var(--accent); margin-bottom: 4px; }
.pub-card span { color: #5B6675; }
.pub-card:hover, .pub-card:focus-visible { border-color: var(--accent); }
.qtoggle { display: flex; gap: 0; margin-bottom: 16px; border: 1px solid #C9CFD8; border-radius: 12px; overflow: hidden; }
.qtoggle label { flex: 1; text-align: center; cursor: pointer; }
.qtoggle input { position: absolute; opacity: 0; pointer-events: none; }
.qtoggle span { display: block; padding: 12px 8px; font-weight: 600; background: #fff; }
.qtoggle input:checked + span { background: var(--accent); color: var(--on-accent); }
.qtoggle input:focus-visible + span { outline: 3px solid #1d4ed8; outline-offset: -3px; }
.qgrid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 560px) { .qgrid { grid-template-columns: 1fr 1fr; } }
.qgroup { border: 1px solid #DDE2E9; border-radius: 12px; padding: 12px 14px 14px; margin: 6px 0 16px; }
.qgroup legend { font-weight: 700; padding: 0 6px; }
.qaddr-row { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; }
.qaddr-row input { flex: 1; min-width: 0; }
.qtools { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 8px; }
.qpop { display: grid; gap: 6px; margin-bottom: 10px; }
.qpop-item { text-align: left; background: #F5F7FA; border: 1px solid #DDE2E9; border-radius: 10px; padding: 10px 12px; font: inherit; cursor: pointer; }
.qpop-item:hover { border-color: var(--accent); }
.qlabel { display: block; font-weight: 600; margin: 8px 0 4px; }
.qgroup textarea { width: 100%; }
.qfacts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.qfacts dt { color: #5B6675; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.qfacts dd { margin: 0; }
.tag.red { background: #FEE2E2; color: #7F1D1D; }

.quote-card .qgroup legend .qpop-btn { font-weight: 500; font-size: .9rem; }
.quote-card .qgroup { background: #FBFCFD; border: 1.5px solid #E3E7EC; border-radius: 14px; }
.quote-card .qaddr-row input.ctl { padding-right: 14px; }
.quote-card .qpop { margin-top: 2px; }
.quote-card .qtoggle { border-width: 1.5px; border-radius: 14px; }
.quote-card .btn.block { min-height: 54px; border-radius: 14px; font-size: 1.05rem; }
.quote-card .alert.warn { font-weight: 600; }

.cp-list { display: grid; gap: 8px; }
.cp-card { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1.5px solid #E3E7EC; border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.cp-card:hover { border-color: #B8C0CB; }
.cp-card:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); }
.cp-card input { margin-top: 4px; accent-color: var(--accent); }
.cp-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cp-name { font-size: 1.02rem; }
.cp-line { color: #3A4452; font-size: .92rem; overflow-wrap: anywhere; }
.cp-why { color: var(--accent); font-size: .8rem; font-weight: 700; margin-top: 2px; }
.quote-card h1 { margin: 0 0 14px; }
.quote-card > .alert.warn { margin: 0 0 18px; }
.qtoggle { align-items: stretch; margin-top: 4px; position: relative; }
.qtoggle label { display: flex; margin: 0; }
.qtoggle span { flex: 1; display: flex; align-items: center; justify-content: center; line-height: 1.2; }
.qtoggle.q3 label { flex: 1; }

/* Unconfirmed bookings: customer cell for an online booking, and a gap between bookings */
.nc { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; max-width: 100%; }
.nc b { overflow-wrap: anywhere; }
.nc .tag { white-space: normal; font-size: .72rem; padding: 3px 10px; line-height: 1.25; }
.nc .btn { white-space: nowrap; }
@media (min-width: 720px) {
  .bk.cards { border: 0; background: none; box-shadow: none; overflow: visible; }
  .bk.cards table { border-collapse: separate; border-spacing: 0 10px; }
  .bk.cards tbody td { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); vertical-align: top; }
  .bk.cards tbody td:first-child { border-left: 1px solid var(--border); border-radius: 12px 0 0 12px; }
  .bk.cards tbody td:last-child { border-right: 1px solid var(--border); border-radius: 0 12px 12px 0; }
}

/* ---- inbox ---- */
.inbox { display: grid; gap: 8px; }
.inbox-row { display: flex; flex-direction: column; gap: 3px; background: #fff; border: 1.5px solid #E3E7EC; border-radius: 14px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.inbox-row:hover { border-color: #B8C0CB; }
.inbox-row.unread { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); }
.inbox-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inbox-top small { margin-left: auto; }
.inbox-sub { font-weight: 600; font-size: .92rem; }
.inbox-snip { color: #5B6675; font-size: .9rem; overflow-wrap: anywhere; }
.thread { display: grid; gap: 10px; }
.bubble { max-width: 640px; background: #fff; border: 1.5px solid #E3E7EC; border-radius: 14px; padding: 10px 14px; }
.bubble.mine { margin-left: auto; background: color-mix(in srgb, var(--accent) 8%, #fff); border-color: color-mix(in srgb, var(--accent) 35%, #E3E7EC); }
.bubble-head small { color: #7A8594; margin-left: 6px; }
.bubble-body { margin-top: 4px; overflow-wrap: anywhere; }
.qt-link { flex: 1; text-align: center; padding: 12px 8px; font-weight: 600; text-decoration: none; color: var(--ink); background: #fff; }
.qt-link.on { background: var(--accent); color: var(--on-accent); }
.msgbar-wrap { padding: 8px 14px 0; }
.msgbar { display: flex; gap: 10px; align-items: center; background: #FEF3C7; border: 1px solid #F5D77A; color: #78350F; border-radius: 12px; padding: 10px 14px; text-decoration: none; font-weight: 600; }

/* quote reply: the deposit box only shows when Deposit is chosen */
.qterms .depbox { display: none; flex-basis: 100%; margin-top: 10px; }
.qterms:has(input[value="deposit"]:checked) .depbox { display: block; }

/* gap below the Job ID box on Booking Management */
.pick-panel.jobid { margin-bottom: 18px; }
.alert[hidden] { display: none !important; }
.enter-co{display:flex;gap:6px;align-items:center;margin:0}
.enter-co select{max-width:190px;padding:6px 8px}
/* the driver's Job List on a phone: each job is its own card with a gap underneath */
@media (max-width: 719px) {
  .stack.jl { border: 0; background: none; box-shadow: none; overflow: visible; }
  .stack.jl tr { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 16px; padding: 12px 14px; overflow: hidden; background: var(--surface); box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
  .stack.jl tr:first-child { border-top: 1px solid var(--border); }
  .stack.jl td { padding: 4px 0; overflow-wrap: anywhere; }
  .stack.jl td.jl-status { padding-top: 8px; margin-top: 4px; }
}

/* driver location pin on the Daily Booksheet, and the sharing box on the driver's Jobs page */
.bsw-pin { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; color: #DC2626; text-decoration: none; line-height: 0; }
.bsw-pin svg { width: 20px; height: 20px; display: block; }
.bsw-pin.stale { color: #6B7280; }
.shareloc { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding: 12px 14px; margin: 0 0 14px; }
.shareloc label { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.shareloc input { width: 22px; height: 22px; }
.shareloc .muted { flex-basis: 100%; margin: 0; }

/* account bookings are invoiced: no paid / deposit; Xero is for account bookings only */
form:has(input[name="cust_type"][value="account"]:checked) .no-acct { display: none; }
form:not(:has(input[name="cust_type"][value="account"]:checked)) .only-acct { display: none; }
form:has(input[name="cust_type"][value="account"]:checked) .xerobox:not(.xt-account),
form:has(input[name="cust_type"][value="cash_cheque"]:checked) .xerobox:not(.xt-cash_cheque),
form:has(input[name="cust_type"][value="card"]:checked) .xerobox:not(.xt-card) { display: none; }

.bsw-pdf { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; text-decoration: none; line-height: 0; }
.bsw-pdf svg { width: 20px; height: 20px; display: block; }

/* Accounts */
.acc-tot { display: flex; gap: 20px; flex-wrap: wrap; padding: 10px 16px; }
.acc-row { display: grid; grid-template-columns: minmax(180px, 2fr) 110px minmax(130px, 1fr) minmax(130px, 1fr) auto; gap: 10px 14px; align-items: end; padding: 10px 14px; margin: 0 0 8px; background: var(--card, #fff); border: 1px solid #e5e7eb; border-radius: 10px; }
.acc-row.is-paid { border-left: 4px solid #16a34a; }
.acc-who { display: flex; flex-direction: column; gap: 2px; }
.acc-f { display: flex; flex-direction: column; gap: 4px; }
.acc-f label { font-size: .8rem; color: #6b7280; }
.acc-btns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.pillbtn { border: 1px solid #9ca3af; background: #fff; color: #111827; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .85rem; cursor: pointer; }
.pillbtn.on { background: #16a34a; border-color: #16a34a; color: #fff; }
.pillbtn.xero { border-color: #13b5ea; color: #0b6b8a; }
.acc-net { text-align: center; max-width: 420px; }
.acc-big { font-size: 2.2rem; font-weight: 700; }
@media (max-width: 860px) { .acc-row { grid-template-columns: 1fr 1fr; } .acc-who, .acc-btns { grid-column: 1 / -1; } .acc-btns { justify-content: flex-start; } }

/* the receipt button shows once Paid is ticked */
.rcptbox { display: none; }
form:has(input[name="out_pay"][value="paid"]:checked) .rcpt-out,
form:has(input[name="out_dep_paid"][value="1"]:checked) .rcpt-out,
form:has(input[name="in_pay"][value="paid"]:checked) .rcpt-in,
form:has(input[name="in_dep_paid"][value="1"]:checked) .rcpt-in { display: block; }
.pillbtn.receipt { border-color: #2563eb; color: #1d4ed8; }

/* Sales report */
.sr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 8px; }
.sr-tile { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.sr-tile b { font-size: 1.6rem; line-height: 1.15; letter-spacing: -.01em; }
.sr-tile.hero { border-color: var(--accent); }
.sr-card { margin-bottom: 14px; }
.sr-card summary { cursor: pointer; }
.sr-chart { width: 100%; height: auto; display: block; --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; }
.sr-chart .sr-grid { stroke: var(--border); stroke-width: 1; }
.sr-chart .sr-tick { fill: var(--muted); font-size: 11px; font-family: inherit; }
.sr-chart .sr-lab { fill: var(--ink); font-size: 13px; font-family: inherit; }
.sr-chart .sr-val { fill: var(--muted); font-size: 12px; font-family: inherit; }
.sr-chart .sr-hit { fill: transparent; }
.sr-chart .sr-col:hover .sr-hit { fill: rgba(0, 0, 0, .04); }
.sr-s1 { fill: #2a78d6; } .sr-s2 { fill: #eb6834; } .sr-s3 { fill: #1baf7a; }
.sr-legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 6px; font-size: .9rem; color: var(--muted); }
.sr-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.sr-sw.s2 { background: #eb6834; } .sr-sw.s3 { background: #1baf7a; }

/* history */
.hist { margin-top: 14px; }
.hist summary { cursor: pointer; }
.hist-row { padding: 8px 0; border-top: 1px solid var(--border); }
.hist-row:first-of-type { margin-top: 8px; }

/* fuel expenses: no sideways scrolling, the fuel box and Save button stay in view */
.fuel-tbl { overflow-x: visible; }
.fuel-tbl .fuel-in input { width: 110px; text-align: right; }
.fuel-tbl .fuel-total td:last-child { text-align: right; }
@media (min-width: 761px) { .fuel-tbl td, .fuel-tbl th { padding-left: 8px; padding-right: 8px; } .fuel-tbl .fuel-in { text-align: right; } }

/* payment reminders: customer-type switches */
.rem-switches { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.rem-sw { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface, #fff); color: inherit; text-decoration: none; font-weight: 600; }
.rem-sw b { font-size: .72rem; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; background: #e3e6ea; color: #444; }
.rem-sw.on b { background: #1baf7a; color: #fff; }
a.rem-sw:hover { border-color: #2a78d6; }

/* job completed: pale blue, also for every job dated before today */
.bs-row.st-completed, .bs-row.old.st-completed, .bs-row.old.late.st-completed, .bs-row.late.st-completed { background: #ddf2ff; border-color: #a7a7a7; border-left-color: #60A5FA; }
.bsw-completed { box-shadow: inset 0 0 0 1px #8fb9d6; }

/* driver documents: drag and drop box */
.dropzone { position: relative; border: 2px dashed #9aa6b6; border-radius: 12px; padding: 22px 14px; text-align: center; background: #f8fafc; transition: background .15s, border-color .15s; }
.dropzone.over { background: #e6f1ff; border-color: #2a78d6; }
.dropzone.has { border-style: solid; border-color: #1baf7a; }
.dropzone input[type=file] { display: block; width: 100%; margin: 0 0 8px; }
.dropzone .dz-text { display: block; color: #5b6675; font-size: .92rem; }
.dropzone .dz-list { display: block; margin-top: 6px; font-weight: 600; word-break: break-word; }
.alert.warn { background: #fff8e6; border: 1px solid #f0d28a; color: #6b4e00; }

/* Banking Express: tidy filter panel and journey cards */
.xp-filter { padding: 14px 16px; margin: 4px 0 12px; }
.xp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 14px; }
.xp-grid .fld { flex: none; }
.xp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border, #e5e7eb); }
.acc-tot { margin-bottom: 12px; }
.acc-row { display: flex; flex-direction: column; gap: 12px; align-items: stretch; padding: 14px 16px; margin: 0 0 12px; border-radius: 12px; }
.acc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.acc-who b { font-size: 1.02rem; }
.acc-state { display: flex; gap: 6px; flex-wrap: wrap; }
.acc-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.acc-f label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted, #6b7280); margin: 0; }
.acc-f .ctl { width: 100%; }
.acc-in { display: flex; gap: 8px; align-items: center; }
.acc-in .ctl { flex: 1 1 80px; min-width: 0; }
.acc-in .pillbtn { flex: 0 0 auto; white-space: nowrap; }
.acc-none { min-height: 40px; display: flex; align-items: center; color: var(--muted, #6b7280); font-size: .85rem; }
.acc-row .acc-btns { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border, #e5e7eb); }
.acc-grp { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.acc-row .pillbtn { padding: 7px 14px; }
@media (max-width: 700px) {
  .acc-row { grid-template-columns: none; }
  .acc-fields { grid-template-columns: 1fr; }
  .acc-row .acc-btns { flex-direction: column; align-items: stretch; }
  .acc-grp .pillbtn { flex: 1 1 auto; text-align: center; }
  .acc-row .acc-btns > .btn { width: 100%; }
}

/* User Guide */
.gd-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.gd-tab { padding: 6px 14px; border: 1px solid var(--border, #e5e7eb); border-radius: 999px; text-decoration: none; color: inherit; font-size: .9rem; }
.gd-tab.on { background: var(--accent, #1d4ed8); border-color: var(--accent, #1d4ed8); color: #fff; }
.gd-index { margin-bottom: 12px; }
.gd-index div { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
.gd-sec { margin-bottom: 12px; scroll-margin-top: 70px; }
.gd-sec h2 { margin-top: 0; }
.gd-sec p { max-width: 75ch; line-height: 1.55; }
.gd-steps, .gd-list { max-width: 75ch; line-height: 1.55; padding-left: 1.4em; }
.gd-steps li, .gd-list li { margin: 4px 0; }
@media print { .nav, .gd-print, .gd-tabs, .gd-index, .msgbar-wrap, header { display: none !important; } .gd-sec { break-inside: avoid; box-shadow: none; border: 0; } }

form:has(input[name="cust_type"][value="account"]:checked) .paylink { display: none; }


.waitbar-st { border-radius: 999px; padding: 1px 10px; font-weight: 700; font-size: .8rem; background: #fff; border: 1px solid #F3D48A; }
.waitbar-st.unpaid { color: #B91C1C; border-color: #FCA5A5; }
.waitbar-st.paid { color: #166534; border-color: #86EFAC; }

/* master admin top bar: the menu is its own row of links; on a phone the bar wraps into three tidy rows (name and icons, company picker, menu) */
.mnav { display: flex; align-items: center; gap: 4px; }
.mnav form { margin: 0; }
@media (max-width: 719px) {
  .mtop .topbar-in { flex-wrap: wrap; row-gap: 8px; column-gap: 8px; padding: 10px 12px; }
  .mtop .spacer { display: none; }
  .mtop .brand { flex: 1 1 0; min-width: 0; }
  .mtop .enter-co { order: 5; flex: 1 0 100%; }
  .mtop .enter-co select { max-width: none; width: 100%; min-height: 44px; }
  .mtop .mnav { order: 6; flex: 1 0 100%; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 4px; }
  .mtop .mnav .linkbtn { padding: 8px 4px; min-height: 40px; }
  .mtop .who { display: none; }
  .stack.cards td.cust-act { text-align: left !important; }
}

/* Payment reminders: the journey lines stack as small cards on a phone instead of running off the side */
@media (max-width: 719px) {
  .owl, .owl tbody, .owl tr, .owl td { display: block; box-sizing: border-box; max-width: 100%; }
  .owl { width: 100%; min-width: 0 !important; }
  .owl td, .owl tr { min-width: 0; }
  .owl tr { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin: 8px 0; background: var(--surface); }
  .owl td { border: 0 !important; padding: 3px 0 3px 78px !important; position: relative; text-align: left !important; overflow-wrap: anywhere; min-height: 1.6em; }
  .owl td::before { content: attr(data-label); position: absolute; left: 0; top: 6px; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
  .owl td.owl-act { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 0 0 !important; margin-top: 4px; border-top: 1px solid var(--border) !important; white-space: normal !important; }
  .owl td.owl-act::before { content: none; }
  .owl td.owl-act form { margin: 0 !important; }
}

/* payment marks (OUTSTANDING BALANCE etc.): keep the words inside the coloured box, wrapping to a second line if the space is narrow */
.tag.paytag, .stack td .tag.paytag, .nc .tag.paytag { display: inline-block; max-width: 100%; white-space: normal; line-height: 1.25; text-align: left; box-sizing: border-box; margin: 0 4px 4px 0; vertical-align: top; }
@media (max-width: 719px) {
  /* on a phone the cell is a label + value grid; several marks must sit together as one value, not be split across the grid */
  .stack td:has(.paytag) { display: block; position: relative; padding-left: 104px; min-height: 1.6em; }
  .stack td:has(.paytag)::before { position: absolute; left: 0; top: 4px; }
  .stack.cards td:has(.paytag) { padding-left: 86px; }
}

/* small tables that are not wrapped for scrolling (e.g. the Expiry dates list) shrink to the phone screen instead of forcing a sideways scroll */
@media (max-width: 719px) {
  table.tbl { min-width: 0; }
  table.tbl td, table.tbl th { overflow-wrap: anywhere; }
}
@media (max-width: 719px) { table.tbl .tag { display: inline-block; max-width: 100%; white-space: normal; line-height: 1.25; box-sizing: border-box; } }
