/* Shared design system: public map, driver, admin.
   Principles: one accent colour, flat surfaces with hairline borders, small radii, real typography,
   status communicated with text + a dot (never colour alone), tabular numerals for anything that changes. */
@font-face {
  font-family: "Inter Variable";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
:root {
  --bg:#f3f5f8; --surface:#ffffff; --surface-2:#f7f9fb;
  --ink:#0e1a2b; --ink-2:#44526a; --ink-3:#66748a;
  --line:#d6dce5; --line-2:#e6eaf0;
  --brand:#0b3a75; --brand-hover:#0f4c97; --brand-ink:#ffffff; --link:#0f4c97;
  --ok:#14703c; --ok-bg:#e6f3ec; --warn:#8f5200; --warn-bg:#fcf1dc; --danger:#b42318; --danger-bg:#fcebe9;
  --focus:#2f7de1;
  /* brand tokens: defaults here, overridden per customer by /theme.css */
  --header:#0b3a75; --header-ink:#ffffff; --sign:#0b1f3a; --sign-ink:#ffffff; --sign-ok:#7ee2a8;
  --marker:#0b3a75; --marker-ink:#ffffff; --stop:#0e1a2b; --stop-ink:#ffffff;
  --overlay-shadow:0 1px 2px rgba(10,20,40,.08), 0 6px 20px rgba(10,20,40,.12);
  --r:8px; --r-sm:6px; --r-xs:4px;
  --font:"Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg:#0a111b; --surface:#111a27; --surface-2:#16212f;
    --ink:#e8edf4; --ink-2:#aab5c5; --ink-3:#8896a9;
    --line:#26354b; --line-2:#1c2a3c;
    --brand:#2f6fd0; --brand-hover:#3d7ee0; --brand-ink:#ffffff; --link:#86b6f7;
    --ok:#52c48c; --ok-bg:#112d1f; --warn:#e8aa45; --warn-bg:#33270e; --danger:#f48a80; --danger-bg:#3a1713;
    --focus:#6aa6f5;
    --overlay-shadow:0 1px 2px rgba(0,0,0,.5), 0 8px 24px rgba(0,0,0,.5);
  }
}
* { box-sizing:border-box; }
html, body { margin:0; height:100%; }
body { font:400 15px/1.5 var(--font); color:var(--ink); background:var(--bg); -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }
h1, h2, h3, p { margin:0; }
h1 { font-size:18px; font-weight:650; letter-spacing:-.015em; line-height:1.25; }
h2 { font-size:14px; font-weight:650; letter-spacing:-.005em; }
button, input, select, textarea { font:inherit; color:inherit; }
a { color:var(--link); }
.num { font-variant-numeric:tabular-nums; }
.muted { color:var(--ink-3); }
.small { font-size:13px; }
.hidden { display:none !important; }
:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }

/* icons */
.i { width:16px; height:16px; flex:none; vertical-align:-3px; }
.i.lg { width:20px; height:20px; vertical-align:-5px; }

/* surfaces */
.panel { background:var(--surface); border:1px solid var(--line); border-radius:var(--r); }
.panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; border-bottom:1px solid var(--line-2); min-height:49px; }
.panel-body { padding:16px; }

/* buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; height:40px; padding:0 16px; border:1px solid transparent; border-radius:var(--r-sm);
  background:var(--brand); color:var(--brand-ink); font-weight:550; font-size:14px; cursor:pointer; white-space:nowrap; transition:background .12s, border-color .12s, opacity .12s; }
.btn:hover { background:var(--brand-hover); }
.btn.secondary { background:var(--surface); color:var(--ink); border-color:var(--line); }
.btn.secondary:hover { background:var(--surface-2); border-color:var(--ink-3); }
.btn.danger { background:var(--danger); color:#fff; }
.btn.danger:hover { background:var(--danger); filter:brightness(.92); }
.btn.danger-outline { background:var(--surface); color:var(--danger); border-color:var(--line); }
.btn.danger-outline:hover { background:var(--danger-bg); border-color:var(--danger); }
.btn.small { height:30px; padding:0 11px; font-size:13px; }
.btn.block { width:100%; }
.btn.xl { height:56px; font-size:17px; border-radius:var(--r); }
.btn:disabled { opacity:.5; cursor:not-allowed; }

/* form controls */
.field { display:block; margin-top:16px; }
.field:first-child { margin-top:0; }
.field > span, label.lbl { display:block; font-size:13px; font-weight:550; color:var(--ink-2); margin-bottom:6px; }
.hint { font-size:12.5px; color:var(--ink-3); margin-top:6px; }
input:not([type=checkbox]), select, textarea { width:100%; height:40px; padding:0 12px; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--surface); }
textarea { height:auto; padding:10px 12px; resize:vertical; }
input::placeholder, textarea::placeholder { color:var(--ink-3); opacity:.8; }
input:focus, select:focus, textarea:focus { outline:2px solid var(--focus); outline-offset:-1px; border-color:var(--focus); }
input[type=checkbox] { width:16px; height:16px; accent-color:var(--brand); }
.check { display:inline-flex; align-items:center; gap:8px; font-size:14px; cursor:pointer; }
.err { color:var(--danger); font-size:13.5px; margin-top:8px; }
.err:empty { display:none; }

/* status */
.badge { display:inline-flex; align-items:center; gap:6px; padding:2px 8px; border-radius:var(--r-xs); font-size:12px; font-weight:550; line-height:18px; background:var(--surface-2); color:var(--ink-2); border:1px solid var(--line-2); white-space:nowrap; }
.badge.ok { background:var(--ok-bg); color:var(--ok); border-color:transparent; }
.badge.warn { background:var(--warn-bg); color:var(--warn); border-color:transparent; }
.badge.bad { background:var(--danger-bg); color:var(--danger); border-color:transparent; }
.dot { width:8px; height:8px; border-radius:50%; background:var(--ink-3); display:inline-block; flex:none; }
.dot.ok { background:var(--ok); } .dot.warn { background:var(--warn); } .dot.bad { background:var(--danger); }

/* tables */
table { width:100%; border-collapse:collapse; font-size:14px; }
th { text-align:left; font-size:12px; font-weight:550; color:var(--ink-3); padding:9px 12px; border-bottom:1px solid var(--line); background:var(--surface-2); white-space:nowrap; }
td { padding:11px 12px; border-bottom:1px solid var(--line-2); vertical-align:middle; }
tbody tr:last-child td { border-bottom:0; }
td.act, th.act { text-align:right; white-space:nowrap; }
td.act .btn + .btn { margin-left:6px; }
