html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "Ein Fehler ist aufgetreten."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* PEP-Layout */
.pep-kopf { display: flex; align-items: center; gap: 1.5rem; padding: .6rem 1.25rem; background: #1f3a5f; color: #fff; }
.pep-kopf a { color: #fff; text-decoration: none; }
.pep-marke { font-weight: 700; letter-spacing: .05em; }
.pep-inhalt { padding: 1rem 1.25rem 3rem; }
.pep-inhalt.oeffentlich { max-width: 52rem; margin: 0 auto; }

.tag-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.tag-kopf h1, .tag-kopf h2 { font-size: 1.35rem; margin: 0 .5rem; }
.tag-form { display: flex; gap: .4rem; }
.tag-datum { width: auto; }

.tabelle-rahmen { overflow-x: auto; }
.plan-tabelle { border-collapse: collapse; width: 100%; min-width: 46rem; table-layout: fixed; }
.plan-tabelle th, .plan-tabelle td { border: 1px solid #d5dbe3; padding: .35rem .5rem; vertical-align: top; font-size: .9rem; }
.plan-tabelle thead th { background: #eef2f7; text-align: left; }
.plan-tabelle tbody th { background: #f7f9fb; width: 9rem; text-align: left; }
.plan-tabelle td.zelle-offen { background: #fff8e1; }
.plan-tabelle td.zelle-vertretungerforderlich { background: #fdecea; }
.plan-tabelle td.zelle-faelltaus { background: #eceff1; color: #607d8b; }
.plan-tabelle .raum { color: #546e7a; }
.plan-tabelle .gemeinsam { font-style: italic; color: #37474f; }

.marke { display: inline-block; margin-top: .2rem; padding: 0 .4rem; border-radius: .25rem; font-size: .75rem; font-weight: 600; }
.marke-offen { background: #ffe082; color: #5d4037; }
.marke-vertretung { background: #ef9a9a; color: #7f0000; }
.marke-ausfall { background: #b0bec5; color: #263238; }

.oeff-block { border-top: 1px solid #d5dbe3; padding: .75rem 0; }
.oeff-block h3 { font-size: 1.05rem; }
.oeff-block h3 small { font-weight: 400; color: #607d8b; }
.oeff-eintrag { padding: .4rem .6rem; border-left: 4px solid #1f3a5f; background: #f7f9fb; margin-bottom: .4rem; }
.oeff-angebot { border-left-color: #8d99ae; }
.oeff-angebot .angebot { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #607d8b; }
.oeff-parallel { margin: .4rem 0 .2rem; font-size: .85rem; }
.liste { padding-left: 1.1rem; }

.pep-nutzer { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.pep-nutzer form { margin: 0; }
.pep-nutzer .btn-link { color: #fff; padding: 0; }
.anmelde-form { max-width: 24rem; }
.benutzer-tabelle { min-width: 0; }
.benutzer-tabelle tbody th { width: auto; }
.einmalpasswort { font-size: 1.1rem; user-select: all; }

/* Übersicht mit seitlicher Bearbeitung */
.uebersicht-raster { display: block; }
.uebersicht-raster.mit-bearbeitung { display: grid; grid-template-columns: minmax(0, 1fr) 24rem; gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .uebersicht-raster.mit-bearbeitung { grid-template-columns: 1fr; } }
.uebersicht-tabelle { min-width: 0; }
.zelle-knopf { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.zelle-knopf:hover { background: rgba(31, 58, 95, .06); }
.zelle-knopf.zelle-gewaehlt { outline: 3px solid #1f3a5f; outline-offset: 2px; background: rgba(31, 58, 95, .08); }
.bearbeitung { border: 1px solid #d5dbe3; border-radius: .4rem; padding: .9rem 1rem; background: #fff; position: sticky; top: .5rem; max-height: calc(100vh - 1rem); overflow-y: auto; }
.bearbeitung-kopf { display: flex; justify-content: space-between; align-items: center; }
.bearbeitung h2 { font-size: 1.1rem; margin: 0; }
.bearbeitung h3 { font-size: .95rem; margin: 1rem 0 .4rem; border-top: 1px solid #e3e8ee; padding-top: .7rem; }
.bearbeitung-unter { font-size: .85rem; color: #546e7a; margin: .3rem 0 .6rem; }
.kandidaten { list-style: none; padding: 0; margin: 0 0 .5rem; max-height: 14rem; overflow-y: auto; }
.kandidaten li { padding: .15rem 0; }
.kandidaten label { display: block; cursor: pointer; }
.kandidaten .taetigkeit { display: block; margin-left: 1.45rem; font-size: .8rem; color: #607d8b; }
.kandidat-konflikt .taetigkeit { color: #b71c1c; }
.raum-gesperrt label { color: #9e9e9e; cursor: not-allowed; }
.konflikt-box { border-left: 4px solid #c62828; background: #fdecea; padding: .4rem .6rem; margin: .4rem 0; font-size: .85rem; }
.verlauf { list-style: none; padding: 0; margin: 0; font-size: .8rem; }
.verlauf li { padding: .1rem 0; }
.marke-info { background: #bbdefb; color: #0d47a1; }

.pep-kursmenue-hintergrund { position: fixed; inset: 0; z-index: 60; }
.pep-kursmenue {
    position: fixed; z-index: 61; width: min(24rem, calc(100vw - 1rem)); height: min(var(--menue-hoehe), 30rem, calc(100dvh - 1rem));
    left: clamp(.5rem, var(--menue-x), calc(100vw - min(24rem, 100vw - 1rem) - .5rem));
    top: clamp(.5rem, var(--menue-y), calc(100dvh - min(var(--menue-hoehe), 30rem, 100dvh - 1rem) - .5rem));
    display: flex; flex-direction: column; padding: .75rem; background: white; border: 1px solid #a9b7c8;
    border-radius: .4rem; box-shadow: 0 6px 24px #1f3a5f40;
}
.pep-kurs-option { display: block; width: 100%; text-align: left; background: #f5f8fc; color: #1f3a5f; border: 1px solid #d5dbe3; border-radius: .3rem; padding: .45rem .6rem; margin-bottom: .4rem; }
.pep-kurs-option span, .pep-kurs-option small { display: block; font-size: .8rem; }
.pep-kurs-option:hover:not(:disabled) { background: #dbe9fb; border-color: #1f3a5f; }
.pep-kurs-option:disabled { color: #687582; background: #f5f5f5; }

/* Unterricht und PEP: Aktionsauswahl und Blättern bleiben im sichtbaren Fenster. */
.bearbeitung.bearbeitung-klick {
    position: fixed; inset: .5rem .5rem .5rem auto; z-index: 40;
    width: 24rem; max-width: calc(100vw - 1rem); height: calc(100dvh - 1rem);
    max-height: none; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 6px 24px #1f3a5f26;
}
.bearbeitung-klick > :not(.klick-seiten) { flex-shrink: 0; }
.bearbeitung-klick .bearbeitung-kopf h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bearbeitung-klick .bearbeitung-gruppen { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bearbeitung-klick .bearbeitung-unter br { display: none; }
.klick-seiten { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.klick-fenster { flex: 1; min-height: 0; overflow: clip; }
.klick-inhalt { height: 100%; column-count: 1; column-fill: auto; column-gap: 24px; outline: none; overflow-wrap: anywhere; }
.klick-inhalt section { display: block; }
.klick-inhalt h3 { margin-top: 0; break-after: avoid; }
.klick-inhalt .kandidaten, .klick-inhalt .zusammenleg-vorschau { max-height: none; overflow: visible; }
.klick-inhalt li, .klick-inhalt .mb-2, .klick-inhalt .form-check, .klick-inhalt .konflikt-box,
.klick-inhalt .row > div, .klick-inhalt button, .klick-inhalt .btn { break-inside: avoid; }
.klick-inhalt .row { display: block; margin: 0; }
.klick-inhalt .row > div { width: 100%; padding: 0; margin: 0 0 .5rem; }
.klick-inhalt ul { margin-top: 0; }
.klick-blaettern { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; gap: .5rem; border-top: 1px solid #d5dbe3; padding-top: .6rem; margin-top: .6rem; }
.bearbeitung-aktionen { display: block; }
.bearbeitung-aktionen button { display: flex; width: 100%; justify-content: space-between; text-align: left; margin-bottom: .5rem; }
@media (max-width: 600px) {
    .bearbeitung.bearbeitung-klick { inset: 0; width: 100%; max-width: none; height: 100dvh; border-radius: 0; }
}
@media (max-height: 550px) {
    .bearbeitung.bearbeitung-klick { padding: .5rem .75rem; }
    .bearbeitung-klick .bearbeitung-unter { margin: .15rem 0; font-size: .75rem; }
    .bearbeitung-klick .bearbeitung-gruppen { display: none; }
    .klick-blaettern { padding-top: .3rem; margin-top: .3rem; }
}

.pep-kopf nav { display: flex; gap: 1rem; align-items: center; }
.pep-kopf a.aktiv, .pep-kopf summary.aktiv { font-weight: 600; box-shadow: 0 2px 0 #fff; }
.pep-menue .menue { position: relative; }
.pep-menue summary { list-style: none; cursor: pointer; padding: 0 .1rem; user-select: none; }
.pep-menue summary::-webkit-details-marker { display: none; }
.pep-menue summary::after { content: " ▾"; font-size: .75em; }
.pep-menue .menue-aktiv > summary { font-weight: 600; box-shadow: 0 2px 0 #fff; }
.pep-menue .menue[open] > summary { opacity: .85; }
.menue-liste { position: absolute; top: calc(100% + .5rem); left: -.5rem; min-width: 12rem; background: #fff; border-radius: .35rem; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); padding: .35rem 0; z-index: 50; display: flex; flex-direction: column; }
.pep-kopf .menue-liste a { color: #1f3a5f; padding: .35rem 1rem; white-space: nowrap; }
.pep-kopf .menue-liste a:hover { background: #eef2f7; }
.pep-kopf .menue-liste a.aktiv { background: #dbe9fb; font-weight: 600; box-shadow: none; }
.menue-abschnitt { padding: .4rem 1rem .1rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: #607d8b; }
.menue-abschnitt:not(:first-child) { border-top: 1px solid #e3e8ee; margin-top: .3rem; padding-top: .55rem; }
@media (max-width: 1100px) {
    .pep-kopf { flex-wrap: wrap; gap: .5rem 1rem; }
    .pep-kopf { padding: .4rem .75rem; font-size: .95rem; }
    .pep-kopf nav { flex-wrap: wrap; order: 3; width: 100%; gap: .1rem .9rem; }
    .pep-kopf nav > a, .pep-menue summary { padding: .35rem 0; }
    .pep-nutzer { margin-left: auto; }
    .menue-liste { position: fixed; left: .75rem; right: .75rem; top: auto; }
}
.anmelde-form-breit { max-width: 60rem; }
.abw-formular { max-width: 62rem; }

.personal-tabelle tbody tr { cursor: pointer; }
.personal-tabelle td:nth-child(4) { overflow-wrap: anywhere; }
.personal-tabelle tbody tr:hover { background: rgba(31, 58, 95, .06); }
.zeile-gewaehlt { outline: 2px solid #1f3a5f; outline-offset: -2px; }
.zeile-inaktiv { color: #90a4ae; }
.btn-ungeaendert { opacity: .5; }
.zeile-geaendert > td, .zeile-geaendert > th { background: #fff8dc; }
.aenderungsleiste { position: sticky; bottom: 0; z-index: 20; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; padding: .6rem 1rem; margin-top: .75rem;
    background: #fff8dc; border: 1px solid #e6cf7a; border-radius: .35rem; box-shadow: 0 -2px 8px rgba(0, 0, 0, .12); }
.raum-zahl { width: 5.5rem; }
.personal-raster.mit-bearbeitung { grid-template-columns: minmax(0, 1fr) 26rem; }

/* Fehlerhinweis von Blazor: nur bei einem echten Fehler sichtbar (die Regeln lagen früher in der gelöschten MainLayout.razor.css) */
#blazor-error-ui { background: #fff8e1; bottom: 0; box-shadow: 0 -1px 4px rgba(0, 0, 0, .25); display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* Vorlageneditor */
.vorlagen-raster { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .vorlagen-raster { grid-template-columns: 1fr; } }
.vorlagen-eintraege { max-height: none; }
.vorlage-knopf { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .3rem .4rem; border-radius: .25rem; }
.vorlage-knopf:hover { background: rgba(31, 58, 95, .06); }
.vorlage-gewaehlt .vorlage-knopf { background: rgba(31, 58, 95, .12); }
.wochen-leiste { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.vorlagen-arbeitsflaeche { display: block; }
.vorlagen-arbeitsflaeche.mit-entwurf { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1rem; align-items: start; }
@media (max-width: 1200px) { .vorlagen-arbeitsflaeche.mit-entwurf { grid-template-columns: 1fr; } }
.vorlagen-tabelle { table-layout: fixed; }
.vorlagen-tabelle tbody th { width: 5.5rem; }
.vorlagen-tabelle td { min-height: 4rem; height: 4rem; }
.vorlagen-tabelle td.vz-unterricht { background: #e8f1fb; }
.vorlagen-tabelle td.vz-offen { background: #fff8e1; }
.vorlagen-tabelle td.vz-bewusst { background: #eef2f4; }
.vorlagen-tabelle td.zelle-gewaehlt-vorlage { outline: 3px solid #1f3a5f; outline-offset: -3px; }

.vorschlag-tabelle { table-layout: auto; }
.vorschlag-tabelle td { vertical-align: middle; }
.vorschlag-tabelle select { min-width: 12rem; }

/* PEP-Ansicht (Mitarbeitende × Tage und Blöcke) */
.pep-rahmen { overflow: auto; max-height: calc(100vh - 12rem); border: 1px solid #d5dbe3; border-radius: .3rem; }
.pep-tabelle { border-collapse: separate; border-spacing: 0; font-size: .78rem; width: 100%; }
.pep-tabelle th, .pep-tabelle td { border-right: 1px solid #e3e8ee; border-bottom: 1px solid #e3e8ee; padding: .1rem .2rem; text-align: center; white-space: nowrap; }
.pep-tabelle thead th { position: sticky; background: #eef2f7; z-index: 2; }
.pep-tabelle thead tr:first-child th { top: 0; }
.pep-tabelle thead tr:nth-child(2) th { top: 1.55rem; font-weight: 500; font-size: .7rem; }
.pep-tabelle .pep-name { position: sticky; left: 0; background: #f7f9fb; text-align: left; min-width: 11rem; z-index: 3; font-weight: 600; }
.pep-tabelle thead .pep-name { z-index: 4; background: #eef2f7; }
.pep-tabelle .pep-tagstart { border-left: 2px solid #8d99ae; }
.pep-tabelle .pep-abschnitt th { background: #dfe7f1; text-align: left; position: static; font-size: .75rem; letter-spacing: .03em; }
.pep-woche .pep-zelle { min-width: 3.1rem; max-width: 4.6rem; overflow: hidden; text-overflow: ellipsis; }
.pep-tag .pep-zelle { min-width: 9rem; vertical-align: top; text-align: left; padding: .3rem .4rem; }
.pep-hinweis { font-size: .68rem; color: #546e7a; white-space: normal; }
.pep-knopf, .pep-chip { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.pep-chip { display: inline-block; width: auto; background: #fff3cd; border-radius: .2rem; padding: 0 .25rem; margin: .05rem; border: 1px solid #f0d878; }
.pep-chip-vertretung { background: #fdecea; border-color: #ef9a9a; }
.pep-klickbar { cursor: pointer; }
.pep-klickbar:hover { filter: brightness(.96); box-shadow: inset 0 0 0 1px #8d99ae; }
.pep-gewaehlt { outline: 2px solid #1f3a5f; outline-offset: 1px; }
.pep-unterricht { background: #dbe9fb; }
.pep-bbg { background: #d6f0ee; }
.pep-dvp { background: #fff; color: #a3acb5; }
.pep-taetigkeit { background: #e8efe0; color: #4a5d3a; }
.pep-termin { background: #ffe8cc; }
.pep-fehlt { background: #f8d7da; color: #7f1d1d; }
.pep-frei { background: #fafbfc; }
.pep-offen-zeile .pep-zelle { background: #fffdf5; vertical-align: top; white-space: normal; }
.pep-legende { margin-top: .6rem; font-size: .75rem; color: #607d8b; }
.pep-legende .pep-zelle { display: inline-block; padding: 0 .4rem; margin-right: .4rem; border-radius: .2rem; border: 1px solid #d5dbe3; color: #263238; }
.az-tabelle .az-feld { min-width: 2.2rem; height: 1.5rem; }
.az-name { cursor: pointer; }
.az-nicht { background: #9aa3ad; color: #fff; }
.az-an { background: #fff; color: #37424d; }
.az-pinsel.az-an { border-color: #cfd6df; }
.az-extern { background: repeating-linear-gradient(45deg, #dfe3e8, #dfe3e8 4px, #b4bcc6 4px, #b4bcc6 8px); color: #37424d; }
.az-sprech { background: #f8c8dc; color: #8a2a52; }
.az-team { background: #e3d7f5; color: #4a2f7a; }
.az-bbg { background: #d6f0ee; color: #1d5f58; }
.pep-extern { background: repeating-linear-gradient(45deg, #dfe3e8, #dfe3e8 4px, #b4bcc6 4px, #b4bcc6 8px); color: #37424d; }
.pep-sprechst { background: #f8c8dc; color: #8a2a52; }
.pep-team { background: #e3d7f5; color: #4a2f7a; }
.az-palette { display: flex; gap: .5rem; margin: .5rem 0 .75rem; flex-wrap: wrap; }
.az-pinsel { border: 2px solid transparent; border-radius: .3rem; padding: .25rem .8rem; font-size: .85rem; cursor: pointer; }
.az-pinsel-aktiv { border-color: #1f3a5f; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1f3a5f; font-weight: 600; }
.fm-tabelle .fm-fach { height: 7.5rem; vertical-align: bottom; padding: .2rem 0; min-width: 1.8rem; }
.fm-tabelle .fm-fach span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.fm-tabelle .fm-nur { min-width: 3.2rem; }
.fm-tabelle .fm-feld { min-width: 1.8rem; height: 1.5rem; }
.fm-kann { background: #dbe9fb; color: #1f3a5f; }
.fm-bevorzugt { background: #ffe9a8; color: #7a5a00; }
.abw-filter { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: .75rem; }
.abw-filter > div { min-width: 11rem; }
.abw-monat { margin: 1.1rem 0 .4rem; }
.abw-art { display: inline-block; padding: 0 .5rem; border-radius: .25rem; font-size: .8rem; }
.abw-urlaub { background: #dcedc8; color: #33561b; }
.abw-termin { background: #ffe8cc; color: #7a4a00; }
.abw-krank { background: #f8d7da; color: #7f1d1d; }
.abw-fehlt { background: #e3e8ee; color: #37424d; }
.abw-tabelle tr.abw-eigene th { box-shadow: inset 3px 0 0 #1f3a5f; }
.abw-warnung { color: #b26a00; cursor: help; }
.abw-aktionen { white-space: nowrap; }
.zaehlung-gemeldet { color: #1d5f2e; font-weight: 600; }
.zaehlung-offen { font-size: .75rem; color: #b26a00; }
.zaehlung-hinweis { color: #b21f2d; font-weight: 600; }
.dvp-tabelle td, .dvp-tabelle th { text-align: right; }
.dvp-tabelle th[scope="row"] { text-align: left; }
.dvp-tabelle td:last-child { text-align: left; min-width: 11rem; }
.dvp-balken { display: inline-block; width: 6rem; height: .6rem; background: #e3e8ee; border-radius: .3rem; margin-right: .4rem; vertical-align: middle; overflow: hidden; }
.dvp-balken > span { display: block; height: 100%; background: #6aa56f; }
.stand-tabelle th, .stand-tabelle td { text-align: center; }
.stand-tabelle th[scope="row"] { text-align: left; }
.stand-zelle { min-width: 4.5rem; font-weight: 600; }
.stand-leer { background: #f8d7da; color: #7f1d1d; }
.stand-teil { background: #fff3cd; color: #7a5a00; }
.stand-voll { background: #d4edda; color: #1d5f2e; }
.stand-aus { background: #eef2f7; color: #8d99ae; font-weight: 400; }
.zaehl-rahmen { max-height: none; }
.zaehl-tabelle th, .zaehl-tabelle td { text-align: center; vertical-align: middle; }
.zaehl-tabelle th[scope="row"] { text-align: left; position: static; }
.zaehl-tabelle .zaehl-zahl { width: 4.8rem; margin: 0 auto; text-align: center; }
.zaehl-tabelle .zaehl-bf { min-width: 5.5rem; font-size: .75rem; font-weight: 500; white-space: normal; }
.zaehl-tabelle tfoot th, .zaehl-tabelle tfoot td { background: #eef2f7; font-weight: 600; }

.zaehl-tabelle tr.zaehl-eigene th[scope="row"] { box-shadow: inset 4px 0 0 #2f6fb5; }
.zaehl-tabelle td.zaehl-pruefen { color: #b21f2d; background: #fdecee; }

.zaehl-regel summary { cursor: pointer; }

/* Morgenzählung auf Telefon und Tablet im Hochformat: je BBG eine Karte mit großen Eingabefeldern */
@media (max-width: 820px) {
    .pep-inhalt { padding: .75rem .75rem 4rem; }
    .zaehl-rahmen { border: 0; overflow: visible; }
    .zaehl-tabelle, .zaehl-tabelle tbody, .zaehl-tabelle tfoot { display: block; min-width: 0; }
    .zaehl-tabelle thead { display: none; }
    .zaehl-tabelle { display: flex; flex-direction: column; gap: .75rem; }
    .zaehl-tabelle tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .75rem; }
    .zaehl-tabelle tr { display: block; border: 1px solid #d5dbe3; border-radius: .5rem; background: #fff; overflow: hidden; }
    .zaehl-tabelle th, .zaehl-tabelle td { display: flex; align-items: center; justify-content: space-between; gap: .75rem; border: 0; border-top: 1px solid #eef2f7; padding: .4rem .75rem; text-align: left; }
    .zaehl-tabelle td[data-label]::before { content: attr(data-label); font-weight: 500; flex: 1; min-width: 0; }
    .zaehl-tabelle .zaehl-name { border-top: 0; background: #eef2f7; font-size: 1rem; font-weight: 600; width: auto; }
    .zaehl-tabelle tr.zaehl-eigene .zaehl-name { box-shadow: inset 4px 0 0 #2f6fb5; }
    .zaehl-tabelle .zaehl-zahl { flex: 0 0 5.5rem; width: 5.5rem; margin: 0; min-height: 2.75rem; font-size: 1.1rem; }
    .zaehl-tabelle td[data-label="Summe"], .zaehl-tabelle td[data-label="Stand"] { background: #f7f9fb; font-weight: 400; }
    .zaehl-tabelle td[data-label="Summe"] { font-weight: 600; }
    .zaehl-tabelle .zaehl-aktion { justify-content: flex-end; padding: .5rem .75rem; }
    .zaehl-tabelle .zaehl-aktion .btn { min-height: 2.75rem; padding: .25rem 1rem; }
    .zaehl-tabelle tr.zeile-geaendert > td, .zaehl-tabelle tr.zeile-geaendert > th { background: #fff8dc; }
    .zaehl-tabelle tfoot tr { background: #eef2f7; }
    .zaehl-tabelle tfoot td.zaehl-stand { justify-content: flex-start; }
    .zaehl-tabelle td.zaehl-pruefen { flex-wrap: wrap; }
    .aenderungsleiste { padding: .5rem .75rem; gap: .4rem .5rem; }
    .aenderungsleiste > span { flex: 0 0 100%; font-size: .9rem; }
    .aenderungsleiste .btn { min-height: 2.75rem; flex: 1 1 8rem; }
    .tag-kopf .tag-datum { min-height: 2.75rem; }
}

/* Öffentlicher Wochenplan: Blöcke in Zeilen, Montag bis Freitag in Spalten */
.woche-rahmen { overflow-x: auto; }
.woche-tabelle { table-layout: fixed; min-width: 0; }
.woche-tabelle thead th { text-align: center; }
.woche-tabelle thead th a { color: inherit; text-decoration: none; }
.woche-tabelle tbody th { width: 7rem; }
.woche-tabelle tbody th small { display: block; font-weight: 400; color: #607d8b; }
.woche-tabelle td { font-size: .85rem; }
.woche-tabelle td.woche-heute, .woche-tabelle th.woche-heute { background: #eaf3ff; }
.woche-tabelle .woche-bbg td { background: #f7f9fb; }
.woche-parallel { margin-top: .35rem; padding-top: .25rem; border-top: 1px dotted #b0bec5; font-size: .78rem; color: #455a64; }
@media (max-width: 760px) {
    .woche-tabelle, .woche-tabelle tbody { display: block; }
    .woche-tabelle thead { display: none; }
    .woche-tabelle tbody { display: flex; flex-direction: column; gap: .75rem; }
    .woche-tabelle tr { display: block; border: 1px solid #d5dbe3; border-radius: .5rem; overflow: hidden; background: #fff; }
    .woche-tabelle tbody th { display: block; width: auto; border: 0; background: #eef2f7; font-size: 1rem; }
    .woche-tabelle tbody th small { display: inline; margin-left: .5rem; }
    .woche-tabelle td { display: block; border: 0; border-top: 1px solid #eef2f7; padding: .4rem .75rem; font-size: .95rem; }
    .woche-tabelle td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #607d8b; }
    .woche-tabelle td.woche-leer, .woche-tabelle td:has(> span.text-muted:only-child) { padding-top: .25rem; padding-bottom: .25rem; }
}

.pep-inhalt.oeffentlich:has(.woche-rahmen) { max-width: 78rem; }

/* QR-Code auf der öffentlichen Gruppenseite */
.qr-abschnitt { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #d5dbe3; }
.qr-code { margin: 0; display: inline-block; text-align: center; }
.qr-bild { width: 11rem; height: 11rem; padding: .5rem; background: #fff; border: 1px solid #d5dbe3; border-radius: .35rem; }
.qr-bild svg { width: 100%; height: 100%; display: block; }
.qr-code figcaption { margin-top: .35rem; font-size: .8rem; color: #607d8b; word-break: break-all; }
@media print { .pep-kopf, .tag-kopf, .btn-group, .qr-abschnitt p { display: none !important; } .qr-abschnitt { border: 0; } .qr-bild { width: 14rem; height: 14rem; } }

/* Zellen der Stundenplan-Übersicht: immer vier Zeilen, damit das Raster nicht flattert */
.plan-tabelle .zelle-inhalt { display: grid; grid-template-rows: repeat(4, 1.3em); line-height: 1.3em; }
.plan-tabelle .zelle-inhalt .zl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.3em; }
.plan-tabelle .zelle-inhalt .zl-titel { display: flex; align-items: baseline; gap: .4rem; }
.plan-tabelle .zelle-inhalt .zl-titel strong { overflow: hidden; text-overflow: ellipsis; }
.plan-tabelle .zelle-inhalt .zl-titel .marke { flex: none; margin: 0; line-height: 1.2; }
tr.bereich-kopf th { background: #1f3a5f !important; color: #fff; font-size: .85rem; letter-spacing: .04em; padding: .25rem .6rem; width: auto !important; }
