:root {
  --text: #1f2430;
  --leise: #6b7280;
  --rand: #e3e5ea;
  --flaeche: #ffffff;
  --grund: #f6f7f9;
  --akzent: #d62728;
  --link: #1a56b0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--grund);
}

header, main, footer { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
header { padding-top: 20px; }

.kopfzeile { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
h1 { margin: 0; font-size: 24px; flex: 1; }
.abmelden { color: var(--leise); font-size: 13px; }

a { color: var(--link); }

select, input[type="password"] {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--rand);
  border-radius: 6px;
  background: var(--flaeche);
}

nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--rand);
  margin-top: 14px;
}
nav button {
  font: inherit;
  font-size: 14px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 8px 10px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text);
}
nav button[aria-selected="true"] { border-bottom-color: var(--akzent); color: var(--akzent); }

main { padding-top: 12px; padding-bottom: 24px; min-height: 60vh; }

.karte {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 12px 0;
}
.karte h3 { margin: 0 0 2px; font-size: 17px; }
.info { color: var(--leise); font-size: 14px; margin: 0 0 8px; }
.leer { color: var(--leise); }

/* AirBnB-Match: kleines Bildpaar links, Text und Tabelle rechts */
.fall { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.fall > div { min-width: 0; }
.bilder { display: flex; flex-wrap: nowrap; gap: 4px; }
.bilder a { flex: 0 0 auto; }  /* nie schrumpfen – beide Fotos immer exakt gleich groß */
.bilder img { width: 60px; height: 45px; border-radius: 3px; display: block; object-fit: cover; }

.tabelle { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--rand); vertical-align: top; }
th { color: var(--leise); font-weight: 500; }
tr.klickbar { cursor: pointer; }
tr.klickbar:hover, tr.gewaehlt { background: #eef3fb; }

button.knopf {
  font: inherit;
  font-size: 14px;
  padding: 4px 12px;
  border: 1px solid var(--rand);
  border-radius: 6px;
  background: var(--flaeche);
  cursor: pointer;
}
button.knopf:disabled { opacity: 0.4; cursor: default; }

.blaettern { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 16px 0; color: var(--leise); }

.schalter { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--leise); cursor: pointer; }

#karte { height: 620px; border-radius: 8px; border: 1px solid var(--rand); }
#karte .leaflet-tile-pane { filter: grayscale(1) contrast(0.9) brightness(1.05); } /* Punkte stechen hervor */

.zeitraum { display: block; margin-top: 12px; }
.wieder { font-size: 14px; color: var(--akzent); margin: 0 0 8px; }
.legende { display: flex; gap: 16px; font-size: 13px; color: var(--leise); margin: 4px 0 8px; }
.punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
.punkt-airbnb { background: #d62728; }
.punkt-geloescht { background: #7b3fa0; }
input[type="range"] { width: min(420px, 100%); margin-top: 8px; }

details summary { cursor: pointer; color: var(--link); font-size: 13px; margin-top: 8px; }
details p { white-space: pre-wrap; font-size: 13px; }

footer { padding-bottom: 24px; font-size: 13px; color: var(--leise); }
.status-knopf {
  font: inherit;
  font-size: 12px;
  color: var(--leise);
  background: none;
  border: 1px solid var(--rand);
  border-radius: 6px;
  padding: 2px 10px;
  cursor: pointer;
}
#statusInhalt { margin-top: 8px; }
#statusInhalt table { max-width: 480px; }
#statusInhalt ul { margin: 4px 0; padding-left: 18px; }

/* Anmeldeseite (wird vom Worker ohne Anmeldung ausgeliefert) */
body.anmeldung main { max-width: 360px; padding-top: 18vh; min-height: 0; }
body.anmeldung h1 { margin-bottom: 12px; }
body.anmeldung form { display: flex; flex-direction: column; gap: 10px; }
body.anmeldung label { font-size: 14px; color: var(--leise); }
body.anmeldung button {
  font: inherit;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: var(--text);
  color: #fff;
  cursor: pointer;
}
.fehler { color: var(--akzent); }

@media (max-width: 600px) {
  h1 { font-size: 20px; }
  #karte { height: 440px; }
  .fall { grid-template-columns: 1fr; gap: 8px; }  /* Bildpaar über dem Text, weiterhin nebeneinander */
}
