/* style.css - schlichtes, übersichtliches Layout. Rein lokal: keine Fremdschriften, keine CDNs. */
:root {
  --blau: #1f4e79;
  --blau-hell: #e8f0f8;
  --text: #1c2530;
  --grau: #5b6672;
  --rand: #d3dae1;
  --bg: #f4f6f8;
  --gruen: #2e7d32;
  --gelb: #b26a00;
  --rot: #c62828;
  --radius: 8px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--blau); }
h1 { font-size: 1.5rem; margin: 0 0 .5rem; }
h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
code, pre { font-family: ui-monospace, Consolas, monospace; background: #eef1f4; border-radius: 4px; }
code { padding: 1px 5px; }
pre { padding: 10px 12px; overflow-x: auto; }
hr { border: 0; border-top: 1px solid var(--rand); margin: 20px 0; }

/* Kopf */
.kopf { background: var(--blau); color: #fff; position: relative; z-index: 30; }
.kopf__logo { color: #fff; font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.kopf__nav a { color: #fff; text-decoration: none; padding: 6px 12px; border-radius: var(--radius); }
.kopf__nav a:hover, .kopf__nav a.aktiv { background: rgba(255,255,255,.2); }

/* Inhalt */
.app { max-width: 1100px; margin: 0 auto; padding: 20px 16px 40px; }
.app__top { margin-bottom: 8px; }
.hinweis { color: var(--grau); }
.panel { background: #fff; border: 1px solid var(--rand); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.panel--schmal { max-width: 480px; margin: 30px auto; }
.panel--tabelle { padding: 0; overflow-x: auto; }
.panel--gefahr { border-color: var(--rot); }
.fuss { max-width: 1100px; margin: 0 auto; padding: 0 16px 30px; color: var(--grau); font-size: .85rem; }

/* Meldungen */
.meldung { padding: 10px 14px; border-radius: var(--radius); margin: 0 0 14px; border: 1px solid; }
.meldung--ok { background: #e8f5e9; border-color: #a5d6a7; color: #1b5e20; }
.meldung--fehler { background: #fdecea; border-color: #f1a9a4; color: #8e1b14; }

/* Formulare */
label { display: block; font-weight: 600; margin: 12px 0 4px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 6px 14px 6px 0; }
input[type=text], input[type=password], input[type=search], input[type=date], input[type=time], input[type=file], select {
  width: 100%; padding: 9px 10px; border: 1px solid var(--rand); border-radius: 6px; font: inherit; background: #fff;
}
input:focus, select:focus, .btn:focus-visible { outline: 3px solid #8ab4f8; outline-offset: 1px; }
.filterleiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 14px; }
.filterleiste label { margin: 0; }
.filterleiste input, .filterleiste select { width: auto; }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 18px; border: 1px solid var(--blau); background: var(--blau); color: #fff;
  border-radius: 6px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.1); }
.btn--klein { padding: 6px 12px; font-size: .9rem; }
.btn--gross { padding: 14px 24px; font-size: 1.1rem; }
.btn--hell { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.6); }
.btn--hell-rahmen { background: #fff; color: var(--blau); }
.btn--anwesend { background: var(--gruen); border-color: var(--gruen); }
.btn--abgeholt { background: var(--blau); }
.btn--krank { background: var(--gelb); border-color: var(--gelb); }
.btn--gefahr { background: var(--rot); border-color: var(--rot); }

/* Tabellen */
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--rand); vertical-align: middle; }
.tabelle th { background: var(--blau-hell); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle input[type=time] { width: 7.2em; padding: 6px; }
.zeit { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.aktionen { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }

/* Status */
.zaehler { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.zaehler__box { background: #fff; border: 1px solid var(--rand); border-left-width: 6px; border-radius: var(--radius); padding: 8px 14px; }
.zaehler__box b { font-size: 1.3rem; margin-right: 4px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; border: 1px solid; }
.status--erwartet { border-color: #8a96a3; color: #44505c; }
.status--anwesend { border-color: var(--gruen); color: var(--gruen); }
.status--abgeholt { border-color: var(--blau); color: var(--blau); }
.status--krank { border-color: var(--gelb); color: var(--gelb); }
.status-zeile--abgeholt td, .status-zeile--krank td { color: var(--grau); }
.status-zeile--anwesend td:first-child { box-shadow: inset 4px 0 0 var(--gruen); }

.beispiel { margin: 8px 0 12px; }

@media (max-width: 640px) {
  .btn--klein { padding: 9px 12px; }   /* größere Touch-Flächen */
  .tabelle th, .tabelle td { padding: 8px; }
}
@media print {
  .kopf, .filterleiste, .aktionen, .fuss { display: none; }
  body { background: #fff; }
}

/* ===== Ganztag-Oberfläche: Karten, Chips, Raster ===== */
.app--schmal { max-width: 760px; }
.app__top--zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; }
.app__top--zeile .filterleiste { margin: 0; }
.icon { vertical-align: -3px; }

/* Filter-Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.chip { display: inline-block; padding: 7px 16px; border-radius: 999px; background: #e3e8ee; color: var(--text); text-decoration: none; font-weight: 500; }
.chip:hover { background: #d4dbe3; }
.chip--aktiv, .chip--aktiv:hover { background: var(--blau); color: #fff; }

/* Karten */
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.karte { background: #fff; border: 1px solid var(--rand); border-radius: 12px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); display: flex; flex-direction: column; gap: 4px; }
.karte p { margin: 0; }
.karte__kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.karte__name { display: flex; flex-direction: column; font-size: 1.1rem; font-weight: 700; line-height: 1.25; color: var(--text); text-decoration: none; }
.karte__name:hover { text-decoration: underline; }
.karte__zeit { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--blau); }
.karte__klasse { color: var(--grau); font-size: .9rem; }
.karte__zeiten { color: var(--grau); font-size: .85rem; min-height: 1.2em; }
.karte__aktionen { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.karte--krank { background: #fdecee; border-color: #f0b9c0; }
.karte--anwesend { background: #eaf7ec; border-color: #b4dcb9; }
.karte--abgeholt { background: #f6f8fa; }

/* Statusfarben wie Etiketten (gefüllt) */
.badge { border: 0; padding: 3px 12px; }
.badge.status--erwartet { background: #cfe0f3; color: #1b4a7a; }
.badge.status--anwesend { background: #d6efd8; color: #1b5e20; }
.badge.status--abgeholt { background: #e0e4e9; color: #44505c; }
.badge.status--krank { background: #f9d3d3; color: #a31515; }
.badge--warnung { background: #ffe9b8; color: #7a4a00; margin-left: 4px; }

.btn--umriss { background: #fff; color: var(--blau); border: 2px solid var(--blau); }
.btn--umriss:hover { background: var(--blau-hell); filter: none; }

/* Zeiten: verfügbare Zeiten als Chips mit × */
.zeitchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.zeitchip { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 6px 4px 14px; background: #e3e8ee; border-radius: 999px; }
.zeitchip button { border: 0; background: transparent; color: var(--grau); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 2px 8px; border-radius: 999px; }
.zeitchip button:hover { background: #cdd5de; color: var(--text); }

/* Raster mit Radio-Buttons */
.tabelle--raster th, .tabelle--raster td { text-align: center; }
.tabelle--raster th[scope=row] { text-align: left; white-space: nowrap; background: #fafbfc; }
.tabelle--raster input[type=radio] { width: 20px; height: 20px; accent-color: var(--blau); }
.tabelle--kompakt td, .tabelle--kompakt th { text-align: center; }
.tabelle--kompakt td.heute { background: var(--blau-hell); font-weight: 700; }
.aktionsleiste { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }

/* Detailseite */
.daten { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0; }
.daten dt { font-weight: 700; }
.daten dd { margin: 0; }
.zeitraum { display: grid; gap: 10px; margin: 10px 0; }
.zeitraum > div { border: 1px solid var(--rand); border-radius: 8px; padding: 10px 14px; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blau); }

/* Datumswahl und Räume */
.datumwahl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; }
.datumwahl input[type=date], .datumwahl select { width: auto; }
.karte__raum { font-weight: 600; }
.karte__raum small { font-weight: 400; color: var(--grau); }
.raumform { display: flex; gap: 6px; align-items: center; margin: 6px 0 0; }
.raumform select { width: auto; flex: 1; min-width: 0; padding: 6px 8px; }
.meldung--info { background: #e8f0f8; border-color: #b9cfe6; color: #1b4a7a; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ===== Kacheln mit festem Format und vier Buttons ===== */
[hidden] { display: none !important; }
.chipzeile { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.chipzeile .chips { margin: 0; }
.karten { grid-template-columns: repeat(auto-fill, 300px); justify-content: start; }
.karte { width: 300px; height: 176px; overflow: hidden; gap: 0; padding: 12px 14px; box-shadow: none; }
.karte__kopf { align-items: center; min-height: 28px; }
.karte__name { display: block; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.karte__zeit { min-width: 56px; justify-content: flex-end; }
.karte__meta { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin: 2px 0 4px; overflow: hidden; white-space: nowrap; }
.karte__klasse { font-weight: 600; color: var(--grau); }
.karte__info { flex: 1; min-height: 0; overflow: hidden; font-size: .85rem; color: var(--grau); }
.karte__info p { margin: 0 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.karte__info .karte__raum { color: var(--text); font-weight: 600; font-size: .85rem; }
.kbuttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 0; }
.kbuttons .btn { width: 100%; min-height: 38px; padding: 8px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.kbuttons .btn:disabled, .btn:disabled { opacity: .4; cursor: not-allowed; filter: none; }
.btn--raumgesetzt { background: var(--blau-hell); }
.btn--abgemeldet { color: var(--gelb); border-color: var(--gelb); }
.btn--aktiv { background: var(--blau); color: #fff; }
@media (max-width: 340px) { .karten { grid-template-columns: 1fr; } .karte { width: 100%; } }

/* Mehrfachauswahl: Haken nur im Auswahlmodus sichtbar */
.karte__check { display: none; align-items: center; padding: 2px 8px 0 0; }
body.auswahl-aktiv .karte__check { display: flex; }
.karte__check input { width: 24px; height: 24px; }
.auswahlleiste { position: sticky; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #fff; border-top: 2px solid var(--blau); padding: 10px 16px; margin: 16px -16px -40px; }
.auswahlleiste span { font-weight: 700; margin-right: auto; }

/* Popup für die Raumwahl */
.dialog { border: 0; border-radius: 14px; padding: 20px; width: min(380px, calc(100% - 32px)); box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.dialog::backdrop { background: rgba(20, 30, 40, .45); }
.dialog h2 { margin-top: 0; }
.raumwahl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.raumwahl .btn { width: 100%; min-height: 44px; }
.raumwahl--aktuell { background: var(--blau) !important; color: #fff !important; }

/* Suche / Sortierung / Nicht angemeldet */
.werkzeuge { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; }
.werkzeuge input[type=search] { width: 220px; max-width: 100%; }
.werkzeuge select { width: auto; }
.badge.status--nichtangemeldet { background: #e3e8ee; color: #44505c; }

/* Zeitleiste (Detailseite) */
.zeitleiste { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--rand); }
.zeitleiste li { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0 8px 14px; border-bottom: 1px solid var(--rand); }
.zeitleiste li:last-child { border-bottom: 0; }
.zeitleiste__zeit { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 48px; color: var(--blau); }
.zeitleiste__text { flex: 1; }
.zeitleiste__text small { color: var(--grau); }
.zeitleiste__x { margin: 0; }
.zeitleiste__x button { border: 0; background: transparent; color: var(--grau); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 2px 10px; border-radius: 8px; }
.zeitleiste__x button:hover { background: #f9d3d3; color: #a31515; }

/* ===== Layout: genau drei Kacheln nebeneinander (Inhaltsbreite voll genutzt) ===== */
.karten { grid-template-columns: repeat(3, minmax(0, 1fr)); justify-content: stretch; }
.karte { width: auto; }
@media (max-width: 860px) { .karten { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .karten { grid-template-columns: minmax(0, 1fr); } }
.karte__meta { justify-content: space-between; }
.karte__labels { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; margin-left: auto; }
.badge--warnung { margin-left: 0; }
.karte__bem { text-decoration: none; font-size: 1.05rem; color: var(--blau); }

/* ===== Bedienleisten: alle Felder/Buttons gleich hoch (42 px), keine Dropdowns ===== */
.werkzeuge .btn, .werkzeuge input[type=search], .segment__btn, .bemerkungsform .btn, .bemerkungsform input {
  height: 42px; line-height: 1; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; justify-content: center;
}
.werkzeuge input[type=search], .bemerkungsform input { display: block; padding-left: 12px; padding-right: 12px; }
.werkzeuge .btn { font-size: .95rem; }
.werkzeuge .werkzeuge__rechts { height: 42px; }
.segment { display: inline-flex; border: 1px solid var(--blau); border-radius: 6px; overflow: hidden; }
.segment__btn { height: 40px; padding: 0 16px; background: #fff; color: var(--blau); font-weight: 600; text-decoration: none; }
.segment__btn + .segment__btn { border-left: 1px solid var(--blau); }
.segment__btn--aktiv { background: var(--blau); color: #fff; }
.klassenleiste { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.klassenleiste__titel { font-weight: 600; margin-right: 4px; }
.mini { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 34px; padding: 0 12px; border-radius: 999px; background: #e3e8ee; color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; }
.mini:hover { background: #d4dbe3; }
.mini--aktiv, .mini--aktiv:hover { background: var(--blau); color: #fff; }
.bemerkungsform { display: flex; gap: 8px; margin: 12px 0 6px; }
.bemerkungsform input { flex: 1; min-width: 0; width: auto; }

/* Export */
.exportform fieldset { border: 1px solid var(--rand); border-radius: var(--radius); margin: 0 0 14px; padding: 8px 14px 10px; }
.exportform legend { font-weight: 700; padding: 0 6px; }
.exportform .optionen { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.exportform .optionen label { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin: 6px 0; }
.exportform input[type=date] { width: auto; }

/* Werkzeugleiste: Sortierung | Suche | Mehrfachauswahl (rechts, gleiche Höhe) */
.werkzeuge__rechts { margin-left: auto; }
.btn--raum { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: auto; min-height: 56px; white-space: normal; }
.btn--raum small { font-weight: 400; font-size: .78rem; color: var(--grau); line-height: 1.2; }
.raumwahl--aktuell small { color: #dbe7f3 !important; }
.raumbetreuer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 14px; }
.betreuerwahl { display: grid; gap: 2px; max-height: 50vh; overflow-y: auto; margin-bottom: 12px; }
.betreuerwahl label { display: flex; align-items: center; gap: 10px; font-weight: 400; margin: 0; padding: 8px 4px; }

/* Eltern-Seite */
.panel__kopf { padding: 14px 18px 0; }
.panel--tabelle .panel__kopf h2 { margin: 0 0 8px; }
.ausnahmewahl { margin: 12px 0; }
.ausnahmewahl input[type=date] { width: auto; }
#uebersicht th, #uebersicht td { text-align: left; vertical-align: top; }

/* Ausgecheckte Schüler: Name und Abholzeit grau wie die Klasse */
.kbuttons .btn .icon { vertical-align: -2px; margin-right: 2px; }

/* ===== Kopfzeile: GTS | Heute Raum | Avatar-Menü (Zeiten, Export, Import, Verwaltung, Abmelden) ===== */
.kopf__inner { max-width: 1100px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 8px 20px; min-height: 56px; }
.kopf__nav { display: flex; gap: 4px; flex: 1; min-width: 0; }
.kopf__nav a { padding: 8px 14px; white-space: nowrap; }
.usermenu { position: relative; margin-left: auto; }
.usermenu summary { list-style: none; cursor: pointer; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu__knopf { display: flex; align-items: center; border-radius: 999px; padding: 2px; }
.usermenu__knopf:hover, .usermenu[open] .usermenu__knopf, .usermenu__knopf--aktiv { background: rgba(255,255,255,.22); }
.usermenu__knopf:focus-visible { outline: 3px solid #8ab4f8; outline-offset: 1px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--blau); font-weight: 700; font-size: .95rem; letter-spacing: .02em; }
.usermenu__panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff; color: var(--text); border: 1px solid var(--rand); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.22); padding: 6px; z-index: 60; }
.usermenu__name { margin: 0; padding: 8px 12px 10px; font-weight: 700; border-bottom: 1px solid var(--rand); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu__panel a, .usermenu__panel button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; text-decoration: none; text-align: left; cursor: pointer; }
.usermenu__panel a:hover, .usermenu__panel button:hover { background: var(--blau-hell); }
.usermenu__panel a.aktiv { background: var(--blau-hell); color: var(--blau); font-weight: 600; }
.usermenu__panel form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--rand); }
.usermenu__panel .icon { flex: none; color: var(--grau); }

/* Kachel: Schriftfarbe von Name und Abholzeit passend zur Kachel */
.karte--erwartet .karte__name { color: var(--text); }
.karte--anwesend .karte__name, .karte--anwesend .karte__zeit { color: #1b5e20; }
.karte--krank .karte__name, .karte--krank .karte__zeit { color: #a31515; }
.karte--abgeholt .karte__name, .karte--abgeholt .karte__zeit { color: var(--grau); }

@media (max-width: 560px) {
  .kopf__inner { padding: 6px 12px; gap: 8px 12px; }
  .kopf__nav a { padding: 8px 10px; }
  .app { padding-left: 12px; padding-right: 12px; }
}

/* Überschrift mit Kalender-Symbol */
.kopfzeile { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.kopfzeile h1 { margin: 0; }
.datumwahl { display: flex; align-items: center; gap: 8px; }
.datumknopf { position: relative; display: inline-flex; }
.iconknopf { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--blau); cursor: pointer; }
.iconknopf:hover { background: var(--blau-hell); }
.datumknopf__feld { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; border: 0; font-size: 16px; z-index: 2; }
.karte__alt { color: var(--grau); font-weight: 400; margin-right: 2px; }
.klassenleiste .chip { padding: 5px 14px; }
.werkzeuge__rechts .icon { display: none; }
@media (max-width: 640px) {
  .werkzeuge__rechts .icon { display: block; }
  .werkzeuge__rechts .btn__text { display: none; }
  .werkzeuge .werkzeuge__rechts { width: 42px; padding: 0; }
}

/* ===== Kalender ===== */
.kalnav { display: inline-flex; align-items: center; gap: 4px; }
.kalnav__titel { min-width: 9.5em; text-align: center; }
.monat { width: 100%; table-layout: fixed; border-collapse: collapse; }
.monat th { background: var(--blau-hell); font-size: .85rem; padding: 8px 4px; text-align: center; }
.monat td { border: 1px solid var(--rand); height: 84px; vertical-align: top; padding: 0; background: #fff; }
.monat td a { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 5px 6px; color: var(--text); text-decoration: none; overflow: hidden; }
.monat td a:hover { filter: brightness(.96); }
.tag__nr { font-weight: 700; font-size: .95rem; }
.tag__text { font-size: .75rem; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.tag--anderer { opacity: .45; }
.monat td.tag--we:not(.tag--ferien):not(.tag--feiertag):not(.tag--frei):not(.tag--notbetreuung) { background: #f1f3f5; }
.tag--heute .tag__nr { background: var(--blau); color: #fff; border-radius: 999px; width: 1.8em; height: 1.8em; display: inline-flex; align-items: center; justify-content: center; }
.tag--gewaehlt { outline: 3px solid #8ab4f8; outline-offset: -3px; }
.monat td.tag--ferien { background: #dbeafe; }
.monat td.tag--feiertag { background: #e5e7eb; }
.monat td.tag--frei { background: #fde2e4; }
.monat td.tag--notbetreuung { background: #d9f2dc; }
.monat td.tag--abweichend { background: #fff0cc; }
.legende { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: .9rem; color: var(--grau); margin: 0 0 18px; }
.legende__punkt { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--rand); margin-right: -8px; }
.kalform { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.kalform label { margin: 0; }
.kalform input[type=date] { width: auto; }
.kal__zeit { flex: 0 0 200px; min-width: 0; }
.tagesinfo { text-align: center; padding: 34px 18px; }
.tagesinfo h2 { font-size: 1.5rem; margin-bottom: 6px; }
.tagesinfo--keine { background: #dbeafe; border-color: #b9d3f5; }
.tagesinfo--notbetreuung { background: #d9f2dc; border-color: #a8d9ae; }
.tagesinfo--klein { padding: 12px 16px; text-align: left; }
@media (max-width: 640px) {
  .monat td { height: 52px; }
  .tag__text { display: none; }
  .monat td a { padding: 4px; }
}

.kalnav .iconknopf { font-size: 1.6rem; text-decoration: none; }
.legende .tag--ferien { background: #dbeafe; }
.legende .tag--feiertag { background: #e5e7eb; }
.legende .tag--frei { background: #fde2e4; }
.legende .tag--notbetreuung { background: #d9f2dc; }
.legende .tag--abweichend { background: #fff0cc; }

/* Tagesüberschrift mit Pfeilen */
.kalnav--tag { gap: 2px; }
.kalnav--tag h1 { margin: 0; font-size: 1.35rem; text-align: center; min-width: 0; }
@media (max-width: 560px) { .kalnav--tag h1 { font-size: 1.05rem; } .kopfzeile { flex-wrap: nowrap; } .kopfzeile .datumwahl { margin-left: auto; } }

/* ===== Kopfzeile: weiß, immer sichtbar, mit Logo ===== */
.kopf { background: #fff; color: var(--text); position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--rand); box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.kopf__logo { display: inline-flex; align-items: center; gap: 8px; color: var(--blau); font-weight: 800; font-size: 1.2rem; text-decoration: none; }
.kopf__logo img { height: 56px; width: auto; display: block; }
.kopf .kopf__nav a { color: var(--text); }
.kopf .kopf__nav a:hover { background: var(--blau-hell); }
.kopf .kopf__nav a.aktiv { background: var(--blau-hell); color: var(--blau); font-weight: 600; }
.kopf .avatar { background: var(--blau); color: #fff; }
.usermenu__knopf:hover, .usermenu[open] .usermenu__knopf, .usermenu__knopf--aktiv { background: var(--blau-hell); }
@media (max-width: 400px) { .kopf__logo span { display: none; } }

@media (max-width: 560px) { .kopf__logo img { height: 44px; } }
#auswahlForm[hidden] { display: none; }
.nbknoepfe { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.nbknoepfe form { margin: 0; }

/* Raumübersicht */
.raumliste { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.raumzeile { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 1.4fr) auto; align-items: center; gap: 8px 16px; background: #fff; border: 1px solid var(--rand, #d8dde6); border-radius: var(--radius); padding: 10px 14px; }
.raumzeile--zu { background: #f4f4f4; }
.raumzeile--zu .raumzeile__name, .raumzeile--zu .raumzeile__betreuer { color: var(--grau); }
.raumzeile__name { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.raumzeile__name:hover { text-decoration: underline; }
.raumzeile__anzahl { font-weight: 400; color: var(--grau); }
.raumzeile__aktionen { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.raumzeile__aktionen form { margin: 0; }
.raumzeile__aktionen .btn { white-space: nowrap; }
@media (max-width: 700px) {
  .raumzeile { grid-template-columns: 1fr; }
  .raumzeile__aktionen { justify-content: flex-start; }
}
.betreuerwahl label { min-height: 44px; display: flex; align-items: center; gap: 10px; }
.betreuerwahl input { width: 22px; height: 22px; }
.panel .kbuttons { max-width: 420px; }

/* ===== Listenansicht "Heute" ===== */
.liste { --chk: 0px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
body.auswahl-aktiv .liste { --chk: 34px; }
.liste__kopf, .zeile {
  display: grid; align-items: center; column-gap: 12px;
  grid-template-columns: var(--chk) minmax(150px, 1.6fr) 64px 92px minmax(90px, 1.3fr) 72px 150px 192px;
}
.liste__kopf { padding: 0 12px; font-size: .8rem; font-weight: 700; color: var(--grau); text-transform: uppercase; letter-spacing: .03em; }
.zeile { background: #fff; border: 1px solid var(--rand); border-radius: 10px; padding: 6px 12px; min-height: 52px; }
.zeile--anwesend { background: #eaf7ec; border-color: #b4dcb9; }
.zeile--krank { background: #fdecee; border-color: #f0b9c0; }
.zeile--abgeholt { background: #f6f8fa; color: var(--grau); }
.zeile--abgeholt .zeile__name a, .zeile--abgeholt .zeile__zeit { color: var(--grau); }
.zeile__check { overflow: hidden; display: flex; align-items: center; }
.zeile__check input { width: 22px; height: 22px; }
.zeile__name { min-width: 0; display: flex; align-items: center; gap: 6px; font-weight: 700; }
.zeile__name a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile__name a:hover { text-decoration: underline; }
.zeile__meta { display: contents; }
.zeile__klasse { font-weight: 600; color: var(--grau); }
.zeile__zeit { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--blau); white-space: nowrap; }
.zeile__ag { font-size: .9rem; min-width: 0; }
.zeile__raum { font-weight: 600; }
.zeile__geplant { font-weight: 400; color: var(--grau); font-style: italic; }
.zeile__status { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.zeile__aktionen { justify-self: end; }
.zeile .kbuttons, .panel .kbuttons { display: flex; gap: 8px; margin: 0; max-width: none; }
.kbuttons .btn--symbol, .btn--symbol { width: 42px; min-width: 42px; height: 42px; min-height: 42px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.btn--symbol .icon { margin: 0; vertical-align: 0; }
.panel .kbuttons { margin-top: 8px; }
.segment__radio { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.ags { font-size: .85rem; max-width: 260px; }

@media (max-width: 900px) {
  .liste__kopf { display: none; }
  .zeile {
    grid-template-columns: var(--chk) minmax(0, 1fr) auto; row-gap: 4px;
    grid-template-areas: "chk name name" "chk meta meta" "chk status akt";
  }
  .zeile__check { grid-area: chk; }
  .zeile__name { grid-area: name; font-size: 1.05rem; }
  .zeile__meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: .9rem; }
  .zeile__meta > :empty { display: none; }
  .zeile__meta > [data-label]::before { content: attr(data-label) ": "; font-weight: 400; color: var(--grau); font-size: .8rem; }
  .zeile__status { grid-area: status; }
  .zeile__aktionen { grid-area: akt; }
}

/* Einchecken-Button grün (Kontur und Symbol) */
.kbuttons .btn--einchecken:not(:disabled) { color: #1b7a2f; border-color: #2e9d45; }
.kbuttons .btn--einchecken:not(:disabled):hover { background: #e6f5e9; }
/* Kopfzeile: Logo + Schulname, kein Menüpunkt "Heute" mehr */
.kopf__logo { gap: 12px; line-height: 1.15; }
.kopf__logo img { height: 56px; }
.kopf__logo span { font-size: 1.15rem; }
@media (max-width: 560px) { .kopf__logo img { height: 44px; } .kopf__logo span { font-size: .95rem; max-width: 190px; } }
@media (max-width: 400px) { .kopf__logo span { display: inline; font-size: .85rem; max-width: 150px; } }
.kopf__logo img { flex: 0 0 auto; width: auto; max-width: none; }

/* Sortierbare Spaltenköpfe, zentrierte Spalten, AG in zwei Zeilen */
.liste__kopf { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.sortlink { color: var(--grau); text-decoration: none; text-align: center; font-weight: 700; padding: 4px 2px; border-radius: 6px; white-space: nowrap; }
.sortlink:hover { background: var(--blau-hell); color: var(--blau); }
.sortlink--aktiv { color: var(--blau); }
.sortlink--links { text-align: left; }
.zeile__klasse, .zeile__zeit, .zeile__ag, .zeile__raum { text-align: center; }
.zeile__status { justify-content: center; }
.zeile__ag { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ag { display: flex; flex-direction: column; line-height: 1.2; }
.ag__zeit { color: var(--grau); font-size: .8rem; }
@media (max-width: 900px) {
  .liste__kopf { display: flex; flex-wrap: wrap; gap: 2px 6px; padding: 0 4px; }
  .liste__kopf > span { display: none; }
  .sortlink { padding: 4px 8px; background: #e3e8ee; border-radius: 999px; }
  .sortlink--aktiv { background: var(--blau); color: #fff; }
  .zeile__status { justify-content: flex-start; }
  .zeile__ag { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
  .zeile__klasse, .zeile__zeit, .zeile__raum, .zeile__ag { text-align: left; }
  .ag { flex-direction: row; gap: 6px; align-items: baseline; }
}

/* Avatar: weißes Personen-Symbol */
.kopf .avatar .icon { display: block; }
/* Sehr kleine Displays: "Klasse:" und "Raum:" ausblenden, Abholzeit als Uhr-Symbol */
.zeile__uhr { display: none; }
@media (max-width: 420px) {
  .zeile__meta > .zeile__klasse[data-label]::before, .zeile__meta > .zeile__raum[data-label]::before { content: none; }
  .zeile__meta > .zeile__zeit[data-label]::before { content: none; }
  .zeile__uhr { display: inline-flex; vertical-align: -3px; margin-right: 3px; color: var(--grau); }
  .zeile__meta { gap: 2px 10px; }
}
/* Seite Zeiten: Auswahlspalte nur im Auswahlmodus */
.tabelle .wahlspalte { display: none; }
body.auswahl-aktiv .tabelle .wahlspalte { display: table-cell; }
.tabelle .wahlspalte input { width: 22px; height: 22px; }

/* Header: Logo (höher) + "GTS" in kräftiger, geometrischer Schrift */
.kopf__logo img { height: 60px; width: auto; flex: 0 0 auto; }
.kopf__logo span, .kopf__logo span { display: inline; max-width: none; color: #111; font-family: "Montserrat", "Century Gothic", "Avenir Next", "Trebuchet MS", "Segoe UI", system-ui, sans-serif; font-weight: 800; font-size: 1.9rem; letter-spacing: .04em; line-height: 1; }
@media (max-width: 560px) { .kopf__logo img { height: 46px; } .kopf__logo span { font-size: 1.5rem; max-width: none; } }
@media (max-width: 400px) { .kopf__logo span { display: inline; font-size: 1.4rem; max-width: none; } }

/* Smartphone: Klasse, Raum, Abholzeit stehen in der ersten Zeile neben dem Namen */
@media (max-width: 900px) {
  .zeile { grid-template-columns: var(--chk) minmax(0, 1fr) auto auto auto; grid-template-areas: none; column-gap: 10px; row-gap: 4px; align-items: center; }
  .zeile__check { grid-area: auto; grid-column: 1; grid-row: 1 / span 3; }
  .zeile__name { grid-area: auto; grid-column: 2; grid-row: 1; }
  .zeile__meta { display: contents; }
  .zeile__klasse { grid-column: 3; grid-row: 1; }
  .zeile__raum { grid-column: 4; grid-row: 1; }
  .zeile__zeit { grid-column: 5; grid-row: 1; }
  .zeile__ag { grid-column: 2 / -1; grid-row: 2; }
  .zeile__status { grid-area: auto; grid-column: 2; grid-row: 3; }
  .zeile__aktionen { grid-area: auto; grid-column: 3 / -1; grid-row: 3; }
  .zeile__klasse[data-label]::before, .zeile__raum[data-label]::before, .zeile__zeit[data-label]::before { content: none; }
  .zeile__uhr { display: inline-flex; vertical-align: -3px; margin-right: 3px; color: var(--grau); }
  .zeile__meta > :empty { display: none; }
  .zeile__klasse, .zeile__raum, .zeile__zeit { font-size: .95rem; }
}
@media (max-width: 900px) { .zeile__status .badge { white-space: nowrap; padding: 3px 9px; font-size: .75rem; } }
.kopf__logo img { height: 60px; width: auto; }
@media (max-width: 560px) { .kopf__logo img { height: 46px; } }

/* Kopf: Heisenberg-Logo links außen, GTS-Logo exakt mittig, Menü rechts */
.kopf__inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 6px 16px; }
.kopf__schule { justify-self: start; display: inline-flex; align-items: center; }
.kopf__schule img { height: 46px; width: auto; display: block; }
.kopf__logo { justify-self: center; }
.kopf__logo img { height: 60px; width: auto; }
.kopf__rechts { justify-self: end; display: flex; align-items: center; gap: 8px; }
.kopf__nav { flex: 0 1 auto; }
@media (max-width: 700px) { .kopf__nav { display: none; } }
@media (max-width: 560px) {
  .kopf__inner { padding: 6px 12px; gap: 6px; }
  .kopf__schule img { height: 30px; }
  .kopf__logo img { height: 40px; }
}

/* Abgemeldete: grau wie "gegangen", Name/Zeit/Raum durchgestrichen */
.zeile--krank { background: #f6f8fa; border-color: var(--rand); color: var(--grau); }
.zeile--krank .zeile__name a, .zeile--krank .zeile__zeit, .zeile--krank .zeile__raum { color: var(--grau); }
.zeile--krank .zeile__name a, .zeile--krank .zeile__zeittext, .zeile--krank .zeile__raum { text-decoration: line-through; }
/* Abholzeit anklickbar */
.zeitknopf { background: none; border: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; padding: 2px 6px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; }
.zeitknopf:hover, .zeitknopf:focus-visible { background: var(--blau-hell); }
.dialog__knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.dialog input[type=time] { font-size: 1.2rem; padding: 8px; margin-top: 4px; }
/* AG-Chips mit X auf der Schülerseite */
.agliste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.agliste form { margin: 0; }
.agtabelle .ag-teilnehmer { color: var(--grau); font-size: .9rem; }

/* Header ca. 50 % transparent (Inhalt scheint unscharf durch) */
.kopf { background: rgba(255, 255, 255, .5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* Abgemeldet-Label grau wie "gegangen" */
.badge.status--krank { background: #e0e4e9; color: #44505c; }
/* Schüler-Detailseite: zwei Spalten */
.app--breit { max-width: 1100px; }
.detailgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.detailspalte { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.detailspalte > .panel { margin: 0; min-width: 0; }
/* Handy: eine Spalte in der Reihenfolge Anwesenheit, Zeitleiste, Zeiten, AGs, Bemerkungen, E-Mail, Info */
@media (max-width: 800px) {
  .detailgrid { display: flex; flex-direction: column; gap: 16px; }
  .detailspalte { display: contents; }
  .o1 { order: 1; } .o2 { order: 2; } .o3 { order: 3; } .o4 { order: 4; } .o5 { order: 5; } .o6 { order: 6; } .o7 { order: 7; }
}

.dialog--breit { width: min(520px, calc(100% - 32px)); }
.dialog input[type=text] { width: 100%; }
.raumwahl-segment { flex-wrap: wrap; }
.ag-aktionen { white-space: nowrap; }
.ag-aktionen form { display: inline-flex; vertical-align: middle; }

.emailform { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; }
.emailform input { width: 100%; }
.emailform .btn { grid-column: 1 / -1; justify-self: start; }
.betreuungsende { display: flex; align-items: center; gap: 6px; }
.daten dd { overflow-wrap: anywhere; }
@media print {
  .zeile__aktionen, .zeile__check, .klassenleiste, .chipzeile, .werkzeuge, .datumwahl, .auswahlleiste, .zeile__status .badge { display: none !important; }
  .status-druck { display: inline !important; font-weight: 700; }
}
.status-druck { display: none; }
@media print {
  .liste__kopf, .zeile { display: grid !important; grid-template-columns: minmax(130px, 1.6fr) 56px 150px minmax(90px, 1.3fr) 60px 130px !important; grid-template-areas: none !important; column-gap: 8px !important; }
  .liste__kopf > span { display: none !important; }
  .zeile > *, .zeile__meta > * { grid-area: auto !important; grid-row: 1 !important; text-align: left !important; }
  .zeile__name { grid-column: 1 !important; } .zeile__klasse { grid-column: 2 !important; } .zeile__zeit { grid-column: 3 !important; }
  .zeile__ag { grid-column: 4 !important; } .zeile__raum { grid-column: 5 !important; } .zeile__status { grid-column: 6 !important; }
  .zeile__meta { display: contents !important; }
  .zeile [data-label]::before { content: none !important; }
  .zeile__name { font-size: 1rem !important; }
  .sortlink { background: none !important; color: #000 !important; padding: 0 !important; text-align: left !important; justify-content: flex-start !important; }
  .status-druck { white-space: nowrap; }
  .zeile { break-inside: avoid; box-shadow: none !important; }
}
.detailspalte .tabelle--raster th, .detailspalte .tabelle--raster td { padding-left: 6px; padding-right: 6px; }
.detailspalte .tabelle--raster thead th { font-size: .68rem; letter-spacing: 0; }

/* Elternseite: Regelzeiten über die volle Breite, Abstand vor der Übersicht */
.breitkachel { margin-bottom: 16px; }
.detailgrid + .panel { margin-top: 16px; }

/* Übersicht: Farben für Name/Zeit und Raum-Label je Status */
.zeile--erwartet:not(.zeile--na) .zeile__name > a { color: var(--blau); }
.zeile--anwesend .zeile__name > a, .zeile--anwesend .zeile__zeit { color: #1b5e20; }
.raumlabel { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; border: 1.5px solid; white-space: nowrap; }
.raumlabel--erwartet { background: #fff; color: #5b6773; border-color: #a9b8c8; }
.raumlabel--anwesend { background: #d6efd8; color: #1b5e20; border-color: #d6efd8; }
.raumlabel--krank { background: #fff; color: #6b7682; border-color: #cfd6de; text-decoration: line-through; }

/* Abgemeldete: hellgrau, Klasse ebenfalls durchgestrichen; Label fehlender Schüler dunkelblau */
.zeile--krank, .zeile--krank .zeile__name > a, .zeile--krank .zeile__klasse, .zeile--krank .zeile__zeit { color: #a3acb6 !important; }
.zeile--krank .zeile__klasse { text-decoration: line-through; }
.raumlabel--erwartet { color: var(--blau); border-color: var(--blau); }

/* Anmeldeseite */
.loginseite { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px 16px; }
.loginkasten { width: 100%; max-width: 560px; text-align: center; padding: 28px 24px; }
.loginlogos { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; margin-bottom: 28px; }
.loginlogos img { width: auto; max-width: 100%; object-fit: contain; display: block; }
.loginlogos img:first-child { height: 75px; }
.loginlogos img:last-child { height: 225px; }
.loginknopf { margin: 0; }
@media (max-width: 480px) { .loginlogos img:first-child { height: 60px; } .loginlogos img:last-child { height: 160px; } }

/* Handy: alle Kacheln der Elternseite gleich breit; Ferienliste mit festen Spalten */
@media (max-width: 800px) {
  .detailgrid { align-items: stretch; }
  .detailgrid > *, .detailspalte > .panel, .detailgrid .panel { width: 100%; box-sizing: border-box; }
}
@media (max-width: 560px) {
  #kalender .zeitleiste li { flex-direction: column; gap: 2px; }
  #kalender .kal__zeit { flex: 0 0 auto; }
}
#notbetreuung .zeitleiste__zeit { flex: 0 0 150px; min-width: 0; }
@media (max-width: 560px) { #notbetreuung .zeitleiste__zeit { flex: 0 0 auto; } #notbetreuung .zeitleiste li { flex-wrap: wrap; } }

/* Notbetreuung in der Ferienliste */
.nbbereich { margin-top: 6px; }
.nbbereich > summary { list-style: none; cursor: pointer; display: inline-block; }
.nbbereich > summary::-webkit-details-marker { display: none; }
.nbform { margin-top: 10px; }
.nbtabellenrahmen { overflow-x: auto; border: 1px solid var(--rand); border-radius: var(--radius); }
.nbtabelle { margin: 0; }
.nbtabelle th, .nbtabelle td { text-align: center; white-space: nowrap; }
.nbtabelle tbody th { text-align: left; }
.nbtabelle input[type=radio] { width: 22px; height: 22px; }

/* Notbetreuung: ganze Zeile klappt die Tabelle über die volle Breite auf */
.zeitleiste li.hatnb { display: block; padding-left: 14px; }
.nbbereich > summary.nbzeile { display: flex; align-items: flex-start; gap: 12px; list-style: none; cursor: pointer; }
.nbbereich > summary.nbzeile::-webkit-details-marker { display: none; }
.nbbereich > summary.nbzeile .btn { pointer-events: none; }
@media (max-width: 560px) { .nbbereich > summary.nbzeile { flex-direction: column; gap: 2px; } }

.nbuebersicht { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; font-size: .9rem; color: var(--grau); }
.nbtag--an { color: #1b5e20; }
.nbtag--an b { color: #1b5e20; }

/* Notbetreuung (Eltern): angemeldete Tage und Button linksbündig wie die Tabelle */
.nbbereich > summary.nbzeile { display: block; }
.nbkopf { display: flex; align-items: flex-start; gap: 12px; }
.nbuebersicht { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 10px; }
.nbbereich > summary.nbzeile > .btn { margin-top: 4px; }
@media (max-width: 560px) { .nbkopf { flex-direction: column; gap: 2px; } }

/* Label-Farben in der Übersicht */
.badge--warnung { background: #d6efd8; color: #1b5e20; }
.badge.status--erwartet { background: #fff; color: var(--blau); border: 1.5px solid var(--blau); padding: 1.5px 10.5px; }
/* Klasse und AG: Schriftfarbe wie der Name, nicht fett */
.zeile__klasse, .zeile__ag, .ag__name, .ag__zeit { font-weight: 400; color: var(--text); }
.zeile--erwartet:not(.zeile--na) .zeile__klasse, .zeile--erwartet:not(.zeile--na) .zeile__ag, .zeile--erwartet:not(.zeile--na) .ag__name, .zeile--erwartet:not(.zeile--na) .ag__zeit { color: var(--blau); }
.zeile--anwesend .zeile__klasse, .zeile--anwesend .zeile__ag, .zeile--anwesend .ag__name, .zeile--anwesend .ag__zeit { color: #1b5e20; }
.zeile--abgeholt .zeile__klasse, .zeile--abgeholt .zeile__ag, .zeile--abgeholt .ag__name, .zeile--abgeholt .ag__zeit { color: var(--grau); }
.zeile--krank .zeile__ag, .zeile--krank .ag__name, .zeile--krank .ag__zeit { color: #a3acb6 !important; }

/* Eltern: kompakte Tabellen ohne Seitwärtsscrollen */
.meldung--info p { margin: 0 0 .6em; }
.meldung--info p:last-child { margin-bottom: 0; }
.tabelle--kompakt { table-layout: fixed; }
.tabelle--kompakt th, .tabelle--kompakt td { padding: 8px 6px; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  #regelmaessig .tabelle--kompakt th { font-size: .62rem; letter-spacing: 0; padding: 6px 2px; }
  #regelmaessig .tabelle--kompakt td { font-size: .72rem; padding: 6px 2px; }
  #uebersicht .tabelle--kompakt th { font-size: .6rem; letter-spacing: 0; padding: 6px 3px; }
  #uebersicht .tabelle--kompakt td { font-size: .75rem; padding: 6px 3px; }
  #regelmaessig .tabelle--raster th[scope=row] { font-size: .8rem; white-space: normal; }
  #regelmaessig .tabelle--raster th, #regelmaessig .tabelle--raster td { padding-left: 3px; padding-right: 3px; }
}
.kurz { display: none; }
@media (max-width: 560px) {
  #regelmaessig .tabelle--kompakt .voll { display: none; }
  #regelmaessig .tabelle--kompakt .kurz { display: inline; }
  #regelmaessig .tabelle--kompakt th { font-size: .8rem; }
  #regelmaessig .tabelle--kompakt td { font-size: .85rem; }
}

.mailvorlage { border: 1px solid var(--rand); border-radius: 8px; margin: 0 0 14px; padding: 10px 14px 14px; }
.mailvorlage legend { font-weight: 700; padding: 0 6px; }
.mailvorlage label { display: block; margin: 8px 0 3px; font-weight: 600; }
.mailvorlage label.inline { font-weight: 400; }
.mailvorlage input[type=text], .mailvorlage textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; border: 1px solid var(--rand); border-radius: 6px; }

#uebersicht .tabelle th, #uebersicht .tabelle td { text-align: center; }
.hinweis.leer { font-style: italic; text-align: center; }
.panel > .daten, #emailadressen .daten { margin-bottom: 18px; }
#uebersicht .tabelle--kompakt { table-layout: auto; }
#uebersicht .tabelle--kompakt th { white-space: nowrap; font-size: .66rem; letter-spacing: 0; padding: 8px 4px; }
#uebersicht .tabelle--kompakt td { padding: 8px 4px; }

#frist form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
#frist label { font-weight: 600; }
#frist input { width: auto; font: inherit; padding: 8px; border: 1px solid var(--rand); border-radius: 6px; }
#frist input[type=number] { width: 5em; }

/* Einklappbare Hinweiskästen */
.hinweisbox { position: relative; padding-right: 38px; }
.hinweisbox[hidden] { display: none; }
.hinweiszu { position: absolute; top: 4px; right: 6px; width: 28px; height: 28px; border: 0; background: transparent; color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; border-radius: 6px; }
.hinweiszu:hover { background: rgba(0, 0, 0, .08); }
.hinweisknopf { margin: 0 0 14px; }
.hinweisknopf[hidden] { display: none; }

.nbuebersicht { padding-left: 18px; }

.meldung--fehler p { margin: 0 0 .6em; }
.meldung--fehler p:last-child { margin-bottom: 0; }

/* Kurzanleitung */
.hilfe .panel { margin-bottom: 14px; }
.hilfe .schritte { margin: 0 0 8px; padding-left: 22px; }
.hilfe .schritte li { margin: 0 0 8px; }

/* Kurzanleitung: Buttons und Labels aus dem Dashboard im Text */
.hilfekopf { display: flex; align-items: center; gap: 10px; }
.hilfestift { margin-left: auto; }
.hilfe .hilfeknopf { display: inline-flex; vertical-align: middle; margin: 0 2px; pointer-events: none; cursor: default; }
.hilfe .btn--symbol.hilfeknopf { width: 36px; min-width: 36px; height: 36px; min-height: 36px; }
.hilfe .hilfeknopf--text { align-items: center; gap: 6px; }
.hilfe .badge { vertical-align: middle; }
.hilfex { display: inline-block; padding: 0 6px; font-size: 1.2rem; line-height: 1; color: var(--grau); }
.hilfe textarea { width: 100%; box-sizing: border-box; font: inherit; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; padding: 10px; border: 1px solid var(--rand); border-radius: 6px; }
.hilfehinweis { margin: 10px 0; }
.hilfehinweis summary { cursor: pointer; font-weight: 600; }
.hilfe li .btn--symbol.hilfeknopf { margin-top: -2px; }
