:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel2: #1c2330;
  --line: #2b3240;
  --text: #e6e9ef;
  --muted: #8b94a3;
  --accent: #ff5c38;
  --free: #35c759;
  --busy: #ff453a;
  --shade: #53a8ff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}
header {
  display: flex; align-items: center; gap: 18px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 1000;
}
header .brand { font-weight: 700; letter-spacing: .5px; }
header .brand b { color: var(--accent); }
nav { display: flex; gap: 4px; }
nav a {
  color: var(--muted); text-decoration: none; padding: 5px 10px;
  border-radius: 6px; border: 1px solid transparent;
}
nav a:hover { color: var(--text); background: var(--panel2); }
nav a.active { color: var(--text); border-color: var(--line); background: var(--panel2); }
header .right { margin-left: auto; color: var(--muted); font-size: 11px; }
header .right a { color: var(--accent); text-decoration: none; }

.layout { display: flex; height: calc(100vh - 45px); }
#map { flex: 1; background: #0a0d12; }
.panel {
  width: 340px; min-width: 300px; overflow-y: auto;
  background: var(--panel); border-left: 1px solid var(--line);
  padding: 14px;
}
.panel h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 16px 0 8px; }
.panel h2:first-child { margin-top: 0; }
.stat { display: flex; justify-content: space-between; padding: 7px 10px; background: var(--panel2); border-radius: 6px; margin-bottom: 6px; }
.stat b { color: var(--text); }
.row { padding: 8px 10px; background: var(--panel2); border-radius: 6px; margin-bottom: 6px; border-left: 3px solid var(--line); cursor: pointer; }
.row:hover { border-left-color: var(--accent); }
.row .t { color: var(--muted); font-size: 11px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.legend { font-size: 11px; color: var(--muted); line-height: 2; }
.legend .dot { width: 10px; height: 10px; }
input[type=text], input[type=datetime-local], select {
  width: 100%; padding: 7px 9px; background: var(--panel2); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; font-family: inherit; font-size: 12px;
}
label.chk { display: flex; gap: 8px; align-items: center; padding: 6px 0; color: var(--muted); cursor: pointer; }
button {
  background: var(--accent); color: #fff; border: 0; padding: 7px 12px;
  border-radius: 6px; font-family: inherit; font-size: 12px; cursor: pointer;
}
button.ghost { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
.hint { color: var(--muted); font-size: 11px; line-height: 1.5; }

.veh-icon { font-size: 0; }
.veh-marker {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 10px rgba(255,92,56,.7);
}
.veh-marker::after {
  content: ""; width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-bottom: 8px solid #fff;
}
.spot-fresh { animation: pulse 1.6s ease-out; }
@keyframes pulse {
  0% { filter: drop-shadow(0 0 8px #fff); }
  100% { filter: none; }
}
.leaflet-popup-content-wrapper { background: var(--panel); color: var(--text); border-radius: 8px; }
.leaflet-popup-tip { background: var(--panel); }
.leaflet-popup-content { font-family: inherit; font-size: 12px; line-height: 1.6; }
.leaflet-popup-content b { color: var(--accent); }
.leaflet-control-attribution { background: rgba(13,17,23,.8) !important; color: var(--muted) !important; font-size: 9px !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-bar a { background: var(--panel) !important; color: var(--text) !important; border-color: var(--line) !important; }
