/* AG Technik – Grundgestaltung. Handy zuerst, große Tippflächen, hoher Kontrast. */
:root {
  --hintergrund: #f4f5f7;
  --flaeche: #ffffff;
  --text: #1d2433;
  --text-leise: #5b6475;
  --linie: #d9dce3;
  --akzent: #d9480f;        /* Bühnenorange */
  --akzent-dunkel: #b33b0b;
  --ok: #2b8a3e;
  --ok-hell: #e6f4ea;
  --fehler: #c92a2a;
  --fehler-hell: #fdecec;
  --warn: #e8590c;
  --radius: 12px;
  --tipp: 48px;             /* Mindesthöhe für Knöpfe und Felder */
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--hintergrund);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--akzent-dunkel); }

h1 { font-size: 1.6rem; line-height: 1.25; margin: 0.4rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.6rem; }

/* Kopf */
.kopf {
  background: var(--text);
  color: #fff;
  padding: calc(0.6rem + env(safe-area-inset-top)) 1rem 0.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
}
.marke { color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; letter-spacing: 0.02em; }
.marke::before { content: ""; display: inline-block; width: 0.7em; height: 0.7em; border-radius: 50%;
                 background: var(--akzent); margin-right: 0.45em; vertical-align: 0.05em; }
.menue { display: flex; flex-wrap: wrap; gap: 0.2rem; margin-left: auto; }
.menue a { color: #fff; text-decoration: none; padding: 0.5rem 0.7rem; border-radius: 8px; min-height: 40px;
           display: inline-flex; align-items: center; }
.menue a:hover, .menue a:focus-visible { background: rgba(255, 255, 255, 0.12); }

/* Inhalt */
.inhalt { width: 100%; max-width: 760px; margin: 0 auto; padding: 1rem; flex: 1; }

.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
         padding: 1.1rem; margin-bottom: 1rem; }
.karte.schmal { max-width: 460px; margin-left: auto; margin-right: auto; }

.leer { color: var(--text-leise); }
.hinweis { display: block; font-size: 0.85rem; color: var(--text-leise); font-weight: 400; }
.feldinfo { margin: 0; color: var(--text-leise); }

.titelzeile { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* Meldungen */
.meldung { padding: 0.75rem 1rem; border-radius: var(--radius); margin: 0 0 1rem; border: 1px solid transparent; }
.meldung-ok { background: var(--ok-hell); border-color: #b7dfc2; color: #1e5f2b; }
.meldung-fehler { background: var(--fehler-hell); border-color: #f3c0c0; color: #8f1d1d; }

/* Formulare */
.formular { display: grid; gap: 0.9rem; margin-bottom: 0.6rem; }
.formular label { display: grid; gap: 0.3rem; font-weight: 600; }
input, select, textarea {
  font: inherit;
  width: 100%;
  min-height: var(--tipp);
  padding: 0.6rem 0.75rem;
  border: 1px solid #b8bdc8;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}
textarea { min-height: 7rem; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(217, 72, 15, 0.35); border-color: var(--akzent); }
fieldset.auswahl { border: 0; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
fieldset.auswahl legend { font-weight: 600; margin-bottom: 0.3rem; }
label.option { display: flex !important; align-items: center; gap: 0.6rem; font-weight: 400 !important;
               min-height: var(--tipp); padding: 0 0.75rem; border: 1px solid var(--linie); border-radius: 10px; }
label.option input { width: 1.3rem; min-height: auto; }

/* Knöpfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tipp); padding: 0 1.1rem;
  font: inherit; font-weight: 600;
  border-radius: 10px; border: 1px solid var(--akzent);
  background: var(--akzent); color: #fff; text-decoration: none; cursor: pointer;
}
.knopf:hover { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); }
.knopf.voll { width: 100%; }
.knopf.zweit { background: #fff; color: var(--text); border-color: #b8bdc8; }
.knopf.zweit:hover { background: #f0f1f4; }
.knopf.warnung { background: #fff; color: var(--warn); border-color: var(--warn); }
.knopf.gefahr { background: var(--fehler); border-color: var(--fehler); }
.knopf[disabled] { opacity: 0.5; cursor: not-allowed; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--akzent-dunkel);
              text-decoration: underline; cursor: pointer; }
.aktionen { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.6rem 0 0; }
.aktionen form { margin: 0; }
.nebenlink { margin-top: 1rem; text-align: center; }
form.inline { display: inline; }

/* Listen */
.liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.eintrag { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 0.9rem 1rem; }
.eintrag.status-gesperrt { opacity: 0.7; }
.eintrag-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.eintrag-info { color: var(--text-leise); font-size: 0.92rem; overflow-wrap: anywhere; }
.abzeichen { font-size: 0.78rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px;
             background: #eceef2; color: var(--text-leise); }
.abzeichen.warn { background: #fff0e6; color: var(--warn); }
.aktionen-auf summary { cursor: pointer; color: var(--akzent-dunkel); margin-top: 0.4rem; min-height: 32px;
                        display: inline-flex; align-items: center; }

.zahlen { list-style: none; padding: 0; margin: 0 0 0.4rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; }
.zahlen strong { font-size: 1.4rem; margin-right: 0.25rem; }

.kopierfeld { display: grid; gap: 0.3rem; font-weight: 600; }
.bericht { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.82rem; }

/* Fuß */
.fuss { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; justify-content: center; align-items: center;
        padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); color: var(--text-leise); font-size: 0.9rem; }
.version { opacity: 0.8; }

@media (min-width: 700px) {
  .inhalt { padding: 1.6rem; }
  h1 { font-size: 1.9rem; }
}

/* --- Veranstaltungen (ab 0.2.0) --- */
.zurueck { margin: 0 0 0.3rem; }
.zurueck a { text-decoration: none; }
.gross { font-size: 1.15rem; margin: 0 0 0.2rem; }
.karte p { margin: 0 0 0.5rem; }
.karte p:last-child { margin-bottom: 0; }
.karte.hervor { border-color: var(--akzent); box-shadow: 0 0 0 2px rgba(217, 72, 15, 0.12); }
.vorzeile { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--akzent-dunkel); }
.karte h2 a { color: inherit; }
.beschreibung { white-space: pre-line; }
.hinweis-inline { font-size: 0.85rem; color: var(--text-leise); font-weight: 400; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.abzeichen.ok { background: var(--ok-hell); color: var(--ok); }
.eintrag-link { display: block; color: inherit; text-decoration: none; }
.eintrag.abgesagt { opacity: 0.6; }
.liste.kompakt { gap: 0.5rem; }
.liste.kompakt > li > .eintrag-link { padding: 0.6rem 0; border-bottom: 1px solid var(--linie); }
.liste.kompakt > li:last-child > .eintrag-link { border-bottom: 0; }
.liste.kompakt .eintrag-info { display: block; }

/* Antwortknöpfe: ein Tipp genügt */
.antworten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0.6rem 0; }
.antworten form { margin: 0; }
.antwort { width: 100%; min-height: 56px; font: inherit; font-weight: 700; border-radius: 10px; cursor: pointer;
           border: 2px solid #b8bdc8; background: #fff; color: var(--text); padding: 0 0.3rem; }
.antwort-ja.gewaehlt { background: var(--ok); border-color: var(--ok); color: #fff; }
.antwort-vielleicht.gewaehlt { background: #f59f00; border-color: #f59f00; color: #1d2433; }
.antwort-nein.gewaehlt { background: #868e96; border-color: #868e96; color: #fff; }
.antwort:hover { border-color: var(--text); }

/* Besetzung */
.plaetze { list-style: none; padding: 0; margin: 0; }
.platz { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name aktion" "person aktion" "einteilen einteilen";
         gap: 0.1rem 0.8rem; align-items: center; padding: 0.7rem 0; border-bottom: 1px solid var(--linie); }
.platz:last-child { border-bottom: 0; }
.platz-name { grid-area: name; font-weight: 700; }
.platz-person { grid-area: person; color: var(--text-leise); }
.platz.frei .platz-person em { color: var(--warn); font-style: normal; font-weight: 600; }
.platz-aktion { grid-area: aktion; }
.platz-aktion form { margin: 0; }
.einteilen { grid-area: einteilen; display: flex; gap: 0.5rem; margin-top: 0.4rem; }
.einteilen select { flex: 1; min-width: 0; }

/* Zeiten im Formular nebeneinander */
.zeitraster { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
@media (min-width: 560px) { .zeitraster { grid-template-columns: repeat(4, 1fr); } }

/* Ablauf */
.ablauf { list-style: none; padding: 0; margin: 0; }
.ablauf li { display: grid; grid-template-columns: 4rem 1fr; gap: 0.6rem; padding: 0.5rem 0; border-bottom: 1px solid var(--linie); }
.ablauf li:last-child { border-bottom: 0; }
.ablauf .zeit { font-variant-numeric: tabular-nums; font-weight: 700; }
.ablauf-zeile .zeitraster { grid-template-columns: repeat(2, 1fr); }
.unterzeile { font-size: 0.9rem; font-weight: 600; color: var(--text-leise); margin: 0.6rem 0 0 !important; }
.einteilen-auf { grid-area: einteilen; margin-top: 0.2rem; }
.einteilen-auf summary { cursor: pointer; color: var(--akzent-dunkel); font-size: 0.92rem; min-height: 32px;
                         display: inline-flex; align-items: center; }
.platz .einteilen { margin-top: 0.3rem; }
.verspaetung-steuerung { margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px dashed var(--linie); }

/* --- Geräte und Technik (ab 0.4.0) --- */
.filter { display: grid; grid-template-columns: 1fr; gap: 0.5rem; margin-bottom: 1rem; }
@media (min-width: 640px) { .filter { grid-template-columns: 2fr 1fr 1fr auto; } }
.geraet-zeile { display: grid; grid-template-columns: 56px 1fr; gap: 0.8rem; align-items: center; }
.vorschau { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: #eceef2; }
.leer-bild { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--text-leise); }
.eintrag.status-defekt, .eintrag.status-reparatur { border-color: #f3c0c0; }
.geraet-foto { width: 100%; max-height: 320px; object-fit: contain; border-radius: 10px; background: #f0f1f4; margin-bottom: 0.8rem; }
.daten { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0; }
.daten dt { font-weight: 600; color: var(--text-leise); }
.daten dd { margin: 0; }
.einfach { margin: 0; padding-left: 1.1rem; }
.einfach li { margin: 0.25rem 0; }
.verlauf { list-style: none; margin: 0; padding: 0; }
.verlauf li { padding: 0.5rem 0; border-bottom: 1px solid var(--linie); }
.verlauf li:last-child { border-bottom: 0; }
.qr-karte svg { width: 160px; height: 160px; display: block; }
.klein { font-size: 0.82rem; color: var(--text-leise); }
.warn-text { color: var(--warn); }
.ok-knopf { background: var(--ok); border-color: var(--ok); color: #fff; }
.warnliste { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.warnliste a { color: inherit; }
details.innen, .formular.innen { margin-top: 0.8rem; }
details > summary { cursor: pointer; color: var(--akzent-dunkel); font-weight: 600; min-height: 40px; display: flex; align-items: center; }
fieldset.kategorien { grid-template-columns: repeat(2, 1fr); }

.reiter { display: flex; gap: 0.3rem; overflow-x: auto; margin: 0 0 1rem; border-bottom: 2px solid var(--linie); }
.reiter a { padding: 0.6rem 0.9rem; text-decoration: none; color: var(--text-leise); font-weight: 600; white-space: nowrap;
            border-bottom: 3px solid transparent; margin-bottom: -2px; }
.reiter a.aktiv { color: var(--text); border-bottom-color: var(--akzent); }

.kacheln { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
@media (min-width: 640px) { .kacheln { grid-template-columns: repeat(4, 1fr); } }
.kachel { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.8rem; border: 1px solid var(--linie); border-radius: 10px;
          text-decoration: none; color: var(--text); background: #fafbfc; }
.kachel span { font-size: 0.88rem; color: var(--text-leise); }
.kachel:hover { border-color: var(--akzent); }

.tabelle-rahmen { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); margin-bottom: 1rem; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tabelle th, .tabelle td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: top; }
.tabelle th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-leise); background: #fafbfc; white-space: nowrap; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle .zahl { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle tr.konflikt td { background: var(--fehler-hell); }
details.bearbeiten { padding: 0.6rem 1.1rem; }
.zu-viel { color: var(--fehler); }

.material-zeile { display: flex; justify-content: space-between; gap: 0.8rem; align-items: flex-start; }
.material-zeile form { margin: 0; flex-shrink: 0; }

.packliste { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.5rem; }
.packliste li { display: grid; grid-template-columns: 1fr; gap: 0.5rem; background: var(--flaeche); border: 1px solid var(--linie);
                border-radius: var(--radius); padding: 0.7rem 0.9rem; }
@media (min-width: 560px) { .packliste li { grid-template-columns: 1fr auto; align-items: center; } }
.packliste li.unterwegs { border-left: 5px solid #f59f00; }
.packliste li.fertig { border-left: 5px solid var(--ok); opacity: 0.75; }
.pack-text .eintrag-info { display: block; }
.pack-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.pack-knoepfe form { margin: 0; }
.haken { width: 100%; min-height: var(--tipp); font: inherit; font-weight: 700; border-radius: 10px; border: 2px solid #b8bdc8;
         background: #fff; color: var(--text); padding: 0 0.8rem; cursor: pointer; }
.haken.an { background: var(--ok); border-color: var(--ok); color: #fff; }

/* Etiketten: 3 Spalten auf A4 */
.etiketten { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 1rem 0; }
.etikett-feld { display: grid; grid-template-columns: 84px 1fr; gap: 8px; align-items: center; border: 1px dashed #999;
                padding: 6px; background: #fff; break-inside: avoid; }
.etikett-feld svg { width: 84px; height: 84px; }
.etikett-text { display: flex; flex-direction: column; font-size: 12px; line-height: 1.25; overflow: hidden; }
.etikett-text strong { font-size: 15px; }
.etikett-text .klein { font-size: 9px; }
@media print {
  .kopf, .fuss, .nicht-drucken, .meldung { display: none !important; }
  body { background: #fff; }
  .inhalt { max-width: none; padding: 0; }
  .etiketten { grid-template-columns: repeat(3, 1fr); gap: 4mm; }
  .etikett-feld { border: 1px dashed #bbb; }
}

/* Menü am Handy in einer Zeile, seitlich wischbar */
@media (max-width: 699px) {
  .kopf { flex-wrap: nowrap; flex-direction: column; align-items: stretch; gap: 0.2rem; }
  .menue { margin-left: 0; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
           margin-right: -1rem; padding-right: 1rem; }
  .menue::-webkit-scrollbar { display: none; }
  .menue a { white-space: nowrap; padding: 0.45rem 0.65rem; }
  .reiter a { padding: 0.6rem 0.55rem; font-size: 0.95rem; }

  /* Tabellen werden zu Karten */
  .tabelle thead { display: none; }
  .tabelle, .tabelle tbody, .tabelle tr, .tabelle td { display: block; width: 100%; }
  .tabelle tr { padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--linie); }
  .tabelle td { border: 0; padding: 0.15rem 0 0.15rem 6.5rem; position: relative; min-height: 1.6rem; }
  .tabelle td::before { content: attr(data-label); position: absolute; left: 0; top: 0.2rem; width: 6rem;
                        font-size: 0.8rem; color: var(--text-leise); font-weight: 600; }
  .tabelle td:empty { display: none; }
  .tabelle td[data-label=""]::before { content: ""; }
  .tabelle-rahmen { overflow-x: visible; }
}

/* --- Dateien, Fotos, Anfragen (ab 0.5.0) --- */
.datei-zeile { display: flex; justify-content: space-between; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.datei-zeile .eintrag-link { display: grid; grid-template-columns: 3rem 1fr; gap: 0.7rem; align-items: center; flex: 1; min-width: 12rem; }
.datei-zeile .eintrag-info { display: block; }
.datei-typ { font-size: 0.72rem; font-weight: 800; background: #eceef2; color: var(--text-leise); border-radius: 6px;
             padding: 0.45rem 0.2rem; text-align: center; overflow: hidden; }
.datei-aktionen { display: flex; gap: 0.9rem; align-items: center; }
.datei-aktionen form { margin: 0; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
.foto { position: relative; margin: 0; }
.foto img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; background: #eceef2; }
.foto form { position: absolute; top: 4px; right: 4px; margin: 0; }
.foto-loeschen { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.6); color: #fff; cursor: pointer; }
.galerie.uebersicht { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.galerie-karte { display: block; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
                 overflow: hidden; color: var(--text); text-decoration: none; }
.galerie-karte img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.galerie-karte > span { display: block; padding: 0.6rem 0.8rem; }
.galerie-karte .eintrag-info { display: block; }
.datei-aktionen button.link { font-size: 0.82rem; color: var(--text-leise); }
.karte > .dateiliste .eintrag { border: 0; border-bottom: 1px solid var(--linie); border-radius: 0; padding: 0.7rem 0; }
.karte > .dateiliste .eintrag:last-child { border-bottom: 0; }

/* --- 1.0: Aufgaben, Kommentare, Ankündigungen, Team --- */
.meldung-warn { background: #fff4e6; border-color: #ffd8a8; color: #8a3b00; }
.aufgaben { list-style: none; padding: 0; margin: 0 0 0.6rem; }
.aufgabe { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: center; padding: 0.55rem 0; border-bottom: 1px solid var(--linie); }
.aufgabe:last-child { border-bottom: 0; }
.haken-rund { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #adb5bd; background: #fff; font: inherit; font-weight: 800; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.aufgabe.erledigt .haken-rund { background: var(--ok); border-color: var(--ok); }
.aufgabe.erledigt .aufgabe-titel { text-decoration: line-through; color: var(--text-leise); }
.aufgabe.ueberfaellig .eintrag-info { color: var(--fehler); }
.aufgabe-text { display: flex; flex-direction: column; color: inherit; text-decoration: none; min-width: 0; }
.aufgabe-titel { font-weight: 600; overflow-wrap: anywhere; }
.neu-auf > summary { list-style: none; display: inline-flex; }
.neu-auf > summary::-webkit-details-marker { display: none; }
.neu-auf[open] > summary { margin-bottom: 0.7rem; }
.kommentare { list-style: none; padding: 0; margin: 0 0 0.7rem; display: grid; gap: 0.6rem; }
.kommentar { background: #f6f7f9; border-radius: 10px; padding: 0.55rem 0.75rem; }
.kommentar p { margin: 0.2rem 0 0; }
.kommentar-kopf { display: flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; align-items: baseline; }
.kommentar-neu { display: grid; gap: 0.5rem; }
.kommentar-neu textarea { width: 100%; font: inherit; padding: 0.6rem; border: 1px solid var(--linie); border-radius: 10px; }
.kommentar-neu .knopf { justify-self: start; }
.ankuendigung { padding: 0.5rem 0; border-bottom: 1px solid var(--linie); }
.ankuendigung:last-child { border-bottom: 0; }
.ankuendigung p { margin: 0.3rem 0 0; }
.ankuendigung-neu { border-left: 5px solid var(--warn); }
.stufen { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.35rem 0 0.2rem; }
.stufe { font-size: 0.8rem; font-weight: 600; padding: 0.1rem 0.45rem; border-radius: 999px; background: #eceef2; color: #495057; }
.stufe-1 { background: #fff4e6; color: #8a3b00; }
.stufe-2 { background: #e7f5ff; color: #1864ab; }
.stufe-3 { background: var(--ok-hell); color: #1e5f2b; }
.quali-liste { list-style: none; padding: 0; margin: 0 0 0.5rem; }
.quali-liste li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.6rem 0; border-bottom: 1px solid var(--linie); }
.quali-form { display: flex; gap: 0.4rem; align-items: center; }
.quali-form select, .quali-form input { font: inherit; padding: 0.45rem; border: 1px solid var(--linie); border-radius: 8px; min-height: 44px; }
.vorlagen-wahl { margin-bottom: 0.6rem; }
h3 { font-size: 1rem; margin: 0.8rem 0 0.3rem; }
.punkte { letter-spacing: -0.05em; font-size: 0.75rem; }
.titelzeile .knopf { white-space: nowrap; }
.kommentar-kopf button.link { font-size: 0.82rem; color: var(--text-leise); }
.ablauf-liste { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.5rem; }
.ablauf-punkt { margin: 0; padding: 0.7rem 0.9rem; }
.ablauf-kopf { display: grid; grid-template-columns: auto 1fr auto; gap: 0.7rem; align-items: center; }
.ablauf-nr { width: 30px; height: 30px; border-radius: 50%; background: #eceef2; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; }
.ablauf-titel { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.pfeile { display: flex; gap: 0.3rem; }
.pfeil { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--linie); background: #fff; font-size: 0.9rem; cursor: pointer; }
.pfeil:disabled { opacity: 0.3; }
.ablauf-punkt details { margin-top: 0.4rem; }
.zeit.geschaetzt { color: var(--text-leise); font-weight: 600; }

/* --- Patchplan als Tabelle --- */
.patch-rahmen { margin-bottom: 0.6rem; }
.patch { border-collapse: separate; border-spacing: 0; min-width: 1060px; width: 100%; font-size: 0.9rem; }
.patch th { position: sticky; top: 0; background: #f1f3f5; text-align: left; font-size: 0.78rem; line-height: 1.2; padding: 0.5rem 0.4rem; border-bottom: 1px solid var(--linie); }
.patch td { padding: 0.25rem; border-bottom: 1px solid var(--linie); vertical-align: middle; background: #fff; }
.patch.nur-lesen td { padding: 0.55rem 0.5rem; }
.patch th.pult, .patch td.pult { position: sticky; left: 0; z-index: 1; width: 64px; background: #f8f9fa; font-weight: 700; }
.patch input, .patch select { width: 100%; min-width: 64px; font: inherit; padding: 0.45rem 0.4rem; min-height: 40px; border: 1px solid transparent; border-radius: 6px; background: transparent; }
.patch input:hover, .patch select:hover { border-color: var(--linie); }
.patch input:focus, .patch select:focus { border-color: var(--akzent, #d9480f); background: #fff; outline: none; }
.patch td.breit { min-width: 150px; }
.patch td.mic { min-width: 210px; position: relative; padding-left: 18px; }
.patch .frei-feld { margin-top: 0.2rem; border-color: var(--linie); }
.ampel-punkt { position: absolute; left: 5px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: transparent; }
.ampel-text { display: block; padding: 0 0.4rem; }
.ampel-gruen .ampel-punkt, .ampel-legende.gruen { background: #2b8a3e; }
.ampel-gelb .ampel-punkt, .ampel-legende.gelb { background: #f59f00; }
.ampel-rot .ampel-punkt, .ampel-legende.rot { background: #e03131; }
.ampel-frei .ampel-punkt, .ampel-legende.frei { background: #adb5bd; }
.ampel-gruen td.mic { background: #ebfbee; }
.ampel-gelb td.mic { background: #fff9db; }
.ampel-rot td.mic { background: #fff5f5; }
.ampel-rot .ampel-text { color: #c92a2a; font-weight: 600; }
.ampel-legende { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.patch tr.doppelt td.pult, .patch tr.doppelt td.pult input { color: #c92a2a; background: #fff5f5; }
.patch td.aktion { width: 44px; text-align: center; }
.patch .loeschen { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--text-leise); font-size: 1rem; cursor: pointer; }
.patch .loeschen:hover { background: #fff5f5; color: #c92a2a; }
.mit-js .ohne-js { display: none; }
.zeilen-form { display: none; }
.wichtig-banner { background: #c92a2a; color: #fff; border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; box-shadow: 0 2px 8px rgba(201,42,42,0.25); }
.wichtig-banner h2 { margin: 0.1rem 0 0.4rem; }
.wichtig-banner a { color: #fff; }
.wichtig-banner .vorzeile, .wichtig-banner .klein { color: #ffe3e3; }
.wichtig-banner p { margin: 0.3rem 0; }
.wichtig-banner .knopf.ok-knopf { background: #fff; color: #c92a2a; border-color: #fff; }
.abzeichen.rot { background: #c92a2a; color: #fff; }
.ankuendigung.wichtig { border-left: 4px solid #c92a2a; padding-left: 0.7rem; }
.ankuendigung.wichtig strong { color: #c92a2a; }
.wichtig-option { align-items: flex-start; }
.menue a.menue-dashboard { border: 2px solid var(--akzent, #d9480f); border-radius: 999px; padding-left: 0.8rem; padding-right: 0.8rem; }
.dash-nachricht-vorschau { background: #fff5f5; border-left: 5px solid #c92a2a; padding: 0.6rem 0.8rem; border-radius: 8px; margin-bottom: 0.6rem; }
.dash-nachricht-vorschau p { margin: 0.2rem 0; }
.ordner-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.ordner { display: flex; gap: 0.7rem; align-items: center; padding: 0.6rem 0.4rem; border-radius: 10px; color: inherit; text-decoration: none; }
.ordner:hover { background: #f6f7f9; }
.ordner > span:last-child { display: flex; flex-direction: column; }
.ordner-symbol { font-size: 1.6rem; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: #dee2e6; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #495057; vertical-align: middle; }
.avatar.klein { width: 26px; height: 26px; font-size: 0.65rem; margin-right: 0.4rem; }
.avatar.gross { width: 88px; height: 88px; font-size: 2rem; }
.team-zeile { display: flex; gap: 0.8rem; align-items: flex-start; }
.team-zeile > span { min-width: 0; flex: 1; }
.profilfoto-zeile { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.profilfoto-zeile form { flex: 1; min-width: 220px; margin: 0; }
.profil-kopf { display: flex; gap: 0.9rem; align-items: center; margin-bottom: 0.5rem; }
.profil-kopf h1 { margin: 0; }
.tabelle-rahmen.patch-rahmen { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.patch td.pos { min-width: 120px; }
.pfeil { color: var(--text); font-weight: 700; }
/* Patchplan auf Tablet und Computer breiter */
.inhalt:has(.patch-rahmen) { max-width: 1400px; }
fieldset.block { border: 1px solid var(--linie); border-radius: var(--radius); padding: 0.8rem 0.9rem; margin: 0; display: grid; gap: 0.7rem; }
fieldset.block legend { font-weight: 700; padding: 0 0.3rem; }
.termine-liste { display: grid; gap: 0.6rem; }
.termin-zeile { display: grid; grid-template-columns: 1fr 1.3fr; gap: 0.4rem 0.6rem; align-items: end; padding-bottom: 0.6rem; border-bottom: 1px dashed var(--linie); }
.termin-zeile label { font-size: 0.85rem; }
.termin-weg { grid-column: 2; justify-self: end; width: 44px; height: 40px; border: 1px solid var(--linie); border-radius: 8px; background: #fff; cursor: pointer; }
@media (min-width: 640px) { .termin-zeile { grid-template-columns: 1fr 1.3fr 1fr 1fr auto; } .termin-weg { grid-column: auto; } }
.rollen-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem; }
.rolle-anzahl { display: grid; grid-template-columns: 1fr 64px; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 0.92rem; background: #f8f9fa; border-radius: 10px; padding: 0.35rem 0.5rem; }
.rolle-anzahl input { text-align: center; }
.termine { list-style: none; padding: 0; margin: 0.4rem 0; display: grid; gap: 0.25rem; }
.pack-gruppe { font-size: 1.05rem; margin: 1.2rem 0 0.5rem; }
.dauer-wahl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
.dauer-wahl legend { grid-column: 1 / -1; }
/* Startseite Lehrkraft */
.besetzung-block { padding: 0.6rem 0 0.8rem; border-bottom: 1px solid var(--linie); }
.besetzung-block:last-child { border-bottom: 0; }
.besetzung-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; color: inherit; text-decoration: none; margin-bottom: 0.4rem; }
.besetzung-kopf .eintrag-info { flex: 1 1 auto; }
.besetzung-zeilen { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.besetzung-zeilen li { display: grid; grid-template-columns: minmax(8rem, 42%) 1fr; gap: 0.6rem; padding: 0.3rem 0.55rem; border-radius: 6px; background: #f8f9fa; font-size: 0.93rem; }
.besetzung-zeilen .b-rolle { color: var(--text-leise); font-weight: 600; }
.besetzung-zeilen li.offen { background: #fff5f5; box-shadow: inset 3px 0 0 #e03131; }
.besetzung-zeilen li.offen .b-person { color: #c92a2a; font-weight: 700; }
.ank-optionen { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.anfrage-vorschau { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.anfrage-vorschau a { display: grid; grid-template-columns: auto 1fr; gap: 0 0.8rem; padding: 0.5rem 0.6rem; border-radius: 8px; background: #f8f9fa; color: inherit; text-decoration: none; }
.anfrage-vorschau .a-datum { grid-row: span 2; font-weight: 700; color: var(--akzent-dunkel); font-size: 0.9rem; }
.zahlen.verlinkt a { color: inherit; text-decoration: none; }
.besetzung-zeilen li { grid-template-columns: 11.5rem 1fr; }
.besetzung-zeilen .b-rolle { overflow-wrap: anywhere; }
@media (max-width: 380px) { .besetzung-zeilen li { grid-template-columns: 9.5rem 1fr; } }
.anfrage-vorschau a { grid-template-columns: 8.2rem 1fr; }
/* Patchplan: Zurücksetzen und Vorlagen */
.patch-werkzeuge { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-start; margin: 0 0 1rem; }
.werkzeug > summary { list-style: none; }
.werkzeug > summary::-webkit-details-marker { display: none; }
.werkzeug[open] { flex-basis: 100%; }
.werkzeug-inhalt { margin-top: 0.5rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 0.8rem 0.9rem; max-width: 560px; }
.vorlagen-liste { list-style: none; padding: 0; margin: 0.8rem 0 0; display: grid; gap: 0.3rem; }
.vorlagen-liste li { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.3rem 0; border-top: 1px solid var(--linie); }
.loeschen-klein { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.loeschen-klein:hover { background: #fff5f5; }
.patch-werkzeuge .knopf { padding: 0.5rem 0.85rem; font-size: 0.92rem; min-height: 40px; }
/* Team-Liste aufgeräumt */
.team-zeile > .avatar { flex: none; }
.team-text { min-width: 0; flex: 1; display: grid; gap: 0.35rem; }
.stufen-raster { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.stufe-zelle { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 0.25rem 0.1rem; border-radius: 8px;
               background: #f1f3f5; color: #868e96; font-size: 0.74rem; font-weight: 600; line-height: 1.2; }
.stufe-zelle .punkte { font-size: 0.7rem; letter-spacing: 0.02em; }
.stufe-zelle.stufe-1 { background: #fff4e6; color: #8a3b00; }
.stufe-zelle.stufe-2 { background: #e7f5ff; color: #1864ab; }
.stufe-zelle.stufe-3 { background: var(--ok-hell); color: #1e5f2b; }
.team-warnung { font-size: 0.82rem; color: var(--warn); }
/* Mitgliederseite: Name links, Auswahl rechts */
.quali-liste.fertigkeiten li { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.quali-liste .q-name, .quali-liste li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.quali-form select { width: 11.5rem; }
.quali-form input[type=date] { width: 9.5rem; }
@media (max-width: 380px) { .quali-form select { width: 9.5rem; } }
.quali-liste.unterweisungen li > span:first-child { flex: 1 1 12rem; }
.quali-liste.fertigkeiten .q-name { overflow-wrap: normal; hyphens: auto; -webkit-hyphens: auto; }
/* Einstellungen */
.segmente { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.segmente legend { font-weight: 600; margin-bottom: 0.35rem; padding: 0; width: 100%; }
.segmente label { position: relative; }
.segmente input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmente span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border: 1px solid var(--linie);
                 border-radius: 999px; background: #fff; font-weight: 600; }
.segmente input:checked + span { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.segmente input:focus-visible + span { outline: 3px solid #ffd8a8; }
.schalter-zeile { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 400; }
.schalter-zeile input { width: 22px; height: 22px; margin-top: 0.15rem; flex: none; accent-color: var(--akzent); }
details.hilfe { margin-top: 0.8rem; }
details.hilfe summary { cursor: pointer; color: var(--akzent-dunkel); font-weight: 600; }
details.hilfe ol { margin: 0.5rem 0 0; padding-left: 1.2rem; display: grid; gap: 0.25rem; font-size: 0.93rem; }
.formular label.schalter-zeile { display: flex; flex-direction: row; }
/* Neue Anfragen: Zahl im Menü und Hinweis oben auf der Startseite */
.menue-zahl { display: inline-flex; align-items: center; justify-content: center; min-width: 1.35rem; height: 1.35rem; padding: 0 0.35rem;
              margin-left: 0.3rem; border-radius: 999px; background: var(--akzent); color: #fff; font-size: 0.78rem; font-weight: 800; }
.anfrage-banner { display: flex; align-items: center; gap: 0.8rem; background: #e7f5ff; border: 1px solid #a5d8ff; border-left: 5px solid #1c7ed6;
                  border-radius: var(--radius); padding: 0.8rem 1rem; margin-bottom: 1rem; color: #0b4f8a; text-decoration: none; }
.anfrage-banner > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.anfrage-banner .klein { color: #1864ab; }
.anfrage-symbol { font-size: 1.5rem; }
.anfrage-pfeil { font-size: 1.6rem; font-weight: 700; }
.bereich-karte { padding-top: 0.7rem; padding-bottom: 0.7rem; }
.bereich-karte h2 { font-size: 1.05rem; margin: 0; }
.bereich-karte details { margin-top: 0.3rem; }
.bereich-karte summary { cursor: pointer; color: var(--akzent-dunkel); }
.loeschen-bereich { margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px dashed var(--linie); }
.inhalt:has(.import-rahmen) { max-width: 1200px; }
.import-tabelle tr.import-fehler td { background: #fff5f5; }
.import-tabelle tr.import-hinweis td { background: #fff9db; }

/* Rechte-Tabelle (Einstellungen → Rechte) */
.tabelle-rahmen.rechte-rahmen { overflow-x: auto; }
.rechte-tabelle { width: 100%; border-collapse: collapse; font-size: .95rem; }
.rechte-tabelle th, .rechte-tabelle td { padding: .45rem .5rem; border-bottom: 1px solid var(--linie); text-align: center; vertical-align: middle; }
.rechte-tabelle th[scope="row"], .rechte-tabelle thead th:first-child { text-align: left; font-weight: normal; min-width: 14rem; }
.rechte-tabelle thead th { position: sticky; top: 0; background: var(--flaeche); font-weight: 600; }
.rechte-tabelle .rechte-gruppe th { text-align: left; font-weight: 700; background: var(--hintergrund); padding-top: .7rem; }
.rechte-tabelle td.geaendert, .geaendert-muster { background: #fff4d6; }
.geaendert-muster { padding: 0 .3rem; border-radius: 3px; }
.rechte-tabelle .haken-zelle { display: inline-flex; padding: .3rem; cursor: pointer; }
.rechte-tabelle input[type="checkbox"] { width: 1.3rem; height: 1.3rem; }
.rechte-tabelle select { max-width: 12rem; }
.rechte-tabelle.person td:nth-child(2) { color: var(--text-leise); }
.leer-zelle { color: #bbb; }
.rechte-form + form { margin-top: .5rem; }
.rechte-tabelle input[type="checkbox"] { width: 1.4rem; height: 1.4rem; min-height: 0; margin: 0; }
.rechte-tabelle select { min-height: 2.4rem; padding: 0 .4rem; font-size: .9rem; }
.rechte-tabelle .kurz { display: none; }
@media (max-width: 699px) {
  .rechte-tabelle { font-size: .88rem; }
  .rechte-tabelle th[scope="row"], .rechte-tabelle thead th:first-child { min-width: 9rem; }
  .rechte-tabelle th, .rechte-tabelle td { padding: .35rem .3rem; }
  .rechte-tabelle .lang { display: none; }
  .rechte-tabelle .kurz { display: inline; }
  .rechte-tabelle select { width: 3.6rem; min-width: 0; font-size: .78rem; padding: 0 .8rem 0 .2rem; background-position: right .1rem center; }
  .rechte-tabelle th[scope="row"], .rechte-tabelle thead th:first-child { min-width: 6.5rem; hyphens: auto; }
  .rechte-tabelle th, .rechte-tabelle td { padding: .35rem .15rem; }
}
.rechte-tabelle.person select { width: 7rem; max-width: 7rem; font-size: .9rem; }

/* Vorname / Nachname nebeneinander */
.zwei-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
@media (max-width: 380px) { .zwei-spalten { grid-template-columns: 1fr; } }

/* Konto-Menü oben rechts (Kreis mit Initialen) */
.kopf { position: relative; }
.konto-menue { position: relative; order: 3; flex: none; }
.konto-menue > summary { list-style: none; }
.konto-menue > summary::-webkit-details-marker { display: none; }
.konto-kreis { width: 40px; height: 40px; border-radius: 50%; background: var(--akzent); color: #fff; font-weight: 700;
          font-size: 0.95rem; letter-spacing: 0.03em; display: flex; align-items: center; justify-content: center;
          cursor: pointer; user-select: none; border: 2px solid rgba(255, 255, 255, 0.85); }
.konto-kreis:hover, .konto-kreis:focus-visible, .konto-menue[open] .konto-kreis { outline: 3px solid rgba(255, 255, 255, 0.35); }
.konto-liste { position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 50; min-width: 12rem;
               background: var(--flaeche); color: var(--text); border: 1px solid var(--linie); border-radius: var(--radius);
               box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); padding: 0.4rem; }
.konto-name { margin: 0; padding: 0.5rem 0.7rem 0.4rem; font-size: 0.85rem; color: var(--text-leise);
              border-bottom: 1px solid var(--linie); margin-bottom: 0.3rem; }
.konto-liste a, .konto-liste button { display: flex; align-items: center; width: 100%; min-height: var(--tipp);
               padding: 0 0.7rem; border-radius: 8px; color: var(--text); text-decoration: none; font: inherit;
               background: none; border: 0; cursor: pointer; text-align: left; }
.konto-liste a:hover, .konto-liste button:hover, .konto-liste a:focus-visible, .konto-liste button:focus-visible { background: var(--hintergrund); }
.konto-liste form { margin: 0; }
@media (max-width: 699px) {
  .konto-menue { position: absolute; right: 1rem; top: calc(0.35rem + env(safe-area-inset-top)); }
  .konto-kreis { width: 36px; height: 36px; font-size: 0.85rem; }
}
@media (min-width: 700px) {
  .kopf { flex-wrap: nowrap; align-items: flex-start; }
  .kopf .marke { padding-top: 0.55rem; white-space: nowrap; }
  .kopf .menue { flex: 1; justify-content: flex-end; }
  .konto-menue { margin-top: 0.1rem; }
}
.marke-trenner { opacity: 0.55; font-weight: 400; margin: 0 0.15em; }
@media (max-width: 699px) { .marke { padding-right: 3rem; white-space: nowrap; font-size: 1rem; } }
@media (max-width: 360px) { .marke { font-size: 0.9rem; } }
