:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f0f1f4; --text: #14171c; --muted: #5d6673; --line: #e2e5ea;
  --brand: #2456e6; --brand-ink: #ffffff; --brand-soft: #e7eeff;
  --ok: #1f9d55; --ok-soft: #e3f6ea; --warn: #c27c0e; --warn-soft: #fdf3e1; --bad: #d63b3b; --bad-soft: #fde8e8;
  --radius: 14px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 16px rgba(16,24,40,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116; --surface: #161a21; --surface-2: #1d222b; --text: #e8ebf0; --muted: #98a2b3; --line: #2a303b;
    --brand: #5b84ff; --brand-soft: #1b2645; --ok: #3fcf7f; --ok-soft: #13301f; --warn: #f0b04a; --warn-soft: #33270f;
    --bad: #ff6b6b; --bad-soft: #3a1717; --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; } .between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.btn { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; padding: 11px 16px; border-radius: 11px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .05s, background .15s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand); padding: 8px 10px; }
.btn.block { width: 100%; }
.btn.lg { padding: 15px 18px; font-size: 16px; border-radius: 13px; }
.btn.dark { background: #000; color: #fff; border-color: #000; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.field + .field { margin-top: 12px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.brand { background: var(--brand-soft); color: var(--brand); }
.zone-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.seg { display: flex; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--muted); padding: 9px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.plate { display: inline-flex; align-items: stretch; border: 2px solid #111; border-radius: 6px; background: #fff; color: #111; font-family: "DIN Alternate", "Arial Narrow", Arial, sans-serif; font-weight: 700; letter-spacing: 1px; overflow: hidden; font-size: 17px; line-height: 1; }
.plate .eu { background: #1f47b8; color: #fff; font-size: 9px; padding: 4px 4px 3px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; letter-spacing: 0; }
.plate .num { padding: 5px 8px; }
.toast-wrap { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100% - 24px)); pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 12px 14px; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.25); font-weight: 500; animation: tin .25s ease-out; pointer-events: auto; }
.toast.bad { background: var(--bad); color: #fff; } .toast.ok { background: var(--ok); color: #fff; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--surface-2); }
.clockbar { display: flex; align-items: center; gap: 8px; font-size: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; }
.clockbar b { font-variant-numeric: tabular-nums; }
.clockbar button { border: 0; background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 5px 10px; font: inherit; font-weight: 600; cursor: pointer; }
.topnav { display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: -.02em; }
.logo i { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 17px; }
.kpi { font-size: 28px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tabular { font-variant-numeric: tabular-nums; }
.leaflet-tooltip.zone-label { background: transparent; border: 0; box-shadow: none; color: #111; font-weight: 800; font-size: 13px; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.leaflet-tooltip.zone-label::before { display: none; }
.leaflet-container { font: inherit; }
