:root {
  --green: #2e9e4f;
  --amber: #e0a008;
  --red: #d6443a;
  --grey: #9aa0a6;
  --dark: #4a4f55;
  --bg: #f4f5f7;
  --panel-bg: #ffffff;
  --text: #1f2329;
  --muted: #6b7178;
  --border: #e3e6ea;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: var(--panel-bg);
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}

.topbar__title { display: flex; align-items: baseline; gap: 0.5rem; }
.topbar__title h1 { margin: 0; font-size: 1.25rem; letter-spacing: 0.04em; }
.topbar__sub { color: var(--muted); font-size: 0.9rem; }

.topbar__controls { display: flex; align-items: center; gap: 0.6rem; }

#city-select {
  font-size: 1rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.badge {
  font-size: 0.78rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.badge--live { background: #e7f5ec; color: var(--green); }
.badge--stale { background: #fdecea; color: var(--red); }

.banner {
  background: #fff4e0;
  color: #8a5a00;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid #f0dcae;
  flex: 0 0 auto;
}

.layout {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

.map { flex: 1 1 auto; min-height: 0; }

.panel {
  flex: 0 0 320px;
  background: var(--panel-bg);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 0.5rem 0.75rem 1.5rem;
}
.panel__heading { font-size: 0.95rem; color: var(--muted); margin: 0.5rem 0.25rem; text-transform: uppercase; letter-spacing: 0.05em; }

.garage-list { list-style: none; margin: 0; padding: 0; }
.garage-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
}
.garage-item:hover { background: var(--bg); }

.dot {
  flex: 0 0 auto;
  width: 14px; height: 14px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff;
}
.dot--green { background: var(--green); }
.dot--amber { background: var(--amber); }
.dot--red { background: var(--red); }
.dot--grey { background: var(--grey); }
.dot--dark { background: var(--dark); }

.garage-item__body { flex: 1 1 auto; min-width: 0; }
.garage-item__name { font-weight: 600; }
.garage-item__meta { font-size: 0.82rem; color: var(--muted); }
.garage-item__free { font-weight: 700; font-size: 1.1rem; text-align: right; }
.garage-item__free small { display: block; font-weight: 400; font-size: 0.7rem; color: var(--muted); }

/* Map marker badge */
.marker-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px; height: 34px;
  padding: 0 6px;
  border-radius: 17px;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.marker-badge--green { background: var(--green); }
.marker-badge--amber { background: var(--amber); }
.marker-badge--red { background: var(--red); }
.marker-badge--grey { background: var(--grey); }
.marker-badge--dark { background: var(--dark); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
}

@media (max-width: 720px) {
  .layout { flex-direction: column; }
  .map { flex: 0 0 55vh; }
  .panel { flex: 1 1 auto; border-left: none; border-top: 1px solid var(--border); }
}
