/* =====================================================================
   GBS-Framework – Grundlayout
   Farben kommen aus theme.css. Mobil zuerst: Handy → iPad → PC.
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;       /* Fußzeile auch auf kurzen Seiten unten (Handy: echte Bildschirmhöhe) */
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;          /* 16 px – verhindert Auto-Zoom auf iPhone/iPad */
  line-height: 1.55;
  color: var(--text);
  background: var(--hintergrund);
}

img { max-width: 100%; height: auto; }

/* „hidden“ gilt immer – auch bei Elementen, die per CSS display:grid/flex/block bekommen */
[hidden] { display: none !important; }

a { color: var(--akzent); text-underline-offset: .15em; }
a:hover { color: var(--akzent-hover); }

:focus-visible { outline: 3px solid var(--gbs-orange); outline-offset: 2px; }

h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 .75rem; }

/* ---------- Kopfzeile ---------- */

.kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1rem;
  background: var(--hintergrund);
}
.marke { display: flex; align-items: center; line-height: 0; }
.marke img { height: 40px; width: auto; }

.konto { display: flex; align-items: center; gap: .75rem; }
.konto form { margin: 0; }
.konto-name { color: var(--leise); font-size: .95rem; }

/* Farbband in den drei Schulfarben */
.farbband {
  height: 5px;
  background: linear-gradient(90deg,
    var(--gbs-orange) 0 33.3%,
    var(--gbs-gruen) 33.3% 66.6%,
    var(--gbs-alu) 66.6% 100%);
}

/* ---------- Brotkrumen ---------- */

/* schlanke Brotkrumen-Zeile: ohne Hintergrundfläche, wenig Abstand, kleinere Schrift */
.brotkrumen {
  padding: .1rem 1rem;
  border-bottom: 1px solid var(--rand);
  font-size: .85rem;
}
.brotkrumen ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .4rem; }
.brotkrumen li { display: inline-flex; align-items: center; }
.brotkrumen li + li::before { content: "»"; margin-right: .4rem; color: var(--leise); }
.brotkrumen a { color: var(--akzent); text-decoration: none; padding: .35rem 0; }   /* Handy: genug Fläche zum Antippen */
.brotkrumen a:hover { text-decoration: underline; }
.brotkrumen [aria-current="page"] { font-weight: 600; color: var(--text); }
@media (min-width: 900px) {
  .brotkrumen { padding: .1rem 1.5rem; }
  .brotkrumen a { padding: .15rem 0; }
}

.wartungsbalken {
  padding: .5rem 1rem;
  background: var(--fehler);
  color: #fff;
  font-weight: 600;
  text-align: center;
}
.wartungsbalken a { color: #fff; margin-left: .5rem; }

.umgebung {
  padding: .3rem 1rem;
  background: var(--hinweis);
  color: var(--text);
  font-size: .85rem;
  text-align: center;
}

/* Verwaltungsrechte Microsoft 365 (Schlüsseldatei) aktiv – auf jeder Seite sichtbar */
.vs-leiste {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3rem 1rem;
  padding: .4rem 1rem;
  background: var(--gbs-gruen);
  color: #1f3308;
  font-size: .9rem;
  text-align: center;
}
.vs-leiste .knopf-klein { min-height: 30px; padding: .15rem .7rem; background: #1f3308; border-color: #1f3308; color: #fff; }
@media print { .vs-leiste { display: none !important; } }

/* ---------- Inhalt ---------- */

.inhalt { flex: 1 0 auto; width: 100%; max-width: 960px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }

/* ---------- Fußzeile ---------- */

.fuss {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem 1.5rem;
  padding: .9rem 1rem calc(.9rem + env(safe-area-inset-bottom));
  border-top: 5px solid transparent;
  border-image: linear-gradient(90deg,
    var(--gbs-orange) 0 33.3%, var(--gbs-gruen) 33.3% 66.6%, var(--gbs-alu) 66.6% 100%) 1;
  background: var(--flaeche);
  font-size: .9rem;
}
.fuss a { color: var(--text); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.fuss a:hover { color: var(--akzent); text-decoration: underline; }

/* ---------- Knöpfe (mind. 44 px hoch – Touch) ---------- */

button, .knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .5rem 1.1rem;
  border: 1px solid var(--akzent);
  border-radius: 8px;
  background: var(--akzent);
  color: var(--knopf-text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .knopf:hover { background: var(--akzent-hover); border-color: var(--akzent-hover); color: var(--knopf-text); }

.knopf-zweit, .konto button {
  background: var(--hintergrund);
  color: var(--text);
  border-color: var(--rand);
}
.knopf-zweit:hover, .konto button:hover { background: var(--flaeche); color: var(--text); border-color: var(--gbs-alu); }

/* ---------- Kacheln (Startseite) ---------- */

.kacheln {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;            /* Handy: eine Spalte */
  gap: 1rem;
}
.kacheln a {
  display: block;
  height: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--rand);
  border-top: 5px solid var(--gbs-orange);
  border-radius: 10px;
  background: var(--hintergrund);
  color: var(--text);
  text-decoration: none;
}
.kacheln li:nth-child(3n+2) a { border-top-color: var(--gbs-gruen); }
.kacheln li:nth-child(3n)   a { border-top-color: var(--gbs-alu); }
.kacheln a:hover { background: var(--flaeche); }
.kacheln strong { display: block; font-size: 1.1rem; }
.kacheln span { display: block; margin-top: .3rem; color: var(--leise); font-size: .95rem; }

/* ---------- Tabellen ---------- */

.daten { border-collapse: collapse; width: 100%; }
.daten th, .daten td { padding: .55rem .6rem; border-bottom: 1px solid var(--rand); text-align: left; vertical-align: top; }
.daten th { width: 35%; font-weight: 600; }

/* ---------- Meldungen ---------- */

.meldung {
  padding: .75rem 1rem;
  background: var(--hinweis);
  border-left: 4px solid var(--hinweis-rand);
  border-radius: 6px;
}
.leise { color: var(--leise); font-size: .95rem; }
.ok { color: var(--ok); font-weight: 600; }
.fehler { color: var(--fehler); font-weight: 600; }

.meldung-ok     { border-left-color: var(--gbs-gruen); background: #f2f9e6; }
.meldung-fehler { border-left-color: var(--fehler); background: #fdecea; }

/* ---------- Formulare ---------- */

input[type="text"], input[type="search"], input[type="number"], select, textarea {
  width: 100%;
  min-height: 44px;
  padding: .5rem .65rem;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: var(--hintergrund);
  color: var(--text);
  font: inherit;            /* 16 px → kein Auto-Zoom auf iOS */
}
input:focus, select:focus, textarea:focus { border-color: var(--gbs-orange); }

label { display: block; font-weight: 600; font-size: .95rem; }
label > input, label > select, label > textarea { margin-top: .25rem; font-weight: 400; }

.formular { display: grid; gap: .85rem; margin: 1rem 0; }
.formular h2 { margin: 0; }
.formular button { justify-self: start; }

.box { padding: 1rem; border: 1px solid var(--rand); border-radius: 10px; background: var(--flaeche); }

.filter { display: grid; gap: .75rem; margin: 1rem 0; align-items: end; }

.knopf-klein { min-height: 36px; padding: .25rem .7rem; font-size: .9rem; }
.knopf-gefahr { background: var(--hintergrund); color: var(--fehler); border-color: var(--fehler); }
.knopf-gefahr:hover { background: #fdecea; color: var(--fehler); border-color: var(--fehler); }

form.inline { display: inline; margin: 0; }

.aufklapp { margin: 1.5rem 0; }
.aufklapp summary { cursor: pointer; font-weight: 600; color: var(--akzent); min-height: 44px; display: flex; align-items: center; }

/* ---------- Reiter-Navigation (z. B. Klassen in „Meine Klasse“) ---------- */

.reiter {
  display: flex;
  gap: .25rem;
  margin: 0 0 1.25rem;
  box-shadow: inset 0 -2px 0 var(--rand);   /* Grundlinie, ohne Überstand */
  overflow-x: auto;                          /* auf dem Handy seitlich wischen */
  overflow-y: hidden;                        /* kein senkrechter Mini-Scrollbalken */
  scrollbar-width: none;                     /* Scrollbalken ausblenden, Wischen geht weiter */
  -webkit-overflow-scrolling: touch;
}
.reiter::-webkit-scrollbar { display: none; }
.reiter a {
  flex: 0 0 auto;
  padding: .6rem .9rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.reiter a:hover { color: var(--akzent); }
.reiter a[aria-current="page"] { border-bottom-color: var(--gbs-orange); font-weight: 600; }
/* noch nicht erreichbarer Schritt (z. B. BYOD): ausgegraut, nicht klickbar */
.reiter .reiter-aus { flex: 0 0 auto; padding: .6rem .9rem; color: var(--leise); opacity: .55; cursor: not-allowed; border-bottom: 3px solid transparent; }

/* BYOD: Statusliste der Lernenden */
.byod-liste { list-style: none; padding: 0; font-size: 1.1rem; }
.byod-liste li { padding: .25rem 0; }
.byod-liste .byod-ok     { color: #178a17; font-weight: 600; }
.byod-liste .byod-offen  { color: var(--fehler); }
.byod-liste .byod-aus    { color: var(--leise); }
.byod-gross { font-size: 1.15rem; font-weight: 600; }
.byod-ablehnen input[type="text"] { width: 16rem; max-width: 100%; }

/* Schuljahreswechsel (Adminpanel): Zeile ohne Vorschlag – Entscheidung nötig */
.sjw-abschnitt { margin: 1.25rem 0; }
.sjw-offen { background: #fdecea; }
.sjw-abschnitt select { min-width: 12rem; }
.sjw-simulation { border-left-color: var(--gbs-gruen); background: #f1f8e3; }   /* Simulation: grün statt orange */
.sjw-simbalken { margin: .5rem 0 1rem; padding: .6rem 1rem; border-radius: 8px; background: var(--gbs-gruen); color: #1f3308; }
.sjw-simbalken a { color: #1f3308; font-weight: 600; }
.sjw-ergebnis { margin: .5rem 0 1rem; padding: .75rem 1rem; border-left: 4px solid var(--gbs-gruen); background: #f1f8e3; border-radius: 6px; }
.sjw-ergebnis ul { margin: .25rem 0; padding-left: 1.2rem; }
.sjw-checkliste { list-style: none; padding: 0; margin: 0 0 1rem; }
.sjw-checkliste li { padding: .55rem .75rem; border-bottom: 1px solid var(--rand); }
.sjw-checkliste li.erledigt > label span { text-decoration: line-through; color: var(--leise); }
.sjw-nur-drucken { display: none; }
.sjw-ankreuzen { text-align: center; font-size: 1.2rem; }
@media print {
  /* Druckliste „Ohne Zuordnung“: nur Inhalt, ohne Kopf, Menü und Knöpfe */
  body:has(.sjw-druckliste) :is(.kopf, .farbband, .brotkrumen, .fuss, .umgebung, .wartungsbalken, .admin-leiste, .sjw-reiter, .sjw-simbalken, .sjw-nicht-drucken, .meldung) { display: none !important; }
  .sjw-nur-drucken { display: block; }
  body:has(.sjw-druckliste) main.inhalt { max-width: none; padding: 0; display: block; }
  body:has(.sjw-druckliste) .tabelle-scroll { overflow: visible; }
  .sjw-druckliste { font-size: 9pt; width: 100%; }
  .sjw-druckliste th, .sjw-druckliste td { padding: .2rem .35rem; border: 1px solid #999; }
  .sjw-druckliste tr { break-inside: avoid; }
}
.sjw-abschnitt pre { white-space: pre-wrap; word-break: break-all; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 6px; padding: .6rem .8rem; }

/* ---------- Sporttage ---------- */
.st-info { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .9rem; margin: .5rem 0 0; }
.st-info dt { font-weight: 600; color: var(--leise); }
.st-info dd { margin: 0; }
.st-angebote { display: grid; gap: .9rem; margin: 1rem 0; }
.st-angebot { display: block; margin: 0; font-weight: 400; cursor: pointer; border-left: 5px solid var(--gbs-gruen); }
.st-angebot:has(input:checked) { border-left-color: var(--gbs-orange); background: var(--hinweis); }
.st-angebot-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; font-size: 1.1rem; }
.st-angebot-kopf input[type="radio"] { width: 1.3rem; height: 1.3rem; margin: 0; }
.st-plaetze { margin-left: auto; font-size: .9rem; }
.st-voll { opacity: .55; cursor: not-allowed; border-left-color: var(--rand); filter: grayscale(1); }
.st-qr-hinweis { border-left-color: var(--gbs-gruen); background: #f1f8e3; }
.st-datei { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: .5rem 0; }
.st-datei-form, .st-zeilenform { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; }
.st-zeilenform select, .st-zeilenform input[type="text"] { min-width: 12rem; width: auto; }
.st-stufe { margin: .3rem 0; }
/* QR-Kärtchen: 8 je A4-Seite (2×4) oder 1 je Seite */
.st-qr-karten { display: grid; gap: 0; }
.st-qr-je8 { grid-template-columns: 1fr 1fr; }
.st-qr-karte { padding: .8rem 1rem; border: 1px dashed #999; text-align: center; break-inside: avoid; }
.st-qr-je8 .st-qr-karte { height: 68mm; overflow: hidden; }
.st-qr-je1 .st-qr-karte { min-height: 240mm; display: flex; flex-direction: column; justify-content: center; break-after: page; border: 0; }
.st-qr-titel { margin: 0; font-size: .85rem; color: var(--leise); }
.st-qr-name { margin: .2rem 0 .4rem; font-size: 1.15rem; font-weight: 700; }
.st-qr-name span { font-weight: 400; }
.st-qr-je1 .st-qr-name { font-size: 2rem; }
.st-qr-bild svg { display: block; margin: 0 auto; }
.st-qr-text { margin: .4rem 0 0; font-size: .75rem; }
.st-qr-je1 .st-qr-text { font-size: 1.1rem; }
@media print {
  body:has(.st-qr-karten) :is(.kopf, .farbband, .brotkrumen, .fuss, .umgebung, .wartungsbalken, .sjw-nicht-drucken, .meldung, .breite-schalter) { display: none !important; }
  body:has(.st-qr-karten) main.inhalt { max-width: none; padding: 0; margin: 0; }
  .st-qr-je8 .st-qr-karte:nth-child(8n) { break-after: page; }
  .st-druckseite { break-after: page; }
  .st-druckseite:last-child { break-after: auto; }
}

/* Periodenwechsel: Rückmeldungen der Graph-API je Ausführung */
.pw-ergebnis { margin: .25rem 0 1rem; padding-left: 1.2rem; list-style: none; }
.pw-ergebnis li { margin: .2rem 0; }

/* ---------- Sportkurse ----------
   Bestätigung der Wahl: rot und unübersehbar; Absenden-Knopf erst nach 10 s aktiv. */
.sport-warnung { margin: 1rem 0; padding: 1.25rem 1.5rem; border: 4px solid #b3261e; border-radius: 12px; background: #fdecea; color: #5c0f0a; box-shadow: 0 6px 20px rgba(179, 38, 30, .2); }
.sport-warnung-titel { margin: 0 0 .5rem; font-size: 1.6rem; font-weight: 800; color: #b3261e; text-transform: uppercase; letter-spacing: .03em; }
.sport-warnung strong { color: #8c1d18; }
.sport-wahl { margin: .75rem 0; padding-left: 0; list-style: none; }
.sport-wahl li { margin: .35rem 0; padding: .5rem .75rem; border-radius: 8px; background: rgba(255, 255, 255, .75); font-size: 1.15rem; }
.sport-absenden { background: #b3261e; border-color: #b3261e; color: #fff; font-weight: 700; }
.sport-absenden:hover:not(:disabled) { background: #8c1d18; border-color: #8c1d18; color: #fff; }
.sport-absenden:disabled { background: #e7b3ae; border-color: #e7b3ae; color: #fff; cursor: wait; }
.sport-kostenwarnung { margin: .75rem 0; padding: .75rem 1rem; border: 2px dashed #b3261e; border-radius: 8px; background: #fff; font-size: 1.1rem; }
.sport-kostenhinweis { border-left-color: #b3261e; background: #fdecea; }
.sport-ergebnis { border-left: 6px solid var(--gbs-gruen); background: #f1f8e3; }
.sport-ergebnis > p { margin: .25rem 0; }
.sport-kurs { font-size: 2rem; font-weight: 800; color: var(--gbs-gruen-dunkel); }
.sport-klassen { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin: .5rem 0 1rem; }
.sport-klassen strong { flex-basis: 100%; margin-top: .4rem; }
/* Kurstabelle der Verwaltung: je Kurs zwei Zeilen (oben Stammdaten, darunter Kosten + Wünsche) */
.sport-kurstabelle tr.sport-kurs-oben td { border-bottom: 0; padding-bottom: .25rem; }
.sport-kurstabelle tr.sport-kurs-unten td { padding-top: 0; }
.sport-kurstabelle input[type="text"][name$="[name]"] { min-width: 11rem; }
.sport-kurstabelle input[type="number"] { width: 5.5rem; }
.sport-kurs-details { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
.sport-kurs-details label { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-weight: 400; }
.sport-kurs-details select { min-width: 0; width: auto; }
.sport-kurs-details input[type="text"] { width: 6.5rem; }
.sport-kursblock { margin: 1rem 0; }
.sport-kursblock h3 { margin-top: 0; }
.sport-kursblock select { min-width: 10rem; }

/* ---------- Information Förderkurse (Infoseite, auch öffentlich) ----------
   Farbige Aufklapp-Karten im GBS-Farbschema; je Karte reihum Orange / Grün / Alu (Klasse fkinfo-farbe-1…3).
   Weiße Schrift nur auf den dunklen Tönen (Kontrast ≥ 4,5:1 am Textanfang). */
.fkinfo { --fk-dunkel: var(--gbs-orange-dunkel); --fk-hell: var(--gbs-orange); --fk-zart: #fff1e8; }
.fkinfo-farbe-1 { --fk-dunkel: #b84a12; --fk-hell: #e2601f; --fk-zart: #fff1e8; }
.fkinfo-farbe-2 { --fk-dunkel: #3f6410; --fk-hell: #5f8a1f; --fk-zart: #f1f8e3; }
.fkinfo-farbe-3 { --fk-dunkel: #4f514e; --fk-hell: #6c6e6b; --fk-zart: #f2f2f0; }

.fkinfo-kopf {
  text-align: center; margin: 1rem 0 2rem; padding: 1.75rem 1rem; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, var(--gbs-orange-dunkel) 0%, #d9581a 55%, var(--gbs-gruen-dunkel) 130%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}
.fkinfo-kopf h1 { margin: 0; color: #fff; font-size: 2rem; text-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.fkinfo-kopf p { margin: .35rem 0 0; color: rgba(255, 255, 255, .95); font-size: 1.05rem; }

.fkinfo-liste { display: grid; gap: 1.1rem; }
.fkinfo-block {
  border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .10);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), box-shadow .3s cubic-bezier(.4, 0, .2, 1);
}
.fkinfo-block:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(0, 0, 0, .16); }
.fkinfo-block > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 44px; padding: 1.2rem 1.5rem; font-weight: 600; font-size: 1.15rem; color: #fff;
  background: linear-gradient(90deg, var(--fk-dunkel), var(--fk-hell));
}
.fkinfo-block > summary::-webkit-details-marker { display: none; }
.fkinfo-block > summary::after {
  content: ''; flex-shrink: 0; width: 14px; height: 14px; margin-right: .25rem;
  border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(-45deg);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.fkinfo-block[open] > summary { background: var(--fk-dunkel); }
.fkinfo-block[open] > summary::after { transform: rotate(45deg); }
.fkinfo-block > summary:focus-visible { outline: 3px solid var(--gbs-gruen); outline-offset: -3px; }

.fkinfo-text { padding: 1.5rem; animation: fkinfo-auf .3s ease-out; }
.fkinfo-text > :first-child { margin-top: 0; }
.fkinfo-text p { line-height: 1.75; }
.fkinfo-text strong { color: var(--fk-dunkel); }
.fkinfo-text ul { padding-left: 1.2rem; }
.fkinfo-text li { margin: .3rem 0; }
.fkinfo-text h3 { color: var(--fk-dunkel); font-size: 1.25rem; margin: 1.75rem 0 .75rem; padding-bottom: .35rem; border-bottom: 2px solid var(--fk-hell); }
.fkinfo-text h3:first-child { margin-top: 0; }
@keyframes fkinfo-auf { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* „! “ Hinweiskasten (Farbe der Karte), „> “ Infokasten (immer grün) */
.fkinfo-hinweis { margin: 1.25rem 0; padding: 1.1rem 1.25rem; border-left: 4px solid var(--fk-hell); border-radius: 8px; background: var(--fk-zart); }
.fkinfo-kasten  { margin: 1.25rem 0; padding: 1.1rem 1.25rem; border: 2px solid var(--gbs-gruen); border-radius: 8px; background: #f1f8e3; }
.fkinfo-kasten strong { color: var(--gbs-gruen-dunkel); }
.fkinfo-hinweis > :last-child, .fkinfo-kasten > :last-child { margin-bottom: 0; }
.fkinfo-hinweis > :first-child, .fkinfo-kasten > :first-child { margin-top: 0; }

.fkinfo-tabelle { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }
.fkinfo-tabelle th, .fkinfo-tabelle td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid #ecebe8; }
.fkinfo-tabelle th { background: var(--fk-zart); color: var(--fk-dunkel); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.fkinfo-tabelle tr:last-child td { border-bottom: 0; }
.fkinfo-tabelle tbody tr:hover { background: var(--fk-zart); }

.fkinfo-fuss { text-align: center; color: var(--leise); font-size: .85rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rand); }

/* öffentliche Seite: zarter Hintergrund in Schulfarben */
body.fkinfo-oeffentlich { background: linear-gradient(160deg, #fff1e8 0%, #ffffff 45%, #f1f8e3 100%) fixed; }

@media (max-width: 559px) {
  .fkinfo-kopf h1 { font-size: 1.6rem; }
  .fkinfo-block > summary { padding: 1rem 1.1rem; font-size: 1.02rem; }
  .fkinfo-text { padding: 1.1rem; }
  .fkinfo-tabelle th, .fkinfo-tabelle td { padding: .6rem .5rem; font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) {
  .fkinfo-block, .fkinfo-block > summary::after { transition: none; }
  .fkinfo-block:hover { transform: none; }
  .fkinfo-text { animation: none; }
}

/* ---------- Seitenleiste (Adminpanel) ---------- */

.admin-leiste { margin: 0 0 1.25rem; }
.admin-leiste ul { list-style: none; margin: 0; padding: 0; }
.admin-leiste a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  min-height: 40px;
  padding: .4rem .75rem;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  color: var(--text);
  text-decoration: none;
}
.admin-leiste a:hover { background: var(--flaeche); color: var(--akzent); }
.admin-leiste a[aria-current="page"] { border-left-color: var(--gbs-orange); background: var(--hinweis); font-weight: 600; }
.admin-leiste-gruppe {
  margin: 1rem 0 .25rem;
  padding-left: .75rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--leise);
}
.admin-leiste .zaehler {
  min-width: 1.5rem;
  padding: 0 .4rem;
  border-radius: 999px;
  background: var(--gbs-orange);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  text-align: center;
}
.admin-leiste-knopf { display: none; }

/* Breite Bildschirme: Leiste links, Inhalt rechts (Seiten des Adminpanels) */
@media (min-width: 900px) {
  main.inhalt:has(> .admin-leiste) {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    column-gap: 2rem;
    align-items: start;
    max-width: var(--breite-admin, 1240px);   /* einstellbar im Adminpanel › System › Design */
  }
  main.inhalt:has(> .admin-leiste) > * { grid-column: 2; }
  main.inhalt:has(> .admin-leiste) > .admin-leiste {
    grid-column: 1;
    grid-row: 1 / span 200;          /* über die ganze Höhe des Inhalts */
    position: sticky;
    top: 1rem;
    margin: 0;
    padding: .5rem 0;
    border-right: 1px solid var(--rand);
  }
  main.inhalt:has(> .admin-leiste) > script { display: none; }
}

/* Handy / schmales Tablet: Knopf „☰ Bereiche“, Liste klappt auf */
@media (max-width: 899px) {
  .admin-leiste { border: 1px solid var(--rand); border-radius: 8px; background: var(--hintergrund); }
  .admin-leiste-knopf {
    display: flex;
    gap: .5rem;
    width: 100%;
    justify-content: flex-start;
    background: var(--flaeche);
    color: var(--text);
    border: 0;
    border-radius: 8px;
    font-weight: 400;
  }
  .admin-leiste-knopf:hover { background: var(--flaeche); color: var(--akzent); border: 0; }
  .admin-leiste-liste { padding: .25rem 0 .5rem; }
  .admin-leiste.eingeklappt .admin-leiste-liste { display: none; }
}

/* ---------- Kennzahlen ---------- */

.kennzahlen {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
.kennzahlen li { padding: .8rem; border: 1px solid var(--rand); border-left: 4px solid var(--gbs-gruen); border-radius: 8px; }
.kennzahlen strong { display: block; font-size: 1.5rem; line-height: 1.2; }
.kennzahlen span { color: var(--leise); font-size: .9rem; }

/* ---------- Listen-Tabellen (mehrspaltig, auf dem Handy seitlich scrollbar) ---------- */

.tabelle-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0; }
.liste { border-collapse: collapse; width: 100%; min-width: 560px; }
.liste th, .liste td { padding: .5rem .6rem; border-bottom: 1px solid var(--rand); text-align: left; vertical-align: middle; }
.liste thead th { background: var(--flaeche); font-size: .9rem; }
.liste tr.gesperrt td { color: var(--leise); }
.liste td.pdf-status { text-align: center; font-size: 1.2rem; font-weight: 700; }   /* ✔ / ✘ (z. B. Geräteausleihe) */
.liste tr.zwischenzeile th { background: var(--flaeche); border-top: 2px solid var(--gbs-alu); font-size: .9rem; padding-top: .7rem; }   /* Gruppenüberschrift in Tabellen */
.nowrap { white-space: nowrap; }
form.wechsel { display: flex; gap: .4rem; align-items: center; margin: 0; }
form.wechsel select { min-height: 36px; padding: .25rem .5rem; width: auto; min-width: 11rem; }
td.schmal { width: 7rem; }
td.schmal input { min-width: 4.5rem; }
.klein { font-size: .85rem; color: var(--leise); word-break: break-word; }

.etikett {
  display: inline-flex !important;
  align-items: center;
  gap: .25rem;
  margin: .1rem .25rem .1rem 0;
  padding: .1rem .2rem .1rem .6rem;
  border: 1px solid var(--rand);
  border-radius: 999px;
  background: var(--flaeche);
  font-size: .9rem;
}
.etikett-klein {
  display: inline-block;
  margin-top: .2rem;
  padding: 0 .45rem;
  border-radius: 999px;
  background: var(--hinweis);
  border: 1px solid var(--gbs-orange);
  font-size: .78rem;
  white-space: nowrap;
}

.entfernen {
  min-height: 32px;
  min-width: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--leise);
  font-size: 1.1rem;
  line-height: 1;
}
.entfernen:hover { background: #fdecea; color: var(--fehler); }

.spalten { display: grid; gap: 1rem; }

/* ---------- Meine Klasse ---------- */

.mitte { text-align: center; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.optionen { display: flex; flex-wrap: wrap; gap: .35rem; }
.option {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 44px;
  padding: .2rem .35rem;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: var(--hintergrund);
  color: var(--akzent);
  font-size: .7rem;
  line-height: 1.1;
  text-decoration: none;
}
a.option:hover { background: var(--hinweis); border-color: var(--gbs-orange); color: var(--akzent-hover); }
/* Vertretung um weitere Tools ergänzen (Meine Klasse › Zugriff auf diese Klasse) */
.tools-erweitern { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin-top: .4rem; }
.tools-erweitern label.haken { font-weight: 400; }
.tools-erweitern label.haken input { width: 1.1rem; height: 1.1rem; }

/* Klassenauswahl in „Meine Klasse“ bei vielen Klassen (z. B. Tool-Admin) */
.klassenwahl { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 1rem; font-weight: 600; }
.klassenwahl select { width: auto; min-width: 9rem; font-weight: 400; }
.schuelersuche { margin-left: 1.5rem; flex-wrap: wrap; }
.schuelersuche input { width: auto; min-width: 16rem; font-weight: 400; }
.liste tr.markiert td { background: var(--hinweis); }                       /* nach der Namenssuche hervorgehoben */
.liste tr.markiert td:first-child { box-shadow: inset 4px 0 0 var(--gbs-orange); }

/* GBS Medien: Schlüssel groß und gut abschreibbar */
.medien-schluessel { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.medien-code { font-size: 1.4rem; font-weight: 700; letter-spacing: .15em; padding: .1rem .5rem; border: 2px solid var(--gbs-orange); border-radius: 6px; }
.medien-schluessel + .klein { display: block; margin: .2rem 0 .35rem; }

/* Option als Knopf (Aktion mit Rückfrage, z. B. Teams-Passwort) – sieht aus wie die Link-Optionen */
button.option { font: inherit; font-size: .7rem; font-weight: 400; line-height: 1.1; cursor: pointer; }
button.option:hover { background: var(--hinweis); border-color: var(--gbs-orange); color: var(--akzent-hover); }
.option.aus { color: #b4b3af; background: var(--flaeche); cursor: not-allowed; }

.statuszeile { display: flex; align-items: center; gap: .35rem; white-space: nowrap; font-size: .9rem; color: var(--text); }
.statuszeile + .statuszeile { margin-top: .2rem; }
/* Zugangsdaten nach dem Anlegen eines Entra-Kontos (Lehrende) */
.zugang { border-left: 4px solid var(--gbs-orange); }
.zugang-daten { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0 0 .8rem; }
.zugang-daten dt { font-weight: 600; }
.zugang-daten dd { margin: 0; }
.zugang-daten code { font-size: 1.15rem; letter-spacing: .05em; }
.neu-markierung { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .3rem; }
.neu-markierung .etikett-klein { margin-top: 0; }
.etikett-meldung { background: var(--gbs-orange); border-color: var(--gbs-orange); color: #fff; font-weight: 600; }
.text-gruen      { color: #178a17; font-weight: 600; }   /* sattes Grün, noch gut lesbar auf Weiß (ca. 4,6:1) – z. B. Status „aktiv“ */
.etikett-ok      { background: var(--gbs-gruen); border-color: var(--gbs-gruen); color: #000; font-weight: 600; }   /* z. B. GBS Software: aktuelle Version (GBS-Grün, schwarze Schrift – Wunsch Benutzer) */
/* Hinweise auf Kacheln: die allgemeine Regel „.kacheln span“ (Block, Abstand, graue Schrift) hier aufheben → Rahmen eng untereinander */
.kacheln .etikett-klein { display: inline-block; margin-top: .2rem; font-size: .78rem; color: var(--text); }
.kacheln .etikett-meldung { color: #fff; }
.kacheln .etikett-ok { color: #000; }
/* Kennzeichen „wer sieht die Kachel?“ oben rechts (nur für Lehrkräfte): S Lernende, L Lehrkräfte, K Klassenleitungen, T Tool-Admins, A Admins */
.kacheln a, .kacheln .kachel-aus { position: relative; }
.kacheln a:has(.kz-ecke) > strong, .kacheln .kachel-aus:has(.kz-ecke) > strong { padding-right: 6rem; }
.kacheln .kz-ecke { position: absolute; top: .45rem; right: .45rem; display: flex; gap: 3px; margin: 0; }
.kacheln .kz { display: inline-flex; align-items: center; justify-content: center; width: 1.3rem; height: 1.3rem; margin: 0;
  border: 1px solid; border-radius: 50%; font-size: .72rem; font-weight: 600; line-height: 1; cursor: help; }
.kacheln .kz-S { background: #eaf3de; color: #27500a; border-color: #639922; }
.kacheln .kz-L { background: #fdece2; color: #7a3410; border-color: var(--gbs-orange); }
.kacheln .kz-K { background: #f1efe8; color: #444441; border-color: var(--gbs-alu); }
.kacheln .kz-T { background: var(--hintergrund); color: #3f6410; border-color: var(--gbs-gruen-dunkel); }
.kacheln .kz-1 { background: var(--hintergrund); color: #7a3410; border-color: var(--gbs-orange); border-style: dashed; }   /* Einzelpersonen */
.kacheln .kz-A { background: #2e2f2d; color: #fff; border-color: #2e2f2d; }
.kacheln .kz-X { background: transparent; color: var(--leise); border-style: dashed; border-color: var(--gbs-alu); }
@media (max-width: 599px) { .kacheln .kz { width: 1.15rem; height: 1.15rem; font-size: .66rem; } }
.statuszeile svg { flex: 0 0 auto; }
.status-ok svg      { color: var(--ok); }
.status-hinweis svg { color: #f2b705; }   /* Gelb – Text daneben bleibt dunkel und lesbar */
.status-fehlt svg   { color: var(--fehler); }
.status-offen       { color: var(--leise); }

td.status-beantragt { color: var(--akzent); font-weight: 600; }
td.status-aktiv     { color: var(--ok); font-weight: 600; }
td.status-abgelehnt { color: var(--leise); }

h3 { font-size: 1.05rem; margin: 1rem 0 .25rem; }

/* ---------- Genehmigungen ---------- */

.status-box { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; }
.status-box p { margin: 0; }

.anfrage { margin: 1rem 0; }
.anfrage-entfernung { border-left: 4px solid var(--fehler); }
.anfrage p { margin: .25rem 0 .75rem; }
.anfrage-aktionen { display: grid; gap: .75rem; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: .5rem; }
.meldung .knopf { margin-left: .5rem; }

/* ---------- Import ---------- */

.kachel-aus {
  display: block;
  height: 100%;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--rand);
  border-radius: 10px;
  color: var(--leise);
}
.kachel-aus strong { color: var(--leise); }
.kacheln .kachel-aus { background: var(--flaeche); cursor: not-allowed; }   /* Startseite: Tool gerade nicht nutzbar */

/* ---------- Adminpanel: Kategorien als farbig abgesetzte Kästen (Farben aus dem GBS-Theme) ---------- */
.kat-orange { --kat-rand: var(--gbs-orange); --kat-flaeche: var(--hinweis); }
.kat-gruen  { --kat-rand: var(--gbs-gruen);  --kat-flaeche: #f1f8e3; }   /* zartes GBS-Grün */
.kat-alu    { --kat-rand: var(--gbs-alu);    --kat-flaeche: var(--flaeche); }
.admin-kategorie { margin: 1.25rem 0; padding: .9rem 1.1rem 1.1rem; border: 1px solid var(--rand); border-left: 6px solid var(--kat-rand);
  border-radius: 12px; background: var(--kat-flaeche); }
.admin-kategorie > h2 { margin: 0 0 .8rem; }
.admin-kategorie .kacheln li a, .admin-kategorie .kacheln li .kachel-aus { border-top-color: var(--kat-rand); }
.admin-kategorie .kacheln .kachel-aus { background: var(--hintergrund); opacity: .75; }
/* Seitenleiste: Kategorie-Überschrift mit Farbstrich */
.admin-leiste-gruppe[class*="kat-"] { border-left: 4px solid var(--kat-rand); padding-left: .45rem; }
/* Design › Adminpanel: Reihenfolge mit ↑/↓ */
.reihenfolge-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.reihenfolge-liste { margin: 0; padding-left: 1.6rem; }
.reihenfolge-liste li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .3rem .4rem; border-bottom: 1px solid var(--rand); background: var(--hintergrund); }
.reihenfolge-liste li:last-child { border-bottom: 0; }
.reihenfolge-knoepfe { display: inline-flex; gap: .3rem; }
.reihenfolge-knopf { min-width: 2.2rem; }
.reihenfolge-knopf:disabled { opacity: .35; cursor: default; }
.reihenfolge-kopf { flex-wrap: wrap; margin-bottom: .6rem; }
.reihenfolge-liste li { flex-wrap: wrap; }
.reihenfolge-knoepfe { flex-wrap: wrap; align-items: center; }
input.reihenfolge-name { display: inline-block; width: auto; min-width: 12rem; font-weight: 600; }

.kennzahlen .kz-neu       { border-left-color: var(--gbs-gruen); }
.kennzahlen .kz-geaendert { border-left-color: var(--gbs-orange); }
.kennzahlen .kz-archiv    { border-left-color: var(--gbs-alu); }
.kennzahlen .kz-warnung   { border-left-color: var(--fehler); }

.abschnitt { padding: .25rem .9rem .5rem; border: 1px solid var(--rand); border-radius: 8px; margin: .75rem 0; }
.abschnitt .tabelle-scroll { margin: .5rem 0; }

.sammelwahl { margin: .75rem 0; max-width: 420px; }
.sammelwahl p { margin: .25rem 0 0; }
select.pg-wahl { min-width: 12rem; }

.warnliste { margin: .5rem 0; padding-left: 1.2rem; }
.warnliste li { margin: .25rem 0; }

.aenderung { display: inline-block; font-size: .95rem; }
.aenderung del { color: var(--leise); }
.aenderung ins { text-decoration: none; font-weight: 600; color: var(--gbs-gruen-dunkel); }

label.haken { display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; }

fieldset.auswahl { display: grid; gap: .6rem; margin: 0; padding: .75rem 1rem; border: 1px solid var(--rand); border-radius: 8px; background: var(--hintergrund); }
fieldset.auswahl legend { padding: 0 .4rem; font-weight: 600; }
fieldset.auswahl label.haken { font-weight: 400; }
label.haken input { width: 1.4rem; height: 1.4rem; margin-top: .1rem; flex: 0 0 auto; }

input[type="file"] { display: block; margin-top: .4rem; font: inherit; max-width: 100%; }

/* ---------- Anmeldeseite ---------- */

.anmeldung { max-width: 520px; margin: 1.5rem auto; text-align: center; }
.anmeldung img { width: 260px; margin-bottom: 1.5rem; }

.knopf-gross { gap: .7rem; min-height: 52px; padding: .7rem 1.4rem; font-size: 1.05rem; width: 100%; max-width: 360px; }
.ms-logo { flex: 0 0 auto; background: #fff; padding: 2px; border-radius: 3px; }

.trenner { display: flex; align-items: center; gap: .75rem; margin: 1.75rem 0 1rem; color: var(--leise); }
.trenner::before, .trenner::after { content: ""; flex: 1; border-top: 1px solid var(--rand); }

/* ---------- Handy (schmal) ---------- */

@media (max-width: 559px) {
  .konto-name { display: none; }

  /* Tabellen untereinander statt nebeneinander */
  .daten, .daten tbody, .daten tr, .daten th, .daten td { display: block; width: auto; }
  .daten tr { padding: .5rem 0; border-bottom: 1px solid var(--rand); }
  .daten th, .daten td { border: 0; padding: .1rem 0; }
  .daten th { color: var(--leise); font-weight: 500; font-size: .9rem; }
}

/* ---------- iPad und größer ---------- */

@media (min-width: 560px) {
  .kacheln { grid-template-columns: repeat(2, 1fr); }
  .kennzahlen { grid-template-columns: repeat(4, 1fr); }
  .filter { grid-template-columns: 2fr 1fr 1fr auto; }
}

@media (min-width: 760px) {
  .spalten { grid-template-columns: 1fr 1fr; align-items: start; }
}

@media (min-width: 900px) {
  .kopf { padding: .75rem 1.5rem; }
  .marke img { height: 48px; }
  h1 { font-size: 1.75rem; }
  /* so viele Kacheln nebeneinander wie Platz ist (bei 960 px: 3) */
  .kacheln { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  /* Breite der normalen Seiten – einstellbar im Adminpanel › System › Design (CSS-Variable aus layout.php) */
  .inhalt { max-width: var(--breite-seite, 960px); }
  /* Tool-Admin-Seiten mit Häkchen „Breite Ansicht“ (je Person und Tool) */
  main.inhalt.tooladmin-breit { max-width: var(--breite-tooladmin, 1440px); }
}

/* Häkchen „Breite Ansicht“ oben rechts auf Tool-Admin-Seiten – nur auf breiten Bildschirmen sinnvoll */
.breite-schalter { display: none; }
@media (min-width: 900px) {
  .breite-schalter { display: flex; justify-content: flex-end; margin: 0 0 -.5rem; font-size: .85rem; color: var(--leise); }
  .breite-schalter label { display: inline-flex; align-items: center; gap: .35rem; margin: 0; font-weight: 400; cursor: pointer; }
  .breite-schalter input[type="checkbox"] { width: 1.1rem; height: 1.1rem; margin: 0; }
}
@media print { .breite-schalter { display: none !important; } }

/* ---------- Wer unterrichtet wen und was? ----------
   Breite Tabelle (Klassen × Fächer): kompakt, erste Spalte bleibt beim Scrollen stehen, Druck A4 quer je Tabelle eine Seite. */
/* Gitterlinien: separate Ränder (nötig für die fixierte erste Spalte) – je Zelle rechts + unten, außen oben + links */
.ue-tabelle { font-size: .85rem; border-collapse: separate; border-spacing: 0; border-top: 1px solid #b9b8b4; border-left: 1px solid #b9b8b4; }
.ue-tabelle th, .ue-tabelle td { padding: .35rem .5rem; white-space: nowrap; text-align: center; vertical-align: middle;
  border-right: 1px solid #b9b8b4; border-bottom: 1px solid #b9b8b4; }
.ue-tabelle thead th { cursor: help; background: #e4ebd6; border-bottom: 2px solid #8a9a6b; }
.ue-tabelle th[scope="row"], .ue-tabelle thead th:first-child { position: sticky; left: 0; z-index: 1; text-align: left; border-right: 2px solid #8a9a6b; }
/* Zeilen abwechselnd hinterlegt (auch die fixierte Klassenspalte), Zeile unter der Maus hervorgehoben */
.ue-tabelle tbody tr:nth-child(odd) th, .ue-tabelle tbody tr:nth-child(odd) td { background: var(--hintergrund); }
.ue-tabelle tbody tr:nth-child(even) th, .ue-tabelle tbody tr:nth-child(even) td { background: #efeeeb; }   /* warmes Grau (GBS-Alu aufgehellt) */
.ue-tabelle tbody tr:hover th, .ue-tabelle tbody tr:hover td { background: #f1f8e3; }                       /* zartes GBS-Grün */
.ue-tabelle tr.ue-meine th, .ue-tabelle tr.ue-meine td { background: var(--hinweis); font-weight: 600; }
.ue-mit-namen td { white-space: normal; min-width: 7rem; }
.ue-legende { margin-top: -.5rem; }
.ue-meine-klasse .st-info { grid-template-columns: max-content 1fr; }
/* Druckansicht auch am Bildschirm in Druckbreite (A4 quer 297 mm − 2 × 10 mm Rand) und Druckschrift – so kann app.js
   ([data-druck-einpassen]) eine zu breite Tabelle per zoom passend verkleinern; das gilt dann genauso beim Drucken */
.ue-druckseite { width: 277mm; }
.ue-druck { font-size: 7pt; width: 100%; }
.ue-druck th, .ue-druck td { padding: .1rem .2rem; }
@media print {
  body:has(.ue-druckseite) :is(.kopf, .farbband, .brotkrumen, .fuss, .umgebung, .wartungsbalken, .admin-leiste, .sjw-nicht-drucken, .meldung, .breite-schalter) { display: none !important; }
  body:has(.ue-druckseite) main.inhalt { max-width: none; padding: 0; margin: 0; display: block; }
  body:has(.ue-druckseite) .tabelle-scroll { overflow: visible; margin: 0; }
  /* Seitenrand kommt von hier (@page margin 0 → keine Kopf-/Fußzeile des Browsers); clone = Rand auch auf Folgeseiten einer langen Tabelle */
  .ue-druckseite { width: auto; break-after: page; padding: 10mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
  .ue-druckseite:last-child { break-after: auto; }
  .ue-druckseite h2 { font-size: 12pt; margin: 0 0 .3rem; }
  .ue-druck { print-color-adjust: exact; -webkit-print-color-adjust: exact; }   /* Zeilenfarben mitdrucken */
  .ue-druck th, .ue-druck td { border-right: 1px solid #888; border-bottom: 1px solid #888; }
  .ue-druck th[scope="row"], .ue-druck thead th:first-child { position: static; }
  .ue-druck tr { break-inside: avoid; }
  .ue-legende { font-size: 7pt; margin: .2rem 0 0; }
}

/* ---------- Kursmappen archivieren ---------- */
.km-karten { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin: 1rem 0; }
.km-karte { margin: 0; border-left: 6px solid var(--fehler); }
.km-karte.km-da { border-left-color: var(--gbs-gruen); }
.km-karte h2 { font-size: 1.1rem; margin: 0 0 .4rem; }
.km-status { margin: 0 0 .6rem; }
/* Ablagefeld: das Datei-Feld liegt unsichtbar über der ganzen Fläche (Klicken und Ziehen funktionieren) */
.km-ablage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 5.5rem; margin: 0; padding: .8rem;
  border: 2px dashed var(--gbs-alu); border-radius: 10px; background: var(--flaeche); text-align: center; font-weight: 400; cursor: pointer; }
.km-ablage input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.km-ablage:hover, .km-ablage.km-ueber, .km-ablage:focus-within { border-color: var(--gbs-orange); background: var(--hinweis); }
.km-ablage.km-laedt { border-style: solid; border-color: var(--gbs-gruen); background: #f1f8e3; }
/* allgemeines Ablagefeld in Formularen (app.js label.ablage): gewählt = grün, Hochladen erst mit dem Absende-Knopf */
.km-ablage.km-gewaehlt { border-style: solid; border-color: var(--gbs-gruen); background: #f1f8e3; font-weight: 600; }
.formular .ablage, .ablage { margin: .3rem 0 .6rem; max-width: 40rem; }
.ablage-titel { display: block; margin: .6rem 0 0; font-weight: 600; }
.km-faecher { display: grid; gap: .2rem 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: .5rem 0 1rem; }
.liste tr.km-neue-klasse td { border-top: 2px solid var(--gbs-alu); }
.km-gefahr { border-color: var(--fehler); }

/* ---------- Austausch Blog ---------- */
.aus-info { margin: .25rem 0 1rem; color: var(--leise); }
.aus-karten { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 1rem 0; }
.aus-karte { display: flex; flex-direction: column; gap: .3rem; margin: 0; border-top: 5px solid var(--gbs-gruen); color: var(--text); text-decoration: none; }
.aus-karte:hover { background: var(--hinweis); border-color: var(--gbs-orange); }
.aus-karte strong { font-size: 1.1rem; }
.aus-beschreibung { max-width: 46rem; margin: 0 0 1.25rem; padding: .8rem 1rem; border-left: 4px solid var(--gbs-gruen); background: #f1f8e3; border-radius: 6px; }
.aus-beschreibung p:first-child { margin-top: 0; }
.aus-beschreibung p:last-child { margin-bottom: 0; }
.aus-blog { display: flex; flex-direction: column; gap: 1.25rem; max-width: 46rem; }
.aus-beitrag { padding: 1rem 1.25rem; border: 1px solid var(--rand); border-top: 4px solid var(--gbs-orange); border-radius: 10px; background: var(--hintergrund); }
.aus-beitrag h2 { margin: 0 0 .2rem; font-size: 1.25rem; }
.aus-meta { margin: 0 0 .6rem; font-size: .9rem; color: var(--leise); }
.aus-text { line-height: 1.55; overflow-wrap: anywhere; }
.aus-text ul { padding-left: 1.4rem; }
.aus-bilder { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: .75rem 0 0; }
.aus-bilder img { display: block; width: 100%; height: 150px; object-fit: cover; border-radius: 6px; background: var(--flaeche); }
.aus-bild { display: block; }
.aus-bild:focus-visible img, .aus-bild:hover img { outline: 3px solid var(--gbs-orange); }
.aus-bild-weg { margin: 0; font-weight: 400; }
.aus-bild-weg span { display: block; font-size: .9rem; }
.aus-lightbox { max-width: 96vw; max-height: 96vh; padding: .5rem; border: 0; border-radius: 8px; text-align: center; }
.aus-lightbox::backdrop { background: rgba(0, 0, 0, .8); }
.aus-lightbox img { display: block; max-width: calc(96vw - 1rem); max-height: calc(96vh - 4rem); margin: 0 auto .5rem; }
.aus-leiste { display: flex; gap: .35rem; margin-bottom: .35rem; }
.aus-vorschau { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; }
.aus-vorschau img { width: 90px; height: 90px; object-fit: cover; border-radius: 6px; }
.aus-felder { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.aus-felder label { flex: 1 1 12rem; }
.aus-stufe { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: .35rem 0; }
.aus-personen { padding-left: 1.2rem; }
.aus-personen li { margin: .25rem 0; }
.aus-pruefen { max-width: 48rem; border-left: 6px solid var(--gbs-orange); }
.aus-pruefen .aus-beitrag { border: 0; padding: 0; background: transparent; }
.aus-pruefaktionen { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--rand); }
.aus-aktionen { margin: -.9rem 0 0; padding: .4rem 1.25rem .6rem; border: 1px solid var(--rand); border-top: 0; border-radius: 0 0 10px 10px; background: var(--flaeche); }
.aus-aktionen form { margin: .4rem 0; }
.aus-eigener { max-width: 46rem; margin-bottom: 1rem; }
.aus-eigener h2 { font-size: 1.1rem; margin: 0 0 .25rem; }

/* ---------- Verwaltungsrechte Microsoft 365 (Schlüsseldatei) ---------- */
.vs-kasten { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.vs-upload p { margin: 0 0 .5rem; }

/* Sicherheitswarnungen (Adminpanel › Aktionen) */
.warnungen-box { border-left: 6px solid var(--fehler); background: #fdecea; }
.software-box { border-left: 6px solid var(--gbs-orange); background: var(--hinweis); }
.warnungen-liste { list-style: none; padding: 0; margin: .5rem 0; }
.warnungen-liste li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--rand); }
.vs-upload .km-ablage { min-height: 4rem; max-width: 34rem; background: var(--hintergrund); }

/* ---------- Konferenzplan ---------- */
.kp-slot { margin-top: 1.5rem; }
.kp-slot h2 { margin-bottom: .3rem; }
.kp-tabelle td.kp-pflicht { font-weight: 600; }
.kp-tabelle td.kp-egal { color: var(--leise); font-weight: 400; }
.kp-tabelle .kp-trenner { border-left: 2px solid #8a9a6b; }
.kp-hart { background: var(--fehler); color: #ffd6dc; font-weight: 700; padding: 0 .2rem; border-radius: 3px; outline: 1px solid var(--fehler); }
.kp-warn { background: var(--hinweis); color: #8a4b00; font-weight: 600; padding: 0 .2rem; border-radius: 3px; outline: 1px solid var(--gbs-orange); }
.kp-doppelt { text-decoration: underline dotted; text-underline-offset: 2px; }
.kp-legende span { margin-right: .8rem; }
.kp-meine { border-left: 6px solid var(--gbs-gruen); }
.kp-meine td.kp-pflicht { font-weight: 600; }
.kp-ohne { border-left: 6px solid var(--fehler); background: #fdecea; }
.kp-ohne ul { margin: .3rem 0; }
.kp-matrix td, .kp-matrix th { text-align: center; }
.kp-matrix th[scope="row"] { text-align: left; font-weight: 400; }
.kp-einteilung select { max-width: 11rem; }
.kp-einteilung tr.kp-fixiert td:first-child::after { content: " 📌"; }
.kp-zahlen { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: .4rem 0; }
/* ---------- Konferenzaufruf ---------- */
.ka-anzeige { display: flex; flex-direction: column; gap: 1rem; min-height: 70vh; padding: 1rem; background: var(--hintergrund); }
.ka-anzeige:fullscreen { min-height: 100vh; padding: 2rem 3rem; }
.ka-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
.ka-name { font-weight: 600; font-size: 1.2rem; }
.ka-fortschritt { color: var(--leise); }
.ka-knoepfe { margin-left: auto; display: flex; gap: .5rem; }
.ka-klasse { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1;
             font-size: clamp(5rem, 24vw, 32rem); font-weight: 700; letter-spacing: .02em; }
.ka-klasse-text { font-size: clamp(2rem, 7vw, 6rem); font-weight: 600; color: var(--leise); }
.ka-naechste { text-align: center; font-size: clamp(1.2rem, 3vw, 2.5rem); color: var(--leise); min-height: 1.2em; }
.ka-nachricht { background: #c00000; color: #ffe600; font-weight: 700; text-align: center; padding: 1rem 1.5rem; border-radius: 10px;
                font-size: clamp(1.5rem, 5vw, 4.5rem); line-height: 1.15; }
.ka-nachricht-klein { font-size: 1.2rem; padding: .5rem 1rem; margin-bottom: .5rem; }
.ka-verbindung { text-align: center; color: var(--fehler); margin: 0; }
.ka-empfaenger { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 2rem; }
.ka-empfaenger h3 { margin: 0 0 .3rem; }
.ka-empfaenger-fuss { grid-column: 1 / -1; margin: 0; }
.ka-lehrkraefte { margin: 0; padding-left: 1.1rem; }
.ka-geraet { color: var(--gbs-gruen); font-weight: 700; }
@media (max-width: 700px) { .ka-empfaenger { grid-template-columns: 1fr; } }
.ka-ton-warten { border-color: var(--gbs-orange); background: var(--hinweis); }
.ka-blitz { animation: ka-blitz 1.6s ease-out; }   /* kurzes Aufleuchten bei neuem Aufruf bzw. Gong */
@keyframes ka-blitz { 0%, 40% { background: #fff3b0; } 100% { background: var(--hintergrund); } }
.ka-oeffentlich-inhalt { max-width: none; }
.ka-gross-knopf { font-size: 1.4rem; padding: .9rem 1.6rem; }
.ka-regie-klasse { font-size: 4rem; font-weight: 700; line-height: 1; margin: .2rem 0 .6rem; }

/* Druck kompakt: alle Slots untereinander, Inhalt so breit wie die breiteste Tabelle (wird per JS auf eine Seite verkleinert) */
.kp-kompakt { box-sizing: content-box; }   /* Höhe setzt app.js (verkleinerter Inhalt), Druckrand kommt dazu */
.kp-kompakt-inhalt { width: max-content; }
@media screen { .ue-druckseite.kp-hoch { width: 190mm; } }   /* Hochformat: A4 hoch minus 2 × 10 mm (Druck: Breite auto) */
.kp-kompakt-inhalt h2 { margin: 0 0 .3rem; }
.kp-kompakt-slot { margin: 0 0 .6rem; }
.kp-kompakt-slot h3 { font-size: 1rem; margin: .4rem 0 .2rem; }
.kp-kompakt-inhalt .kp-legende { width: 0; min-width: 100%; }   /* Legende bricht um, statt den Inhalt zu verbreitern */
@media print {
  .kp-hart, .kp-warn { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .kp-kompakt { break-after: auto; }
  .kp-kompakt-slot, .kp-kompakt-slot table { break-inside: avoid; }
}
