/* Rider Requests design system */
:root {
  color-scheme: light;
  --bg: #f3f4f8;
  --bg-grad: radial-gradient(1200px 600px at 100% -10%, #d9f5e4 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #e5e9ff 0%, transparent 60%);
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --surface-3: #eef0f6;
  --ink: #0f1424;
  --ink-2: #353c4f;
  --muted: #6b7286;
  --faint: #9aa0b2;
  --line: #e4e7ef;
  --line-2: #d6dae5;
  --brand: #12a150;
  --brand-600: #0e8a43;
  --brand-50: #e8f8ee;
  --brand-ink: #0b6b35;
  --focus: #4f6bff;
  --shadow-sm: 0 1px 2px rgba(15, 20, 36, .06);
  --shadow: 0 1px 2px rgba(15, 20, 36, .05), 0 6px 20px -6px rgba(15, 20, 36, .12);
  --shadow-lg: 0 24px 60px -12px rgba(15, 20, 36, .28);
  --radius: 14px;
  --radius-sm: 10px;
  --side: #0e1322;
  --side-2: #161c2f;
  --side-ink: #c9cfde;
  --side-muted: #7b839a;

  --st-pending: #b7791f; --st-pending-bg: #fff6e0;
  --st-assigned: #2563eb; --st-assigned-bg: #e8efff;
  --st-collected: #7c3aed; --st-collected-bg: #f1eaff;
  --st-delivered: #15803d; --st-delivered-bg: #e4f7ea;
  --st-cancelled: #6b7280; --st-cancelled-bg: #eef0f3;
  --danger: #dc2626; --danger-bg: #fdecec;
  --tri: #0f766e; --tri-bg: #def7f3;
  --fin: #a16207; --fin-bg: #fdf3d7;
  --urgent: #e11d48; --urgent-bg: #ffe8ee;
  --sched: #0369a1; --sched-bg: #e0f2fe;
  --ev: #4d7c0f; --ev-bg: #ecfccb;
  --wa: #25d366; --wa-ink: #075e54;

  --series-1: #2a78d6;
  --series-2: #1baf7a;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Plus Jakarta Sans', var(--font);
}
:root[data-theme="dark"], :root:not([data-theme="light"]).os-dark {
  color-scheme: dark;
  --bg: #0a0e19;
  --bg-grad: radial-gradient(1200px 600px at 100% -10%, rgba(18, 161, 80, .10) 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(79, 107, 255, .10) 0%, transparent 60%);
  --surface: #121829;
  --surface-2: #171e33;
  --surface-3: #1e2740;
  --ink: #eceef5;
  --ink-2: #c4c9d8;
  --muted: #8e95aa;
  --faint: #677089;
  --line: #232b44;
  --line-2: #2f3956;
  --brand-50: rgba(18, 161, 80, .14);
  --brand-ink: #4ade80;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .5);
  --shadow-lg: 0 30px 70px -10px rgba(0, 0, 0, .7);
  --side: #080b14;
  --side-2: #10162a;
  --st-pending: #f0b44c; --st-pending-bg: rgba(240, 180, 76, .13);
  --st-assigned: #7aa2ff; --st-assigned-bg: rgba(122, 162, 255, .14);
  --st-collected: #b693ff; --st-collected-bg: rgba(182, 147, 255, .14);
  --st-delivered: #4ade80; --st-delivered-bg: rgba(74, 222, 128, .12);
  --st-cancelled: #9aa0b2; --st-cancelled-bg: rgba(154, 160, 178, .12);
  --danger: #f87171; --danger-bg: rgba(248, 113, 113, .13);
  --tri: #2dd4bf; --tri-bg: rgba(45, 212, 191, .12);
  --fin: #fbbf24; --fin-bg: rgba(251, 191, 36, .12);
  --urgent: #fb7185; --urgent-bg: rgba(251, 113, 133, .13);
  --sched: #7dd3fc; --sched-bg: rgba(125, 211, 252, .13);
  --ev: #a3e635; --ev-bg: rgba(163, 230, 53, .12);
  --wa-ink: #8af0b4;
  --series-1: #3987e5;
  --series-2: #199e70;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink);
  background: var(--bg); background-image: var(--bg-grad); background-attachment: fixed;
  -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01';
}
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .92em; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 8px; }
.between { justify-content: space-between; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; background: var(--side); color: var(--side-ink);
  display: flex; flex-direction: column; padding: 18px 14px; gap: 6px; z-index: 30;
  background-image: radial-gradient(400px 300px at 0% 0%, rgba(18, 161, 80, .16), transparent 70%);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; color: #fff; text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(140deg, #22c55e, #0d9488); box-shadow: 0 6px 18px -4px rgba(18, 161, 80, .6);
}
.brand-mark .icon { color: #fff; width: 20px; height: 20px; }
.brand b { font-family: var(--font-head); font-size: 16px; letter-spacing: -.01em; display: block; line-height: 1.1; }
.brand small { color: var(--side-muted); font-size: 11.5px; }
.nav-label { color: var(--side-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: var(--side-ink);
  text-decoration: none; font-weight: 500; position: relative; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--side-2); color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(18, 161, 80, .22), rgba(18, 161, 80, .06)); color: #fff; }
.nav a.active::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav a .icon { opacity: .85; }
.nav .count { margin-left: auto; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .07); padding-top: 12px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.me b { color: #fff; font-weight: 600; display: block; font-size: 13.5px; line-height: 1.2; }
.me small { color: var(--side-muted); font-size: 12px; text-transform: capitalize; }
.side .icon-btn { color: var(--side-ink); }
.side .icon-btn:hover { background: var(--side-2); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 28px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.search {
  display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 11px; padding: 0 12px; height: 40px; width: min(420px, 100%); box-shadow: var(--shadow-sm);
}
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; }
.search kbd { font-size: 11px; color: var(--faint); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.content { padding: 26px 28px 60px; max-width: 1360px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 4px; }
.crumbs { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.icon-btn.menu-btn, .top-brand { display: none; }
.top-brand { align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 800; text-decoration: none; }
.top-brand .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
.top-brand .brand-mark .icon { width: 16px; height: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; box-shadow: var(--shadow-sm);
  transition: transform .06s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(180deg, #1fb862, var(--brand-600)); border-color: var(--brand-600); color: #fff; box-shadow: 0 6px 16px -6px rgba(18, 161, 80, .7), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.primary:hover { background: linear-gradient(180deg, #29c46b, #0c7d3c); }
.btn.dark { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { height: 32px; padding: 0 11px; border-radius: 9px; font-size: 13px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 13px; }
.btn.block { width: 100%; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: none; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.btn .spinner, .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head p { color: var(--muted); font-size: 13px; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.g-main-wide { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { padding: 16px 18px; position: relative; overflow: hidden; }
.stat .k { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.stat .k .dot { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; }
.stat .v { font-family: var(--font-head); font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 8px; line-height: 1; }
.stat .v small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat .s { color: var(--muted); font-size: 12px; margin-top: 6px; }
.stat.hero { background: linear-gradient(135deg, #16a34a, #0d9488); color: #fff; border: 0; }
.stat.hero .k, .stat.hero .s, .stat.hero .v small { color: rgba(255, 255, 255, .85); }
.stat.hero .k .dot { background: rgba(255, 255, 255, .2); }
.stat.hero::after { content: ''; position: absolute; right: -30px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .12); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px;
  font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--ink-2);
}
.badge .icon { width: 13px; height: 13px; }
.badge.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-pending { color: var(--st-pending); background: var(--st-pending-bg); }
.s-assigned { color: var(--st-assigned); background: var(--st-assigned-bg); }
.s-collected { color: var(--st-collected); background: var(--st-collected-bg); }
.s-delivered { color: var(--st-delivered); background: var(--st-delivered-bg); }
.s-cancelled { color: var(--st-cancelled); background: var(--st-cancelled-bg); }
.s-failed { color: var(--danger); background: var(--danger-bg); }
.c-triangle { color: var(--tri); background: var(--tri-bg); }
.c-finance { color: var(--fin); background: var(--fin-bg); }
.p-urgent { color: var(--urgent); background: var(--urgent-bg); }
.b-outline { background: transparent; border: 1px solid var(--line-2); color: var(--muted); }
.r-admin { color: #be185d; background: #fde7f1; } .r-manager { color: #7c3aed; background: #f1eaff; }
.r-dispatcher { color: #2563eb; background: #e8efff; } .r-requester { color: #0f766e; background: #def7f3; } .r-rider { color: #c2410c; background: #ffedd5; }
:root[data-theme="dark"] .r-admin, .os-dark:not([data-theme="light"]) .r-admin { background: rgba(244, 114, 182, .14); color: #f9a8d4; }
:root[data-theme="dark"] .r-manager, .os-dark:not([data-theme="light"]) .r-manager { background: rgba(182, 147, 255, .14); color: #c4b5fd; }
:root[data-theme="dark"] .r-dispatcher, .os-dark:not([data-theme="light"]) .r-dispatcher { background: rgba(122, 162, 255, .14); color: #93c5fd; }
:root[data-theme="dark"] .r-requester, .os-dark:not([data-theme="light"]) .r-requester { background: rgba(45, 212, 191, .12); color: #5eead4; }
:root[data-theme="dark"] .r-rider, .os-dark:not([data-theme="light"]) .r-rider { background: rgba(251, 146, 60, .14); color: #fdba74; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-weight: 700; font-size: 12.5px; color: #fff; letter-spacing: .02em; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .15);
}
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field > label, .label { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.field .hint { color: var(--muted); font-size: 12px; }
.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 13px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface);
  outline: 0; transition: border-color .15s, box-shadow .15s; box-shadow: var(--shadow-sm);
}
textarea.input { height: auto; min-height: 92px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 12px; top: 12px; color: var(--faint); }
.input-icon .input { padding-left: 38px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.error-text { color: var(--danger); font-size: 13px; font-weight: 500; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; }
.alert.err { background: var(--danger-bg); color: var(--danger); }
.alert.warn { background: var(--st-pending-bg); color: var(--st-pending); }
.alert.info { background: var(--st-assigned-bg); color: var(--st-assigned); }
.alert.ok { background: var(--st-delivered-bg); color: var(--st-delivered); }
.alert b { color: inherit; }

.seg { display: inline-flex; background: var(--surface-3); border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button, .seg label {
  border: 0; background: none; padding: 7px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px;
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg button.on, .seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--focus); }

.choice-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice {
  position: relative; border: 1.5px solid var(--line-2); border-radius: 13px; padding: 13px 14px; cursor: pointer;
  display: grid; gap: 4px; transition: border-color .15s, background .15s;
}
.choice input { position: absolute; opacity: 0; }
.choice b { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.choice small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.choice:has(input:checked)::after { content: '✓'; position: absolute; top: 10px; right: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 800; }
.choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 99px;
  border: 1.5px solid var(--line-2); cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); user-select: none; transition: all .15s;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:hover { border-color: var(--faint); }
.chip:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { appearance: none; width: 40px; height: 23px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(17px); }

/* ---------- Tabs / toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button {
  border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; position: relative; white-space: nowrap;
  display: inline-flex; gap: 8px; align-items: center;
}
.tabs button .n { font-size: 11.5px; background: var(--surface-3); color: var(--muted); border-radius: 99px; padding: 0 7px; }
.tabs button.on { color: var(--ink); }
.tabs button.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }
.tabs button.on .n { background: var(--brand-50); color: var(--brand-ink); }

/* ---------- Tables / lists ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover { background: var(--surface-2); }
.req-title { font-weight: 600; color: var(--ink); display: block; }
.req-sub { color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; align-items: center; }

.list { display: grid; grid-template-columns: minmax(0, 1fr); }
.list > * { min-width: 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--surface-2); }

.req-card {
  display: grid; gap: 10px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; position: relative;
}
a.req-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.req-card.urgent { border-left: 4px solid var(--urgent); }
.req-card.cat-triangle:not(.urgent) { border-left: 4px solid var(--tri); }
.req-card.cat-finance:not(.urgent) { border-left: 4px solid var(--fin); }
.route-mini { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.route-mini div { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.route-mini span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-mini i { width: 8px; height: 8px; border-radius: 50%; flex: none; transform: translateY(-1px); }
.route-mini i.p { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.route-mini i.d { border: 2px solid var(--ink-2); }

/* ---------- Empty / skeleton ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); display: grid; justify-items: center; gap: 10px; }
.empty .art { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); margin-bottom: 4px; }
.empty .art .icon { width: 28px; height: 28px; }
.empty h3 { color: var(--ink); }
.skel { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Kanban / dispatch ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(290px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.lane { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 210px); min-height: 220px; transition: background .15s, border-color .15s, box-shadow .15s; }
.lane-head { padding: 13px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.lane-head b { font-family: var(--font-head); font-size: 14px; display: block; line-height: 1.2; }
.lane-head small { color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; }
.lane-body { padding: 10px; display: grid; gap: 10px; overflow-y: auto; align-content: start; flex: 1; }
.lane.drop-ok { background: var(--brand-50); border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.lane.unassigned .lane-head { background: linear-gradient(180deg, var(--st-pending-bg), transparent); border-radius: var(--radius) var(--radius) 0 0; }
.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; box-shadow: var(--shadow-sm); cursor: grab; transition: box-shadow .15s, transform .15s, opacity .15s; }
.ticket:hover { box-shadow: var(--shadow); }
.ticket.dragging { opacity: .45; transform: rotate(2deg); }
.ticket.locked { cursor: default; }
.ticket .t-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ticket .t-title { font-weight: 650; font-size: 13.5px; text-decoration: none; color: var(--ink); }
.ticket .t-title:hover { color: var(--brand-ink); }
.ticket.urgent { box-shadow: inset 3px 0 0 var(--urgent), var(--shadow-sm); }
.ticket.cat-triangle:not(.urgent) { box-shadow: inset 3px 0 0 var(--tri), var(--shadow-sm); }
.ticket.cat-finance:not(.urgent) { box-shadow: inset 3px 0 0 var(--fin), var(--shadow-sm); }
.onshift { width: 9px; height: 9px; border-radius: 50%; background: var(--st-delivered); box-shadow: 0 0 0 3px var(--st-delivered-bg); display: inline-block; }
.offshift { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); display: inline-block; }
.load { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.load i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #0d9488); border-radius: 99px; }

/* ---------- Stepper / timeline ---------- */
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 18px 20px; }
.step { display: grid; justify-items: center; gap: 6px; text-align: center; position: relative; color: var(--faint); font-size: 12.5px; font-weight: 600; }
.step::before { content: ''; position: absolute; top: 15px; left: calc(-50% + 20px); right: calc(50% + 20px); height: 2px; background: var(--line-2); }
.step:first-child::before { display: none; }
.step .b { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--faint); position: relative; z-index: 1; border: 2px solid var(--surface); }
.step .b .icon { width: 15px; height: 15px; }
.step.done { color: var(--ink-2); }
.step.done .b { background: var(--st-delivered); color: #fff; }
.step.done::before, .step.current::before { background: var(--st-delivered); }
.step.current { color: var(--ink); }
.step.current .b { background: var(--surface); color: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 5px var(--brand-50); }
.step small { display: block; color: var(--muted); font-weight: 500; font-size: 11.5px; }
.stepper.cancelled .step .b { background: var(--surface-3); color: var(--faint); box-shadow: none; }

.timeline { display: grid; gap: 0; padding: 6px 20px 16px; }
.tl { display: grid; grid-template-columns: 28px 1fr; gap: 12px; position: relative; padding: 10px 0; }
.tl::before { content: ''; position: absolute; left: 13px; top: 36px; bottom: -10px; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.tl .ic .icon { width: 14px; height: 14px; }
.tl .msg { font-size: 13.5px; color: var(--ink-2); }
.tl .when { font-size: 12px; color: var(--faint); }
.tl.a-override .ic { background: var(--urgent-bg); color: var(--urgent); }
.tl.a-delivered .ic, .tl.a-handover .ic { background: var(--st-delivered-bg); color: var(--st-delivered); }
.tl.a-collected .ic { background: var(--st-collected-bg); color: var(--st-collected); }
.tl.a-assigned .ic, .tl.a-run .ic { background: var(--st-assigned-bg); color: var(--st-assigned); }
.tl.a-created .ic { background: var(--brand-50); color: var(--brand); }
.tl.a-cancelled .ic, .tl.a-handover_failed .ic { background: var(--danger-bg); color: var(--danger); }

.stop { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); align-items: start; }
.stop:last-child { border-bottom: 0; }
.stop .n { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-family: var(--font-head); background: var(--surface-3); color: var(--ink-2); }
.stop.pickup .n { background: var(--brand); color: #fff; }
.stop.delivered .n { background: var(--st-delivered); color: #fff; }
.stop.failed .n { background: var(--danger); color: #fff; }
.stop .addr { font-weight: 600; }
.contact { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; text-decoration: none; }
a.contact:hover { color: var(--brand-ink); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }

.gps-off { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); background: var(--surface-3); border: 1px dashed var(--line-2); padding: 3px 9px; border-radius: 99px; }

/* ---------- Map ---------- */
.map { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.map svg { display: block; width: 100%; height: auto; }
.map svg.icon { display: inline-block; width: 16px; height: 16px; }
.map .tag { position: absolute; left: 10px; bottom: 10px; display: inline-flex; gap: 6px; align-items: center; font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--muted); backdrop-filter: blur(6px); border: 1px solid var(--line); }
.map-land { fill: var(--surface-2); }
.map-block { fill: var(--surface-3); }
.map-road { stroke: var(--surface); fill: none; stroke-linecap: round; }
.map-road-major { stroke: color-mix(in srgb, var(--fin) 30%, var(--surface)); fill: none; stroke-linecap: round; }
.map-water { fill: color-mix(in srgb, var(--series-1) 18%, var(--surface-2)); }
.map-park { fill: color-mix(in srgb, var(--st-delivered) 14%, var(--surface-2)); }
.map-route { stroke: var(--brand); stroke-width: 3; fill: none; stroke-dasharray: 2 7; stroke-linecap: round; }
.map-pin-label { font: 700 11px var(--font); fill: #fff; }
.map-pin-name { font: 600 11px var(--font); fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }

/* ---------- Chart ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; }
.chart .bar-1 { fill: var(--series-1); }
.chart .bar-2 { fill: var(--series-2); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + g .hl, .chart g.col:hover .hl { fill: var(--surface-3); }
.chart .hl { fill: transparent; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.tooltip { position: absolute; pointer-events: none; background: var(--ink); color: var(--surface); border-radius: 10px; padding: 8px 11px; font-size: 12px; box-shadow: var(--shadow-lg); white-space: nowrap; z-index: 5; transform: translate(-50%, calc(-100% - 10px)); }
.tooltip b { display: block; margin-bottom: 3px; }
.tooltip .r { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.tooltip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 6px; }
details.data-table summary { cursor: pointer; color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 10px; }
details.data-table table { margin-top: 8px; font-size: 12.5px; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(8, 11, 20, .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; z-index: 100; animation: fade .15s ease-out; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .18s cubic-bezier(.2, .9, .3, 1.2); border: 1px solid var(--line); }
.modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 6px; }
.modal-head .mi { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.modal-head .mi.warn { background: var(--urgent-bg); color: var(--urgent); }
.modal-head p { color: var(--muted); margin-top: 3px; font-size: 13.5px; }
.modal-body { padding: 16px 22px; display: grid; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 200; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 12px 14px; border-radius: 13px; background: var(--ink); color: var(--surface); box-shadow: var(--shadow-lg); animation: slide .25s cubic-bezier(.2, .9, .3, 1.2); font-weight: 500; }
.toast .ti { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); flex: none; }
.toast.ok .ti { background: #16a34a; color: #fff; } .toast.err .ti { background: #dc2626; color: #fff; } .toast.warn .ti { background: #d97706; color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .2s; }
@keyframes slide { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art {
  position: relative; overflow: hidden; color: #fff; padding: 44px; display: flex; flex-direction: column; justify-content: space-between;
  background: #0e1322; background-image: radial-gradient(700px 500px at 20% 10%, rgba(18, 161, 80, .45), transparent 60%), radial-gradient(600px 500px at 90% 100%, rgba(79, 107, 255, .35), transparent 60%);
}
.auth-art svg.routes { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.auth-art .route-path { stroke: rgba(255, 255, 255, .5); stroke-width: 2; fill: none; stroke-dasharray: 3 9; stroke-linecap: round; animation: dash 30s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -400; } }
.auth-art .node { fill: #22c55e; }
.auth-art .node-ring { fill: none; stroke: #22c55e; stroke-width: 2; opacity: .5; animation: ping 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(2.6); opacity: 0; } }
.auth-art .copy { position: relative; max-width: 460px; }
.auth-art h1 { color: #fff; font-size: 40px; line-height: 1.08; letter-spacing: -.03em; }
.auth-art .copy p { color: rgba(255, 255, 255, .75); font-size: 16px; margin-top: 14px; }
.auth-art .feats { display: grid; gap: 12px; margin-top: 28px; }
.auth-art .feats div { display: flex; gap: 12px; align-items: center; color: rgba(255, 255, 255, .88); }
.auth-art .feats .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); backdrop-filter: blur(4px); }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: min(420px, 100%); display: grid; gap: 20px; }
.auth-card .head p { color: var(--muted); margin-top: 6px; }
.pw-meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .25s, background .25s; }
.checklist { display: grid; gap: 6px; font-size: 13px; }
.checklist div { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.checklist div.ok { color: var(--st-delivered); }
.checklist .icon { width: 15px; height: 15px; }

/* ---------- Shifts (on/off switch) ---------- */
.shift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.rider-shift .row.between { gap: 10px; }
.rider-shift { padding: 16px 18px; transition: border-color .2s, box-shadow .2s; }
.rider-shift.is-on { border-color: color-mix(in srgb, var(--st-delivered) 45%, var(--line)); box-shadow: 0 0 0 3px var(--st-delivered-bg); }
.shift-toggle { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; flex: none; height: 40px; padding: 0 16px 0 5px; border-radius: 99px; border: 1.5px solid var(--line-2); background: var(--surface-3); color: var(--muted); font: 700 13.5px var(--font); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.shift-toggle .knob { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--muted); box-shadow: var(--shadow-sm); transition: background .2s, color .2s; }
.shift-toggle:hover { border-color: var(--faint); }
.shift-toggle.on { background: var(--st-delivered-bg); border-color: var(--st-delivered); color: var(--st-delivered); }
.shift-toggle.on .knob { background: var(--st-delivered); color: #fff; }
.shift-toggle:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 2px; }
.shift-toggle.big { height: 84px; padding: 0 34px 0 10px; gap: 16px; font-size: 20px; }
.shift-toggle.big .knob { width: 64px; height: 64px; }
.shift-toggle.big .knob .icon { width: 28px; height: 28px; }
.hello .shift-toggle:not(.on) { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: #fff; }
.shift-hero { padding: 34px 20px; }
.shift-hero.is-on { background: linear-gradient(180deg, var(--st-delivered-bg), var(--surface)); }
.loc { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 99px; background: var(--surface-3); color: var(--muted); }
.loc.live { background: var(--st-delivered-bg); color: var(--st-delivered); }
.loc.denied, .loc.error, .loc.unsupported { background: var(--danger-bg); color: var(--danger); }
.gps-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 99px; font-size: 12.5px; font-weight: 700; text-decoration: none; background: var(--surface-3); color: var(--muted); }
.gps-chip.live { background: var(--st-delivered-bg); color: var(--st-delivered); }
.gps-chip.live .icon { animation: pulse 1.6s ease-in-out infinite; }
.gps-chip.denied, .gps-chip.error { background: var(--danger-bg); color: var(--danger); }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Google maps & live tracking ---------- */
.gmap { width: 100%; min-height: 260px; background: var(--surface-2); }
.gmap-wrap .tag { z-index: 2; pointer-events: none; }
.gpin { min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px 13px 13px 2px; transform: rotate(-45deg); display: grid; place-items: center; background: var(--c); color: #fff; font: 700 11px var(--font); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.gpin.approx { opacity: .8; border-style: dashed; }
.gpin.rider { transform: none; border-radius: 50%; width: 30px; height: 30px; border-width: 3px; }
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.live-map { overflow: hidden; padding: 0; }
.live-map .gmap { height: min(70vh, 640px); }
.live-map .map { border: 0; border-radius: 0; }
.live-list { max-height: min(70vh, 640px); overflow: auto; }
.live-rider { cursor: pointer; align-items: flex-start; }
.live-rider .grow { min-width: 0; }
.live-list { overflow-x: hidden; }
.live-rider.sel { background: var(--brand-50); }
.live-rider.off { opacity: .6; }
.live-job { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--ink-2); text-decoration: none; min-width: 0; }
.live-job .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
.live-job > :not(.t) { flex: none; }
.live-job:hover .t { color: var(--brand-ink); }

/* Kenya place search */
.place-results { display: grid; gap: 6px; margin-top: 8px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.place { display: flex; gap: 10px; align-items: center; text-align: left; padding: 9px 10px; border-radius: 10px; border: 0; background: var(--surface-2); color: inherit; font: inherit; cursor: pointer; }
.place:hover, .place:focus-visible { background: var(--brand-50); }
.place small { display: block; color: var(--muted); font-size: 12px; }

/* Quotes */
.quote { display: grid; gap: 8px; font-size: 13px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.quote div { display: flex; justify-content: space-between; gap: 12px; }
.quote span { color: var(--muted); }
.quote b { white-space: nowrap; }
.quote .total { border-top: 1px dashed var(--line-2); padding-top: 8px; font-size: 15px; }
.quote .total span { color: var(--ink); font-weight: 700; }
.quote .total b { font-family: var(--font-head); font-size: 18px; color: var(--brand-ink); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Runs ---------- */
.run { display: grid; gap: 14px; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--st-delivered), #22c55e); }
.run-stops { display: grid; gap: 8px; }
.run-stop { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 11px; background: var(--surface-2); text-decoration: none; color: inherit; }
.run-stop:hover { background: var(--surface-3); }
.pick-list { display: grid; gap: 8px; max-height: 320px; overflow: auto; }
.pick { display: flex; gap: 12px; align-items: center; padding: 11px 13px; border: 1.5px solid var(--line-2); border-radius: 12px; cursor: pointer; }
.pick:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.pick input { width: 18px; height: 18px; accent-color: var(--brand); }

/* ---------- Rider jobs ---------- */
.job { overflow: hidden; }
.job-head { padding: 16px 18px; display: flex; gap: 12px; align-items: flex-start; }
.job-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 18px 18px; }
.job .stops { border-top: 1px solid var(--line); }
.hello { padding: 22px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #1f2a4d, #0e1322); position: relative; overflow: hidden; margin-bottom: 20px; }
.hello::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(18, 161, 80, .55), transparent 70%); }
.hello h1 { color: #fff; position: relative; }
.hello p { color: rgba(255, 255, 255, .75); position: relative; margin-top: 6px; }
.hello .row { position: relative; margin-top: 16px; }
.hello .pill { background: rgba(255, 255, 255, .12); border-radius: 12px; padding: 10px 14px; }
.hello .pill b { font-size: 22px; font-family: var(--font-head); display: block; line-height: 1.1; }
.hello .pill small { color: rgba(255, 255, 255, .7); font-size: 12px; }

/* WhatsApp import */
.wa { border: 1px solid color-mix(in srgb, #25d366 35%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, #25d366 7%, var(--surface)), var(--surface)); }
.wa .wa-ic { width: 34px; height: 34px; border-radius: 10px; background: #25d366; color: #fff; display: grid; place-items: center; }
.parsed { display: grid; gap: 6px; font-size: 13px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.parsed div { display: flex; gap: 8px; }
.parsed span:first-child { color: var(--muted); min-width: 74px; }

.dropoff-edit { border: 1px solid var(--line); border-radius: 13px; padding: 14px; display: grid; gap: 12px; background: var(--surface-2); position: relative; animation: pop .2s; }
.dropoff-edit .dh { display: flex; align-items: center; gap: 10px; }
.dropoff-edit .num { width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.coord-ok { color: var(--st-delivered); font-size: 12px; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.sticky { position: sticky; top: 84px; }
.section-title { display: flex; align-items: center; gap: 10px; }
.section-title .si { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }

.backdrop { display: none; }


/* ---------- Scheduling, vehicles, read-only ---------- */
.s-scheduled { color: var(--sched); background: var(--sched-bg); }
.v-electric { color: var(--ev); background: var(--ev-bg); }
.b-readonly { color: var(--st-collected); background: var(--st-collected-bg); height: 28px; }
.alert.sched { background: var(--sched-bg); color: var(--sched); }
.export-btn { gap: 6px; }
.choice-cards.two { grid-template-columns: repeat(2, 1fr); }
.schedule-box { padding: 14px; border-radius: 13px; background: var(--sched-bg); border: 1px dashed color-mix(in srgb, var(--sched) 45%, transparent); }
.schedule-box .hint { color: var(--ink-2); }
button.chip { font: inherit; cursor: pointer; }
.chip.on { border-color: var(--sched); background: var(--sched); color: #fff; }
.date-chip { width: 42px; height: 46px; border-radius: 12px; display: grid; place-items: center; align-content: center; background: var(--sched-bg); color: var(--sched); flex: none; line-height: 1; }
.date-chip b { font-family: var(--font-head); font-size: 18px; }
.date-chip small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.link-sm { font-size: 12.5px; font-weight: 600; color: var(--brand-ink); text-decoration: none; }
.link-sm:hover { text-decoration: underline; }
.recovery-chans { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--faint); font-size: 12px; flex-wrap: wrap; }
.recovery-chans span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: var(--surface-3); color: var(--muted); font-weight: 600; }

/* ---------- Requester call to action ---------- */
.stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cta-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 26px 28px; margin-bottom: 16px; border-radius: 22px; color: #fff;
  background: radial-gradient(500px 260px at 100% 0%, rgba(255, 255, 255, .18), transparent 60%), linear-gradient(130deg, #0e8a43 0%, #12a150 45%, #0d9488 100%);
  box-shadow: 0 18px 40px -18px rgba(18, 161, 80, .75);
}
.cta-hero::after { content: ''; position: absolute; right: -50px; bottom: -80px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255, 255, 255, .1); pointer-events: none; }
.cta-copy { position: relative; max-width: 520px; }
.cta-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .18); }
.cta-hero h2 { color: #fff; font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 10px; }
.cta-hero p { color: rgba(255, 255, 255, .85); margin-top: 6px; font-size: 14.5px; }
.cta-actions { position: relative; display: grid; gap: 10px; justify-items: stretch; min-width: 280px; }
.cta-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 68px; padding: 0 34px; border-radius: 18px;
  background: #fff; color: #0b6b35; font: 800 19px var(--font-head); letter-spacing: -.01em; text-decoration: none;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .35), inset 0 -3px 0 rgba(11, 107, 53, .12); transition: transform .15s, box-shadow .15s;
  animation: cta-glow 2.8s ease-in-out infinite;
}
.cta-btn .icon { width: 26px; height: 26px; stroke-width: 2.6; }
.cta-btn:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 20px 36px -12px rgba(0, 0, 0, .4); }
.cta-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@keyframes cta-glow { 0%, 100% { box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .35), 0 0 0 0 rgba(255, 255, 255, .55); } 50% { box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .35), 0 0 0 8px rgba(255, 255, 255, 0); } }
.cta-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 13px; color: #fff; font-weight: 700; text-decoration: none; border: 1.5px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .08); }
.cta-ghost:hover { background: rgba(255, 255, 255, .18); }

.wa-banner {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 18px; border-radius: 16px; text-decoration: none; color: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--wa) 14%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--wa) 40%, var(--line));
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
.wa-banner:hover { border-color: var(--wa); box-shadow: var(--shadow); }
.wa-banner b { display: block; font-family: var(--font-head); font-size: 15px; }
.wa-banner .grow > span { color: var(--muted); font-size: 13px; }
.wa-logo { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--wa); color: #fff; flex: none; box-shadow: 0 6px 16px -6px rgba(37, 211, 102, .8); }
.wa-logo .icon { width: 26px; height: 26px; }
.wa-go { background: var(--wa); border-color: var(--wa); color: #06331c; font-weight: 700; flex: none; }
.wa-banner:hover .wa-go { filter: brightness(1.05); }

/* ---------- Dispatch board zones ---------- */
.dispatch-tabs { display: none; }
.dispatch { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.zone { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.zone-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.zone-head h2 { font-size: 15.5px; }
.zone-head small { color: var(--muted); font-size: 12px; }
.zone-head .zi { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.zone-waiting { position: sticky; top: 84px; max-height: calc(100vh - 110px); min-height: 0; display: flex; flex-direction: column; border-top: 4px solid var(--st-pending); background: var(--surface-2); }
.zone-waiting .zone-head { background: linear-gradient(180deg, var(--st-pending-bg), transparent); }
.zone-waiting .zi { background: var(--st-pending); color: #fff; }
.zone-waiting .lane-body { overflow-y: auto; }
.zone-riders { display: grid; gap: 18px; min-width: 0; }
.zone-available { border-top: 4px solid var(--st-delivered); background: linear-gradient(180deg, var(--st-delivered-bg), var(--surface) 140px); }
.zone-available .zi { background: var(--st-delivered); color: #fff; }
.zone-unavailable { border-top: 4px solid var(--st-cancelled); background: var(--surface-2); }
.zone-unavailable .zi { background: var(--surface-3); color: var(--muted); }
.zone-unavailable .zone-head h2 { color: var(--ink-2); }
.live-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--st-delivered); background: var(--surface); border: 1px solid color-mix(in srgb, var(--st-delivered) 40%, var(--line)); padding: 4px 10px; border-radius: 99px; }
.live-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--st-delivered); animation: pulse 1.6s ease-in-out infinite; }
.rider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; padding: 14px; }
.rider-grid.compact { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.lane.rider-lane { max-height: 440px; min-height: 0; }
.rider-lane.avail { background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--st-delivered) 55%, var(--line)); box-shadow: 0 0 0 3px var(--st-delivered-bg), var(--shadow-sm); }
.rider-lane.avail .lane-head { background: linear-gradient(180deg, var(--st-delivered-bg), transparent); border-radius: var(--radius) var(--radius) 0 0; }
.rider-lane.unavail { opacity: .78; background: var(--surface-2); border-style: dashed; }
.rider-lane.unavail .avatar { filter: grayscale(.85); }
.rider-lane.unavail:hover, .rider-lane.unavail.drop-ok { opacity: 1; }
.av-wrap { position: relative; display: inline-grid; }
.av-wrap.on::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--st-delivered); border: 2px solid var(--surface); }
.rider-lane .lane-head b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rider-lane .load { margin-top: 6px; }
.drop-hint { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 18px 10px; border: 1.5px dashed var(--line-2); border-radius: 12px; color: var(--muted); font-size: 12.5px; }
.rider-lane.avail .drop-hint { border-color: color-mix(in srgb, var(--st-delivered) 45%, var(--line-2)); color: var(--st-delivered); }
.dispatch.dragging-on .rider-lane.avail .drop-hint { background: var(--st-delivered-bg); }
.sub-head { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 4px 0; font-size: 12px; font-weight: 700; color: var(--sched); text-transform: uppercase; letter-spacing: .05em; border-top: 1px dashed var(--line-2); }
.sub-head .n { background: var(--sched-bg); border-radius: 99px; padding: 0 7px; }
.zone-empty { display: flex; align-items: center; gap: 12px; padding: 20px; color: var(--muted); }
.zone-empty .icon { width: 22px; height: 22px; flex: none; }
.ticket.ro { cursor: default; }
.ticket .t-when { font-size: 12px; display: inline-flex; gap: 4px; align-items: center; }
.ticket .btn.sm span:empty { display: none; }

.pick-group { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 2px 0; }
.pick-group.on { color: var(--st-delivered); }
.pick-group .n { margin-left: auto; background: var(--surface-3); border-radius: 99px; padding: 0 8px; color: var(--muted); }
.pick.avail { border-color: color-mix(in srgb, var(--st-delivered) 45%, var(--line-2)); }
.pick.unavail { opacity: .7; }
.pick.unavail:has(input:checked) { opacity: 1; }

/* ---------- Proof of delivery: photos and D-note signatures ---------- */
.proof .label { display: flex; align-items: center; gap: 6px; }
.req { font-size: 11px; font-weight: 700; color: var(--urgent); background: var(--urgent-bg); border-radius: 99px; padding: 1px 8px; }
.req.opt { color: var(--muted); background: var(--surface-3); }
.photo-drop { position: relative; display: grid; place-items: center; min-height: 150px; border: 2px dashed var(--line-2); border-radius: 14px; background: var(--surface-2); cursor: pointer; overflow: hidden; transition: border-color .15s, background .15s; }
.photo-drop:hover { border-color: var(--brand); background: var(--brand-50); }
.photo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-drop:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.ph-empty { display: grid; justify-items: center; gap: 4px; color: var(--muted); text-align: center; padding: 16px; pointer-events: none; }
.ph-empty .icon { width: 30px; height: 30px; color: var(--brand); }
.ph-empty b { color: var(--ink); }
.ph-empty small { font-size: 12px; }
.photo-drop img { width: 100%; max-height: 260px; object-fit: contain; display: block; background: #000; pointer-events: none; }
.proof.busy .photo-drop { opacity: .6; }
.proof.invalid .photo-drop, .proof.invalid .sign-pad { border-color: var(--danger); background: var(--danger-bg); }
.sign-pad { position: relative; height: 170px; border: 2px dashed var(--line-2); border-radius: 14px; background: #fff; overflow: hidden; }
.sign-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sign-x { position: absolute; left: 16px; bottom: 34px; color: #9aa0b2; font-size: 16px; pointer-events: none; }
.sign-line { position: absolute; left: 14px; right: 14px; bottom: 30px; border-top: 1.5px solid #c9cfde; padding-top: 4px; font-size: 11px; color: #9aa0b2; text-align: center; pointer-events: none; }
.sign-clear { position: absolute; top: 6px; right: 6px; background: rgba(255, 255, 255, .9) !important; color: #353c4f !important; }
.proof.signed .sign-pad { border-style: solid; border-color: var(--st-delivered); }
.proof.signed .sign-line { color: transparent; }
.proofs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.proof-thumb { width: 46px; height: 46px; padding: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface-2); cursor: zoom-in; }
.proof-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proof-thumb.sig { width: 74px; background: #fff; }
.proof-thumb.sig img { object-fit: contain; }
.proof-full { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 12px; background: #000; }
.proof-full.sig { background: #fff; border: 1px solid var(--line); }

/* ---------- Rider: open jobs ---------- */
.open-job { border: 1.5px solid color-mix(in srgb, var(--st-pending) 35%, var(--line)); }
.open-job.urgent { border-left: 4px solid var(--urgent); }
.hello .pill-open { border: 1.5px solid rgba(255, 255, 255, .35); color: #fff; font: inherit; text-align: left; cursor: pointer; }
.hello .pill-open:hover { background: rgba(255, 255, 255, .2); }
.tabs button .n.hot { background: var(--st-pending); color: #fff; }

/* ---------- Fuel & energy ---------- */
.price-group { border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px 14px; margin: 0; }
.price-group legend { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.price-group.ev { border-color: color-mix(in srgb, var(--ev) 40%, var(--line)); background: color-mix(in srgb, var(--ev-bg) 50%, transparent); }
.price-group.ev legend { color: var(--ev); }
.compare { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.compare.cheaper b { color: var(--ev); }
.vehicle-seg label:has(input[value=electric]:checked) { color: var(--ev); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch { grid-template-columns: minmax(270px, 320px) minmax(0, 1fr); }
  .live-grid { grid-template-columns: 1fr; }
  .live-list { max-height: none; }
  .g-main, .g-main-wide { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .backdrop.show { display: block; position: fixed; inset: 0; background: rgba(8, 11, 20, .5); z-index: 25; }
  .icon-btn.menu-btn { display: inline-grid; }
  .top-brand { display: inline-flex; }
  .topbar .search { display: none; }
  .topbar { padding: 10px 16px; }
  .content { padding: 18px 16px 80px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 28px; min-height: 240px; }
  .auth-art h1 { font-size: 28px; }
  .auth-art .feats { display: none; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .gps-chip span { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .choice-cards { grid-template-columns: 1fr; }
  .stepper { padding: 14px 8px; }
  .step { font-size: 11px; }
  .search kbd { display: none; }
  h1 { font-size: 22px; }
  .table .hide-sm { display: none; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .top-schedule span { display: none; }
  .topbar .b-readonly { display: none; }
  .choice-cards.two { grid-template-columns: 1fr; }
  .cta-hero { padding: 22px 18px; border-radius: 18px; }
  .cta-hero h2 { font-size: 22px; }
  .cta-actions { min-width: 0; width: 100%; }
  .cta-btn { height: 64px; font-size: 18px; width: 100%; }
  .wa-banner { flex-wrap: wrap; }
  .wa-banner .wa-go { width: 100%; justify-content: center; }
  /* Dispatch: one zone at a time, picked with tabs. */
  .dispatch-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; position: sticky; top: 58px; z-index: 5; margin: -4px 0 14px; padding: 6px; border-radius: 14px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); }
  .dispatch-tabs button { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 10px; border: 1.5px solid transparent; background: var(--surface); color: var(--muted); font: 600 12px var(--font); cursor: pointer; }
  .dispatch-tabs button b { font: 800 17px var(--font-head); color: var(--ink); }
  .dispatch-tabs button.on.dt-waiting { border-color: var(--st-pending); background: var(--st-pending-bg); color: var(--st-pending); }
  .dispatch-tabs button.on.dt-available { border-color: var(--st-delivered); background: var(--st-delivered-bg); color: var(--st-delivered); }
  .dispatch-tabs button.on.dt-unavailable { border-color: var(--line-2); background: var(--surface-3); color: var(--ink-2); }
  .dispatch-tabs button.dt-available b { color: var(--st-delivered); }
  .dispatch { grid-template-columns: 1fr; }
  .zone-waiting { position: static; max-height: none; }
  .dispatch:not([data-tab="waiting"]) .zone-waiting,
  .dispatch:not([data-tab="available"]) .zone-available,
  .dispatch:not([data-tab="unavailable"]) .zone-unavailable { display: none; }
  .rider-grid, .rider-grid.compact { grid-template-columns: 1fr; padding: 10px; }
  .lane.rider-lane { max-height: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.req-sub { flex-wrap: wrap; row-gap: 2px; }
.req-sub .mono { white-space: nowrap; }
.stop.pickup.collected .n { background: var(--st-delivered); }
.dropoff-edit .num.p { width: auto; padding: 0 6px; background: var(--brand); color: #fff; }
.pickup-edit { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.route-mini .more-p { height: 18px; font-size: 10.5px; padding: 0 6px; flex: none; }

/* Settings → integrations */
.int-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.int-col { padding: 16px 18px 20px; border-right: 1px solid var(--line); }
.int-col:last-child { border-right: 0; }
.int-head { display: flex; align-items: center; justify-content: space-between; }
.int-sub { font-size: 12.5px; margin: 6px 0 12px; }
.int-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.int-item .req-sub { display: block; margin-top: 2px; }
.int-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--muted); }
.int-on .int-item { border-color: color-mix(in srgb, var(--st-delivered) 40%, var(--line)); }
.int-on .int-ic { background: var(--st-delivered-bg); color: var(--st-delivered); }
.int-setup .int-ic { background: var(--st-pending-bg); color: var(--st-pending); }
.int-planned .int-item { background: var(--surface-2); border-style: dashed; }
.int-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: 12px; color: var(--muted); }
.int-note .icon { margin-top: 2px; }
.int-note.todo { color: var(--st-pending); }
@media (max-width: 1180px) { .int-grid { grid-template-columns: 1fr; } .int-col { border-right: 0; border-bottom: 1px solid var(--line); } .int-col:last-child { border-bottom: 0; } }

/* ======================================================================
   v2 — availability, incidents, location changes, ratings, offline, mobile
   ====================================================================== */
.modal-head .mi.danger { background: var(--danger-bg); color: var(--danger); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--brand-ink); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:disabled { opacity: .5; cursor: not-allowed; }
:root[data-theme="dark"] .link-btn, :root:not([data-theme="light"]).os-dark .link-btn { color: var(--brand); }

/* Top bar: sync status, notifications bell */
.sync-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 99px; font: 700 12.5px var(--font); border: 0; cursor: pointer; }
.sync-chip.off { background: var(--danger-bg); color: var(--danger); }
.sync-chip.busy { background: var(--st-assigned-bg); color: var(--st-assigned); }
.sync-chip.warn { background: var(--st-pending-bg); color: var(--st-pending); }
.icon-btn.bell { position: relative; }
.icon-btn.bell .count { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--danger); color: #fff; font: 700 10.5px/17px var(--font); text-align: center; }
.nav .count.hot { background: var(--danger); }
.inbox { max-height: 60vh; overflow: auto; }
.inbox-item { width: 100%; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; border-radius: 10px; }
.inbox-item:hover { background: var(--surface-2); }
.inbox-item.unread b::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-left: 6px; vertical-align: middle; }
.inbox-item.critical.unread b::after { background: var(--danger); }
.inbox-item .req-sub { display: block; }

/* Rider SOS button: always one tap away, above the phone's gesture bar */
.sos-fab {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 60;
  display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 20px 0 16px; border-radius: 99px; border: 0; cursor: pointer;
  background: var(--danger); color: #fff; font: 800 16px var(--font-head); letter-spacing: .04em; box-shadow: 0 10px 28px -8px rgba(220, 38, 38, .75);
}
.sos-fab .icon { width: 24px; height: 24px; }
.sos-fab:active { transform: scale(.97); }
.inc-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.inc-type { position: relative; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line); cursor: pointer; font-weight: 600; font-size: 13.5px; }
.inc-type input { position: absolute; opacity: 0; }
.inc-type:has(input:checked) { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }
.inc-type:has(input:focus-visible) { outline: 2px solid var(--focus); }
.inc-media { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.inc-thumb { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); }
.inc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.inc-thumb.vid { grid-template-rows: 1fr auto; padding: 8px 0 4px; font-size: 11px; }
.inc-thumb button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.inc-video { width: 100%; max-width: 420px; max-height: 280px; border-radius: 12px; background: #000; }
.incident.open { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.incident.focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 35%, transparent), var(--shadow); }
.incident .inc-ic { background: var(--danger-bg); color: var(--danger); }
.incident.resolved .inc-ic { background: var(--st-delivered-bg); color: var(--st-delivered); }
.gps-line { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.gps-tag { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.gps-tag.verified { color: var(--st-delivered); }
.gps-tag.distant, .gps-tag.outside_kenya { color: var(--st-pending); }

/* Availability */
.avail-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 12px; }
.avail-now { height: 30px; padding: 0 12px; font-size: 13px; }
.avail-seg button { min-height: 40px; }
.avail-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 16px; }
.avail-strip .as { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); text-decoration: none; }
.avail-strip .as b { font: 800 18px var(--font-head); color: var(--ink); }
.avail-strip .as.s-delivered b { color: var(--st-delivered); }
.avail-strip .as.s-assigned b { color: var(--st-assigned); }
.avail-strip .as.s-collected b { color: var(--st-collected); }
.avail-strip .as.s-pending b { color: var(--st-pending); }
.avail-strip .as.s-failed { background: var(--danger-bg); border-color: transparent; color: var(--danger); }
.avail-strip .as.s-failed b { color: var(--danger); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -8px 0 14px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.legend i.sq { border-radius: 3px; }
.av-dot { position: relative; display: inline-flex; }
.av-dot::after { content: ''; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--c); border: 2px solid var(--surface); }
.shift-bar { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.shift-bar i { display: block; height: 100%; background: var(--brand); border-radius: inherit; transition: width .3s; }
.shift-bar.overtime_approved i { background: var(--st-pending); }
.shift-bar.over_unapproved i { background: var(--danger); }

/* Location details and changes */
.details { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.det { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 9px; background: var(--surface-3); font-size: 12.5px; max-width: 100%; }
.det-k { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.det b { font-weight: 600; overflow-wrap: anywhere; }
details.more { border-radius: 12px; }
details.more > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 6px 0; min-height: 36px; flex-wrap: wrap; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .muted { font-weight: 500; font-size: 12.5px; }
details.more[open] > summary { margin-bottom: 6px; }
details.card-more > summary.card-head { padding: 16px 20px; margin: 0; }
details.card-more > summary .icon:last-child { margin-left: auto; transition: transform .2s; }
details.card-more[open] > summary .icon:last-child { transform: rotate(180deg); }
.det-grid { padding: 4px 0 6px; }
.pin-box { margin-top: 8px; }
.chips.recent { align-items: center; }
.stop.changed { background: color-mix(in srgb, var(--danger) 6%, transparent); box-shadow: inset 3px 0 0 var(--danger); }
.stop .was { font-size: 12.5px; }
.change-alert { align-items: center; flex-wrap: wrap; }
.change-alert .btn { margin-left: auto; }
.eta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; margin-top: -8px; }

/* Ratings */
.stars { display: inline-flex; gap: 2px; }
.stars label { position: relative; cursor: pointer; color: var(--line-2); padding: 4px; min-width: 40px; min-height: 40px; display: grid; place-items: center; }
.stars label .icon { width: 28px; height: 28px; }
.stars input { position: absolute; opacity: 0; }
.stars:has(input:checked) label { color: #f59e0b; }
.stars label:has(input:checked) ~ label { color: var(--line-2); }
.stars label:hover, .stars label:hover ~ label { color: var(--line-2); }
.stars:hover label { color: #f59e0b; }
.stars:hover label:hover ~ label { color: var(--line-2); }
.stars label:has(input:focus-visible) { outline: 2px solid var(--focus); border-radius: 8px; }
.stars-show { display: inline-flex; gap: 1px; color: #f59e0b; vertical-align: middle; }
.stars-show .icon { width: 14px; height: 14px; }
.stars-show.lg .icon { width: 20px; height: 20px; }
.rate-row { gap: 2px; }
.rate-card { border-color: color-mix(in srgb, #f59e0b 40%, var(--line)); }

/* Forms */
.input-suffix { position: relative; display: flex; align-items: center; }
.input-suffix .input { padding-right: 56px; }
.input-suffix span { position: absolute; right: 12px; color: var(--muted); font-size: 12.5px; pointer-events: none; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.addr, .stop .addr, .req-sub, .t-title { overflow-wrap: anywhere; }
.table.perf td { vertical-align: middle; }

/* Offline */
html.is-offline .topbar { box-shadow: inset 0 -2px 0 var(--danger); }

/* ---------- Mobile & touch ---------- */
html, body { overflow-x: clip; }
.content, .card, .grid > * { min-width: 0; }
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn.sm { min-height: 40px; }
  .icon-btn { width: 44px; height: 44px; }
  .seg button, .seg label { min-height: 40px; }
  .chip { min-height: 40px; }
  .link-btn { min-height: 36px; }
  .contact { min-height: 36px; display: inline-flex; align-items: center; }
  .switch { min-height: 40px; }
}
@media (max-width: 1180px) {
  .form-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .input, select.input, textarea.input { font-size: 16px; } /* no zoom-on-focus on iOS */
  .form-grid.three { grid-template-columns: 1fr; }
  .topbar { gap: 6px; }
  .topbar [data-action="theme"] { display: none; }
  .sync-chip span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-head { align-items: flex-start; }
  .page-head > .row { width: 100%; }
  .seg { max-width: 100%; }
  .modal-back { place-items: end center; padding: 0; }
  .modal { width: 100%; max-height: calc(100dvh - 24px); border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .modal-foot { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 auto; }
  .toasts { left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .change-alert .btn { width: 100%; margin-left: 0; }
  .avail-strip .as { flex: 1 1 calc(33% - 8px); justify-content: center; }
  .stats[style] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .hide-xs { display: none; }
  .table { font-size: 13px; }
  .table th, .table td { padding-left: 10px; padding-right: 10px; }
  .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .sos-fab { height: 52px; padding: 0 16px 0 14px; }
  .inc-types { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .top-brand { font-size: 0; gap: 0; }
  .topbar .btn.primary.sm span { display: none; }
  .avail-strip .as { flex: 1 1 calc(50% - 8px); }
}
@media (max-width: 600px) {
  .stop { grid-template-columns: 34px minmax(0, 1fr); gap: 8px 12px; padding: 14px 16px; }
  .stop > :nth-child(3) { grid-column: 2; }
  .stop > :nth-child(3):empty { display: none; }
  .seg.fill { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; }
  .seg.fill label, .seg.fill button { justify-content: center; text-align: center; padding-left: 6px; padding-right: 6px; }
}
@media (max-width: 480px) {
  .job-actions { grid-template-columns: 1fr; }
}
.job-actions .btn { min-width: 0; }
.job-actions .btn, .btn.lg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
