/* =============================================================================
   Poseidock — Style System
   =============================================================================

   VERWENDUNG
   ----------
   1. Diese Datei in den <head> einbinden:
      <link rel="stylesheet" href="pd-design-system.css">

   2. CSS-Variablen können seitenspezifisch überschrieben werden:
      :root { --blue: #123456; }

   INHALTSVERZEICHNIS
   ------------------
   1.  CSS Custom Properties (Design-Tokens)
   2.  Reset & Basis
   3.  Typografie
   4.  Layout — Page / Header / Main
   5.  Navigation (Desktop)
   6.  Hamburger-Menü (Mobile)
   7.  Buttons
   8.  Formulare (Inputs, Labels, Select, Textarea)
   9.  Modals & Overlays
   10. Tabs
   11. Tabellen & Tabellen-Card
   12. Karten (Table-Cards) & Mobile-Cards
   13. Badges & Status-Labels
   14. Login / Auth-Card
   15. Nachrichten & Feedback (Error, Success, Warn)
   16. Legende & Filter-Buttons
   17. Save-Banner
   18. Einstellungs-Overlay
   19. Utility-Klassen
   20. Responsive Breakpoints
   21. Icon-Sprache & SVG-Icons

   NEUE SEITE ERSTELLEN — MINIMAL-GERÜST
   --------------------------------------
   <!DOCTYPE html>
   <html lang="de">
   <head>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <title>Poseidock</title>
     <link rel="icon" type="image/svg+xml" href="design/Poseidock_Favicon.svg?v=6">
     <link rel="stylesheet" href="pd-design-system.css">
   </head>
   <body>
     <header>
       <img src="design/Poseidock_Logo.svg?v=6" alt="Poseidock Logo" class="logo-img">
       <div>
         <h1>Poseidock</h1>
         <p>Seitenuntertitel</p>
       </div>
       <nav class="nav">
         <button onclick="...">↻</button>
         <span class="nav-username">◉ Name</span>
         <button class="hamburger" onclick="openMobileMenu()">☰</button>
       </nav>
     </header>

     <div id="mobile-menu-backdrop" class="mobile-menu-backdrop" onclick="closeMobileMenu()"></div>
     <div id="mobile-menu" class="mobile-menu"> … siehe Abschnitt 6 … </div>

     <main> … Seiteninhalt … </main>
   </body>
   </html>

   Hinweis: Das Burger-Icon ist seit Version 1.6 auf ALLEN Bildschirmgrößen
   sichtbar (nicht nur mobil) und öffnet ein kompaktes Dropdown-Panel statt
   eines Vollbild-Menüs — siehe Abschnitt 6.
   ============================================================================= */


/* ─────────────────────────────────────────────────────────────────────────────
   1. CSS Custom Properties (Design-Tokens)
   ───────────────────────────────────────────────────────────────────────────── */
:root {
  /* Primärfarben */
  --blue:         #1a3a5c;   /* Marineblau – Primärfarbe */
  --blue-light:   #2a5a8c;   /* Helleres Blau – Hover, Fokus */
  --blue-dark:    #0d2137;   /* Dunkles Blau – Hintergründe */
  --gold:         #c8a84b;   /* Gold-Akzent – Trennlinien, Logos */

  /* Seitenhintergrund & Karten */
  --bg:           #f4f7fa;   /* Seitenhintergrund */
  --card:         #fff;      /* Kartenhintergrund */
  --text:         #1a2a3a;   /* Primärer Text */
  --muted:        #6b7c8e;   /* Gedämpfter Text, Labels */
  --border:       #d0dbe6;   /* Rahmen */

  /* Statusfarben */
  --free:         #2e7d4f;   /* Frei – grün */
  --free-bg:      #e8f5ee;
  --free-border:  #a8d5b8;

  --busy-bg:      #d0d8e0;   /* Belegt – grau */
  --busy-border:  #b0bcc8;
  --busy-text:    #4a5a6a;

  --guest-bg:     #cfe0f5;   /* Gast – hellblau */
  --guest-border: #8ab4d8;
  --guest-text:   #1a3a5c;

  --future-border: #c8a84b;  /* Zukünftig – goldener Rand */
  --future-bg:     #fff8e0;
  --future-text:   #7a6000;

  /* Fehlerzustände (Legacy — nicht direkt verwenden, stattdessen --color-* nutzen) */
  --error:        #b22222;
  --error-bg:     #fdecea;

  /* Semantische Notification-Farben (werden von poseidock-brand.js überschrieben) */
  --color-success:     #2e7d4f;
  --color-success-bg:  #e8f5ee;
  --color-success-border: #a8d5b8;
  --color-warning:     #856404;
  --color-warning-bg:  #fff8e0;
  --color-warning-border: #c8a84b;
  --color-danger:      #b22222;
  --color-danger-bg:   #fdecea;
  --color-danger-border: #f5b8b8;

  /* Kontrastfarben für Text auf farbigem Hintergrund (auto: schwarz/weiß) */
  --color-primary-text:   #ffffff;
  --color-secondary-text: #ffffff;
  --color-accent-text:    #071828;
  --color-success-text:   #ffffff;
  --color-warning-text:   #000000;
  --color-danger-text:    #ffffff;

  /* Radien */
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    14px;
  --radius-xl:    20px;

  /* Schatten */
  --shadow-sm:    0 1px 5px rgba(0,0,0,.06);
  --shadow-md:    0 2px 12px rgba(0,0,0,.09);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.18);
  --shadow-xl:    0 24px 64px rgba(0,0,0,.45);
}


/* ─────────────────────────────────────────────────────────────────────────────
   2. Reset & Basis
   ───────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}


/* ─────────────────────────────────────────────────────────────────────────────
   3. Typografie
   ───────────────────────────────────────────────────────────────────────────── */
h1 { font-size: 21px; font-weight: 700; color: var(--blue); }
h2 { font-size: 18px; font-weight: 700; color: var(--blue); }
h3 { font-size: 15px; font-weight: 700; color: var(--blue); }

.text-muted    { color: var(--muted); }
.text-small    { font-size: 12px; }
.text-label    { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.text-subtitle { font-size: 13px; color: var(--muted); }


/* ─────────────────────────────────────────────────────────────────────────────
   4. Layout — Page / Header / Main
   ───────────────────────────────────────────────────────────────────────────── */

/* Header */
header {
  background: var(--pd2-fill, var(--blue));
  color: var(--color-primary-text);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  position: sticky;
  top: 0;
  z-index: 100;
}
header .logo     { font-size: 26px; }
header .logo-img { height: 36px; width: auto; flex-shrink: 0; }
header h1        { font-size: 16px; font-weight: 600; color: var(--color-primary-text); line-height: 1.2; }
/* Poseidock-Schriftzug (Kurven, window.PDWordmark): „Posei“ in Akzentfarbe, „dock“ in Textfarbe; nur wenn der Name „Poseidock“ lautet */
.pd-wm { height: 1em; width: auto; display: inline-block; vertical-align: -.04em; }
.pd-wm-posei { fill: var(--wm-accent, var(--color-accent, var(--gold))); }
.pd-wm-dock  { fill: currentColor; }
/* Im Header/Menü den kontrastgeprüften Akzent verwenden (--header-accent, gesetzt von poseidock-brand.js) */
header .pd-wm-posei, ._nc-menu .pd-wm-posei { fill: var(--header-accent, var(--color-accent, var(--gold))); }
/* Eigenes Logo mit zu wenig Kontrast zum Header: dezente Plakette dahinter */
.logo-img.pd-logo-plate { background: var(--pd-logo-plate-bg, #fff); border-radius: 8px; padding: 3px; box-sizing: border-box; }
header p         { font-size: 11px; opacity: .75; margin-top: 2px; }

/* Main content area */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 12px 60px;
}
main.wide { max-width: 1200px; }


/* ─────────────────────────────────────────────────────────────────────────────
   5. Navigation (Desktop)
   ───────────────────────────────────────────────────────────────────────────── */
.nav {
  margin-left: auto;
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.nav a,
.nav button {
  color: rgba(255,255,255,.72);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
  letter-spacing: .1px;
}
.nav a:hover,
.nav button:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

/* Logout-Button im Nav mit goldenem Rand */
.nav .btn-logout-nav {
  border: 1px solid rgba(200,168,75,.5);
  opacity: .75;
}

/* Angemeldeter Benutzer im Nav */
.nav-username {
  font-size: 11px;
  opacity: .75;
  white-space: nowrap;
  color: var(--color-primary-text);
}


/* ─────────────────────────────────────────────────────────────────────────────
   6. Hamburger-Menü (kompaktes Dropdown — IMMER sichtbar, nicht nur mobil)
   ───────────────────────────────────────────────────────────────────────────── */
.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--color-primary-text);
  font-size: 22px;
  cursor: pointer;
  padding: 6px 10px;
  line-height: 1;
  flex-shrink: 0;
}

/* Transparenter Klick-Catcher zum Schließen bei Klick außerhalb */
.mobile-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 399;
  background: transparent;
}
.mobile-menu-backdrop.open { display: block; }

/* Kompaktes Panel — anchored unter dem Hamburger-Icon, KEIN Vollbild-Overlay */
.mobile-menu {
  display: none;
  position: fixed;
  top: 62px;
  right: 16px;
  z-index: 400;
  background: var(--blue-dark);
  flex-direction: column;
  width: 240px;
  max-width: calc(100vw - 32px);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
}
.mobile-menu.open { display: flex; }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.mobile-menu-header span   { color: white; font-size: 13px; font-weight: 700; }
.mobile-menu-header button { background: none; border: none; color: white; font-size: 18px; cursor: pointer; line-height: 1; }

.mobile-menu-body { max-height: 60vh; overflow-y: auto; padding: 6px 0; }
.mobile-menu-body a,
.mobile-menu-body button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: none;
  border: none;
  color: rgba(255,255,255,.85);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}
.mobile-menu-body a:hover,  .mobile-menu-body a:active,
.mobile-menu-body button:hover, .mobile-menu-body button:active { background: rgba(255,255,255,.08); }

.mobile-menu-footer {
  padding: 11px 14px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mobile-menu-footer .expiry     { font-size: 12px; color: rgba(255,255,255,.5); }
.mobile-menu-footer .btn-logout {
  width: 100%;
  padding: 12px;
  background: var(--color-accent);
  border: 1px solid var(--gold);
  color: var(--pd2-on-accent, var(--color-accent-text));
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/*
  JS-Grundgerüst:
  function openMobileMenu()  { menu.classList.add('open'); backdrop.classList.add('open'); }
  function closeMobileMenu() { menu.classList.remove('open'); backdrop.classList.remove('open'); }
  Nur EIN Menüpunkt sollte ein Item duplizieren, das bereits als Quicklink in
  .nav sichtbar ist — sonst wirkt es redundant (siehe members.html / audit.html).
*/


/* ─────────────────────────────────────────────────────────────────────────────
   7. Buttons
   ───────────────────────────────────────────────────────────────────────────── */

/* Primär-Button */
.btn-primary {
  flex: 1;
  padding: 10px 16px;
  background: var(--pd2-fill, var(--blue));
  color: var(--color-primary-text);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover    { background: var(--pd2-fill-2, var(--blue-light)); }
.btn-primary:disabled { background: #9ab3cc; color: white; cursor: default; }

/* Primär-Button — große Variante (Login, Set-Password) */
.btn-primary-lg {
  width: 100%;
  padding: 15px;
  background: var(--pd2-fill, var(--blue));
  color: var(--color-primary-text);
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
  letter-spacing: .2px;
}
.btn-primary-lg:hover    { background: var(--pd2-fill-2, var(--blue-light)); }
.btn-primary-lg:active   { transform: scale(.98); }
.btn-primary-lg:disabled { background: #9ab3cc; color: white; cursor: default; transform: none; }

/* Abbrechen / Sekundär */
.btn-cancel {
  flex: 1;
  padding: 10px 16px;
  background: white;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-cancel:hover { background: var(--bg); }

/* Grüner Aktions-Button (z.B. "Anlegen & Einladung senden") */
.btn-success {
  flex: 1;
  padding: 10px 16px;
  background: var(--pd2-fill-ok, var(--color-success));
  color: var(--color-success-text);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
}
.btn-success:hover { opacity: .85; }

/* Kleine Aktions-Buttons (in Tabellen) */
.btn-sm {
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid;
  cursor: pointer;
  background: white;
  margin-right: 3px;
  transition: opacity .15s;
}
.btn-sm:hover  { opacity: .7; }
.btn-edit { color: var(--blue);  border-color: var(--blue); }
.btn-del  { color: var(--error); border-color: var(--error); }
.btn-lock { color: var(--free);  border-color: var(--free); }

/* Entsperren-Button (Benutzerverwaltung) */
.btn-unlock {
  width: 100%;
  padding: 14px;
  background: var(--gold);
  color: #071828;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
}
.btn-unlock:hover { opacity: .88; }

/* Link als Button (Einladungslink kopieren etc.) */
.btn-link-style {
  padding: 8px 12px;
  background: var(--pd2-fill, var(--blue));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* Zur Anmeldung Button (set-password.html) */
.btn-to-login {
  display: inline-block;
  padding: 13px 28px;
  background: var(--pd2-fill, var(--blue));
  color: var(--color-primary-text);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s;
}
.btn-to-login:hover { background: var(--blue-dark); }


/* ─────────────────────────────────────────────────────────────────────────────
   8. Formulare (Inputs, Labels, Select, Textarea)
   ───────────────────────────────────────────────────────────────────────────── */

/* Feld-Gruppe */
.fg,
.field-group {
  margin-bottom: 11px;
}

/* Label */
.fg label,
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* Inputs (Standard — in Modals / Einstellungen) */
.fg input,
.fg select,
.fg textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  -webkit-appearance: none;
  background: white;
}
.fg input:focus,
.fg select:focus,
.fg textarea:focus {
  outline: none;
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(42,90,140,.12);
}
.fg textarea { resize: vertical; min-height: 55px; }

/* Inputs — große Variante (Login, set-password) */
input.input-lg,
.input-lg {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #d0dce8;
  border-radius: var(--radius-md);
  font-size: 16px;
  outline: none;
  color: var(--text);
  background: #f9fbfd;
  transition: border-color .15s, box-shadow .15s;
}
input.input-lg:focus,
.input-lg:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,111,196,.12);
  background: white;
}

/* Passwort-Sichtbarkeit-Toggle */
.input-wrap       { position: relative; }
.pw-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9aabb8;
  font-size: 19px;
  padding: 4px;
  line-height: 1;
  width: auto;
}
.pw-toggle:hover { color: var(--blue); }
.pw-toggle svg { display: block; }
.pw-toggle .pw-eye-off { display: none; }
.pw-toggle.pw-on .pw-eye { display: none; }
.pw-toggle.pw-on .pw-eye-off { display: block; }

/* Passwort-Stärkeanzeige */
.strength-bar  { height: 4px; border-radius: 2px; background: #e0e8f0; margin-top: 6px; overflow: hidden; }
.strength-fill { height: 100%; border-radius: 2px; width: 0; transition: width .3s, background .3s; }
.strength-hint { font-size: 11px; color: #9aabb8; margin-top: 4px; text-align: right; min-height: 16px; }

/* Zweispaltige Grid-Gruppen */
.r2   { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.r3   { display: grid; grid-template-columns: 1fr 100px 90px; gap: 8px; }
.dt-row { display: grid; grid-template-columns: 1fr 110px; gap: 5px; }
.time-sel { padding: 8px 6px; font-size: 13px; }


/* ─────────────────────────────────────────────────────────────────────────────
   9. Modals & Overlays
   ───────────────────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 22px 20px 18px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.modal h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 14px;
  padding-bottom: 9px;
  border-bottom: 2px solid var(--gold);
}

/* ── Karte (Abschnitts-Box für Einstellungs-Seiten) ── */
.s-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
}

/* ── Abschnittsbeschriftung ── */
.s-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 0 0 12px;
}
.s-label + .s-label { margin-top: 20px; }
.s-card > .s-label:first-child { margin-top: 0; }

/* ── Trennlinie innerhalb einer Karte ── */
.s-sep { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── Token-/Secret-Reveal-Box ── */
.token-reveal {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 12px 14px;
}

/* ── Farb-Grid (3→2→1 Spalten) ── */
.color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* ── Farbfeld: Picker + Hex-Input ── */
.color-pair {
  display: flex;
  gap: 8px;
  align-items: center;
}
.color-pair input[type="color"] {
  width: 40px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Textfarb-Zeile: Picker + Hex + Auto-Button ── */
.color-text-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.color-text-row input[type="color"] {
  width: 40px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-auto {
  padding: 7px 11px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  transition: background-color .2s, color .2s;
  flex-shrink: 0;
  background: none;
}

/* ── Kontrast-Slider-Zeile ── */
.contrast-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.contrast-row > label { font-size: 13px; white-space: nowrap; }
.contrast-row input[type="range"] { accent-color: var(--blue); width: 140px; }
.contrast-hint { font-size: 11px; color: var(--muted); }

/* ── Preset-Buttons ── */
.preset-row { display: flex; gap: 8px; flex-wrap: wrap; }
.preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 13px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  transition: background .15s, border-color .15s;
}
.preset-btn:hover { background: var(--surface); border-color: var(--blue); }
.preset-swatches { display: inline-flex; gap: 3px; align-items: center; }
.preset-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.15);
  flex-shrink: 0;
}

/* ── Preset speichern ── */
.save-preset-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ── Script-Tag-Box ── */
.script-tag-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 12px;
  font-family: monospace;
  color: var(--text);
  overflow-x: auto;
  white-space: nowrap;
}

.modal-actions { display: flex; gap: 9px; margin-top: 14px; }

.modal-msg {
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 12px;
  margin-bottom: 10px;
  display: none;
}
.modal-msg.error   { background: var(--color-danger-bg);  color: var(--color-danger);  border: 1px solid var(--color-danger-border);  display: block; }
.modal-msg.success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid var(--color-success-border); display: block; }
.modal-msg.warn    { background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid var(--color-warning-border); display: block; }

/* Einstellungs-Overlay (größer, mit Blur) */
.settings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(5,18,35,.6);
  backdrop-filter: blur(4px);
  overflow-y: auto;
  padding: 24px 16px;
}
.settings-overlay.open { display: block; }

.settings-panel {
  max-width: 520px;
  margin: 0 auto;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
  overflow: hidden;
}
.settings-header {
  background: var(--pd2-fill, var(--blue));
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.settings-header h2 {
  color: white;
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}
.settings-header .btn-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}


/* ─────────────────────────────────────────────────────────────────────────────
   10. Tabs
   ───────────────────────────────────────────────────────────────────────────── */

/* Seiten-Tabs (audit.html) */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 0;
}
.tab-btn {
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: var(--bg);
  color: var(--muted);
  transition: background .15s;
  margin-right: 4px;
}
.tab-btn.active           { background: var(--card); color: var(--blue); border-color: var(--blue); }
.tab-btn:hover:not(.active) { background: #e8eef4; }

.tab-pane        { display: none; }
.tab-pane.active { display: block; }

/* Modal-Tabs (Einstellungen) */
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
.modal-tab-btn {
  flex: 1;
  padding: 11px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.modal-tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 700; }
.modal-tab-btn:hover:not(.active) { color: var(--blue); background: rgba(26,58,92,.04); }


/* ─────────────────────────────────────────────────────────────────────────────
   11. Tabellen & Tabellen-Card
   ───────────────────────────────────────────────────────────────────────────── */

/* Tabellen-Card-Container */
.tcard {
  background: var(--card);
  border-radius: 0 8px 8px 8px;
  border: 2px solid var(--blue);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.tcard-head {
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.tcard-head h2  { font-size: 15px; font-weight: 700; color: var(--blue); }
.entry-count    { font-size: 12px; color: var(--muted); }

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-left: auto;
}
.filter-row input,
.filter-row select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text);
  background: white;
  -webkit-appearance: none;
}
.filter-row input:focus,
.filter-row select:focus { outline: none; border-color: var(--blue-light); }

/* Tabelle selbst */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 700px;
}
thead tr                  { background: var(--pd2-fill, var(--blue)); color: var(--color-primary-text); }
thead th                  { padding: 9px 10px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
tbody tr                  { border-bottom: 1px solid var(--border); transition: background .12s; }
tbody tr:hover            { filter: brightness(0.96); }
tbody td                  { padding: 8px 10px; vertical-align: top; }
tbody td:last-child       { white-space: nowrap; }

/* Zeilenzustände */
tbody tr.abw-active  { background: var(--free-bg); }
tbody tr.gast-active { background: var(--guest-bg); }
tbody tr.row-future  { background: #fffdf5; border-left: 3px solid var(--gold); }
tbody tr.row-past    { opacity: .6; }

.no-data { text-align: center; padding: 30px; color: var(--muted); font-style: italic; }


/* ─────────────────────────────────────────────────────────────────────────────
   12. Karten (Steg-Rows) & Mobile-Cards
   ───────────────────────────────────────────────────────────────────────────── */

/* Steg-Reihe (members.html) */
.steg-row {
  display: flex;
  gap: 12px;
  align-items: center;
  background: white;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
}

/* Mobile-Cards (audit.html) */
.mobile-cards { display: none; padding: 10px; }

.m-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.m-card.abw-active  { background: var(--free-bg);  border-color: var(--free-border); }
.m-card.gast-active { background: var(--guest-bg); border-color: var(--guest-border); }
.m-card.row-future  { background: #fffdf5; border-left: 3px solid var(--gold); }
.m-card.row-past    { opacity: .6; }

.m-card-top     { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.m-card-title   { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m-card-steg    { font-size: 16px; font-weight: 700; color: var(--blue); }
.m-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.m-card-body    { font-size: 13px; line-height: 1.7; }
.m-card-body .sub { font-size: 12px; color: var(--muted); }


/* ─────────────────────────────────────────────────────────────────────────────
   13. Badges & Status-Labels
   ───────────────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-active      { background: var(--color-success-bg); color: var(--color-success); border: 1px solid var(--color-success-border); }
.badge-past        { background: var(--busy-bg);    color: var(--muted);      border: 1px solid var(--busy-border); }
.badge-future      { background: var(--future-bg);  color: var(--future-text); border: 1px solid var(--gold); }
.badge-gast-active { background: var(--guest-bg);   color: var(--guest-text); border: 1px solid var(--guest-border); }

/* Stegplatz-Badges (members.html) */
.steg-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; margin-top: 4px; }
.badge-busy  { background: var(--busy-bg);  color: var(--busy-text);  border: 1px solid var(--busy-border); }
.badge-free  { background: var(--free-bg);  color: var(--free);       border: 1px solid var(--free-border); }
.badge-guest { background: var(--guest-bg); color: var(--guest-text); border: 1px solid var(--guest-border); }

/* Benutzer-Badge (Changelog) */
.user-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e8f0fb;
  color: var(--blue-light);
  border: 1px solid #c0d4f0;
}


/* ─────────────────────────────────────────────────────────────────────────────
   14. Login / Auth-Card
   ───────────────────────────────────────────────────────────────────────────── */

/* Hintergrund für Login- und Set-Password-Seiten */
.auth-bg {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--blue) 0%, var(--blue-dark) 100%);
  padding: 24px;
}

.auth-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-xl);
  text-align: center;
}
.auth-card .logo     { font-size: 52px; margin-bottom: 10px; line-height: 1; }
.auth-card h1        { font-size: 21px; font-weight: 700; color: var(--blue); margin-bottom: 4px; }
.auth-card .subtitle { font-size: 13px; color: #7a8ea0; margin-bottom: 28px; }

/* Willkommens-Box (set-password.html) */
.welcome-box {
  background: #f0f6ff;
  border: 1px solid #c8daf5;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--blue);
  line-height: 1.5;
  text-align: left;
}
.welcome-box strong { display: block; font-size: 16px; margin-bottom: 2px; }

/* ── 14b. Auth-Card — Glas/Video-Variante (login.html) ──
   Statt der hellen .auth-card: animierter Wellen-Video-Hintergrund mit
   CSS-Fallback und ein durchscheinendes Glas-Panel statt weißer Box.
   Benötigt zusätzlich im Body: zwei <video class="bg-video"> (Crossfade-Loop,
   siehe JS-Snippet unten), .ocean mit .wave-layer (w1–w3) + .shimmer (s1–s4),
   und .overlay als Lesbarkeits-Gradient. waves.mp4 im Projektordner ablegen. */
.bg-video {
  position: fixed; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 2; opacity: 0;
}
.bg-video.fade-in { transition: opacity 1.2s ease; }
.bg-video.active  { opacity: 1; }

.ocean {
  position: fixed; inset: 0; z-index: 1; overflow: hidden;
  background: linear-gradient(180deg, var(--blue-dark) 0%, var(--blue) 60%, var(--blue-dark) 100%);
}
.wave-layer {
  position: absolute; width: 220%; height: 220%; top: -60%; left: -60%;
  background: radial-gradient(ellipse at center, rgba(26,90,140,.18) 0%, rgba(10,50,90,.10) 50%, transparent 70%);
  border-radius: 40%; transform-origin: 50% 52%;
}
.wave-layer.w1 { animation: wave 18s infinite linear; }
.wave-layer.w2 { animation: wave 24s infinite linear reverse; opacity: .7; }
.wave-layer.w3 {
  animation: wave 31s infinite linear; opacity: .5;
  background: radial-gradient(ellipse at center, rgba(100,180,220,.07) 0%, transparent 65%);
}
@keyframes wave { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.shimmer { position: absolute; border-radius: 50%; background: rgba(200,230,255,.06); animation: shimmer 6s ease-in-out infinite; }
.shimmer.s1 { width: 180px; height: 60px; top: 20%; left: 15%; animation-delay: 0s; }
.shimmer.s2 { width: 120px; height: 40px; top: 55%; left: 60%; animation-delay: 2.1s; }
.shimmer.s3 { width: 90px;  height: 30px; top: 35%; left: 75%; animation-delay: 4.3s; }
.shimmer.s4 { width: 200px; height: 50px; top: 70%; left: 25%; animation-delay: 1.5s; }
@keyframes shimmer { 0%, 100% { opacity: 0; transform: scaleX(1); } 50% { opacity: 1; transform: scaleX(1.2); } }

.overlay {
  position: fixed; inset: 0; z-index: 3;
  background: linear-gradient(180deg, rgba(5,18,35,.55) 0%, rgba(5,18,35,.30) 40%, rgba(5,18,35,.55) 100%);
}

.auth-card-glass {
  /* Alles im Glas folgt den Vereinsfarben (der Leuchtturm dahinter bleibt wie im Banner): Fläche und Rahmen aus
     Primär/Sekundär, Felder deckend (Autofill sieht damit exakt aus wie ein normales Feld), Akzent für Knopf/Links. */
  --ag-field: color-mix(in srgb, var(--blue-dark, #0d2137) 82%, #000);
  --ag-soft:  color-mix(in srgb, var(--blue-light, #4a7fb5) 22%, transparent);
  --ag-line:  color-mix(in srgb, var(--blue-light, #4a7fb5) 48%, transparent);
  position: relative; z-index: 10;
  background: color-mix(in srgb, var(--blue-dark, #0d2137) 42%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid color-mix(in srgb, var(--blue-light, #4a7fb5) 38%, transparent);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  width: 100%; max-width: 380px;
  box-shadow: var(--shadow-xl);
  text-align: center;
}
.auth-card-glass .logo-img { height: 56px; width: auto; margin-bottom: 14px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5)); }
.auth-card-glass h1        { font-size: 21px; font-weight: 700; color: rgba(255,255,255,.95); margin-bottom: 4px; }
.auth-card-glass .subtitle { font-size: 13px; color: rgba(255,255,255,.6); margin-bottom: 20px; }

/* Eingaben & Buttons innerhalb der Glas-Card — heller Text statt dunkel */
.auth-card-glass input[type=text],
.auth-card-glass input[type=email],
.auth-card-glass input[type=password] {
  color: #fff; background: var(--ag-field);
  border: 1.5px solid var(--ag-line);
}
.auth-card-glass input::placeholder { color: rgba(255,255,255,.4); }
.auth-card-glass input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent);
  background: color-mix(in srgb, var(--ag-field) 90%, var(--blue-light, #4a7fb5));
}
/* Browser-Autofill überschreibt sonst mit hellem/weißem Hintergrund.
   Der innere Schatten muss DECKEND sein: mit halbdurchsichtigem Weiß (rgba(255,255,255,.07)) schimmerte die
   helle Autofill-Farbe des Browsers durch und das Feld wirkte weiß (Chrome, Safari auch auf dem Handy). */
.auth-card-glass input:-webkit-autofill,
.auth-card-glass input:-webkit-autofill:hover,
.auth-card-glass input:-webkit-autofill:focus,
.auth-card-glass input:-webkit-autofill:active {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px var(--ag-field) inset !important;
  box-shadow: 0 0 0 1000px var(--ag-field) inset !important;
  caret-color: #fff;
  transition: background-color 0s 600000s, color 0s 600000s;
}
/* Firefox (Standard-Pseudoklasse) */
.auth-card-glass input:autofill {
  color: #fff;
  background-color: var(--ag-field) !important;
  caret-color: #fff;
}
.auth-card-glass .field-label { color: rgba(255,255,255,.55); }
.auth-card-glass .pw-toggle   { color: rgba(255,255,255,.5); }
.auth-card-glass .pw-toggle:hover { color: var(--gold); }
.auth-card-glass .btn-primary-lg {
  background: var(--gold); color: var(--color-accent-text);
  box-shadow: 0 4px 24px rgba(0,0,0,.25);
}
.auth-card-glass .btn-primary-lg:hover { background: var(--gold); opacity: .88; box-shadow: 0 6px 32px rgba(0,0,0,.35); }
.auth-card-glass .error-text  { color: #ff8a80; }
.auth-card-glass .switch-link { color: rgba(255,255,255,.5); }
.auth-card-glass .switch-link button { color: var(--gold); background: none; border: none; cursor: pointer; }
.auth-card-glass .switch-link button:hover { color: color-mix(in srgb, var(--gold) 70%, #fff); }

/*
  JS-Grundgerüst für nahtlosen Video-Loop ohne Ruckler (zwei <video>,
  Crossfade-loses Umschalten kurz vor Ende):

  const vidA = document.getElementById('vid-a');
  const vidB = document.getElementById('vid-b');
  let active = vidA, standby = vidB, swapping = false;
  vidA.addEventListener('canplay', () => vidA.classList.add('fade-in','active'), { once:true });
  standby.currentTime = 0;
  function swap() {
    if (swapping) return;
    swapping = true;
    standby.currentTime = 0;
    standby.play().then(() => {
      active.classList.remove('active'); standby.classList.add('active');
      active.pause(); [active, standby] = [standby, active];
      standby.currentTime = 0; swapping = false;
    }).catch(() => { swapping = false; });
  }
  function tick() {
    if (!swapping && active.duration && active.currentTime >= active.duration - 0.15) swap();
    requestAnimationFrame(tick);
  }
  requestAnimationFrame(tick);
*/

/* Lock-Screen (members.html – Anmeldebildschirm vor App-Start) */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: linear-gradient(180deg, #071828 0%, #0d2b45 50%, #071828 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lock-card {
  background: #0e2540;
  border: 1px solid rgba(200,168,75,.3);
  border-radius: 18px;
  padding: 32px 28px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  text-align: center;
}
.lock-card .logo { font-size: 48px; margin-bottom: 12px; }
.lock-card h2    { color: white; font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.lock-card p     { color: rgba(255,255,255,.5); font-size: 13px; margin-bottom: 24px; }
.lock-error      { color: #ff7b7b; font-size: 13px; margin-bottom: 10px; min-height: 18px; }


/* ─────────────────────────────────────────────────────────────────────────────
   15. Nachrichten & Feedback
   ───────────────────────────────────────────────────────────────────────────── */
.msg {
  font-size: 13px;
  margin-bottom: 14px;
  min-height: 20px;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 8px;
  display: none;
}
.msg.error   { background: var(--color-danger-bg);  color: var(--color-danger);  border: 1px solid var(--color-danger-border);  display: block; }
.msg.success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid var(--color-success-border); display: block; font-weight: 600; }
.msg.warn    { background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid var(--color-warning-border); display: block; }

/* Fehlertext (Login) */
.error-text {
  color: #c0392b;
  font-size: 13px;
  margin-bottom: 14px;
  min-height: 20px;
  line-height: 1.4;
  text-align: center;
}

/* Einladungslink-Box (Benutzerverwaltung) */
.invite-box {
  display: none;
  margin-top: 14px;
  background: var(--free-bg);
  border: 1px solid var(--free-border);
  border-radius: 8px;
  padding: 14px;
}
.invite-box.visible { display: block; }
.invite-box-title   { font-size: 13px; font-weight: 700; color: #1a6040; margin-bottom: 4px; }
.invite-box-sub     { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.invite-link-row    { display: flex; gap: 6px; align-items: stretch; }
.invite-link-input  { flex: 1; padding: 8px 10px; border: 1px solid var(--free-border); border-radius: 6px; font-size: 11px; background: white; color: var(--text); min-width: 0; }


/* ─────────────────────────────────────────────────────────────────────────────
   16. Legende & Filter-Buttons (members.html)
   ───────────────────────────────────────────────────────────────────────────── */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  background: white;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  justify-content: center;
  align-items: center;
  position: sticky;
  top: var(--header-h, 64px);
  z-index: 90;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s;
  user-select: none;
  opacity: 0.4;
}
.filter-btn.active        { opacity: 1; }
.filter-btn.fb-busy       { background: var(--busy-bg);  border-color: var(--busy-border);  color: var(--busy-text); }
.filter-btn.fb-free       { background: var(--free-bg);  border-color: var(--free-border);  color: var(--free); }
.filter-btn.fb-freeabw    { background: var(--free-bg);  border-color: var(--future-border); color: var(--future-text); }
.filter-btn.fb-guest      { background: var(--guest-bg); border-color: var(--guest-border); color: var(--guest-text); }

.leg-dot      { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.dot-busy     { background: var(--busy-bg);  border: 1px solid var(--busy-border); }
.dot-free     { background: var(--free-bg);  border: 1px solid var(--free-border); }
.dot-freeabw  { background: var(--free-bg);  border: 1px solid var(--future-border); }
.dot-guest    { background: var(--guest-bg); border: 1px solid var(--guest-border); }


/* ─────────────────────────────────────────────────────────────────────────────
   17. Save-Banner (schwebende Leiste für ungespeicherte Änderungen)
   ───────────────────────────────────────────────────────────────────────────── */
.save-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: #1e6e3e;
  color: white;
  padding: 11px 24px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.save-banner.visible { display: flex; }
.save-banner-text    { font-size: 13px; font-weight: 600; }
.save-banner-actions { display: flex; gap: 8px; }
.btn-discard {
  padding: 7px 16px;
  background: rgba(255,255,255,.15);
  color: white;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-save-confirm {
  padding: 7px 18px;
  background: white;
  color: #1e6e3e;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}


/* ─────────────────────────────────────────────────────────────────────────────
   18. Einstellungs-Bereich (Abschnitte, Sektions-Labels)
   ───────────────────────────────────────────────────────────────────────────── */
.settings-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
  margin-top: 4px;
}

.settings-info-box {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 16px;
}

/* Checkbox-Zeile */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}
.checkbox-row span {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}

/* Checkbox-Raster (Benachrichtigungen) */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 20px;
}
.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  cursor: pointer;
}

/* Benutzer-Eintrag in der Benutzerverwaltung */
.user-entry {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.user-entry.locked { border-color: #e7a0a0; background: #fdf4f4; }
.user-entry-row    { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-entry-name   { font-size: 14px; font-weight: 700; color: var(--blue); }
.user-entry-meta   { font-size: 11px; color: var(--muted); }

/* Neuer-Benutzer-Formular-Container */
.create-user-form {
  display: none;
  margin-top: 14px;
  background: var(--bg);
  border-radius: 8px;
  padding: 14px;
}
.create-user-form.visible { display: block; }


/* ─────────────────────────────────────────────────────────────────────────────
   19. Utility-Klassen
   ───────────────────────────────────────────────────────────────────────────── */
.hidden   { display: none !important; }
.visible  { display: block !important; }
.flex     { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm   { gap: 6px; }
.gap-md   { gap: 10px; }
.gap-lg   { gap: 16px; }
.mt-sm    { margin-top: 8px; }
.mt-md    { margin-top: 14px; }
.mt-lg    { margin-top: 24px; }
.mb-sm    { margin-bottom: 8px; }
.mb-md    { margin-bottom: 14px; }
.mb-lg    { margin-bottom: 24px; }
.w-full   { width: 100%; }
.text-center { text-align: center; }
.text-right  { text-align: right; }


/* ─────────────────────────────────────────────────────────────────────────────
   20. Responsive Breakpoints
   ───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Header */
  header p     { display: none; }
  header h1    { font-size: 14px; }
  header       { flex-wrap: wrap; }

  /* Navigation: bricht in eigene Zeile um statt komplett zu verschwinden —
     der Hamburger (immer sichtbar, siehe Abschnitt 6) bleibt auf Zeile 1
     rechtsbündig, die Quicklinks rutschen darunter. Kein Punkt sollte NUR
     im Burger-Menü erreichbar sein, wenn er auch hier Platz hat. */
  .nav { width: 100%; margin-left: 0; order: 3; justify-content: flex-start; }
  .nav a, .nav button { font-size: 11px; padding: 5px 9px; }
  .nav-username        { display: none !important; }
  .hamburger            { order: 2; margin-left: auto; }

  /* Main */
  main { padding: 10px 8px 70px; }

  /* Tabs – horizontal scrollbar */
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
    position: sticky;
    top: var(--header-h, 56px);
    z-index: 90;
    background: var(--bg);
    padding: 8px 0 0;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn { flex-shrink: 0; white-space: nowrap; padding: 10px 14px; font-size: 13px; margin-right: 0; }
  .tcard   { border-radius: 8px; margin-top: 4px; }

  /* Filter-Zeile */
  .tcard-head    { flex-direction: column; align-items: stretch; gap: 8px; }
  .filter-row    { margin-left: 0; flex-direction: column; gap: 6px; }
  .filter-row input,
  .filter-row select { width: 100%; padding: 10px; font-size: 14px; }

  /* Modals → Bottom-Sheet */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal         { border-radius: 16px 16px 0 0; max-height: 92dvh; padding: 20px 16px 32px; }
  .modal-actions { flex-direction: column; }
  .btn-primary,
  .btn-cancel    { padding: 14px; font-size: 14px; }
  .s-card        { padding: 16px; }
  .color-grid { grid-template-columns: 1fr 1fr; }
  .color-text-row { flex-wrap: wrap; }
  .color-text-row .input-lg { min-width: 0; flex: 1; }
  .contrast-row input[type="range"] { width: 110px; }
  .contrast-hint { width: 100%; }

  /* Formulare — iOS Zoom-Fix */
  .fg input,
  .fg select,
  .fg textarea { font-size: 16px !important; }
  .time-sel    { font-size: 16px !important; }

  /* Formular-Grids — einspaltig */
  .r2    { grid-template-columns: 1fr; }
  .r3    { grid-template-columns: 1fr; }
  .dt-row { grid-template-columns: 1fr; gap: 4px; }

  /* Tabellen → Karten */
  .table-wrap   { display: none; }
  .mobile-cards { display: block; }
  .m-card-actions .btn-sm { padding: 8px 12px; font-size: 13px; }

  /* Save-Banner */
  .save-banner         { flex-direction: column; gap: 8px; padding: 12px 16px; }
  .save-banner-actions { width: 100%; }
  .save-banner-actions button { flex: 1; }

  /* Legende */
  .legend     { gap: 6px; padding: 8px 10px; }
  .filter-btn { font-size: 12px; padding: 6px 10px; }
}

@media (max-width: 420px) {
  .color-grid { grid-template-columns: 1fr; }
  .preset-btn { font-size: 12px; padding: 6px 10px; }
}

@media (max-width: 480px) {
  /* Auth-Card → Vollbild */
  .auth-bg  { align-items: stretch; }
  .auth-card {
    border-radius: 0;
    min-height: 100dvh;
    padding: 0 24px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: none;
    max-width: 100%;
  }
  .auth-card .logo { font-size: 64px; margin-bottom: 14px; }
  .auth-card h1    { font-size: 24px; }
  .auth-card .subtitle { font-size: 14px; margin-bottom: 36px; }

  /* Glas-Variante → ebenfalls Vollbild, Body übernimmt overflow:hidden */
  body:has(.auth-card-glass) { align-items: stretch; }
  .auth-card-glass {
    border-radius: 0;
    min-height: 100dvh;
    padding: 0 24px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: none;
    max-width: 100%;
  }
  .auth-card-glass .logo-img { height: 64px; margin-bottom: 14px; }
  .auth-card-glass h1        { font-size: 24px; }
  .auth-card-glass .subtitle { font-size: 14px; margin-bottom: 18px; }

  /* iOS-Zoom-Fix */
  .auth-card-glass input[type=text],
  .auth-card-glass input[type=email],
  .auth-card-glass input[type=password] { padding: 16px; border-radius: 12px; font-size: 16px; }
  .auth-card-glass .btn-primary-lg      { padding: 17px; font-size: 17px; border-radius: 12px; }

  /* Tastatur-Anpassung (nur mit scripts/pd-keyboard-fit.js, z. B. login.html):
     Seite = sichtbarer Bereich (--vvh/--vvtop), Fenster scrollt selbst, Inhalt bleibt per
     auto-Rändern mittig (flex-start + margin:auto statt justify-content:center, sonst wird
     bei Überlänge oben abgeschnitten). Tastatur offen → Logo/Badge/Fußzeile aus. */
  html:has(body.pd-kbfit) { overflow: hidden; overscroll-behavior: none; }   /* Seite selbst nicht scroll-/federbar */
  body.pd-kbfit:has(.auth-card-glass) {
    position: fixed; left: 0; right: 0; top: var(--vvtop, 0px);
    height: var(--vvh, 100dvh); min-height: 0; padding: 0; overflow: hidden;
  }
  body.pd-kbfit .auth-card-glass {
    min-height: 0; height: 100%; max-height: 100%;
    overflow-y: auto; overscroll-behavior: contain; justify-content: flex-start;
  }
  body.pd-kbfit .auth-card-glass > :first-child { margin-top: auto; }
  body.pd-kbfit .auth-card-glass > :last-child  { margin-bottom: auto !important; }
  body.pd-kbfit.kb-open .auth-card-glass { padding-top: 16px; padding-bottom: 20px; }
  body.pd-kbfit.kb-open .auth-card-glass .logo-img { height: 40px; margin-bottom: 6px; }
  body.pd-kbfit.kb-open .auth-card-glass .method-badge,
  body.pd-kbfit.kb-open .auth-card-glass .footer-links { display: none; }
}


/* ─────────────────────────────────────────────────────────────────────────────
   21. Icon-Sprache & SVG-Icons
   ─────────────────────────────────────────────────────────────────────────────
   Seit Version 1.6 verwendet die App ausschließlich einfache, einfarbige
   Unicode-Symbole statt bunter Emoji-Piktogramme (⚙ ✏ → als Referenz-Stil).
   Ausnahme: ⚓/⛵ als thematisches Branding (Logo/Boot), nicht für Aktionen.

   Kanonische Zuordnung — bei neuen Features bitte wiederverwenden statt
   neue Emoji einzuführen:

     ⚙   Einstellungen           ◐   Benachrichtigung
     ✏   Bearbeiten / Notiz      ▲   Warnung
     →   Verschieben / Umzug     ✓   Erfolg / Bestätigt
     ✕   Schließen / Abbrechen   ⌫   (veraltet, siehe SVG unten)
     ☰   Hamburger-Menü          ▤   Audit / Liste
     ✉   E-Mail                 ▸   Datum / Hinweis / Ort (generischer Bullet)
     ⏏   Logout                 ☏   Telefon
     ■ / □  Belegt / Frei        ⚲   Suche
     ⚿   Administrator/Schlüssel ↳   Verknüpfung
     ◉   Mitglied / Person       ◈   RBAC / Schutz
     ⊡   IAM                     ⇄   REST-API / Sync
     ◆   Gast                    ▭   Maße/Dimensionen
     ⊘   Abgelaufen               ○   Leerzustand (Illustration)

   Löschen-Icon (Mülleimer) — als Inline-SVG einbinden, NICHT als Emoji
   (🗑 rendert je nach System bunt/inkonsistent). currentColor erbt die
   Button-Textfarbe automatisch (z. B. var(--error) für .btn-del):

     <svg width="13" height="13" viewBox="0 0 16 16" fill="none" style="vertical-align:-2px;">
       <path d="M3 4.5h10M6 4.5V2.7a.6.6 0 01.6-.6h2.8a.6.6 0 01.6.6V4.5M4.7 4.5l.6 9a1 1 0 001 .9h3.4a1 1 0 001-.9l.6-9M6.6 7.3v4M9.4 7.3v4"
         stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/>
     </svg>
   ============================================================================= */

/* ─────────────────────────────────────────────────────────────────────────────
   14c. Leuchtturm-Hintergrund für Seiten mit Glas-Fenster (login.html, set-password.html, access-denied.html)
   ─────────────────────────────────────────────────────────────────────────────
   Gehört zu scripts/pd-login-scene.js (erzeugt das SVG samt Farben und Animation — 1:1 wie das
   Standard-Startseitenbanner, unabhängig von den Vereinsfarben) und scripts/pd-keyboard-fit.js (Tastatur).
   Hier nur Position und Handy-Layout; alle Klassen tragen das Präfix "ls-".
   ───────────────────────────────────────────────────────────────────────────── */
#ls-svg { position: fixed; left: 0; top: 0; width: 100%; height: var(--lhh, 100%); z-index: 1; display: block; background: #06162b; }

/* ── Handy (≤ 480 px): Vollbild ohne Glas-Kasten ──
   Kein Rahmen/Weichzeichner, nur ein Verlauf unter den Eingaben (Beginn: --ls-scrim-top, setzt das
   Skript auf die Oberkante des Inhalts); der Leuchtturm steht frei darüber. Der Inhalt sitzt unten. */
@media (max-width: 480px) {
  body.pd-scene .auth-card-glass {
    background: linear-gradient(180deg, transparent 0, transparent var(--ls-scrim-top, 40%),
      color-mix(in srgb, var(--blue-dark, #0d2137) 72%, transparent) calc(var(--ls-scrim-top, 40%) + 38px),
      color-mix(in srgb, var(--blue-dark, #0d2137) 86%, transparent) 100%);
    backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; border-radius: 0;
  }
  body.pd-scene .auth-card-glass > :first-child { padding-top: 0; }
  body.pd-scene.pd-kbfit .auth-card-glass { padding-top: 0; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  body.pd-scene.pd-kbfit .auth-card-glass > :last-child { margin-bottom: 0 !important; }
  body.pd-scene.pd-kbfit.kb-open .auth-card-glass { padding-bottom: 20px; }
  /* Tastatur offen: Szene bleibt eingefroren stehen, nur der Turm blendet aus */
  body.kb-open #ls-scene { opacity: 0; }
  #ls-scene { transition: opacity .25s; }
  /* Inhalt füllt (fast) den ganzen Bildschirm (z. B. langes Formular) → Turm weglassen, Himmel bleibt */
  body.ls-nospace #ls-scene { opacity: 0; }
}
