/* Lagestand · Jugendfeuerwehr — mobile-first, große Touch-Ziele.
   Marke wie die Einsatzsoftware: Nachtschicht-Dunkel + Signal-Amber. */
:root {
  --nacht: #0e1a1f;      /* Marke: Kopfleiste, dunkler Grund */
  --bake: #f4a82c;       /* Marke: Signal-Amber, Primäraktion */
  --bake-tief: #b9791a;  /* Amber auf hellem Grund */
  --rot: #b91c1c;
  --rot-dunkel: #7f1d1d;
  --navy: #1c2529;       /* Fließtext */
  --grau: #5f6b70;
  --linie: #e0e3e2;
  --hintergrund: #f4f4f2;
  --karte: #ffffff;
  --gruen: #1e8a4c;
  --gruen-hell: #e2f4e9;
  --rot-hell: #fdeaea;
  --gelb: #b9791a;
  --gelb-hell: #fdf3dd;
  --blau-hell: #eaf0f3;
  --blau: #2a5d77;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--hintergrund);
  color: var(--navy);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
}

/* Kopf */
#kopf {
  position: sticky; top: 0; z-index: 20;
  background: var(--nacht); color: #fff;
  padding: 10px 14px calc(10px);
  display: flex; align-items: center; gap: 10px;
}
#kopf .logo { display: flex; align-items: center; }
#kopf .titel { font-weight: 800; font-size: 18px; letter-spacing: -0.03em; flex: 1; line-height: 1.15; }
#kopf .titel small { display: block; font-weight: 500; font-size: 12px; letter-spacing: 0; opacity: 0.8; color: var(--bake); }
#kopf .konto-knopf {
  background: rgba(255,255,255,0.12); border: 0; color: #fff;
  border-radius: 999px; padding: 7px 12px; font-size: 14px; cursor: pointer;
  max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Inhalt */
#inhalt { padding: 14px 14px 90px; max-width: 760px; margin: 0 auto; }
h2 { font-size: 20px; margin: 6px 0 12px; }
h3 { font-size: 16px; margin: 18px 0 8px; }
.hinweis { color: var(--grau); font-size: 14px; }
.leer { text-align: center; color: var(--grau); padding: 40px 10px; }
.leer .gross { font-size: 40px; display: block; margin-bottom: 8px; }

/* Karten */
.karte {
  background: var(--karte); border: 1px solid var(--linie);
  border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
}
.karte-kopf { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.karte-kopf .titel { font-weight: 700; font-size: 16px; flex: 1; min-width: 55%; }
.karte .meta { color: var(--grau); font-size: 13px; margin-top: 2px; }
.karte .beschreibung { margin: 8px 0 0; font-size: 14px; white-space: pre-wrap; }

/* Pillen & Status */
.pille {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; vertical-align: middle;
}
.pille-standort { background: var(--blau-hell); color: var(--blau); }
.pille-stadt { background: var(--nacht); color: var(--bake); }
.pille-zusage { background: var(--gruen-hell); color: var(--gruen); }
.pille-absage { background: var(--rot-hell); color: var(--rot-dunkel); }
.pille-offen { background: var(--gelb-hell); color: var(--gelb); }
.pille-abgesagt { background: var(--rot); color: #fff; }

/* Termin-Datum */
.datum-block {
  background: var(--nacht); color: var(--bake); border-radius: 10px;
  min-width: 52px; text-align: center; padding: 6px 4px; line-height: 1.1;
  float: right; margin-left: 10px;
}
.datum-block .tag { font-size: 20px; font-weight: 800; display: block; }
.datum-block .monat { font-size: 11px; text-transform: uppercase; }

/* Knöpfe */
.btn {
  display: inline-block; border: 1px solid var(--linie); background: #fff;
  color: var(--navy); border-radius: 10px; padding: 10px 14px;
  font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primaer { background: var(--bake); border-color: var(--bake); color: var(--nacht); font-weight: 700; }
.btn-ok { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.btn-leise { border-color: transparent; background: transparent; color: var(--blau); padding: 8px 6px; }
.btn-gefahr { color: var(--rot-dunkel); border-color: var(--rot-hell); background: var(--rot-hell); }
.btn-klein { padding: 7px 10px; font-size: 13px; border-radius: 8px; }
.btn-breit { display: block; width: 100%; text-align: center; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.knopfzeile { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.knopfzeile .btn { flex: 1; text-align: center; min-width: 110px; }

/* Formulare */
.feld { margin-bottom: 12px; }
.feld label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--grau); }
.feld input, .feld select, .feld textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--linie);
  border-radius: 10px; font-size: 16px; background: #fff; color: var(--navy);
  font-family: inherit;
}
.feld textarea { min-height: 90px; resize: vertical; }
.feld input:focus, .feld select:focus, .feld textarea:focus {
  outline: 2px solid var(--bake); outline-offset: 0; border-color: var(--bake);
}
.feld .zeile { display: flex; gap: 8px; }
.checkzeile { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-bottom: 12px; }
.checkzeile input { width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; }
.formfehler { color: var(--rot-dunkel); background: var(--rot-hell); border-radius: 8px; padding: 9px 12px; font-size: 14px; margin-bottom: 12px; }

/* Login */
.login-rahmen { max-width: 380px; margin: 8vh auto 0; }
.login-logo { text-align: center; font-size: 52px; margin-bottom: 6px; }
.login-rahmen h1 { text-align: center; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; margin: 0; color: var(--nacht); }
.login-rahmen .unter { text-align: center; color: var(--bake-tief); font-weight: 600; font-size: 15px; margin: 2px 0 18px; }

/* Fußnavigation */
#fussnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  background: #fff; border-top: 1px solid var(--linie);
  display: flex; justify-content: space-around;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
#fussnav a {
  text-decoration: none; color: var(--grau); font-size: 11px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 4px 10px; border-radius: 10px; min-width: 56px;
}
#fussnav a .symbol { font-size: 21px; }
#fussnav a.aktiv { color: var(--bake-tief); background: var(--gelb-hell); }

/* Modal */
.modal-hintergrund {
  position: fixed; inset: 0; background: rgba(23,38,60,0.55); z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: #fff; border-radius: 16px 16px 0 0; width: 100%; max-width: 560px;
  max-height: 88vh; overflow-y: auto; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
}
@media (min-width: 620px) {
  .modal-hintergrund { align-items: center; }
  .modal { border-radius: 16px; }
}
.modal h2 { margin-top: 0; }

/* Tabellen (Rückmeldeliste, Statistik) */
.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle th { text-align: left; color: var(--grau); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--linie); }
.tabelle td { padding: 8px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle-rahmen { overflow-x: auto; }

/* Zähler-Kacheln */
.zaehler-zeile { display: flex; gap: 8px; margin-bottom: 14px; }
.zaehler { flex: 1; background: #fff; border: 1px solid var(--linie); border-radius: var(--radius); padding: 10px; text-align: center; }
.zaehler .wert { font-size: 22px; font-weight: 800; display: block; }
.zaehler .label { font-size: 12px; color: var(--grau); }
.zaehler.gruen .wert { color: var(--gruen); }
.zaehler.rot .wert { color: var(--rot-dunkel); }
.zaehler.gelb .wert { color: var(--gelb); }

/* Toast */
#toast {
  position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%);
  z-index: 100; pointer-events: none; width: calc(100% - 40px); max-width: 420px;
}
#toast .nachricht {
  background: var(--navy); color: #fff; border-radius: 10px; padding: 11px 16px;
  font-size: 14px; margin-top: 8px; text-align: center;
  animation: toast-rein 0.2s ease;
}
#toast .nachricht.ok { background: var(--gruen); }
#toast .nachricht.fehler { background: var(--rot-dunkel); }
@keyframes toast-rein { from { opacity: 0; transform: translateY(8px); } }

/* Eltern: Kind-Zeilen in Terminkarten */
.kind-zeile {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  border-top: 1px dashed var(--linie); padding-top: 8px; margin-top: 8px;
}
.kind-zeile .kind-name { font-weight: 700; font-size: 14px; }
.kind-zeile .von { color: var(--grau); font-size: 12px; width: 100%; }

/* Avatar-Kreis */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--blau-hell);
  color: var(--blau); font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Abschnitts-Kopf mit Aktion rechts */
.abschnitt-kopf { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 10px; }
.abschnitt-kopf h2, .abschnitt-kopf h3 { margin: 0; }

.trenner { border: 0; border-top: 1px solid var(--linie); margin: 16px 0; }
.klein { font-size: 13px; }
.dokument-link {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  background: var(--hintergrund); border-radius: 8px; margin-top: 6px;
  text-decoration: none; color: var(--navy); font-size: 14px; font-weight: 600;
}
.dokument-link .groesse { color: var(--grau); font-weight: 400; font-size: 12px; margin-left: auto; }
