/* =====================================================================
   Wasserflitzer Trainerportal – Design (Nov 2026)
   Farben aus dem Logo (weiches Tuerkis), gut lesbare Schrift (Figtree),
   fuer das Handy am Beckenrand gebaut: grosse Tippflaechen, Menue unten.
   ===================================================================== */

@font-face {
  font-family: 'Figtree';
  src: url('/assets/fonts/figtree-latin-variable.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --logo: #64c0be;              /* Logo-Tuerkis: Kopfleiste, Wellen, Flaechen */
  --logo-hell: #c2ebf2;
  --primaer: #237a78;           /* dunkleres Tuerkis: Knoepfe, Links (weiss darauf gut lesbar) */
  --primaer-dunkel: #1a5f5d;
  --primaer-tint: #ddf2f1;
  --primaer-tint-2: #f3f6f4;
  --tinte: #17454a;             /* Haupttext */
  --leise: #4d6e71;             /* Nebentext (kontraststark genug) */
  --grund: #f1eee8;             /* Seitenhintergrund: heller Sand (warm, nicht klinisch) */
  --karte: #fbfbfa;             /* Karten: weiches, neutrales Weiss statt grellem Reinweiss */
  --karte-hell: #fdfdfc;
  --linie: #e6e2db;
  --linie-hell: #efece7;
  --eingabe-rand: #cfc6b8;

  --erfolg: #1e6b35;  --erfolg-tint: #e6f4ea;
  --fehler: #a63a1f;  --fehler-tint: #fde8e1;
  --warnung: #7a5600; --warnung-tint: #fff2cc;
  --lila: #5b3fa3;    --lila-tint: #ede7f8;

  --r-gross: 22px;
  --r: 16px;
  --r-klein: 12px;
  --schatten: 0 1px 2px rgba(70, 55, 35, 0.05), 0 4px 14px rgba(70, 55, 35, 0.07);
  --schatten-hoch: 0 2px 6px rgba(23, 69, 74, 0.08), 0 12px 32px rgba(23, 69, 74, 0.12);
  --bottomnav-h: 68px;

  /* Kompatibilitaet: alte Variablennamen, die noch in einzelnen Seiten stehen */
  --color-primary: var(--primaer);
  --color-primary-dark: var(--primaer);
  --color-primary-tint: var(--primaer-tint);
  --color-text: var(--tinte);
  --color-muted: var(--leise);
  --color-border: var(--linie);
  --color-card: var(--karte);
  --color-bg: var(--grund);
  --color-input-border: var(--eingabe-rand);
  --color-warning: var(--warnung);
  --color-error: var(--fehler);
  --color-success: var(--erfolg);
  --radius: var(--r);
  --radius-sm: var(--r-klein);
  --shadow-sm: var(--schatten);
  --shadow-md: var(--schatten-hoch);
  --button-gradient: var(--primaer);
  --header-gradient: var(--logo);
  --color-accent: #e07a5a;
  --color-accent-dark: #b4583a;
  --color-accent-tint: #fde8e1;
  --color-blue-dark: var(--primaer-dunkel);
  --color-primary-light: var(--logo);
  --color-gold: #c99a17;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px;
  background: var(--grund);
  color: var(--tinte);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primaer); text-underline-offset: 2px; }
a:hover { color: var(--primaer-dunkel); }
:focus-visible { outline: 3px solid var(--logo); outline-offset: 2px; border-radius: 6px; }

h1 { font-size: 1.75rem; line-height: 1.2; margin: 0.4rem 0 1rem; font-weight: 800; letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.5rem; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 1.6rem 0 0.7rem; font-weight: 800; display: flex; align-items: center; gap: 0.45rem; }
h3 { font-size: 1.05rem; margin: 1rem 0 0.5rem; font-weight: 700; display: flex; align-items: center; gap: 0.4rem; }
h1 .icon, h2 .icon, h3 .icon { color: var(--primaer); }

.icon { width: 1.2em; height: 1.2em; flex-shrink: 0; vertical-align: -0.2em; }
.icon-lg { width: 1.4em; height: 1.4em; }
.zahl, .tabular { font-variant-numeric: tabular-nums; }

/* ---------- Kopfleiste ---------- */
.topbar {
  background: var(--logo);
  color: var(--tinte);
  position: sticky;
  top: 0;
  z-index: 30;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 2px 12px rgba(23, 69, 74, 0.12);
  padding-top: env(safe-area-inset-top);
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--tinte); text-decoration: none; line-height: 1.1; }
.brand:hover { color: var(--tinte); }
.brand-logo { width: 44px; height: 44px; border-radius: 50%; background: var(--karte); display: block; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 800; font-size: 1.05rem; }
.brand-sub { font-size: 0.8rem; opacity: 0.8; }
.topbar-profil {
  margin-left: auto;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: var(--primaer);
  font-weight: 800; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.topbar-profil:hover { background: var(--karte); color: var(--primaer-dunkel); }

/* Desktop-Navigation in der Kopfleiste */
.mainnav { display: none; align-items: center; gap: 0.1rem; flex-wrap: nowrap; margin-left: 1rem; white-space: nowrap; }
.mainnav a {
  display: flex; align-items: center; gap: 0.35rem;
  color: var(--tinte); text-decoration: none;
  font-size: 0.92rem; font-weight: 700;
  padding: 0.45rem 0.7rem; border-radius: 999px;
}
.mainnav a .icon { width: 1.1em; height: 1.1em; }
.mainnav a:hover { background: rgba(255, 255, 255, 0.45); }
.mainnav a.active { background: var(--karte); color: var(--primaer); }
.mainnav-mehr { position: relative; }
.mainnav-mehr > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.92rem; font-weight: 700; padding: 0.45rem 0.7rem; border-radius: 999px;
}
.mainnav-mehr > summary::-webkit-details-marker { display: none; }
.mainnav-mehr > summary:hover, .mainnav-mehr[open] > summary { background: rgba(255, 255, 255, 0.45); }
.mainnav-mehr-panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--karte); border-radius: var(--r); box-shadow: var(--schatten-hoch);
  padding: 0.5rem; min-width: 240px; display: flex; flex-direction: column; gap: 2px; z-index: 40;
}
.mainnav-mehr-panel a { border-radius: var(--r-klein); padding: 0.6rem 0.75rem; }
.mainnav-mehr-panel a:hover { background: var(--primaer-tint-2); }

/* Mobile: Menue unten wie in einer App */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  background: var(--karte);
  box-shadow: 0 -2px 16px rgba(23, 69, 74, 0.1);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
}
.bottomnav a, .bottomnav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px;
  color: var(--leise); text-decoration: none;
  font: inherit; font-size: 0.72rem; font-weight: 700;
  background: none; border: none; cursor: pointer; border-radius: 14px;
}
.bottomnav .icon { width: 1.55em; height: 1.55em; }
.bottomnav a.active { color: var(--primaer); }
.bottomnav a.active .icon { background: var(--primaer-tint); border-radius: 999px; padding: 3px 12px; width: 3.2em; height: 1.9em; }

/* Mehr-Menue (Seitenleiste) */
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(23, 69, 74, 0.4); z-index: 40; }
.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 84%; max-width: 330px;
  background: var(--karte); z-index: 50;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex; flex-direction: column;
  box-shadow: var(--schatten-hoch);
  border-radius: 24px 0 0 24px;
  padding-top: env(safe-area-inset-top);
}
body.nav-open .nav-overlay { display: block; }
body.nav-open .nav-drawer { transform: translateX(0); }
.nav-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1rem 0.5rem; }
.nav-drawer-close { background: var(--primaer-tint); border: none; color: var(--primaer); width: 42px; height: 42px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.nav-drawer-links { display: flex; flex-direction: column; padding: 0.25rem 0.75rem 1.5rem; gap: 2px; overflow-y: auto; }
.nav-drawer-links a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 0.8rem; border-radius: var(--r-klein);
  color: var(--tinte); text-decoration: none; font-size: 1rem; font-weight: 600;
}
.nav-drawer-links a .icon { color: var(--primaer); }
.nav-drawer-links a:hover { background: var(--primaer-tint-2); }
.nav-drawer-links a.active { background: var(--primaer-tint); color: var(--primaer-dunkel); }
.nav-drawer-links hr { border: none; border-top: 1px solid var(--linie); margin: 0.5rem 0.25rem; }
.nav-drawer-gruppenlabel { display: block; font-size: 0.85rem; font-weight: 700; color: var(--leise); padding: 0.9rem 0.8rem 0.25rem; }

/* Menue unten nur auf dem Handy (schmale Bildschirme). Ab Tablet/Computer steht es oben. */
@media (min-width: 700px) {
  .mainnav { display: flex; }
  .bottomnav { display: none; }
  .topbar { border-radius: 0 0 28px 28px; }
  .brand-sub { display: none; }
}
@media (min-width: 700px) and (max-width: 1099px) {
  .mainnav a, .mainnav-mehr > summary { padding: 0.4rem 0.45rem; }
  .mainnav a, .mainnav-mehr > summary { font-size: 0.85rem; padding: 0.4rem 0.5rem; }
  .mainnav a .icon, .mainnav-mehr > summary .icon { display: none; }
  .mainnav { margin-left: 0.4rem; gap: 0; flex-wrap: nowrap; }
  .brand-text { display: none; }
}

.content {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.25rem 1rem calc(var(--bottomnav-h) + 2.5rem + env(safe-area-inset-bottom));
}
@media (min-width: 700px) { .content { padding-bottom: 3rem; padding-left: 1.5rem; padding-right: 1.5rem; } }

/* ---------- Hinweise ---------- */
.flash { padding: 0.8rem 1rem; border-radius: var(--r); margin-bottom: 1rem; font-weight: 600; }
.flash-success { background: var(--erfolg-tint); color: var(--erfolg); }
.flash-error { background: var(--fehler-tint); color: var(--fehler); }
.flash-info { background: var(--primaer-tint); color: var(--primaer-dunkel); }
.toast {
  position: fixed; left: 50%; top: calc(76px + env(safe-area-inset-top));
  transform: translate(-50%, -12px); opacity: 0;
  z-index: 60; max-width: min(92vw, 460px);
  box-shadow: var(--schatten-hoch);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.toast.sichtbar { opacity: 1; transform: translate(-50%, 0); }


/* ---------- Karten ---------- */
.card {
  background: var(--karte);
  border-radius: var(--r-gross);
  padding: 1.15rem;
  margin-bottom: 1rem;
  box-shadow: var(--schatten);
}
.card > h2:first-child, .card > details > summary > h2 { margin-top: 0; }
.card-highlight { background: var(--primaer-tint-2); box-shadow: inset 0 0 0 2px var(--primaer-tint), var(--schatten); }
.card-link { text-decoration: none; color: inherit; display: block; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.card-link:hover { box-shadow: var(--schatten-hoch); transform: translateY(-1px); color: inherit; }
.card-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--primaer-tint); color: var(--primaer); display: flex; align-items: center; justify-content: center; margin-bottom: 0.6rem; }
.card-icon .icon { width: 1.4em; height: 1.4em; }
.admin-dashboard-gruppe { margin-top: 1.8rem; color: var(--primaer); }

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

/* ---------- Begruessung & "Heute" ---------- */
.begruessung h1 { margin-bottom: 0.1rem; font-size: 1.9rem; }
.begruessung p { margin: 0 0 1.2rem; color: var(--leise); }

.heute-karte { background: var(--karte); border-radius: 26px; overflow: hidden; box-shadow: var(--schatten-hoch); margin-bottom: 0.9rem; }
.heute-welle { height: 30px; background: var(--logo); display: flex; align-items: flex-end; }
.heute-welle svg { display: block; width: 100%; height: 16px; color: var(--karte); }
.heute-inhalt { padding: 1rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: 0.9rem; }
.heute-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.heute-kopf strong { color: var(--primaer); }
.heute-kopf span { color: var(--leise); font-size: 0.92rem; }
.heute-haupt { display: flex; gap: 1rem; align-items: flex-start; }
.heute-zeit { display: flex; flex-direction: column; min-width: 4.6rem; }
.heute-zeit b { font-size: 2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.heute-zeit span { font-size: 0.9rem; color: var(--leise); font-variant-numeric: tabular-nums; }
.heute-info { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.heute-info b { font-size: 1.2rem; line-height: 1.25; }
.heute-info span { color: var(--leise); font-size: 0.95rem; }
.heute-knoepfe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.heute-leer { background: var(--karte); border-radius: var(--r-gross); padding: 1.1rem 1.15rem; box-shadow: var(--schatten); margin-bottom: 1rem; display: flex; gap: 0.9rem; align-items: center; }
.heute-leer img { width: 52px; height: 52px; border-radius: 50%; }
.heute-leer p { margin: 0; color: var(--leise); }
.heute-leer b { color: var(--tinte); display: block; }

/* ---------- Listen (Dienste, Kurse) ---------- */
.zeilen { background: var(--karte); border-radius: var(--r-gross); box-shadow: var(--schatten); overflow: hidden; }
.zeile {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--linie-hell);
  color: var(--tinte); text-decoration: none;
}
.zeile:last-child { border-bottom: none; }
a.zeile:hover { background: var(--primaer-tint-2); color: var(--tinte); }
.zeile-datum { width: 3.2rem; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.zeile-datum small { font-size: 0.8rem; color: var(--leise); font-weight: 700; }
.zeile-datum b { font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.zeile-zeit { width: 3.8rem; flex-shrink: 0; display: flex; flex-direction: column; line-height: 1.15; }
.zeile-zeit small { font-size: 0.8rem; color: var(--leise); font-weight: 700; }
.zeile-zeit b { font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.zeile-text { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 0.1rem; }
.zeile-text b { font-size: 1rem; }
.zeile-text span { font-size: 0.9rem; color: var(--leise); }
.zeile-pfeil { color: var(--leise); flex-shrink: 0; }
.zeile.mein { background: var(--primaer-tint-2); }
.zeilen-leer { padding: 1rem; color: var(--leise); }
.abschnitt-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin: 1.6rem 0 0.7rem; }
.abschnitt-kopf h2 { margin: 0; }
.abschnitt-kopf a { font-weight: 700; font-size: 0.95rem; }

/* ---------- Pillen / Badges ---------- */
.pille, .badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 700; white-space: nowrap;
  background: var(--primaer-tint); color: var(--primaer-dunkel);
}
.pille-warnung, .badge-pending, .badge-eingereicht, .badge-beantragt { background: var(--warnung-tint); color: var(--warnung); }
.pille-erfolg, .badge-active, .badge-genehmigt { background: var(--erfolg-tint); color: var(--erfolg); }
.pille-fehler, .badge-disabled, .badge-abgelehnt, .badge-urgent { background: var(--fehler-tint); color: var(--fehler); }
.pille-lila { background: var(--lila-tint); color: var(--lila); }
.pille-grau { background: #edf2f2; color: var(--leise); }
.badge { text-transform: none; }
.metall { width: 0.6rem; height: 0.6rem; border-radius: 50%; display: inline-block; flex-shrink: 0; background: var(--logo); }
.metall-seepferdchen { background: #2f8fc4; }
.metall-bronze { background: #b4683a; }
.metall-silber { background: #8e9ba6; }
.metall-gold { background: #c99a17; }

/* ---------- Umschalter (2026 / 2027, Ansichten) ---------- */
.umschalter {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  gap: 4px; padding: 4px; background: #e7e2d9; border-radius: 14px; margin-bottom: 0.9rem;
}
.umschalter a, .umschalter button {
  min-height: 42px; border: none; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; font-size: 0.98rem;
  background: transparent; color: var(--leise); text-decoration: none; cursor: pointer;
}
.umschalter .aktiv, .umschalter [aria-pressed="true"], .umschalter [aria-selected="true"] { background: var(--karte); color: var(--tinte); box-shadow: 0 1px 3px rgba(23, 69, 74, 0.15); }
[data-jahr-panel][hidden] { display: none !important; }

.filterleiste { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.3rem; margin-bottom: 0.8rem; scrollbar-width: none; }
.filterleiste::-webkit-scrollbar { display: none; }
.filterleiste a {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 40px; padding: 0 0.95rem; border-radius: 999px;
  background: var(--karte); color: var(--tinte); text-decoration: none; font-weight: 700; font-size: 0.92rem;
  box-shadow: inset 0 0 0 1.5px var(--eingabe-rand);
}
.filterleiste a.aktiv { background: var(--primaer); color: #fff; box-shadow: none; }

/* ---------- Aufklapp-Gruppen (Standorte, Tage) ---------- */
.klapp, .standort-gruppe, .kurs-gruppe {
  background: var(--karte); border-radius: var(--r-gross); box-shadow: var(--schatten);
  margin-bottom: 0.75rem; overflow: hidden;
}
.klapp > summary, .standort-gruppe > summary, .kurs-gruppe > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.95rem 1rem; min-height: 60px;
}
.klapp > summary::-webkit-details-marker, .standort-gruppe > summary::-webkit-details-marker, .kurs-gruppe > summary::-webkit-details-marker { display: none; }
.klapp > summary::after, .standort-gruppe > summary::after, .kurs-gruppe > summary::after {
  content: ''; width: 0.6rem; height: 0.6rem; flex-shrink: 0;
  border-right: 2.5px solid var(--leise); border-bottom: 2.5px solid var(--leise);
  transform: rotate(45deg); margin: 0 0.3rem 0.25rem auto; transition: transform 0.18s ease;
}
.klapp[open] > summary::after, .standort-gruppe[open] > summary::after, .kurs-gruppe[open] > summary::after { transform: rotate(-135deg); margin-bottom: -0.25rem; }
.klapp-titel { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.klapp-titel b { font-size: 1.05rem; }
.klapp-titel span { font-size: 0.88rem; color: var(--leise); }
.klapp-inhalt { border-top: 1px solid var(--linie-hell); }
.klapp-inhalt-pad { border-top: 1px solid var(--linie-hell); padding: 1rem; }
.standort-gruppe > summary h3, .kurs-gruppe > summary h3, .standort-gruppe > summary h2, .kurs-gruppe > summary h2 { margin: 0; }
.standort-gruppe > *:not(summary), .kurs-gruppe > *:not(summary) { margin-left: 1rem; margin-right: 1rem; }
.standort-gruppe > .zeilen, .standort-gruppe > .klapp-inhalt { margin-left: 0; margin-right: 0; box-shadow: none; border-radius: 0; }
.klapp-unter { box-shadow: none; border-radius: 0; margin: 0; border-top: 1px solid var(--linie-hell); }
.klapp-unter > summary { min-height: 52px; padding: 0.7rem 1rem; background: var(--primaer-tint-2); }
.standort-info { margin: 0 0 0.6rem; }

.standort-punkt { width: 1rem; height: 1rem; border-radius: 50%; flex-shrink: 0; background: var(--standort-akzent, var(--logo)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--standort-akzent, var(--logo)) 22%, transparent); }
/* Standort-Gruppen bekommen zusaetzlich einen farbigen Streifen links */
.klapp[class*="standort-farbe-"] { box-shadow: inset 5px 0 0 var(--standort-akzent), var(--schatten); }
.standort-farbe-1 { --standort-akzent: #0e8a87; }  /* Tuerkis */
.standort-farbe-2 { --standort-akzent: #e4572e; }  /* Koralle-Rot */
.standort-farbe-3 { --standort-akzent: #7b4fd6; }  /* Violett */
.standort-farbe-4 { --standort-akzent: #e8a33d; }  /* Bernstein */
.standort-farbe-5 { --standort-akzent: #2b7be4; }  /* Blau */
.standort-farbe-6 { --standort-akzent: #d6408f; }  /* Pink */

.elterninfo-hinweis { display: inline-flex; vertical-align: -0.15em; color: var(--warnung); cursor: help; }
.elterninfo-hinweis .icon { width: 1em; height: 1em; }

/* ---------- Kurs-Karten (Dienstplan/Admin) ---------- */
.kurs-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.7rem; margin-bottom: 1rem; }
@media (min-width: 680px) { .kurs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .kurs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kurs-mini-card { display: block; text-decoration: none; color: var(--tinte); background: var(--karte); border-radius: var(--r); padding: 0.9rem 1rem; box-shadow: var(--schatten); }
.kurs-mini-card .badge { margin: 0 0.3rem 0.4rem 0; }
.kurs-mini-name { font-weight: 700; font-size: 1.02rem; }
.kurs-mini-card.mein-kurs { box-shadow: inset 0 0 0 2px var(--logo), var(--schatten); }
.kurs-mini-card.kurs-unterbesetzt { box-shadow: inset 0 0 0 2px #f3c1b0, var(--schatten); }
.kurs-mini-actions { margin-top: 0.7rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* Dienstplan: Termin mit Plaetzen */
.termin { padding: 0.85rem 1rem; border-bottom: 1px solid var(--linie-hell); display: flex; flex-direction: column; gap: 0.6rem; scroll-margin-top: 90px; }
.termin:last-child { border-bottom: none; }
.termin-kopf { display: flex; gap: 0.8rem; align-items: baseline; }
.termin-kopf .zeit { font-weight: 800; font-size: 1.08rem; min-width: 3.4rem; font-variant-numeric: tabular-nums; }
.termin-kopf .name { font-weight: 700; display: flex; flex-direction: column; }
.termin-kopf .name small { font-weight: 500; color: var(--leise); font-size: 0.88rem; }
.termin.mein { background: var(--primaer-tint-2); }
.kurs-slots { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding-left: 4.2rem; }
@media (max-width: 380px) { .kurs-slots { padding-left: 0; } }
.kurs-slot-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 38px; padding: 0 0.4rem 0 0.8rem; border-radius: 12px;
  background: var(--primaer-tint); color: var(--primaer-dunkel); font-weight: 700; font-size: 0.9rem;
}
.kurs-slot-chip-mein { background: var(--primaer); color: #fff; }
.kurs-slot-chip-name { display: flex; align-items: center; gap: 0.3rem; }
.kurs-slot-chip-name .icon { width: 1em; height: 1em; }
.kurs-slot-chip-remove {
  width: 30px; height: 30px; border-radius: 9px; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.55); color: inherit; font-size: 0.85rem; font-weight: 800;
}
.kurs-slot-chip-mein .kurs-slot-chip-remove { background: rgba(255, 255, 255, 0.2); }
.kurs-slot-chip-remove:hover { background: var(--fehler-tint); color: var(--fehler); }
.kurs-slot-offen {
  min-height: 38px; padding: 0 0.85rem; border-radius: 12px; cursor: pointer;
  border: 1.5px dashed var(--primaer); background: var(--karte); color: var(--primaer);
  font: inherit; font-weight: 800; font-size: 0.9rem;
}
.kurs-slot-offen:hover { background: var(--primaer-tint); }
.kurs-slot-zuweisen { width: 100%; }
.kurs-slot-zuweisen summary { cursor: pointer; list-style: none; font-size: 0.85rem; color: var(--leise); text-decoration: underline; text-underline-offset: 2px; display: inline-block; padding: 0.2rem 0; }
.kurs-slot-zuweisen summary::-webkit-details-marker { display: none; }
.kurs-slot-zuweisen .inline-form { margin-top: 0.4rem; }
.kurs-slot-zuweisen select { flex: 1; min-width: 0; }

.wissen-layout { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 1rem; }
@media (min-width: 860px) {
  .wissen-layout { flex-direction: row; align-items: flex-start; }
  .wissen-sidebar { flex: 0 0 260px; display: flex; flex-direction: column; gap: 1.1rem; }
  .wissen-content { flex: 1; min-width: 0; }
}
.wissen-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.wissen-liste a { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.55rem 0.7rem; border-radius: var(--r-klein); color: var(--tinte); text-decoration: none; }
.wissen-liste a:hover { background: var(--primaer-tint-2); }
.wissen-liste a.active { background: var(--primaer-tint); color: var(--primaer-dunkel); font-weight: 700; }
.wissen-liste .count { color: var(--leise); font-size: 0.8rem; }
.wissen-index { max-height: 320px; overflow-y: auto; }

/* ---------- Stunden-Fortschritt (Anwesenheit/Feedback) ---------- */
.stunden-stepper { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.6rem 0 1.1rem; }
.stunden-nummer {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; border-radius: 12px;
  font-weight: 800; text-decoration: none; font-variant-numeric: tabular-nums;
  background: var(--karte); color: var(--leise); box-shadow: inset 0 0 0 1.5px var(--linie);
}
a.stunden-nummer:hover { box-shadow: inset 0 0 0 2px var(--logo); color: var(--primaer); }
.stunden-nummer.erledigt { background: var(--primaer-tint); color: var(--primaer-dunkel); box-shadow: none; }
.stunden-nummer.aktuell { background: var(--primaer); color: #fff; box-shadow: 0 0 0 3px var(--logo-hell); }
.stunden-nummer.offen { color: #87a3a5; }

/* ---------- Anwesenheit: eine Karte pro Kind ---------- */
.kind-liste { display: flex; flex-direction: column; gap: 0.6rem; }
.kind-karte { background: var(--karte); border-radius: var(--r-gross); padding: 0.75rem 0.85rem; box-shadow: var(--schatten); display: flex; flex-direction: column; gap: 0.6rem; }
.kind-karte.fehlt { box-shadow: inset 0 0 0 1.5px var(--linie); background: #f6f4ef; }
.kind-karte.fehlt:not(.gast) .kind-details { display: none; }
.kind-kopf { display: flex; align-items: center; gap: 0.75rem; }
.da-knopf { position: relative; flex-shrink: 0; width: 54px; height: 54px; }
.da-knopf input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; z-index: 1; }
.da-knopf span {
  display: flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 16px;
  border: 2px solid #b5d8d5; background: var(--karte); transition: background 0.12s ease, border-color 0.12s ease;
}
.da-knopf span svg { width: 28px; height: 28px; stroke: #fff; opacity: 0; }
.da-knopf input:checked + span { background: var(--primaer); border-color: var(--primaer); }
.da-knopf input:checked + span svg { opacity: 1; }
.da-knopf input:focus-visible + span { outline: 3px solid var(--logo); outline-offset: 2px; }
.kind-name { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; min-width: 0; }
.kind-name > a { font-weight: 800; font-size: 1.05rem; color: var(--tinte); text-decoration: none; }
.kind-name > a:hover { text-decoration: underline; }
.kind-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.kind-tags select {
  font: inherit; font-size: 0.82rem; font-weight: 700; border: none; border-radius: 999px;
  padding: 0.2rem 1.6rem 0.2rem 0.6rem; background-color: var(--primaer-tint); color: var(--primaer-dunkel);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%231a5f5d' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.55rem center;
}
.kind-tags select.wiederholer { background-color: var(--lila-tint); color: var(--lila); }
.anruf-knopf { width: 46px; height: 46px; border-radius: 14px; background: var(--primaer-tint-2); color: var(--primaer); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kind-details { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.zaehler { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; padding: 0.35rem 0.45rem 0.45rem; border-radius: 14px; background: var(--primaer-tint-2); max-width: 9.5rem; }
.zaehler label { width: 100%; font-size: 0.8rem; color: var(--leise); padding: 0 0.15rem; font-weight: 700; display: flex; justify-content: space-between; }
.zaehler button { width: 36px; height: 36px; border-radius: 10px; border: none; background: var(--karte); color: var(--primaer); font: inherit; font-weight: 800; font-size: 1.15rem; cursor: pointer; box-shadow: 0 1px 2px rgba(23,69,74,0.08); }
.zaehler input { width: 2.2rem; text-align: center; border: none; background: transparent; font: inherit; font-weight: 800; font-size: 1.05rem; color: var(--tinte); padding: 0; -moz-appearance: textfield; }
.zaehler input::-webkit-outer-spin-button, .zaehler input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.zaehler-zuletzt { font-weight: 600; }
.kind-feedback { margin-left: auto; display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-end; }
.speicher-leiste {
  position: sticky; bottom: calc(var(--bottomnav-h) + 8px + env(safe-area-inset-bottom)); z-index: 20;
  margin-top: 1rem;
  background: var(--karte); border-radius: var(--r-gross); box-shadow: var(--schatten-hoch);
  padding: 0.7rem 0.8rem; display: flex; align-items: center; gap: 0.9rem;
}
@media (min-width: 700px) { .speicher-leiste { bottom: 12px; } }
.speicher-leiste .stand { display: flex; flex-direction: column; line-height: 1.15; }
.speicher-leiste .stand b { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.speicher-leiste .stand span { font-size: 0.85rem; color: var(--leise); }
.speicher-leiste .btn { flex: 1; min-height: 52px; font-size: 1.02rem; }

/* ---------- Kurswahl ---------- */
.kurswahl-heute { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.kurs-kachel {
  display: flex; align-items: center; gap: 0.9rem; padding: 0.95rem 1rem; border-radius: var(--r-gross);
  background: var(--karte); color: var(--tinte); text-decoration: none; box-shadow: var(--schatten);
}
.kurs-kachel:hover { color: var(--tinte); box-shadow: var(--schatten-hoch); }
.kurs-kachel.aktiv { background: var(--primaer); color: #fff; }
.kurs-kachel.aktiv span, .kurs-kachel.aktiv small { color: rgba(255, 255, 255, 0.88) !important; }
.kurs-kachel .zeile-zeit b { font-size: 1.3rem; }
.kurswahl-suche { display: flex; align-items: center; gap: 0.6rem; min-height: 50px; padding: 0 0.9rem; border-radius: 14px; background: var(--karte); box-shadow: inset 0 0 0 1.5px var(--eingabe-rand); margin-bottom: 0.8rem; }
.kurswahl-suche input { border: none; outline: none; background: transparent; font: inherit; color: var(--tinte); flex: 1; min-width: 0; height: 46px; }
.kurswahl-aktuell { display: flex; align-items: center; gap: 0.8rem; background: var(--karte); border-radius: var(--r-gross); padding: 0.8rem 1rem; box-shadow: var(--schatten); margin-bottom: 0.9rem; }
.kurswahl-aktuell .zeile-text b { font-size: 1.1rem; }
.kurswahl-aktuell details { margin-left: auto; }
[data-such-treffer="nein"] { display: none !important; }

/* ---------- Formulare ---------- */
.form { display: flex; flex-direction: column; gap: 0.95rem; }
.form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.92rem; color: var(--leise); font-weight: 600; }
input, select, textarea, button { font-family: inherit; }
.form input, .form select, .form textarea, .input {
  font-size: 1rem; min-height: 46px;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--eingabe-rand);
  border-radius: var(--r-klein);
  color: var(--tinte); background: var(--karte-hell); width: 100%;
}
.form textarea { min-height: 90px; }
.form input[type="checkbox"], .form input[type="radio"] { width: 1.3rem; height: 1.3rem; min-height: 0; padding: 0; margin: 0; flex-shrink: 0; accent-color: var(--primaer); }
.form input::placeholder, .form textarea::placeholder { color: #86a2a4; }
.form input:focus, .form select:focus, .form textarea:focus, .input:focus { outline: none; border-color: var(--primaer); box-shadow: 0 0 0 3px var(--logo-hell); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.95rem; }
@media (min-width: 680px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid .span-2 { grid-column: span 2; }
}
.form-inline { flex-direction: row; flex-wrap: wrap; gap: 0.8rem; align-items: flex-end; }
.form-inline label { flex: 1 1 200px; }
.form-field { display: flex; flex-direction: column; gap: 0.35rem; }
.form-field-label { font-size: 0.92rem; color: var(--leise); font-weight: 600; }
.form-time-pair { display: flex; gap: 0.5rem; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.6rem; border: 1.5px solid var(--eingabe-rand); border-radius: var(--r-klein); background: var(--karte); }
.checkbox-group-item { flex-direction: row !important; align-items: center; gap: 0.5rem !important; padding: 0.45rem 0.7rem; border-radius: 10px; background: var(--primaer-tint-2); color: var(--tinte) !important; font-weight: 600; }
.form-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.inline-form { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; margin: 0; }
.input-small { width: 160px; }
.table input[type="checkbox"] { width: 1.4rem; height: 1.4rem; accent-color: var(--primaer); cursor: pointer; }

/* ---------- Knoepfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 46px; padding: 0.55rem 1.15rem;
  border-radius: 14px; border: none;
  font: inherit; font-size: 0.98rem; font-weight: 800;
  cursor: pointer; text-decoration: none; text-align: center;
  transition: background 0.12s ease, transform 0.06s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primaer); color: #fff; }
.btn-primary:hover { background: var(--primaer-dunkel); color: #fff; }
.btn-secondary { background: var(--primaer-tint); color: var(--primaer-dunkel); }
.btn-secondary:hover { background: #c9eae8; color: var(--primaer-dunkel); }
.btn-outline { background: var(--karte); color: var(--tinte); box-shadow: inset 0 0 0 1.5px var(--eingabe-rand); }
.btn-outline:hover { box-shadow: inset 0 0 0 2px var(--primaer); color: var(--primaer); }
.btn-danger { background: var(--fehler-tint); color: var(--fehler); }
.btn-danger:hover { background: #f9d3c6; color: var(--fehler); }
.btn-disabled, .btn[disabled] { background: #edf2f2; color: #87a3a5; cursor: default; }
.btn-small { min-height: 38px; padding: 0.35rem 0.8rem; font-size: 0.88rem; border-radius: 11px; }
.btn-feedback-fehlt { background: var(--fehler-tint); color: var(--fehler); }
.btn-feedback-fehlt:hover { background: #f9d3c6; color: var(--fehler); }
.btn-feedback-fertig { background: var(--erfolg-tint); color: var(--erfolg); }
.btn.laedt { opacity: 0.7; pointer-events: none; }

/* ---------- Anmeldung ---------- */
.auth-shell { min-height: calc(100vh - 40px); display: flex; align-items: center; justify-content: center; padding: 1.5rem 0.25rem; }
.auth-box { max-width: 420px; width: 100%; background: var(--karte); border-radius: 28px; padding: 2rem 1.5rem; box-shadow: var(--schatten-hoch); }
.auth-logo { display: block; width: 110px; height: 110px; margin: 0 auto 0.8rem; border-radius: 50%; }
.auth-box h1 { justify-content: center; margin-top: 0; }
.auth-alt { margin-top: 1.2rem; font-size: 0.95rem; color: var(--leise); text-align: center; }
.auth-box .btn { width: 100%; min-height: 52px; }

/* ---------- Listen & Schichten ---------- */
.list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.list li { padding: 0.65rem 0; border-bottom: 1px solid var(--linie-hell); }
.list li:last-child { border-bottom: none; }
.date-heading { margin-top: 1.6rem; color: var(--tinte); }
.date-heading.today-heading { color: var(--primaer); }
.shift-list { display: flex; flex-direction: column; gap: 0.6rem; }
.shift-card { display: flex; align-items: center; gap: 0.9rem; background: var(--karte); border-radius: var(--r); padding: 0.9rem 1rem; flex-wrap: wrap; box-shadow: var(--schatten); }
.shift-card.shift-full { opacity: 0.7; }
.shift-time { font-weight: 800; min-width: 100px; display: flex; align-items: center; gap: 0.4rem; color: var(--primaer); font-variant-numeric: tabular-nums; }
.shift-info { flex: 1; min-width: 180px; }
.shift-ort { font-weight: 700; }
.shift-notiz, .shift-belegung { font-size: 0.9rem; color: var(--leise); }
.shift-admin-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.6rem; }

/* ---------- Kalender ---------- */
.calendar-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin: 0.4rem 0 0.9rem; flex-wrap: wrap; }
.calendar-nav-title { font-weight: 800; font-size: 1.1rem; text-align: center; flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.calendar-nav-title small { font-weight: 500; color: var(--leise); font-size: 0.85rem; }
.rund-knopf { width: 46px; height: 46px; border-radius: 14px; background: var(--karte); box-shadow: var(--schatten); display: inline-flex; align-items: center; justify-content: center; color: var(--primaer); text-decoration: none; flex-shrink: 0; }
.rund-knopf:hover { color: var(--primaer-dunkel); box-shadow: var(--schatten-hoch); }
.calendar-wrap { overflow-x: auto; margin-bottom: 1.2rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(44px, 1fr)); gap: 4px; }
.calendar-weekday { text-align: center; font-size: 0.8rem; font-weight: 700; color: var(--leise); padding: 0.3rem 0; }
.calendar-cell { min-height: 64px; border-radius: 12px; background: var(--karte); padding: 0.35rem; display: flex; flex-direction: column; gap: 0.2rem; text-decoration: none; color: var(--tinte); box-shadow: var(--schatten); }
.calendar-cell.empty { background: transparent; box-shadow: none; }
.calendar-cell.today { box-shadow: inset 0 0 0 2px var(--primaer); }
.calendar-day-number { font-size: 0.85rem; font-weight: 800; color: var(--leise); }
.calendar-cell.today .calendar-day-number { color: var(--primaer); }
.calendar-shift-chip { font-size: 0.7rem; background: var(--primaer-tint); color: var(--primaer-dunkel); border-radius: 6px; padding: 0.1rem 0.3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.calendar-shift-chip.voll { background: #edf2f2; color: var(--leise); }
.calendar-shift-chip.offen { background: var(--warnung-tint); color: var(--warnung); }
.calendar-more { font-size: 0.7rem; color: var(--leise); }

/* ---------- Kennzahlen ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; margin-bottom: 1rem; }
@media (min-width: 680px) { .stat-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.stat-card { background: var(--karte); border-radius: var(--r-gross); padding: 1rem; box-shadow: var(--schatten); }
.stat-card .stat-icon { width: 38px; height: 38px; border-radius: 12px; background: var(--primaer-tint); color: var(--primaer); display: flex; align-items: center; justify-content: center; margin-bottom: 0.6rem; }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-card .stat-label { color: var(--leise); font-size: 0.9rem; margin-top: 0.15rem; }

.progress-track { width: 100%; height: 10px; border-radius: 999px; background: var(--primaer-tint); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: var(--primaer); transition: width 0.2s ease; }
.progress-label { font-size: 0.82rem; color: var(--leise); margin-top: 0.3rem; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-gross); box-shadow: var(--schatten); background: var(--karte); }
.table { width: 100%; border-collapse: collapse; background: var(--karte); }
.table th, .table td { padding: 0.75rem 0.85rem; border-bottom: 1px solid var(--linie-hell); text-align: left; font-size: 0.95rem; vertical-align: middle; }
.table th { background: var(--primaer-tint-2); color: var(--primaer-dunkel); font-weight: 800; font-size: 0.88rem; }
.table tbody tr:last-child td { border-bottom: none; }
.table tr.row-highlight-warning { background: #fff8f5; }
.table-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.input-schwimmhilfen { width: 3.5rem; text-align: center; }

/* Tabellen werden auf dem Handy zu Karten (jede Zeile ein Block, Spaltenname davor) */
@media (max-width: 679px) {
  .table-karten thead { display: none; }
  .table-karten, .table-karten tbody, .table-karten tr, .table-karten td { display: block; width: 100%; }
  .table-karten tr { padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--linie); }
  .table-karten td { border: none; padding: 0.25rem 0; display: flex; gap: 0.6rem; justify-content: space-between; align-items: center; }
  .table-karten td[data-label]::before { content: attr(data-label); color: var(--leise); font-size: 0.85rem; font-weight: 600; flex-shrink: 0; }
  .table-karten td:first-child { font-weight: 700; }
}

.muted { color: var(--leise); }
.small { font-size: 0.88rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.empty-state { text-align: center; padding: 1.8rem 1rem; color: var(--leise); background: var(--karte); border-radius: var(--r-gross); box-shadow: var(--schatten); margin-bottom: 1rem; }
.empty-state .icon { width: 2.3rem; height: 2.3rem; color: var(--logo); margin-bottom: 0.4rem; }
.empty-state p { margin: 0.2rem 0; }

footer.app-footer { text-align: center; padding: 1.5rem 1rem; color: var(--leise); font-size: 0.85rem; }

/* ---------- Stundenzettel ---------- */
.stundenzettel-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.stundenzettel-monatsnav { display: flex; align-items: center; gap: 0.75rem; }
.stundenzettel-monatsnav strong { min-width: 9rem; text-align: center; }
.stundenzettel-doc { background: var(--karte); border-radius: var(--r-gross); padding: 1.5rem; box-shadow: var(--schatten); overflow-x: auto; }
.stundenzettel-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--linie); }
.stundenzettel-kopf h2 { margin: 0 0 0.25rem; }
.stundenzettel-kopf .muted { margin: 0; }
.stundenzettel-tabelle { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.stundenzettel-tabelle th, .stundenzettel-tabelle td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--linie); text-align: left; }
.stundenzettel-tabelle th { color: var(--leise); font-weight: 700; font-size: 0.85rem; }
.stundenzettel-tabelle td.zahl, .stundenzettel-tabelle th.zahl { text-align: right; }
.stundenzettel-tabelle tfoot td { border-bottom: none; border-top: 2px solid var(--eingabe-rand); font-weight: 800; }
.stundenzettel-unterschrift { margin-top: 3rem; display: flex; gap: 3rem; flex-wrap: wrap; }
.stundenzettel-unterschrift div { flex: 1; min-width: 200px; border-top: 1px solid var(--eingabe-rand); padding-top: 0.4rem; font-size: 0.85rem; color: var(--leise); }

/* ---------- Feedback-Bogen ---------- */
.kriterien-liste, .disziplinen-liste { display: flex; flex-direction: column; gap: 0.5rem; }
.kriterium-pille {
  display: flex; align-items: center; gap: 0.7rem; min-height: 52px;
  padding: 0.6rem 0.9rem; border-radius: 14px; background: var(--karte);
  box-shadow: inset 0 0 0 1.5px var(--linie); cursor: pointer; font-size: 1rem; color: var(--tinte) !important; flex-direction: row !important;
}
.kriterium-pille.gewaehlt, .kriterium-pille:has(input:checked) { box-shadow: inset 0 0 0 2px var(--primaer); background: var(--primaer-tint-2); font-weight: 700; }
.kriterium-pille input[type="checkbox"] { width: 1.4rem; height: 1.4rem; flex-shrink: 0; accent-color: var(--primaer); }
.disziplin-pille {
  width: 100%; display: flex; align-items: center; gap: 0.7rem; min-height: 52px;
  padding: 0.6rem 0.9rem; border-radius: 14px; border: none;
  background: var(--karte); box-shadow: inset 0 0 0 1.5px var(--linie);
  color: var(--tinte); font: inherit; text-align: left; cursor: pointer;
}
.disziplin-pille.erreicht { box-shadow: inset 0 0 0 2px var(--primaer); background: var(--primaer-tint-2); font-weight: 700; }
.disziplin-haken { width: 1.5rem; height: 1.5rem; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--eingabe-rand); display: flex; align-items: center; justify-content: center; }
.disziplin-haken svg { width: 0.8rem; height: 0.8rem; stroke: #fff; opacity: 0; }
.disziplin-pille.erreicht .disziplin-haken { background: var(--primaer); border-color: var(--primaer); }
.disziplin-pille.erreicht .disziplin-haken svg { opacity: 1; }
.pokal-banner { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.85rem; padding: 0.75rem 0.9rem; background: #fff6d9; border-radius: 14px; color: var(--warnung); font-weight: 800; }

.hinweis-box { background: var(--primaer-tint-2); border-radius: var(--r); padding: 0.9rem 1rem; margin-bottom: 1rem; box-shadow: inset 0 0 0 1.5px var(--primaer-tint); }
.hinweis-box h3 { margin: 0 0 0.3rem; color: var(--primaer); }
.hinweis-box p { margin: 0; }

/* Flitzie-Tipp (Hinweis der Chefin) */
.flitzie-tipp { display: flex; align-items: flex-start; gap: 0.8rem; background: var(--karte); border-radius: var(--r-gross); padding: 0.9rem 1rem; margin-bottom: 1rem; box-shadow: var(--schatten); }
.flitzie-tipp[hidden] { display: none; }
.flitzie-tipp .mascot-badge { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.flitzie-tipp > div { flex: 1; min-width: 0; }
.flitzie-tipp strong { display: block; color: var(--primaer); margin-bottom: 0.1rem; }
.flitzie-tipp p { margin: 0; font-size: 0.95rem; }
.flitzie-tipp-schliessen { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--primaer-tint-2); border: none; cursor: pointer; color: var(--leise); display: flex; align-items: center; justify-content: center; }
.flitzie-tipp-bearbeiten { margin: -0.5rem 0 1rem; }
.flitzie-tipp-bearbeiten summary { cursor: pointer; font-size: 0.88rem; color: var(--leise); }
.flitzie-tipp-bearbeiten form { margin-top: 0.5rem; }

.hero-banner { background: var(--logo); color: var(--tinte); border-radius: var(--r-gross); padding: 1.4rem 1.5rem; margin-bottom: 1rem; }
.hero-banner .badge-pill { display: inline-block; background: rgba(255,255,255,0.7); border-radius: 999px; padding: 0.25rem 0.75rem; font-size: 0.82rem; font-weight: 700; margin-bottom: 0.6rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Druck ---------- */
@media print {
  @page { size: A4; margin: 1.5cm; }
  body, html { background: var(--karte) !important; color: #111 !important; }
  header.topbar, .bottomnav, .nav-drawer, .nav-overlay, footer.app-footer, .no-print, .toast { display: none !important; }
  main.content { max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .stundenzettel-doc { box-shadow: none !important; padding: 0 !important; }
  .stundenzettel-kopf { border-bottom: 1px solid #999 !important; }
  .stundenzettel-tabelle th, .stundenzettel-tabelle td { border-bottom: 1px solid #ccc !important; color: #111 !important; }
  .stundenzettel-tabelle tfoot td { border-top: 2px solid #111 !important; }
  .stundenzettel-unterschrift div { border-top: 1px solid #333 !important; color: #444 !important; }
  a { color: #111 !important; text-decoration: none !important; }
}

/* Karten in Karten (z.B. Bearbeiten-Formular in der Kurskarte) und Admin-Kursliste */
.card .card, .klapp .card { box-shadow: inset 0 0 0 1.5px var(--linie); }
.admin-standort .card { margin-bottom: 0.7rem; }
.admin-standort .card:last-child { margin-bottom: 0; }
[id^="kurs-karte-"], [id^="kind-formular-"], [id^="tag-"] { scroll-margin-top: 90px; }
@media (max-width: 679px) {
  a.card.card-link { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.9rem; align-items: center; padding: 0.85rem 1rem; margin-bottom: 0; }
  a.card.card-link .card-icon { grid-row: span 3; margin: 0; }
  a.card.card-link h2 { margin: 0; font-size: 1.05rem; }
  a.card.card-link p { margin: 0; font-size: 0.9rem; color: var(--leise); }
  .grid-3, .grid-2 { gap: 0.6rem; }
}

/* ---------- Dienstplan: Wochen-Kalender ---------- */
.alarm-leiste { background: var(--fehler-tint); color: var(--fehler); border-radius: var(--r); padding: 0.8rem 1rem; margin-bottom: 0.9rem; display: flex; flex-direction: column; gap: 0.15rem; box-shadow: inset 4px 0 0 #d9452b; }
.alarm-leiste span { font-size: 0.9rem; }
.wochen-kalender-wrap { overflow-x: auto; margin: 0 -1rem 0.6rem; padding: 0 1rem 0.4rem; -webkit-overflow-scrolling: touch; }
.wochen-kalender { display: grid; grid-template-columns: repeat(7, minmax(132px, 1fr)); gap: 6px; min-width: 924px; }
@media (min-width: 900px) { .wochen-kalender-wrap { margin: 0 0 0.6rem; padding: 0; } }
.wk-spalte { background: color-mix(in srgb, var(--karte) 55%, transparent); border-radius: var(--r); padding: 6px; display: flex; flex-direction: column; gap: 6px; min-height: 160px; }
.wk-spalte.heute { box-shadow: inset 0 0 0 2px var(--primaer); }
.wk-spalte.vergangen { opacity: 0.65; }
.wk-kopf { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px 4px; }
.wk-kopf span { font-weight: 800; }
.wk-kopf b { font-size: 0.85rem; color: var(--leise); font-weight: 700; }
.wk-spalte.heute .wk-kopf span, .wk-spalte.heute .wk-kopf b { color: var(--primaer); }
.wk-leer { color: var(--leise); text-align: center; padding-top: 1rem; }
.wk-termin { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 10px; background: var(--karte); color: var(--tinte); text-decoration: none; font-size: 0.8rem; line-height: 1.3; box-shadow: inset 4px 0 0 var(--standort-akzent, var(--logo)), var(--schatten); }
.wk-termin:hover { color: var(--tinte); box-shadow: inset 4px 0 0 var(--standort-akzent, var(--logo)), var(--schatten-hoch); }
.wk-termin.mein { background: var(--primaer-tint); }
.wk-termin.fehlt { background: #fde4dc; box-shadow: inset 4px 0 0 #d9452b, 0 0 0 2px #e8735a; }
.wk-zeit { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 0.82rem; }
.wk-name { font-weight: 700; }
.wk-ort, .wk-trainer { color: var(--leise); }
.wk-fehlt { align-self: flex-start; margin-top: 2px; background: #d9452b; color: #fff; font-weight: 800; border-radius: 999px; padding: 1px 8px; font-size: 0.75rem; }

/* ---------- Stunden-Leiste (Anwesenheit/Feedback) ---------- */
.stunden-leiste { display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px 6px; margin: 0.4rem -2px 0; scroll-snap-type: x proximity; scrollbar-width: thin; }
.stunden-chip {
  position: relative; flex: 0 0 auto; scroll-snap-align: center;
  width: 3.4rem; min-height: 3.4rem; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  text-decoration: none; color: var(--leise); background: var(--karte-hell);
  box-shadow: inset 0 0 0 1.5px var(--linie);
}
.stunden-chip b { font-size: 1.1rem; font-weight: 800; color: var(--tinte); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stunden-chip small { font-size: 0.72rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stunden-chip.zukunft { opacity: 0.75; }
.stunden-chip.erledigt { background: var(--primaer-tint); box-shadow: none; }
.stunden-chip.aktuell { background: var(--primaer); box-shadow: 0 0 0 3px var(--logo-hell); opacity: 1; }
.stunden-chip.aktuell b, .stunden-chip.aktuell small { color: #fff; }
.chip-haken { position: absolute; top: -5px; right: -5px; width: 18px; height: 18px; border-radius: 50%; background: var(--primaer); color: #fff; font-style: normal; font-size: 0.7rem; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--karte); }
.stunden-chip.aktuell .chip-haken { background: #fff; color: var(--primaer); }
.chip-halb { position: absolute; top: -4px; right: -4px; width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(90deg, #e8a33d 50%, var(--karte) 50%); box-shadow: 0 0 0 2px #e8a33d; }
.stunden-legende { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0.2rem 0 0; font-size: 0.82rem; color: var(--leise); }
.stunden-legende span { display: inline-flex; align-items: center; gap: 0.4rem; }
.stunden-legende .chip-haken, .stunden-legende .chip-halb { position: static; box-shadow: none; }
.stunden-legende .chip-halb { box-shadow: 0 0 0 2px #e8a33d; width: 12px; height: 12px; }
.schwerpunkt-hinweis { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.8rem; padding: 0.7rem 0.85rem; border-radius: 14px; background: #fff4dc; color: #5c4300; }
.schwerpunkt-hinweis .icon { color: #b07a10; margin-top: 0.1rem; }

/* Telefonnummer der Eltern direkt am Kind */
.kind-telefon { font-size: 0.92rem; font-weight: 600; color: var(--primaer); text-decoration: none; font-variant-numeric: tabular-nums; }
.kind-telefon.leer { color: var(--leise); font-weight: 500; font-size: 0.85rem; }

/* Startseite: "Fuer dich zu erledigen" (Admin) in warmem Bernstein statt Tuerkis */
.karte-aufgabe { background: #fdf3e1; box-shadow: inset 5px 0 0 #e8a33d, var(--schatten); }
.karte-aufgabe h2, .karte-aufgabe h2 .icon { color: #8a5a00; }
.karte-aufgabe .list li { border-color: #f1e2c4; }
.karte-aufgabe a { color: #6b4500; font-weight: 700; }

[hidden] { display: none !important; }

/* Ampel-Zeichen (letzter Gesamteindruck) und Leistungsstand am Kind */
.kind-zeile1 { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.kind-zeile1 > a { font-weight: 800; font-size: 1.05rem; color: var(--tinte); text-decoration: none; }
.eindruck { width: 0.95rem; height: 0.95rem; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2px var(--karte), 0 0 0 3.5px currentColor; }
.eindruck-gruen { background: #2e9d57; color: #2e9d57; }
.eindruck-gelb { background: #e8b53d; color: #e8b53d; }
.eindruck-rot { background: #d9452b; color: #d9452b; }
.info-knopf { border: none; cursor: pointer; }
.info-knopf[aria-expanded="true"] { background: var(--primaer); color: #fff; }
.kind-stand { background: #fff4dc; color: #5c4300; border-radius: 12px; padding: 0.55rem 0.75rem; font-size: 0.92rem; }
.eindruck-legende { display: flex; gap: 0.9rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--leise); margin: 0 0 0.6rem; }
.eindruck-legende span { display: inline-flex; align-items: center; gap: 0.4rem; }

/* Koennen-Pillen am Kind (gruen = kann es) - bewusst klein, damit sie in eine Zeile passen */
.koennen { display: flex; flex-wrap: wrap; gap: 4px; margin: -2px 0 0; }
.koennen-pille { display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; line-height: 1.5; white-space: nowrap; background: var(--karte-hell); color: #8a9a9b; box-shadow: inset 0 0 0 1.2px #d9d3c9; }
.koennen-pille.ja { background: #1d7a4c; color: #fff; box-shadow: none; }

.kurs-slot-mitlaufen { min-height: 34px; padding: 0 0.7rem; border-radius: 10px; border: none; background: transparent; color: var(--leise); font: inherit; font-size: 0.85rem; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.kurs-slot-mitlaufen:hover { color: var(--primaer); }

/* ---------- Admin "Kurse & Kinder": klare Ebenen statt Weiss in Weiss ---------- */
/* Ebene 1: Standort-Gruppe (Sand-Ton als Rahmen) */
.admin-standort > .klapp-inhalt-pad { background: #f4f1ec; }
/* Ebene 2: Kurskarte (weiss, mit Standortfarbe links) */
.admin-standort .card[id^="kurs-karte-"] { background: var(--karte); box-shadow: inset 5px 0 0 var(--standort-akzent, var(--logo)), var(--schatten); padding-left: 1.3rem; }
/* Ebene 3: Bereiche im Kurs - jeder mit eigener, sanfter Farbe im Kopf */
.admin-standort .card .klapp { box-shadow: inset 0 0 0 1.5px var(--linie); margin: 0.6rem 0; }
.admin-standort .card .klapp > summary { border-radius: var(--r-gross); }
.admin-standort .card .klapp[open] > summary { border-radius: var(--r-gross) var(--r-gross) 0 0; }
#kurs-formular > summary { background: #e1f1f0; }
#kurs-formular > summary .klapp-titel b { color: #1a5f5d; }
#kurs-termine > summary { background: #fbefd9; }
#kurs-termine > summary .klapp-titel b { color: #7a5200; }
[id^="kinder-"] > summary { background: #ece6f6; }
[id^="kinder-"] > summary .klapp-titel b { color: #4f3a8f; }
[id^="kind-formular-"] > summary { background: #f6f3fb; }
#kurs-formular, #kurs-termine, [id^="kinder-"] { overflow: hidden; }
#kurs-formular { box-shadow: inset 0 0 0 1.5px #c5e3e1 !important; }
#kurs-termine { box-shadow: inset 0 0 0 1.5px #f0dcb4 !important; }
[id^="kinder-"] { box-shadow: inset 0 0 0 1.5px #d9cfee !important; }
.admin-standort .hinweis-box { margin: 0.6rem 0 0; }

/* Mittlere Bildschirme (Laptop mit kleinerem Fenster): Menue bleibt einzeilig */
@media (min-width: 1100px) and (max-width: 1399px) {
  .mainnav a, .mainnav-mehr > summary { font-size: 0.88rem; padding: 0.42rem 0.55rem; gap: 0.3rem; }
  .brand-name { font-size: 1rem; }
}

/* Von der Startseite angesprungener Dienst kurz hervorheben */
.zeile:target { background: var(--primaer-tint, #e3f3f2); box-shadow: inset 4px 0 0 var(--primaer); scroll-margin-top: 6rem; }
