:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #111827; --text-muted: #6b7280; --border: #e5e7eb;
  --on: #2563eb; --off: #9333ea; --offline: #4b5563; --warn-bg: #fef3c7; --warn: #92400e;
  --brand: #ffcc00;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b0f17; --surface: #111827; --text: #f3f4f6; --text-muted: #9ca3af; --border: #1f2937; --warn-bg: #422006; --warn: #fcd34d; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
body { display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 18px; }
.brand span { font-weight: 500; color: var(--text-muted); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--text-muted); }
.legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.dot.moving { background: var(--on); } .dot.idle { background: var(--off); } .dot.offline { background: var(--offline); }
.who { margin-left: auto; color: var(--text-muted); }
.banner { padding: 8px 16px; background: var(--warn-bg); color: var(--warn); font-weight: 600; }
#map { flex: 1; min-height: 0; }
.cab-pin { width: 32px; height: 32px; }
.cab-pin svg { width: 32px; height: 32px; filter: drop-shadow(0 0 1px rgba(0,0,0,.9)) drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.cab-offline { opacity: .6; }
.leaflet-marker-icon.cab-pin-wrap { transition: transform 1.4s cubic-bezier(.4,0,.2,1) !important; }
.link-btn { background: none; border: 0; color: var(--text-muted); text-decoration: underline; cursor: pointer; font: inherit; padding: 0 0 0 8px; }
.login { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: rgba(11, 15, 23, .55); backdrop-filter: blur(3px); }
.login[hidden] { display: none; }
.login-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.login-card .brand { font-size: 22px; margin-bottom: 4px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; color: var(--text-muted); }
.login-card input { font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.login-card input:focus { outline: 2px solid var(--on); outline-offset: 1px; }
.login-card button { font: inherit; font-weight: 700; padding: 11px; border: 0; border-radius: 8px; background: #111827; color: #ffcc00; cursor: pointer; }
.login-card button:disabled { opacity: .6; cursor: default; }
.login-error { color: #dc2626; font-weight: 600; font-size: 13px; }
