/* Kickdesk Design Tokens · v2026.1
 * Rasengrün-Palette · DSGVO-konforme System-Fonts · keine externen Calls.
 *
 * Übernommen aus dem Klick-Prototyp (Kickdesk-design/tokens.css).
 * :root = Light-Default. Die .theme-*-Klassen kapseln Dark-Mode und
 * Whitelabel-Varianten — siehe CLAUDE-CODE-Handoff.md Kap. 1 + 8.
 */

/* ════════════════════════════════════════════════════════════
   KANONISCHE TOKEN-EIMER (DS-Abgleich, kickdesk-ds-abgleich-2026-06-09.md §1)
   Eine Quelle der Wahrheit. Alles andere (--kd-*, --brand/--ink) = Aliasse.
   ════════════════════════════════════════════════════════════ */
:root {
  /* Eimer 1 · Marke (White-Label — pro Verein inline am <html> überschrieben).
     Steuert NUR Logo/Wappen, aktive Navigation und EINE Primäraktion. */
  --primary:      #1FBF3D;
  --primary-deep: #0F8F2A;
  --primary-soft: rgba(31, 191, 61, 0.12);

  /* Eimer 2 · Status (fest & semantisch — NIE an die Marke koppeln) */
  --ok:#16A34A; --wait:#D98E04; --crit:#D92D20; --info:#2563EB; --neutral:#6B7280;
  --accent:#F5C518;   /* Trikot-Gelb — Akzent/Highlight, KEIN Status */

  /* Eimer 3 · Flächen & Text (folgen dem Theme) */
  --bg:#FAFAF7; --surface:#FFFFFF; --surface-2:#F2F1EC;
  --fg:#0A0A0A; --fg-muted:rgba(10,10,10,0.62); --fg-subtle:rgba(10,10,10,0.42);
  --line:rgba(15,31,20,0.10); --line-strong:rgba(15,31,20,0.18);

  /* Geometrie / Schatten / Fonts (kanonische Namen) */
  --r-sm:8px; --r-md:12px; --r-lg:18px; --r-xl:24px; --r-pill:999px;
  --shadow-sm:0 1px 2px rgba(15,31,20,0.06);
  --shadow-md:0 6px 18px rgba(15,31,20,0.08), 0 1px 3px rgba(15,31,20,0.06);
  --shadow-lg:0 24px 60px rgba(15,31,20,0.12), 0 4px 12px rgba(15,31,20,0.06);
  --font-display:'Arial Black','Helvetica Neue',Impact,sans-serif;
  --font-body:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
  --font-mono:ui-monospace,'SF Mono',Menlo,Consolas,monospace;
}
[data-theme="dark"] {
  --ok:#34D058; --wait:#F0B429; --crit:#F26157; --info:#5B8DEF; --neutral:#8B95A1;
  --bg:#0A0A0A; --surface:#141413; --surface-2:#1C1C1A;
  --fg:#F5F5F4; --fg-muted:rgba(245,245,244,0.64); --fg-subtle:rgba(245,245,244,0.44);
  --line:rgba(255,255,255,0.10); --line-strong:rgba(255,255,255,0.18);
  --primary-soft: rgba(31, 191, 61, 0.16);
  --shadow-sm:0 1px 2px rgba(0,0,0,0.4);
  --shadow-md:0 6px 18px rgba(0,0,0,0.5);
  --shadow-lg:0 24px 60px rgba(0,0,0,0.6);
}

/* ── Alias-Layer (§2): bestehende --kd-*-Namen zeigen auf die Eimer ── */
:root {
  /* Primary — Aliasse auf Eimer 1 (White-Label folgt automatisch) */
  --kd-primary:        var(--primary);
  --kd-primary-hover:  var(--primary-deep);
  --kd-primary-deep:   var(--primary-deep);
  --kd-primary-soft:   var(--primary-soft);
  --kd-primary-line:   color-mix(in srgb, var(--primary) 30%, var(--surface));

  /* Prototyp-Namen (kd-ds.css-Snippets) */
  --brand: var(--primary);
  --brand-2: var(--primary-deep);
  --brand-ink: var(--on-primary);
  --ink: var(--fg);
  --ink-muted: var(--fg-muted);
  --ink-subtle: var(--fg-subtle);

  /* Surface */
  --kd-paper:          var(--surface-2);
  --kd-off-white:      var(--bg);
  --kd-white:          var(--surface);

  /* Text */
  --kd-ink:            var(--fg);
  --kd-ink-muted:      var(--fg-muted);
  --kd-ink-mute2:      var(--fg-subtle);

  /* Lines */
  --kd-line:           var(--line);
  --kd-line-strong:    var(--line-strong);

  /* App-Shell-Layer (Header/Nav-Blur) */
  --app-surface-blur:  rgba(255,255,255,0.85);
  --app-nav-blur:      rgba(255,255,255,0.92);
  --app-line:          rgba(15,31,20,0.10);
  --app-line-strong:   rgba(15,31,20,0.18);

  /* Accents — Trikot-Gelb ist Akzent (kein Status), Rot zeigt auf --crit */
  --kd-trikot:         var(--accent);
  --kd-trikot-deep:    #C9A013;
  --kd-rot:            var(--crit);
  --kd-rot-soft:       color-mix(in srgb, var(--crit) 12%, var(--surface));
  --on-primary:        #FFFFFF;   /* Textfarbe auf Primary-Fläche (Runtime: aus Vereinsfarbe abgeleitet) */
  --primary-glow:      none;

  /* Shadows (Aliasse) */
  --kd-shadow-sm: var(--shadow-sm);
  --kd-shadow-md: var(--shadow-md);
  --kd-shadow-lg: var(--shadow-lg);

  /* Radii (Aliasse) */
  --kd-r-sm: var(--r-sm);
  --kd-r-md: var(--r-md);
  --kd-r-lg: var(--r-lg);
  --kd-r-xl: var(--r-xl);

  /* Type — DSGVO-konform, ausschliesslich System-Fonts (Aliasse) */
  --kd-font-display: var(--font-display);
  --kd-font-body:    var(--font-body);
  --kd-font-mono:    var(--font-mono);
}

/* ───────────────────────────────────────────────────────────
   Theme: kickdesk-default (Dark-Mode + Neon-Grün)
   Handoff Kap. 0: "Dark-Mode-Default". Wird per Klasse auf
   einem App-Shell-Wrapper aktiviert.
   ─────────────────────────────────────────────────────────── */
.theme-kickdesk {
  --kd-primary:       #1FBF3D;
  --kd-primary-hover: #2EE85B;
  --kd-primary-deep:  #0F8F2A;
  --kd-primary-soft:  rgba(31,191,61,0.15);

  --kd-off-white:     #0A0A0A;            /* page BG */
  --kd-paper:         rgba(255,255,255,0.04);
  --kd-white:         #161616;
  --kd-ink:           #FAFAF7;
  --kd-ink-muted:     rgba(250,250,247,0.66);
  --kd-ink-mute2:     rgba(250,250,247,0.42);
  --kd-line:          rgba(255,255,255,0.08);
  --kd-line-strong:   rgba(255,255,255,0.16);
  --kd-trikot:        #F5C518;

  --app-surface-blur: rgba(10,10,10,0.78);
  --app-nav-blur:     rgba(10,10,10,0.86);
  --app-line:         rgba(255,255,255,0.08);
  --app-line-strong:  rgba(255,255,255,0.16);

  --on-primary:       #0A0A0A;            /* Textfarbe auf Primary-Fläche */
  --primary-glow:     0 0 18px rgba(31,191,61,0.55);
}

/* Folgt dem System, wenn der Wrapper .theme-kickdesk-auto trägt */
@media (prefers-color-scheme: dark) {
  .theme-kickdesk-auto {
    --kd-primary:       #1FBF3D;
    --kd-primary-hover: #2EE85B;
    --kd-primary-deep:  #0F8F2A;
    --kd-primary-soft:  rgba(31,191,61,0.15);
    --kd-off-white:     #0A0A0A;
    --kd-paper:         rgba(255,255,255,0.04);
    --kd-white:         #161616;
    --kd-ink:           #FAFAF7;
    --kd-ink-muted:     rgba(250,250,247,0.66);
    --kd-ink-mute2:     rgba(250,250,247,0.42);
    --kd-line:          rgba(255,255,255,0.08);
    --kd-line-strong:   rgba(255,255,255,0.16);
    --app-surface-blur: rgba(10,10,10,0.78);
    --app-nav-blur:     rgba(10,10,10,0.86);
    --app-line:         rgba(255,255,255,0.08);
    --app-line-strong:  rgba(255,255,255,0.16);
    --on-primary:       #0A0A0A;
    --primary-glow:     0 0 18px rgba(31,191,61,0.55);
  }
}

/* ───────────────────────────────────────────────────────────
   Dark-Mode-Mapping fuer das Mobile-Chrome (Fix nach Schritt 5).
   WICHTIG: Die App schaltet Dark-Mode ueber [data-theme="dark"] am
   <html> — NICHT ueber die .theme-kickdesk-Klasse. Ohne dieses
   Mapping bleiben AppHeader/BottomNav mit den hellen :root-Werten
   (rgba(255,255,255,...)) hell auf dunklem Grund.
   ─────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --app-surface-blur: rgba(10,10,10,0.80);
  --app-nav-blur:     rgba(10,10,10,0.88);
  --app-line:         rgba(255,255,255,0.10);
  --app-line-strong:  rgba(255,255,255,0.18);
}

/* Utility: heavy display */
.kd-display { font-family: var(--kd-font-display); letter-spacing: -0.02em; }
.kd-mono    { font-family: var(--kd-font-mono); }
.kd-muted   { color: var(--kd-ink-muted); }
.kd-faint   { color: var(--kd-ink-mute2); }

/* ───────────────────────────────────────────────────────────
   StatusPill — vier Varianten (Handoff Alle-Seiten Kap. 2.3)
   .kd-pill--ok / --warn / --err / --info
   ─────────────────────────────────────────────────────────── */
.kd-pill {
  display: inline-block;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  white-space: nowrap; line-height: 1.4;
}
/* Status entkoppelt von der Marke (DS-Abgleich §3): feste --ok/--wait/--crit/--info.
   Alt-Namen --warn/--err bleiben als Aliasse, neue Namen --wait/--crit/--neutral dazu. */
.kd-pill--ok      { background: color-mix(in srgb, var(--ok) 14%, var(--surface));      color: var(--ok); }
.kd-pill--warn,
.kd-pill--wait    { background: color-mix(in srgb, var(--wait) 16%, var(--surface));    color: var(--wait); }
.kd-pill--err,
.kd-pill--crit    { background: color-mix(in srgb, var(--crit) 14%, var(--surface));    color: var(--crit); }
.kd-pill--info    { background: color-mix(in srgb, var(--info) 14%, var(--surface));    color: var(--info); }
.kd-pill--neutral { background: color-mix(in srgb, var(--neutral) 16%, var(--surface)); color: var(--neutral); }

/* ───────────────────────────────────────────────────────────
   Chip — Filter/Tag-Pill mit An/Aus-Zustand (Handoff Alle-Seiten Kap. 2.4)
   ─────────────────────────────────────────────────────────── */
.kd-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--kd-line-strong);
  background: transparent;
  color: var(--kd-ink-muted);
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.kd-chip:hover  { border-color: var(--kd-primary-line, rgba(31,191,61,0.28)); color: var(--kd-ink); }
.kd-chip.active,
.kd-chip[aria-pressed="true"] {
  background: var(--kd-primary-soft);
  border-color: var(--kd-primary-line, rgba(31,191,61,0.28));
  color: var(--kd-primary);
}

/* ───────────────────────────────────────────────────────────
   FieldS — Form-Input: Label oben (uppercase), Input darunter
   Pflicht: font-size: 16px am Input (iOS Zoom-Schutz)
   (Handoff Alle-Seiten Kap. 2.5)
   ─────────────────────────────────────────────────────────── */
.kd-field {
  display: flex; flex-direction: column; gap: 6px;
}
.kd-field__label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--kd-ink-mute2);
}
.kd-field__input {
  background: var(--kd-white, #FFFFFF);
  border: 1.5px solid var(--kd-line-strong);
  border-radius: var(--kd-r-md);
  padding: 12px 14px;
  font-size: 16px;
  font-family: var(--kd-font-body);
  color: var(--kd-ink);
  width: 100%; outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.kd-field__input:focus {
  border-color: var(--kd-primary);
  box-shadow: 0 0 0 3px var(--kd-primary-soft);
}
.kd-field__input::placeholder { color: var(--kd-ink-mute2); }
.kd-field__suffix {
  font-size: 14px; color: var(--kd-ink-muted);
  margin-left: -8px; padding-right: 14px; flex-shrink: 0;
}
.kd-field--row {
  flex-direction: row; align-items: center;
}
.kd-field--row .kd-field__input { flex: 1; }

/* KickdeskBadge — K-Block-Mark mit Neon-Glow (Handoff Kap. 5) */
.kd-badge {
  display: inline-flex;
  width: var(--size, 28px);
  height: var(--size, 28px);
  flex-shrink: 0;
  filter: drop-shadow(0 0 calc(var(--size, 28px) * 0.2) rgba(31,191,61,0.55));
}
.kd-badge svg { display: block; }

/* iOS / Mobile-First-Patterns (Handoff Kap. 6) */
.kd-scope * { -webkit-tap-highlight-color: transparent; }
.kd-scope input,
.kd-scope textarea,
.kd-scope select { font-size: 16px; }   /* iOS-Zoom-Schutz */

/* ───────────────────────────────────────────────────────────
   Mobile-Chrome v2 (Schritt 5): schlanker AppHeader + BottomNav.
   Ersetzt auf Mobile (<=720px) den 2-Zeilen-.shell-Header.
   Desktop bleibt unveraendert. Farbe theme-gesteuert (var(--primary)).

   Hinweis 2026-05-15: Sub-Klassen sind UNCONDITIONAL — gelten auch auf
   Desktop. Die Media-Query unten kontrolliert nur das `display`. Damit
   funktioniert die Variante `.kd-appheader--standalone` (z.B. Eltern-/
   Spieler-Layout in _kd_mobile_chrome.html), die KEINEN .shell-Header
   hat und den AppHeader daher auf allen Breiten zeigen muss.
   ─────────────────────────────────────────────────────────── */
.kd-appheader,
.kd-bottomnav { display: none; }   /* Desktop-Default: aus */

.kd-appheader {
  align-items: center; justify-content: space-between;
  gap: 10px;
  position: sticky; top: 0; z-index: 70;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px 14px;
  background: var(--app-surface-blur);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
          backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--app-line);
}
.demo-banner + .kd-appheader { top: 33px; }

.kd-appheader__brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; min-width: 0; flex: 1;
}
.kd-appheader__mark {
  width: 32px; height: 32px; border-radius: 8px;
  overflow: hidden; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: var(--brand-ink);
}
.kd-appheader__mark img { width: 100%; height: 100%; object-fit: cover; }
.kd-appheader__txt { min-width: 0; line-height: 1.15; }
.kd-appheader__name {
  display: block;
  font-family: var(--kd-font-display);
  font-weight: 900; font-size: 15px; letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kd-appheader__tag {
  display: block;
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-muted);
}
.kd-appheader__actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.kd-appheader__btn {
  position: relative;
  width: 38px; height: 38px; border-radius: 10px;
  background: transparent;
  border: 1px solid var(--app-line);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.kd-appheader__dot {
  position: absolute; top: 7px; right: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--kd-trikot);
  border: 2px solid var(--app-surface-blur);
}
.kd-appheader__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: color-mix(in srgb,var(--brand) 12%,var(--surface)); color: var(--brand);
  border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--kd-font-display);
  font-weight: 900; font-size: 13px; letter-spacing: -0.04em;
}
/* Theme-Icons im AppHeader: nur das zum aktiven Theme passende zeigen */
.kd-appheader__btn .theme-icon-dark { display: none; }
[data-theme="dark"] .kd-appheader__btn .theme-icon-light { display: none; }
[data-theme="dark"] .kd-appheader__btn .theme-icon-dark { display: inline; }

/* Standalone-Variante: AppHeader auch auf Desktop sichtbar.
   Eltern/Spieler haben keinen .shell-Header — der AppHeader (mit
   Avatar-Button -> Drawer-Menue) ist hier die einzige Navigation. */
.kd-appheader--standalone { display: flex; }

/* Desktop-Anpassung: groesserer Header + zentrierter Content */
@media (min-width: 721px) {
  .kd-appheader--standalone {
    padding: 14px 28px;
  }
  .kd-appheader--standalone .kd-appheader__brand {
    max-width: 1180px; margin: 0 auto;
    width: 100%;
  }
  .kd-appheader--standalone .kd-appheader__name { font-size: 17px; }
  .kd-appheader--standalone .kd-appheader__tag { font-size: 11px; }
  .kd-appheader--standalone .kd-appheader__btn,
  .kd-appheader--standalone .kd-appheader__avatar { width: 40px; height: 40px; }
  /* Content-Bereich der Eltern-/Spieler-Layouts: zentriert + max-width */
  body:has(.kd-appheader--standalone) main.kd-mob-main {
    max-width: 980px; margin: 0 auto;
    padding-left: 24px; padding-right: 24px;
  }
}

@media (max-width: 720px) {
  /* Alten Header + Drawer-Hamburger ausblenden — BottomNav uebernimmt */
  .shell { display: none; }
  .demo-banner + .shell { top: 0; }

  /* Mobile: AppHeader sichtbar (Standalone braucht das nicht extra) */
  .kd-appheader { display: flex; }

  .kd-bottomnav {
    /* grid-auto-columns statt fixer 4 Spalten: passt sich der Tab-Anzahl an
       (Trainer/Eltern = 4, Spieler = 2) — alle Tabs gleich breit. */
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
    background: var(--app-nav-blur);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
            backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--app-line);
  }
  .kd-bottomnav a,
  .kd-bottomnav button {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 4px 6px; border: 0; border-radius: 12px;
    background: transparent; color: var(--ink-muted);
    font-family: var(--kd-font-body);
    font-size: 10.5px; font-weight: 600;
    text-decoration: none; cursor: pointer;
  }
  .kd-bottomnav a span,
  .kd-bottomnav button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .kd-bottomnav a svg,
  .kd-bottomnav button svg,
  .kd-bottomnav .kd-bn-ic { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .kd-bottomnav a[aria-current="page"] {
    background: color-mix(in srgb,var(--brand) 12%,var(--surface)); color: var(--brand);
  }
  .kd-bottomnav a[aria-current="page"]::before {
    content: ""; position: absolute; top: 4px;
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--brand);
  }

  /* Platz fuer die fixe BottomNav schaffen — nur wenn sie wirklich da ist.
     Greift fuer den Trainer-Content (main.page-pad) UND das Eltern-Mobile-
     Layout (main.kd-mob-main aus _eltern_mobile_base.html).
     min-height: kurze Seiten (z.B. Teams mit wenigen Karten) fuellen so
     den Schirm wie das Dashboard -> die fixe BottomNav sitzt konsistent
     unten statt mit grosser Leerflaeche darueber zu "schweben". */
  body:has(.kd-bottomnav) main.page-pad,
  body:has(.kd-bottomnav) main.kd-mob-main,
  body:has(.kd-bottomnav) main {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    min-height: calc(100dvh - 58px);
  }
  /* Off-Canvas-Sidebar (.kd-side) auf Mobile: zusaetzliches Bottom-Padding,
     damit der User-Block + "Powered by"-Footer ueber der fixen BottomNav
     liegt und sichtbar bleibt — sonst wird der untere Drawer-Bereich
     abgeschnitten (User-Screenshot 17.05.2026). */
  body:has(.kd-bottomnav) .kd-side {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }
  /* Issue #202: Auch alle direkten Children von <body> bekommen Padding,
     falls eine Seite KEIN <main> rendert (sondern direkt <div> als
     Top-Container). Verhindert dass die fixe BottomNav den letzten Eintrag
     im Content abschneidet. */
  body:has(.kd-bottomnav) > div:not(.kd-side):not(.kd-side-backdrop):not(.kd-mob-drawer):not(.kd-mob-drawer-backdrop):not(.kd-appheader):not(.kd-bottomnav):not(.kd-sheet):not(.kd-topbar):last-of-type {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  /* Fallback fuer Browser ohne :has() Support (iOS Safari < 15.4) und
     fuer Templates die KEIN main.page-pad / main.kd-mob-main als
     Top-Container nutzen (z.B. direkter <div> in {% block content %}).
     Body-Klasse kd-layout-v2 setzt der Desktop-Shell beim Boot; Eltern-
     Mobile bekommt sie nicht — daher zusaetzlich body als Fallback. */
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  /* Auf Desktop (>720px) ist die BottomNav per Default versteckt — dort
     darf das Body-Padding weg, sonst entsteht unnoetige Luft. */

  /* Hilfe-Launcher (#kd-help-launcher aus _partials/ticket_fab.html, inline
     bottom:20px/right:20px/z-index:990) ueber die BottomNav heben und auf
     die linke Seite verschieben, damit er nicht den rechten .fab (+ Termin,
     z-index:60) ueberlagert. !important, weil der Launcher seine Position
     inline gesetzt hat — eine vorherige Version dieser Regel zielte
     faelschlich auf #ticket-fab (den inneren, nicht positionierten Button)
     und griff dadurch nie; der Launcher blieb bei inline bottom:20px und
     ueberlappte die BottomNav. #ticket-fab hat selbst keine position, daher
     wirkungslos, wenn man es dort statt am Wrapper ansetzt. */
  #kd-help-launcher {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
    right: auto !important;
    left: 16px !important;
    z-index: 55 !important;   /* unter BottomNav (70) und .fab (60) */
  }
}

/* ── Menü-Sidebar: Profilkarte / Push / Sprache (Redesign 2026 Schritt 3) ── */
.kd-mnu-ic{ width:18px; height:18px; flex:0 0 auto; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

.kd-mnu-pcard{ display:flex; align-items:center; gap:12px; padding:14px; margin:0 -2px 4px;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg,12px); }
.kd-mnu-pcard__ava{ width:46px; height:46px; border-radius:50%; flex:0 0 auto;
  display:grid; place-items:center; font-weight:800; font-size:16px;
  background:var(--brand); color:var(--brand-ink,#fff); }
.kd-mnu-pcard__body{ flex:1; min-width:0; }
.kd-mnu-pcard__name{ font-size:15px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kd-mnu-pcard__role{ font-size:12px; color:var(--ink-muted); margin-top:2px; }
.kd-mnu-pcard__switch{ display:inline-flex; align-items:center; gap:5px; margin-top:6px;
  font-size:12px; font-weight:600; color:var(--brand); text-decoration:none; }
.kd-mnu-pcard__go{ color:var(--ink-subtle,#aaa); }

.kd-mnu-push{ display:flex; align-items:center; gap:12px; padding:12px 14px; margin:4px -2px;
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-md,8px); text-decoration:none; color:inherit;
  transition:background .15s; }
.kd-mnu-push:hover{ background:var(--surface-2,var(--surface)); }
.kd-mnu-push__ic{ width:34px; height:34px; border-radius:9px; flex:0 0 auto;
  display:grid; place-items:center;
  background:color-mix(in srgb,var(--brand) 12%,transparent); color:var(--brand); }
.kd-mnu-push__body{ flex:1; min-width:0; }
.kd-mnu-push__t{ font-size:13.5px; font-weight:700; }
.kd-mnu-push__s{ font-size:11.5px; color:var(--ink-muted); margin-top:2px; }
.kd-mnu-push__chev{ flex:0 0 auto; color:var(--ink-muted); }

.kd-mnu-langrow{ display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:12px 14px; margin:4px -2px 8px;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md,8px); }
.kd-mnu-langrow__l{ display:flex; align-items:center; gap:9px; font-size:13.5px; font-weight:600; color:var(--ink); }
.kd-mnu-langseg{ display:inline-flex; background:var(--surface-2); border:1px solid var(--line);
  border-radius:var(--r-pill,999px); padding:3px; gap:2px; }
.kd-mnu-langseg__btn{ border:none; background:transparent; color:var(--ink-muted);
  font-family:inherit; font-size:12px; font-weight:700; padding:5px 11px;
  border-radius:var(--r-pill,999px); cursor:pointer; text-decoration:none; display:inline-block; }
.kd-mnu-langseg__btn.is-active{ background:var(--brand); color:var(--brand-ink,#fff); }

/* ── Greeting-Header Start-Screens (Redesign 2026 Schritt 4) ── */
.kd-greet{ display:flex; align-items:flex-start; justify-content:space-between;
  padding:10px 2px 18px; }
.kd-greet__date{ font-size:12.5px; color:var(--ink-muted); font-weight:600; }
.kd-greet__name{ font-family:var(--font-display,inherit); font-size:22px;
  letter-spacing:-0.02em; font-weight:700; line-height:1.1; margin-top:3px; }
.kd-greet__right{ display:flex; gap:8px; align-items:center; }
.kd-greet__iconbtn{ width:40px; height:40px; border-radius:12px;
  border:1px solid var(--line); background:var(--surface);
  display:grid; place-items:center; color:var(--ink); position:relative;
  text-decoration:none; }
.kd-greet__nb{ position:absolute; top:-4px; right:-4px; min-width:17px; height:17px;
  padding:0 4px; border-radius:9px; background:var(--crit); color:#fff;
  font-size:10px; font-weight:700; display:grid; place-items:center;
  border:2px solid var(--bg); }
.kd-greet__club-ava{ width:40px; height:40px; border-radius:12px;
  background:var(--brand); display:grid; place-items:center; text-decoration:none;
  color:var(--brand-ink,#fff); overflow:hidden; }

/* ── Nachrichten Inbox – Message Rows (Redesign 2026 Schritt 6) ── */
:root{ --verein:#7C3AED; }
[data-theme="dark"]{ --verein:#A78BFA; }

.mrow{ display:flex; gap:12px; padding:14px 16px; border-bottom:1px solid var(--line);
  text-decoration:none; color:inherit; background:var(--bg); }
.mrow:hover{ background:var(--surface-2); }
.mrow--unread{ background:color-mix(in srgb,var(--brand) 5%,var(--bg)); }
.mrow__ic{ width:44px; height:44px; border-radius:13px; flex:0 0 auto;
  display:grid; place-items:center; }
.mrow__ic svg{ width:22px; height:22px; }
.cat-verein{ background:color-mix(in srgb,var(--verein) 15%,transparent); color:var(--verein); }
.cat-team  { background:color-mix(in srgb,var(--info)   15%,transparent); color:var(--info);   }
.cat-system{ background:var(--surface-2); color:var(--ink-muted); }
.mrow__body{ flex:1; min-width:0; }
.mrow__top{ display:flex; align-items:center; gap:6px; }
.mrow__sender{ font-size:13.5px; font-weight:700; white-space:nowrap; overflow:hidden;
  text-overflow:ellipsis; flex:1; min-width:0; }
.mrow__time{ font-size:11.5px; color:var(--ink-subtle); flex:0 0 auto; }
.mrow__cat{ font-size:9.5px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  padding:2px 7px; border-radius:var(--r-pill); flex:0 0 auto; }
.cat-verein-tag{ color:var(--verein); background:color-mix(in srgb,var(--verein) 13%,transparent); }
.cat-team-tag  { color:var(--info);   background:color-mix(in srgb,var(--info)   13%,transparent); }
.cat-system-tag{ color:var(--ink-muted); background:var(--surface-2); }
.mrow__title{ font-size:14px; font-weight:600; margin-top:3px; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis; }
.mrow--unread .mrow__title{ font-weight:700; }
.mrow__prev{ font-size:12.5px; color:var(--ink-muted); margin-top:2px; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis; }
.mrow__rail{ display:flex; flex-direction:column; align-items:flex-end; gap:6px;
  flex:0 0 auto; justify-content:center; }
.unreaddot{ width:9px; height:9px; border-radius:50%; background:var(--brand); }

/* ── Filter-Chips Inbox ── */
.kd-filterchips{ display:flex; gap:7px; padding:10px 14px;
  overflow-x:auto; background:var(--surface); border-bottom:1px solid var(--line); }
.kd-filterchips::-webkit-scrollbar{ height:0; }
.kd-fchip{ flex:0 0 auto; display:inline-flex; align-items:center; gap:6px;
  border:1px solid var(--line-strong); background:var(--surface); color:var(--ink-muted);
  font:inherit; font-size:12.5px; font-weight:600; padding:6px 13px;
  border-radius:var(--r-pill); cursor:pointer; text-decoration:none; min-height:34px; }
.kd-fchip.is-on{ background:var(--ink); color:var(--bg); border-color:var(--ink); }
.kd-fchip__cnt{ min-width:17px; height:17px; padding:0 4px; border-radius:9px;
  font-size:10.5px; font-weight:700; display:grid; place-items:center;
  background:var(--brand); color:var(--brand-ink); }
.kd-fchip.is-on .kd-fchip__cnt{ background:var(--bg); color:var(--ink); }

/* ── Compose FAB (Nachrichten) ── */
.kd-compose-fab{ position:fixed; right:18px; bottom:calc(82px + env(safe-area-inset-bottom, 0px)); height:50px; padding:0 18px;
  border-radius:16px; border:none; background:var(--brand); color:var(--brand-ink);
  display:inline-flex; align-items:center; gap:8px; font:inherit; font-weight:700;
  font-size:14px; cursor:pointer; box-shadow:var(--shadow-md); z-index:40;
  text-decoration:none; }
.kd-compose-fab svg{ width:20px; height:20px; }
@media(min-width:1025px){ .kd-compose-fab{ bottom:24px; } }

/* ── Compose Bottom-Sheet ── */
.kd-sheet-wrap{ position:fixed; inset:0; z-index:200; display:none; }
.kd-sheet-wrap.is-open{ display:block; }
.kd-sheet-bd{ position:absolute; inset:0; background:rgba(0,0,0,.42); }
.kd-sheet{ position:absolute; left:0; right:0; bottom:0; background:var(--surface);
  border-radius:var(--r-xl,20px) var(--r-xl,20px) 0 0; box-shadow:var(--shadow-lg);
  padding:8px 16px 28px; transform:translateY(100%);
  transition:transform .26s cubic-bezier(.2,.8,.2,1); max-height:80vh; overflow-y:auto; }
.kd-sheet-wrap.is-open .kd-sheet{ transform:translateY(0); }
.kd-sheet__grip{ width:40px; height:4px; border-radius:2px;
  background:var(--line-strong); margin:8px auto 14px; }
.kd-sheet__hd{ display:flex; align-items:center; justify-content:space-between; margin-bottom:4px; }
.kd-sheet__hd h3{ margin:0; font-size:17px; font-weight:700; }
.kd-sheet__close{ width:34px; height:34px; border:none; background:var(--surface-2);
  border-radius:10px; display:grid; place-items:center; cursor:pointer; color:var(--ink); }
.kd-sheet__sub{ font-size:12.5px; color:var(--ink-muted); margin:0 0 12px; }
.kd-recip{ display:flex; align-items:center; gap:13px; padding:13px;
  border:1px solid var(--line); border-radius:var(--r-md,10px);
  text-decoration:none; color:inherit; }
.kd-recip + .kd-recip{ margin-top:8px; }
.kd-recip:hover{ background:var(--surface-2); }
.kd-recip__ic{ width:40px; height:40px; border-radius:12px; flex:0 0 auto;
  display:grid; place-items:center; }
.kd-recip__ic svg{ width:20px; height:20px; }
.kd-recip__body{ flex:1; min-width:0; }
.kd-recip__t{ font-size:14.5px; font-weight:600; }
.kd-recip__s{ font-size:12px; color:var(--ink-muted); margin-top:1px; }
.rc-team   { background:color-mix(in srgb,var(--info)   15%,transparent); color:var(--info); }
.rc-trainer{ background:color-mix(in srgb,var(--brand)  14%,transparent); color:var(--brand); }
.rc-pass   { background:color-mix(in srgb,var(--crit)   13%,transparent); color:var(--crit); }
.rc-office { background:color-mix(in srgb,var(--verein) 14%,transparent); color:var(--verein); }

/* ── Alias-Layer: Template-Namen → kanonische Token ──────────────
   Kein Template ändern nötig — Aliasse überbrücken den Mismatch.
   Betrifft: betriebszentrale.html, vereinszentrale.html und weitere.
   ────────────────────────────────────────────────────────────── */
:root {
  --surface-1: var(--surface);
  --border:    var(--line);
  --success:   var(--ok);
  --warning:   var(--wait);
  --danger:    var(--crit);
}
