:root {
  --bg: #f4f5f7; --card: #ffffff; --text: #16171a; --muted: #6b6f7a; --line: #e3e5ea;
  --accent: #ff6a00; --accent2: #ff4500; --good: #1f9d55; --bad: #d92d20; --warn: #c77700; --head: #0e0e10;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0e0e10; --card: #1a1b1f; --text: #f1f1f3; --muted: #9a9ca6; --line: #2a2c33; --head: #000; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
header { background: var(--head); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
.brand { font-weight: 800; letter-spacing: .3px; font-size: 18px; }
.brand b { color: var(--accent); }
.brand.big { font-size: 30px; text-align: center; margin-bottom: 18px; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #c9cad1; white-space: nowrap; }
.who form { margin: 0; }
nav { background: var(--head); display: flex; gap: 4px; overflow-x: auto; padding: 0 10px 8px; scrollbar-width: none; position: sticky; top: 0; z-index: 5; }
nav::-webkit-scrollbar { display: none; }
nav a { color: #c9cad1; padding: 8px 12px; border-radius: 999px; white-space: nowrap; font-weight: 600; font-size: 14px; }
nav a.on { background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #fff; }
main { max-width: 1100px; margin: 0 auto; padding: 16px 16px calc(40px + env(safe-area-inset-bottom)); }
h1 { font-size: 24px; margin: 6px 0 14px; }
h2 { font-size: 16px; margin: 0 0 10px; }
section { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 14px 0; overflow-x: auto; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pager { display: flex; gap: 6px; }
.pager a { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; color: var(--text); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.tile.accent { border-top-color: var(--accent); } .tile.bad { border-top-color: var(--bad); } .tile.good { border-top-color: var(--good); }
.tile .lbl { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.tile .val { font-size: 26px; font-weight: 800; margin: 2px 0; font-variant-numeric: tabular-nums; }
.tile.bad .val { color: var(--bad); } .tile.good .val { color: var(--good); }
.tile .sub { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.bars { width: 100%; height: 170px; display: block; }
.bars .bar { fill: var(--line); } .bars .bar.hl { fill: var(--accent); }
.bars rect.bar:not([height="0.00"]) { fill: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.bars rect.bar.hl { fill: var(--accent); }
.bars text { font-size: 4.2px; fill: var(--muted); }
.list { display: flex; flex-direction: column; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--line); color: var(--text); }
.item:first-child { border-top: 0; }
.item b { display: block; } .item span { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.chip { border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--line); color: var(--text); }
.chip.ok { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.chip.today, .chip.soon { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.chip.overdue { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; }
.tabs a { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--text); white-space: nowrap; font-weight: 600; font-size: 13.5px; }
.tabs a.on { border-color: var(--accent); color: var(--accent); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; padding: 6px 8px; }
td { padding: 8px; border-top: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.neg { color: var(--bad); } tr.off td { opacity: .45; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; overflow-wrap: anywhere; }
form.inline { display: flex; gap: 8px; margin: 0 0 10px; }
form.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
input, select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; min-width: 0; }
button { padding: 10px 16px; border: 0; border-radius: 10px; background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #fff; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
button.link { background: none; color: var(--accent); padding: 0; font-weight: 600; }
.muted, .hint { color: var(--muted); } .hint { font-size: 12.5px; margin: 8px 0 0; }
.login { max-width: 360px; margin: 12vh auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px 22px; }
.login label { display: block; font-weight: 600; margin-bottom: 12px; } .login input { margin-top: 6px; font-size: 17px; }
.login button { width: 100%; padding: 13px; font-size: 16px; }
#map { height: min(70vh, 640px); border-radius: 14px; border: 1px solid var(--line); z-index: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 10px; color: var(--muted); font-size: 13.5px; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.dot.rented { background: #1f9d55; } .dot.free { background: #6b6f7a; } .dot.locked { background: #d92d20; }
.item small { color: var(--muted); font-weight: 400; }
.leaflet-popup-content { font: 14px/1.4 system-ui, sans-serif; color: #16171a; }
.err { color: var(--bad); font-weight: 600; } .ok { color: var(--good); font-weight: 600; }
@media (max-width: 560px) { .who { font-size: 12px; } .tile .val { font-size: 22px; } h1 { font-size: 20px; } .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 8px; } }
