/* AZR Transport - shared tokens
   Palette: cool paper + ink, one sky-blue action colour, and four outcome colours used everywhere
   (delivered / partial / rejected / pending) so a drop reads the same on the planner, live board and driver phone. */
:root {
  --paper: #F3F6F8;
  --card: #FFFFFF;
  --ink: #16212C;
  --ink-2: #4A5866;
  --ink-3: #7C8995;
  --line: #D8E0E6;
  --line-2: #E9EEF2;
  --sky: #0A6CD4;
  --sky-ink: #084F9C;
  --sky-wash: #E6F1FC;
  --ok: #0E8A68;
  --ok-wash: #E3F4EE;
  --part: #C98A00;
  --part-wash: #FBF1D9;
  --rej: #CC3128;
  --rej-wash: #FBE6E4;
  --pend: #9AA6B1;
  --radius-s: 6px;
  --radius-m: 10px;
  --shadow: 0 1px 2px rgba(22, 33, 44, .06), 0 4px 14px rgba(22, 33, 44, .05);
  --font: 'Barlow', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-num: 'Barlow Semi Condensed', 'Barlow', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; }
a { color: var(--sky-ink); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.hidden { display: none !important; }

/* buttons */
.btn {
  font: inherit; font-weight: 600; font-size: .92rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: .5rem .9rem; border-radius: var(--radius-s); cursor: pointer; min-height: 38px;
}
.btn:hover { border-color: var(--ink-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--sky); border-color: var(--sky); color: #fff; }
.btn.primary:hover { background: var(--sky-ink); border-color: var(--sky-ink); }
.btn.danger { color: var(--rej); border-color: #F0C3BF; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 30px; padding: .25rem .6rem; font-size: .83rem; }
:focus-visible { outline: 3px solid rgba(10, 108, 212, .45); outline-offset: 2px; }

/* inputs */
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius-s); padding: .45rem .6rem; min-height: 38px;
}
input:focus, select:focus, textarea:focus { border-color: var(--sky); outline: none; box-shadow: 0 0 0 3px var(--sky-wash); }
label.f { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: var(--ink-2); font-weight: 500; }

/* outcome chips */
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.delivered, .chip.completed { color: var(--ok); background: var(--ok-wash); }
.chip.partial { color: var(--part); background: var(--part-wash); }
.chip.rejected { color: var(--rej); background: var(--rej-wash); }
.chip.pending, .chip.draft, .chip.open, .chip.planned { color: var(--ink-2); background: var(--line-2); }
.chip.arrived, .chip.in_progress, .chip.dispatched { color: var(--sky-ink); background: var(--sky-wash); }
.chip.skipped, .chip.cancelled { color: var(--ink-3); background: var(--line-2); }

/* The route strip: a trip drawn as a transit line, one dot per drop in delivery order */
.strip { display: flex; align-items: center; min-height: 18px; padding: 2px 0; overflow: hidden; }
.strip .dep { width: 10px; height: 10px; border-radius: 2px; background: var(--ink); flex: none; }
.strip .seg { flex: 1 1 6px; min-width: 3px; height: 3px; background: var(--line); }
.strip .seg.done { background: var(--ink-2); }
.strip .d {
  flex: none; width: 13px; height: 13px; border-radius: 50%;
  background: var(--card); border: 2.5px solid var(--pend); cursor: pointer; padding: 0;
}
.strip .d.arrived { border-color: var(--sky); background: var(--sky-wash); }
.strip .d.delivered { border-color: var(--ok); background: var(--ok); }
.strip .d.partial { border-color: var(--part); background: var(--part); }
.strip .d.rejected { border-color: var(--rej); background: var(--rej); }
.strip .d.skipped { border-color: var(--ink-3); background: repeating-linear-gradient(45deg, var(--card) 0 2px, var(--ink-3) 2px 4px); }
.strip.big .d { width: 18px; height: 18px; border-width: 3px; }
.strip.big .seg { height: 4px; }

/* fill bar */
.fill { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.fill > i { display: block; height: 100%; background: var(--sky); }
.fill.over > i { background: var(--rej); }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-s);
  font-weight: 500; z-index: 3000; max-width: min(92vw, 520px); box-shadow: var(--shadow);
}
#toast.err { background: var(--rej); }

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