:root {
  color-scheme: dark;
  --gold: #ffd700;
  --accent: #ffa733;
  --text: #ffffff;
  --muted: #b0b6c2;
  --line: #3a3a42;
  --bg: #16161a;
  --card: #222228;
  --warn: #ff6568;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.45 "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
header, main { padding: 16px 24px; }
header {
  display: flex;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--gold); font-weight: 700; text-decoration: none; }
.host { color: var(--muted); }
nav { display: flex; gap: 12px; flex-wrap: wrap; }
nav a, main a { color: var(--accent); }
header form { margin-left: auto; }
button, input, select {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
}
button { cursor: pointer; }
h1 { font-size: 1.4rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
article {
  background: var(--card);
  padding: 12px;
  border-radius: 8px;
}
article span { display: block; color: var(--muted); }
article strong { font-size: 1.6rem; color: var(--gold); }
.warn { color: var(--warn); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.chart { width: 100%; height: 160px; background: var(--card); border-radius: 8px; }
polyline { fill: none; stroke: var(--accent); stroke-width: 2; }
.bars { list-style: none; padding: 0; }
.bars li { display: grid; grid-template-columns: 180px 1fr 40px; gap: 8px; align-items: center; margin: 6px 0; }
.bars span { display: block; height: 10px; background: var(--accent); border-radius: 4px; }
.login { display: grid; place-items: center; min-height: 100vh; }
.card { width: min(420px, 92vw); display: grid; gap: 12px; background: var(--card); padding: 24px; border-radius: 12px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
li.text { color: var(--muted); }
.map-wrap {
  position: relative;
  height: 72vh;
  overflow: hidden;
  background: #143044;
  border-radius: 16px;
  touch-action: none;
}
.map-stage { position: absolute; left: 0; top: 0; }
.map-stage img { width: 100%; height: 100%; display: block; pointer-events: none; }
#pins { position: absolute; inset: 0; }
.pin {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50% 50% 50% 0;
  transform: translate(-50%, -100%) rotate(-45deg);
  border: 1px solid #111;
}
.pin.house.free { background: #7dffb3; }
.pin.house.busy { background: #ff6568; }
.pin.business.free { background: #7eb6ff; }
.pin.business.busy { background: #ffa733; }
.map-tools { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.map-hover {
  position: absolute;
  z-index: 2;
  width: 260px;
  pointer-events: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.swatch.house.free { background: #7dffb3; }
.swatch.house.busy { background: #ff6568; }
.swatch.business.free { background: #7eb6ff; }
.swatch.business.busy { background: #ffa733; }
