:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --border: #e2e4e8;
  --text: #1a1c20;
  --text-muted: #8a8f98;
  --accent: #2563eb;
  --accent-text: #ffffff;
  --green-bg: #e8f8ee;
  --green-text: #1a8a4c;
  --green-border: #bfe9cf;
  --red-bg: #fdecec;
  --red-text: #c62828;
  --red-border: #f5c6c6;
  --yellow-bg: #fff8e1;
  --yellow-text: #a16b00;
  --yellow-border: #f3e0a3;
}

* { box-sizing: border-box; }

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

.view { max-width: 480px; margin: 0 auto; padding: 0 0 32px; min-height: 100vh; }
.hidden { display: none !important; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5;
}
.topbar-title { font-weight: 600; font-size: 18px; }
.icon-btn { background: none; border: none; font-size: 22px; cursor: pointer; width: 32px; }

.login-box {
  max-width: 320px; margin: 20vh auto 0; padding: 24px;
  background: var(--surface); border-radius: 14px; border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
}
.login-box h1 { text-align: center; margin: 0 0 12px; font-size: 22px; }

label { font-size: 15px; color: var(--text-muted); margin-top: 6px; }
select, input[type=text], input[type=password], input[type=date], input[type=time] {
  width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 17px; background: var(--surface); color: var(--text);
}

.btn-primary {
  background: var(--accent); color: var(--accent-text); border: none;
  padding: 12px; font-size: 17px; font-weight: 600; border-radius: 10px;
  cursor: pointer; margin-top: 12px; width: 100%;
}
.btn-abbrechen {
  background: none; border: none; color: var(--text-muted); width: 100%;
  padding: 10px; margin-top: 6px; cursor: pointer; font-size: 16px;
}
.fehler { color: var(--red-text); font-size: 15px; min-height: 16px; }
.hinweis-text { color: var(--text-muted); font-size: 15px; }

.liste { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; }

.karte-parkplatz {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.karte-parkplatz .haus-name { font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.karte-parkplatz .hinweis-input {
  border: none; border-bottom: 1px dashed var(--border); padding: 2px 0; font-size: 14px;
  width: 100%; background: transparent; color: var(--text-muted);
}
.karte-parkplatz .hinweis-input:focus { outline: none; border-bottom-color: var(--accent); }

.link-klein {
  background: none; border: none; padding: 0; margin-top: 4px;
  font-size: 13px; color: var(--accent); text-decoration: underline; cursor: pointer;
}

.hinweis-dauer-row { display: flex; gap: 4px; margin-top: 4px; }
.hinweis-dauer-row select, .hinweis-dauer-row input {
  padding: 3px 4px; font-size: 12px; border-radius: 4px; border: 1px solid var(--border);
}
.hinweis-dauer-row select.hinweis-dauer-select { flex: 1; }
.hinweis-dauer-row input.hinweis-anzahl { width: 44px; }
.hinweis-text-anzeige { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.status-box {
  min-width: 74px; text-align: center; border-radius: 8px; padding: 6px 10px; flex-shrink: 0;
}
.status-box.frei { background: var(--green-bg); border: 1px solid var(--green-border); color: var(--green-text); }
.status-box.besetzt { background: var(--red-bg); border: 1px solid var(--red-border); color: var(--red-text); }
.status-box.unbekannt { background: var(--bg); border: 1px solid var(--border); color: var(--text-muted); font-size: 13px; }
.status-box.ausstehend {
  background: var(--yellow-bg); border: 1px solid var(--yellow-border); color: var(--yellow-text);
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline;
}
.status-box .zahl { font-size: 19px; font-weight: 700; line-height: 1.1; }
.status-box .klein { font-size: 12px; }

.btn-anfrage { margin: 4px 16px 0; width: calc(100% - 32px); }

.menu-liste { display: flex; flex-direction: column; padding: 8px 0; }
.menu-eintrag {
  text-align: left; background: var(--surface); border: none; border-bottom: 1px solid var(--border);
  padding: 16px; font-size: 17px; cursor: pointer; color: var(--text);
}
.menu-eintrag:disabled { color: var(--text-muted); cursor: default; }
.menu-logout { color: var(--red-text); }

.karte {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; margin: 12px 16px;
}

.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center; z-index: 20; padding: 16px;
}
.dialog {
  background: var(--surface); border-radius: 14px; padding: 20px; width: 100%; max-width: 340px;
}
.dialog-titel { font-weight: 600; font-size: 18px; margin-bottom: 14px; }

.tab-row { display: flex; gap: 8px; margin-bottom: 14px; }
.tab-btn {
  flex: 1; padding: 9px; border-radius: 8px; border: 1px solid var(--border); background: none;
  font-size: 15px; font-weight: 600; cursor: pointer; color: var(--text);
}
.tab-btn.tab-aktiv { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-row input[type=range] { flex: 1; }
.slider-row span { font-weight: 600; font-size: 16px; min-width: 42px; }

.feld-row { display: flex; gap: 8px; margin-bottom: 8px; }
.feld-row input { flex: 1; }

/* Meine Anfragen */
.anfrage-karte {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px;
}
.anfrage-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.anfrage-kopf .titel { font-weight: 600; font-size: 16px; }
.anfrage-erstellt { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }

.tag-zeile { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tag-zeile .haus-label { font-size: 15px; min-width: 52px; }
.tag-chips { display: flex; gap: 3px; flex: 1; }
.tag-chip {
  flex: 1; font-size: 12px; text-align: center; padding: 4px 2px; border-radius: 4px;
}
.tag-chip.frei { background: var(--green-bg); color: var(--green-text); }
.tag-chip.besetzt { background: var(--red-bg); color: var(--red-text); }
.tag-chip.unbekannt { background: var(--bg); border: 1px solid var(--border); color: var(--text-muted); }

.badge-laeuft {
  font-size: 13px; background: var(--yellow-bg); color: var(--yellow-text);
  padding: 2px 8px; border-radius: 8px;
}

/* Teilweise-Antwort (kommt ueber Push/Link) */
.teiltag-karte {
  border: 1px solid var(--border); border-radius: 8px; padding: 8px; margin-bottom: 8px;
}
.teiltag-karte .tag-titel { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.teiltag-karte label { display: flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 6px; color: var(--text); }
