/* Lagerapp — mobile-first, kein Framework */
:root {
  --c-bg: #f4f6f8;
  --c-surface: #ffffff;
  --c-text: #1c2733;
  --c-muted: #64748b;
  --c-border: #dde3ea;
  --c-primary: #1c6fb8;
  --c-primary-dark: #155a97;
  --c-accent: #0e9f6e;
  --c-danger: #d64545;
  --c-warn-bg: #fff7e0;
  --c-warn-border: #eab308;
  --c-highlight: #fef3c7;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 30, 54, .08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-bg);
}
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 .75rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; }
h3 { font-size: 1.05rem; margin: 1rem 0 .4rem; }
p { margin: .5rem 0; }
small, .muted { color: var(--c-muted); }

/* Header */
.site-head { position: sticky; top: 0; z-index: 40; background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.head-inner {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  max-width: 1100px; margin: 0 auto; padding: .6rem 1rem;
}
.brand { font-weight: 700; font-size: 1.1rem; color: var(--c-text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.head-event { color: var(--c-muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.head-user { margin-left: auto; display: flex; gap: .9rem; flex-wrap: wrap; }
.head-link { font-size: .9rem; white-space: nowrap; }

/* Postfach-Icon im Header (Anzahl ungelesener Nachrichten). Desktop: direkt neben den
   Konto-Links. Mobil: an den rechten Rand neben den Menübutton (siehe Media-Query). */
.head-msg { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; font-size: 1.15rem; line-height: 1; text-decoration: none; }
.head-msg:hover { text-decoration: none; }
.head-msg .msg-count {
  position: absolute; top: 1px; right: -2px; background: #e5484d; color: #fff;
  border-radius: 999px; font-size: .62rem; font-weight: 700; min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px; line-height: 1;
}

/* Hamburger — nur mobil sichtbar */
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 40px; box-sizing: border-box;
  flex-direction: column; justify-content: center; gap: 5px; padding: 0 10px;
  background: none; border: 1px solid var(--c-border); border-radius: 9px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--c-text); border-radius: 2px; transition: transform .2s, opacity .2s; pointer-events: none; }
body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav, .orga-nav, .account-nav {
  display: flex; gap: .25rem; flex-wrap: wrap; align-items: center;
  max-width: 1100px; margin: 0 auto; padding: 0 .75rem .5rem;
}
.main-nav a, .orga-nav a, .account-nav a {
  padding: .35rem .7rem; border-radius: 999px; white-space: nowrap;
  color: var(--c-text); font-size: .92rem;
}
.main-nav a:hover, .orga-nav a:hover, .account-nav a:hover { background: var(--c-bg); text-decoration: none; }
.main-nav a.active { background: var(--c-primary); color: #fff; }
.orga-nav { border-top: 1px dashed var(--c-border); padding-top: .45rem; }
.orga-nav a.active { background: var(--c-accent); color: #fff; }
.orga-tag {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--c-muted); align-self: center; padding: 0 .3rem; font-weight: 700;
}
.nav-label { display: none; }
.account-nav { display: none; } /* Desktop: Konto-Links stehen oben rechts */

/* Mobil: Kopfzeile kompakt, Navigation als aufklappbares Vollbild-Menü untereinander.
   Offen wird die Kopfzeile zum Panel: Leiste oben fix, Liste darunter eigenständig scrollbar. */
/* Zurück-Link „← Übersicht": nur auf Handy/Tablet (Menü eingeklappt), am Desktop verborgen. */
.mobile-back { display: none; }

@media (max-width: 859px) {
  .head-user { display: none; }
  .nav-toggle { display: inline-flex; }
  /* Postfach-Icon an den rechten Rand; der Hamburger schließt direkt daneben an. */
  .head-msg { margin-left: auto; }
  .head-msg + .nav-toggle { margin-left: .4rem; }
  .site-menu { display: none; }
  .mobile-back {
    display: inline-flex; align-items: center; gap: .3rem;
    margin: 0 0 .7rem; font-size: .95rem; font-weight: 600;
    color: var(--c-accent); text-decoration: none;
  }
  .mobile-back:active { opacity: .7; }
  body.menu-open { overflow: hidden; }
  body.menu-open .site-head {
    position: fixed; inset: 0; z-index: 60;
    display: flex; flex-direction: column; background: var(--c-surface);
  }
  body.menu-open .site-menu {
    display: block; flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
    width: 100%; max-width: 1100px; margin: 0 auto; padding: .1rem .9rem 1.4rem;
  }
  .main-nav, .orga-nav, .account-nav {
    flex-direction: column; align-items: stretch; flex-wrap: nowrap;
    gap: .12rem; padding: .35rem 0; margin: 0; border-top: 1px solid var(--c-border);
  }
  .main-nav { border-top: none; padding-top: .1rem; }
  .main-nav a, .orga-nav a, .account-nav a { border-radius: 9px; padding: .62rem .7rem; font-size: 1rem; }
  .account-nav { display: flex; }
  .nav-label, .orga-tag {
    display: block; align-self: stretch; padding: .35rem .2rem .1rem;
    font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--c-muted); font-weight: 700;
  }
}

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.site-foot {
  text-align: center; color: var(--c-muted); font-size: .8rem;
  padding: 2rem 1rem 1.5rem;
}
.foot-claim { white-space: nowrap; font-style: italic; opacity: .9; }

/* Getränke */
.drink-grid { display: flex; flex-direction: column; gap: .5rem; }
.drink-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border: 1px solid var(--c-border); border-radius: var(--radius); padding: .55rem .8rem;
}
.drink-name { min-width: 0; }
.drink-qty { width: 3.2rem; text-align: center; font-size: 1.1rem; padding: .4rem; }
/* +/− Schnelleingabe der Getränke */
.drink-stepper { display: flex; align-items: center; gap: .35rem; flex: none; }
.drink-step {
  width: 2.4rem; height: 2.4rem; flex: none; border: 1px solid var(--c-border);
  background: var(--c-bg); border-radius: var(--radius); font-size: 1.3rem; line-height: 1;
  cursor: pointer; color: var(--c-text); font-weight: 600;
}
.drink-step:active { background: var(--c-highlight); }
.drink-sum { font-weight: 600; }
.power-choice { display: flex; flex-direction: column; gap: .25rem; margin: .25rem 0 .1rem; }
.drink-table { width: 100%; border-collapse: collapse; }
.drink-table td { padding: .25rem .4rem; border-bottom: 1px solid var(--c-border); }
.drink-table td:first-child { width: 3rem; white-space: nowrap; }
.drink-log {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding: .6rem 0; border-bottom: 1px solid var(--c-border); flex-wrap: wrap;
}
.drink-log:last-child { border-bottom: none; }
.drink-log-qty { font-weight: 700; font-size: 1.05rem; margin-right: .3rem; }
.drink-log-meta { font-size: .78rem; margin-top: .1rem; }
.drink-log-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.drink-edit { display: flex; gap: .3rem; align-items: center; margin: 0; }
.drink-edit .drink-qty { width: 3.6rem; font-size: 1rem; }
.drink-log.is-voided .drink-log-label,
.drink-log.is-voided .drink-log-qty { text-decoration: line-through; opacity: .6; }

.method-choice {
  border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: .6rem .8rem; margin: 1rem 0 .5rem; display: flex; gap: 1.2rem; flex-wrap: wrap;
}
.method-choice legend { font-size: .8rem; color: var(--c-muted); padding: 0 .3rem; }
.radio-inline { display: inline-flex; align-items: center; gap: .4rem; margin: 0; cursor: pointer; }
.radio-inline input { width: auto; margin: 0; }

.card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem; margin-bottom: 1rem;
}
.card > h1:first-child, .card > h2:first-child { margin-top: 0; }

.grid { display: grid; gap: 1rem; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Flash */
/* Meldungen schweben, damit sie auch sichtbar sind, wenn die Seite
   nach dem Speichern an der alten Scroll-Position bleibt. */
.flash-stack {
  position: fixed; top: .75rem; right: .75rem; left: auto;
  width: min(420px, calc(100vw - 1.5rem)); z-index: 50;
  display: flex; flex-direction: column; gap: .5rem;
  pointer-events: none;
}
.flash-stack:empty { display: none; }
.flash {
  padding: .7rem 1rem; border-radius: var(--radius);
  border: 1px solid transparent; box-shadow: var(--shadow);
  pointer-events: auto;
}
.flash-ok { background: #e7f6ef; border-color: #b5e3cd; color: #14603f; }
.flash-error { background: #fdeaea; border-color: #f3c1c1; color: #8f2020; }
.flash-info { background: #e8f1fa; border-color: #c3d9ef; color: #1a4d7c; }

/* Auffälliges Bestätigungs-Popup (mittig eingeblendet) — für „richtig abgesendet"-Momente
   wie Getränke buchen oder Einkauf einreichen. Blockiert die Seite nicht, blendet sich selbst aus. */
.flash-pop-wrap {
  position: fixed; top: 15vh; left: 0; right: 0; z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  padding: 0 1rem; pointer-events: none;
}
.flash-pop-wrap:empty { display: none; }
.flash-pop {
  display: flex; align-items: center; gap: .75rem;
  background: var(--c-surface); color: var(--c-text);
  border: 1px solid #b5e3cd; border-left: 5px solid var(--c-accent);
  border-radius: 14px; padding: 1rem 1.15rem;
  box-shadow: 0 18px 44px rgba(16, 30, 54, .22), 0 4px 12px rgba(16, 30, 54, .12);
  max-width: min(460px, calc(100vw - 2rem));
  font-size: 1.02rem; font-weight: 600; line-height: 1.35;
  pointer-events: auto;
  animation: flash-pop-in .32s cubic-bezier(.2, 1.25, .35, 1) both;
}
.flash-pop.flash-pop-hide { animation: flash-pop-out .28s ease forwards; }
.flash-pop-ico {
  flex: 0 0 auto; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.15rem;
  background: var(--c-accent); color: #fff;
}
.flash-pop-error { border-color: #f3c1c1; border-left-color: var(--c-danger); }
.flash-pop-error .flash-pop-ico { background: var(--c-danger); }
.flash-pop-msg { flex: 1 1 auto; }
.flash-pop-x {
  flex: 0 0 auto; border: none; background: transparent; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: var(--c-muted); padding: 0 .1rem; margin: -.2rem 0;
}
.flash-pop-x:hover { color: var(--c-text); }
@keyframes flash-pop-in {
  from { opacity: 0; transform: translateY(-16px) scale(.93); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes flash-pop-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-10px) scale(.96); }
}
@media (prefers-reduced-motion: reduce) {
  .flash-pop, .flash-pop.flash-pop-hide { animation: none; }
}

/* Formulare */
label { display: block; font-weight: 600; font-size: .9rem; margin: .8rem 0 .25rem; }
label .req { color: var(--c-danger); }
input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=date], input[type=time], input[type=number], input[type=datetime-local],
select, textarea {
  width: 100%; padding: .55rem .7rem; font-size: 1rem; font-family: inherit;
  border: 1px solid var(--c-border); border-radius: 8px; background: #fff;
  color: var(--c-text);
  /* iOS Safari gibt Datums-/Zeitfeldern eine intrinsische Mindestbreite und
     ignoriert width:100% — min-width:0 + max-width:100% zwingen sie ins Layout,
     sonst ragen sie (z. B. „Einkaufsdatum") aus schmalen Grids/Flexboxen. */
  min-width: 0; max-width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--c-primary); outline-offset: 0; border-color: var(--c-primary);
}
textarea { min-height: 90px; resize: vertical; }
/* Passwort-Feld mit Augen-Button (Klartext ein-/ausblenden), siehe app.js. */
.pw-wrap { position: relative; }
.pw-wrap input[type=password], .pw-wrap input[type=text] { padding-right: 2.6rem; }
.pw-toggle { position: absolute; right: .3rem; top: 50%; transform: translateY(-50%);
  width: 2rem; height: 2rem; padding: 0; border: none; background: transparent; cursor: pointer;
  font-size: 1.1rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; opacity: .75; }
.pw-toggle:hover { opacity: 1; background: var(--c-bg); }
/* Aktive Ja/Nein-Auswahl (z. B. „Begleitung mitbringen?") als Button-Paar statt Checkbox. */
.btn-choice { font-weight: 500; }
.btn-choice:has(input:checked) { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.check { display: flex; align-items: flex-start; gap: .5rem; font-weight: 400; margin: .5rem 0; }
.check input { width: auto; margin-top: .3rem; }

/* Essensauswahl: große, gut lesbare und tappbare Menü-Buttons */
.meal-opt { display: flex; align-items: center; gap: .65rem; padding: .7rem .85rem; margin: .45rem 0;
  border: 2px solid var(--c-border); border-radius: .6rem; cursor: pointer; font-weight: 500;
  line-height: 1.35; transition: border-color .12s ease, background-color .12s ease; }
.meal-opt input[type=radio] { width: 1.25rem; height: 1.25rem; margin: 0; flex: 0 0 auto; accent-color: var(--c-primary); }
.meal-opt:hover { border-color: var(--c-primary); }
.meal-opt:has(input:checked) { border-color: var(--c-primary); background: #e8f1fa; }
.meal-opt:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.meal-opt:has(input:disabled):hover { border-color: var(--c-border); }
.meal-opt.none { font-weight: 400; color: var(--c-muted); }
.meal-opt-wrap { margin: .45rem 0; }
.meal-opt-row { position: relative; }
.meal-opt-row .meal-opt { margin: 0; padding-right: 2.7rem; }
.meal-info-btn { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
  width: 1.9rem; height: 1.9rem; padding: 0; border-radius: 50%; border: 1.5px solid var(--c-border);
  background: var(--c-surface); color: var(--c-primary); cursor: pointer; font-size: 1rem; font-weight: 700;
  line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.meal-info-btn:hover { border-color: var(--c-primary); }
.meal-info-btn[aria-expanded="true"] { border-color: var(--c-primary); background: #e8f1fa; }
.meal-desc { margin: .3rem 0 0; padding: .55rem .7rem; border: 1px solid var(--c-border);
  border-radius: .5rem; background: var(--c-bg); font-size: .92rem; line-height: 1.4; }
.field-hint { font-size: .82rem; color: var(--c-muted); margin-top: .2rem; }
/* Warnhinweis „Zeitraum fehlt" (rotes Dreieck) in Listen/Übersichten. */
.warn-tri { color: var(--c-danger); font-weight: 600; cursor: help; white-space: nowrap; }
.form-row { display: grid; gap: .75rem; }
/* Grid-Kinder dürfen unter ihre Inhaltsbreite schrumpfen (Standard ist min-content),
   sonst weitet ein breites Datumsfeld die Spalte und sprengt das Layout. */
.form-row > * { min-width: 0; }
@media (min-width: 640px) { .form-row-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 640px) { .form-row-3 { grid-template-columns: 1fr 1fr 1fr; } }

/* Sub-Reiter innerhalb eines Orga-Bereichs (z. B. Externe Abrechnung: Gastverein / Caterer). */
.subtabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: .2rem 0 1rem; }
.subtabs a { padding: .4rem .8rem; border-radius: 999px; background: var(--c-surface);
  border: 1px solid var(--c-border); color: var(--c-text); text-decoration: none; font-size: .9rem; }
.subtabs a.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 600; }

/* Flugzeug-Verwaltung (Orga/Kassenwart): je Flugzeug EINE Karte, in klar benannte Blöcke
   unterteilt. Mobil gestapelt, ab Tablet zweispaltig. Keine festen px-Breiten → nichts läuft über. */
.res-head { display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: baseline; }
.res-head .res-title { font-weight: 700; font-size: 1.02rem; }
.res-sub { color: var(--c-muted); font-size: .84rem; margin-top: .25rem; }
.res-blocks { display: grid; gap: .7rem; margin-top: .75rem; }
@media (min-width: 720px) { .res-blocks { grid-template-columns: 1fr 1fr; } }
.res-block { border: 1px solid var(--c-border); border-radius: 10px; padding: .6rem .7rem; background: var(--c-bg-soft, transparent); }
.res-block-wide { grid-column: 1 / -1; }
.res-block-title { font-weight: 600; font-size: .85rem; margin: 0 0 .45rem; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.res-inline-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: end; }
.res-inline-form input[type="date"] { max-width: 100%; }

/* Orga-Dokumente-Prüfliste: klare, mobil-taugliche Zeilen mit IMMER sichtbaren Aktionen
   (kein Verstecken hinter einem Bulk-Knopf ganz unten). */
.doc-item { display: flex; flex-wrap: wrap; gap: .35rem .6rem; align-items: center; justify-content: space-between; padding: .45rem 0; border-top: 1px dashed var(--c-border); }
.doc-item:first-child { border-top: none; }
.doc-item-main { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; flex: 1 1 12rem; min-width: 0; }
.doc-item-actions { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.doc-item-actions .btn { white-space: nowrap; }
.doc-item-actions details > summary { list-style: none; }
.doc-item-actions details > summary::-webkit-details-marker { display: none; }

/* Buttons — ein einheitliches System (moderner Look): inline-flex für saubere Icon+Text-
   Ausrichtung, kräftige Beschriftung, weiche Übergänge, dezenter Press-Effekt. */
/* NUR `.btn` (nicht `button.btn`) — sonst schlägt die Element-Spezifität die Farb-Modifier
   (.btn-danger/.btn-secondary/.btn-ok) bei <button>-Elementen, und alles würde primär-blau. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .5rem 1rem; font-size: .95rem; font-family: inherit; font-weight: 600; line-height: 1.2;
  border-radius: 9px; border: 1px solid var(--c-primary); text-align: center; white-space: nowrap;
  background: var(--c-primary); color: #fff; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .04s ease;
}
.btn:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
/* Sekundär = neutraler Umriss (klar als „weniger wichtig" erkennbar). */
.btn-secondary { background: var(--c-surface); color: var(--c-text); border-color: var(--c-border); }
.btn-secondary:hover { background: var(--c-bg); border-color: var(--c-muted); }
.btn-danger { background: var(--c-danger); border-color: var(--c-danger); color: #fff; }
.btn-danger:hover { background: #b93a3a; border-color: #b93a3a; }
.btn-ok { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.btn-ok:hover { background: #0b855c; border-color: #0b855c; }
.btn-sm { padding: .28rem .65rem; font-size: .85rem; border-radius: 7px; gap: .3rem; }
.btn[disabled], button[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; align-items: center; }

/* Tabellen */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; background: var(--c-surface); }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--c-border); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--c-muted); white-space: nowrap; }
tr.highlight td { background: var(--c-highlight); }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody tr:hover td { background: #f8fafc; }
tr.highlight:hover td { background: #fde9a8; }

/* Gruppierte Kosten-Aufstellung: Kategorie-Kopf mit Zwischensumme, Posten eingerückt */
.statement .grp-head th {
  text-transform: none; letter-spacing: 0; font-size: .92rem; font-weight: 700;
  color: var(--c-text); background: var(--c-bg); white-space: normal; padding-top: .7rem;
}
.statement .grp-head th.num { color: var(--c-text); }
.statement td.pos { padding-left: 1.4rem; }
.statement tr:hover td.pos { background: transparent; }
/* Kosten-Zwischensumme vor dem Zahlungs-Abschnitt */
.statement tr.subtotal td { border-top: 1px solid var(--c-border); font-weight: 600; color: var(--c-muted); padding-top: .5rem; }
/* Ein-/Auszahlungen als eigener Abschnitt: klare Trennlinie oben */
.statement .pay-head th { border-top: 2px solid var(--c-border); padding-top: .7rem; }
.statement tr.total td { border-top: 2px solid var(--c-border); border-bottom: none; padding-top: .55rem; }

/* Badges */
.badge {
  display: inline-block; padding: .1rem .5rem; border-radius: 999px;
  font-size: .75rem; font-weight: 700; background: var(--c-border); color: var(--c-text);
}
.badge-green { background: #d1f2e2; color: #0d5c3d; }
.badge-red { background: #f8d7d7; color: #8f2020; }
.badge-yellow { background: var(--c-highlight); color: #92610a; }
.badge-blue { background: #d9e9f9; color: #155a97; }
.badge-orange { background: #fde8cf; color: #9a5411; }
.badge-gray { background: #e5e9ef; color: #4b5563; }

/* Hinweisboxen */
.notice {
  border-left: 4px solid var(--c-warn-border); background: var(--c-warn-bg);
  padding: .7rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: .75rem 0;
  font-size: .92rem;
}
.notice-danger { border-color: var(--c-danger); background: #fdeaea; }

/* Multi-Step-Formular */
.steps { display: flex; gap: .3rem; margin-bottom: 1rem; }
.steps > span {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .4rem .5rem; font-size: .82rem;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 6px;
  color: var(--c-muted);
}
.steps .s-num {
  flex: 0 0 auto; font-weight: 700; width: 1.35rem; height: 1.35rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.06); font-size: .78rem;
}
.steps .s-lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Aktiver Schritt: hervorgehoben, breiter und voll ausgeschrieben */
.steps > span.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); flex-grow: 2.4; }
.steps > span.active .s-num { background: rgba(255,255,255,.28); }
.steps > span.active .s-lbl { overflow: visible; }
.steps > span.done { background: #d1f2e2; color: #0d5c3d; border-color: #b5e3cd; }
.steps > span.done .s-num { background: rgba(13,92,61,.14); }
@media (max-width: 560px) {
  /* Auf schmalen Screens zeigen inaktive Schritte nur ihre Nummer, der aktive den vollen Namen */
  .steps > span:not(.active) .s-lbl { display: none; }
  .steps > span.active { flex-grow: 3; }
}
.step-panel { display: none; }
.step-panel.active { display: block; }
/* Reiter-Leiste (z. B. Speiseplan / Frühstück) */
.tabbar { display: flex; gap: .3rem; margin-bottom: 1rem; }
.tabbar a {
  flex: 1 1 0; text-align: center; padding: .55rem .7rem; text-decoration: none; font-size: .9rem;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 6px; color: var(--c-muted);
}
.tabbar a:hover { border-color: var(--c-primary); }
.tabbar a.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.tbl-breakfast { width: 100%; }
.tbl-breakfast td { vertical-align: middle; }

/* Dashboard-Kacheln */
.tiles { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .tiles-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .tiles-4 { grid-template-columns: repeat(4, 1fr); } }
.tile {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow);
}
.tile h3 { margin: 0 0 .4rem; font-size: .95rem; color: var(--c-muted); }
.tile .big { font-size: 1.4rem; font-weight: 700; }
.tile ul { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .9rem; }

/* Kalender */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal .cal-head { font-size: .75rem; text-align: center; color: var(--c-muted); padding: .2rem 0; }
.cal .cal-cell {
  min-height: 72px; background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: 6px; padding: .25rem .35rem; font-size: .78rem;
}
.cal .cal-cell.other { opacity: .4; }
.cal .cal-cell.today { border-color: var(--c-primary); border-width: 2px; }
.cal .cal-day { font-weight: 700; font-size: .75rem; }
.cal .cal-item {
  display: block; margin-top: .15rem; padding: .05rem .3rem; border-radius: 4px;
  background: #d9e9f9; color: #155a97; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal .cal-item.ausflug { background: #d1f2e2; color: #0d5c3d; }
.cal .cal-item.moeglich { background: var(--c-highlight); color: #92610a; }

/* Definition Lists */
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; margin: .5rem 0; }
dl.kv dt { font-weight: 600; color: var(--c-muted); font-size: .9rem; }
dl.kv dd { margin: 0; overflow-wrap: break-word; min-width: 0; }
/* Schmale Screens: Label über Wert stapeln — der Wert bekommt die volle Breite,
   damit lange Inhalte (Datum, Verein, E-Mail) nicht mehr gequetscht umbrechen. */
@media (max-width: 560px) {
  dl.kv { grid-template-columns: 1fr; gap: 0; }
  dl.kv dt { margin-top: .6rem; }
  dl.kv dt:first-of-type { margin-top: 0; }
  dl.kv dd { margin: .05rem 0 0; }
}

/* Altersstaffeln */
.tier-editor { margin: .5rem 0; }
.tier-table { font-size: .85rem; }
.tier-table td { padding: .3rem .4rem; }
.tier-table form { margin: 0; }
/* Auf dem Handy untereinander, ab Tablet nebeneinander — die Felder sind schmal. */
.tier-add { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; align-items: end; }
.tier-add .tier-f { flex: 1 1 100%; }
.tier-add label { margin: 0; font-size: .78rem; color: var(--c-muted); }
.tier-add input { margin: 0; }
.tier-add button { flex: 0 0 auto; }
@media (min-width: 640px) {
  .tier-add .tier-f { flex: 1 1 7rem; }
}

/* Anwesenheits-Diagramm */
.presence-chart { display: flex; align-items: flex-end; gap: .25rem; overflow-x: auto; padding-bottom: .3rem; -webkit-overflow-scrolling: touch; }
.presence-col { display: flex; flex-direction: column; align-items: center; min-width: 34px; flex: 1 0 auto; }
.presence-count { font-size: .75rem; font-weight: 700; margin-bottom: .2rem; color: var(--c-muted); }
.presence-bar { width: 26px; display: flex; flex-direction: column-reverse; border-radius: 4px 4px 0 0; overflow: hidden; background: var(--c-border); }
.presence-date { font-size: .68rem; text-align: center; margin-top: .3rem; color: var(--c-muted); line-height: 1.1; }

/* „Was ist zu tun"-Liste */
.todo-list { list-style: none; margin: .3rem 0 0; padding: 0; }
.todo-list li { margin: .3rem 0; }
.todo-list a { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--c-text); }
.todo-list a:hover { text-decoration: underline; }

/* ============ Info-/Landing-Site ============ */
.site-head-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; }
.brand { font-size: 1.15rem; text-decoration: none; color: var(--c-text); }
.brand-mark { font-size: 1.3rem; }
.site-nav { display: flex; align-items: center; gap: .3rem 1rem; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--c-muted); font-weight: 600; font-size: .95rem; }
.site-nav a.active, .site-nav a:hover { color: var(--c-text); }
.site-nav a.btn { color: #fff; }
.site-main { padding: 1.5rem 0 3rem; }
.hero { text-align: center; padding: 2.5rem 0 1.5rem; }
.hero h1 { font-size: 2rem; margin: 0 0 .6rem; }
.lead { font-size: 1.1rem; color: var(--c-muted); max-width: 42rem; margin: 0 auto 1rem; }
.hero .btn-row { justify-content: center; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin: 2rem 0; }
.feature-card { display: block; text-decoration: none; color: var(--c-text); background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: 12px; padding: 1.1rem; transition: box-shadow .15s, transform .15s; }
.feature-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); transform: translateY(-2px); }
.feature-icon { font-size: 1.8rem; }
.feature-icon-inline { font-size: 1.3rem; }
.feature-card h3 { margin: .5rem 0 .3rem; font-size: 1.05rem; }
.cta-band { text-align: center; background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: 14px; padding: 2rem 1.2rem; margin: 2.5rem 0 1rem; }
.feature-block { border-bottom: 1px solid var(--c-border); padding: 1.2rem 0; }
.feature-list { columns: 2; column-gap: 2rem; margin: .5rem 0; }
.feature-list li { margin: .25rem 0; break-inside: avoid; }
@media (max-width: 640px) { .feature-list { columns: 1; } .hero h1 { font-size: 1.6rem; } }
.news-entry { border-bottom: 1px solid var(--c-border); padding: 1.2rem 0; }
.news-head { display: flex; gap: .6rem; align-items: center; margin-bottom: .2rem; }
.handbook-toc { position: sticky; top: .5rem; }
.handbook-toc ul { columns: 2; margin: .4rem 0 0; padding-left: 1.1rem; }
.handbook-toc a { text-decoration: none; }
.handbook-section { border-top: 1px solid var(--c-border); padding: 1.2rem 0; scroll-margin-top: 1rem; }
.handbook-body p { margin: .5rem 0; }
@media (max-width: 640px) { .handbook-toc ul { columns: 1; } }

/* E-Mail-Vorschau (Menübestellung u. Ä.): monospace, scrollbar, klar abgesetzt */
.mail-preview {
  margin: .35rem 0 0; padding: .75rem .9rem;
  background: var(--c-bg); border: 1px solid var(--c-border); border-radius: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem; line-height: 1.5; color: var(--c-text, #1e293b);
  white-space: pre-wrap; word-break: break-word; overflow-x: auto; max-height: 340px; overflow-y: auto;
}

/* ── Willkommens-Hub (öffentliche Startseite) ───────────────────────── */
.welcome-hub { display: flex; flex-direction: column; gap: 1.1rem; }
.welcome-hero { text-align: center; padding: .5rem 0 .25rem; }
.welcome-title { font-size: 1.9rem; margin: .1rem 0 .3rem; line-height: 1.2; }
.welcome-intro { max-width: 62ch; margin: .5rem auto 0; }
.btn-lg { padding: .7rem 1.15rem; font-size: 1.05rem; border-radius: 12px; }

.hub-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.1rem 1.25rem; border-radius: 14px;
  background: linear-gradient(135deg, #eaf3fb, #e6f7ef);
  border: 1px solid var(--c-border);
}
.hub-cta-text { flex: 1; min-width: 220px; }
.hub-cta .btn-lg { flex-shrink: 0; }

.hub-areas { align-items: stretch; }
.hub-area { display: flex; flex-direction: column; }
.hub-area-head { display: flex; align-items: center; gap: .55rem; }
.hub-ico { font-size: 1.5rem; line-height: 1; }
.hub-tiles { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; }
.hub-tile {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .5rem .8rem; border: 1px solid var(--c-border); border-radius: 999px;
  background: var(--c-bg); color: var(--c-text); font-weight: 600; font-size: .92rem;
}
.hub-tile:hover { background: #fff; border-color: var(--c-primary); text-decoration: none; }
.welcome-help { text-align: center; margin-top: .4rem; }
.linklike { background: none; border: none; color: var(--c-primary); cursor: pointer; font: inherit; padding: .3rem; }
.linklike:hover { text-decoration: underline; }

/* ── Erst-Besuch-Tutorial (Coachmarks mit Pfeil) ────────────────────── */
.tour-backdrop { position: fixed; inset: 0; z-index: 1000; background: transparent; }
.tour-spot {
  position: absolute; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(15, 23, 42, .58);
  outline: 3px solid #fff; transition: top .25s, left .25s, width .25s, height .25s; pointer-events: none;
}
.tour-pop {
  position: absolute; z-index: 1001; max-width: min(320px, 90vw);
  background: #fff; color: var(--c-text); border-radius: 12px; padding: .9rem 1rem;
  box-shadow: 0 10px 30px rgba(16, 30, 54, .35);
}
.tour-pop::before {
  content: ''; position: absolute; left: 26px; width: 0; height: 0; border: 9px solid transparent;
}
.tour-pop.below::before { top: -18px; border-bottom-color: #fff; }
.tour-pop.above::before { bottom: -18px; border-top-color: #fff; }
.tour-pop h4 { margin: 0 0 .3rem; font-size: 1rem; }
.tour-pop p { margin: 0 0 .75rem; font-size: .9rem; color: var(--c-muted); }
.tour-pop-actions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.tour-step-count { font-size: .8rem; color: var(--c-muted); }
@media (max-width: 560px) {
  .welcome-title { font-size: 1.6rem; }
  .hub-cta .btn-lg { width: 100%; text-align: center; }
}

/* Utility */
.right { text-align: right; }
.center { text-align: center; }
.mt { margin-top: 1rem; }
.mb0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.filterbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; margin-bottom: 1rem; }
.filterbar > div { min-width: 140px; flex: 1; }
.filterbar label { margin-top: 0; }
@media print {
  .site-head, .site-foot, .btn, .btn-row, .filterbar, .no-print { display: none !important; }
  body { background: #fff; }
  .card { border: none; box-shadow: none; padding: 0; }
}

/* Zugangskarte (Orga: Initialpasswort teilen) */
.access-card { max-width: 32rem; }
.access-grid { display: grid; grid-template-columns: auto 1fr; gap: .4rem .9rem; margin: 1rem 0; align-items: baseline; }
.access-grid dt { color: var(--c-muted); font-size: .8rem; }
.access-grid dd { margin: 0; word-break: break-all; }
.access-val { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.15rem; font-weight: 600; background: var(--c-highlight);
  padding: .12rem .45rem; border-radius: .3rem; letter-spacing: .02em; }
.access-howto { margin-top: .6rem; }

/* Flugplatzinformationen + Wetter-Widget */
.greeting { margin: 0 0 .6rem; }
.greeting h1 { margin: 0; }
.greeting .greeting-spruch { color: var(--c-muted); margin: .1rem 0 0; }
.flugplatz-block .fp-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.wx-widget { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: .6rem; }
.wx-dial { flex: 0 0 auto; }
.wx-facts { flex: 1; min-width: 210px; display: flex; flex-direction: column; gap: .3rem; }
.wx-line { display: flex; gap: .4rem; align-items: baseline; flex-wrap: wrap; font-size: .92rem; }
.wx-k { color: var(--c-muted); min-width: 5.4rem; display: inline-block; font-size: .78rem; }
.wx-trend { display: flex; gap: .4rem; margin-top: .6rem; flex-wrap: wrap; }
.wx-hour { display: flex; flex-direction: column; align-items: center; gap: .18rem; font-size: .76rem; min-width: 2.6rem; }
.wx-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--c-border); }
.wx-dot.wx-blue { background: #5b9bd5; } .wx-dot.wx-green { background: #3fae5a; }
.wx-dot.wx-yellow { background: #e0a800; } .wx-dot.wx-gray { background: var(--c-border); }
.wx-foot { margin: .5rem 0 0; font-size: .85rem; display: flex; justify-content: space-between;
  align-items: center; gap: .5rem; }
.wx-foot .wx-stamp { white-space: nowrap; font-size: .8rem; opacity: .8; }
.wx-table th, .wx-table td { text-align: left; padding: .25rem .5rem; border-bottom: 1px solid var(--c-border); }
.wx-table th { font-size: .78rem; color: var(--c-muted); }

/* Flugzeugtyp-Autocomplete-Dropdown (mobiltauglich, ersetzt natives datalist) */
.actype-dd { position: fixed; z-index: 1200; display: none; max-height: 260px; overflow-y: auto;
  background: var(--c-card, #fff); border: 1px solid var(--c-border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.actype-opt { padding: .55rem .7rem; cursor: pointer; font-size: .95rem; line-height: 1.2; }
.actype-opt:hover, .actype-opt.hi { background: var(--c-accent); color: #fff; }

/* Wetter-Detailseite: Kopf mit Aktualität rechts, Segelflug-Werte */
.wx-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .3rem .8rem; }
.wx-updated { font-size: .8rem; white-space: nowrap; }
.wx-soar dt { color: var(--c-muted); }

/* Rundgang: Nachbau der App-Übersicht (Demo) */
.tour-mock { border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1rem; background: var(--c-bg); margin-top: .5rem; }
.mock-appbar { font-size: .95rem; padding: .5rem .7rem; margin: -1rem -1rem 1rem; border-bottom: 1px solid var(--c-border);
  background: var(--c-surface); border-radius: var(--radius) var(--radius) 0 0; }
.tour-mock .linklike { color: var(--c-primary); }

/* Footer: „Was ist neu?" — klein & schlicht, unten in App- und Marketing-Layout */
.foot-changelog { max-width: 540px; margin: .7rem auto 0; text-align: left; font-size: .82rem; }
.foot-changelog > summary { cursor: pointer; text-align: center; color: var(--c-muted); list-style: none; }
.foot-changelog > summary::-webkit-details-marker { display: none; }
.foot-changelog[open] > summary { margin-bottom: .45rem; }
.foot-changelog-body { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 10px; padding: .6rem .85rem; }
.foot-changelog-body ul { margin: .3rem 0 .45rem; padding-left: 1.1rem; }
.foot-changelog-body li { margin: .15rem 0; }

/* Route-Auswahl (Abreisetag): ein Button, der auf Klick Google-/Apple-Maps zur Wahl stellt. */
.route-picker > summary { list-style: none; cursor: pointer; display: inline-flex; }
.route-picker > summary::-webkit-details-marker { display: none; }
.route-picker[open] > summary { margin-bottom: .4rem; }
.route-picker-menu { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }

/* Übernachtungsauswahl (Anmeldung): aufklappbare Preisübersicht aller Arten auf einen Blick. */
.accom-pricelist { margin: .35rem 0 0; font-size: .85rem; }
.accom-pricelist > summary { cursor: pointer; color: var(--c-primary); list-style: none; }
.accom-pricelist > summary::-webkit-details-marker { display: none; }
.accom-pricelist[open] > summary { margin-bottom: .35rem; }
.accom-pricelist-body { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 10px; padding: .55rem .75rem; }
.accom-pricelist-body ul { margin: 0; padding-left: 1.1rem; }
.accom-pricelist-body li { margin: .2rem 0; }
