/* ==========================================================
   HOMEcrew – Design-System
   Warm statt Büro-Software: Bernstein für die Kinder, Petrol
   für die Eltern, ein Off-White-Hintergrund statt kaltem Grau.
   Jede Seite bekommt über body.ctx-kind / body.ctx-eltern ihre
   Leitfarbe - der Rest des CSS bleibt für beide gleich.
   ========================================================== */

:root {
  --bg: #FBF7F1;
  --card: #FFFEFB;
  --text: #2A2622;
  --text-mute: #837A6C;
  --rand: #E8E1D3;
  --radius: 18px;
  --radius-klein: 10px;

  --amber: #E2A33D;
  --amber-hell: #FBEEDA;
  --amber-dunkel: #B9772A;
  --petrol: #2C5F6B;
  --petrol-hell: #E3EEF0;
  --petrol-dunkel: #1C3E46;
  --moos: #5B8C5A;
  --moos-hell: #EAF1E7;
  --terrakotta: #C1622D;
  --terrakotta-hell: #FBEADD;
  --lila: #7C5FA8;
  --lila-hell: #EFEAF6;
  --fehler: #B3382C;
  --fehler-hell: #FBE7E2;

  /* Leitfarbe: Standard = Bernstein (Kinderbereich) */
  --primary: var(--amber);
  --primary-hell: var(--amber-hell);
  --primary-dunkel: var(--amber-dunkel);

  --warnung: var(--terrakotta);
  --warnung-hell: var(--terrakotta-hell);

  --font-display: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Dunkel ist jetzt überall der Standard (Eltern/Admin: Pflaume/Lila,
   Paige: tiefes Meeresblau/Rosa, Jason: sein eigenes Dark-Motorsport-
   Theme). ".hell" ist die bewusst zugeschaltete, gespeicherte Ausnahme
   pro Person (siehe hc_dunkelmodus_an()/hc_dunkelmodus_umschalten() -
   "an" bedeutet jetzt hell statt dunkel). Alle Statusfarben (Moos/
   Terrakotta/Fehler) bleiben für alle unverändert - sie tragen
   Bedeutung und dürfen sich nicht mit der Themenfarbe vermischen. */
body.ctx-eltern {
  --bg: #241C2B;
  --card: #332940;
  --text: #EDE8E8;
  --text-mute: #B0A3B8;
  --rand: #4A3D5A;
  --primary: #9B7FC7;
  --primary-hell: #3D3250;
  --primary-dunkel: #6B4F96;
}
body.ctx-eltern.hell {
  --bg: #F1E9DD;
  --card: #FAF4EB;
  --text: #2A2622;
  --text-mute: #837A6C;
  --rand: #E8E1D3;
  --primary: var(--lila);
  --primary-hell: var(--lila-hell);
  --primary-dunkel: #5A4380;
}

/* Admin: eigenes Schwarz/Grün-Terminal-Theme, bewusst getrennt von
   Eltern - "wie in Matrix". Rein zum Spaß, da nur selten genutzt. */
body.ctx-admin {
  --bg: #0A0D0A;
  --card: #0F1810;
  --text: #4DFF88;
  --text-mute: #2E8B4A;
  --rand: #1A3D22;
  --primary: #39FF14;
  --primary-hell: #0F2A0F;
  --primary-dunkel: #1F7A0F;
}

body.ctx-kind-jason {
  --bg: #14191B;
  --card: #1E2528;
  --text: #EDEAE2;
  --text-mute: #9BA3A2;
  --rand: #323B3E;
  --primary: #D97B3B;
  --primary-hell: #3A2A1C;
  --primary-dunkel: #A85320;
}

body.ctx-kind-paige {
  /* Meeresblau ist der Hintergrund (Seite und Karten), Rosa ist die
     Hauptfarbe für alles, was darüber liegt: Buttons, aktive
     Navigation, Icon-Hintergründe, Fortschrittsbalken. Meeresblau
     kommt als --primary-dunkel zusätzlich im Verlauf der Begrüßungs-
     und Termin-Banner wieder vor, aber nicht mehr als Hauptakzent. */
  --bg: #10233D;
  --card: #18304F;
  --text: #EAF0EF;
  --text-mute: #93A7C2;
  --rand: #2B4668;
  --primary: #D97FA0;
  --primary-hell: #3D2A38;
  --primary-dunkel: #2F6AA8;
}
body.ctx-kind-paige.hell {
  --bg: #F6F0FB;
  --card: #FDFAFE;
  --text: #2D2733;
  --text-mute: #8A7F93;
  --rand: #E7DCEF;
  --primary: #9B7FC7;
  --primary-hell: #F0E9FA;
  --primary-dunkel: #6B4F96;
}

* { box-sizing: border-box; }

html { width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  width: 100%;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  padding-bottom: 84px; /* Platz für die Reiterleiste */
}

a { color: var(--primary); text-decoration: none; }

h1, h2, h3, .btn, .kopfzeile-titel, .begruessung, .fortschritt-zahl,
.tab-label, .enav, .login-eintrag, .stundenplan-kuerzel, .tagesplan-fach {
  font-family: var(--font-display);
}

.kopfzeile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 18px;
  background: var(--card);
  border-bottom: 1px solid var(--rand);
  position: sticky;
  top: 0;
  z-index: 5;
}
.kopfzeile-titel { font-size: 1.2rem; font-weight: 700; }
.zurueck-leiste {
  display: flex; align-items: center; gap: 6px; padding: 10px 18px;
  background: var(--card); border-bottom: 1px solid var(--rand);
  font-size: 0.9rem; font-weight: 600; color: var(--primary); text-decoration: none;
  margin-bottom: 12px;
}
.zurueck-leiste:active { background: var(--bg); }
.kopfzeile-zurueck {
  font-size: 1.3rem; text-decoration: none; color: var(--text);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; flex-shrink: 0; margin-left: -6px;
}
.kopfzeile-zurueck:active { background: var(--bg); }
.kopfzeile-logout { font-size: 0.9rem; color: var(--text-mute); }
.kopf-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary-hell); }

main { padding: 16px; max-width: 640px; margin: 0 auto; }

/* Jason/Paige nebeneinander auf breiteren Bildschirmen statt untereinander */
.kinder-nebeneinander { display: contents; }
@media (min-width: 760px) {
  .kinder-nebeneinander { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
}

/* Kombinierter Mehr-Linien-Graph (Training + Gesundheit zusammen) */
.kombi-legende { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.kombi-legende-zeile { display: flex; align-items: center; gap: 7px; font-size: 0.8rem; cursor: pointer; }
.kombi-farbpunkt { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
}

.card h2 { margin: 0 0 12px 0; font-size: 1.08rem; font-weight: 700; }
.card h3 { margin: 16px 0 8px 0; font-size: 0.85rem; color: var(--text-mute); font-weight: 700; text-transform: none; }

.begruessung { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.begruessung-unter { color: var(--text-mute); margin-bottom: 16px; }

.fortschritt-zahl { font-size: 2.3rem; font-weight: 700; color: var(--primary); }
.fortschritt-ziel { color: var(--text-mute); font-size: 1rem; font-family: var(--font-body); }

.balken-aussen {
  background: var(--amber-hell);
  border-radius: 999px;
  height: 10px;
  margin: 10px 0 4px 0;
  overflow: hidden;
}
body.ctx-eltern .balken-aussen { background: var(--petrol-hell); }
.balken-innen {
  background: var(--primary);
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s;
}

/* Fortschrittsring für "Heute" bei den Kindern */
.ring-wrapper { display: flex; align-items: center; gap: 18px; }
.ring-svg { flex-shrink: 0; }
.ring-hintergrund { fill: none; stroke: var(--amber-hell); stroke-width: 10; }
.ring-fortschritt { fill: none; stroke: var(--primary); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 0.4s; }
.ring-text { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; fill: var(--text); }

.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}
.badge-ok { background: var(--moos-hell); color: var(--moos); }
.badge-offen { background: var(--warnung-hell); color: var(--warnung); }
.badge-entschuldigt { background: #F1EEE6; color: var(--text-mute); }

.aufgabe {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--rand);
}
.aufgabe:last-child { border-bottom: none; }
.aufgabe-icon { font-size: 1.4rem; width: 32px; text-align: center; }
.aufgabe-name { flex: 1; font-weight: 600; }
.aufgabe-wert { color: var(--text-mute); font-size: 0.85rem; }
/* "Mehr" als gruppiertes Kachel-Raster statt einer langen, flachen Liste */
.mehr-gruppe-titel { font-size: 0.78rem; font-weight: 700; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.03em; margin: 18px 4px 8px; }
.mehr-gruppe-titel:first-child { margin-top: 4px; }
.mehr-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mehr-kachel {
  display: flex; align-items: center; gap: 10px; padding: 13px; min-height: 64px;
  background: var(--card); border: 1px solid var(--rand); border-radius: var(--radius-klein);
  color: var(--text); text-decoration: none;
}
.mehr-kachel .mehr-icon { width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; color: #fff; }
.mehr-kachel .mehr-name { flex: 1; font-weight: 700; font-size: 0.85rem; min-width: 0; }
.mehr-kachel .mehr-unter { font-size: 0.7rem; color: var(--text-mute); font-weight: 400; margin-top: 1px; }

.mehr-zeile {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 4px; border-bottom: 1px solid var(--rand);
  color: var(--text);
}
.mehr-zeile:last-child { border-bottom: none; }
.mehr-icon {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.15rem; color: #fff;
}
.mehr-name { flex: 1; font-weight: 600; }
.mehr-pfeil { color: var(--text-mute); font-size: 1.1rem; }

/* Nachrichten: Chat + Pinnwand */
.nachricht { padding: 10px 13px; border-radius: var(--radius-klein); margin-bottom: 10px; max-width: 85%; }
.nachricht-eigene { background: var(--primary-hell); margin-left: auto; }
.nachricht-fremd { background: var(--card); border: 1px solid var(--rand); }
.nachricht-pinnwand { border-left: 3px solid var(--amber); max-width: 100%; }
.nachricht-absender { font-weight: 700; font-size: 0.8rem; margin-bottom: 2px; }
.nachricht-text { font-size: 0.92rem; white-space: pre-wrap; word-break: break-word; }
.nachricht-meta { font-size: 0.68rem; color: var(--text-mute); margin-top: 5px; }

/* Tagebuch */
.tagebuch-eintrag { padding: 12px 0; border-bottom: 1px solid var(--rand); }
.tagebuch-eintrag:last-child { border-bottom: none; }
.tagebuch-datum { font-size: 0.74rem; color: var(--text-mute); font-weight: 700; margin-bottom: 4px; }
.tagebuch-text { white-space: pre-wrap; word-break: break-word; font-size: 0.92rem; }

.aufgabe-info {
  color: var(--text-mute);
  border: 1px solid var(--rand);
  border-radius: 999px;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  cursor: pointer;
  background: none;
}

.btn {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { background: #DCD5C7; color: var(--text-mute); cursor: default; }
.btn-klein { padding: 8px 14px; font-size: 0.85rem; }
.btn-sekundaer { background: var(--bg); color: var(--text); border: 1px solid var(--rand); }
.btn-gefahr { background: var(--fehler); }
.btn-erledigt { background: var(--moos-hell); color: var(--moos); }

form { margin: 0; }

.meldung {
  padding: 12px 18px;
  margin: 12px 16px 0 16px;
  border-radius: var(--radius-klein);
  font-size: 0.9rem;
  font-weight: 600;
}
.meldung-ok { background: var(--moos-hell); color: var(--moos); }
.meldung-fehler { background: var(--fehler-hell); color: var(--fehler); }

/* Willkommens-Überblick direkt nach dem Login - einmal pro Sitzung,
   freundlicher Gruß + was heute noch offen ist, ohne Druck. */
.willkommen-hintergrund {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.willkommen-karte {
  background: var(--card); border-radius: var(--radius); padding: 24px 22px;
  max-width: 380px; width: 100%; max-height: 80vh; overflow-y: auto;
}
.willkommen-karte h2 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 4px; }
.willkommen-karte .willkommen-unter { color: var(--text-mute); font-size: 0.85rem; margin-bottom: 16px; }
.willkommen-offen-zeile { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 0.88rem; }

/* Reiterleiste unten (Kinder) */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--rand);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)) 4px;
  z-index: 10;
}
.tab, .tab-bald {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 2px;
  border-radius: var(--radius-klein);
  color: var(--text-mute);
  font-size: 0.72rem;
  font-weight: 600;
  transition: transform 0.12s ease;
}
.tab:active { transform: scale(0.94); }
.tab-icon { font-size: 1.3rem; }
.tab-aktiv { color: var(--primary); background: var(--primary-hell); }
.tab-bald { opacity: 0.4; }

/* Unterreiter-Pillen (z.B. Haushalt/Schule, Jason/Paige) */
.enav {
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-mute);
  background: var(--bg);
}
.enav-aktiv { color: #fff; background: var(--primary); }

.login-box {
  max-width: 380px;
  margin: 60px auto;
  background: var(--card);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 30px;
}
.login-box h1 { text-align: center; font-size: 1.6rem; margin-bottom: 6px; font-family: var(--font-display); }
.login-box p.unter { text-align: center; color: var(--text-mute); margin-top: 0; margin-bottom: 22px; }
.login-liste { display: flex; flex-direction: column; gap: 10px; }
.login-eintrag {
  display: flex; align-items: center; gap: 10px;
  padding: 15px; border-radius: var(--radius-klein); border: 1px solid var(--rand);
  background: var(--bg); font-weight: 700; font-size: 1.05rem; color: var(--text);
}
input[type=password], input[type=text], input[type=number], select, textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-klein);
  border: 1px solid var(--rand);
  font-size: 1rem;
  margin-top: 6px;
  margin-bottom: 12px;
  font-family: var(--font-body);
  background: var(--card);
  color: var(--text);
}
label { font-size: 0.88rem; font-weight: 600; color: var(--text-mute); }

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table th, table td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--rand); }
table tr:nth-child(even) td { background: rgba(0,0,0,0.012); }

.tag-tabelle-woche { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 8px; }
.tag-zelle { text-align: center; font-size: 0.72rem; padding: 6px 2px; border-radius: var(--radius-klein); background: var(--bg); }
.tag-zelle-ok { background: var(--moos-hell); color: var(--moos); font-weight: 700; }
.tag-zelle-offen { background: var(--warnung-hell); color: var(--warnung); }

details.info-detail { margin-top: 6px; }
details.info-detail summary { cursor: pointer; color: var(--text-mute); font-size: 0.85rem; }

/* Stundenplan-Raster: sieht aus wie ein echter, ausgedruckter Stundenplan */
.stundenplan-tabelle { width: 100%; border-collapse: collapse; }
.stundenplan-tabelle th {
  font-size: 0.7rem; color: var(--text-mute); font-weight: 700;
  padding: 8px 4px; border-bottom: 2px solid var(--rand); text-align: center; white-space: nowrap;
}
.stundenplan-tabelle td {
  border-bottom: 1px solid var(--rand); padding: 10px 4px; text-align: center;
  vertical-align: middle; min-width: 56px;
}
.stundenplan-tabelle th.stundenplan-zeit, .stundenplan-tabelle td.stundenplan-zeit {
  text-align: left; padding-left: 2px; white-space: nowrap; min-width: 64px;
}
.stundenplan-zeit { font-size: 0.68rem; color: var(--text-mute); }
.stundenplan-zelle { display: flex; align-items: center; justify-content: center; gap: 4px; }
.stundenplan-kuerzel { font-weight: 700; font-size: 0.92rem; }
.stundenplan-wp { font-size: 0.5rem; font-weight: 700; background: var(--primary-hell); color: var(--primary); border-radius: 4px; padding: 0 3px; line-height: 1.4; }
.stundenplan-heute-spalte { background: var(--primary-hell); }
.stundenplan-leer { color: var(--rand); }

.legende-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px 10px; margin-top: 6px; }
.legende-zeile { font-size: 0.8rem; padding: 2px 0; }
.legende-kuerzel { font-weight: 700; display: inline-block; min-width: 44px; }

.tagesplan-zeile { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--rand); }
.tagesplan-zeile:last-child { border-bottom: none; }
.tagesplan-zeit { width: 78px; font-size: 0.78rem; color: var(--text-mute); flex-shrink: 0; }
.tagesplan-fach { font-weight: 700; font-size: 0.95rem; }
.tagesplan-vorbei { opacity: 0.4; }
.tagesplan-jetzt { background: var(--primary-hell); border-radius: var(--radius-klein); margin: 0 -6px; padding-left: 10px; padding-right: 10px; }

/* "Versteckt, bis gebraucht": Formulare fürs Hinzufügen/Ändern sind
   standardmäßig eingeklappt und öffnen sich erst auf Antippen. */
.aufklapp { margin-bottom: 14px; }
.aufklapp summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font-display);
  user-select: none;
}
.aufklapp summary::-webkit-details-marker { display: none; }
.aufklapp summary::marker { content: ""; }
.aufklapp[open] summary { background: var(--bg); color: var(--text); border: 1px solid var(--rand); }
.aufklapp-inhalt {
  margin-top: 12px; padding: 16px;
  background: var(--card); border: 1px solid var(--rand); border-radius: var(--radius-klein);
}
.aufklapp-reihe { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.aufklapp-reihe .aufklapp { margin-bottom: 0; flex: 1 1 auto; }
.aufklapp-klein summary { padding: 8px 14px; font-size: 0.82rem; }

/* Kalender: Tag-/Wochen-/Monatsraster, identisch für Kinder und Eltern */
.kalender-umschalter { display: flex; gap: 6px; margin-bottom: 12px; }
.kalender-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.kalender-nav-pfeil { font-size: 1.3rem; font-weight: 700; padding: 4px 12px; color: var(--text-mute); }
.kalender-nav-mitte { font-weight: 700; font-family: var(--font-display); font-size: 1.02rem; }
.kalender-heute-link { font-size: 0.78rem; color: var(--primary); font-weight: 700; }

.kalender-monat-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.kalender-wochentag-kopf { text-align: center; font-size: 0.64rem; color: var(--text-mute); font-weight: 700; padding-bottom: 4px; }
.kalender-tag-kachel {
  background: var(--bg); border-radius: var(--radius-klein); padding: 4px 3px; min-height: 50px;
  display: block; color: var(--text); font-size: 0.7rem; text-align: left;
}
.kalender-tag-kachel.ausserhalb { opacity: 0.32; }
.kalender-tag-kachel.heute { outline: 2px solid var(--primary); background: var(--primary-hell); }
.kalender-tag-kachel.ferien { background: #F2EDE3; }
.kalender-tag-kachel.feiertag { background: #F2EDE3; box-shadow: inset 0 -3px 0 var(--terrakotta); }
.kalender-wochen-tag.ferien, .kalender-wochen-tag.feiertag { background: #F2EDE3; }
.kalender-tag-nummer { font-weight: 700; font-size: 0.76rem; }
.kalender-punkte { margin-top: 3px; line-height: 1; }
.kalender-punkt { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); display: inline-block; margin: 0 2px 2px 0; }

.kalender-wochen-tag { display: block; background: var(--bg); border-radius: var(--radius-klein); padding: 10px 12px; margin-bottom: 8px; color: var(--text); }
.kalender-wochen-tag.heute { outline: 2px solid var(--primary); background: var(--primary-hell); }
.kalender-wochen-tag-kopf { font-weight: 700; font-family: var(--font-display); font-size: 0.9rem; margin-bottom: 2px; }
.kalender-wochen-termin { font-size: 0.78rem; color: var(--text-mute); }

.kalender-termin-zeile { display: flex; align-items: flex-start; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--rand); }
.kalender-termin-zeile:last-child { border-bottom: none; }
.kalender-termin-icon {
  font-size: 1.1rem; width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.kalender-wochen-termin .kalender-punkt { margin-bottom: -1px; }
.kalender-termin-titel { font-weight: 700; }
.kalender-termin-info { font-size: 0.82rem; color: var(--text-mute); margin-top: 2px; }

/* Schnellzugriff: runde Icon-Kacheln für die häufigsten Aktionen */
.schnellzugriff { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px 2px; margin-bottom: 4px; }
.schnellzugriff-item { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; width: 66px; color: var(--text); }
.schnellzugriff-icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 1.55rem;
  transition: transform 0.12s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.schnellzugriff-item:active .schnellzugriff-icon { transform: scale(0.92); }
.schnellzugriff-label { font-size: 0.65rem; text-align: center; color: var(--text-mute); font-weight: 700; line-height: 1.2; }

/* "Auf einen Blick": kompakte Überblickszeilen statt erst in Tabs wechseln zu müssen */
.ueberblick-zeile { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--rand); }
.ueberblick-zeile:last-child { border-bottom: none; }
.ueberblick-icon { font-size: 1.25rem; width: 28px; text-align: center; flex-shrink: 0; }
.ueberblick-zahl { font-weight: 800; font-family: var(--font-display); font-size: 1.05rem; }
.ueberblick-text { flex: 1; font-size: 0.88rem; }
.ueberblick-text strong { font-family: var(--font-display); }

/* Einheitliches Status-Symbol: ✓ / ! / – */
.status-punkt {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 800; color: #fff;
}
.status-punkt-ok { background: var(--moos); }
.status-punkt-warnung { background: var(--terrakotta); }
.status-punkt-neutral { background: #C9C2B3; }

/* Begrüßungskarte: Verlauf statt Foto (wir haben keine echten Familienfotos),
   dieselbe Leitfarbe wie die Seite, nur dunkler abgetönt. */
.begruessung-karte {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dunkel) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px 20px 20px 20px;
  margin-bottom: 14px;
}
.begruessung-karte::after {
  content: ''; position: absolute; right: -36px; top: -36px;
  width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,0.08);
}
.begruessung-karte::before {
  content: ''; position: absolute; right: 30px; bottom: -50px;
  width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,0.06);
}
.begruessung-karte .begruessung { color: #fff; font-size: 1.35rem; position: relative; }
.begruessung-karte .begruessung-unter { color: rgba(255,255,255,0.88); position: relative; margin-bottom: 0; }

/* Begrüßungsbilder (von euch per KI erstellt): ersetzen den reinen
   Verlauf durch ein Foto/Illustration, mit dunklem Verlauf darüber,
   damit die weiße Schrift immer lesbar bleibt - unabhängig davon,
   wie hell das jeweilige Bild ist. */
.begruessung-karte-jason, .begruessung-karte-paige, .begruessung-karte-eltern {
  background-size: cover;
  background-position: center;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.begruessung-karte-jason {
  background-image: linear-gradient(135deg, rgba(10,12,13,0.30), rgba(10,12,13,0.80)), url('images/jason-banner.jpg');
}
.begruessung-karte-paige {
  background-image: linear-gradient(135deg, rgba(45,25,55,0.18), rgba(45,25,55,0.50)), url('images/paige-banner.jpg');
}
.begruessung-karte-eltern {
  background-image: linear-gradient(135deg, rgba(10,15,20,0.28), rgba(10,15,20,0.62)), url('images/eltern-banner.jpg');
}
.begruessung-karte-jason::before, .begruessung-karte-jason::after,
.begruessung-karte-paige::before, .begruessung-karte-paige::after,
.begruessung-karte-eltern::before, .begruessung-karte-eltern::after { display: none; }

/* Stat-Kacheln: große, farbige Kennzahlen auf einen Blick */
.stat-reihe { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; }
.stat-kachel { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; color: inherit; }
.stat-kreis {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; color: #fff;
}
.stat-zahl { font-size: 1.15rem; font-weight: 800; font-family: var(--font-display); color: var(--text); line-height: 1; }
.stat-label { font-size: 0.64rem; color: var(--text-mute); font-weight: 700; text-align: center; line-height: 1.15; }

/* Nächster-Termin-Karte mit Farbverlauf-"Bild" oben */
.termin-karte { border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; background: var(--card); border: 1px solid var(--rand); }
.termin-karte-banner {
  height: 76px; display: flex; align-items: center; justify-content: center; font-size: 2.1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dunkel) 100%);
}
.termin-karte-inhalt { padding: 12px 16px 14px 16px; }
.termin-karte-label { font-size: 0.68rem; color: var(--text-mute); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.termin-karte-titel { font-weight: 700; font-size: 1.02rem; margin-top: 2px; }
.termin-karte-zeit { color: var(--text-mute); font-size: 0.85rem; margin-top: 2px; }

/* Glocke mit Benachrichtigungszahl im Kopfbereich */
.glocke { position: relative; font-size: 1.25rem; line-height: 1; text-decoration: none; display: inline-block; cursor: pointer; }
.glocke-dropdown { position: relative; }
.glocke-dropdown summary { list-style: none; }
.glocke-dropdown summary::-webkit-details-marker { display: none; }
.glocke-dropdown summary::marker { content: ""; }
.glocke-dropdown[open] summary { opacity: 0.6; }
.glocke-liste {
  position: absolute; top: calc(100% + 10px); right: -8px; z-index: 20;
  background: var(--card); border: 1px solid var(--rand); border-radius: var(--radius-klein);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12); min-width: 230px; max-width: 80vw;
  padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.glocke-posten {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 0.88rem;
}
.glocke-posten:active { background: var(--bg); }
.glocke-zahl {
  position: absolute; top: -7px; right: -9px;
  background: var(--fehler); color: #fff; font-size: 0.6rem; font-weight: 800;
  border-radius: 999px; min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
