:root {
  --grund: #eef3f9; --flaeche: #fff; --text: #14263a; --leise: #51647a; --rand: #c6d3e2;
  --akzent: #0d3b66; --akzent-text: #fff; --hell: #e2ecf7; --kopf: #0d3b66; --gold: #f2b93b; --fehler: #a3271f; --warn: #fff4d6;
}
@media (prefers-color-scheme: dark) {
  :root { --grund: #10171f; --flaeche: #18222d; --text: #e4ecf5; --leise: #9bb0c6; --rand: #34465a;
    --akzent: #8cc0f0; --akzent-text: #06182a; --hell: #21364b; --kopf: #0f3558; --gold: #f2b93b; --fehler: #ff9c93; --warn: #3d3416; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, "Segoe UI", sans-serif; background: var(--grund); color: var(--text); }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
a { color: var(--akzent); }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.laden { padding: 2rem; color: var(--leise); }
.rahmen { display: flex; flex-direction: column; height: 100vh; }
.kopf { background: var(--flaeche); border-bottom: 1px solid var(--rand); flex: none; }
.menue { display: flex; align-items: center; gap: 1rem; background: var(--kopf); color: #fff; padding: 0 .8rem; }
.menue nav { display: flex; flex-wrap: wrap; flex: 1; }
.menue nav a { color: #fff; text-decoration: none; padding: .55rem .9rem; border-bottom: 3px solid transparent; }
.menue nav a:hover { background: rgb(255 255 255 / 12%); }
.menue nav a[aria-current] { background: var(--flaeche); color: var(--text); border-color: var(--gold); font-weight: 600; }
.menue .abmelden { background: none; color: #fff; border-color: rgb(255 255 255 / 45%); min-height: 32px; padding: .2rem .7rem; }
.flaeche { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.flaeche.mitauswahl { grid-template-columns: 290px minmax(0, 1fr); }
main { padding: 1rem 1.2rem; width: 100%; overflow-y: auto; min-height: 0; }
.statusleiste { flex: none; display: flex; flex-wrap: wrap; gap: .2rem 1.5rem; padding: .25rem .8rem; font-size: .78rem; color: var(--leise); background: var(--flaeche); border-top: 1px solid var(--rand); }
.filterstand { flex: 1; }
.auswahl { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--rand); background: var(--flaeche); padding: .6rem; gap: .5rem; }
.kasten { border: 1px solid var(--rand); border-radius: 6px; overflow: hidden; flex: none; }
.kasten h2 { margin: 0; padding: .3rem .6rem; font-size: .88rem; background: var(--hell); border-left: 4px solid var(--kopf); }
.auswahlfelder { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .5rem; }
.statusliste { display: flex; flex-direction: column; gap: .15rem; overflow-y: auto; max-height: 200px; }
.auswahlspalte { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.auswahl select, .auswahl input[type=search] { min-height: 30px; padding: .15rem .4rem; width: 100%; min-width: 0; }
.suchzeile { display: flex; gap: .3rem; flex: none; }
.suchzeile button { min-height: 30px; padding: 0 .5rem; }
.personenkopf { display: grid; grid-template-columns: 18px minmax(0, 1fr) 3.4rem; gap: .5rem; align-items: center; padding: .18rem .5rem; }
.personen a { display: grid; grid-template-columns: minmax(0, 1fr) 3.4rem; gap: .4rem; padding: .18rem .5rem; }
.personzeile { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: .1rem; padding-left: .7rem; border-bottom: 1px solid var(--rand); }
.personenkopf { font-weight: 600; font-size: .82rem; background: var(--hell); border-left: 4px solid var(--kopf); flex: none; }
.personen { flex: 1; min-height: 0; overflow-y: auto; border: 1px solid var(--rand); }
.personen a { color: var(--text); text-decoration: none; font-size: .88rem; border-left: 4px solid transparent; }
.personen a span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.personen a:hover { background: var(--hell); }
.personen a[aria-current] { background: var(--hell); border-left-color: var(--gold); font-weight: 600; }
.nurschmal { display: none; }
.kartenform > :is(form, div) { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: .8rem; align-items: start; }
.kartenform .gruppe { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 6px; overflow: hidden; }
.kartenform .gruppe h3 { margin: 0; padding: .35rem .7rem; font-size: .92rem; background: var(--hell); border-left: 4px solid var(--kopf); }
.kartenform .felder { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem .7rem; padding: .7rem; align-items: end; }
.kartenform label { color: var(--text); font-weight: 600; }
.kartenform label.haken { font-weight: 400; grid-column: 1 / -1; }
.kartenform :is(input:not([type=checkbox]), select) { min-height: 32px; padding: .2rem .45rem; font-weight: 400; }
.kartenform form > .fehler { grid-column: 1 / -1; margin: 0; }
.kartenform form > .knoepfe { grid-column: 1 / -1; margin: 0 0 1rem; position: sticky; bottom: 0; background: var(--grund); padding: .5rem 0; }
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 8px; padding: 1.1rem; margin-bottom: 1rem; }
.hinweis { background: var(--warn); border-radius: 6px; padding: .5rem .8rem; margin: 0 0 1rem; }
.fehler { color: var(--fehler); }
.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.zahlen b { display: block; font-size: 1.8rem; line-height: 1.2; }
.werkzeug { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: 1rem; }
label { display: flex; flex-direction: column; gap: 2px; font-size: .85rem; color: var(--leise); }
input, select, button { font: inherit; color: var(--text); background: var(--flaeche); border: 1px solid var(--rand); border-radius: 6px; padding: .4rem .6rem; min-height: 38px; }
button { cursor: pointer; }
button.haupt { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
.tabelle { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .45rem .75rem; border-bottom: 1px solid var(--rand); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--hell); }
th button { border: 0; background: none; padding: 0; min-height: 0; font-weight: 600; }
.felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem 1rem; }
.felder div span { display: block; font-size: .85rem; color: var(--leise); }
.knoepfe { display: flex; gap: .6rem; margin-top: 1rem; }
#meldung { position: fixed; right: 1rem; bottom: 1rem; }
#meldung p { background: var(--text); color: var(--grund); padding: .6rem 1rem; border-radius: 6px; margin: 0; }
@media (max-width: 800px) {
  .rahmen { height: auto; min-height: 100vh; }
  .menue { flex-wrap: wrap; padding: .3rem .6rem; gap: .3rem; }
  .menue nav { order: 3; flex-basis: 100%; }
  .menue nav a { padding: .35rem .6rem; }
  .menue .abmelden { margin-left: auto; }
  .flaeche.mitauswahl { grid-template-columns: minmax(0, 1fr); }
  .flaeche.mitauswahl .personen { max-height: 45vh; }
  .flaeche.mitperson .auswahl { display: none; }
  .auswahl { border-right: 0; }
  .nurschmal { display: block; }
  main { padding: .8rem; overflow: visible; }
}
.reiter { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--rand); margin-bottom: 1rem; }
.reiter a { padding: .45rem .8rem; text-decoration: none; color: var(--text); border-bottom: 3px solid transparent; }
.reiter a[aria-current] { border-color: var(--akzent); font-weight: 600; }
h3 { font-size: 1rem; margin: 1.2rem 0 .6rem; }
.gruppe:first-child h3 { margin-top: 0; }
textarea { font: inherit; color: var(--text); background: var(--flaeche); border: 1px solid var(--rand); border-radius: 6px; padding: .4rem .6rem; width: 100%; }
label.haken { flex-direction: row; align-items: center; gap: .5rem; color: var(--text); }
label.breit { grid-column: 1 / -1; }
.felder input:not([type=checkbox]), .felder select { width: 100%; min-width: 0; }
input[type=checkbox] { min-height: 0; width: 18px; height: 18px; }
.info { color: var(--leise); font-size: .85rem; margin: 0 0 .5rem; }
a.knopf { display: inline-block; padding: .4rem .8rem; border: 1px solid var(--rand); border-radius: 6px; text-decoration: none; background: var(--flaeche); color: var(--text); min-height: 38px; }
input.schmal { width: 80px; }
.werkzeug label.haken { min-height: 38px; }
.auswahlliste { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .3rem .8rem; max-height: 320px; overflow-y: auto; }
.blatt { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 8px; padding: 1.2rem; margin-bottom: 1rem; }
.anschrift, .brieftext { white-space: pre-line; }
.rechts { text-align: right; }
@media print {
  :root { --flaeche: #fff; --text: #000; --leise: #333; --rand: #999; --grund: #fff; --hell: #fff; }
  .kopf, .auswahl, .statusleiste, .reiter, .nichtdrucken, .hinweis, #meldung, button { display: none; }
  .rahmen, .flaeche { display: block; height: auto; }
  main { padding: 0; overflow: visible; }
  main:has(.druck) > h1 { display: none; }
  .blatt { border: 0; padding: 0; margin: 0; break-after: page; }
  .blatt:last-child { break-after: auto; }
  .tabelle { border: 0; overflow: visible; }
  th, td { border: 1px solid #999; padding: 2px 5px; font-size: 10pt; }
  tr { break-inside: avoid; }
  .brief .anschrift { margin: 2.5cm 0 1.5cm; }
}
button.gefahr { color: var(--fehler); border-color: var(--fehler); }
dialog.frage { background: var(--flaeche); color: var(--text); border: 1px solid var(--rand); border-radius: 8px; padding: 1.2rem; max-width: min(420px, 90vw); }
dialog.frage::backdrop { background: rgb(0 0 0 / 45%); }
pre { white-space: pre-wrap; font-size: .85rem; background: var(--grund); padding: .6rem; border-radius: 6px; }
/* Anmeldeseite: immer hell auf Blau, unabhängig vom Farbschema */
.anmeldung { --flaeche: #eaf2fb; --text: #12263a; --leise: #41566b; --rand: #9db9d6; --fehler: #a3271f; --warn: #fff4d6; --akzent: #0d3b66; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1.5rem 1rem; background: #0b3357 url(hintergrund.svg) center / cover no-repeat; color: #fff; }
.anmeldung header { text-align: center; }
.anmeldung header h1 { font-size: 3.2rem; line-height: 1.1; margin: 0; }
.anmeldung header p { margin: .2rem 0 0; }
.anmeldung .untertitel { font-size: 1.1rem; font-weight: 600; }
.anmeldefeld { width: 100%; max-width: 380px; background: var(--flaeche); color: var(--text); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: 0 8px 30px rgb(0 0 0 / 30%); }
.anmeldefeld form { display: flex; flex-direction: column; gap: .7rem; }
.anmeldefeld label { color: var(--text); }
.anmeldefeld input, .anmeldefeld select, .anmeldefeld button { background: #fff; color: var(--text); }
.anmeldefeld select:disabled { opacity: .7; }
.anmeldefeld .info { margin: 0; }
.anmeldefeld .fehler { margin: 0; min-height: 1.3em; }
.anmeldefeld .fehler:empty { min-height: 0; }
.anmeldefeld .paar { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.anmeldefeld button.haupt { background: #f2b93b; border-color: #c98f12; color: #2b1d00; }
.anmeldung .hinweis { max-width: 380px; margin: 0; color: #3a2c00; }
.anmeldung .kleingedruckt { font-size: .8rem; margin: 0; text-align: center; }
.anmeldung .kleingedruckt a { color: inherit; }
.fotobereich { display: inline-flex; align-items: flex-start; gap: .6rem; }
.fotobereich canvas { border: 1px solid var(--rand); border-radius: 6px; }
details.karte > summary { cursor: pointer; font-weight: 600; }
details.karte[open] > summary { margin-bottom: .8rem; }
[hidden] { display: none !important; }
main > .kasten { background: var(--flaeche); margin-bottom: 1rem; }
main > .kasten .tabelle { border: 0; border-radius: 0; }
main > .kasten > :is(.knoepfe, .info) { padding: .5rem .7rem; margin: 0; }
tr.waehlbar { cursor: pointer; }
tr.waehlbar:hover { background: var(--hell); }
tr.waehlbar[aria-selected=true] { background: var(--hell); box-shadow: inset 4px 0 var(--gold); }
button.link { border: 0; background: none; padding: 0; min-height: 0; color: var(--akzent); text-decoration: underline; }
.halbjahr { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 1rem; align-items: start; }
.unterreiter button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--text); padding: .45rem .7rem; min-height: 0; }
.unterreiter button:hover { background: var(--hell); }
.unterreiter button[aria-current] { border-color: var(--akzent); font-weight: 600; }
tfoot td { font-weight: 600; background: var(--hell); }
@media (max-width: 1250px) { .halbjahr { grid-template-columns: minmax(0, 1fr); } .halbjahr > .gitter .gitterflaeche { height: 130px; } }
.kennwortzelle { display: inline-flex; align-items: center; gap: .5rem; }
.uebersichtleiste { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; margin-bottom: .5rem; padding: .3rem .4rem; background: var(--hell); border: 1px solid var(--rand); font-size: .86rem; }
.uebersichtleiste :is(button, select) { min-height: 28px; height: 28px; padding: .1rem .6rem; font-size: .86rem; border-radius: 3px; }
.uebersichtleiste button { font-weight: 600; }
.uebersichtleiste button[aria-expanded=true] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.uebersichtleiste label { flex-direction: row; align-items: center; gap: .4rem; margin-left: .6rem; color: var(--text); font-weight: 600; }
.uebersicht { width: auto; font-size: .86rem; border-collapse: separate; border-spacing: 0; }
.uebersicht :is(th, td) { text-align: center; vertical-align: top; min-width: 60px; padding: .15rem .5rem; border-right: 1px solid var(--rand); border-bottom: 1px solid var(--rand); }
.uebersicht thead :is(th, td), .uebersicht tbody th { background: var(--hell); font-weight: 600; }
.uebersicht.fest tr > :first-child { position: sticky; left: 0; z-index: 1; }
.fachzelle { line-height: 1.25; }
.fachzelle + .fachzelle { border-top: 1px dotted var(--rand); margin-top: .2rem; padding-top: .2rem; }
.fachzelle .zusatz { color: var(--leise); font-size: .92em; }
.uebersicht .stunden { font-weight: 600; color: var(--akzent); }
.gitter { background: var(--flaeche); border: 1px solid var(--kopf); margin-bottom: 1.1rem; box-shadow: 3px 3px 6px rgb(0 0 0 / 18%); }
.gitter > h2 { margin: 0; padding: .3rem .7rem; font-size: .9rem; background: var(--kopf); color: #fff; }
.gitterinhalt { padding: .45rem .5rem .5rem; }
.gitterhinweis { margin: 0 0 .7rem; font-size: .84rem; font-weight: 600; }
.gitterleiste { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: .35rem; }
.gitterleiste button { width: 24px; min-height: 24px; height: 24px; padding: 0; border-radius: 3px; background: var(--hell); line-height: 1; font-size: .9rem; }
.gitterleiste button:disabled { opacity: .45; }
.gitterflaeche { border: 1px solid var(--rand); outline: 1px solid var(--hell); overflow: auto; }
.gitterflaeche.niedrig { height: 160px; }
.gitterflaeche.hoch { height: clamp(220px, 45vh, 390px); }
.gitterflaeche table { table-layout: fixed; border-collapse: collapse; }
.gitterflaeche :is(th, td) { padding: .1rem .35rem; height: 22px; font-size: .84rem; border: 1px solid var(--rand); overflow: hidden; text-overflow: ellipsis; }
.gitterflaeche th { position: sticky; top: 0; background: var(--kopf); color: #fff; text-align: left; border-color: var(--rand); }
.gitterflaeche .zeiger { padding: 0; background: var(--kopf); color: #fff; text-align: center; }
.gitterflaeche tbody tr[aria-selected=true] { background: var(--hell); }
.gitterflaeche tbody tr[aria-selected=true] .zeiger::before { content: '▸'; font-size: .75rem; }
.gitterflaeche td.mitte { text-align: center; }
.gitterflaeche input[type=checkbox] { width: 14px; height: 14px; vertical-align: middle; }
.gitterflaeche .info { padding: .3rem .5rem; margin: 0; }
.gitterflaeche button.link { font-size: .82rem; }
.gitterflaeche.klein { height: 118px; }
.gitterflaeche th { white-space: normal; line-height: 1.15; }
.gitterflaeche td.feldzelle { padding: 0; }
.gitterflaeche td.feldzelle :is(input, select) { width: 100%; min-width: 0; min-height: 0; height: 24px; padding: 0 .3rem; border: 0; border-radius: 0; background: transparent; font-size: .84rem; }
.gitterflaeche td.feldzelle :is(input, select):focus { background: var(--flaeche); outline: 2px solid var(--akzent); outline-offset: -2px; }
.personzeile.ohnemarke { grid-template-columns: minmax(0, 1fr); padding-left: 0; }
.personenkopf.ohnemarke { grid-template-columns: minmax(0, 1fr) 3.4rem; }
.katalogseite { display: grid; grid-template-columns: 215px minmax(0, 1fr); gap: 1rem; align-items: start; }
.katalogverzeichnis { background: var(--kopf); color: #fff; padding: .7rem 0 .9rem; border-radius: 4px; }
.katalogverzeichnis h1 { font-size: 1.2rem; margin: 0 .8rem .5rem; }
.katalogverzeichnis > div { border-top: 1px solid rgb(255 255 255 / 25%); padding: .35rem 0; }
.katalogverzeichnis h2 { font-size: .88rem; margin: 0 .8rem .1rem; }
.katalogverzeichnis a { display: block; color: #fff; text-decoration: none; padding: .1rem .8rem; font-size: .88rem; border-left: 4px solid transparent; }
.katalogverzeichnis a:hover { background: rgb(255 255 255 / 14%); }
.katalogverzeichnis a[aria-current] { background: rgb(0 0 0 / 35%); border-left-color: var(--gold); font-weight: 600; }
.katalogziel { display: flex; flex-direction: row-reverse; gap: .4rem; align-items: flex-start; }
.katalogziel > .gitter { flex: 1; min-width: 0; margin-bottom: .4rem; }
.schieber { display: flex; flex-direction: column; gap: .3rem; padding-top: 5.6rem; }
.schieber button { width: 28px; min-height: 26px; height: 26px; padding: 0; font-size: .7rem; letter-spacing: -2px; }
.gitterleiste { align-items: center; }
.gitterleiste button.breit { width: auto; padding: 0 .6rem; margin-left: .7rem; font-weight: 600; font-size: .82rem; }
.gitterleiste label { flex-direction: row; align-items: center; gap: .4rem; margin-left: .7rem; font-size: .82rem; font-weight: 600; color: var(--text); }
.gitterleiste label select { min-height: 26px; height: 26px; padding: 0 .3rem; font-size: .82rem; }
.gitterleiste label input[type=checkbox] { width: 15px; height: 15px; }
.gittersuche { width: 100%; min-height: 28px; height: 28px; padding: 0 .5rem; border-radius: 0; font-size: .86rem; }
.gitterflaeche.voll { height: clamp(260px, calc(100vh - 330px), 900px); }
.gitterflaeche td.asd { background: var(--warn); }
@media (max-width: 800px) { .katalogseite { grid-template-columns: minmax(0, 1fr); } .katalogverzeichnis { max-height: 38vh; overflow-y: auto; } .schieber { padding-top: 0; flex-direction: row; } .katalogziel { flex-direction: column; } .katalogziel > .gitter { width: 100%; } .gitterflaeche.voll { height: 55vh; } }

/* ---------- Klassen-/Versetzungstabelle ---------- */
.klassenseite { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1rem; align-items: start; }
.klassenseite > .karte { grid-column: 1 / -1; }
.klassenform label:not(.haken) { display: grid; grid-template-columns: minmax(120px, 2fr) 3fr; align-items: center; gap: .5rem; color: var(--text); font-size: .86rem; font-weight: 600; }
.klassenform .felder { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
.klassenform label.haken { font-size: .86rem; }
.klassenform :is(input:not([type=checkbox]), select) { min-height: 28px; height: 28px; padding: 0 .4rem; font-weight: 400; font-size: .86rem; }
.klassenmitte .knoepfe { margin-top: .6rem; }
.klassenfest { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .4rem .8rem; margin-top: .7rem; padding-top: .5rem; border-top: 1px solid var(--rand); font-size: .86rem; }
.klassenfest span { display: block; font-weight: 600; }
@media (min-width: 1150px) { .klassenseite { grid-template-columns: minmax(0, 11fr) minmax(300px, 9fr); } .klassenlinks { grid-row: 1 / 3; } }
@media (min-width: 1650px) { .klassenseite { grid-template-columns: minmax(0, 1fr) minmax(340px, 420px) 290px; } .klassenlinks { grid-row: auto; } }

/* ---------- Individualdaten II ---------- */
.ind2, .ind2 > :is(form, div) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 .9rem; align-items: start; }
:is(.ind2, .sb, .betr, .sf) .gruppe { background: var(--flaeche); border: 1px solid var(--kopf); margin-bottom: 1.1rem; box-shadow: 3px 3px 6px rgb(0 0 0 / 18%); }
:is(.ind2, .sb, .betr, .sf) .gruppe h3 { margin: 0; padding: .3rem .7rem; font-size: .9rem; background: var(--kopf); color: #fff; }
:is(.ind2, .sb, .betr, .sf) .felder { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem .7rem; align-items: end; }
:is(.ind2, .sb, .betr, .sf) .gruppe .felder { padding: .55rem .6rem .7rem; }
:is(.ind2, .sb, .betr, .sf) .felder > * { grid-column: 1 / -1; min-width: 0; }
:is(.ind2, .sb, .betr, .sf) .felder > .halb { grid-column: auto; }
:is(.ind2, .sb, .betr, .sf) .felder label { color: var(--text); font-weight: 600; font-size: .86rem; }
:is(.ind2, .sb, .betr, .sf) .felder :is(input:not([type=checkbox]), select) { min-height: 28px; height: 28px; padding: 0 .4rem; font-weight: 400; font-size: .86rem; }
:is(.ind2, .sb, .betr, .sf) input:disabled { background: var(--grund); color: var(--text); opacity: 1; }
.ind2hinweis { margin: .4rem 0 0; font-size: .78rem; font-weight: 600; }
.ind2 form > :is(.fehler, .knoepfe) { grid-column: 1 / -1; margin: 0; }
.ind2 form > .knoepfe { position: sticky; bottom: 0; background: var(--grund); padding: .5rem 0; margin-bottom: .6rem; }
@media (min-width: 1000px) { .ind2 > form, .ind2 > div:first-child { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .ind2 { grid-template-columns: minmax(0, 13fr) minmax(0, 8fr); } }

/* ---------- Erziehungsberechtigte/Telefonnummern ---------- */
.erzdetail { margin: .6rem 0 0; }
.erzform { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; align-items: stretch; }
.erzform > .gruppe { border: 1px solid var(--kopf); background: var(--flaeche); min-width: 0; }
.erzform > .gruppe:first-child { border: 0; }
.erzform > .gruppe:first-child label { display: grid; grid-template-columns: auto minmax(0, 220px); justify-content: start; align-items: center; gap: .6rem; }
.erzform .gruppe h3 { margin: 0; padding: .25rem .6rem; font-size: .88rem; background: var(--kopf); color: #fff; }
.erzform .felder { grid-template-columns: 3fr 2fr; gap: .35rem .5rem; padding: .45rem .5rem .55rem; align-items: end; }
.erzform > .gruppe:first-child .felder { padding: 0; }
.erzform .felder > * { grid-column: 1 / -1; min-width: 0; }
.erzform .felder > .halb { grid-column: auto; }
.erzform label { color: var(--text); font-weight: 600; font-size: .86rem; }
.erzform :is(input:not([type=checkbox]), select) { min-height: 28px; height: 28px; padding: 0 .4rem; font-weight: 400; font-size: .86rem; }
.erzform textarea { flex: 1; min-height: 6rem; resize: none; font-weight: 400; font-size: .86rem; }
.erzform > :is(.fehler, .knoepfe) { grid-column: 1 / -1; margin: 0; }
.katalogplus { display: grid; place-items: center; width: 26px; height: 28px; border: 1px solid var(--rand); border-radius: 3px; background: var(--hell); color: var(--kopf); font-weight: 700; text-decoration: none; }
.leistenlink { margin-left: .7rem; font-size: .82rem; font-weight: 600; }
@media (min-width: 560px) {
  .erzform > .gruppe:last-of-type .felder { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) 26px minmax(0, 4fr); grid-template-rows: repeat(4, auto) 1fr; max-width: 800px; }
  .erzform .adr-ort, .erzform .adr-zusatz, .erzform .adr-anschreiben { grid-column: 1 / 4; }
  .erzform .adr-ortsteil { grid-column: 1 / 3; }
  .erzform .katalogplus { grid-column: 3; }
  .erzform .adr-strasse { grid-column: 1; }
  .erzform .adr-nummer { grid-column: 2 / 4; }
  .erzform .felder > .adr-uebernehmen { grid-column: 4; grid-row: 1; }
  .erzform .adr-bemerkung { grid-column: 4; grid-row: 2 / 6; align-self: stretch; }
}
@media (min-width: 900px) { .erzform { grid-template-columns: repeat(2, minmax(0, 1fr)); } .erzform > .gruppe:is(:first-child, :last-of-type) { grid-column: 1 / -1; } }
@media (min-width: 1300px) { .erzform { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2.4fr); } .erzform > .gruppe:last-of-type { grid-column: auto; } }

/* ---------- Mehrzeilige Felder im Gitter ---------- */
.gitterflaeche td.umbruch { white-space: pre-line; }
.gitterflaeche td.feldzelle textarea { display: block; width: 100%; min-height: 24px; max-height: 12rem; padding: .1rem .3rem; border: 0; border-radius: 0; background: transparent; font-size: .84rem; field-sizing: content; resize: vertical; }
.gitterflaeche td.feldzelle textarea:focus { background: var(--flaeche); outline: 2px solid var(--akzent); outline-offset: -2px; }

/* ---------- Schulbesuch ---------- */
.sb { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 .9rem; align-items: start; }
.sb > .sbform { display: contents; }
.sb > .gitter { min-width: 0; }
.sb form > :is(.fehler, .knoepfe) { margin: 0; }
.sb form > .knoepfe { position: sticky; bottom: 0; background: var(--grund); padding: .5rem 0; margin-bottom: .6rem; }
.sbzeile { display: flex; gap: .3rem; align-items: end; }
.sbzeile > label { flex: 1; min-width: 0; }
.sbzeile select { width: 100%; }
.knopflink { display: block; margin-top: .4rem; padding: .25rem .6rem; border: 1px solid var(--rand); border-radius: 3px; background: var(--hell); color: var(--kopf); font-weight: 600; font-size: .86rem; text-align: center; text-decoration: none; }
@media (min-width: 1000px) {
  .sb { grid-template-columns: minmax(0, 11fr) minmax(0, 10fr) minmax(0, 10fr); grid-template-rows: auto 1fr; }
  .sb .gruppe:nth-of-type(1) { grid-column: 1; grid-row: 1 / 3; }
  .sb .gruppe:nth-of-type(2) { grid-column: 2; grid-row: 1; align-self: stretch; }
  .sb .gruppe:nth-of-type(3) { grid-column: 3; grid-row: 1; align-self: stretch; }
  .sb > .gitter { grid-column: 2 / 4; grid-row: 2; }
  .sb .gruppe:nth-of-type(4) { grid-column: 1; grid-row: 3; }
  .sb form > :is(.fehler, .knoepfe) { grid-column: 1 / -1; }
  .sb form > .fehler { grid-row: 4; }
  .sb form > .knoepfe { grid-row: 5; }
}

/* ---------- Betriebe ---------- */
.betr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 .9rem; align-items: start; }
.betr > .gitter { min-width: 0; }
.betr .felder > .sbzeile, .betr .felder > label { grid-column: 1 / -1; }
.betr .gruppe { border: 0; box-shadow: none; margin: 0; }
.betr .gruppe .felder { padding: 0; }
.betr .knoepfe { margin-top: .6rem; }
button.katalogplus { padding: 0; min-height: 0; }
@media (min-width: 560px) {
  .betr .felder { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .betr .felder > .b1 { grid-column: auto; }
  .betr .felder > .b2 { grid-column: span 2; }
  .betr .felder > .b3 { grid-column: span 3; }
}
@media (min-width: 1100px) { .betr { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Akt. Halbjahr ---------- */
.halbjahr > * { min-width: 0; }
.funktionsleiste { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 .5rem; }
.funktionsleiste button { min-height: 28px; padding: .15rem .7rem; border-radius: 3px; background: var(--hell); font-size: .84rem; font-weight: 600; }
.gitterflaeche td.notenspalte { background: rgb(120 190 120 / 18%); }
.gitterflaeche tfoot td { position: sticky; bottom: 0; }
.zeugniskasten { max-width: 860px; }
.zeugniskasten .gruppe { border: 0; }
.zeugniskasten .felder { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .45rem .6rem; align-items: end; }
.zeugniskasten label { color: var(--text); font-weight: 600; font-size: .86rem; }
.zeugniskasten :is(input:not([type=checkbox]), select) { min-height: 28px; height: 28px; padding: 0 .4rem; font-weight: 400; font-size: .86rem; }
.zeugniskasten input:disabled { background: var(--grund); color: var(--text); opacity: 1; }
.zeugniskasten .kursiv input { font-style: italic; }
.zeugniskasten .knoepfe { margin-top: .6rem; }
.fehlzeiten { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 .9rem; align-items: start; }
@media (min-width: 1500px) { .fehlzeiten { grid-template-columns: minmax(0, 500px) minmax(0, 1fr); } }

/* ---------- Fördermaßnahmen ---------- */
.foerdleiste { gap: .4rem; }
.foerdleiste button.breit { margin: 0; }
.foerdleiste span { margin-left: .5rem; font-size: .84rem; font-weight: 600; }
.foerdkopf { display: flex; gap: .8rem; justify-content: space-between; align-items: start; }
.foerd .gruppe { margin-bottom: .7rem; border: 1px solid var(--rand); }
.foerd .gruppe h3 { margin: 0; padding: .2rem .6rem; font-size: .88rem; background: var(--kopf); color: #fff; }
.foerd .felder { grid-template-columns: minmax(0, 1fr); gap: .45rem .7rem; padding: .5rem .6rem .6rem; align-items: end; }
.foerd .felder > * { grid-column: auto; min-width: 0; }
.foerd .felder label { color: var(--text); font-weight: 600; font-size: .86rem; }
.foerd .felder :is(input:not([type=checkbox]), select) { min-height: 28px; height: 28px; padding: 0 .4rem; font-weight: 400; font-size: .86rem; }
.foerd input:disabled { background: var(--grund); color: var(--text); opacity: 1; }
.foerd textarea { min-height: 7.5rem; font-weight: 400; font-size: .86rem; resize: vertical; }
@media (min-width: 900px) {
  .foerd .gruppe:nth-of-type(1) .felder { grid-template-columns: 130px minmax(0, 2fr) minmax(0, 1fr) auto; }
  .foerd .gruppe:is(:nth-of-type(2), :nth-of-type(3)) .felder { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foerd .gruppe:nth-of-type(4) .felder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foerd .gruppe:nth-of-type(5) .felder { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
}

/* ---------- Menüband ---------- */
.werkzeugleiste { display: flex; flex-wrap: wrap; gap: .25rem; padding: .25rem .5rem; background: var(--hell); }
.werkzeugleiste section { display: flex; flex-direction: column; border: 1px solid var(--rand); border-radius: 4px; background: var(--flaeche); overflow: hidden; }
.werkzeugleiste section > div { flex: 1; display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); gap: 1px .5rem; align-content: start; align-items: center; padding: .2rem .35rem; }
.werkzeugleiste p { margin: 0; padding: .05rem .6rem; text-align: center; font-size: .74rem; color: var(--text); background: var(--hell); border-top: 1px solid var(--rand); }
.werkzeugleiste :is(a, button) { display: flex; align-items: center; gap: .4rem; border: 1px solid transparent; background: none; border-radius: 4px; padding: .1rem .45rem; min-height: 26px; color: var(--text); text-align: left; text-decoration: none; font-size: .86rem; }
.werkzeugleiste :is(a, button:not(:disabled)):hover, .werkzeugleiste a[aria-current] { background: var(--hell); border-color: var(--rand); }
.werkzeugleiste a[aria-current] { font-weight: 600; }
.werkzeugleiste .zeichen { width: 1.1em; text-align: center; color: var(--akzent); font-weight: 700; }
.werkzeugleiste .zweireihig { grid-row: span 2; }
.suchfenster { width: min(680px, 94vw); }
.suchergebnis { max-height: 45vh; overflow-y: auto; margin-top: .6rem; }
.suchergebnis a { display: grid; grid-template-columns: minmax(0, 2fr) 6rem 4rem 6rem; gap: .5rem; padding: .25rem .4rem; border-bottom: 1px solid var(--rand); color: var(--text); text-decoration: none; }
.suchergebnis a:hover { background: var(--hell); }
@media (max-width: 800px) { .werkzeugleiste section > div { display: flex; flex-wrap: wrap; } }

/* ---------- Lehrkräfte ---------- */
.ind2.lk { grid-template-columns: minmax(0, 1fr); }
.ind2.lk > :is(form, div) { max-width: 900px; }
.fotokasten { padding: .6rem; min-height: 180px; }
.sortwahl { border: 0; margin: 0; padding: 0; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .15rem .7rem; }
.sortwahl legend { font-size: .82rem; font-weight: 600; padding: 0; }
.lehrerauswahl .personenkopf { grid-template-columns: 3.9rem minmax(0, 1fr); }
.lehrerauswahl .personen a { grid-template-columns: 3.4rem minmax(0, 1fr); }
.werkzeugleiste button[aria-pressed=true] { background: var(--gold); border-color: var(--rand); color: #000; }
.werkzeugleiste button[aria-pressed=true] .zeichen { color: #000; }

/* ---------- Auswahl: Schülerfilter ---------- */
.nurliste .auswahl > .kasten { display: none; }
.filteraus { text-align: left; min-height: 30px; padding: .15rem .6rem; font-weight: 600; }
.filterleiste { display: flex; flex-wrap: wrap; gap: .3rem; align-items: end; }
.filterleiste label { font-size: .84rem; font-weight: 600; color: var(--text); }
.filterleiste :is(input, button) { min-height: 30px; padding: .1rem .7rem; }
.sf { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 .9rem; align-items: start; }
.sf .felder { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .45rem .7rem; }
.sf .felder > * { grid-column: auto; }
.sf fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.sf legend { padding: 0; font-size: .86rem; font-weight: 600; }
.sf .vonbis { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
.sf .vonbis input { min-width: 0; width: 100%; }
.sf .janein { display: flex; flex-wrap: wrap; gap: .2rem .7rem; align-items: center; border: 1px solid var(--rand); border-radius: 4px; padding: 0 .4rem .15rem; }
.sf .janein label { display: flex; flex-direction: row; align-items: center; gap: .25rem; font-weight: 400; }
.sf .janein button { margin-left: auto; min-height: 22px; padding: 0 .4rem; font-size: .75rem; }
.filterliste p { display: flex; gap: .6rem; align-items: center; justify-content: space-between; margin: .3rem 0; }
@media (min-width: 1300px) { .sf.i1 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.sf .teilgruppe { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .45rem .7rem; align-items: end; }
.sf .teilgruppe > :is(.bedingungen, .janein, .haken) { grid-column: 1 / -1; }
.sf .teilgruppe .pfeil { justify-self: start; min-height: 30px; padding: 0 .8rem; }
.sf .bedingungen { min-height: 4.5rem; max-height: 10rem; overflow-y: auto; border: 1px solid var(--rand); background: var(--flaeche); padding: .2rem .4rem; }
.sf .bedingungen p { display: flex; justify-content: space-between; gap: .5rem; margin: .15rem 0; font-size: .86rem; }
.sf .bedingungen button { min-height: 22px; padding: 0 .4rem; }
.sf .tabelle select { min-height: 26px; }
@media (min-width: 1300px) { .sf.w, .sf.l, .sf.e { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sf.l > .gruppe:first-child { grid-column: 1 / -1; max-width: 340px; } }
@media (min-width: 1300px) { .sf.i2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } .sf.i2 > .gruppe:last-child { grid-column: 2; grid-row: 1 / 4; } }
.sf .teilgruppe > .haken { font-weight: 400; }

/* Verwaltung > Hilfe: Notenliste und Versionsgeschichte */
.hilfeliste { border-collapse: collapse; margin: .4rem 0; max-height: 60vh; overflow: auto; display: block; }
.hilfeliste th, .hilfeliste td { border: 1px solid #c8d3e0; padding: .15rem .5rem; text-align: left; vertical-align: top; }
.hilfeliste th { background: #e6eef8; }

/* Gruppenprozesse: großer Knopf Ausführen wie in SchILD 3 */
.werkzeugleiste .gross { grid-row: span 2; font-weight: bold; font-size: 1.1em; }
.werkzeugleiste .gross .zeichen { font-size: 1.8em; }

/* Kataloge: im Menüband nur der Titel wie in SchILD 3 */
.werkzeugleiste .bandtitel { align-self: start; padding: .2rem .6rem; font-size: 1.05em; }

/* Gruppenprozesse: Knopfleiste „Verfügbare Gruppenprozesse“ wie in SchILD 3 */
.prozessseite { display: flex; gap: 1rem; align-items: flex-start; }
.prozessseite > div { flex: 1; min-width: 0; }
.prozessleiste { display: flex; flex-direction: column; gap: .3rem; width: 15rem; flex: none; padding: .5rem; background: #f4f7fb; border: 1px solid #c8d3e0; }
.prozessleiste > p { margin: 0 0 .3rem; font-weight: bold; font-size: .9em; text-decoration: underline; }
.prozessleiste button { font-weight: bold; font-size: .85em; padding: .4rem .5rem; text-align: center; background: linear-gradient(#e8f0fb, #c9dbf2); border: 1px solid #9fb6d6; border-radius: 3px; color: #1a2a40; cursor: pointer; }
.prozessleiste button:hover:not(:disabled) { background: linear-gradient(#f3f8ff, #d8e6f8); }
.prozessleiste button[aria-pressed=true] { background: #0f3c6e; color: #fff; border-color: #0f3c6e; }
.prozessleiste button:disabled { color: #9aa6b5; background: #eef2f7; border-color: #d3dbe6; cursor: not-allowed; }
@media (max-width: 800px) { .prozessseite { flex-direction: column; } .prozessleiste { width: auto; } }

/* Gruppenprozess „Individualdaten ändern“: Kasten wie in SchILD 3 */
.indkasten { border: 1px solid #2a9fd6; margin-top: .5rem; background: #fff; }
.indreiter { display: flex; flex-wrap: wrap; gap: 2px; background: #e6eef8; padding: 2px 2px 0; }
.indreiter button { font-size: .85em; padding: .2rem .5rem; border: 1px solid #2a9fd6; border-bottom: none; background: #2a9fd6; color: #fff; }
.indreiter button[aria-selected=true] { background: #fff; color: #2a9fd6; }
.indreiter button:disabled { opacity: .55; cursor: not-allowed; }
.indkasten h3 { margin: 0; padding: .3rem .6rem; background: #2a9fd6; color: #fff; font-size: .95em; }
.indraster { display: grid; grid-template-columns: repeat(4, minmax(10rem, 1fr)); gap: .5rem 1rem; padding: .6rem; }
.indfeld { display: flex; flex-direction: column; gap: .15rem; }
.indfeld.gesperrt { opacity: .45; }
.indname { font-weight: bold; font-size: .85em; }
.indwert { display: flex; align-items: center; gap: .2rem; border: 1px solid #b9c9dc; padding: .1rem .2rem; min-height: 1.9rem; }
.indwert > select, .indwert > input { flex: 1; min-width: 0; border: none; }
.indwert .janein { flex: 1; display: flex; gap: 1rem; font-size: .9em; }
.indx { font-weight: bold; padding: 0 .3rem; border: 1px solid #555; background: #eef; cursor: pointer; }
@media (max-width: 1100px) { .indraster { grid-template-columns: repeat(2, minmax(10rem, 1fr)); } }
.indwert .janein label { display: inline-flex; flex-direction: row; align-items: center; gap: .25rem; margin: 0; font-weight: normal; }
.indabschnitt { grid-row: span 2; border: 1px solid #b9c9dc; padding: .3rem .5rem; display: flex; flex-direction: column; gap: .3rem; font-size: .9em; }
.indabschnitt legend { font-size: .9em; color: #555; }
.indabschnitt label { display: flex; flex-direction: column; font-weight: bold; }
.indabschnitt button { font-weight: bold; padding: .3rem; background: linear-gradient(#e8f0fb, #c9dbf2); border: 1px solid #9fb6d6; cursor: pointer; }
.indadresse { grid-column: 1 / -1; display: flex; gap: .5rem; align-items: end; }
.indadresse label { display: flex; flex-direction: column; font-weight: bold; flex: 0 1 40rem; }
.indhinweis { grid-column: 1 / -1; margin: .3rem 0 0; font-size: .9em; }
.indeinw { grid-column: 1 / -1; border-collapse: collapse; margin: .2rem 0; min-width: 32rem; }
.indeinw th { background: #2a9fd6; color: #fff; text-align: left; padding: .2rem .5rem; }
.indeinw td { border-bottom: 1px solid #dde6f0; padding: .2rem .5rem; }

/* Verwaltung wie in SchILD 3: Bereiche links, Unterpunkte, Inhalt */
.verwseite { display: grid; grid-template-columns: 11rem 12rem 1fr; gap: 0; min-height: 70vh; margin: -.5rem 0 0; }
.verwnav { background: #2b579a; color: #fff; padding: .6rem 0; display: flex; flex-direction: column; }
.verwnav h2, .verwunter h2 { margin: 0 0 .8rem; padding: 0 .8rem; font-size: 1.3em; }
.verwnav a, .verwnav button, .verwnav span { color: #fff; text-decoration: none; padding: .1rem .8rem; font-size: .9em; text-align: left; background: none; border: none; cursor: pointer; font: inherit; }
.verwnav a[aria-current=page] { background: #1d3f73; font-weight: bold; }
.verwnav a:hover, .verwnav button:hover { background: #3a6bb3; }
.verwnav .gesperrt { color: #9fb3d6; cursor: not-allowed; }
.verwunter { background: #f1f1f1; border-right: 1px solid #ccc; padding: .6rem 0; display: flex; flex-direction: column; }
.verwunter h2 { color: #222; }
.verwunter a, .verwunter span { padding: .15rem .8rem; color: #333; text-decoration: none; font-size: .9em; border-top: 1px solid #ddd; }
.verwunter a[aria-current=page] { background: #dde6f2; }
.verwunter .gesperrt { color: #999; cursor: not-allowed; }
.verwinhalt { padding: .3rem .8rem; display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.verwkasten { border: 1px solid #2a9fd6; background: #fff; box-shadow: 1px 1px 3px #0002; }
.verwkasten h3 { margin: 0; padding: .2rem .5rem; background: #2a9fd6; color: #fff; font-size: .85em; }
.verwkasten > div { padding: .4rem .6rem; }
.verwkasten p { margin: .2rem 0; }
.verwname { font-size: 1.6em; font-weight: bold; text-align: center; }
.verwzusatz { text-align: center; font-size: 1.1em; }
.verwnummer { text-align: center; font-weight: bold; margin-top: .8rem !important; }
.verwgross { font-size: 1.6em; font-weight: bold; text-align: center; }
@media (max-width: 900px) { .verwseite { grid-template-columns: 1fr; } .verwnav, .verwunter { flex-direction: row; flex-wrap: wrap; } }
.verwangaben { display: grid; grid-template-columns: minmax(18rem, 22rem) minmax(24rem, 34rem); gap: .6rem; align-items: start; }
.verwspalte { display: flex; flex-direction: column; gap: .6rem; }
.verwfeld { display: flex; flex-direction: column; font-weight: bold; font-size: .85em; margin: .15rem 0; }
.verwfeld input { font-weight: normal; border: 1px solid #a9c4e0; padding: .15rem .3rem; background: #fff; }
.verwfeld.breit { flex: 1; }
.verwreihe { display: flex; gap: .4rem; align-items: end; }
.verwlabel { font-weight: bold; font-size: .85em; margin: .3rem 0 0 !important; }
.verwtabelle { width: 100%; border-collapse: collapse; font-size: .9em; }
.verwtabelle th { background: #2a9fd6; color: #fff; text-align: left; padding: .15rem .4rem; }
.verwtabelle td { padding: .15rem .4rem; border-bottom: 1px solid #eee; background: #fffbe0; }
@media (max-width: 1000px) { .verwangaben { grid-template-columns: 1fr; } }
.verwweitere { display: flex; flex-direction: column; gap: .6rem; max-width: 52rem; }
.hjw { display: flex; flex-direction: column; gap: .5rem; max-width: 52rem; }
.hjw h2 { margin: 0; } .hjw > p { margin: 0; }
.hjwzeile { margin: .3rem 0 0; font-size: 1em; }
.hjwkopf { display: grid; grid-template-columns: 1.6fr 1fr; gap: .5rem; }
.hjwkopf label { font-weight: bold; font-size: .9em; display: flex; align-items: center; gap: .3rem; }
.hjwhaken { display: block; font-weight: bold; margin-top: .4rem; }
.hjwtext { margin: .1rem 0 0 1.6rem !important; font-size: .9em; }
.hjwoptionen { margin: .3rem 0 .3rem 1.6rem; border: 1px solid #b9c9dc; }
.hjwoptionen .hjwhaken { font-weight: bold; font-size: .9em; }
@media (max-width: 900px) { .hjwkopf { grid-template-columns: 1fr; } }
.hjw tr.fehler td { background: var(--warn); }
.hjw fieldset:disabled { opacity: .6; }
.sicherungok { background: #e3f4e1; color: #1d5a1a; border-radius: 6px; padding: .5rem .8rem; margin: .5rem 0; font-weight: bold; overflow-wrap: anywhere; }

/* Verwaltung › Einstellungen wie in SchILD 3 */
.einstseite { display: flex; flex-direction: column; gap: .4rem; }
.einstraster { display: grid; grid-template-columns: minmax(18rem, 25rem) minmax(16rem, 22rem); gap: .6rem; align-items: start; border: 1px solid #2a9fd6; padding: .4rem; background: #f4f8fd; }
.einsthaken { display: block; font-weight: bold; font-size: .85em; margin: .15rem 0; }
.einsthaken.gesperrt, .verwfeld.gesperrt { opacity: .5; cursor: not-allowed; }
.einstknopf { display: block; width: 100%; margin: .2rem 0; padding: .35rem; font-weight: bold; background: linear-gradient(#e8f0fb, #c9dbf2); border: 1px solid #9fb6d6; cursor: pointer; }
.einstknopf:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 900px) { .einstraster { grid-template-columns: 1fr; } }
/* Gitterlinien abschaltbar (individuelle Einstellungen) */
body.ohne-hlinien table td, body.ohne-hlinien table th { border-top-color: transparent !important; border-bottom-color: transparent !important; }
body.ohne-vlinien table td, body.ohne-vlinien table th { border-left-color: transparent !important; border-right-color: transparent !important; }

/* Verwaltung › Benutzer wie in SchILD 3 */
.benknoepfe { display: flex; gap: .3rem; }
.benknoepfe a.knopf, .benknoepfe button { font-weight: bold; font-size: .85em; padding: .3rem .6rem; background: linear-gradient(#e8f0fb, #c9dbf2); border: 1px solid #9fb6d6; color: #1a2a40; text-decoration: none; cursor: pointer; }
.benknoepfe button:disabled { opacity: .5; cursor: not-allowed; }
.benseite { display: grid; grid-template-columns: minmax(20rem, 26rem) minmax(14rem, 18rem); gap: .6rem; align-items: start; }
.benlinks { border: 1px solid #a9c4e0; background: #fff; min-height: 20rem; }
.bentabelle tbody tr { cursor: pointer; } .bentabelle td { background: #fff; }
.bentabelle tbody tr[aria-selected=true] td { background: #cfe2f7; }
.bentabelle .mitte { text-align: center; }
.bengruppen { border: 1px solid #a9c4e0; background: #fff; padding: .3rem; min-height: 8rem; display: flex; flex-direction: column; font-size: .85em; }
@media (max-width: 900px) { .benseite { grid-template-columns: 1fr; } }
.bengruppen label { display: flex; flex-direction: row; align-items: center; gap: .3rem; margin: 0; font-weight: normal; }
.benrechts .einsthaken { display: flex; flex-direction: row; align-items: center; gap: .3rem; }
.wvform { display: grid; grid-template-columns: minmax(16rem, 26rem) 10rem; gap: .4rem .8rem; align-items: end; }
.wvform label { display: flex; flex-direction: column; font-weight: bold; font-size: .85em; }
.wvform label.haken { flex-direction: row; align-items: center; gap: .3rem; grid-column: 1 / -1; }
.fnkopf { margin: .2rem 0; font-size: 1em; }
.fnform { grid-template-columns: repeat(4, minmax(7rem, auto)); }
.fdsuche, .fdteam { border: 1px solid #b9c9dc; padding: .3rem .5rem; margin: .3rem 0; }
.fdteam { grid-column: 1 / -1; display: flex; gap: .8rem; }
.fdteam label { display: flex; flex-direction: column; font-weight: bold; font-size: .85em; }
.fvoptionen .haken { display: block; font-weight: bold; font-size: .85em; margin: .15rem 0; }

/* Schnelleingabe wie das SchILD-Schnelleingabemodul */
.seseite { display: flex; flex-direction: column; gap: .4rem; }
.seleiste { display: flex; flex-wrap: wrap; gap: .2rem .8rem; padding: .3rem .5rem; background: #f0f0f0; border: 1px solid #ccc; }
.seleiste button { background: none; border: none; cursor: pointer; font-size: .9em; padding: 0; }
.seform { display: flex; flex-direction: column; gap: .5rem; }
.sespalten { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; align-items: start; }
.sespalten > div { display: flex; flex-direction: column; gap: .5rem; }
.sekasten { border: 1px solid #9ab; background: #fff; }
.sekasten h3 { margin: 0; padding: .15rem .5rem; background: #aecdf0; font-size: .9em; }
.seraster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .3rem .5rem; padding: .4rem .5rem; }
.seanmeldung .seraster { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seerzieher .seraster { grid-template-columns: .7fr .6fr 1fr 1fr 1.2fr; }
.setelefon .seraster { grid-template-columns: 1fr 1fr 1.4fr; }
.sevorschule .seraster { grid-template-columns: 1fr 1fr; }
.sefeld { display: flex; flex-direction: column; font-size: .85em; min-width: 0; }
.sefeld.breit { grid-column: span 2; }
.sefeld .pflicht { text-decoration: underline; }
.sefeld input, .sefeld select { background: #ffff88; border: 1px solid #d8d870; padding: .15rem .25rem; min-width: 0; }
.sefeld input:focus, .sefeld select:focus { background: #fff; outline: 2px solid #2a9fd6; }
.sezusatz { grid-column: 1 / -1; justify-self: start; font-size: .85em; }
.sestatus { margin: 0; padding: .2rem .5rem; background: #f0f0f0; border: 1px solid #ccc; font-size: .9em; }
@media (max-width: 1000px) { .sespalten { grid-template-columns: 1fr; } }

/* Gruppenprozesse: Tabelleneingabe (Fehlstunden, Lernbereichsnoten) */
input.zahl { width: 6em; text-align: right; }

/* Gruppenprozesse: Stundentafeln zuweisen (wie „Stundentafel auswählen“ in SchILD 3) */
.stwahl { max-height: 28rem; overflow-y: auto; border: 1px solid #b9c9dc; margin: .3rem 0; }
.stwahl .tabelle { margin: 0; }
.sttafeln { width: 100%; }
.sttafeln tr.stkopf { cursor: pointer; }
.sttafeln tr.stkopf:hover td { background: #eef5fc; }
.sttafeln tr.stan td { background: #d6e8f8; font-weight: bold; }
.sttafeln tr.stalt td { color: #7a8594; }
.sttafeln td.stplus { width: 1.2rem; text-align: center; font-family: monospace; }
.sttafeln tr.stfaecher > td { background: #f4f9fe; }
.sttafeln fieldset { border: 1px solid #b9c9dc; margin: .2rem 0 .4rem; padding: .3rem .5rem; }
.sttafeln fieldset legend { font-weight: bold; font-size: .9em; }
.sttafeln fieldset .tabelle { max-height: 16rem; overflow-y: auto; }
.stfuss { margin: .3rem 0 0; font-size: .85em; color: #4a5768; }
.sttafeln button.stauf { width: 1.6rem; padding: 0; font-family: monospace; font-weight: bold; cursor: pointer; }
.stvorlage td, .stvorlage th { padding: .15rem .3rem; }
.stvorlage select { max-width: 16rem; }
.stvorlage tr.stinfo td { color: #7a8594; }
.stvorlage tfoot td { font-weight: bold; border-top: 2px solid #b9c9dc; }
.sthinweise { margin: .2rem 0 .5rem 1.2rem; font-size: .85em; color: #4a5768; }
.stneu { margin: .1rem 0 .4rem; font-size: .9em; }
.stoptionen .haken { display: block; font-weight: bold; font-size: .85em; margin: .15rem 0; }

/* Gruppenprozesse: Fächer zuweisen (tabellarisch) */
.tabellenrahmen { overflow-x: auto; }
.fzmatrix td.fzzelle { cursor: pointer; min-width: 6rem; }
.fzmatrix td.fzzelle:hover, .fzmatrix td.fzzelle:focus { outline: 2px solid #2a9fd6; outline-offset: -2px; }
.fzmatrix .fzwahl { background: #fff6c4; }

/* Individualdaten ändern: Haken „leeren“ */
.indleer { font-size: .8em; white-space: nowrap; margin-left: .3rem; }
.statuswahl .paar { display: flex; gap: .4rem; align-items: center; }
.statuswahl select { flex: 1; min-width: 7rem; }
.statuswahl button { white-space: nowrap; }
/* Anmeldeseite: eigener, deutlich sichtbarer Knopf zur Hilfe */
.anmeldefeld button.hilfeknopf { border: 2px solid #0f3a62; background: #e6eef7; color: #0f3a62; font-weight: 700; }
.anmeldefeld button.hilfeknopf:hover, .anmeldefeld button.hilfeknopf:focus-visible { background: #0f3a62; color: #fff; }
