/* ==========================================================================
   Gestaltung der Anwendung
   Farben und Schriften nach dem Auftritt der Quell Gruppe:
   Überschriften Oswald, Text Open Sans, Kennzahlen Roboto Slab.
   Alle Schriften liegen lokal in inhalte/schriften.
   ========================================================================== */

@font-face { font-family: "Oswald"; font-weight: 400; font-display: swap; src: url("../schriften/Oswald-Normal.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 500; font-display: swap; src: url("../schriften/Oswald-Mittel.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 700; font-display: swap; src: url("../schriften/Oswald-Fett.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 400; font-display: swap; src: url("../schriften/OpenSans-Normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 600; font-display: swap; src: url("../schriften/OpenSans-Halbfett.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 700; font-display: swap; src: url("../schriften/OpenSans-Fett.woff2") format("woff2"); }
@font-face { font-family: "Roboto Slab"; font-weight: 400; font-display: swap; src: url("../schriften/RobotoSlab-Normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto Slab"; font-weight: 700; font-display: swap; src: url("../schriften/RobotoSlab-Fett.woff2") format("woff2"); }

:root {
  --gruen: #5D9732;
  --gruen-taste: #4E8528;
  --gruen-dunkel: #437423;
  --gruen-tief: #33591B;
  --gruen-hell: #7CC68D;
  --gruen-flaeche: #EAF3E2;
  --gruen-zart: #F4F8EF;
  --schwarz: #222222;
  --grau: #6B6C6E;
  --grau-hell: #9A9C9E;
  --linie: #E4E8DF;
  --linie-stark: #CED4C8;
  --flaeche: #F3F6F0;
  --weiss: #FFFFFF;
  --rot: #B3382C;
  --rot-flaeche: #FBECEA;
  --gelb: #8F6400;
  --gelb-flaeche: #FFF4D6;
  --schatten: 0 1px 2px rgba(35, 52, 23, 0.05), 0 6px 18px rgba(35, 52, 23, 0.06);
  --schatten-stark: 0 2px 6px rgba(35, 52, 23, 0.08), 0 18px 48px rgba(35, 52, 23, 0.16);
  --rund: 8px;
  --rund-gross: 14px;
  --leiste: 264px;
  --schrift-kopf: "Oswald", "Arial Narrow", Arial, sans-serif;
  --schrift-text: "Open Sans", Arial, sans-serif;
  --schrift-zahl: "Roboto Slab", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 14px; }
body { margin: 0; font-family: var(--schrift-text); color: var(--schwarz); background: var(--flaeche); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--gruen-dunkel); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-family: var(--schrift-kopf); font-weight: 500; font-size: 2rem; letter-spacing: 0.01em; }
h2 { font-family: var(--schrift-text); font-weight: 700; font-size: 1.08rem; }
h3 { font-family: var(--schrift-text); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--grau); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gruen); outline-offset: 2px; }

.sinnbild { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sinnbild-datei { width: 18px; height: 18px; stroke-width: 1.6; }
.sinnbild-datei text { font-family: var(--schrift-text); font-weight: 700; font-size: 6.4px; stroke: none; fill: currentColor; text-anchor: middle; }
.sinnbild-pdf { color: #C1352B; }
.sinnbild-excel { color: #1D7044; }
.sinnbild-word { color: #2B5FB3; }
.sinnbild-folien { color: #C8502B; }
.sinnbild-csv { color: var(--grau); }

/* ---------- Grundaufbau ---------- */

.seitenleiste { position: fixed; inset: 0 auto 0 0; width: var(--leiste); background: linear-gradient(180deg, var(--gruen) 0, #4E8528 150px, #3D6722 100%); color: var(--weiss); display: flex; flex-direction: column; z-index: 40; }
.marke-kopf { padding: 22px 20px 18px; display: flex; align-items: center; gap: 13px; min-height: 92px; color: var(--weiss); }
.marke-kopf:hover { text-decoration: none; }
.marke-kopf img { height: 46px; width: auto; display: block; flex: none; }
.marke-kopf img.eigenes { height: auto; max-height: 46px; max-width: 150px; background: var(--weiss); border-radius: var(--rund); padding: 6px 8px; }
.marke-wort { font-family: var(--schrift-kopf); font-weight: 700; font-size: 1.32rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--weiss); line-height: 1.05; }
.marke-wort span { display: block; font-family: var(--schrift-text); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.82); margin-top: 6px; }

.navigation { flex: 1; overflow-y: auto; padding: 4px 12px 22px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.35) transparent; }
.nav-einzel, .nav-gruppenkopf { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 0 12px; margin: 2px 0; border: 0; border-radius: var(--rund); background: transparent; color: var(--weiss); font-family: var(--schrift-text); font-size: 0.97rem; font-weight: 600; text-align: left; cursor: pointer; transition: background 0.12s; }
.nav-einzel .sinnbild, .nav-gruppenkopf .sinnbild { width: 18px; height: 18px; }
.nav-einzel:hover, .nav-gruppenkopf:hover { background: rgba(255, 255, 255, 0.14); text-decoration: none; }
.nav-gruppenkopf .pfeil { margin-left: auto; width: 15px; height: 15px; opacity: 0.85; transition: transform 0.2s; }
.nav-gruppe.offen > .nav-gruppenkopf .pfeil { transform: rotate(180deg); }
.nav-gruppe.hat-aktiv > .nav-gruppenkopf { background: rgba(255, 255, 255, 0.12); }
.nav-eintraege { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.2s ease; }
.nav-gruppe.offen > .nav-eintraege { grid-template-rows: 1fr; }
.nav-eintraege > div { overflow: hidden; min-height: 0; visibility: hidden; transition: visibility 0s 0.2s; }
.nav-gruppe.offen > .nav-eintraege > div { visibility: visible; transition-delay: 0s; }
.nav-eintraege a { display: block; margin: 1px 0 1px 21px; padding: 7px 12px 7px 18px; border-left: 1px solid rgba(255, 255, 255, 0.32); color: var(--weiss); font-size: 0.94rem; }
.nav-eintraege a:hover { background: rgba(255, 255, 255, 0.14); border-radius: 0 var(--rund) var(--rund) 0; text-decoration: none; }
.nav-einzel.aktiv, .nav-eintraege a.aktiv { background: var(--weiss); color: var(--gruen-tief); font-weight: 700; border-radius: var(--rund); border-left-color: transparent; box-shadow: 0 2px 8px rgba(24, 43, 12, 0.22); }
.nav-gruppenkopf:focus-visible, .nav-einzel:focus-visible, .nav-eintraege a:focus-visible { outline-color: var(--weiss); }

.hauptbereich { margin-left: var(--leiste); min-height: 100vh; display: flex; flex-direction: column; }
.kopfleiste { height: 60px; background: var(--weiss); border-bottom: 1px solid var(--linie); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; position: sticky; top: 0; z-index: 30; }
.kopfleiste-ort { font-weight: 600; font-size: 0.9rem; color: var(--grau); display: flex; align-items: center; }
.kopfleiste-ort b { color: var(--schwarz); font-weight: 700; }
.kopfleiste-ort i { font-style: normal; margin: 0 8px; color: var(--grau-hell); }
.kopfleiste-benutzer { display: flex; align-items: center; gap: 10px; }
.kopfleiste-benutzer .name { font-weight: 600; margin-right: 4px; }
.kuerzel { width: 34px; height: 34px; border-radius: 50%; background: var(--gruen-flaeche); color: var(--gruen-tief); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.86rem; flex: none; }
.schaltflaeche.menueknopf { display: none; margin-right: 10px; }
.inhalt { padding: 30px 32px 40px; flex: 1; min-width: 0; }

.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.seitenkopf-aktionen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.unterzeile { color: var(--grau); margin: 6px 0 0; }

/* ---------- Schaltflächen ---------- */

.schaltflaeche { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 17px; border: 1px solid var(--gruen-taste); border-radius: var(--rund); background: var(--gruen-taste); color: var(--weiss); font-family: var(--schrift-text); font-size: 0.93rem; font-weight: 600; line-height: 1; cursor: pointer; white-space: nowrap; transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s; }
.schaltflaeche:hover { background: var(--gruen-dunkel); border-color: var(--gruen-dunkel); text-decoration: none; box-shadow: 0 2px 8px rgba(67, 116, 35, 0.25); }
.schaltflaeche:disabled { opacity: 0.5; cursor: default; box-shadow: none; }
.schaltflaeche-zweit { background: var(--weiss); color: var(--schwarz); border-color: var(--linie-stark); }
.schaltflaeche-zweit:hover { background: var(--gruen-zart); border-color: var(--gruen); color: var(--gruen-tief); box-shadow: none; }
.schaltflaeche-gefahr { background: var(--weiss); color: var(--rot); border-color: #E6BDB8; }
.schaltflaeche-gefahr:hover { background: var(--rot); border-color: var(--rot); color: var(--weiss); box-shadow: none; }
.schaltflaeche-klein { height: 30px; padding: 0 11px; font-size: 0.85rem; border-radius: 6px; }
.schaltflaeche-klein .sinnbild { width: 14px; height: 14px; }
.schaltflaeche-klein .sinnbild-datei { width: 16px; height: 16px; }

/* ---------- Karten ---------- */

.karte { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--rund-gross); padding: 22px 24px; box-shadow: var(--schatten); }
.karte + .karte { margin-top: 18px; }
.karte > h2 { margin-bottom: 14px; }
.kartenkopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.kartenkopf h2 { margin: 0; }
.raster { display: grid; gap: 18px; }
.raster-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.raster-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.raster-kennzahlen { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.raster .karte + .karte { margin-top: 0; }
a.karte { color: inherit; display: block; transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s; }
a.karte:hover { text-decoration: none; border-color: var(--gruen); box-shadow: var(--schatten-stark); transform: translateY(-1px); }
.raster-kennzahlen .karte { border-top: 3px solid var(--gruen); }
.abstand-oben { margin-top: 18px; }
.abstand-unten { margin-bottom: 18px; }
.kennzahl { font-family: var(--schrift-zahl); font-size: 2.2rem; font-weight: 700; line-height: 1.1; color: var(--gruen-tief); }
.kennzahl-text { color: var(--grau); font-size: 0.86rem; font-weight: 600; margin-top: 6px; }
.kennzahl-rot { color: var(--rot); }

.angaben { display: grid; grid-template-columns: max-content 1fr; gap: 7px 20px; margin: 0; }
.angaben dt { color: var(--grau); }
.angaben dd { margin: 0; }
.angaben.abstand-unten { margin-bottom: 16px; }

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

.tabellenrahmen { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--rund-gross); overflow-x: auto; box-shadow: var(--schatten); }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th { font-weight: 700; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--grau); text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--linie); white-space: nowrap; background: var(--gruen-zart); }
.tabelle th a { color: inherit; }
.tabelle td { padding: 11px 16px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle tbody tr:hover td { background: var(--gruen-zart); }
.tabelle .spalte-aktionen { text-align: right; white-space: nowrap; }
.tabelle .spalte-aktionen > * { margin-left: 6px; }
.tabelle .spalte-betrag, .tabelle .spalte-zahl, .tabelle .spalte-dezimal, .tabelle .rechts { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle .leer { text-align: center; color: var(--grau); padding: 34px; }
.tabelle tfoot td { font-weight: 700; border-top: 1px solid var(--linie-stark); border-bottom: 0; }
.tabelle-eng td, .tabelle-eng th { padding: 7px 11px; }
.karte .tabellenrahmen { border: 0; box-shadow: none; border-radius: 0; }
.karte .tabelle th { background: transparent; }
.karte .tabelle th:first-child, .karte .tabelle td:first-child { padding-left: 0; }
.karte .tabelle th:last-child, .karte .tabelle td:last-child { padding-right: 0; }

.seitenwahl { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; color: var(--grau); }
.seitenwahl-knoepfe { display: flex; align-items: center; gap: 10px; }

.marke { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: #ECEFE8; color: var(--grau); white-space: nowrap; }
.marke-gruen { background: var(--gruen-flaeche); color: var(--gruen-tief); }
.marke-rot { background: var(--rot-flaeche); color: var(--rot); }
.marke-gelb { background: var(--gelb-flaeche); color: var(--gelb); }
.farbmuster { display: inline-block; width: 16px; height: 16px; border-radius: 5px; border: 1px solid var(--linie-stark); vertical-align: -3px; margin-right: 8px; }

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

.feld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.feld label { font-size: 0.82rem; font-weight: 700; color: var(--grau); }
.pflicht { color: var(--gruen-dunkel); margin-left: 3px; }
input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"], input[type="file"], select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--linie-stark); border-radius: var(--rund); background: var(--weiss); color: var(--schwarz); font-family: var(--schrift-text); font-size: 0.95rem; transition: border-color 0.12s, box-shadow 0.12s; }
textarea { height: auto; padding: 9px 12px; resize: vertical; min-height: 76px; }
input[type="file"] { padding: 7px 10px; height: auto; }
input[type="color"] { width: 64px; height: 38px; padding: 2px; border: 1px solid var(--linie-stark); border-radius: var(--rund); background: var(--weiss); }
input:hover, select:hover, textarea:hover { border-color: var(--grau-hell); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gruen); box-shadow: 0 0 0 3px rgba(93, 151, 50, 0.18); }
input[readonly] { background: var(--gruen-zart); color: var(--grau); }
.haken { display: flex; align-items: center; gap: 9px; min-height: 38px; font-size: 0.95rem; font-weight: 400; color: var(--schwarz); cursor: pointer; }
.haken input { width: 18px; height: 18px; accent-color: var(--gruen-taste); margin: 0; }
.feld .haken { margin-top: 22px; }
.feld-breit .haken { margin-top: 0; }
.feldfehler { color: var(--rot); font-size: 0.82rem; min-height: 0; }
.feld.fehlerhaft input, .feld.fehlerhaft select, .feld.fehlerhaft textarea { border-color: var(--rot); }

.formular > .angaben { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--linie); }
.formularraster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.formularraster .feld-breit { grid-column: 1 / -1; }
.formularraster-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.formularfuss { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--linie); }
.formularfuss .links { margin-right: auto; }
.hakenliste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.hakenliste .haken { min-height: 30px; }
.hinweiszeile { background: var(--gelb-flaeche); color: var(--gelb); padding: 10px 14px; border-radius: var(--rund); margin: 0 0 14px; font-weight: 600; }
.hinweiszeile a { color: inherit; text-decoration: underline; }

.filterleiste { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.filterleiste .feld { width: 190px; }
.filterleiste .feld-suche { width: 260px; }
.filterleiste .feld-aktion, .filterleiste .feld-schmal { width: auto; }
.filterleiste .abstand { margin-left: auto; }

/* ---------- Fenster ---------- */

.fenster { position: fixed; inset: 0; background: rgba(28, 41, 19, 0.5); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; z-index: 100; overflow-y: auto; }
.fenster-rahmen { background: var(--weiss); border-radius: var(--rund-gross); box-shadow: var(--schatten-stark); width: 100%; max-width: 720px; }
.fenster-rahmen.schmal { max-width: 460px; }
.fenster-kopf { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--linie); }
.fenster-kopf h2 { font-size: 1.15rem; }
.fenster-schliessen { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: var(--rund); background: transparent; color: var(--grau); cursor: pointer; }
.fenster-schliessen:hover { background: var(--gruen-zart); border-color: var(--linie-stark); color: var(--schwarz); }
.fenster-schliessen .sinnbild { width: 18px; height: 18px; }
.fenster-inhalt { padding: 24px; }
.fenster-frage { margin: 0 0 4px; font-size: 1rem; }
.fenster-frage strong { display: block; margin-top: 6px; }

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

.meldungen { position: fixed; top: 74px; right: 28px; z-index: 120; display: flex; flex-direction: column; gap: 8px; max-width: 440px; }
.meldung { background: var(--weiss); color: var(--schwarz); padding: 13px 18px; border-radius: var(--rund); box-shadow: var(--schatten-stark); border: 1px solid var(--linie); border-left: 5px solid var(--gruen); font-weight: 600; }
.meldung-fehler { border-left-color: var(--rot); }
.meldung-warnung, .meldung-hinweis { border-left-color: #E0A800; }

/* ---------- Anmeldung ---------- */

.anmeldeseite { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); }
.anmeldeseite-bild { background: linear-gradient(155deg, var(--gruen) 0%, #4E8528 55%, #3D6722 100%); color: var(--weiss); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.anmeldeseite-bild::before { content: ""; position: absolute; right: -70px; bottom: -90px; width: 520px; height: 746px; background: url("../bilder/logo-weiss.png") center / contain no-repeat; opacity: 0.13; }
.anmeldeseite-bild h1 { font-size: 2.7rem; font-weight: 700; max-width: 520px; position: relative; line-height: 1.15; }
.anmeldeseite-bild p { color: rgba(255, 255, 255, 0.86); font-weight: 600; font-size: 1rem; max-width: 420px; position: relative; margin: 0; }
.anmeldeseite-bild .marke-kopf { padding: 0; min-height: 0; position: relative; }
.anmeldeseite-bild .marke-kopf img { height: 58px; }
.anmeldeseite-bild .marke-wort { font-size: 1.6rem; }
.anmeldeseite-form { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--weiss); }
.anmeldekasten { width: 100%; max-width: 370px; }
.anmeldekasten h2 { font-family: var(--schrift-kopf); font-weight: 500; font-size: 1.9rem; margin-bottom: 24px; }
.anmeldekasten .feld { margin-bottom: 16px; }
.anmeldekasten .schaltflaeche { width: 100%; height: 44px; margin-top: 8px; font-size: 1rem; }
.anmeldefehler { background: var(--rot-flaeche); color: var(--rot); padding: 11px 14px; border-radius: var(--rund); margin-bottom: 16px; font-weight: 600; }
.schluesseltext { font-family: Consolas, "Courier New", monospace; font-size: 1.05rem; letter-spacing: 0.08em; background: var(--gruen-zart); border: 1px solid var(--linie); border-radius: var(--rund); padding: 10px 12px; word-break: break-all; }

/* ---------- Parallelplanung ---------- */

.planrahmen { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--rund); overflow: auto; max-height: calc(100vh - 230px); position: relative; }
.plan { border-collapse: separate; border-spacing: 0; font-size: 11px; line-height: 1.15; min-width: 100%; }
.plan th, .plan td { border-right: 1px solid var(--linie); border-bottom: 1px solid var(--linie); padding: 0; }
.plan thead th { position: sticky; z-index: 6; background: var(--weiss); font-family: var(--schrift-kopf); font-weight: 400; text-transform: uppercase; letter-spacing: 0.04em; color: var(--grau); height: 22px; white-space: nowrap; }
.plan thead tr:nth-child(1) th { top: 0; text-align: left; padding-left: 6px; color: var(--schwarz); font-weight: 500; border-left: 2px solid var(--linie-stark); }
.plan thead tr:nth-child(2) th { top: 22px; text-align: left; padding-left: 6px; font-size: 10px; }
.plan thead tr:nth-child(3) th { top: 44px; height: 30px; font-size: 10px; text-align: center; border-bottom: 1px solid var(--linie-stark); }
.plan thead tr:nth-child(3) th b { display: block; font-weight: 500; color: var(--schwarz); font-size: 11px; }
.plan .zeilenkopf { position: sticky; left: 0; z-index: 5; background: var(--weiss); min-width: 176px; max-width: 176px; width: 176px; text-align: left; padding: 0 10px; font-family: var(--schrift-text); font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--schwarz); border-right: 1px solid var(--linie-stark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }
.plan thead .zeilenkopf { z-index: 8; border-left: 0 !important; }
.plan td { min-width: var(--tag, 36px); width: var(--tag, 36px); height: 30px; text-align: center; vertical-align: middle; position: relative; }
.plan .wochenende { min-width: calc(var(--tag, 36px) / 2); width: calc(var(--tag, 36px) / 2); background: #F1F2EE; }
.plan td.feiertag, .plan th.feiertag { background: #F1F2EE; }
.plan th.feiertag b { color: var(--rot) !important; }
.plan .wochenanfang { border-left: 2px solid var(--linie-stark); }
.plan .heute { background-image: linear-gradient(rgba(93, 151, 50, 0.13), rgba(93, 151, 50, 0.13)); }
.plan thead th.heute { box-shadow: inset 0 -3px 0 var(--gruen); }
.planrahmen[data-planen="1"] td[data-z], .planrahmen[data-planen="1"] td[data-n], .plan td[data-fenster] { cursor: pointer; }
.planrahmen[data-planen="1"] td[data-z]:hover, .planrahmen[data-planen="1"] td[data-n]:hover, .plan td[data-fenster]:hover { box-shadow: inset 0 0 0 2px var(--gruen); }
.plan td b { display: block; font-weight: 700; font-size: 11px; }
.plan td i { display: block; font-style: normal; font-size: 10px; color: #3A3C3A; }
.plan td.angefragt { box-shadow: inset 0 0 0 1.5px #E0A800; }
.plan td.bestaetigt::after { content: ""; position: absolute; right: 2px; top: 2px; width: 5px; height: 5px; border-radius: 50%; background: var(--gruen-dunkel); }
.plan td.bemerkt::before { content: ""; position: absolute; left: 0; top: 0; border: 4px solid transparent; border-left-color: var(--grau); border-top-color: var(--grau); }
.plan td.konflikt { box-shadow: inset 0 0 0 2px var(--rot) !important; }
.plan td.abgeblendet { opacity: 0.25; }
.plan .notiz { font-size: 10px; color: var(--grau); height: 20px; }
.plan .notiz span { display: block; position: absolute; left: 2px; right: 2px; top: 3px; white-space: nowrap; z-index: 2; background: var(--gelb-flaeche); color: var(--gelb); padding: 1px 3px; border-radius: 2px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.plan .notiz td:hover span { right: auto; width: auto !important; z-index: 4; box-shadow: var(--schatten); }
.plan .dozent th, .plan .dozent td { height: 24px; }
.plan thead .wochenende b { font-size: 10px; }
.plan .abschnitt th, .plan .abschnitt td { background: var(--gruen-tief); color: var(--weiss); height: 30px; border-right-color: var(--gruen-tief); border-bottom: 0; }
.plan .abschnitt .zeilenkopf { background: var(--gruen-tief); color: var(--weiss); font-family: var(--schrift-kopf); text-transform: uppercase; letter-spacing: 0.08em; font-size: 12.5px; font-weight: 500; border-right-color: var(--schwarz); }
.plan .abschnitt td { text-align: left; }
.sollist { position: sticky; left: 186px; display: inline-flex; gap: 6px; align-items: center; padding: 0 8px; white-space: nowrap; font-family: var(--schrift-text); }
.sollist span { background: #3A3C3A; border-radius: 3px; padding: 3px 8px; font-size: 11px; color: #D9DBD6; }
.sollist span b { display: inline; color: var(--weiss); font-size: 11px; }
.sollist span.erfuellt { background: var(--gruen-dunkel); color: var(--weiss); }
.sollist span.ueber { background: var(--rot); color: var(--weiss); }
.plan .abw { font-weight: 700; font-size: 10.5px; }
.plan .abw-urlaub { background: #CFE3F4; color: #1F4E79; }
.plan .abw-krank { background: #F6D5D0; color: var(--rot); }
.plan .abw-fortbildung, .plan .abw-hospitation { background: #E6DCF2; color: #55397A; }
.plan .abw-sonstiges, .plan .abw-nicht-verfuegbar, .plan .abw-freizeitausgleich { background: #E4E6E1; color: var(--grau); }
.plan .abw-offen { background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, 0.65) 4px 8px); }
.plan .einsatz { color: var(--grau); font-size: 10px; }
.planlegende { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; color: var(--grau); font-size: 0.86rem; align-items: center; }
.planlegende span { display: inline-flex; align-items: center; gap: 6px; }
.planlegende i { display: inline-block; width: 14px; height: 14px; border-radius: 2px; border: 1px solid var(--linie-stark); }
.planlegende .l-konflikt { box-shadow: inset 0 0 0 2px var(--rot); border: 0; }
.planlegende .l-angefragt { box-shadow: inset 0 0 0 1.5px #E0A800; border: 0; }

/* ---------- Wochen- und Monatsraster (Terminplan, Abwesenheiten) ---------- */

.wochenraster { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.wochenraster th, .wochenraster td { border-right: 1px solid var(--linie); border-bottom: 1px solid var(--linie); padding: 6px; vertical-align: top; }
.wochenraster thead th { font-family: var(--schrift-kopf); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; color: var(--grau); text-align: left; position: sticky; top: 0; background: var(--weiss); z-index: 3; border-bottom-color: var(--linie-stark); }
.wochenraster thead th b { color: var(--schwarz); font-weight: 500; }
.wochenraster .zeilenkopf { width: 190px; text-align: left; font-weight: 600; background: var(--weiss); position: sticky; left: 0; z-index: 2; border-right-color: var(--linie-stark); }
.wochenraster .zeilenkopf small { display: block; font-weight: 400; color: var(--grau); font-family: var(--schrift-text); text-transform: none; letter-spacing: 0; }
.wochenraster td { height: 64px; }
.wochenraster .wochenende, .wochenraster .feiertag { background: #F4F5F1; }
.wochenraster .heute { background-image: linear-gradient(rgba(93, 151, 50, 0.1), rgba(93, 151, 50, 0.1)); }
.block { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--gruen); background: var(--gruen-flaeche); color: var(--schwarz); border-radius: 2px; padding: 3px 6px; margin-bottom: 3px; font-size: 0.82rem; line-height: 1.25; font-family: var(--schrift-text); cursor: pointer; overflow: hidden; }
.block:hover { background: #E2EDD8; }
.block b { font-weight: 700; display: block; white-space: nowrap; }
.block-fest { cursor: default; border-left-color: var(--grau); background: #ECEEEA; }
.block-fest:hover { background: #ECEEEA; }
.block-abwesend { border-left-color: #1F4E79; background: #DCE9F5; cursor: default; }
.block-abgesagt { opacity: 0.5; text-decoration: line-through; }
.block-pruefung { border-left-color: #55397A; background: #EEE7F6; }
.zelle-neu { display: none; width: 100%; height: 20px; border: 1px dashed var(--linie-stark); background: transparent; border-radius: 2px; color: var(--grau); cursor: pointer; font-size: 0.8rem; }
.wochenraster td:hover .zelle-neu { display: block; }

.monatsraster { border-collapse: separate; border-spacing: 0; font-size: 11.5px; }
.monatsraster th, .monatsraster td { border-right: 1px solid var(--linie); border-bottom: 1px solid var(--linie); height: 28px; min-width: 28px; text-align: center; padding: 0; }
.monatsraster thead th { font-family: var(--schrift-kopf); font-weight: 400; color: var(--grau); font-size: 10.5px; height: 34px; position: sticky; top: 0; background: var(--weiss); z-index: 3; border-bottom-color: var(--linie-stark); }
.monatsraster thead th b { display: block; color: var(--schwarz); font-weight: 500; font-size: 11.5px; }
.monatsraster .zeilenkopf { text-align: left; padding: 0 10px; min-width: 200px; position: sticky; left: 0; background: var(--weiss); z-index: 2; border-right-color: var(--linie-stark); white-space: nowrap; font-size: 12.5px; }
.monatsraster .wochenende, .monatsraster .feiertag { background: #F1F2EE; }
.monatsraster .heute { background-image: linear-gradient(rgba(93, 151, 50, 0.16), rgba(93, 151, 50, 0.16)); }
.monatsraster td[data-fenster] { cursor: pointer; }
.monatsraster td[data-fenster]:hover { box-shadow: inset 0 0 0 2px var(--gruen); }
.monatsraster .abw { font-weight: 700; }
.monatsraster .abw-urlaub { background: #CFE3F4; color: #1F4E79; }
.monatsraster .abw-krank { background: #F6D5D0; color: var(--rot); }
.monatsraster .abw-fortbildung, .monatsraster .abw-hospitation { background: #E6DCF2; color: #55397A; }
.monatsraster .abw-sonstiges, .monatsraster .abw-nicht-verfuegbar, .monatsraster .abw-freizeitausgleich { background: #E4E6E1; color: var(--grau); }
.monatsraster .abw-offen { background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, 0.65) 4px 8px); }
.monatsraster .summe { min-width: 64px; padding: 0 8px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Rechtematrix, Protokoll ---------- */

.logovorschau { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); padding: 10px; display: inline-flex; align-self: flex-start; }
.logovorschau img { max-height: 44px; max-width: 200px; display: block; }
code { font-family: Consolas, "Courier New", monospace; font-size: 0.9rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 3px; padding: 1px 6px; word-break: break-all; }
.rechtegruppe { margin-bottom: 18px; }
.rechtegruppe h3 { margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--linie); }
.aenderung { font-family: Consolas, "Courier New", monospace; font-size: 0.86rem; white-space: pre-wrap; word-break: break-word; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); padding: 10px 12px; margin: 0; max-height: 240px; overflow: auto; }
.reiter { display: inline-flex; gap: 4px; flex-wrap: wrap; background: var(--weiss); border: 1px solid var(--linie); border-radius: 10px; padding: 4px; margin-bottom: 18px; box-shadow: var(--schatten); }
.reiter a { padding: 7px 16px; color: var(--grau); font-weight: 600; font-size: 0.93rem; border-radius: 7px; }
.reiter a:hover { color: var(--schwarz); background: var(--gruen-zart); text-decoration: none; }
.reiter a.aktiv { color: var(--weiss); background: var(--gruen-taste); }
.stempeluhr { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.stempeluhr .kennzahl { min-width: 110px; }

.fehlerseite { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.fehlerseite .karte { max-width: 460px; text-align: center; padding: 36px; }
.fehlerseite h1 { margin-bottom: 12px; }
.fehlerseite .karte > img { height: 64px; width: auto; margin-bottom: 18px; }
.fehlerseite p { color: var(--grau); margin: 0 0 22px; }

/* ---------- Mein Unterricht ---------- */

.unterricht { display: flex; align-items: center; gap: 22px; background: var(--weiss); border: 1px solid var(--linie); border-left: 5px solid var(--linie-stark); border-radius: var(--rund-gross); padding: 16px 22px; margin-bottom: 12px; box-shadow: var(--schatten); }
.unterricht.laeuft { border-left-color: var(--gruen); }
.unterricht-zeit { width: 64px; flex: none; text-align: center; }
.unterricht-zeit b { display: block; font-family: var(--schrift-zahl); font-size: 1.35rem; line-height: 1.1; color: var(--gruen-tief); }
.unterricht-zeit span { color: var(--grau); font-size: 0.9rem; }
.unterricht-inhalt { flex: 1; min-width: 0; }
.unterricht-inhalt .unterzeile { margin-top: 3px; }
.unterricht-aktionen { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.unterricht-tag { margin: 22px 0 10px; }
.unterricht-tag.heute { color: var(--gruen-dunkel); }
.unterricht-leer { color: var(--grau); text-align: center; margin-bottom: 12px; }
.wahl { display: inline-flex; border: 1px solid var(--linie-stark); border-radius: var(--rund); overflow: hidden; background: var(--weiss); }
.wahl label { cursor: pointer; position: relative; }
.wahl input { position: absolute; opacity: 0; inset: 0; }
.wahl span { display: block; padding: 6px 12px; font-size: 0.86rem; font-weight: 600; color: var(--grau); border-right: 1px solid var(--linie-stark); white-space: nowrap; }
.wahl label:last-child span { border-right: 0; }
.wahl input:checked + span { background: var(--gruen-taste); color: var(--weiss); }
.wahl input[value="Entschuldigt"]:checked + span { background: var(--gelb); }
.wahl input[value="Unentschuldigt"]:checked + span { background: var(--rot); }
.wahl input:focus-visible + span { outline: 2px solid var(--gruen); outline-offset: -2px; }

/* ---------- Lehrmaterial: Anzeige, Steuerung und Präsentationsfenster ---------- */

.material-titel { display: flex; gap: 12px; align-items: flex-start; }
.material-titel .sinnbild-datei { width: 26px; height: 26px; margin-top: 1px; }
.material-titel .unterzeile { margin: 2px 0 0; font-size: 0.9rem; }
.tabelle td .unterzeile { margin: 1px 0 0; font-size: 0.86rem; }

.anzeige { background: #1B1F1A; border-radius: var(--rund-gross); overflow: hidden; box-shadow: var(--schatten); }
.anzeige-flaeche { height: min(68vh, 760px); display: flex; align-items: center; justify-content: center; position: relative; background: #1B1F1A; }
.anzeige-flaeche canvas, .steuerung-flaeche canvas, .buehne-flaeche canvas { display: block; background: var(--weiss); box-shadow: 0 6px 30px rgba(0, 0, 0, 0.45); }
.anzeige-flaeche:fullscreen { height: 100vh; }
.anzeige-meldung { position: absolute; color: #C9CEC5; font-weight: 600; margin: 0; }
.anzeige-leiste { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--weiss); border-top: 1px solid var(--linie); }
.anzeige-leiste input[type="range"], .steuerung-fuss input[type="range"] { flex: 1; accent-color: var(--gruen-taste); min-width: 80px; }
.anzeige-zaehler { min-width: 74px; text-align: center; font-variant-numeric: tabular-nums; color: var(--grau); }
.anzeige-zaehler b { color: var(--schwarz); font-size: 1.1rem; }
.anzeige-notiz { white-space: pre-wrap; max-height: 240px; overflow-y: auto; }
.anzeige-notiz.leer, .steuerung-notiz.leer { color: var(--grau-hell); }

.buehnenseite { background: #111411; color: #E9ECE6; overflow: hidden; }
.schaltflaeche-dunkel { background: #2A302A; border-color: #3C443B; color: #E9ECE6; }
.schaltflaeche-dunkel:hover { background: #363E35; border-color: #56604F; box-shadow: none; }
.schaltflaeche-dunkel.aktiv { background: var(--weiss); border-color: var(--weiss); color: var(--schwarz); }
.steuerung { height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.steuerung-kopf { display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: #1B1F1A; border-bottom: 1px solid #2E352D; }
.steuerung-kopf > img { height: 34px; width: auto; }
.steuerung-titel { flex: 1; min-width: 0; }
.steuerung-titel b { display: block; font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steuerung-titel span, .steuerung-zeit span { color: #9AA395; font-size: 0.82rem; }
.steuerung-zeit { text-align: right; padding: 0 6px; }
.steuerung-zeit span { display: block; }
.steuerung-zeit b { font-family: var(--schrift-zahl); font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.steuerung-haupt { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 20px; padding: 18px 20px; min-height: 0; }
.steuerung-aktuell, .steuerung-seite { display: flex; flex-direction: column; min-height: 0; }
.steuerung h3 { color: #9AA395; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; }
.steuerung h3 .marke { text-transform: none; letter-spacing: 0; background: #2A302A; color: #C9CEC5; }
.steuerung h3 .marke.marke-gruen { background: var(--gruen-taste); color: var(--weiss); }
.steuerung-schrift { margin-left: auto; display: inline-flex; gap: 4px; }
.steuerung-flaeche { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; background: #0B0D0B; border-radius: var(--rund); }
.steuerung-vorschau { flex: 0 0 34%; margin-bottom: 16px; }
.steuerung-notiz { flex: 1; min-height: 0; overflow-y: auto; white-space: pre-wrap; background: #1B1F1A; border: 1px solid #2E352D; border-radius: var(--rund); padding: 14px 16px; font-size: 1.05rem; line-height: 1.55; }
.steuerung-fuss { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: #1B1F1A; border-top: 1px solid #2E352D; }
.steuerung-fuss .anzeige-zaehler { color: #9AA395; }
.steuerung-fuss .anzeige-zaehler b { color: var(--weiss); font-size: 1.3rem; }
.steuerung-fuss .schaltflaeche { height: 42px; padding: 0 22px; }
.buehne { height: 100vh; background: #000; cursor: pointer; }
.buehne.ruhig { cursor: none; }
.buehne-flaeche { height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; }
.buehne-flaeche canvas { box-shadow: none; }
.buehne.schwarz canvas { visibility: hidden; }
.buehne-hinweis { position: fixed; right: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--rund); border: 1px solid #3C443B; background: rgba(27, 31, 26, 0.9); color: #E9ECE6; font-family: var(--schrift-text); font-weight: 600; cursor: pointer; transition: opacity 0.3s; }
.buehne.ruhig .buehne-hinweis, .buehne:fullscreen .buehne-hinweis { opacity: 0; pointer-events: none; }

/* ---------- Kleine Bildschirme ---------- */

@media (max-width: 1100px) {
  .raster-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .raster-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .seitenleiste { transform: translateX(-100%); transition: transform 0.18s; }
  body.menue-offen .seitenleiste { transform: none; box-shadow: var(--schatten); }
  .hauptbereich { margin-left: 0; }
  .schaltflaeche.menueknopf { display: inline-flex; }
  .inhalt { padding: 18px; }
  .kopfleiste { padding: 0 16px; }
  .raster-2, .raster-3, .raster-4, .formularraster, .formularraster-3, .hakenliste { grid-template-columns: minmax(0, 1fr); }
  .anmeldeseite { grid-template-columns: minmax(0, 1fr); }
  .unterricht { flex-wrap: wrap; gap: 12px; }
  .steuerung-haupt { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .steuerung-kopf { flex-wrap: wrap; }
  .unterricht-aktionen { width: 100%; justify-content: flex-start; }
  .anmeldeseite-bild { display: none; }
  .kopfleiste-benutzer .name, .kopfleiste-benutzer .kuerzel { display: none; }
  .kopfleiste { gap: 10px; }
  .kopfleiste-ort { min-width: 0; flex: 1 1 auto; }
  .kopfleiste-ort b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .kopfleiste-benutzer { flex: none; gap: 8px; }
}
@media (max-width: 640px) {
  .kopfleiste-gruppe, .kopfleiste-benutzer .wort { display: none; }
  .kopfleiste-benutzer .schaltflaeche-zweit:has(.wort) { padding: 0 9px; }
}
@media print {
  .seitenleiste, .kopfleiste, .seitenkopf-aktionen, .filterleiste, .meldungen, .spalte-aktionen { display: none !important; }
  .hauptbereich { margin: 0; }
  .planrahmen { max-height: none; overflow: visible; }
}

/* ---------- Fahrtenbuch, Unterschrift, Meldungen, Superuser ---------- */
.angaben-kopf { background: var(--gruen-flaeche); border-radius: var(--rund); padding: 12px 16px; margin-bottom: 18px; }
.formularraster-einspaltig { grid-template-columns: 1fr; }
.unterschrift { position: relative; border: 1px solid var(--linie-stark); border-radius: var(--rund); background: var(--weiss); overflow: hidden; }
.unterschrift canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; touch-action: none; cursor: crosshair; }
.unterschrift::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: 24%; border-bottom: 1px dashed var(--linie-stark); pointer-events: none; }
.unterschrift.unterschrieben { border-color: var(--gruen); box-shadow: 0 0 0 2px var(--gruen-flaeche); }
.unterschrift button { position: absolute; top: 8px; right: 8px; }
.unterschrift-bild { display: block; margin-top: 8px; border: 1px solid var(--linie); border-radius: var(--rund); background: var(--weiss); max-width: 100%; height: auto; }
.einmalig { margin-bottom: 18px; border-left: 4px solid var(--gelb); }
.kennwort-anzeige { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 1.05rem; letter-spacing: 0.04em; user-select: all; background: var(--gruen-flaeche); padding: 4px 10px; border-radius: var(--rund); }
.meldeliste { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; }
.meldeliste li { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--linie); }
.meldeliste li:last-child { border-bottom: 0; }
.meldeliste .punkt { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--gelb); }
.meldeliste .punkt-rot { background: var(--rot); }
.meldeliste a { color: inherit; font-weight: 600; }
.meldeliste .betrifft { color: var(--grau); margin-left: auto; white-space: nowrap; font-size: 0.86rem; }
.zeile-klickbar { cursor: pointer; }
.zeile-klickbar:hover td { background: var(--gruen-flaeche); }
.protokoll-werte { width: 100%; border-collapse: collapse; margin-top: 14px; }
.protokoll-werte th, .protokoll-werte td { text-align: left; vertical-align: top; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--linie); font-size: 0.9rem; overflow-wrap: anywhere; }
.protokoll-werte th { color: var(--grau); font-weight: 600; white-space: nowrap; }
.tabelle td.rechts, .tabelle th.rechts, .tabelle td.fest { white-space: nowrap; }

/* ---------- Datensicherung, Vergleich, laufender Abruf ---------- */
.hinweiszeile-rot { background: var(--rot-flaeche); color: var(--rot); }
.kennzahl-klein { font-size: 1.3rem; line-height: 1.5; }
.karte-schmal { max-width: 760px; }
.formularfuss-frei { border-top: 0; padding-top: 0; }
.grau { color: var(--grau); }
.punkte { margin: 0 0 6px; padding-left: 20px; columns: 2; column-gap: 28px; }
.punkte li { padding: 3px 0; break-inside: avoid; }
.vergleich th[scope=row] { text-align: left; font-weight: 700; min-width: 250px; vertical-align: top; text-transform: none; letter-spacing: 0; font-size: 0.95rem; color: inherit; background: none; }
.vergleich-tabellen { display: block; font-weight: 400; font-size: 0.82rem; color: var(--grau); margin-top: 3px; }
.vergleich td { vertical-align: top; }
.vergleich td .haken { display: flex; margin-bottom: 8px; }
.vergleich-leer { color: var(--grau); }
.vergleich-kopf { margin: 18px 0 8px; }
body.laedt { cursor: progress; }
body.laedt::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1000; background: linear-gradient(90deg, transparent, var(--gruen), transparent) no-repeat; background-size: 40% 100%; animation: laufband 1.1s linear infinite; }
@keyframes laufband { from { background-position: -70% 0; } to { background-position: 170% 0; } }
.reiter-voll { display: flex; } .reiter-voll a { flex: 1; text-align: center; }
.zweitzeile { display: block; font-size: 0.82rem; color: var(--grau); margin-top: 2px; }
.schaltflaeche.nur-sinnbild { padding-left: 9px; padding-right: 9px; }
.schaltflaeche.nur-sinnbild .sinnbild { margin: 0; }
.hakenliste-reihe { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- Rechnungslauf, Mahnlauf, Versand ---------- */
.spalte-haken { width: 44px; }
.spalte-haken .haken { margin: 0; }
.laufleiste { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 22px; }
.laufleiste .feld { margin: 0; width: auto; }
.laufleiste .haken { margin-bottom: 9px; }
.laufleiste .marke { margin-bottom: 9px; }
.laufleiste-stand { margin-left: auto; margin-bottom: 9px; font-weight: 700; color: var(--gruen-tief); font-family: var(--schrift-zahl); font-size: 1.05rem; }
.fortschritt { display: grid; gap: 14px; }
.fortschritt-zeile { display: grid; grid-template-columns: 110px minmax(120px, 1fr) minmax(200px, 1.3fr); align-items: center; gap: 16px; }
.fortschritt-name { font-weight: 700; }
.fortschritt-text { color: var(--grau); font-weight: 600; }
.fortschritt progress { width: 100%; height: 12px; border: 0; border-radius: 6px; overflow: hidden; background: var(--linie); appearance: none; -webkit-appearance: none; }
.fortschritt progress::-webkit-progress-bar { background: var(--linie); border-radius: 6px; }
.fortschritt progress::-webkit-progress-value { background: var(--gruen); border-radius: 6px; transition: width 0.4s ease; }
.fortschritt progress::-moz-progress-bar { background: var(--gruen); border-radius: 6px; }
@media (max-width: 760px) {
  .fortschritt-zeile { grid-template-columns: 1fr; gap: 6px; }
  .laufleiste-stand { margin-left: 0; width: 100%; }
}
.sinnbild-xml { color: var(--gruen-tief); }
.tabelle .spalte-nummer { white-space: nowrap; }
.formular > .feld + .formularraster { margin-top: 18px; }
.feld-verdeckt { position: absolute; left: -6000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Breites Fenster, Abschnitte und Eingabetabellen in Formularen ---------- */
.fenster-rahmen.breit { max-width: 1040px; }
.fenster-rahmen.breit .formularraster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.formularabschnitt { font-family: var(--schrift-kopf); font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.03em; margin: 26px 0 10px; }
.eingabetabelle td { padding: 5px 6px; }
.eingabetabelle input { width: 100%; height: 36px; padding: 0 9px; border: 1px solid var(--linie-stark); border-radius: var(--rund); font: inherit; background: var(--weiss); }
.eingabetabelle td:first-child { min-width: 200px; }
[hidden] { display: none !important; }
@media (max-width: 900px) { .fenster-rahmen.breit .formularraster { grid-template-columns: 1fr; } }

/* ---------- Zweites Untermenü der Seitenleiste ---------- */
.nav-eintraege a.hat-unter { display: flex; align-items: center; justify-content: space-between; }
.nav-eintraege a.hat-unter .pfeil { width: 15px; height: 15px; opacity: 0.8; transition: transform 0.2s ease; }
.nav-eintraege a.hat-unter.offen { font-weight: 700; background: rgba(255, 255, 255, 0.12); border-radius: 0 var(--rund) var(--rund) 0; }
.nav-eintraege a.hat-unter.offen .pfeil { transform: rotate(180deg); }
.nav-zweig a { margin-left: 39px; padding: 6px 12px 6px 16px; font-size: 0.89rem; }
.nav-zahl { display: inline-block; min-width: 20px; margin-left: 8px; padding: 1px 6px; border-radius: 999px; background: var(--weiss); color: var(--gruen-tief); font-size: 0.74rem; font-weight: 700; text-align: center; }
.nav-eintraege a.aktiv .nav-zahl { background: var(--gruen); color: var(--weiss); }

.eingabetabelle input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--gruen); }
.eingabetabelle td.spalte-haken { min-width: 0; }
.eingabetabelle td.spalte-haken { width: 76px; text-align: center; vertical-align: middle; }
.eingabetabelle td { vertical-align: middle; }

/* ---------- Kommunikation: Verläufe und Nachrichten (Büro und Teilnehmerportal) ---------- */
.zeilenknoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.zeilenknoepfe .unterzeile { margin: 0; font-size: 0.86rem; }
.kommunikation { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 18px; align-items: stretch; height: calc(100vh - 210px); min-height: 440px; }
.kommunikation .karte + .karte { margin-top: 0; }
.gespraeche { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.gespraeche-suche { padding: 14px 14px 12px; border-bottom: 1px solid var(--linie); }
.gespraeche-suche input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--linie-stark); border-radius: var(--rund); font: inherit; background: var(--weiss); }
.gespraeche-liste { overflow-y: auto; flex: 1; }
.gespraech-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 12px 16px; border-bottom: 1px solid var(--linie); color: var(--schwarz); border-left: 3px solid transparent; }
.gespraech-zeile:hover { background: var(--gruen-zart); text-decoration: none; }
.gespraech-zeile.aktiv { background: var(--gruen-flaeche); border-left-color: var(--gruen); }
.gespraech-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gespraech-zeit { color: var(--grau); font-size: 0.8rem; white-space: nowrap; }
.gespraech-auszug { color: var(--grau); font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gespraech-zeile .nav-zahl { background: var(--gruen); color: var(--weiss); margin: 0; align-self: center; }
.gespraech { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.gespraech-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--linie); }
.gespraech-kopf .unterzeile { margin-top: 2px; font-size: 0.88rem; }
.gespraech-aktionen { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.verlauf { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 8px; background: var(--gruen-zart); min-height: 200px; }
.verlauf-leer { color: var(--grau); text-align: center; margin: auto; padding: 30px 16px; }
.verlauf-tag { text-align: center; margin: 8px 0 2px; }
.verlauf-tag span { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--weiss); border: 1px solid var(--linie); color: var(--grau); font-size: 0.78rem; font-weight: 600; }
.blase { align-self: flex-start; max-width: min(78%, 620px); background: var(--weiss); border: 1px solid var(--linie); border-radius: 14px 14px 14px 4px; padding: 9px 13px 7px; box-shadow: 0 1px 2px rgba(35, 52, 23, 0.05); }
.blase p { margin: 0; white-space: normal; overflow-wrap: anywhere; }
.blase-eigen { align-self: flex-end; background: var(--gruen-flaeche); border-color: #D3E4C4; border-radius: 14px 14px 4px 14px; }
.blase-fuss { color: var(--grau); font-size: 0.74rem; margin-top: 4px; text-align: right; }
.blase-bild { display: block; margin-bottom: 6px; }
/* Feste Größe der Vorschau: Der Verlauf verschiebt sich nicht, wenn Bilder nachladen */
.blase-bild img { display: block; width: 240px; max-width: 100%; height: 180px; object-fit: cover; border-radius: 8px; background: var(--linie); }
.blase-datei { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; margin-bottom: 6px; border: 1px solid var(--linie-stark); border-radius: var(--rund); background: var(--weiss); color: var(--schwarz); font-weight: 600; max-width: 100%; }
.blase-datei span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schreibfeld { border-top: 1px solid var(--linie); padding: 14px 22px 16px; background: var(--weiss); }
.schreibfeld textarea { width: 100%; min-height: 62px; max-height: 200px; resize: vertical; padding: 10px 12px; border: 1px solid var(--linie-stark); border-radius: var(--rund); font: inherit; background: var(--weiss); }
.schreibfeld-fuss { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.dateiwahl { cursor: pointer; max-width: 60%; }
.dateiwahl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) {
  .kommunikation { grid-template-columns: minmax(0, 1fr); height: auto; }
  .gespraeche-liste { max-height: 260px; }
  .gespraech .verlauf { max-height: 60vh; }
}

/* ---------- Teilnehmerportal ---------- */
body.portal { background: var(--flaeche); min-height: 100vh; display: flex; flex-direction: column; }
.portal-breite { width: 100%; max-width: 1040px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.portal-kopf { background: linear-gradient(180deg, var(--gruen) 0, var(--gruen-taste) 100%); color: var(--weiss); }
.portal-kopf > .portal-breite { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.portal-kopf .marke-kopf { padding: 14px 0; min-height: 72px; }
.portal-kopf .marke-kopf img { height: 40px; }
.portal-benutzer { display: flex; align-items: center; gap: 12px; }
.portal-benutzer .name { font-weight: 600; }
.portal-nav { background: var(--gruen-tief); }
.portal-nav .portal-breite { display: flex; gap: 4px; overflow-x: auto; }
.portal-nav a { color: var(--weiss); padding: 12px 16px; font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; opacity: 0.86; }
.portal-nav a:hover { text-decoration: none; opacity: 1; }
.portal-nav a.aktiv { border-bottom-color: var(--weiss); opacity: 1; }
.portal-inhalt { flex: 1; padding-top: 28px; padding-bottom: 36px; }
.portal-inhalt .raster-kennzahlen { margin-bottom: 18px; }
.portal-inhalt .gespraech { height: calc(100vh - 290px); min-height: 420px; }
.portal-fuss { color: var(--grau); font-size: 0.86rem; padding-top: 14px; padding-bottom: 22px; }
a.karte-verweis { display: block; color: inherit; transition: box-shadow 0.15s ease, transform 0.15s ease; }
a.karte-verweis:hover { text-decoration: none; box-shadow: var(--schatten-stark); transform: translateY(-1px); }
.kennzahl-leer { color: var(--grau-hell); }
.anmeldezusatz { margin: 18px 0 0; text-align: center; }
.anmeldehaken { margin-bottom: 14px; align-items: flex-start; }
.anmeldehaken input { margin-top: 3px; flex: none; }
@media (max-width: 640px) {
  .portal-nav .portal-breite { padding-left: 6px; padding-right: 6px; gap: 0; }
  .portal-nav a { flex: 1; text-align: center; padding: 12px 4px; font-size: 0.96rem; }
  .portal-benutzer .name { display: none; }
  .portal-inhalt { padding-top: 20px; }
  .portal-inhalt .karte { padding: 16px; }
  .portal-inhalt .gespraech { padding: 0; height: calc(100vh - 250px); }
  .blase { max-width: 90%; }
}
.eingabetabelle select { width: 100%; min-width: 240px; height: 36px; padding: 0 9px; border: 1px solid var(--linie-stark); border-radius: var(--rund); font: inherit; background: var(--weiss); }

/* ---------- Stempeluhr und Zeiterfassung ---------- */
.stempelkarte { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px 34px; border-left: 5px solid var(--linie-stark); margin-bottom: 18px; }
.stempelkarte.stempel-anwesend { border-left-color: var(--gruen); }
.stempelkarte.stempel-pause { border-left-color: #E0A800; }
.stempel-zeit { font-family: var(--schrift-zahl); font-size: 3rem; font-weight: 700; line-height: 1; color: var(--gruen-tief); font-variant-numeric: tabular-nums; }
.stempel-tag { color: var(--grau); font-size: 0.9rem; font-weight: 600; margin-top: 6px; }
.stempel-stand { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.stempel-heute { color: var(--grau); font-size: 0.95rem; }
.stempel-heute b { font-family: var(--schrift-zahl); font-size: 1.5rem; color: var(--schwarz); margin-right: 4px; font-variant-numeric: tabular-nums; }
.stempel-knoepfe { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.stempel-knoepfe .schaltflaeche { min-height: 46px; padding: 0 22px; font-size: 1rem; }
.punkt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gruen); margin-right: 7px; box-shadow: 0 0 0 3px rgba(93, 151, 50, 0.22); }
.stempelstand { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; background: var(--gruen-flaeche); color: var(--gruen-tief); font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.stempelstand:hover { text-decoration: none; background: #DCEBCF; }
.zeittabelle td, .zeittabelle th { font-variant-numeric: tabular-nums; }
.zeittabelle tr.frei td { background: #F6F7F3; color: var(--grau); }
.zeittabelle tr.heute td { background: var(--gruen-zart); }
.zeittabelle tr.heute td:first-child { box-shadow: inset 3px 0 0 var(--gruen); font-weight: 700; }
.zeittabelle tr.kommend td { color: var(--grau-hell); }
.zeittabelle tr.woche td { background: var(--weiss); border-top: 1px solid var(--linie-stark); border-bottom: 2px solid var(--linie-stark); font-weight: 700; color: var(--grau); font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.03em; }
.zeitmarke { display: inline-block; padding: 2px 9px; margin: 1px 4px 1px 0; border-radius: 6px; background: var(--gruen-flaeche); color: var(--gruen-tief); font-weight: 600; font-size: 0.86rem; white-space: nowrap; }
.zeitmarke.offen { background: #FFF3CD; color: #7A5B00; }
button.zeitmarke { border: 0; cursor: pointer; font-family: inherit; }
button.zeitmarke:hover { box-shadow: inset 0 0 0 2px var(--gruen); }
.plus { color: var(--gruen-taste); font-weight: 700; }
.minus { color: var(--rot); font-weight: 700; }
.kennzahl-zusatz { color: var(--grau); font-size: 0.82rem; margin-top: 2px; }
.balken { height: 6px; border-radius: 999px; background: var(--linie); margin-top: 10px; overflow: hidden; }
.balken i { display: block; height: 100%; border-radius: 999px; background: var(--gruen); }
.abw-marke { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 0.82rem; }
.abw-marke.abw-urlaub { background: #CFE3F4; color: #1F4E79; }
.abw-marke.abw-krank { background: #F6D5D0; color: var(--rot); }
.abw-marke.abw-fortbildung, .abw-marke.abw-hospitation { background: #E6DCF2; color: #55397A; }
.abw-marke.abw-sonstiges, .abw-marke.abw-nicht-verfuegbar, .abw-marke.abw-freizeitausgleich { background: #E4E6E1; color: var(--grau); }
.abw-marke.abw-offen { background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, 0.65) 4px 8px); }
.legende-marken { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.kartenkopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.kartenkopf h2 { margin: 0; }
.personenliste { display: flex; flex-wrap: wrap; gap: 8px; }
.personenliste span { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border: 1px solid var(--linie); border-radius: 999px; background: var(--weiss); font-size: 0.9rem; }
@media (max-width: 760px) {
  .stempelkarte { grid-template-columns: 1fr; }
  .stempel-knoepfe { justify-content: flex-start; }
  .kopfleiste-benutzer .stempelstand { display: none; }
}

.schaltflaeche-zweit.aktiv { border-color: var(--gruen); color: var(--gruen-tief); background: var(--gruen-flaeche); }
.personenliste i { font-style: normal; }
.monatsraster .minus { color: var(--rot); font-weight: 700; }

.knopfzeile { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-height: 38px; }
