:root {
  color-scheme: light;
  --page: #f6f7f9;
  --surface: #ffffff;
  --ink: #14213b;
  --muted: #637086;
  --line: #e3e7ee;
  --blue: #2758dc;
  --blue-hover: #1e47bb;
  --blue-soft: #edf2ff;
  --lime: #d9f280;
  --green: #167047;
  --red: #b83c3c;
  --radius: 18px;
  --shadow: 0 8px 28px rgb(20 33 59 / 5%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
button, input, select, textarea, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #83a2ff; outline-offset: 3px; }
[hidden] { display: none !important; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-hover); }
img, svg { max-width: 100%; }
img { display: block; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-weight: 650; }
h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.14; letter-spacing: -.045em; }
h2 { font-size: 22px; line-height: 1.25; letter-spacing: -.025em; }
h3 { font-size: 17px; line-height: 1.35; letter-spacing: -.014em; }
p { line-height: 1.6; }
small { font-size: 12px; line-height: 1.5; }
strong { font-weight: 650; }
hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; padding: 18px max(24px, calc((100vw - 1224px) / 2)); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand img, .brand > svg { width: 42px; height: 42px; flex-shrink: 0; }
.brand > span { font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: -.04em; }
.brand small { display: block; margin-top: 3px; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.header-links { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 13px; }
.header-links a { color: var(--muted); text-decoration: none; }
.header-links a:hover { color: var(--blue); }
.demo-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px max(24px, calc((100vw - 1224px) / 2)); background: #f0f4e8; color: #465a32; font-size: 12px; line-height: 1.5; border-bottom: 1px solid #e3ead7; }
.demo-banner strong { color: #304524; font-weight: 650; }
.demo-banner a { color: #304524; }
.demo-banner .button { min-height: 32px; padding: 5px 12px; border-color: #cfddbd; color: #304524; background: transparent; font-size: 12px; white-space: nowrap; }
.role-nav { display: flex; gap: 5px; align-self: flex-start; width: max-content; max-width: calc(100% - 48px); margin: 26px max(24px, calc((100vw - 1224px) / 2)) 0; padding: 5px; border: 1px solid #dfe5ed; background: #eaf0f6; border-radius: 12px; }
.role-tab { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 22px; color: #5f6d83; background: transparent; border: 0; border-radius: 8px; font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; text-decoration: none; transition: background .15s, color .15s, box-shadow .15s; }
.role-tab svg { width: 16px; height: 16px; flex-shrink: 0; }
.role-tab:hover { color: var(--ink); }
.role-tab[aria-selected="true"], .role-tab.active { color: var(--ink); background: white; box-shadow: 0 2px 5px rgb(20 33 59 / 8%); }
.main { width: min(100%, 1272px); margin: 0 auto; padding: 30px 24px 58px; flex: 1; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-heading > :first-child { min-width: 0; }
.eyebrow { display: block; margin-bottom: 10px; font-size: 11px; font-weight: 650; letter-spacing: .12em; line-height: 1.5; text-transform: uppercase; color: var(--blue); }
.lede { max-width: 660px; margin-top: 12px; font-size: 14px; color: var(--muted); line-height: 1.65; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 11px 17px; color: var(--ink); background: white; border: 1px solid #d9e0e9; border-radius: 9px; font-size: 13px; font-weight: 600; line-height: 1.4; text-decoration: none; text-align: center; transition: background .15s, border-color .15s, box-shadow .15s; }
.button svg { width: 17px; height: 17px; flex-shrink: 0; }
.button:hover { color: var(--ink); background: #f8fafc; border-color: #bac8da; }
.button.primary { color: white; background: var(--blue); border-color: var(--blue); box-shadow: 0 2px 3px rgb(39 88 220 / 10%); }
.button.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.button.secondary { background: white; }
.button.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.button.ghost:hover { color: var(--ink); background: #ecf0f6; }
.button.danger { color: var(--red); background: #fff6f5; border-color: #f0d7d4; }
.button.danger:hover { background: #fdeae7; border-color: #e5bbb6; }
.button.small { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.button:disabled:hover { background: inherit; }
.button.primary:disabled:hover { background: var(--blue); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin: 0 0 26px; }
.stat { padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.stat > label, .stat > span:first-child, .stat > p:first-child { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.stat strong { display: block; margin: 9px 0 5px; font-size: 31px; font-weight: 650; line-height: 1.15; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); }
.work-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(270px, 1fr); align-items: start; gap: 22px; }
.work-grid > *, .split-form > *, .form-grid > *, .detail-grid > * { min-width: 0; }
.panel { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel + .panel { margin-top: 20px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-header h2 { font-size: 17px; }
.panel-header h3 { font-size: 15px; }
.panel-header p, .panel-header small { color: var(--muted); }
.panel-body { padding: 22px; }
.panel-body > p + p { margin-top: 12px; }
.toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding: 17px 22px; background: #fcfdfe; border-bottom: 1px solid var(--line); }
.toolbar > input, .toolbar > .field:first-child { flex: 1 1 180px; }
.toolbar > select { flex: 0 1 160px; max-width: 100%; }
.toolbar .field { margin: 0; }
.toolbar label { font-size: 11px; }
.toolbar input, .toolbar select { min-height: 40px; font-size: 12px; padding: 9px 11px; }
.field { min-width: 0; margin: 0 0 18px; }
.field > label, .field > legend { display: block; margin-bottom: 8px; color: #354158; font-size: 12px; font-weight: 600; line-height: 1.45; }
.field label small { font-weight: 400; color: var(--muted); }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { display: block; width: 100%; min-width: 0; min-height: 45px; padding: 11px 13px; color: var(--ink); background: white; border: 1px solid #d7dfe9; border-radius: 8px; font-size: 14px; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: #8a94a5; opacity: 1; }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: #afbdd1; }
input:focus, select:focus, textarea:focus { outline: 2px solid #c5d5ff; outline-offset: 1px; border-color: var(--blue); }
input:disabled, select:disabled, textarea:disabled { color: #80899a; background: #f3f5f8; cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); vertical-align: middle; }
textarea { min-height: 98px; resize: vertical; }
select { padding-right: 30px; cursor: pointer; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .full, .detail-grid .full { grid-column: 1 / -1; }
.hint { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.field-error { margin-top: 7px; color: var(--red); font-size: 12px; line-height: 1.5; }
[aria-invalid="true"] { border-color: var(--red) !important; }
.input-row { display: flex; align-items: start; gap: 9px; }
.input-row > input { flex: 1; }
.input-row > .button { flex-shrink: 0; }
.order-list { display: flex; flex-direction: column; }
.order-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) auto; align-items: center; gap: 20px; width: 100%; padding: 19px 22px; color: var(--ink); background: white; border: 0; border-bottom: 1px solid #edf0f4; border-radius: 0; text-align: left; font-size: 13px; transition: background .15s; }
.order-row:last-child { border-bottom: 0; }
.order-row:hover { background: #f8faff; }
.order-row:focus-visible { outline-offset: -4px; }
.order-info, .order-route, .order-meta { min-width: 0; }
.order-info strong { display: block; font-size: 13px; line-height: 1.4; }
.order-info > small, .order-info > p { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }
.order-id { display: inline-block; margin-bottom: 6px; color: #8490a3; font-size: 10px; font-weight: 600; letter-spacing: .035em; font-variant-numeric: tabular-nums; }
.order-route { display: flex; flex-direction: column; gap: 5px; color: #53627a; font-size: 11px; line-height: 1.5; }
.order-route > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; font-size: 11px; color: var(--muted); }
.badge, .pill { display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: fit-content; max-width: 100%; min-height: 25px; padding: 4px 8px; color: #5f6b7d; background: #f0f3f7; border: 1px solid transparent; border-radius: 6px; font-size: 10px; font-weight: 600; line-height: 1.35; white-space: nowrap; }
.badge.requested { color: #986719; background: #fff5df; }
.badge.assigned { color: #6a50b5; background: #f1edfc; }
.badge.picked_up { color: #277486; background: #e8f6f8; }
.badge.in_transit { color: #2955b9; background: #eaf0ff; }
.badge.delivered { color: #25774d; background: #e9f6ed; }
.badge.cancelled { color: #a24b48; background: #fbeeed; }
.badge.kind { color: #677389; background: #f3f5f8; font-weight: 500; }
.pill { border-color: var(--line); background: #fff; }
.chips { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.empty-state { padding: 45px 26px; text-align: center; color: var(--muted); font-size: 13px; }
.empty-state h2, .empty-state h3, .empty-state strong { display: block; margin-bottom: 9px; color: var(--ink); }
.empty-state p { max-width: 380px; margin: 0 auto; }
.empty-state .button { margin-top: 18px; }
.section-title { margin: 3px 0 17px; padding-bottom: 13px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.split-form { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .9fr); align-items: start; gap: 24px; }
.summary-card { min-width: 0; padding: 26px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.summary-card > h2 { font-size: 17px; }
.summary-card > p { margin-top: 8px; color: var(--muted); font-size: 12px; }
.summary-card .price { display: block; margin: 18px 0 7px; font-size: 38px; line-height: 1.2; font-weight: 650; letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.summary-card .actions { margin-top: 22px; }
.summary-card .actions .button { flex: 1; }
.route-preview { margin: 25px 0; padding: 0; }
.route-stop { position: relative; display: flex; align-items: flex-start; gap: 13px; padding-bottom: 25px; min-width: 0; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.route-stop:last-child { padding-bottom: 0; }
.route-stop:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: 20px; bottom: 3px; border-left: 1px dashed #c1cbd9; }
.route-dot { display: inline-block; width: 11px; height: 11px; margin-top: 5px; border: 3px solid var(--blue); border-radius: 50%; flex-shrink: 0; background: white; }
.route-stop:last-child .route-dot { background: var(--ink); border-color: var(--ink); border-radius: 3px; }
.route-stop strong { display: block; margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.steps { display: flex; flex-direction: column; gap: 0; padding: 0; margin: 22px 0; list-style: none; }
.steps > li { position: relative; display: flex; gap: 13px; align-items: flex-start; padding: 0 0 22px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.steps > li:last-child { padding-bottom: 0; }
.steps > li:not(:last-child)::after { content: ""; position: absolute; top: 28px; left: 12px; bottom: 3px; width: 1px; background: #dce3ed; }
.step-dot { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; border: 1px solid #dce3ed; background: #f7f9fc; color: #8793a5; font-size: 10px; font-weight: 600; }
.steps .complete .step-dot { color: var(--blue); background: #eaf0ff; border-color: #d6e1ff; }
.steps .current { color: var(--ink); }
.steps .current .step-dot { color: white; background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 4px #edf2ff; }
.steps strong { display: block; margin-bottom: 2px; font-size: 13px; }
.sample-note { display: block; padding: 12px 14px; background: #f8faf4; border: 1px solid #e3ead7; border-radius: 8px; color: #677455; font-size: 11px; line-height: 1.6; }
.notice { padding: 13px 16px; background: var(--blue-soft); border: 1px solid #dbe5ff; border-radius: 9px; color: #32538f; font-size: 12px; line-height: 1.6; }
.notice.success { background: #edf8f0; border-color: #d3e9db; color: #2a6c43; }
.notice.error { background: #fff0ee; border-color: #f0d2ce; color: #a9433c; }
.notice + *, .sample-note + * { margin-top: 18px; }
.toast { position: fixed; z-index: 50; bottom: 24px; left: 50%; transform: translateX(-50%); width: max-content; max-width: min(90vw, 540px); padding: 14px 20px; color: white; background: var(--ink); border: 1px solid #32415d; border-radius: 12px; box-shadow: 0 9px 30px rgb(20 33 59 / 18%); font-size: 13px; line-height: 1.5; }
.site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; width: min(100% - 48px, 1224px); margin: auto auto 0; padding: 22px 0 28px; border-top: 1px solid var(--line); color: #7c8799; font-size: 11px; line-height: 1.6; }
.site-footer a { color: #65738a; text-decoration: none; }
.site-footer a:hover { color: var(--blue); }
.site-footer .actions { gap: 18px; }
dialog.modal, .modal dialog { width: min(700px, calc(100vw - 36px)); max-width: calc(100vw - 36px); max-height: 90dvh; margin: auto; padding: 0; color: var(--ink); background: white; border: 1px solid #dce3ed; border-radius: 20px; box-shadow: 0 25px 90px rgb(12 28 53 / 24%); overflow: auto; }
dialog::backdrop { background: rgb(18 31 52 / 42%); backdrop-filter: blur(3px); }
.modal-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 26px; background: white; border-bottom: 1px solid var(--line); }
.modal-header h2 { font-size: 23px; }
.modal-header .eyebrow { margin-bottom: 5px; }
.modal-body { padding: 24px 26px; }
.modal-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; padding: 18px 26px; border-top: 1px solid var(--line); background: #fafbfd; }
.close-button { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; min-width: 38px; color: #69768a; background: #f3f5f8; border: 0; border-radius: 50%; font-size: 23px; line-height: 1; }
.close-button:hover { color: var(--ink); background: #e7ecf3; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 24px; margin: 20px 0; }
.detail-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.detail-value { display: block; color: var(--ink); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.timeline { margin: 18px 0 0; padding: 0; list-style: none; }
.timeline-item { position: relative; margin-left: 5px; padding: 0 0 20px 22px; border-left: 1px solid #dde4ef; font-size: 12px; line-height: 1.6; }
.timeline-item:last-child { border-color: transparent; padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; top: 4px; left: -4px; width: 7px; height: 7px; background: #8aa2d5; border-radius: 50%; }
.timeline-item:first-child::before { background: var(--blue); }
.timeline-item strong { display: block; margin-bottom: 2px; color: var(--ink); }
.timeline-item small, .timeline-item time { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); }
.timeline-item p { color: #63718a; font-size: 11px; }
.rider-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.rider-card { display: block; min-width: 0; padding: 19px; background: white; border: 1px solid var(--line); border-radius: 13px; text-align: left; }
.rider-card[aria-pressed="true"], .rider-card.selected { border-color: #7394ec; background: #f6f9ff; box-shadow: 0 0 0 2px #e3ebff; }
.rider-card h3, .rider-card strong { display: block; margin-bottom: 5px; }
.rider-card p { color: var(--muted); font-size: 12px; }
.rider-card .badge { margin-top: 13px; }
.rider-card .actions { margin-top: 15px; }
.task-card { padding: 22px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.task-card + .task-card { margin-top: 15px; }
.task-card > .actions, .task-card > .notice { margin-top: 18px; }
.task-card .order-info { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.task-card .order-info > * { min-width: 0; }
.tracking-card { max-width: 760px; margin: 0 auto; padding: 30px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.tracking-reference { display: block; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .07em; font-variant-numeric: tabular-nums; }
.tracking-card h2 { margin-top: 12px; font-size: 29px; }
.tracking-card > .badge { margin-top: 15px; }
.progress-rail { display: flex; gap: 5px; margin: 24px 0; }
.progress-rail > * { flex: 1; height: 5px; background: #e7ecf3; border-radius: 4px; }
.progress-rail > .complete, .progress-rail > .current { background: var(--blue); }
.hero-strip { display: flex; align-items: center; justify-content: space-between; gap: 26px; margin-bottom: 24px; padding: 30px; color: #fff; background: #172643; border: 1px solid #253653; border-radius: var(--radius); }
.hero-strip h2 { max-width: 630px; font-size: 26px; line-height: 1.25; }
.hero-strip p { max-width: 650px; margin-top: 10px; color: #bac8df; font-size: 13px; }
.hero-strip .eyebrow { color: var(--lime); }
.hero-strip .button.primary { flex-shrink: 0; background: var(--lime); border-color: var(--lime); color: #203021; }
.hero-strip .button.primary:hover { background: #e3fa99; border-color: #e3fa99; }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 15px; }
.inline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 1000px) {
  .split-form > .summary-card { position: sticky; top: 24px; }
}

@media (max-width: 1000px) {
  .work-grid { grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); gap: 16px; }
  .order-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .order-route { grid-row: 2; grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 5px 14px; }
  .order-meta { grid-column: 2; grid-row: 1; }
  .order-route > * { max-width: 100%; }
  .split-form { grid-template-columns: minmax(0, 1.45fr) minmax(255px, .9fr); gap: 18px; }
  .panel-body, .panel-header, .toolbar { padding-left: 18px; padding-right: 18px; }
  .rider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .site-header { min-height: 76px; padding: 16px 20px; gap: 16px; }
  .header-links { gap: 13px; font-size: 12px; }
  .header-links > span { display: none; }
  .demo-banner { padding: 10px 20px; gap: 12px; font-size: 11px; }
  .role-nav { margin: 20px 20px 0; max-width: calc(100% - 40px); }
  .main { padding: 27px 20px 42px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 22px; }
  .page-heading .actions { width: 100%; }
  .lede { margin-top: 10px; font-size: 13px; }
  .stats { gap: 10px; margin-bottom: 20px; }
  .stat { padding: 16px; }
  .stat strong { font-size: 27px; }
  .stat small { font-size: 10px; }
  .stat > label, .stat > span:first-child, .stat > p:first-child { font-size: 11px; }
  .work-grid, .split-form { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .order-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) auto; padding: 18px; }
  .order-route { display: flex; flex-direction: column; grid-column: auto; grid-row: auto; }
  .order-meta { grid-column: auto; grid-row: auto; }
  .summary-card { padding: 22px; }
  .hero-strip { align-items: flex-start; flex-direction: column; gap: 20px; padding: 25px; }
  .hero-strip h2 { font-size: 24px; }
  .site-footer { width: calc(100% - 40px); }
  .tracking-card { padding: 24px; }
  .tracking-card h2 { font-size: 25px; }
}

@media (max-width: 480px) {
  .site-header { align-items: center; padding: 15px 16px; }
  .brand { gap: 9px; }
  .brand img, .brand > svg { width: 36px; height: 36px; }
  .brand > span { font-size: 18px; }
  .brand small { font-size: 8px; letter-spacing: .085em; }
  .header-links { font-size: 11px; gap: 8px; }
  .header-links .button { min-height: 36px; padding: 8px 10px; font-size: 11px; }
  .demo-banner { align-items: flex-start; padding: 10px 16px; }
  .demo-banner .button { padding: 5px 8px; font-size: 11px; }
  .role-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: calc(100% - 32px); max-width: none; margin: 18px 16px 0; padding: 4px; gap: 3px; }
  .role-tab { min-width: 0; min-height: 44px; padding: 8px 5px; gap: 5px; font-size: 11px; white-space: normal; text-align: center; }
  .role-tab svg { width: 14px; height: 14px; }
  .main { padding: 25px 16px 36px; }
  .eyebrow { font-size: 10px; margin-bottom: 8px; }
  .page-heading .actions .button { flex-grow: 1; }
  .stats { gap: 7px; }
  .stat { padding: 14px 11px; border-radius: 11px; }
  .stat strong { margin-top: 10px; font-size: 26px; }
  .stat small { display: block; font-size: 9px; line-height: 1.45; }
  .stat > label, .stat > span:first-child, .stat > p:first-child { min-height: 28px; font-size: 10px; line-height: 1.4; }
  .panel { border-radius: 14px; }
  .panel-header { padding: 18px 16px; }
  .panel-header h2 { font-size: 16px; }
  .panel-header .button { padding: 7px 9px; font-size: 11px; }
  .panel-body { padding: 19px 16px; }
  .toolbar { padding: 14px 16px; gap: 8px; }
  .toolbar > input, .toolbar > .field:first-child { flex-basis: 100%; }
  .toolbar > select { flex: 1 1 40%; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px; }
  .toolbar input, .toolbar select { font-size: 14px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .field { margin-bottom: 17px; }
  .field > label, .field > legend { font-size: 12px; }
  .input-row { flex-wrap: wrap; }
  .input-row > input { flex-basis: 160px; }
  .order-row { grid-template-columns: minmax(0, 1fr) auto; gap: 11px; padding: 17px 16px; }
  .order-info strong { font-size: 13px; }
  .order-route { grid-column: 1 / -1; grid-row: 2; display: flex; flex-direction: row; flex-wrap: wrap; gap: 5px 12px; font-size: 11px; }
  .order-meta { grid-column: 2; grid-row: 1; align-items: flex-end; }
  .badge { padding: 4px 6px; font-size: 10px; }
  .summary-card { padding: 22px 18px; border-radius: 14px; }
  .summary-card .price { font-size: 34px; }
  .detail-grid { gap: 16px 13px; }
  .detail-value { font-size: 12px; }
  .rider-grid { grid-template-columns: minmax(0, 1fr); }
  .rider-card { padding: 17px; }
  .task-card { padding: 19px 16px; }
  .tracking-card { padding: 22px 18px; border-radius: 14px; }
  .tracking-card h2 { font-size: 25px; }
  .hero-strip { padding: 23px 20px; border-radius: 14px; }
  .hero-strip h2 { font-size: 23px; }
  .hero-strip .button { width: 100%; }
  dialog.modal, .modal dialog { width: calc(100vw - 24px); max-width: calc(100vw - 24px); border-radius: 16px; max-height: 92dvh; }
  .modal-header { padding: 18px; }
  .modal-header h2 { font-size: 21px; }
  .modal-body { padding: 20px 18px; }
  .modal-footer { padding: 15px 18px; }
  .modal-footer .button { flex-grow: 1; }
  .close-button { width: 36px; height: 36px; min-width: 36px; }
  .toast { bottom: 15px; max-width: calc(100vw - 30px); padding: 13px 17px; font-size: 12px; }
  .site-footer { width: calc(100% - 32px); align-items: flex-start; flex-direction: column; padding-top: 19px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Completed app components. */
.demo-banner { justify-content: flex-start; }
.demo-banner > .pill { flex-shrink: 0; background: #e4edcf; border-color: #d3dfbc; color: #465a32; font-size: 9px; letter-spacing: .05em; }
.toolbar > .search-field { min-width: 0; flex: 1 1 210px; }
.toolbar > label:not(.search-field) { flex: 0 1 138px; min-width: 0; }
.toolbar label select { min-width: 0; width: 100%; }
.order-row { grid-template-columns: minmax(0, 1fr) 130px; }
.order-row .order-meta { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.order-row .order-id { margin: 0 3px 0 0; }
.order-row .order-route { display: block; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.order-row .order-route > span { display: inline; margin: 0 4px; }
.order-side { position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 0; padding-right: 20px; font-size: 13px; }
.order-side > strong { color: #2c3b55; font-variant-numeric: tabular-nums; }
.order-side > small { max-width: 100%; font-size: 10px; color: var(--muted); line-height: 1.5; }
.row-arrow { position: absolute; top: 2px; right: 0; color: #8b9ab0; font-size: 16px; }
.board-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 15px; padding-top: 13px; padding-bottom: 14px; background: #fcfdfe; border-top: 1px solid var(--line); }
.board-footer .hint { margin: 0; font-size: 10px; }
.status-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: #6c9d32; box-shadow: 0 0 0 4px #eff5e7; }
.panel-body.rider-grid { display: flex; flex-direction: column; gap: 0; }
.rider-grid .rider-card { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 0 17px; margin: 0 0 17px; border: 0; border-bottom: 1px solid #edf0f4; border-radius: 0; background: none; }
.rider-card strong { font-size: 12px; line-height: 1.45; }
.rider-card > div > small { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; color: #47679d; background: #edf2fa; border: 1px solid #e0e8f4; border-radius: 50%; font-size: 10px; font-weight: 600; }
.rider-load { display: block; text-align: right; color: var(--ink); font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rider-load small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 400; }
.hero-strip { flex-direction: column; align-items: flex-start; gap: 16px; margin: 0; padding: 25px; }
.hero-strip .eyebrow { margin: 0; color: var(--lime); }
.hero-strip h2 { font-size: 26px; line-height: 1.3; }
.demo-guide { display: flex; flex-direction: column; gap: 10px; padding: 0 0 0 18px; margin: 16px 0; color: #63718a; font-size: 12px; line-height: 1.6; }
.demo-guide li { padding-left: 4px; }
.demo-guide li::marker { color: #8391a8; font-size: 11px; font-weight: 600; }
.hero-strip .demo-guide { margin: 2px 0; color: #c3cee0; font-size: 11px; }
.hero-strip .demo-guide li::marker { color: #bdd777; }
.text-link { display: inline-block; width: fit-content; font-size: 12px; font-weight: 600; text-decoration: none; }
.hero-strip .text-link { color: var(--lime); }
.hero-strip .text-link:hover { color: #ecffb2; }
.quote-rule { height: 1px; margin: 22px 0; background: var(--line); }
.summary-line { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 13px 0; font-size: 12px; line-height: 1.5; }
.summary-line > span { color: var(--muted); }
.summary-line strong { text-align: right; }
.summary-card > .sample-note { margin: 20px 0; }
.summary-card > .button { width: 100%; }
.rider-selector { margin-bottom: 24px; }
.rider-selector > .panel-body { display: grid; grid-template-columns: minmax(220px, 360px) minmax(0, 1fr); align-items: center; gap: 0 28px; }
.rider-selector .field { margin: 0; }
.rider-summary { display: flex; align-items: center; justify-content: flex-end; gap: 18px; font-size: 13px; line-height: 1.5; }
.rider-summary > span { font-size: 12px; color: var(--muted); }
.rider-selector > .panel-body > .hint { grid-column: 1 / -1; margin-top: 12px; }
.rider-task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
.rider-task-grid .panel { margin: 0; }
.rider-task-grid > .full { grid-column: 1 / -1; }
.panel.task-card { padding: 0; }
.task-card .panel-header .order-id { margin: 0; }
.task-card .panel-body > h2 { font-size: 21px; }
.task-card .panel-body > .button { margin-top: 20px; }
.tracking-search { max-width: 760px; margin: 0 auto 22px; }
.panel.tracking-card { padding: 0; }
.tracking-card .tracking-reference { margin: 0; color: var(--ink); font-size: 25px; letter-spacing: -.03em; }
.tracking-card .route-preview { margin-top: 0; }
.tracking-card .detail-grid > div > .detail-label:not(:first-child) { margin-top: 18px; }
.modal-body > .order-meta { flex-direction: row; align-items: center; margin-bottom: 12px; }
.modal-body > h3 { font-size: 21px; }
.modal-body .section-title { margin-top: 27px; font-size: 14px; }
.action-section { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.action-section .input-row > select { flex: 1; }
.action-section .field { margin-bottom: 11px; }
.action-section .notice { margin-top: 14px; }
.timeline-item { display: flex; align-items: flex-start; gap: 13px; margin-left: 0; padding: 0 0 20px; border: 0; }
.timeline-item > .step-dot { width: 9px; height: 9px; margin-top: 6px; border: 0; background: #8aa2d5; }
.timeline-item:first-child > .step-dot { background: var(--blue); }
.timeline-item::before { top: 20px; bottom: 2px; left: 4px; width: 1px; height: auto; background: #dde4ef; border-radius: 0; }
.timeline-item:first-child::before { background: #dde4ef; }
.timeline-item:last-child::before { display: none; }
.empty-symbol { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; margin-bottom: 17px; border-radius: 15px; color: #7794d8; background: #f0f4fd; font-size: 32px; }
.site-footer > div { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

@media (max-width: 1000px) {
  .toolbar > .search-field { flex-basis: 100%; }
  .toolbar > label:not(.search-field) { flex: 1 1 40%; }
  .order-row { grid-template-columns: minmax(0, 1fr) 100px; }
  .order-row .order-meta { grid-column: auto; grid-row: auto; }
  .order-row .order-route { grid-column: auto; grid-row: auto; }
  .order-side { padding-right: 14px; font-size: 12px; }
  .rider-summary { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (max-width: 760px) {
  .role-nav { width: calc(100% - 40px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .role-tab { padding: 10px 8px; font-size: 12px; white-space: normal; text-align: center; }
  .rider-task-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .rider-selector > .panel-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; }
  .rider-summary { font-size: 12px; }
  .rider-summary > span { font-size: 11px; }
}

@media (max-width: 480px) {
  .site-header { flex-wrap: wrap; gap: 12px; }
  .header-links { width: 100%; justify-content: space-between; gap: 12px; }
  .header-links > a { font-size: 11px; }
  .demo-banner { gap: 8px; font-size: 10px; }
  .demo-banner > .pill { margin-top: 1px; font-size: 8px; padding: 4px 6px; min-height: 23px; }
  .role-nav { width: calc(100% - 32px); }
  .role-tab { min-height: 44px; padding: 8px 5px; font-size: 11px; }
  .order-row { grid-template-columns: minmax(0, 1fr) 91px; gap: 8px; }
  .order-row .order-meta { gap: 5px; margin-bottom: 8px; }
  .order-row .order-id { display: block; width: 100%; font-size: 10px; }
  .order-row .order-route { margin-top: 7px; font-size: 10px; white-space: normal; line-height: 1.55; overflow-wrap: anywhere; }
  .order-side { padding-right: 12px; font-size: 11px; }
  .order-side > small { font-size: 9px; }
  .row-arrow { font-size: 13px; }
  .rider-selector { margin-bottom: 18px; }
  .rider-selector > .panel-body { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .rider-summary { flex-direction: row; justify-content: space-between; align-items: baseline; }
  .rider-selector > .panel-body > .hint { margin-top: 0; }
  .rider-card > div > small { font-size: 11px; }
  .tracking-card .tracking-reference { font-size: 23px; }
  .action-section .input-row { flex-direction: column; align-items: stretch; }
  .action-section .input-row > select { flex: auto; }
  .action-section .input-row > .button { width: 100%; }
}
