/* RVAM-App, Design 2.0 ("Verfeinertes Blau")
   Farbpalette und Bedienmuster stammen aus dem mit dem Vorstand
   abgestimmten Redesign-Entwurf. Die urspruenglichen Variablennamen
   (--gruen, --braun, --creme, ...) wurden bewusst beibehalten, damit
   nicht jede Stelle im CSS umbenannt werden musste; sie tragen jetzt
   aber die neuen Indigo-/Amber-Toene. Neue, sprechendere Variablen
   (--primary, --accent, --erfolg, ...) kommen fuer neu geschriebene
   Bereiche (Kopfzeile, Login, Einstellungen-Seitenleiste, Kalender)
   hinzu.

   Schriften: Ueberschriften in "Lora" (als woff-Dateien selbst
   gehostet, siehe /fonts, damit keine Anfragen an fremde Server noetig
   sind). Fuer den Fliesstext wird bewusst auf eine Schriftdatei
   verzichtet und stattdessen die Systemschrift des jeweiligen Geraets
   verwendet (-apple-system/Segoe UI/Roboto/...) - das entspricht
   optisch der im Entwurf gezeigten "Public Sans" sehr nahe, laedt aber
   nichts von aussen und bleibt auf jedem Geraet sofort verfuegbar. */

@font-face {
  font-family: 'Lora';
  src: url('/fonts/Lora-Variable.woff') format('woff');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('/fonts/Lora-Italic-Variable.woff') format('woff');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Neue, sprechende Namen */
  --primary: #3B34A6;
  --primary-hover: #2A2578;
  --primary-soft: #EEF1F8;
  --primary-soft-stark: #E4E8F7;
  --accent: #E8A33D;
  --accent-soft: #FBEFDA;
  --accent-text: #8A6A2E;
  --erfolg: #2F7D53;
  --erfolg-soft: #EAF3EC;
  --gefahr: #C0392B;
  --gefahr-soft: #FBEAEA;
  --bg: #F6F7FB;
  --flaeche: #FFFFFF;
  --flaeche-alt: #FAFBFD;
  --rand: #E2E6F0;
  --rand-weich: #EEF0F5;
  --text: #1B2340;
  --text-dezent: #5B6478;
  --text-schwach: #8A93AB;
  --schrift-serif: 'Lora', Georgia, serif;
  --schrift-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --schatten: 0 2px 10px rgba(27,35,64,0.07);
  --schatten-stark: 0 20px 48px rgba(27,35,64,0.14), 0 2px 8px rgba(27,35,64,0.06);
  --radius: 14px;
  --radius-klein: 10px;

  /* Alte Variablennamen, auf die neue Palette umgezogen (siehe Kommentar oben) */
  --gruen-dunkel: var(--primary-hover);
  --gruen: var(--primary);
  --braun: #6B62C4;
  --braun-hell: #C7C2ED;
  --creme: var(--bg);
  --creme-dunkel: var(--rand);
  --text-alt: var(--text);
  --rot: var(--gefahr);
  --schatten-alt: var(--schatten);
  --radius-alt: var(--radius);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--schrift-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--schrift-serif); font-weight: 600; letter-spacing: -0.01em; color: var(--text); }

.versteckt { display: none !important; }

/* ---------- Login ---------- */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(600px 420px at 74% 12%, rgba(232,163,61,.16), transparent 60%),
    linear-gradient(160deg, #EEF1F8 0%, #F6F7FB 55%, #FBFAF6 100%);
}
.login-wrapper::before {
  content: '';
  position: absolute; inset: 0; opacity: 0.5;
  background-image: repeating-linear-gradient(115deg, rgba(59,52,166,.05) 0px, rgba(59,52,166,.05) 2px, transparent 2px, transparent 86px);
}
.login-box {
  position: relative;
  background: var(--flaeche);
  border-radius: 22px;
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--schatten-stark);
  text-align: center;
}
.login-box h1 {
  margin: 0 0 4px;
  font-size: 1.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.login-box h1 img.vereinslogo { max-width: 220px; max-height: 110px; display: block; }
.login-box h1:not(:has(img)) { padding-top: 4px; }
.login-untertitel { color: var(--text-schwach); margin-top: 0; margin-bottom: 22px; font-size: 0.85rem; }
.login-box form { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.login-box label { font-size: 0.85rem; font-weight: 600; display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.login-hinweis { font-size: 0.78rem; color: var(--text-schwach); margin-top: 20px; line-height: 1.5; }
.login-passwort-vergessen { align-self: flex-end; margin-top: -8px; font-size: 0.78rem; color: var(--primary); text-decoration: none; }
.login-passwort-vergessen:hover { text-decoration: underline; }
.login-gast-knopf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 13px 16px;
  background: var(--flaeche);
  border: 1px solid var(--rand);
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-klein);
  transition: background 0.15s, border-color 0.15s;
}
.login-gast-knopf:hover { background: var(--primary-soft); border-color: var(--primary-soft-stark); }
.login-version {
  margin: 18px 0 0;
  font-size: 0.72rem;
  color: var(--text-schwach);
  text-align: center;
}
.login-fusszeile { display: flex; justify-content: center; gap: 10px; margin-top: 22px; font-size: 0.72rem; }
.login-fusszeile a { color: var(--text-schwach); text-decoration: none; }
.login-fusszeile a:hover { color: var(--text-dezent); text-decoration: underline; }

/* ---------- Formulare allgemein ---------- */
input, select, textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--rand);
  border-radius: var(--radius-klein);
  background: var(--flaeche-alt);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background: var(--flaeche);
}
textarea { resize: vertical; min-height: 70px; }

button {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-klein);
  padding: 10px 16px;
  background: var(--gruen);
  color: white;
  font-weight: 600;
  transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
}
button:hover { background: var(--gruen-dunkel); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.knopf-sekundaer { background: var(--flaeche); color: var(--text); border: 1px solid var(--rand); }
.knopf-sekundaer:hover { background: var(--primary-soft); border-color: var(--primary-soft-stark); }
.knopf-gefahr { background: var(--gefahr); }
.knopf-gefahr:hover { background: #9c2e21; }
.knopf-klein { padding: 6px 11px; font-size: 0.8rem; border-radius: 8px; }

.fehlermeldung { color: var(--gefahr); font-size: 0.85rem; min-height: 1.2em; }

.wetter-hinweis {
  margin: -6px 0 12px;
  font-size: 0.88rem;
  color: var(--text);
  min-height: 1.2em;
}
.wetter-hinweis-dezent {
  color: var(--text-schwach);
  font-style: italic;
}

.wetter-box { margin: -6px 0 14px; }
.wetter-perioden {
  display: flex;
  gap: 8px;
}
.wetter-periode {
  flex: 1;
  min-width: 0;
  background: var(--primary-soft);
  border-radius: var(--radius-klein);
  padding: 8px 4px;
  text-align: center;
}
.wetter-periode-titel {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-hover);
  margin-bottom: 2px;
}
.wetter-periode-symbol {
  font-size: 1.35rem;
  line-height: 1.2;
}
.wetter-periode-temp {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 2px;
}
.wetter-periode-regen {
  font-size: 0.7rem;
  color: var(--text-dezent);
}
.wetter-periode-leer {
  font-size: 0.85rem;
  color: var(--text-schwach);
  padding: 12px 0;
}
.erfolgsmeldung { color: var(--erfolg); font-size: 0.85rem; }

/* ---------- Umschalter (Checkboxen als Toggle-Schalter) ---------- */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 40px !important;
  height: 22px !important;
  min-width: 40px;
  padding: 0;
  border-radius: 100px;
  background: #C9CDD8;
  border: none;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
input[type="checkbox"]::before {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(27,35,64,0.25);
  transition: transform 0.15s;
}
input[type="checkbox"]:checked { background: var(--gruen); }
input[type="checkbox"]:checked::before { transform: translateX(18px); }
input[type="checkbox"]:focus-visible { box-shadow: 0 0 0 3px var(--primary-soft-stark); }
input[type="checkbox"]:disabled { opacity: 0.5; cursor: not-allowed; }
label:has(> input[type="checkbox"]) { cursor: pointer; }

/* ---------- App-Layout ---------- */
.app-wrapper { min-height: 100vh; display: flex; flex-direction: column; }

.kopfzeile {
  background: var(--flaeche);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  height: 64px;
  border-bottom: 1px solid var(--rand);
  position: sticky;
  top: 0;
  z-index: 30;
}
.kopfzeile-links { display: flex; align-items: center; gap: 22px; min-width: 0; flex: 1 1 auto; }
.marke { font-weight: 700; font-size: 1rem; white-space: nowrap; display: flex; align-items: center; gap: 10px; font-family: var(--schrift-serif); letter-spacing: -0.01em; flex-shrink: 0; }
.marke-symbol {
  width: 32px; height: 32px; border-radius: 9px; background: var(--gruen);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.marke img.vereinslogo { max-height: 34px; max-width: 150px; display: block; border-radius: 6px; }

#hauptnavigation {
  display: flex; align-items: center; gap: 2px;
  flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin;
}
#hauptnavigation::-webkit-scrollbar { height: 4px; }
#hauptnavigation::-webkit-scrollbar-thumb { background: var(--rand); border-radius: 4px; }
#hauptnavigation button, .nav-mehr-knopf {
  background: transparent;
  border: none;
  color: var(--text-dezent);
  font-weight: 500;
  font-size: 0.86rem;
  padding: 9px 12px;
  border-radius: 9px;
  white-space: nowrap;
  position: relative;
  flex-shrink: 0;
}
.nav-mehr-wrapper { flex-shrink: 0; }
#hauptnavigation button:hover, .nav-mehr-knopf:hover { background: var(--flaeche-alt); color: var(--text); }
#hauptnavigation button.aktiv { background: var(--primary-soft); color: var(--gruen); font-weight: 600; }
.registerfahne {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; margin-left: 5px;
  border-radius: 8px; background: var(--gefahr); color: white;
  font-size: 0.68rem; font-weight: 700; vertical-align: middle;
}
.nav-mehr-wrapper { position: relative; }
.nav-mehr-knopf { padding: 9px 10px; color: var(--text-schwach); }
.nav-mehr-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius-klein);
  box-shadow: var(--schatten-stark); padding: 6px; min-width: 200px;
  display: none; flex-direction: column; gap: 2px;
}
.nav-mehr-menu.offen { display: flex; }
.nav-mehr-menu button {
  background: transparent; color: var(--text); font-weight: 500; font-size: 0.86rem;
  text-align: left; padding: 9px 12px; border-radius: 8px;
}
.nav-mehr-menu button:hover { background: var(--primary-soft); color: var(--gruen); }
.nav-mehr-menu button.aktiv { background: var(--primary-soft); color: var(--gruen); font-weight: 600; }

.nutzer-info { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; white-space: nowrap; flex-shrink: 0; }
#eingeloggt-als { display: flex; align-items: center; gap: 9px; }
.nutzer-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--gruen);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.nutzer-name { line-height: 1.3; font-weight: 600; }
.nutzer-name small { font-weight: 500; color: var(--text-schwach); }
@media (max-width: 720px) { .nutzer-name { display: none; } }

main#inhalt { padding: 24px 20px 40px; max-width: 1100px; margin: 0 auto; width: 100%; flex: 1; }
.ansicht-titel { margin: 0 0 4px; font-size: 1.55rem; }
.ansicht-untertitel { color: var(--text-dezent); font-size: 0.88rem; margin: 0 0 22px; }

.app-fusszeile { text-align: center; padding: 16px 20px; font-size: 0.78rem; }
.app-fusszeile a { color: var(--text-schwach); margin: 0 14px; text-decoration: none; }
.app-fusszeile a:hover { color: var(--text-dezent); text-decoration: underline; }
.fusszeile-copyright { color: var(--text-schwach); margin-left: 14px; }
.fusszeile-copyright::before { content: '·'; margin-right: 14px; }

/* ---------- Mobile Navigation (nur Smartphone) ---------- */
.mobile-nav { display: none; }
@media (max-width: 720px) {
  .mobile-nav {
    display: flex; align-items: stretch; justify-content: space-around;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: 64px; padding-bottom: env(safe-area-inset-bottom, 0);
    background: var(--flaeche); border-top: 1px solid var(--rand);
  }
  .mobile-nav button {
    background: none; border: none; color: var(--text-schwach);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 10px; font-weight: 600; border-radius: 0; padding: 6px 4px; flex: 1;
  }
  .mobile-nav button.aktiv { color: var(--gruen); }
  .mobile-nav button svg { width: 20px; height: 20px; }
  .app-wrapper { padding-bottom: 64px; }
  main#inhalt { padding: 18px 14px 28px; }
  .kopfzeile { padding: 0 14px; }
  #hauptnavigation, .nav-mehr-wrapper { display: none; }
}
.mobile-mehr-blatt {
  position: fixed; inset: 0; z-index: 50; display: none;
  background: rgba(27,35,64,0.35);
}
.mobile-mehr-blatt.offen { display: block; }
.mobile-mehr-inhalt {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--flaeche); border-radius: 20px 20px 0 0;
  padding: 10px 10px calc(18px + env(safe-area-inset-bottom, 0));
  max-height: 70vh; overflow-y: auto;
  box-shadow: 0 -10px 30px rgba(27,35,64,0.18);
}
.mobile-mehr-inhalt::before {
  content: ''; display: block; width: 36px; height: 4px; border-radius: 3px;
  background: var(--rand); margin: 4px auto 12px;
}
.mobile-mehr-inhalt button {
  display: block; width: 100%; text-align: left; background: transparent; color: var(--text);
  font-weight: 500; font-size: 0.95rem; padding: 13px 14px; border-radius: 10px;
}
.mobile-mehr-inhalt button:hover, .mobile-mehr-inhalt button.aktiv { background: var(--primary-soft); color: var(--gruen); }

.karte {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--schatten);
  /* Ohne min-width:0 wuerde eine Grid-Zelle (siehe .grid-2) nie schmaler
     werden als der breiteste Inhalt eines Kindelements (z.B. das breite
     Kalenderraster), wodurch dessen eigenes overflow-x:auto wirkungslos
     bliebe und stattdessen die ganze Seite seitlich scrollen wuerde. */
  min-width: 0;
  margin-bottom: 20px;
}
.karte h2 { margin-top: 0; font-size: 1.15rem; }
.karte h3 { margin-bottom: 8px; font-size: 1rem; }

.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }
.spalte-formulare { display: flex; flex-direction: column; gap: 20px; }

/* ---------- Wochenraster (kompakte Belegungsuebersicht bei Gastbuchungen) ---------- */
.wochenraster-kopfzeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.wochenraster-scroll { overflow-x: auto; }
.wochenraster { border-collapse: collapse; width: 100%; font-size: 0.78rem; }
.wochenraster th, .wochenraster td { border: 1px solid var(--rand); text-align: center; padding: 0; }
.wochenraster th { padding: 4px 6px; background: var(--flaeche-alt); font-weight: 600; white-space: nowrap; }
.wochenraster th.wr-stunde { background: transparent; font-weight: 400; padding: 2px 6px; }
.wochenraster td { width: 32px; height: 20px; }
.wochenraster td.wr-frei { background: var(--erfolg-soft); }
.wochenraster td.wr-teilweise { background: var(--accent-soft); }
.wochenraster td.wr-voll { background: var(--gefahr-soft); }
.wochenraster td.wr-gesperrt { background: #C9CDD8; }
.wochenraster th.wr-heute, .wochenraster td.wr-heute { outline: 2px solid var(--gruen); outline-offset: -2px; }
.wochenraster-legende { font-size: 0.78rem; color: var(--text-dezent); margin-top: 6px; }
.wr-legende-punkt { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: middle; }
.wr-legende-punkt:first-child { margin-left: 0; }
.wr-legende-punkt.wr-frei { background: var(--erfolg-soft); }
.wr-legende-punkt.wr-teilweise { background: var(--accent-soft); }
.wr-legende-punkt.wr-voll { background: var(--gefahr-soft); }
.wr-legende-punkt.wr-gesperrt { background: #C9CDD8; }

/* ---------- Belegungsplan ---------- */
.wochen-navigation { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.wochen-navigation strong { flex: 1; font-size: 0.95rem; }
.tage-liste { display: flex; flex-direction: column; gap: 10px; }
.tag-karte { border: 1px solid var(--rand); border-radius: var(--radius-klein); padding: 12px 14px; }
.tag-karte.ist-heute { border-color: var(--braun-hell); background: var(--primary-soft); }
.tag-titel { font-weight: 700; margin-bottom: 8px; color: var(--primary-hover); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.03em; }
.buchungs-eintrag {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--flaeche);
  border: 1px solid var(--rand);
  margin-bottom: 6px;
  font-size: 0.88rem;
  flex-wrap: wrap;
}
.buchungs-eintrag .badge {
  background: var(--gruen);
  color: white;
  border-radius: 100px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
}
.buchungs-eintrag .belegung-badge { background: var(--braun); }
.buchungs-eintrag .belegung-badge.belegung-voll { background: var(--gefahr); }
.buchungs-eintrag.sperr-eintrag { background: var(--flaeche-alt); border: 1px dashed var(--text-schwach); }
.buchungs-eintrag .sperr-badge { background: var(--text-schwach); }
.buchungs-eintrag.gast-eintrag { background: var(--accent-soft); border: 1px dashed var(--accent); }
.buchungs-eintrag .gast-badge { background: var(--accent); color: var(--accent-text); }
.keine-buchungen { color: var(--text-schwach); font-size: 0.85rem; font-style: italic; }

/* ---------- Belegungsplan: Ansicht-Umschalter (Liste/Kalender) ---------- */
.ansicht-umschalter { display: flex; gap: 3px; margin-left: auto; background: var(--primary-soft); border-radius: var(--radius-klein); padding: 3px; }
.ansicht-umschalter button { background: transparent; color: var(--text-dezent); box-shadow: none; }
.ansicht-umschalter button:hover { background: transparent; color: var(--text); }
.ansicht-umschalter .umschalter-aktiv { background: var(--flaeche); color: var(--text); box-shadow: 0 1px 3px rgba(27,35,64,0.12); }
.ansicht-umschalter .umschalter-aktiv:hover { background: var(--flaeche); }

/* ---------- Einstellungen: Seitenleiste nach Themen ---------- */
.einstellungen-shell { display: flex; gap: 24px; align-items: flex-start; }
.einstellungen-reiter { display: flex; flex-direction: column; gap: 3px; flex: 0 0 230px; position: sticky; top: 80px; }
.einstellungen-reiter button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: transparent; color: var(--text-dezent); border: none; font-weight: 600; font-size: 0.86rem;
  padding: 11px 12px;
}
.einstellungen-reiter button svg { flex-shrink: 0; }
.einstellungen-reiter button:hover { background: var(--flaeche-alt); }
.einstellungen-reiter button.aktiv { background: var(--primary-soft); color: var(--gruen); }
.einstellungen-inhalt { flex: 1; min-width: 0; }
@media (max-width: 860px) {
  .einstellungen-shell { flex-direction: column; }
  .einstellungen-reiter { flex-direction: row; flex: none; width: 100%; overflow-x: auto; position: static; gap: 4px; padding-bottom: 4px; }
  .einstellungen-reiter button { width: auto; white-space: nowrap; }
}

/* ---------- Belegungsplan: Kalenderansicht (Wochenraster mit Uhrzeiten) ---------- */
.kalender-wrapper { overflow-x: auto; padding-bottom: 4px; }
.kalender-kopfzeile, .kalender-koerper { display: flex; width: max-content; }
.kalender-zeitachse-spacer { flex: 0 0 46px; }
.kalender-tag-block { flex: 0 0 auto; display: flex; flex-direction: column; }
.kalender-tag-kopf {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-dezent);
  text-align: center;
  padding: 6px 0;
  border-bottom: 2px solid var(--rand);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.kalender-tag-kopf.ist-heute { color: white; background: var(--gruen); border-radius: 100px 100px 0 0; margin: 0 2px; }
.kalender-anlagen-koepfe { display: flex; }
.kalender-anlage-kopf {
  flex: 0 0 118px;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  padding: 4px 4px;
  color: var(--text-schwach);
  border-bottom: 1px solid var(--rand);
  border-right: 1px solid var(--rand);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kalender-zeitachse { flex: 0 0 46px; position: relative; }
.kalender-stunden-label {
  position: absolute;
  right: 6px;
  transform: translateY(-50%);
  font-size: 0.68rem;
  color: var(--text-schwach);
  white-space: nowrap;
}
.kalender-tag-koerper { flex: 0 0 auto; display: flex; position: relative; }
.kalender-tag-koerper.ist-heute { background: var(--flaeche-alt); }
.kalender-anlage-koerper {
  flex: 0 0 118px;
  position: relative;
  border-right: 1px solid var(--rand);
  background-image: repeating-linear-gradient(to bottom, var(--rand-weich) 0, var(--rand-weich) 1px, transparent 1px, transparent 60px);
}
.kalender-block {
  position: absolute;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 8px;
  padding: 3px 6px;
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--text);
  background: var(--primary-soft);
  border: 1px solid var(--primary-soft-stark);
  margin: 0 2px;
  width: calc(100% - 4px);
}
.kalender-block.kalender-block-buchung.ist-eigene { background: var(--gruen); color: white; border-color: var(--gruen); }
.kalender-block.ist-klickbar { cursor: pointer; }
.kalender-block.ist-voll { box-shadow: inset 0 0 0 2px var(--gefahr); }
.kalender-block-sperrung { background: repeating-linear-gradient(45deg,#EDEFF3,#EDEFF3 4px,#E3E6EC 4px,#E3E6EC 8px); border: 1px solid var(--rand); color: var(--text-dezent); }
.kalender-block-gast { background: var(--accent-soft); border: 1.5px dashed var(--accent); color: var(--accent-text); }
.kalender-block-gast.ist-exklusiv { border-style: solid; box-shadow: inset 0 0 0 1px var(--accent); }
.kalender-block-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kalender-block-storno {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 15px;
  height: 15px;
  line-height: 13px;
  padding: 0;
  border: none;
  border-radius: 3px;
  background: rgba(27,35,64,0.15);
  color: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}
.kalender-block-storno:hover { background: rgba(27,35,64,0.3); }
.kalender-jetzt-linie { position: absolute; z-index: 5; left: 0; right: 0; height: 2px; background: var(--accent); pointer-events: none; }
.kalender-jetzt-linie::before {
  content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.kalender-legende { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: 0.78rem; color: var(--text-dezent); }
.kalender-legende-farbe { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.kalender-legende-buchung { background: var(--gruen); }
.kalender-legende-sperrung { background: repeating-linear-gradient(45deg,#EDEFF3,#EDEFF3 3px,#E3E6EC 3px,#E3E6EC 6px); border: 1px solid var(--rand); }
.kalender-legende-gast { background: var(--accent-soft); border: 1.5px dashed var(--accent); }

form.formular-vertikal { display: flex; flex-direction: column; gap: 12px; }
.formular-zeile { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 500px) { .formular-zeile { grid-template-columns: 1fr; } }
label { font-size: 0.85rem; font-weight: 600; display: flex; flex-direction: column; gap: 5px; color: var(--text); }
.formular-abschnitt { font-size: 0.78rem; font-weight: 700; color: var(--text-dezent); text-transform: uppercase; letter-spacing: 0.04em; margin: 4px 0 -4px 0; }

/* ---------- Tabellen und Listen ---------- */
.tabelle-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--rand); }
th { color: var(--text-schwach); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }

.ankuendigung { border-left: 4px solid var(--braun-hell); padding: 12px 16px; margin-bottom: 14px; background: var(--flaeche); border: 1px solid var(--rand); border-left-width: 4px; border-radius: 0 var(--radius-klein) var(--radius-klein) 0; }
.ankuendigung.wichtig { border-left-color: var(--accent); background: var(--accent-soft); border-color: var(--accent-soft); border-left-width: 4px; }
.ankuendigung-kopf { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ankuendigung-meta { font-size: 0.78rem; color: var(--text-schwach); }

.meldung { border-left: 4px solid var(--braun-hell); padding: 12px 16px; margin-bottom: 14px; background: var(--flaeche); border: 1px solid var(--rand); border-left-width: 4px; border-radius: 0 var(--radius-klein) var(--radius-klein) 0; }
.meldung.meldung-erledigt { border-left-color: var(--erfolg); opacity: 0.75; }
.meldung-kopf { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.status-badge { font-size: 0.7rem; padding: 3px 9px; border-radius: 100px; font-weight: 700; color: white; white-space: nowrap; }
.status-badge.status-offen { background: var(--gefahr); }
.status-badge.status-erledigt { background: var(--erfolg); }
.meldung-foto { max-width: 220px; max-height: 160px; border-radius: 10px; display: block; margin: 8px 0; object-fit: cover; }
.meldung-meta { font-size: 0.78rem; color: var(--text-schwach); margin: 6px 0; }

.gastbuchung-bezahlt { border-left-color: var(--erfolg); }
.gastbuchung-storniert { border-left-color: var(--text-schwach); opacity: 0.7; }
.status-badge.status-ausstehend { background: var(--accent); color: var(--accent-text); }
.status-badge.status-bezahlt { background: var(--erfolg); }
.status-badge.status-storniert { background: var(--text-schwach); }

.rolle-abzeichen { font-size: 0.7rem; padding: 3px 9px; border-radius: 100px; background: var(--gruen); color: white; font-weight: 700; }
.rolle-abzeichen.mitglied { background: var(--text-schwach); }
.inaktiv-abzeichen { font-size: 0.7rem; padding: 3px 9px; border-radius: 100px; background: var(--rand); color: var(--text-dezent); }

.rolle-auswahl { width: auto; padding: 6px 8px; font-size: 0.85rem; }
.rolle-auswahl:disabled { opacity: 0.6; }

/* ---------- Statistik ---------- */
.statistik-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 14px 0 18px 0; }
.statistik-kachel { background: var(--primary-soft); border-radius: var(--radius-klein); padding: 14px 16px; }
.statistik-kachel .kachel-label { font-size: 0.76rem; color: var(--text-dezent); }
.statistik-kachel .kachel-wert { font-size: 1.55rem; font-weight: 700; color: var(--primary-hover); margin-top: 3px; font-family: var(--schrift-serif); }
.balkenzeile { margin-bottom: 14px; }
.balkenzeile .balken-titel { font-size: 0.85rem; margin-bottom: 4px; display: flex; justify-content: space-between; gap: 10px; }
.balkenzeile .balken-wert { font-weight: 700; white-space: nowrap; }
.balken-leiste { background: var(--rand-weich); border-radius: 100px; height: 12px; overflow: hidden; }
.balken-fuellung { background: var(--gruen); height: 100%; border-radius: 100px; min-width: 3px; }
.statistik-hinweis { font-size: 0.78rem; color: var(--text-schwach); margin-top: 4px; }
.heatmap-scroll { overflow-x: auto; }
.heatmap-tabelle { border-collapse: collapse; font-size: 0.72rem; }
.heatmap-tabelle th { font-weight: 400; color: var(--text-schwach); padding: 0 2px 4px 2px; text-align: center; border-bottom: none; }
.heatmap-tabelle th.hm-tag-kopf { text-align: right; padding-right: 8px; }
.heatmap-tabelle td { border-bottom: none; padding: 1px; }
.heatmap-tabelle td.hm-tag { text-align: right; padding-right: 8px; color: var(--text-schwach); white-space: nowrap; }
.heatmap-tabelle td.hm-zelle { width: 18px; height: 16px; border-radius: 3px; }
.heatmap-legende { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 0.72rem; color: var(--text-schwach); }
.heatmap-legende .hm-zelle { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.inaktive-liste { font-size: 0.85rem; color: var(--text-dezent); line-height: 1.6; }

.reihe-aktionen { display: flex; gap: 6px; flex-wrap: wrap; }
