:root {
  --bg: #ffffff;
  --panel: #f6f7f9;
  --text: #1b1f24;
  --muted: #5f6b7a;
  --border: #dde2e8;
  --accent: #c8102e;
  --accent-soft: #fbe7ea;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b;
    --panel: #1c2026;
    --text: #e8ebef;
    --muted: #9aa5b3;
    --border: #2d333b;
    --accent: #ff4d63;
    --accent-soft: #3a1d23;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: grid;
  grid-template-columns: 360px 1fr;
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

#sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
}
#sidebar header { padding: 16px; border-bottom: 1px solid var(--border); }
h1 { margin: 0 0 4px; font-size: 20px; }
#status { margin: 0 0 12px; color: var(--muted); }

.dates { display: flex; gap: 8px; margin-bottom: 8px; }
.dates label { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.dates input, .presets button {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  color-scheme: light dark;
}
.presets { display: flex; gap: 6px; }
.presets button { flex: 1; cursor: pointer; }
.presets button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
#list .empty { color: var(--muted); cursor: default; }

#list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
#list li {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
#list li:hover, #list li.selected { background: var(--accent-soft); }
#list li.no-location .venue::after { content: " · ikke fundet på kort"; color: var(--accent); }
#list .date { font-weight: 600; font-variant-numeric: tabular-nums; }
#list .title { margin: 2px 0; }
#list .meta, #list .venue { color: var(--muted); font-size: 12px; }
#list .day { padding: 6px 16px; font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); background: var(--bg); cursor: default; }

#map { height: 100%; }

.marker {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.leaflet-popup-content { font: 13px/1.4 system-ui, sans-serif; }
.leaflet-popup-content h3 { margin: 0 0 2px; font-size: 14px; }
.leaflet-popup-content .addr { color: #5f6b7a; margin-bottom: 6px; }
.leaflet-popup-content ul { margin: 0; padding-left: 16px; }

@media (max-width: 720px) {
  body { grid-template-columns: 1fr; grid-template-rows: 55vh 45vh; }
  #map { grid-row: 1; }
  #sidebar { grid-row: 2; border-right: 0; border-top: 1px solid var(--border); }
}
