/* ansichten.css — seitenspezifische Regeln: Start, Dashboard, Bestellungen, Anfragen,
   Lieferscheine, Liefertermine, Wareneingang, Stammdaten-Ansichten, Admin, /spec.
   Dritte von drei Dateien (SPEC 14.5). */
/* Dashboard */
section.dashboard { margin: 1rem 0 1.5rem 0; }
h2.dashboard-titel { font-size: 1em; color: var(--muted); font-weight: 600; margin: 0 0 0.5rem 0; text-transform: uppercase; letter-spacing: 0.5pt; }
/* Schalter im Titel: Pfeil zeigt nach unten (offen) oder rechts (zu); zu = Kacheln ausgeblendet, je Benutzer gemerkt */
.dashboard-schalter { display: inline-flex; align-items: center; gap: 0.4rem; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.dashboard-schalter svg { transition: transform 0.15s; }
.dashboard.zu .dashboard-schalter svg { transform: rotate(-90deg); }
.dashboard.zu .dashboard-grid { display: none; }
.dashboard.zu { margin-bottom: 0.75rem; }
.dashboard-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem;
}
@media (min-width: 1100px) { .dashboard-grid { grid-template-columns: repeat(4, 1fr); } }
/* Anfrage-Dashboard hat drei Kacheln — ohne Modifier bliebe die vierte Spalte leer */
@media (min-width: 1100px) { .dashboard-grid.drei { grid-template-columns: repeat(3, 1fr); } }
.dashboard-kachel {
  background: var(--karte); border: 1px solid var(--rand);
  padding: 0.75rem; min-height: 160px;
}
.dashboard-kachel h3 {
  margin: 0 0 0.5rem 0; font-size: 0.85em; color: var(--muted);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.5pt;
}

/* Torte */
.torte { display: flex; gap: 0.75rem; align-items: center; }
.torte svg { flex-shrink: 0; }
.torte-legende { list-style: none; padding: 0; margin: 0; font-size: 0.85em; flex: 1; }
.torte-legende li { display: flex; align-items: center; gap: 0.4rem; padding: 0.1rem 0; }
.farbmarker { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.torte-legende .name { flex: 1; }
.torte-legende .wert { color: var(--muted); }

/* Horizontale Balken (Top-Lieferanten) */
.balken-liste { display: flex; flex-direction: column; gap: 0.4rem; }
.balken-zeile { display: grid; grid-template-columns: 1fr 3fr auto; gap: 0.4rem; align-items: center; font-size: 0.85em; }
.balken-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.balken-bar-hg { background: #f0f0f0; height: 12px; border-radius: 2px; overflow: hidden; }
.balken-bar { height: 100%; }
.balken-wert { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Vertikale Monatsbalken */
.monatsbalken {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px;
  height: 130px; align-items: end;
}
.monat { display: flex; flex-direction: column; align-items: center; height: 100%; font-size: 0.7em; }
.monat-bar-hg { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.monat-bar { width: 100%; background: #1f4a8a; min-height: 1px; }
.monat-name { color: var(--muted); padding-top: 2px; }
.monat-wert { color: var(--muted); font-size: 0.85em; }

/* Statusbalken am Zeilenanfang der Bestellübersicht. 13px statt 3px — der
   schmale Streifen war kaum zu erkennen. Die transparente Grundregel sorgt
   dafür, dass „offen"-Zeilen dieselbe Einrückung haben und die erste Spalte
   nicht je nach Status springt. Nur Zeilen mit Status-Klasse, damit andere
   .uebersicht-Tabellen (Lieferanten, Benutzer) unverändert bleiben. */
.uebersicht tr[class*="status-"] td:first-child { border-left: 13px solid transparent; }
.uebersicht tr.status-ueberfaellig td:first-child { border-left-color: var(--ueberfaellig-fg); }
.uebersicht tr.status-teilgeliefert td:first-child { border-left-color: #1f4a8a; }
.uebersicht tr.status-erledigt td:first-child { border-left-color: var(--erledigt-fg); }

/* Anfrageübersicht: Kopfzeile je Anfrage, darunter je Unternehmen eine
   Unterzeile. Unterzeilen ohne obere Trennlinie, damit der Block zusammenhält;
   die Kopfzeile bekommt eine kräftigere Linie als Blockgrenze. */
.uebersicht tr.anfrage-kopf td { border-top: 2px solid var(--rand); vertical-align: top; }
.uebersicht tr.anfrage-unterzeile td { border-top: 1px dotted var(--rand); }
.uebersicht td.notiz { max-width: 18rem; color: var(--muted); font-size: 0.9em; }

.badge {
  display: inline-block; padding: 0.1rem 0.5rem; border-radius: 3px;
  font-size: 0.85em; font-weight: 500;
}
.badge.status-entwurf { background: #fff; color: var(--muted); border: 1px dashed var(--muted); }
.badge.status-offen { background: var(--offen); color: var(--fg); }
.badge.status-ueberfaellig { background: var(--ueberfaellig-bg); color: var(--ueberfaellig-fg); }
.badge.status-teilgeliefert { background: #e0eaf5; color: #1f4a8a; }
.badge.status-erledigt { background: var(--erledigt-bg); color: var(--erledigt-fg); }
.badge.versand-fehlgeschlagen { background: var(--fehler-bg); color: var(--fehler-fg); }

section.kopf dl {
  display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem;
  background: var(--karte); border: 1px solid var(--rand); padding: 1rem;
}
section.kopf dt { font-weight: 600; color: var(--muted); }
section.kopf dd { margin: 0; }

/* Reiter für Termin-Ansichten */
.reiter { display: flex; gap: 0.25rem; margin: 1rem 0 0.5rem; border-bottom: 1px solid var(--rand); }
.reiter a {
  padding: 0.4rem 1rem; text-decoration: none;
  color: var(--muted); border: 1px solid transparent; border-bottom: none;
  border-radius: 4px 4px 0 0; background: transparent;
}
.reiter a:hover { color: var(--fg); background: #f0f0f0; }
.reiter a.aktiv {
  color: var(--fg); background: var(--karte);
  border-color: var(--rand); border-bottom: 1px solid var(--karte);
  margin-bottom: -1px; font-weight: 600;
}

form.filter label.checkbox { flex-direction: row; align-items: center; gap: 0.4rem; color: var(--fg); }

/* Termin-Liste */
.termine-block { margin-top: 1rem; }
.termine-block h2 { margin: 0.5rem 0; font-size: 1em; color: var(--muted); font-weight: 600; }
.termine-block.ueberfaellig h2 { color: var(--ueberfaellig-fg); }
.termine-block.ueberfaellig table.termine tr { background: var(--ueberfaellig-bg); }
table.termine small { color: var(--muted); }
table.termine tr.prio-terminkritisch td { border-left-color: #b06000; }

/* Feste Spaltenbreiten, damit alle KW-Blöcke bündig zueinander stehen */
table.termine { table-layout: fixed; }
table.termine th:nth-child(1), table.termine td:nth-child(1) { width: 10.5rem; } /* Termin + Pill */
table.termine th:nth-child(2), table.termine td:nth-child(2) { width: 18%; }     /* Lieferant */
table.termine th:nth-child(3), table.termine td:nth-child(3) { width: auto; }    /* Material (+ terminkritisch) */
table.termine th:nth-child(4), table.termine td:nth-child(4) { width: 6.5rem; }  /* Menge */
table.termine th:nth-child(5), table.termine td:nth-child(5) { width: 9rem; }    /* Bestellung */
table.termine th:nth-child(6), table.termine td:nth-child(6) { width: 7rem; }    /* Status */
table.termine th:nth-child(7), table.termine td:nth-child(7) { width: 9.5rem; }  /* Aktion */
table.termine td { overflow-wrap: anywhere; }
/* Lieferantenname einzeilig mit Ellipsis; voller Name via title-Tooltip
   und dem existierenden lieferant-hover-Popover erreichbar. */
table.termine td.lieferant-zelle,
table.termine td.material-zelle { overflow-wrap: normal; }
table.termine td.lieferant-zelle span.lieferant-hover,
table.termine td.material-zelle span {
  display: block; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

.pill {
  display: inline-block; padding: 0.05rem 0.4rem; border-radius: 8px;
  font-size: 0.75em; margin-left: 0.25rem;
}
.pill.gefordert { background: #fbf1cc; color: #7a5a00; }
.pill.bestaetigt { background: #d8f0d8; color: var(--erledigt-fg); }
.pill.prio-terminkritisch { background: #ffe0b3; color: #7a3800; }

/* Zeitstrahl */
.zeitstrahl-scroll {
  overflow-x: scroll;
  background: var(--karte);
  border: 1px solid var(--rand);
  padding: 0.5rem;
  /* Explizite Scrollbar-Breite, damit sie unter macOS auch mit
     „Auto-hide" sichtbar bleibt. */
  scrollbar-width: auto;
}
.zeitstrahl { display: grid; column-gap: 0; row-gap: 2px; position: relative; min-width: max-content; }
.zs-ecke { background: #f0f0f0; padding: 0.3rem 0.5rem; font-weight: 600; border-bottom: 1px solid var(--rand); position: sticky; left: 0; z-index: 2; }
.zs-header {
  background: #f0f0f0; padding: 0.3rem 0.1rem; font-size: 0.75em; text-align: center;
  border-left: 1px solid var(--rand); border-bottom: 1px solid var(--rand);
  color: var(--muted);
}
.zs-header.zs-heute { background: #cfe0f5; color: var(--akzent); font-weight: 600; }
.zs-label {
  background: var(--karte); padding: 0.25rem 0.5rem; font-size: 0.85em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-bottom: 1px dotted #eee; position: sticky; left: 0; z-index: 1;
}
.zs-balken {
  background: var(--akzent); border-radius: 3px;
  align-self: center; height: 12px; margin: 0 2px;
}
.zs-balken.zs-ueberfaellig { background: var(--ueberfaellig-fg); }
.zs-marker {
  align-self: center; justify-self: center;
  color: #f5b800; font-size: 1.15em; font-weight: 700;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.35);
  z-index: 3; cursor: help;
}
.zs-balken { cursor: help; }
#zs-info {
  position: absolute; display: none; z-index: 300;
  background: #fffdf5; color: var(--fg);
  border: 1px solid var(--rand);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0.75rem; font-size: 0.85em;
  min-width: 14rem; max-width: 22rem; pointer-events: none;
}
#zs-info dt { color: var(--muted); font-weight: 500; margin-top: 0.25rem; }
#zs-info dt:first-child { margin-top: 0; }
#zs-info dd { margin: 0 0 0.15rem 0; font-weight: 500; }
.zs-heutebalken {
  background: rgba(31, 74, 138, 0.08); border-left: 2px solid var(--akzent);
  align-self: stretch;
}

.zeitstrahl-legende { display: flex; gap: 0.75rem; margin-top: 0.5rem; font-size: 0.85em; color: var(--muted); }
.pill.zs-balken-legende { background: var(--akzent); color: #fff; }
.pill.zs-ueberfaellig-legende { background: var(--ueberfaellig-fg); color: #fff; }
.pill.zs-marker-legende { background: #f5e0c3; color: #7a3800; }
.pill.zs-heute-legende { background: #cfe0f5; color: var(--akzent); }

/* Kalender */
#kalender { background: var(--karte); border: 1px solid var(--rand); padding: 0.5rem; margin-top: 0.5rem; }
.kalender-event.ueberfaellig { background: var(--ueberfaellig-fg) !important; border-color: var(--ueberfaellig-fg) !important; }
.kalender-event.prio-terminkritisch { border-left: 3px solid #b06000 !important; }

/* Versand-Aktionen */
.versand-fehler {
  background: var(--fehler-bg); color: var(--fehler-fg); padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--fehler-fg);
}
.versand-fehler pre { white-space: pre-wrap; font-size: 0.85em; margin: 0.4rem 0; }
tr.versand-fehlgeschlagen { background: var(--fehler-bg); }
tr.versand-fehlgeschlagen td form.inline { display: inline-block; margin-left: 0.4rem; }

/* Stammdaten */
.stammdaten-kacheln { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }
.stammdaten-kacheln .kachel { flex: 1 1 15rem; }
.stammdaten-zwischentitel { margin: 1.6rem 0 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--akzent); }   /* Zwischenüberschrift „Anlagen“ auf /stammdaten, wie eyebrow */
.kachel {
  display: block; flex: 1; padding: 1rem; background: var(--karte);
  border: 1px solid var(--rand); text-decoration: none; color: var(--fg);
}
.kachel:hover { background: #f0f0f0; }
.kachel h2 { color: var(--akzent); margin: 0 0 0.5rem 0; }
.kachel p { margin: 0; color: var(--muted); }
tr.inaktiv { opacity: 0.55; }
/* Kontaktperson anlegen: schmale Felder, die sich der Fensterbreite anpassen —
   so viele Spalten wie Platz ist (min. 11rem je Feld), Rest bricht um. */
form.kontakt-form {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.5rem;
  padding: 0.75rem; background: var(--karte); border: 1px solid var(--rand); margin-top: 0.5rem;
  max-width: 64rem;
}
form.kontakt-form input { padding: 0.3rem; width: 100%; min-width: 0; }
form.kontakt-form .inline-checkbox {
  display: flex; align-items: center; gap: 0.3rem; grid-column: 1 / -2; white-space: nowrap;
}
form.kontakt-form .inline-checkbox input { width: auto; }
form.kontakt-form button { grid-column: -2; justify-self: end; }
form.anmelden { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
form.anmelden label { display: flex; flex-direction: column; font-size: 0.9em; color: var(--muted); }
form.anmelden input { padding: 0.4rem; }
form.anmelden button { align-self: flex-start; margin-top: 0.5rem; }
/* Zwischenseite zweiter Faktor (SPEC 8.2): Code-Eingabe groß und breit gesperrt, Schalter „Gerät merken“ */
form.anmelden label.schalter { flex-direction: row; font-size: 0.9rem; color: var(--fg); }
form.anmelden input.pin-eingabe { font-size: 1.6rem; letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; }
.anmeldung-text { font-size: 0.9rem; color: var(--muted); margin: 0.8rem 0 0; }
.anmeldung-hinweis-box { background: var(--bg); border: 1px solid var(--rand); border-radius: 4px; padding: 0.5rem 0.7rem; font-size: 0.9rem; margin-top: 0.6rem; }
.anmelden-nebenform { display: flex; gap: 0.5rem; margin-top: 0.9rem; }

/* Wareneingang — breite Tabelle mit drei Aktionsknöpfen pro Zeile */
/* Wareneingangstabelle (26.08.2026 flexibel): Spalten nach Inhalt, Material
   nimmt den Rest; zwischen ~62rem und Kartenbreite scrollt der Wrapper
   horizontal statt Spalten übereinanderzuschieben; unter 900px Karten. */
.tabelle-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.we-liste { background: var(--karte); table-layout: auto; width: 100%; min-width: 56rem; }
table.we-liste th, table.we-liste td { padding: 0.55rem 0.45rem; vertical-align: middle; }
table.we-liste th { white-space: nowrap; }
table.we-liste td.lieferant-zelle strong, table.we-liste td.lieferant-zelle small { max-width: 11rem; }
table.we-liste th:nth-child(-n+4), table.we-liste td:nth-child(-n+4) { white-space: nowrap; width: 1%; }  /* Daten, Besteller: so schmal wie der Inhalt */
table.we-liste th:nth-child(5), table.we-liste td:nth-child(5) { min-width: 9rem; max-width: 14rem; }   /* Lieferant · Ref. */
table.we-liste th:nth-child(6), table.we-liste td:nth-child(6) { white-space: nowrap; width: 1%; }      /* Bestellpos. */
table.we-liste th:nth-child(7), table.we-liste td:nth-child(7) { min-width: 10rem; }                     /* Material: flexibel */
table.we-liste th:nth-child(8), table.we-liste td:nth-child(8) { white-space: nowrap; width: 1%; }      /* Menge */
table.we-liste th:nth-child(9), table.we-liste td:nth-child(9) { width: 1%; }                            /* Erfassen: Knöpfe bestimmen die Breite */
table.we-liste td.lieferant-zelle strong,
table.we-liste td.lieferant-zelle small {
  display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
table.we-liste td.bestellpos-zelle a { font-size: 0.85em; }
table.we-liste tr.prio-terminkritisch td:first-child { border-left: 3px solid #b06000; }
table.we-liste tr.we-ueberfaellig { background: var(--ueberfaellig-bg); }
table.we-liste small { color: var(--muted); }
.nicht-bestaetigt {
  display: inline-block; padding: 0.1rem 0.5rem; border-radius: 3px;
  background: var(--ueberfaellig-bg); color: var(--ueberfaellig-fg);
  font-size: 0.85em; font-weight: 500;
}

.we-aktionen-kopf { text-align: center; }
td.we-aktionen { text-align: right; white-space: nowrap; }
td.we-aktionen button.we-btn + button.we-btn { margin-left: 0.3rem; }
button.we-btn {
  border: none; color: #fff; cursor: pointer;
  padding: 0.4rem 0.7rem; font-size: 0.82em; font-weight: 500;
  border-radius: 4px; min-width: 0;
}
button.we-btn.we-io { background: #1a5a1a; }
button.we-btn.we-io:hover { background: #124712; }
button.we-btn.we-teil { background: #b06000; }
button.we-btn.we-teil:hover { background: #884800; }
button.we-btn.we-beanstandung { background: var(--ueberfaellig-fg); }
button.we-btn.we-beanstandung:hover { background: #750000; }

/* Wareneingang — Erfassungsdialog */
.we-modal-header.we-header-menge_abweichend { background: #b06000; }
.we-modal-header.we-header-beanstandung { background: var(--ueberfaellig-fg); }
.we-kontext {
  background: #f5f5f5; padding: 0.75rem 1rem; margin: 0.5rem 1rem;
  border-left: 3px solid var(--akzent);
}
form.we-form { padding: 0 1rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.we-feld { display: flex; flex-direction: column; font-size: 0.9em; color: var(--muted); }
.we-feld input, .we-feld textarea { padding: 0.5rem; font-size: 1em; }
.we-feld .hinweis { margin-top: 0.25rem; font-size: 0.85em; }

/* Event-Tooltip im Kalender */
#event-tooltip {
  display: none; position: absolute; z-index: 1000;
  background: var(--karte); color: var(--fg);
  border: 1px solid var(--rand); box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 0.6rem 0.75rem; min-width: 280px; max-width: 360px;
  font-size: 0.85em; pointer-events: none;
}
#event-tooltip header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0 0 0.3rem 0; padding-bottom: 0.3rem; border-bottom: 1px solid var(--rand);
}
#event-tooltip header strong { color: var(--akzent); }
#event-tooltip .tt-pos { color: var(--muted); font-size: 0.9em; }
#event-tooltip .tt-titel { font-weight: 500; margin: 0.25rem 0 0.4rem 0; }
#event-tooltip .tt-badges { margin-bottom: 0.4rem; }
#event-tooltip dl {
  display: grid; grid-template-columns: max-content 1fr; gap: 0.15rem 0.75rem;
  margin: 0;
}
#event-tooltip dt { color: var(--muted); }
#event-tooltip dd { margin: 0; }
#event-tooltip .tt-nummer { color: var(--muted); font-size: 0.9em; }
#event-tooltip footer {
  margin-top: 0.5rem; padding-top: 0.35rem; border-top: 1px solid var(--rand);
  color: var(--muted); font-size: 0.85em; font-style: italic;
}
.tt-badge {
  display: inline-block; padding: 0.05rem 0.4rem; border-radius: 8px;
  font-size: 0.8em; font-weight: 500;
}
.tt-badge.tt-wunsch { background: #eef; color: #446; }
.tt-badge.tt-bestaetigt { background: var(--erledigt-bg); color: var(--erledigt-fg); }
.tt-badge.tt-terminkritisch { background: #ffe0b3; color: #7a3800; }

/* Startseite (SPEC 2.1) — Nachfolger des Login-Overlays */
h1.start-gruss { color: var(--akzent); font-size: 1.7em; margin-bottom: 1rem; }
.start-grid {
  display: grid; grid-template-columns: 1fr; gap: 1rem; max-width: 64rem;
}
@media (min-width: 900px) {
  .start-grid { grid-template-columns: 3fr 2fr; }
  .start-spruch, .start-notizen, .start-diesel, .start-voll { grid-column: 1 / -1; }
}
.start-karte {
  background: var(--karte); border: 1px solid var(--rand); border-radius: 6px;
  padding: 1.1rem 1.5rem 1.25rem;
}
.start-karte h2 {
  margin: 0 0 0.75rem 0;
  font-size: 0.85em; font-weight: 600; letter-spacing: 0.03em;
  text-transform: uppercase; color: var(--muted);
}
.start-aufgaben { font-size: 1.1em; }
.start-aufgaben ul { list-style: none; margin: 0; padding: 0; }
.start-aufgaben li { margin: 0.25rem 0; }
.start-aufgaben li a {
  display: block; padding: 0.35rem 0.5rem; margin: 0 -0.5rem;
  color: var(--fg); text-decoration: none; border-radius: 4px;
}
.start-aufgaben li a:hover { background: var(--bg); }
.start-aufgaben li a b { font-variant-numeric: tabular-nums; }
.start-aufgaben li.ueberfaellig a { color: var(--ueberfaellig-fg); font-weight: 500; }
.start-aufgaben .ok-text { margin: 0; color: var(--muted); }
.start-schnell { display: flex; flex-direction: column; gap: 0.5rem; }
.start-schnell h2 { margin-bottom: 0.25rem; }
.start-aktion {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 0.9rem; border: 1px solid var(--rand); border-radius: 4px;
  color: var(--fg); text-decoration: none; font-weight: 500;
}
.start-aktion:hover { border-color: var(--akzent); color: var(--akzent); }
.start-aktion.gesperrt, .kachel.gesperrt { opacity: 0.35; pointer-events: none; }   /* Menüfreigaben (SPEC 2.3) */
.start-aktion svg {
  width: 18px; height: 18px; flex: none; color: var(--akzent);
  fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round;
}
body.nicht-produktiv .start-aktion svg { color: #a10000; }
.start-spruch blockquote { margin: 0; font-size: 1.15em; }
.start-spruch blockquote p { margin: 0 0 0.3rem 0; font-style: italic; }
.start-spruch blockquote footer {
  color: var(--muted); font-size: 0.85em;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.start-spruch .spruch-neu { font-style: normal; font-size: 0.95em; }

/* Willkommensvideo (04.10.2026, SPEC 2.1): Karte am PC zwischen Spruch und Aufgabenliste (fest, solange der Schalter an ist),
   Modal für beide Formate.
   Am Handy keine Karte; das Modal öffnet sich nach dem Login (am Handy vollflächig, Video quer). */
.start-teaser { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 1rem; }
.teaser-eintrag { display: flex; gap: 1.25rem; align-items: center; }
/* weitere Videos (17.10.2026): gleich groß unter dem Willkommensvideo (kleiner war die Vorschau unlesbar), Haarlinie dazwischen */
.teaser-weiteres { padding-top: 1rem; border-top: 1px solid var(--rand); }
.start-teaser .teaser-text p { margin: 0 0 0.6rem 0; }
.start-teaser .teaser-knoepfe { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin: 0; }
.teaser-vorschau { position: relative; flex: 0 0 auto; padding: 0; border: 0; border-radius: 6px; overflow: hidden;
                   cursor: pointer; background: #0b2346; line-height: 0; }
.teaser-vorschau img { width: 320px; height: 180px; object-fit: cover; display: block; }
.teaser-play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
               background: rgba(255, 255, 255, 0.92); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); transition: transform 0.15s; }
.teaser-play::after { content: ""; position: absolute; left: 25px; top: 20px; border-style: solid;
                      border-width: 12px 0 12px 20px; border-color: transparent transparent transparent var(--akzent); }
.teaser-vorschau:hover .teaser-play, .teaser-vorschau:focus-visible .teaser-play { transform: scale(1.08); }
@media (max-width: 700px), (hover: none) and (pointer: coarse) { .start-teaser { display: none; } }

.teaser-modal { padding: 0; border: 0; border-radius: 10px; background: #071a36; color: #fff;
                width: min(94vw, 1440px, calc((100dvh - 3rem) * 16 / 9)); max-width: none; max-height: none; overflow: hidden; }
.teaser-modal:focus, .teaser-modal video:focus { outline: none; }
.teaser-modal::backdrop { background: rgba(0, 0, 0, 0.8); }
.teaser-modal video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
/* Handy: Modal vollflächig, Video so groß wie möglich und mittig */
.teaser-modal.vollflaeche { position: fixed; inset: 0; width: 100vw; height: 100dvh; margin: 0; border-radius: 0; background: #000; }
.teaser-modal.vollflaeche video { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; border-radius: 0; }

/* Häkchen und ✕ liegen oben im Videobild (unten sitzt die Videosteuerung), über einem Verlauf für die Lesbarkeit */
.teaser-leiste { position: absolute; top: 0; left: 0; right: 0; z-index: 1; display: flex; align-items: center;
                 justify-content: space-between; gap: 1rem; padding: max(0.5rem, env(safe-area-inset-top)) 0.6rem 1.6rem 1rem;
                 background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0)); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }
.teaser-nicht-wieder { display: flex; align-items: center; gap: 0.55rem; min-height: 40px; cursor: pointer; }
.teaser-nicht-wieder input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: #3fa9ff; }
.teaser-zu { width: 2.75rem; height: 2.75rem; flex: 0 0 auto; border: 0; border-radius: 50%; background: #fff; color: #111;
             font-size: 1.25rem; line-height: 1; cursor: pointer; }
.teaser-zu:hover, .teaser-zu:focus-visible { background: #dbe8f8; }
/* Admin › Benutzer › Menüfreigaben: Abschnitt zum Wiedereinblenden des Handy-Modals */
.teaser-admin { margin-top: 2rem; max-width: 64rem; }
.teaser-admin-zeile { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* Release Notes „Neu im Portal" — HTML aus dem Trix-Editor im Admin-Panel */
.start-notizen h2 small { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 0.5rem; }
.start-notizen .inhalt { line-height: 1.5; }
.start-notizen .inhalt h1 { font-size: 1.05em; margin: 0.9rem 0 0.3rem; color: var(--akzent); }
.start-notizen .inhalt h1:first-child, .start-notizen .inhalt div:first-child { margin-top: 0; }
.start-notizen .inhalt ul, .start-notizen .inhalt ol { margin: 0.3rem 0 0.6rem; padding-left: 1.4rem; }
.start-notizen .inhalt li { margin: 0.15rem 0; }
.start-notizen .inhalt blockquote {
  margin: 0.5rem 0; padding: 0.2rem 0.9rem; border-left: 3px solid var(--rand); color: var(--muted);
}
.start-notizen .inhalt pre {
  background: var(--bg); padding: 0.5rem 0.75rem; border-radius: 4px; white-space: pre-wrap; font-size: 0.9em;
}
.start-notizen .inhalt a { color: var(--akzent); }

/* Trix-Editor im Admin-Panel */
.rn-feld { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 0.35rem; }
trix-toolbar .trix-button-group { margin-bottom: 0.4rem; }
/* Anhänge sind abgeschaltet; doppelte Klasse, weil trix.css nach style.css geladen wird */
trix-toolbar .trix-button-group.trix-button-group--file-tools { display: none; }
trix-editor.rn-editor {
  min-height: 22rem; padding: 0.75rem 1rem; background: #fff;
  border: 1px solid var(--rand); border-radius: 4px; line-height: 1.5;
}
trix-editor.rn-editor h1 { font-size: 1.15em; margin: 0.8rem 0 0.3rem; }

/* Link auf die Spezifikation unten rechts in „Neu im Portal“ */
.start-notizen .spec-link {
  display: block; text-align: right; margin-top: 0.75rem;
  font-size: 0.8em; color: var(--muted); text-decoration: none;
}
.start-notizen .spec-link:hover { color: var(--akzent); text-decoration: underline; }

/* Gerenderte SPEC.md (/spec) */
.markdown { max-width: 58rem; line-height: 1.55; }
.markdown h1 { font-size: 1.6em; }
.markdown h2 { font-size: 1.3em; margin-top: 2.2rem; padding-top: 0.6rem; border-top: 1px solid var(--rand); }
.markdown h3 { font-size: 1.08em; margin-top: 1.5rem; }
.markdown table { border-collapse: collapse; margin: 0.75rem 0; font-size: 0.92em; display: block; overflow-x: auto; }
.markdown th, .markdown td { border: 1px solid var(--rand); padding: 0.3rem 0.55rem; vertical-align: top; text-align: left; }
.markdown th { background: var(--bg); }
.markdown pre { background: var(--bg); padding: 0.6rem 0.8rem; border-radius: 4px; overflow-x: auto; font-size: 0.88em; }
.markdown code { font-size: 0.92em; }
.markdown blockquote { margin: 0.75rem 0; padding: 0.2rem 0.9rem; border-left: 3px solid var(--rand); color: var(--muted); }
.markdown hr { border: 0; border-top: 1px solid var(--rand); margin: 1.5rem 0; }
.markdown hr + h2 { border-top: 0; padding-top: 0; margin-top: 0; } /* SPEC trennt Abschnitte mit --- */
.markdown .toc { background: var(--karte); border: 1px solid var(--rand); border-radius: 6px; padding: 0.75rem 1.25rem; font-size: 0.9em; }
.markdown .toc ul { margin: 0.2rem 0; padding-left: 1.2rem; }
.markdown .toc > ul { padding-left: 0; list-style: none; columns: 2; column-gap: 2rem; }
.markdown .toc > ul > li { break-inside: avoid; }
.markdown .toc a { text-decoration: none; }
.spec-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.spec-kopf small { color: var(--muted); }
.gespeichert-ok {
  background: #e4f3e4; border: 1px solid #9ccc9c; color: #1a5a1a;
  padding: 0.5rem 0.75rem; border-radius: 4px; margin: 0.75rem 0;
}
#konfetti {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 1000;
  transition: opacity 0.6s ease;
}
#konfetti.aus { opacity: 0; }

/* Angebotsvergleich (SPEC 9.7): eine Spalte je Lieferant. Der Wrapper
   scrollt in beide Richtungen; Kopfzeile, Summenzeile und die ersten zwei
   Spalten bleiben stehen, damit man bei 8 Firmen × 20 Positionen nie den
   Bezug verliert. */
.vergleich-wrap { overflow: auto; max-height: 70vh; border: 1px solid var(--rand); }
.vergleich-wrap table.vergleich { margin: 0; border-collapse: separate; border-spacing: 0; }
.vergleich thead th { position: sticky; top: 0; z-index: 3; background: #f5f5f5; }
.vergleich tfoot th { position: sticky; bottom: 0; z-index: 3; background: #f5f5f5; border-top: 2px solid var(--rand); }
.vergleich .fix { position: sticky; background: var(--karte); z-index: 2; }
.vergleich thead .fix, .vergleich tfoot .fix { z-index: 4; background: #f5f5f5; }
.vergleich .fix-nr { left: 0; min-width: 3rem; }
.vergleich .fix-bez { left: 3rem; min-width: 14rem; max-width: 22rem; box-shadow: 2px 0 0 var(--rand); }
.vergleich th.abgelaufen { color: #8a4b00; }
/* Einfärbung relativ zum günstigsten Preis der Zeile: --h kommt aus dem
   Service (120 = grün, 0 = rot), hier nur noch in eine helle Fläche übersetzt. */
.vergleich td.preis { background: hsl(var(--h, 120), 55%, 91%); white-space: nowrap; }
.vergleich td.guenstigster { font-weight: 600; }
.vergleich td.guenstigster label { font-weight: 600; }
.vergleich td.preis label { display: flex; align-items: center; justify-content: flex-end; gap: 0.35rem; cursor: pointer; }
.vergleich td.preis .tage { color: var(--muted); font-weight: 400; margin-left: 0.25rem; }
.vergleich td.leer { background: var(--bg); }
.vergleich-leiste { display: flex; align-items: center; gap: 0.75rem; margin: 0.5rem 0 0.75rem; flex-wrap: wrap; }
.vergleich-summe { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.ok-text { color: #2f6a1f; }

/* Admin: ERP-Konfiguration als Schlüssel/Wert-Tabelle */
.erp-konfig { max-width: 40rem; }
.erp-konfig th { text-align: left; width: 9rem; color: var(--muted); font-weight: normal; }
.aktionen button[disabled] { opacity: 0.45; cursor: not-allowed; }

/* Admin: ERP-Lieferschein-Viewer */
.ls-kopf { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.75rem 2rem; max-width: 70rem; margin-bottom: 1.25rem; }
.ls-kopf dl { margin: 0; }
.ls-kopf dt { color: var(--muted); font-size: 0.85em; margin-top: 0.4rem; }
.ls-kopf dd { margin: 0; }
.ls-positionen tr.leer td { color: var(--muted); font-style: italic; }
.ls-positionen tfoot td { font-weight: 600; border-top: 2px solid var(--rand); }
.ls-hinweis { color: var(--muted); font-size: 0.85em; margin-top: 0.5rem; }
.uebersicht td code { white-space: nowrap; }

/* Admin-Benutzer: runder Avatar aus dem ERP-Ausweisbild (Hochformat 100×130) */
.uebersicht.benutzer td.avatar-zelle { width: 2.6rem; padding-right: 0; }
.avatar {
  display: inline-block;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;   /* Gesicht sitzt im oberen Drittel des Hochformats */
  vertical-align: middle;
  background: #dfe4ea;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px #c9d1da;
}
.avatar-leer {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 2.4rem;
  text-align: center;
  color: #4a5563;
  letter-spacing: 0.02em;
}

/* Spruch des Tages: Zusatz neben der Überschrift, Fußzeile eine Zeile tiefer */
.start-spruch h2 small { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 0.5rem; }
.start-spruch blockquote footer { margin-top: 1.5em; }

/* Avatar des Bestellers im Kalender (Eintrag und Tooltip) */
.fc-avatar, .tt-avatar {
  display: inline-block; vertical-align: middle; border-radius: 50%;
  object-fit: cover; object-position: 50% 18%;
  background: #dfe4ea; color: #4a5563; font-weight: 600; text-align: center; font-style: normal;
}
.fc-avatar { width: 1.75rem; height: 1.75rem; line-height: 1.75rem; font-size: 0.7rem; margin-right: 0.4rem; box-shadow: 0 0 0 1px rgba(255,255,255,0.7); flex: none; }
/* Balken wächst mit dem Avatar; etwas mehr Luft und Schrift */
.fc-daygrid-event { padding: 2px 5px; }
.fc-daygrid-block-event .fc-event-main { font-size: 0.8rem; }
.tt-avatar { width: 1.4rem; height: 1.4rem; line-height: 1.4rem; font-size: 0.55rem; margin-right: 0.35rem; }
.fc-event .fc-event-main { display: flex; align-items: center; overflow: hidden; white-space: nowrap; }
#event-tooltip dd.tt-person { display: flex; align-items: center; }

/* Erfasser des Wareneingangs neben dem Positionsstatus (Bestell-Detail) */
td.status-zelle { white-space: nowrap; }
.we-erfasser { display: inline-flex; margin-left: 0.4rem; vertical-align: middle; }
.we-erfasser .person { gap: 0.3rem; color: var(--muted); font-size: 0.85em; }
.we-erfasser .person-avatar { width: 1.4rem; height: 1.4rem; line-height: 1.4rem; font-size: 0.55rem; }

/* Stornieren/Ändern nach Versand (SPEC 6.4) */
.pos-aktionen { white-space: nowrap; }
button.mini.loeschen-rand { border-color: var(--ueberfaellig-fg); color: var(--ueberfaellig-fg); }
button.mini.loeschen-rand:hover { background: var(--ueberfaellig-fg); color: #fff; }
table.positionen tr.storniert td { color: var(--muted); text-decoration: line-through; }
table.positionen tr.storniert td.status-zelle, table.positionen tr.storniert td.pos-aktionen { text-decoration: none; }
.aenderungs-hinweis { margin-left: 0.8rem; }
.modal label select, .modal label textarea { padding: 0.4rem; font-size: 1em; font: inherit; }
.modal .anmeldung-fehler { margin: 0; }
.tt-badge.tt-geaendert { background: #fff3cd; color: #7a5a00; }
#event-tooltip .tt-geaendert-grund { font-size: 0.85em; color: #7a5a00; margin-bottom: 0.4rem; }

/* Notizen im Detail: Zeilenumbrüche erhalten */
.notiz-text { white-space: pre-line; }
/* Kontextmenü „…" (details/summary) — Wareneingang: seltene Positionsaktionen */
details.menue { position: relative; display: inline-block; }
details.menue > summary { list-style: none; cursor: pointer; }
details.menue > summary::-webkit-details-marker { display: none; }
summary.we-btn.we-mehr { background: #fff; border: 1px solid var(--rand); color: var(--fg); font-weight: 700; letter-spacing: 0.1em; padding-left: 0.55rem; padding-right: 0.55rem; }
summary.we-btn.we-mehr:hover, details.menue[open] > summary.we-btn.we-mehr { background: var(--bg); border-color: var(--akzent); color: var(--akzent); }
.menue-liste {
  position: absolute; right: 0; top: calc(100% + 0.2rem); z-index: 30; min-width: 12rem;
  background: var(--karte); border: 1px solid var(--rand); border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14); padding: 0.25rem 0; text-align: left;
}
.menue-liste button, .menue-liste a {
  display: block; width: 100%; box-sizing: border-box; text-align: left;
  background: none; border: none; border-radius: 0; margin: 0;
  padding: 0.45rem 0.9rem; font: inherit; font-size: 0.88rem; color: var(--fg); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.menue-liste button:hover, .menue-liste a:hover { background: var(--bg); color: var(--akzent); }
.menue-liste.menue-links { left: 0; right: auto; }
.menue-liste .menue-trenner { border: none; border-top: 1px solid var(--rand); margin: 0.25rem 0; }   /* trennt gefährliche Aktionen ab */
.menue-liste .menue-gefahr { color: var(--ueberfaellig-fg); }
.menue-liste .menue-gefahr:hover { background: var(--ueberfaellig-bg); color: var(--ueberfaellig-fg); }                     /* Menü unter einem linksstehenden Knopf */
.menue-liste form.inline { margin: 0; display: block; }
summary.menue-knopf { padding-left: 0.6rem; padding-right: 0.5rem; }   /* Symbolknopf „Bearbeiten / Hinzufügen“ in der Werkzeugzeile */
summary.menue-knopf .menue-pfeil { font-size: 0.7em; margin-left: 0.1rem; }
details.menue[open] > summary.menue-knopf { background: #163765; }
td.we-aktionen details.menue { margin-left: 0.3rem; vertical-align: middle; }

/* „…" kompakt und innerhalb der Zelle; Abstände der Erfassungsknöpfe etwas enger */
td.we-aktionen button.we-btn + button.we-btn { margin-left: 0.25rem; }
td.we-aktionen details.menue { margin-left: 0.25rem; }
summary.we-btn.we-mehr { padding: 0.4rem 0.45rem; letter-spacing: 0.05em; min-width: 0; }

/* Zwischen 1250 und 1500px: kompaktere Knöpfe, damit die Tabelle ohne Scrollen passt */
@media (max-width: 1500px) {
  table.we-liste button.we-btn, table.we-liste summary.we-btn { padding: 0.35rem 0.5rem; font-size: 0.78em; }
  table.we-liste td.we-aktionen button.we-btn + button.we-btn, table.we-liste td.we-aktionen details.menue { margin-left: 0.2rem; }
}
/* Wareneingang unter 1250px (Tablet, halbes Fenster): jede Zeile eine Karte, Spaltenkopf als Beschriftung je Feld */
@media (max-width: 1250px) {
  table.we-liste { min-width: 0; display: block; }
  table.we-liste thead { display: none; }
  table.we-liste tbody { display: block; }
  table.we-liste tr {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.2rem 0.8rem;
    padding: 0.6rem 0.8rem; margin-bottom: 0.6rem; border: 1px solid var(--rand); border-radius: 4px; background: var(--karte);
  }
  table.we-liste tr.we-ueberfaellig { background: var(--ueberfaellig-bg); }
  table.we-liste tr.prio-terminkritisch { border-left: 3px solid #b06000; }
  table.we-liste tr.prio-terminkritisch td:first-child { border-left: 0; }
  table.we-liste td { display: block; padding: 0.15rem 0; border: 0; width: auto !important; max-width: none; white-space: normal; }
  table.we-liste td::before { content: attr(data-label); display: block; font-size: 0.72em; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
  table.we-liste td.rechts { text-align: left; }
  table.we-liste td.we-aktionen { grid-column: 1 / -1; text-align: left; margin-top: 0.3rem; padding-top: 0.5rem; border-top: 1px solid var(--rand); }
  table.we-liste td.we-aktionen::before { content: none; }
  table.we-liste td.lieferant-zelle strong, table.we-liste td.lieferant-zelle small { white-space: normal; overflow: visible; }
}

/* „Neu im Portal" ausklappbar (details/summary) */
details.start-notizen > summary { list-style: none; cursor: pointer; }
details.start-notizen > summary::-webkit-details-marker { display: none; }
details.start-notizen > summary h2 { margin: 0; display: flex; align-items: center; gap: 0.5rem; }
details.start-notizen[open] > summary h2 { margin-bottom: 0.75rem; }
details.start-notizen .aufklappen { margin-left: auto; width: 0.6rem; height: 0.6rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.15s; }
details.start-notizen[open] .aufklappen { transform: rotate(-135deg); }
details.start-notizen > summary:hover h2 { color: var(--akzent); }
.start-notizen .neu-badge { font-size: 0.7rem; text-transform: none; letter-spacing: 0; }

/* Lieferscheine (SPEC 13) */
table.uebersicht td code { white-space: nowrap; }

/* ---------- Lieferscheine: Übersicht und Detail (27.08.2026) ---------- */
.stamm-ansicht dl.stamm.einspaltig { grid-template-columns: 1fr; gap: 0.55rem; }
.ls-tabelle td.primaer .text { font-weight: 500; }
.ls-tabelle tr.entwurf td.primaer > a { color: var(--muted); font-weight: 500; }
.ls-tabelle td.primaer .kennung { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.03em; }
h1 .kennung { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.02em; font-size: 0.9em; }
h1 .entwurf-hinweis { font-size: 0.55em; font-weight: 400; color: var(--muted); }

.ls-leiste {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem;
  padding: 0.7rem 0.9rem; border: 1px solid var(--rand); border-left: 4px solid var(--muted); border-radius: 4px; background: var(--karte);
}
.ls-leiste.ausgestellt { border-left-color: var(--erledigt-fg); }
.ls-leiste-status { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.ls-leiste-text { color: var(--muted); font-size: 0.9rem; }
.ls-leiste-aktionen { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-left: auto; }
.ls-leiste-aktionen form { margin: 0; }
.ls-leiste-aktionen small.hinweis { font-size: 0.8rem; color: var(--muted); }
.ls-leiste-hinweis { margin: 0.4rem 0 0 0.9rem; font-size: 0.8rem; }

.ls-kopfraster { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 0 2rem; margin-top: 1rem; }
.ls-kopfraster > .abschnitt { border-top: 1px solid var(--rand); }
.ls-kopfraster > .abschnitt:first-child { border-top: 1px solid var(--rand); padding-top: 0.9rem; }
@media (max-width: 900px) { .ls-kopfraster { grid-template-columns: 1fr; gap: 0; } .ls-kopfraster > .abschnitt + .abschnitt { border-top: 1px solid var(--rand); } }
.ls-empfaenger { line-height: 1.45; }
.ls-empfaenger-name { font-weight: 600; font-size: 1.05rem; text-decoration: none; }
.ls-empfaenger-name:hover { text-decoration: underline; }
.ls-empfaenger-ort { color: var(--akzent); font-size: 0.9rem; }
.ls-empfaenger-adresse { margin-top: 0.25rem; }
.ls-empfaenger small.hinweis { display: block; margin-top: 0.35rem; }

.ls-detail { max-width: 80rem; }
.ls-positionen td.bezeichnung { font-weight: 500; width: 40%; }
.ls-positionen th.zahl, .ls-positionen td.zahl { width: auto; white-space: nowrap; }
.ls-positionen th { white-space: nowrap; }
table.stamm-tabelle .leer-wert { color: #aaa; }
.ls-positionen tfoot td { border-top: 2px solid var(--rand); padding-top: 0.5rem; }
.ls-positionen tfoot td.summe-label { color: var(--muted); font-size: 0.8rem; text-align: right; }
.ls-positionen tfoot td.summe { font-weight: 700; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* ---------- Bestellungen: Übersicht und Detail (27.08.2026) ---------- */
form.bst-filter { flex-direction: column; align-items: stretch; gap: 0.6rem; }
form.bst-filter .bst-filter-felder { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem 0.9rem; }
form.bst-filter .bst-filter-felder label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.78rem; color: var(--muted); }
form.bst-filter .bst-filter-felder input, form.bst-filter .bst-filter-felder select {
  padding: 0.38rem 0.5rem; font-size: 0.9rem; font-family: inherit; color: var(--fg);
  border: 1px solid var(--rand); border-radius: 3px; background: #fff; min-width: 9rem;
}
form.bst-filter .bst-filter-felder select[name="lieferant_id"] { min-width: 16rem; }
form.bst-filter .bst-filter-aktionen { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.chip.chip-rot input:checked + span { border-color: var(--ueberfaellig-fg); background: var(--ueberfaellig-bg); color: var(--ueberfaellig-fg); }
.chip.chip-rot input:checked + span::before { border-color: var(--ueberfaellig-fg); background-color: var(--ueberfaellig-fg); }

.bst-tabelle td.primaer .kennung { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.03em; }
.bst-tabelle td.primaer .text { font-weight: 500; }
.bst-tabelle tr.status-entwurf td.primaer > a { color: var(--muted); font-weight: 500; }
.bst-tabelle td.status form.inline { display: inline-block; margin-left: 0.4rem; }
.bst-tabelle td.pdf { width: 3rem; }
.bst-tabelle th a.sortlink { font-size: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.bst-tabelle th a.sortlink-aktiv { color: var(--akzent); }
.zaehlzeile + .bst-tabelle, .zaehlzeile + .ls-tabelle { margin-top: 0; }

.bst-detail { max-width: 90rem; }
.ls-leiste.fehler { border-left-color: var(--fehler-fg); background: #fff8ee; }
.bst-versand-fehler { margin: 0.5rem 0 0; }
.bst-versand-fehler pre { margin: 0; white-space: pre-wrap; font-size: 0.8rem; }
.ls-leiste-aktionen .pdf-link { margin-left: 0.3rem; }
.bst-positionen td.bezeichnung { font-weight: 500; }
.bst-positionen th.zahl, .bst-positionen td.zahl, .bst-positionen td.datum { white-space: nowrap; }
.bst-positionen td.zahl { width: auto; }
.bst-positionen td.datum { font-variant-numeric: tabular-nums; }
.bst-positionen tr.storniert td { color: var(--muted); text-decoration: line-through; }
.bst-positionen tr.storniert td.pos-aktionen, .bst-positionen tr.storniert td.status-zelle { text-decoration: none; }
.bst-positionen td.status-zelle { white-space: normal; }   /* Marke und Person dürfen umbrechen, sonst sprengt „gesplittet · Name“ den Rahmen */
.bst-positionen td.status-zelle .badge { white-space: nowrap; }
.bst-positionen td.pos-aktionen { display: table-cell; white-space: normal; min-width: 11rem; }
.bst-positionen td.pos-aktionen:empty { min-width: 0; padding-left: 0; padding-right: 0; }   /* versendete/erledigte Bestellung: keine Knöpfe, keine Breite (10.09.2026) */
.bst-positionen td.pos-aktionen .mini { margin: 0.1rem 0.25rem 0.1rem 0; }
.bst-positionen td.bezeichnung { min-width: 9rem; }   /* 14 rem sprengte den Rahmen um ~25 px (10.09.2026) */
.bst-positionen th, .bst-positionen td { padding-left: 0.5rem; padding-right: 0.5rem; }
.pos-status { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 3px; font-size: 0.85em; font-weight: 500; background: #eee; color: var(--fg); }
.pos-status-bestaetigt { background: #e0eaf5; color: #1f4a8a; }
.pos-status-teilgeliefert { background: #e0eaf5; color: #1f4a8a; }
.pos-status-geliefert { background: var(--erledigt-bg); color: var(--erledigt-fg); }
.pos-status-storniert { background: #fff; color: var(--muted); border: 1px dashed var(--muted); }
.pos-status-gesplittet { background: #fff; color: var(--muted); border: 1px solid var(--rand); }
.bst-positionen .pill.prio-terminkritisch { margin-left: 0.4rem; vertical-align: 1px; }
.stamm-ansicht .legende { margin-top: 1rem; }

/* ---------- Anfragen: Übersicht und Detail (27.08.2026) ---------- */
.chip.chip-abstand { margin-left: 0.6rem; }
.anf-tabelle td.primaer .kennung { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.03em; }
.anf-tabelle tr.entwurf td.primaer > a { color: var(--muted); font-weight: 500; }
.anf-tabelle td.notiz { max-width: 16rem; color: var(--muted); font-size: 0.85em; }
.anf-tabelle tr.anfrage-kopf td { border-top: 2px solid var(--rand); vertical-align: top; }
.anf-tabelle tr.anfrage-unterzeile td { border-top: 1px dotted var(--rand); }
.anf-tabelle td.firma { font-weight: 500; }
.anf-tabelle th a.sortlink { font-size: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.anf-tabelle th a.sortlink-aktiv { color: var(--akzent); }
.ls-tabelle th a.sortlink { font-size: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.ls-tabelle th a.sortlink-aktiv { color: var(--akzent); }
.ls-tabelle td.pdf, .bst-tabelle td.pdf, .anf-tabelle td.pdf { width: 3rem; text-align: center; }
.stamm-tabelle td.datum { white-space: nowrap; font-variant-numeric: tabular-nums; }
.anf-detail { max-width: 90rem; }
.anf-positionen td.bezeichnung, .anf-lieferanten td.primaer { font-weight: 500; }
.anf-lieferanten td.pos-aktionen { display: table-cell; white-space: nowrap; }
.anf-lieferanten td.pos-aktionen form { display: inline-block; margin: 0 0 0 0.3rem; }
.anf-lieferanten td.pos-aktionen .btn-inline { margin-left: 0.3rem; }
.anf-lieferanten .fehlertext { max-width: 22rem; white-space: normal; }
.anf-lieferanten small.abgelaufen { color: var(--ueberfaellig-fg); }
.anf-anhaenge td.pos-aktionen { display: table-cell; }
.anf-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.anf-detail .vergleich-leiste { margin-bottom: 0.5rem; }

/* ---------- Wareneingang im Stil der Stammdaten-Ansichten (27.08.2026) ---------- */
.zaehlzeile .zaehl-rot { color: var(--ueberfaellig-fg); font-weight: 600; }
table.we-liste.stamm-tabelle th a.sortlink { font-size: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
table.we-liste.stamm-tabelle th a.sortlink-aktiv { color: var(--akzent); }
table.we-liste.stamm-tabelle td.primaer .text { font-weight: 500; display: block; }
table.we-liste.stamm-tabelle td.lieferant-zelle .text { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.we-liste.stamm-tabelle td.primaer small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 0.1rem; }
table.we-liste.stamm-tabelle td.primaer .kennung { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.03em; }
table.we-liste.stamm-tabelle td.bestellpos-zelle a { font-size: 0.9rem; font-weight: 600; text-decoration: none; }
table.we-liste.stamm-tabelle td.bestellpos-zelle a:hover { text-decoration: underline; }
table.we-liste.stamm-tabelle td.material { font-weight: 500; }
table.we-liste.stamm-tabelle td.material .pill { margin-left: 0.4rem; vertical-align: 1px; font-weight: 500; }
table.we-liste.stamm-tabelle td.zahl { width: 1%; text-align: right; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
table.we-liste.stamm-tabelle td.zahl .einheit { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--muted); }
table.we-liste.stamm-tabelle td.datum { font-variant-numeric: tabular-nums; }
table.we-liste.stamm-tabelle tr.we-ueberfaellig td.datum strong { color: var(--ueberfaellig-fg); }
table.we-liste.stamm-tabelle th.we-aktionen-kopf { text-align: right; }
@media (max-width: 1250px) {
  table.we-liste.stamm-tabelle td.zahl { text-align: left; }
  table.we-liste.stamm-tabelle td.lieferant-zelle .text { white-space: normal; max-width: none; }
}

/* ---------- Liefertermine im Stil der Stammdaten-Ansichten (27.08.2026) ---------- */
.termin-filter .chips-inline { align-self: center; padding-bottom: 0.15rem; }
h2.eyebrow.rot { color: var(--ueberfaellig-fg); }
.termine-block.abschnitt { border-top: 1px solid var(--rand); padding: 0.9rem 0 0.6rem; margin: 0 0 0.6rem; }
.termine-block.abschnitt h2.eyebrow { margin: 0 0 0.6rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--akzent); }
.termine-block.abschnitt h2.eyebrow.rot { color: var(--ueberfaellig-fg); }
.termine-block.abschnitt h2.eyebrow small { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); margin-left: 0.5rem; font-size: 0.78rem; }
table.termine.stamm-tabelle td.datum { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.termine.stamm-tabelle td.datum .pill { margin-left: 0.35rem; vertical-align: 1px; }
table.termine.stamm-tabelle td.primaer .text { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.termine.stamm-tabelle td.primaer .kennung { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.03em; font-weight: 600; text-decoration: none; }
table.termine.stamm-tabelle td.primaer .kennung:hover { text-decoration: underline; }
table.termine.stamm-tabelle td.primaer small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 0.1rem; }
table.termine.stamm-tabelle td.material-zelle .material { font-weight: 500; }
table.termine.stamm-tabelle td.material-zelle .pill { margin-left: 0.4rem; vertical-align: 1px; }
table.termine.stamm-tabelle td.zahl { text-align: right; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: nowrap; }
table.termine.stamm-tabelle td.zahl .einheit { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--muted); }
table.termine.stamm-tabelle td.pos-aktionen { display: table-cell; white-space: nowrap; text-align: right; }
.termine-block.ueberfaellig table.termine.stamm-tabelle tr td.datum { font-weight: 600; color: var(--ueberfaellig-fg); }
table.termine.stamm-tabelle td.material-zelle .pill { display: inline-block; width: auto; max-width: none; overflow: visible; white-space: nowrap; }

/* Dieseltank-Kachel aus Home Assistant (SPEC 17) — eine Reihe, Akzentfarbe, ruhiges Gitter */
.start-diesel:empty { display: none; }
.start-diesel h2 small { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 0.5rem; }
/* Reihe: zwei Anzeigen fest, der Verlauf daneben höchstens halb so breit wie zuvor */
.diesel-reihe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .diesel-reihe { grid-template-columns: 1fr; } }
/* Analoganzeige: Statusfarben wie im Portal (rot/gelb/grün), Nadel in Textfarbe */
.diesel-zeiger { text-align: center; }
.diesel-zeiger svg { width: 100%; max-width: 16rem; display: block; margin: 0 auto; overflow: visible; }
.diesel-zeiger .dz-seg { fill: none; stroke-width: 32; stroke-linecap: butt; }
.diesel-zeiger .dz-rot { stroke: var(--ueberfaellig-fg); }
.diesel-zeiger .dz-gelb { stroke: #d9a300; }
.diesel-zeiger .dz-gruen { stroke: var(--erledigt-fg); }
.diesel-zeiger .dz-nadel { stroke: var(--fg); stroke-width: 3; stroke-linecap: round; }
.diesel-zeiger .dz-nabe { fill: var(--fg); }
.diesel-zeiger .dz-min, .diesel-zeiger .dz-max { fill: var(--muted); font-size: 10px; }
.diesel-reihe .dz-titel { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem; text-align: center; }
/* Doppelnadel: neutrale Skala, PV grün, Last rot (Grün/Blau war schwer zu unterscheiden), Werte als Text daneben */
.diesel-energie .dz-track { stroke: #e6ebf2; }
.diesel-energie .dz-strich { stroke: #444; stroke-width: 1.5; }
.diesel-energie .dz-strich-lang { stroke-width: 2.5; }
.diesel-energie .dz-nadel-pv { stroke: var(--erledigt-fg); }
.diesel-energie .dz-nadel-last { stroke: var(--ueberfaellig-fg); }
.diesel-energie .dz-legende { display: flex; justify-content: center; gap: 1rem; margin-top: -0.2rem; font-size: 0.95em; color: var(--muted); }
.diesel-energie .dz-legende strong { color: var(--fg); font-variant-numeric: tabular-nums; }
.diesel-energie .dz-punkt-pv { background: var(--erledigt-fg); }
.diesel-energie .dz-punkt-last { background: var(--ueberfaellig-fg); }
.diesel-energie .dz-stufe { font-weight: 400; }
.diesel-zeiger .dz-zeit { font-size: 0.78em; margin-top: 0.15rem; }
.diesel-zeiger .dz-wert { margin-top: -0.2rem; color: var(--muted); }
.diesel-zeiger .dz-wert strong { font-size: 1.9em; color: var(--fg); font-variant-numeric: tabular-nums; margin-right: 0.2rem; }
.diesel-zeiger .dz-stufe { font-weight: 600; margin-top: 0.15rem; }
.diesel-zeiger .dz-punkt { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: middle; }
.diesel-zeiger-rot .dz-punkt { background: var(--ueberfaellig-fg); }
.diesel-zeiger-gelb .dz-punkt { background: #d9a300; }
.diesel-zeiger-gruen .dz-punkt { background: var(--erledigt-fg); }
.diesel-graph { position: relative; }
.diesel-graph svg { display: block; width: 100%; height: 10rem; }
.diesel-graph .dg-gitter { stroke: var(--rand); stroke-width: 1; }
.diesel-graph .dg-achse { fill: var(--muted); font-size: 10px; }
.diesel-graph .dg-flaeche { fill: var(--akzent); fill-opacity: 0.08; }
.diesel-graph .dg-linie { fill: none; stroke: var(--akzent); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.diesel-graph .dg-kreuz { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.diesel-graph .dg-marke { fill: #fff; stroke: var(--akzent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.diesel-graph [hidden] { display: none; }
.diesel-graph .dg-tooltip {
  position: absolute; top: 0.2rem; transform: translateX(-50%); pointer-events: none;
  background: var(--karte); border: 1px solid var(--rand); border-radius: 3px; padding: 0.15rem 0.5rem;
  font-size: 0.82em; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
/* Haustür öffnen (SPEC 17): Knopf im Schnellstart wie die Links, Rückmeldung klein darunter */
button.start-aktion { width: 100%; background: var(--karte); font: inherit; cursor: pointer; text-align: left; }
button.start-aktion:disabled { opacity: 0.6; cursor: wait; }
.start-haustuer-status { font-size: 0.85em; color: var(--erledigt-fg); margin: 0.2rem 0 0 0.3rem; }
.start-haustuer-status.fehler { color: var(--ueberfaellig-fg); }

/* Anlagenmodul (SPEC 18): Galerie, Berichtstext, Importhinweis */
.anlagen-importstand { font-size: 0.9em; }
.anlagen-importstand .fehler { color: var(--ueberfaellig-fg); }
.anlagen-tabelle td.kennung { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: nowrap; }
/* Kachelgröße in drei Stufen (11.10.2026, Dietmar: „Wie würdest du die Größe der Vorschaubilder in der Desktopversion
   veränderbar machen? — 3 Stufen“): Mindestbreite der Kachel als Variable, html[data-galerie] aus localStorage (base.html);
   Umschalter Klein · Mittel · Groß über der Galerie, nur mit Maus und ab 931 px — am Telefon gilt das 7-rem-Raster unten. */
:root { --galerie-kachel: 9rem; }
html[data-galerie="klein"] { --galerie-kachel: 7rem; }
html[data-galerie="gross"] { --galerie-kachel: 14rem; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--galerie-kachel), 1fr)); gap: 0.5rem; }
.galerie-groesse { margin: 0 0 0.5rem; }
.galerie-groesse button { display: inline-flex; align-items: center; padding: 0.3rem 0.8rem; border: 0; background: none; color: var(--fg); font: inherit; font-size: 0.8rem; cursor: pointer; }
.galerie-groesse button:hover { background: #f3f6fa; }
.galerie-groesse button + button { border-left: 1px solid var(--rand); }
.galerie-groesse button[aria-pressed="true"] { background: var(--akzent); color: #fff; }
@media (max-width: 930px), (hover: none) and (pointer: coarse) { .galerie-groesse { display: none; } }
.galerie-bild, .galerie-dokument { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; border: 1px solid var(--rand); background: #f3f5f8; }
.galerie-bild img, .galerie-dokument img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Dokument-Kacheln (PDF, DXF; 10.10.2026): Vorschaubild oben angeschnitten statt mittig (Kopf der Seite), Typmarke in der Ecke */
.galerie-dokument, .galerie-zeichnung { position: relative; }
.galerie-dokument img { object-position: top; }
.galerie-zeichnung img { object-fit: contain; background: #fff; }
.galerie-typ-marke { position: absolute; left: 0.35rem; bottom: 0.35rem; padding: 0.1rem 0.4rem; border-radius: 3px; background: rgba(27, 32, 40, 0.75); color: #fff; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.03em; pointer-events: none; }
.wissen-dokument .wissen-vorschau { position: relative; display: block; width: 9rem; margin: 0.4rem 0 0.6rem; border: 1px solid var(--rand); border-radius: 4px; overflow: hidden; background: #fff; }
.wissen-dokument .wissen-vorschau img { display: block; width: 100%; height: auto; }
.dateiliste { margin: 0.6rem 0 0; padding-left: 1.2rem; }
.bericht-inhalt { max-width: 52rem; line-height: 1.55; }
.bericht-inhalt img { max-width: 100%; height: auto; }
.bericht-inhalt table { width: auto; }
.bericht-inhalt td, .bericht-inhalt th { border: 1px solid var(--rand); padding: 0.2rem 0.5rem; }
@media (max-width: 930px) { .galerie { grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); } }
.galerie-eintrag { position: relative; }
/* Video-Kachel (10.10.2026): dunkle Fläche mit Abspielzeichen und Namen; abgespielt wird in der Lichtbox */
.galerie-video { background: #1b2028; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; text-decoration: none; padding: 0.4rem; }
.galerie-video-marke { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: rgba(255, 255, 255, 0.18); display: flex; align-items: center; justify-content: center; }
.galerie-video-marke svg { width: 1.5rem; height: 1.5rem; fill: #fff; margin-left: 0.15rem; }
.galerie-video-name { font-size: 0.72rem; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.galerie-video-name small { display: block; color: #aab4c2; }
.galerie-video-vorschau { position: relative; padding: 0; }   /* Vorschaubild aus dem Video (10.10.2026), Abspielzeichen darüber */
.galerie-video-vorschau .galerie-video-marke { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, 0.45); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6); }
.wissen-video .wissen-player { display: block; width: auto; max-width: min(100%, 40rem); max-height: 70vh; margin: 0.4rem 0 0.6rem; border-radius: 4px; background: #000; }   /* Hochkantvideos nicht bildschirmhoch */
.galerie-eintrag form.inline { position: absolute; top: 0.25rem; right: 0.25rem; line-height: 0; }   /* kein Zeilenkasten unter der Kachel */
.galerie-eintrag .galerie-loeschen { padding: 0 0.4rem; line-height: 1.3; }
/* Titelbild wählen (SPEC 14.4 Galerie): Marke unten rechts — ★ am Titelbild, ☆-Knopf an den anderen */
.galerie-eintrag form.galerie-titel-form { position: absolute; right: 0.35rem; bottom: 0.35rem; top: auto; left: auto; display: block; line-height: 0; }
.galerie-titel { display: inline-block; font-size: 0.7rem; font-weight: 500; line-height: 1.4; font-family: inherit; padding: 0.05rem 0.4rem; border-radius: 3px; border: 1px solid var(--rand); background: rgba(255, 255, 255, 0.92); color: var(--muted); cursor: pointer; white-space: nowrap; }
.galerie-titel:hover { color: var(--akzent); border-color: var(--akzent); }
.galerie-eintrag span.galerie-titel.ist-titel { position: absolute; right: 0.35rem; bottom: 0.35rem; color: var(--akzent); border-color: var(--akzent); cursor: default; }
.galerie-eintrag .menue-liste form.inline { position: static; line-height: inherit; }   /* im Aktionsblatt „…“ ist das Titelbild-Formular ein normaler Eintrag */
@media (pointer: coarse) { .galerie-eintrag form.galerie-titel-form { display: none; } }   /* am Telefon nur über „…“ oder die Lichtbox; ★ am Titelbild bleibt */
/* Karten-Info (SPEC 14.4): „i“ unten links auf Fotos mit GPS-Daten, öffnet Google Maps am Aufnahmeort */
.foto-info { position: absolute; left: 0.35rem; bottom: 0.35rem; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--akzent); border: 1px solid var(--akzent); font: italic 700 0.85rem/1.3rem Georgia, "Times New Roman", serif; text-align: center; text-decoration: none; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.foto-info:hover { background: var(--akzent); color: #fff; }
.anlage-titelbild-rahmen { position: relative; display: inline-block; max-width: 100%; }
.anlage-titelbild-rahmen .foto-info { bottom: 1.4rem; }
@media (max-width: 930px) { .anlage-titelbild-rahmen .foto-info { bottom: 1.2rem; } }
.galerie-eintrag .galerie-datei { display: block; padding: 1rem 0.5rem; border: 1px solid var(--rand); border-radius: 4px; font-size: 0.85em; overflow-wrap: anywhere; }
.upload-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.6rem; }
.datei-knopf { cursor: pointer; display: inline-flex; align-items: center; }
.editor-werkzeuge { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.4rem; }
.bericht-editor { min-height: 14rem; background: var(--karte); font-size: 1rem; line-height: 1.5; }
.bericht-editor img { max-width: 100%; height: auto; }
trix-toolbar .trix-button-group { flex-wrap: wrap; }
@media (max-width: 930px) {
  .bericht-editor { min-height: 10rem; }
  trix-toolbar .trix-button-group--file-tools, trix-toolbar .trix-button-group--history-tools { display: none; }   /* Foto über eigene Knöpfe */
  .bericht-form .aktionen-rechts button.primaer { padding: 0.7rem 1.4rem; font-size: 1.05em; }
}
.chips a.chip { text-decoration: none; color: inherit; }
.chips a.chip.chip-aktiv span { background: var(--akzent); color: #fff; border-color: var(--akzent); }
.werteliste input[type=text] { width: 100%; }

/* Anlagenbild unter dem Navigator (SPEC 18.2) — am Telefon volle Breite */
.anlage-titelbild { display: block; max-width: 400px; margin: 0 0 1rem; border-radius: 6px; overflow: hidden; border: 1px solid var(--rand); background: #f3f5f8; }
.anlage-titelbild img { display: block; width: 100%; height: auto; }
@media (max-width: 930px) { .anlage-titelbild { max-width: 50vw; margin: 0 0 0.8rem; } }

/* Berichte als Kacheln (SPEC 18.2), Muster Wareneingang */
.bericht-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 0.8rem; }
.bericht-kachel { display: grid; grid-template-columns: 7rem 1fr; background: var(--karte); border: 1px solid var(--rand); border-radius: 6px; overflow: hidden; }
.bericht-kachel-bild { display: block; background: #eef1f5; }
.bericht-kachel-bild img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1 / 1; }
.bericht-kachel-leer { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 7rem; color: var(--muted); font-size: 0.8rem; }
a.bericht-kachel-bild { text-decoration: none; }   /* „Kein Foto“ ist Platzhalter, kein unterstrichener Link (Handyprüfung Nr. 14) */
.bericht-kachel-kopf .badge { font-size: 0.75rem; }   /* Typ-Abzeichen mindestens 12 px */
.bericht-kachel-text { padding: 0.55rem 0.7rem; display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.bericht-kachel-kopf { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85em; color: var(--muted); }
.bericht-kachel-titel { font-weight: 600; color: var(--fg); text-decoration: none; overflow-wrap: anywhere; }
.bericht-kachel-titel:hover { color: var(--akzent); }
.bericht-kachel-anlage { font-size: 0.88em; color: var(--muted); text-decoration: none; }
.bericht-kachel-fuss { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding-top: 0.3rem; }
@media (max-width: 600px) { .bericht-kacheln { grid-template-columns: 1fr; } }

/* Berichte an der Anlage: Tabelle am Desktop, Kacheln am Telefon (SPEC 18.2) */
.anlage-detail .nur-mobil { display: none; }
@media (max-width: 930px) {
  .anlage-detail .nur-desktop, .anlage-detail .nur-desktop + .tabelle-scroll { display: none; }
  .anlage-detail .tabelle-scroll:has(> table.nur-desktop) { display: none; }
  .anlage-detail .nur-mobil { display: grid; grid-template-columns: 1fr; }
}
.stamm-ansicht dd.zeit-person { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }

/* Anlagenübersicht als schmale Liste (SPEC 14.4 „Anlagenliste“): Name mit Kennung, darunter der Betreiber */
.anlagen-liste { list-style: none; margin: 0; padding: 0; max-width: 28rem; border: 1px solid var(--rand); border-radius: 6px; background: var(--karte); }
.anlagen-liste li + li { border-top: 1px solid var(--rand); }
.anlagen-liste li > a { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.5rem 0.75rem; text-decoration: none; color: var(--fg); }
.anlagen-liste li > a:hover { background: #f3f6fa; }
.anlagen-liste-name { font-weight: 600; overflow-wrap: anywhere; }
.anlagen-liste-betreiber { font-size: 0.85em; color: var(--muted); }
.anlagen-liste-name .flagge { vertical-align: -0.1em; margin-left: 0.15rem; }
.anlagen-liste-zahlen { display: flex; gap: 1rem; font-size: 0.8em; color: var(--muted); margin-top: 0.1rem; }
.anlagen-liste-zahlen > span { display: inline-flex; align-items: center; gap: 0.25rem; }
.anlagen-liste-zahlen svg { display: block; }
.anlagen-liste li.hinweis { padding: 0.6rem 0.75rem; }

/* Anlagen-Kontakte: Zugehörigkeit (Betreiber fremder Anlage oder externe Organisation) auf der Kachel */
.kontakt-zugehoerigkeit { color: var(--muted); font-size: 0.8em; }
.kontakt-zugehoerigkeit .badge, td .badge { font-size: 0.7em; }
.aktionen-zelle { white-space: nowrap; }

/* Anlagenübersicht als Kacheln (SPEC 14.4 „Anlagenkachel“): Titelbild oben, darunter wie die Liste */
.anlagen-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.8rem; }
.anlagen-kachel { display: flex; flex-direction: column; background: var(--karte); border: 1px solid var(--rand); border-radius: 6px; overflow: hidden; text-decoration: none; color: var(--fg); }
.anlagen-kachel:hover { border-color: var(--akzent); }
.anlagen-kachel-bild { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #eef1f5; }
.anlagen-kachel-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }   /* absolut, sonst sprengt ein Hochformat das 16:9-Feld */
.anlagen-kachel-leer { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 0.8em; }
.anlagen-kachel-text { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.5rem 0.75rem 0.6rem; }
@media (max-width: 930px) { .anlagen-kacheln { grid-template-columns: 1fr; } .anlagen-kachel { flex-direction: row; } .anlagen-kachel-bild { width: 7rem; aspect-ratio: 1 / 1; flex: none; } }
/* Landkarte (SPEC 14.4 „Anlagenkarte“) */
.anlagen-karte { height: 70vh; min-height: 24rem; border: 1px solid var(--rand); border-radius: 6px; background: #eef1f5; }
.anlagen-karte-hinweis { margin-top: 0.4rem; }
.leaflet-popup-content { font: inherit; font-size: 0.9rem; }
.leaflet-popup-content .karte-bild { display: block; margin: 0 0 0.4rem; border-radius: 4px; overflow: hidden; }
.leaflet-popup-content .karte-bild img { display: block; width: 220px; height: 140px; object-fit: cover; }

/* Aufträge aus Lantek (SPEC 19): Positionsbild klein, Fertigungsschritte als Liste */
.auftrag-zeilen td.auftrag-bild { width: 4.5rem; padding-top: 0.3rem; padding-bottom: 0.3rem; }
.auftrag-zeilen td.auftrag-bild img { display: block; width: 4rem; height: 3rem; object-fit: contain; background: #fff; }
/* Cadman-B-Ansichten (SPEC 19.3): gebogen und Abwicklung, klein unter dem Lantek-Bild */
.auftrag-zeilen td.auftrag-bild .cadman-bilder { display: flex; gap: 0.2rem; margin-top: 0.2rem; }
.auftrag-zeilen td.auftrag-bild .cadman-bilder img { width: 1.9rem; height: 1.9rem; border: 1px solid var(--rand); border-radius: 3px; }
.auftrag-zeilen td.auftrag-bild .cadman-bilder a:hover img { border-color: var(--akzent); }
.cadman-gross { position: fixed; z-index: 60; width: 380px; padding: 6px; background: #fff; border: 1px solid var(--rand); border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.18); pointer-events: none; }
.cadman-gross img { display: block; width: 100%; height: 380px; }
.cadman-gross-titel { display: block; font-size: 0.78rem; color: var(--muted); padding: 4px 2px 0; }
/* Modal: große Ansicht mittig, rechts die anderen Ansichten zur Auswahl; Klick ins Bild schließt (SPEC 19.3) */
.cadman-modal[hidden] { display: none; }   /* display:flex würde sonst das hidden-Attribut überstimmen */
.cadman-modal { position: fixed; inset: 0; z-index: 70; background: rgba(20, 24, 32, 0.62); display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.cadman-modal-inhalt { display: flex; gap: 1rem; align-items: stretch; max-width: 100%; max-height: 100%; }
.cadman-modal-bild { margin: 0; background: #fff; border-radius: 8px; padding: 0.6rem; cursor: zoom-out; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.cadman-modal-bild img { display: block; width: min(76vh, 76vw); height: min(76vh, 76vw); object-fit: contain; }
.cadman-modal-bild figcaption { text-align: center; font-size: 0.85rem; color: var(--muted); padding-top: 0.4rem; }
.cadman-modal-leiste { display: flex; flex-direction: column; gap: 0.6rem; justify-content: center; }
.cadman-modal-wahl { background: #fff; border: 2px solid transparent; border-radius: 8px; padding: 0.4rem; cursor: pointer; width: 9.5rem; font: inherit; color: var(--muted); font-size: 0.78rem; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.cadman-modal-wahl:hover, .cadman-modal-wahl:focus-visible { border-color: var(--akzent); color: var(--akzent); outline: none; }
.cadman-modal-wahl img { display: block; width: 100%; height: 8rem; object-fit: contain; background: #fff; }
.cadman-modal-wahl span { display: block; padding-top: 0.25rem; }
body.cadman-offen { overflow: hidden; }
@media (max-width: 700px) { .cadman-modal-inhalt { flex-direction: column; align-items: center; } .cadman-modal-leiste { flex-direction: row; } .cadman-modal-bild img { width: 80vw; height: 80vw; } }
.fertigungsschritte { list-style: none; margin: 0; padding: 0; font-size: 0.85em; }
.fertigungsschritte li { display: flex; flex-wrap: wrap; gap: 0.1rem 0.5rem; white-space: nowrap; }
/* Schmale Spalte statt breiter Tabelle: der Name hat eine Grundbreite und bricht in sich um, „X von Y“ steht daneben */
.fertigungsschritte .schritt-name { flex: 0 1 8rem; min-width: 0; white-space: normal; }   /* Zahl gleich daneben, untereinander bündig */
.auftrag-zeilen td.fertigung-zelle { min-width: 12rem; }   /* Name und Zahl bleiben nebeneinander; Maße brechen dafür nach dem Komma um */
.fertigungsschritte .schritt-zahl { color: var(--muted); font-variant-numeric: tabular-nums; }
.fertigungsschritte .schritt-zahl.fertig { color: var(--erledigt-fg); }
/* Fertigungsstand je Arbeitsgang wie im Kundenportal (SPEC 19.2, 16.10.2026): Marke grün, wenn fertig, sonst grau */
.fertigungsschritte li { align-items: center; }
.fertigungsschritte .schritt-marke { width: 0.5rem; height: 0.5rem; border-radius: 50%; flex: none; background: #d5d9e0; }
.fertigungsschritte li.fertig .schritt-marke { background: var(--erledigt-fg); }
.fertigungsschritte li.abgebrochen { text-decoration: line-through; color: var(--muted); }
.fertigungsschritte .schritt-ausschuss { color: var(--ueberfaellig-fg); }
.rueckmeldung-folgen { margin: 0.5rem 0; padding-left: 1.1rem; }
.rueckmeldung-befehle ol { margin: 0.4rem 0 0; padding-left: 1.4rem; font-size: 0.8em; max-height: 40vh; overflow: auto; }
.rueckmeldung-befehle li { margin-bottom: 0.45rem; }
.rueckmeldung-befehle li span { display: block; color: var(--muted); }
.rueckmeldung-befehle code { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.fortschritt.fortschritt-klein { width: 3rem; height: 0.4rem; }
.fortschritt { display: inline-block; width: 5rem; height: 0.55rem; border-radius: 999px; background: #e3e7ee; vertical-align: middle; overflow: hidden; }
.fortschritt-balken { display: block; height: 100%; background: var(--erledigt-fg); }
.status-symbol { display: inline-flex; vertical-align: middle; }
td.status-zelle, dd.status-zelle, td.fertig-zelle { white-space: nowrap; }
dd.status-zelle .status-symbol { margin-right: 0.25rem; }
/* Auftragskopf (SPEC 14.5 „Faktenraster“): Statuszeile, darunter Beschriftung links / Wert rechts */
.auftrag-kopf { margin: -0.4rem 0 1.4rem; }
.auftrag-statuszeile { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 1.1rem; margin-bottom: 0.9rem; }
.auftrag-statuszeile .status-symbol svg { width: 22px; height: 22px; }
.auftrag-kunde a { font-weight: 500; }
.fakten-reihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 0.6rem 3rem; }
.fakten { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.2rem; margin: 0; align-items: baseline; }
.fakten dt { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.fakten dd { margin: 0; font-variant-numeric: tabular-nums; }
.fakten dd.fehler { color: var(--ueberfaellig-fg); font-weight: 600; }
.fortschritt.fortschritt-breit { width: 9rem; height: 0.7rem; }
/* Auftragsliste (SPEC 19): Terminzeile je Auftrag, per Plus aufklappbar */
.auftragsliste .zeile-toggle-kopf, .auftragsliste .zeile-toggle-zelle { width: 2rem; padding-left: 0.4rem; padding-right: 0.2rem; }
/* Breite Listen (Nach Aufträgen) dürfen die Seite nicht sprengen: Kunde und Referenz brechen um, der Rest scrollt im Rahmen (.tabelle-scroll) */
.auftragsliste td.kunde-zelle, .auftragsliste td.referenz-zelle { overflow-wrap: anywhere; min-width: 8rem; }
.stamm-ansicht.breit .abschnitt { min-width: 0; }
.zeile-toggle { width: 1.45rem; height: 1.45rem; border-radius: 50%; border: 1px solid var(--rand); background: #fff; color: var(--akzent); font: 700 1rem/1 inherit; font-family: inherit; cursor: pointer; padding: 0; }
.zeile-toggle:hover { border-color: var(--akzent); background: #f3f6fa; }
.auftragsliste tr.auftrag-termine td { background: #f7f8fa; padding-top: 0.35rem; padding-bottom: 0.4rem; font-size: 0.85rem; }
.auftragsliste .termin { display: inline-block; margin-right: 1.6rem; font-variant-numeric: tabular-nums; }
.auftragsliste .termin-name { color: var(--muted); margin-right: 0.35rem; }
.auftragsliste .termin.fehler { color: var(--ueberfaellig-fg); font-weight: 600; }
.janein-reihe { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; }
.janein { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.janein svg { width: 16px; height: 16px; }
.fakten code.kennwort { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--bg); padding: 0.05rem 0.35rem; border-radius: 3px; }
.fakten .kennwort-verdeckt { letter-spacing: 0.1em; color: var(--muted); }
/* Sitzungs-Info auf der Startseite (SPEC 2.1): „i“ neben dem Gruß, Popover bei Maus oder Tastaturfokus */
.start-gruss .info-i { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; margin-left: 0.4rem; vertical-align: 0.35rem; border-radius: 50%; border: 1px solid var(--akzent); color: var(--akzent); font: italic 700 0.8rem/1 Georgia, "Times New Roman", serif; cursor: help; }
.start-gruss .info-popover { display: none; position: absolute; left: 0; top: 1.7rem; z-index: 40; width: 26rem; max-width: calc(100vw - 4rem); background: var(--karte); border: 1px solid var(--rand); border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16); padding: 0.7rem 0.9rem; font: 400 0.82rem/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--fg); text-align: left; cursor: auto; }   /* nicht vom „i“ (Georgia, kursiv) erben */
.start-gruss .info-i:hover .info-popover, .start-gruss .info-i:focus .info-popover, .start-gruss .info-i:focus-within .info-popover { display: block; }
.start-gruss .info-popover strong { display: block; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--akzent); margin: 0.5rem 0 0.25rem; }
.start-gruss .info-popover strong:first-child { margin-top: 0; }
.start-gruss .info-popover dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.15rem 0.8rem; margin: 0; }
.start-gruss .info-popover dt { color: var(--muted); white-space: nowrap; }
.start-gruss .info-popover dd { margin: 0; overflow-wrap: anywhere; }
.start-gruss .info-popover dd.klein { font-size: 0.75rem; color: var(--muted); }
.start-gruss .info-popover .badge { font-size: 0.7rem; }
/* Admin › Einstellungen (SPEC 8.2): .env-Tabelle */
table.einstellungen td.wert { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.82rem; overflow-wrap: anywhere; min-width: 18rem; width: 34%; }
table.einstellungen tr.abschnitt-zeile td { background: var(--bg); color: var(--akzent); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding-top: 0.5rem; }
table.einstellungen td.wert input { width: 100%; box-sizing: border-box; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.82rem; padding: 0.25rem 0.4rem; }
/* Lantek Aufträge (SPEC 19.1): Knopf „Teileliste (PDF)“ neben der Auftragsnummer in der Überschrift */
h1 .titel-aktion { font-size: 0.85rem; font-weight: 400; vertical-align: middle; margin-left: 0.8rem; display: inline-block; }
.auftragsliste .termin.teileliste .pdf-link { vertical-align: middle; }

/* Lantek Aufträge, Ansicht „Nach Aufträgen“: Zeilen je Seite und Blättern (SPEC 19) */

/* Als App installieren (SPEC 14.9): Karte auf der Startseite, nur im Browser sichtbar */
.start-install .ios-symbol { display: inline-block; padding: 0 0.25rem; border: 1px solid var(--rand); border-radius: 3px; font-size: 0.9em; line-height: 1.3; }
.start-install .install-weg { background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.8rem; cursor: pointer; padding: 0; margin-top: 0.6rem; text-decoration: underline; }

/* Auftragspositionen: Baugruppe grün, Einzelteile eingerückt mit Linie links (SPEC 19.1) */
.auftrag-zeilen tr.baugruppe td { background: #eef7ee; }
.auftrag-zeilen tr.teil td.nummer { padding-left: 1.6rem; color: var(--muted); }
.auftrag-zeilen tr.teil td { background: #fafbfd; font-size: 0.92em; }
.auftrag-zeilen tr.teil td:first-child { box-shadow: inset 0.35rem 0 0 #c9d3e6; }
.auftrag-zeilen tr.ebene-2 td.nummer { padding-left: 2.6rem; }
.auftrag-zeilen tr.ebene-3 td.nummer { padding-left: 3.6rem; }

/* Mein Profil (SPEC 2.4) */
.profil .abschnitt + .abschnitt { margin-top: 1.6rem; }
/* Kopf (18.10.2026): Bild links, Name mit Anmeldename als Überschrift, Kontaktdaten kompakt daneben */
.profil-person { display: flex; gap: 1.2rem; align-items: flex-start; }
.profil-person-text { flex: 1 1 auto; min-width: 0; }
.profil-name { font-size: 1.35rem; font-weight: 600; margin: 0.2rem 0 0.6rem; }
.profil-name code { font-size: 0.8rem; font-weight: 400; color: var(--muted); margin-left: 0.4rem; }
.profil-person .hinweis { margin: 0.6rem 0 0; }
/* Sprungleiste zu den Abschnitten */
.profil-sprung { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.2rem 0 0; padding-bottom: 0.9rem; border-bottom: 1px solid var(--rand); }
.profil-sprung a { padding: 0.35rem 0.8rem; border: 1px solid var(--rand); border-radius: 999px; text-decoration: none; color: var(--fg); background: var(--karte); font-size: 0.9rem; }
.profil-sprung a:hover { border-color: var(--akzent); color: var(--akzent); }
.profil [id] { scroll-margin-top: 1rem; }
.profil-avatar { width: 5rem; height: 5rem; border-radius: 50%; object-fit: cover; border: 1px solid var(--rand); flex: none; }
.profil-avatar-leer { display: inline-flex; align-items: center; justify-content: center; background: #e8eef7; color: var(--akzent); font-weight: 700; font-size: 1.6rem; }
.profil-untertitel { font-size: 0.9rem; font-weight: 600; margin: 1rem 0 0.4rem; }
.profil-sicher-abmelden { margin: 0.6rem 0 0.2rem; }   /* Mein Konto: „Von diesem Gerät sicher abmelden“ unter „Diese Sitzung“ */
.profil-untertitel small { color: var(--muted); font-weight: 400; margin-left: 0.4rem; }
.profil-form { margin: 0.4rem 0; }
.profil-form label:not(.schalter):not(.pk-nur) { display: inline-flex; flex-direction: column; gap: 0.2rem; font-size: 0.9em; color: var(--muted); }
.profil-form select { font: inherit; padding: 0.3rem 0.5rem; }
/* Iconset der Menüs (SPEC 14.12): je Set eine Zeile mit Auswahl, fünf Bereichen und Text; die Farben der Vorschau setzt
   basis.css über [data-iconset-vorschau] */
.iconset-wahl { margin: 0.9rem 0 0.4rem; }
.iconset-wahl fieldset { display: grid; gap: 0.5rem; max-width: 46rem; margin: 0 0 0.6rem; padding: 0; border: 0; }
.iconset-wahl legend { margin-bottom: 0.3rem; padding: 0; font-size: 0.9em; color: var(--muted); }
.iconset-option { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; padding: 0.6rem 0.8rem; border: 1px solid var(--rand);
                  border-radius: 10px; background: var(--karte); cursor: pointer; }
.iconset-option:has(input:checked) { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent); }
.iconset-option input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--akzent); }
.iconset-vorschau { display: flex; gap: 0.4rem; }
.iv { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 10px; background: #e8eef6; }
.iv > svg { width: 22px; height: 22px; color: var(--akzent); }
.iconset-text { flex: 1; min-width: 12rem; display: flex; flex-direction: column; gap: 0.1rem; }
.iconset-text small { color: var(--muted); }
.profil-arbeit { list-style: none; padding: 0; margin: 0 0 0.6rem; }
.profil-arbeit > li { padding: 0.3rem 0; border-bottom: 1px dashed var(--rand); }
.profil-arbeit ul { list-style: none; padding-left: 1rem; margin: 0.15rem 0 0; }
.chip.chip-fest { cursor: default; }
.chip.chip-fest > span::before { display: none; }
.chip.chip-fest.ausgegraut > span, .chip.chip-fest.ausgeblendet > span { opacity: 0.45; text-decoration: line-through; }
.chip.chip-fest.frei > span { border-color: var(--akzent); }
.chip.chip-fest small { color: var(--muted); margin-left: 0.3rem; }
table.stamm-tabelle tr.aktuell td { background: #eef7ee; }
.stamm-ansicht.profil dl.stamm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stamm-ansicht.profil .profil-person dl.stamm { grid-template-columns: repeat(4, minmax(0, max-content)); column-gap: 2rem; }
.profil-form .pk-nur-hinweis { display: block; margin: 0.2rem 0 0 1.6rem; }
@media (max-width: 900px) { .stamm-ansicht.profil .profil-person dl.stamm { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .stamm-ansicht.profil dl.stamm { grid-template-columns: 1fr; }
  .stamm-ansicht.profil .profil-person dl.stamm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profil-person .profil-avatar { width: 3.5rem; height: 3.5rem; }
  .profil-name code { display: block; margin: 0.2rem 0 0; }
  .profil-person dl.stamm > div:first-child { grid-column: 1 / -1; }   /* E-Mail über beide Spalten statt Umbruch im Wort */
}
.profil .tabelle-scroll + form.inline { display: block; margin-top: 0.6rem; }
.profil-form label.schalter { display: flex; flex-direction: row; color: var(--fg); }

/* Fertigungskennzahlen (Cadman-B, SPEC 19.3): Ausklappzeile unter der Position, drei Faktenraster nebeneinander */
.auftrag-zeilen tr.zeile-kennzahlen > td { background: #f7f9fc; border-top: 0; padding: 0.5rem 0.8rem 0.7rem; }
.kennzahlen { display: flex; flex-wrap: wrap; gap: 0.6rem 2.5rem; }
.kennzahlen dl.fakten { margin: 0; min-width: 16rem; }
.kennzahlen .kennzahlen-pfad { font-family: var(--mono, monospace); font-size: 0.85em; }
/* Ansicht „Nach Biegeaufträgen“ (SPEC 19.4): Teilmengen (Rest noch am Laser) orange markiert, Werkzeuge in Festbreite */
table.biegeliste tr.teilmenge > td:first-child { box-shadow: inset 4px 0 0 #e08a1e; }
table.biegeliste td.werkzeug { font-family: var(--mono, ui-monospace, monospace); font-size: 0.85em; white-space: nowrap; }
.biege-filter .chip small { color: var(--muted); font-weight: 400; margin-left: 0.2rem; }

/* Werkstatt (SPEC 19.5, 14.5): Kacheln der abhakbaren Arbeitsgänge, fürs Telefon und Tablet */
.ws-seite { padding-bottom: 5rem; }
.ws-filter { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.8rem; }
.ws-suchzeile { display: flex; gap: 0.5rem; }
.ws-suchzeile input[type=search] { flex: 1; min-width: 0; min-height: 2.8rem; padding: 0 0.8rem; font: inherit; font-size: 1.05rem; border: 1px solid var(--rand); border-radius: 4px; background: var(--karte); }
.ws-scannen { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.8rem; padding: 0 1rem; }
.ws-scannen svg { width: 1.3rem; height: 1.3rem; }
/* Arbeitsplatz, Messer, Matrize als Auswahllisten in einer Zeile (19.10.2026, vorher je eine Chip-Zeile;
   Dietmar: „Comboboxen lieber … nicht so viel Platz“). Messer und Matrize stecken in #ws-werkzeug (out of band),
   das mit display: contents im selben Raster steht. Aufträge seit 20.10.2026 wieder als Chips (mehrere wählbar) in
   eigener Zeile darunter; am Telefon wischt man sie seitlich. */
.ws-wahlen { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.5rem 0.6rem; align-items: end; }
#ws-werkzeug { display: contents; }
.ws-wahl { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; position: relative; }
.ws-wahl > span { font-size: 0.78rem; color: var(--muted); }
.ws-wahl select { width: 100%; min-height: 2.6rem; padding: 0 0.6rem; font: inherit; font-size: 1rem; border: 1px solid var(--rand); border-radius: 4px; background: var(--karte); color: inherit; }
.ws-auftraege { grid-column: 1 / -1; row-gap: 0.5rem; margin-top: 0.2rem; }
.ws-chips .chip span { min-height: 2.4rem; display: inline-flex; align-items: center; }
.ws-chips .chip small { margin-left: 0.3rem; color: var(--muted); }
.ws-leer { margin: 1.5rem 0; }
.ws-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 0.75rem; }
.ws-karte { position: relative; display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); grid-template-areas: "bild kopf" "bild gang" "fakten fakten" "fuss fuss"; gap: 0.35rem 0.75rem; padding: 0.75rem; background: var(--karte); border: 1px solid var(--rand); border-radius: 4px; }
.ws-karte.ws-ueberfaellig { box-shadow: inset 0.3rem 0 0 var(--ueberfaellig-fg); }
.ws-karte.ws-gewaehlt { border-color: var(--akzent); box-shadow: 0 0 0 2px var(--akzent); }
.ws-karte.ws-vorgemerkt { opacity: 0.6; }
.ws-bild { grid-area: bild; width: 5.5rem; height: 5.5rem; object-fit: contain; border: 1px solid var(--rand); border-radius: 4px; background: #fff; }
.ws-bild.ws-bild-leer { background: repeating-linear-gradient(45deg, #f3f4f6 0 6px, #fff 6px 12px); }
.ws-kopf { grid-area: kopf; min-width: 0; padding-right: 2.6rem; }
.ws-kopf strong { display: block; font-size: 1.05rem; overflow-wrap: anywhere; }
.ws-kopf small { color: var(--muted); overflow-wrap: anywhere; }
.ws-arbeitsgang { grid-area: gang; align-self: start; }
.ws-arbeitsgang small { color: var(--muted); }
.ws-fakten { grid-area: fakten; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.1rem 0.6rem; margin: 0.2rem 0 0; font-size: 0.88rem; }
.ws-fakten dt { color: var(--muted); }
.ws-fakten dd { margin: 0; overflow-wrap: anywhere; }
.ws-fuss { grid-area: fuss; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.35rem; padding-top: 0.55rem; border-top: 1px dashed var(--rand); }
.ws-menge { display: flex; align-items: center; gap: 0.5rem; }
.ws-zahl { font-size: 1.9rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--akzent); }
.ws-menge small { color: var(--muted); line-height: 1.25; }
.ws-karte button.ws-abhaken { min-height: 2.8rem; padding: 0 1.3rem; font-size: 1rem; }
.ws-status { color: var(--muted); font-style: italic; }
/* QR-Knopf neben „abhaken“ und QR-Lightbox (SPEC 19.5, 28.09.2026): Artikelname, Teileansicht, QR-Code des Artikelnamens
   zum Abscannen vom Monitor. Fast schwarzer Grund, Karte und Code in reinem Weiß/Schwarz (auch im dunklen Modus), Code
   groß mit Ruhezone und scharfen Kanten, damit ein Handscanner ihn vom Bildschirm liest. */
.ws-karte button.ws-qr-knopf { min-height: 2.8rem; width: 2.8rem; padding: 0; margin-left: auto; display: inline-flex; align-items: center; justify-content: center; }
.ws-karte button.ws-qr-knopf + .ws-abhaken, .ws-karte button.ws-qr-knopf + .ws-status { margin-left: 0; }
.modal-overlay.ws-qr-overlay { background: rgba(8, 10, 14, 0.92); }
.modal.ws-qr { background: #fff; color: #000; width: min(34rem, 94vw); max-height: 96vh; overflow: auto; text-align: center; padding: 1.1rem 1.5rem 1.4rem; position: relative; }
.ws-qr .modal-schliessen { position: absolute; top: 0.5rem; right: 0.6rem; }
.ws-qr-name { font-size: 1.6rem; line-height: 1.25; margin: 0.2rem 2.4rem 0.15rem; color: #000; overflow-wrap: anywhere; }
.ws-qr-zusatz { margin: 0 0 0.4rem; color: #333; }
.ws-qr-bild { display: block; max-width: 100%; max-height: 26vh; object-fit: contain; margin: 0.5rem auto; background: #fff; }
.ws-qr-code { width: min(20rem, 72vw, 44vh); margin: 0.6rem auto 0; background: #fff; }
.ws-qr-code svg { display: block; width: 100%; height: auto; }
.ws-qr-text { margin: 0.35rem 0 0; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.1rem; color: #000; overflow-wrap: anywhere; }
.ws-auswahl { position: absolute; top: 0.5rem; right: 0.5rem; width: 2.4rem; height: 2.4rem; cursor: pointer; }
.ws-auswahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ws-auswahl span { display: block; width: 100%; height: 100%; border: 2px solid var(--rand); border-radius: 6px; background: var(--karte); }
.ws-auswahl input:checked + span { border-color: var(--akzent); background: var(--akzent) no-repeat center / 70% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.ws-auswahl input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 2px; }
.ws-leiste { position: fixed; left: 0; right: 0; bottom: var(--hm-hoehe, 0px); z-index: 90; display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem max(1rem, env(safe-area-inset-right, 0px)) calc(0.7rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px)); background: var(--karte); border-top: 1px solid var(--rand); box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08); }
.ws-leiste-text { flex: 1; font-weight: 600; }
.ws-leiste button { min-height: 2.8rem; padding: 0 1rem; }
/* „…“ rechts in der Leiste (Weitere Aktionen, 21.10.2026): sieht aus wie „Aufheben“, das Menü klappt nach oben auf */
.ws-mehr > summary { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 2.8rem;
  min-width: 2.8rem; padding: 0 0.9rem; border: 1px solid var(--rand); border-radius: 3px; background: #fff; color: var(--fg);
  font-weight: 700; letter-spacing: 0.1em; }
.ws-mehr > summary:hover, .ws-mehr[open] > summary { background: #f0f0f0; border-color: var(--akzent); color: var(--akzent); }
.ws-mehr .menue-liste { top: auto; bottom: calc(100% + 1.1rem); right: 0; }   /* über der Leiste (0,7 rem Polster + Luft) */
.ws-mehr .menue-liste button { font-size: 1rem; padding: 0 1.1rem; }
body.ws-auswahl-aktiv .rm-hinweis-bereich { bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }
.ws-sammel-zeile { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--rand); }
.ws-sammel-text { flex: 1; min-width: 0; }
.ws-sammel-text strong { display: block; overflow-wrap: anywhere; }
.ws-sammel-text small { color: var(--muted); }
.ws-stepper button { min-width: 2.6rem; min-height: 2.6rem; }
.modal .ws-stepper input { width: 4rem; }
@media (max-width: 30rem) {
  .ws-karten { grid-template-columns: 1fr; }
  .ws-karte { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .ws-bild { width: 4.5rem; height: 4.5rem; }
  .ws-sammel-zeile { flex-wrap: wrap; }
}
.ws-leiste[hidden], .ws-scannen[hidden] { display: none; }
.ws-fakten dd.fehler { color: var(--ueberfaellig-fg); font-weight: 600; }
@media (max-width: 30rem) {
  .ws-wahlen { grid-template-columns: 1fr 1fr; }
  .ws-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.2rem; scrollbar-width: none; }
  .ws-chips .chip, .ws-chips .chips-titel { flex: none; }
}
/* QR-Leser der Werkstatt (SPEC 19.5): Kamera vollflächig, Rahmen in der Mitte */
.ws-scan { position: fixed; inset: 0; z-index: 130; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); background: #000; }
.ws-scan[hidden] { display: none; }
.ws-scan-bild { position: relative; width: 100%; max-width: 40rem; }
.ws-scan video { display: block; width: 100%; max-height: 70vh; object-fit: cover; border-radius: 4px; background: #111; }
.ws-scan-rahmen { position: absolute; top: 50%; left: 50%; width: min(60%, 16rem); aspect-ratio: 1; transform: translate(-50%, -50%); border: 3px solid rgba(255, 255, 255, 0.9); border-radius: 12px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.35); pointer-events: none; }
.ws-scan-hinweis { max-width: 30rem; margin: 0; color: #fff; text-align: center; }
.ws-scan-schliessen { min-height: 2.8rem; padding: 0 1.5rem; }
/* Zähler auf der angehakten Kachel (SPEC 19.5): ersetzt links die große Zahl, „abhaken“ blendet aus */
.ws-zaehler { display: flex; align-items: center; gap: 0.35rem; }
.ws-zaehler[hidden] { display: none; }
.ws-zaehler button { min-width: 2.8rem; min-height: 2.8rem; border: 1px solid var(--rand); border-radius: 4px; background: var(--karte); font-size: 1.35rem; line-height: 1; cursor: pointer; }
.ws-zaehler button:active { background: #e8eef7; }
.ws-zaehler button:disabled { opacity: 0.35; cursor: default; background: var(--karte); }
.ws-zaehler button { touch-action: manipulation; }
.ws-zaehler input[type=number] { width: 3.8rem; min-height: 2.8rem; padding: 0 0.2rem; border: 2px solid var(--akzent); border-radius: 4px; text-align: center; font: inherit; font-size: 1.35rem; font-weight: 700; color: var(--akzent); font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.ws-zaehler input[type=number]::-webkit-inner-spin-button, .ws-zaehler input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ws-zaehler small { color: var(--muted); line-height: 1.2; margin-left: 0.2rem; }
.ws-karte.ws-gewaehlt .ws-menge, .ws-karte.ws-gewaehlt .ws-abhaken { display: none; }
/* Summe netto unter den Positionen der Bestellung (wie der Summenfuß der Lieferscheine) */
.bst-positionen tfoot td { border-top: 2px solid var(--rand); padding-top: 0.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.bst-positionen tfoot td.summe-label { color: var(--muted); font-size: 0.8rem; font-weight: 500; text-align: right; }
.bst-positionen tfoot td.summe-label small { display: block; font-weight: 400; }
/* Summe netto im Positionsformular (Anlegen/Bearbeiten), läuft beim Tippen mit */
.positionen tr.pos-summe td { border-top: 2px solid var(--rand); padding-top: 0.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.positionen tr.pos-summe td.summe-label { color: var(--muted); font-size: 0.8rem; font-weight: 500; text-align: right; }
.positionen tr.pos-summe td.summe-label small { display: block; font-weight: 400; }

/* Revisionsbaum, rechte Spalte (SPEC 21): der Knoten, auf dem man steht, und die angetippte
   Abfrage werden hervorgehoben. Die Regeln stehen hier statt im <style> der Seite, damit sie
   auch in einer lange offenen Seite gelten, in der HTMX nur die Fragmente tauscht. */
.rv-gruppe-gewaehlt { background: #dbe7f6; border: 1px solid #9bb8dd; border-left: 4px solid var(--akzent);
                      border-radius: 4px; padding: 0.5rem 0.8rem 0.7rem; margin: 0.2rem -0.8rem 0.4rem -0.5rem; }
.rv-gruppe-gewaehlt > .rv-gruppe-kopf { color: var(--akzent); font-weight: 600; }
/* rechts so weit über den Innenabstand hinaus wie links: Text und Knöpfe bleiben, wo sie ohne Markierung stehen,
   und halten Abstand zur Kante der blauen Fläche (Dietmar 29.10.2026) */
.rv-frage.gewaehlt { background: #c9dcf3; border-left: 4px solid var(--akzent); border-radius: 3px;
                     padding-left: 0.5rem; margin-left: -0.9rem; padding-right: 0.8rem; margin-right: -0.8rem; }

/* Dienste › In der Firma anwesend (SPEC 22.1): Karte je Person im Raster, am Telefon eine Spalte */
.anw-stand { margin: 0.2rem 0 0.9rem; }
.anw-raster { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.6rem; }
.anw-karte { display: flex; align-items: center; gap: 0.8rem; background: var(--karte); border: 1px solid var(--rand); border-radius: 6px; padding: 0.6rem 0.8rem; }
.anw-bild { flex: none; width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; background: #eef1f5; }
.anw-initialen { display: inline-flex; align-items: center; justify-content: center; font-weight: 600; color: var(--akzent); }
.anw-text { display: grid; gap: 0.1rem; min-width: 0; }
.anw-name { display: flex; align-items: baseline; gap: 0.4rem; flex-wrap: wrap; }
.anw-text strong { font-weight: 600; }
.anw-text small { color: var(--muted); }
.anw-kuerzel { font-size: 0.75rem; color: var(--muted); border: 1px solid var(--rand); border-radius: 3px; padding: 0 0.3rem; }
.anw-tel { font-size: 0.9rem; color: var(--akzent); text-decoration: none; white-space: nowrap; }
.anw-tel:hover { text-decoration: underline; }
@media (max-width: 560px) { .anw-raster { grid-template-columns: 1fr; } }

/* Dienste › Lagerbestand Modula (SPEC 22.2): Kennzahlen über der Liste, Menge hervorgehoben, leere Artikel gedämpft */
/* Lagerbestand Modula (SPEC 22.2): Kennzahlen im Dashboard-Muster (ein-/ausblendbar), Tabelle kompakt wie die
   übrigen Listen, Kacheln für das Telefon; „auto“ zeigt die Tabelle am Bildschirm und die Kacheln bis 700px */
.lb-dashboard { margin: 0.4rem 0 0.8rem; }
.dashboard.zu .lb-kennzahlen { display: none; }
.lb-kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.5rem; }
.lb-kennzahlen > div { background: var(--karte); border: 1px solid var(--rand); border-radius: 6px; padding: 0.45rem 0.8rem; display: grid; gap: 0.05rem; }
.lb-wert { font-size: 1.2rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--akzent); }
.lb-bez { font-size: 0.75rem; color: var(--muted); }
/* Suchfeld unmittelbar vor „Suchen“, die Filter-Chips darüber */
.lb-filter form.stamm-filter input[type="search"] { order: 1; }
.lb-filter form.stamm-filter button[type="submit"] { order: 2; }
.lb-filter form.stamm-filter a.filter-zuruecksetzen { order: 3; }
.lb-tabelle { font-size: 0.875rem; }
table.stamm-tabelle.lb-tabelle td.lb-menge { color: var(--fg); }
.lb-ansicht .lb-name { display: block; }
.lb-ansicht .lb-codes { display: block; color: var(--muted); font-size: 0.75rem; margin-top: 0.05rem; }
.lb-ansicht .lb-menge { font-weight: 600; font-variant-numeric: tabular-nums; }
table.stamm-tabelle.lb-tabelle tr.lb-leer td { color: var(--muted); }
.lb-ansicht .lb-leer .lb-menge, table.stamm-tabelle.lb-tabelle tr.lb-leer td.lb-menge { color: var(--ueberfaellig-fg); }
.lb-kachel-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; font-size: 0.8rem; color: var(--muted); margin: 0.3rem 0 0.5rem; }
.lb-kachel-sort a { color: var(--fg); text-decoration: none; }
.lb-kachel-sort a.aktiv { color: var(--akzent); font-weight: 600; }
.lb-kacheln { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.5rem; }
.lb-kachel { background: var(--karte); border: 1px solid var(--rand); border-radius: 6px; padding: 0.5rem 0.7rem; font-size: 0.875rem; display: grid; gap: 0.2rem; align-content: start; }
.lb-kachel-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.lb-kachel-kopf .lb-menge { white-space: nowrap; }
.lb-kachel-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.6rem; font-size: 0.75rem; color: var(--muted); }
.lb-kachel.lb-leer .lb-name { color: var(--muted); }
.lb-ansicht-auto .lb-kachel-sort, .lb-ansicht-auto .lb-kacheln { display: none; }
@media (max-width: 700px) {
  .lb-ansicht-auto .lb-tabelle { display: none; }
  .lb-ansicht-auto .lb-kachel-sort { display: flex; }
  .lb-ansicht-auto .lb-kacheln { display: grid; }
  /* am Telefon sind „Automatisch“ und „Kacheln“ dasselbe: nur Tabelle und Kacheln zeigen, „auto“ markiert die Kacheln */
  .ansicht-wahl a.lb-wahl-auto { display: none; }
  .ansicht-wahl a.lb-wahl-auto + a { border-left: 0; }
  .ansicht-wahl a.lb-wahl-wie-auto { background: var(--akzent); color: #fff; }
  .lb-filter form.stamm-filter input[type="search"] { flex: 1 1 100%; }
  .lb-kennzahlen { grid-template-columns: 1fr 1fr; }
  .lb-wert { font-size: 1.05rem; }
}

/* Lagerbestand Werkstoffe (SPEC 22.3): baut auf den lb-Regeln auf; Bild je Werkstoffform, Maß betont,
   Restlänge mit Balken (Anteil an der Einkaufslänge), Zwischenüberschriften je Form und Werkstoff */
.wst-form { width: 2.4rem; height: 1.6rem; object-fit: contain; flex: none; display: inline-block; vertical-align: middle; }
.wst-form-gross { width: 3.6rem; height: 2.6rem; }
.wst-werkstoff { display: flex; align-items: center; gap: 0.6rem; }
table.stamm-tabelle.wst-tabelle td.wst-mass { color: var(--fg); font-weight: 600; width: auto; white-space: nowrap; }
table.stamm-tabelle.wst-tabelle td.zahl { width: auto; white-space: nowrap; color: var(--fg); font-family: inherit; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.wst-rest { display: inline-grid; justify-items: end; gap: 0.15rem; font-variant-numeric: tabular-nums; }
.wst-balken { display: block; width: 4.5rem; height: 3px; background: var(--rand); border-radius: 2px; overflow: hidden; }
.wst-balken > span { display: block; height: 100%; background: var(--akzent); }
.wst-zertifikate { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.wst-zert { font-size: 0.75rem; border: 1px solid var(--rand); border-radius: 4px; padding: 0.05rem 0.4rem; white-space: nowrap; text-decoration: none; color: var(--muted); }
a.wst-zert { color: var(--akzent); }
a.wst-zert:hover { background: #f3f6fa; }
table.uebersicht.wst-tabelle tr.wst-gruppe td { background: #f3f6fa; padding-top: 0.3rem; padding-bottom: 0.3rem; }
tr.wst-gruppe td, li.wst-kachel-gruppe { font-size: 0.85rem; }
tr.wst-gruppe td > *, li.wst-kachel-gruppe > * { vertical-align: middle; }
tr.wst-gruppe small, li.wst-kachel-gruppe small { color: var(--muted); margin-left: 0.3rem; }
tr.wst-gruppe .wst-form, li.wst-kachel-gruppe .wst-form { margin-right: 0.5rem; }
li.wst-kachel-gruppe { grid-column: 1 / -1; margin-top: 0.4rem; padding: 0.2rem 0; border-bottom: 1px solid var(--rand); }
.lb-kachel.wst-kachel { display: flex; gap: 0.6rem; align-items: flex-start; }
.wst-kachel-inhalt { flex: 1; min-width: 0; display: grid; gap: 0.25rem; }
.wst-kachel .wst-mass { font-weight: 600; }
.wst-kachel .wst-art { font-weight: 400; color: var(--muted); margin-left: 0.3rem; }
/* Auswahllisten in der Filterleiste (Baukasten, Filter mit auswahl=True) */
.liste-auswahl { display: inline-flex; align-items: center; gap: 0.5rem; }
.liste-auswahl select { max-width: 16rem; }
@media (max-width: 700px) {
  .liste-auswahl { flex: 1 1 100%; min-width: 0; }
  .liste-auswahl select { flex: 1; max-width: none; min-width: 0; width: 100%; }   /* lange Einträge sprengen sonst die Breite */
}

/* Arbeitssicherheit › Handbücher (SPEC 23.1): Hersteller als Paperless-Tags in ihren Farben (CSS-Variablen aus
   geprüften Hexwerten), Kacheln mit Vorschaubild aus Paperless; baut auf den lb-Regeln des Lagerbestands auf */
.hb-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.hb-tag { display: inline-block; padding: 0.05rem 0.45rem; border-radius: 4px; font-size: 0.75rem; font-weight: 600;
          background: var(--tag-bg, #6b7280); color: var(--tag-fg, #fff); white-space: nowrap;
          box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }   /* helle Tag-Farben (z. B. Weiß) bleiben sichtbar */
.hb-kacheln { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
a.lb-kachel.hb-kachel { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--fg); text-decoration: none; height: 100%; }
a.lb-kachel.hb-kachel:hover { border-color: var(--akzent); }
.hb-vorschau { width: 3.6rem; height: 4.8rem; object-fit: cover; object-position: top; border: 1px solid var(--rand);
               border-radius: 3px; background: #fff; flex: none; }
.hb-kachel-inhalt { display: grid; gap: 0.3rem; min-width: 0; }
.hb-titel { font-weight: 600; color: var(--akzent); }

/* PDF-Viewer (SPEC 14.10): feste Kopfleiste mit Zurück, Titel und Seitenzähler, Zoom, Teilen, Herunterladen;
   darunter die Seiten als Leinwände auf Bildschirmbreite, grauer Grund wie in PDF-Anzeigen üblich */
body.pdfv { background: #525659; margin: 0; padding: 0; }
.pdfv-kopf { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 0.3rem;
             padding: 0.35rem 0.5rem; background: var(--akzent); color: #fff; }
.pdfv-titel { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.pdfv-titel strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.95rem; }
.pdfv-titel small { color: #dbe4f0; font-size: 0.75rem; }
.pdfv-knopf { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2.4rem; height: 2.4rem;
              border: 0; border-radius: 4px; background: transparent; color: #fff; font-size: 1.4rem; cursor: pointer;
              text-decoration: none; }
.pdfv-knopf:hover { background: rgba(255, 255, 255, 0.15); }
.pdfv-seiten { display: grid; justify-items: center; gap: 0.5rem; padding: 0.5rem; margin: 0; max-width: none; overflow-x: auto; }
.pdfv-seite { background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); max-width: none; }
.pdfv-seite canvas { display: block; }
.pdfv-fehler { background: #fff; padding: 1rem; margin: 1rem; }
/* Ganzseitig (Terminal: Zeichnungsvorschau und große Anzeige): Blatt füllt den Bereich, kein Rand, weißer Grund */
body.pdfv-ganz { background: #fff; }
body.pdfv-ganz .pdfv-seiten { padding: 0; gap: 0; }
body.pdfv-ganz .pdfv-seite { box-shadow: none; }
/* Im Web-Terminal (Fingerbedienung): Steuerelemente 50 % größer, Zurück und Herunterladen entfallen (Dialog-× schließt) */
body.pdfv-terminal .pdfv-kopf { padding: 0.5rem 0.75rem; gap: 0.5rem; }
body.pdfv-terminal .pdfv-knopf { width: 3.6rem; height: 3.6rem; font-size: 2.1rem; }
body.pdfv-terminal .pdfv-knopf svg { width: 30px; height: 30px; }
body.pdfv-terminal .pdfv-titel strong { font-size: 1.4rem; }
body.pdfv-terminal .pdfv-titel small { font-size: 1.1rem; }
body.pdfv-terminal #pdfv-zurueck, body.pdfv-terminal a.pdfv-knopf[download], body.pdfv-terminal #pdfv-teilen { display: none; }

/* Sicherheitsdatenblätter (SPEC 23.2): Gültigkeit mit Ampel — abgelaufen rot, läuft in 90 Tagen ab orange */
.sdb-abgelaufen { color: var(--ueberfaellig-fg); font-weight: 600; }
.sdb-bald { color: #b45309; font-weight: 600; }
table.stamm-tabelle tr.sdb-zeile-abgelaufen td.primaer a { color: var(--ueberfaellig-fg); }
.sdb-warnung { border-left: 3px solid var(--ueberfaellig-fg); padding: 0.3rem 0.6rem; background: var(--karte); }

/* Persönliche Dokumente (SPEC 23.6): Zeilen 20 % höher als die kompakte Liste (Dietmar 14.10.2026), 28,6 → 34,4 px */
table.uebersicht.pd-tabelle td { padding-top: 0.48rem; padding-bottom: 0.48rem; }

/* Sektionsköpfe der Zusatzdokumente ESP (SPEC 23.3): graues Band mit Akzentkante, damit die Gruppen klar trennen */
table.uebersicht.hb-tabelle tr.wst-gruppe td { background: #e6ebf1; border-left: 3px solid var(--akzent);
                                               padding-top: 0.45rem; padding-bottom: 0.45rem; font-size: 0.9rem; }
table.uebersicht.hb-tabelle tr.wst-gruppe td strong, .hb-kacheln li.wst-kachel-gruppe strong { font-weight: 600; color: var(--akzent); }
table.uebersicht.hb-tabelle tr.wst-gruppe + tr td { border-top: 0; }
.hb-kacheln li.wst-kachel-gruppe { background: #e6ebf1; border-left: 3px solid var(--akzent); border-bottom: 0;
                                   border-radius: 4px; padding: 0.4rem 0.7rem; margin-top: 0.6rem; }
.hb-kacheln li.wst-kachel-gruppe:first-child { margin-top: 0; }

/* Baustellenausweis (SPEC 23.4): Seiten als Bild in Kartenform, am Telefon bildschirmbreit */
.ausweis-kopf { font-size: 1.05rem; font-weight: 600; margin: 0 0 0.6rem; }
.ausweis-seiten { display: flex; flex-wrap: wrap; gap: 1rem; }
.ausweis-seite { margin: 0; flex: 1 1 22rem; max-width: 34rem; }
.ausweis-seite img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
                     background: #fff; }
.ausweis-seite figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 0.35rem; }
.ausweis-aktionen { margin-top: 1rem; }

/* Einsatzsicherheitspläne (SPEC 23.5): Projektkopf wie die Sektionen der ESP-Zusatzdokumente, Plan halbfett,
   Unterdokumente eingerückt; drei Spalten, die auch am Telefon passen */
.pos-sort { margin-top: 0.2rem; }
.pos-tabelle .pos-projekt { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 0.1rem; }
.pos-tabelle tr.pos-plan td.primaer a { font-weight: 600; }
.pos-tabelle td.pos-unter { padding-left: 1.6rem; }
@media (max-width: 930px) {
  /* Ausnahme von 14.8 (Tabellen am Telefon einzeilig mit Seitwärts-Scrollen): Projektköpfe und Titel umbrechen */
  table.uebersicht.pos-tabelle th, table.uebersicht.pos-tabelle td { white-space: normal; }
  table.uebersicht.pos-tabelle td.datum { white-space: nowrap; }
}
@media (max-width: 700px) { .pos-tabelle td.pos-unter { padding-left: 1rem; } .pos-tabelle th.zahl, .pos-tabelle td.zahl { display: none; } }

/* Vollbild-Seiten (SPEC 24.1, Arbeitskalender): kein Innenabstand, der Rahmen füllt den Inhaltsbereich randlos */
body.seite-vollbild main { padding: 0; }
body.seite-vollbild { padding-bottom: 0; }   /* der Rahmen endet an der festen Fußleiste; sonst entsteht eine Bildlaufleiste */
body.seite-vollbild .vollbild-huelle { width: 100%; height: 70vh; overflow: hidden; }
.kalender-huelle[data-vollbild="nein"] { width: 100%; height: var(--kal-hoehe, 75vh); min-height: 420px; overflow: hidden;
                                        border: 1px solid var(--rand); border-radius: 8px; background: #fff; }
.kalender-huelle .vollbild-rahmen { display: block; width: 100%; height: 100%; border: 0; background: #fff; transform-origin: 0 0; }
.kalender-wahl { display: none; }
@media (max-width: 899px) {       /* Telefon: Umschalter Handy/Desktop über dem Kalender (SPEC 24.1) */
  .kalender-wahl { display: flex; align-items: center; gap: 0 0.6rem; padding: 0.3rem 0.5rem; background: var(--karte);
                   border-bottom: 1px solid var(--rand); font-size: 0.8rem; }
  .kalender-wahl button { padding: 0.25rem 0.7rem; border: 1px solid var(--rand); background: #fff; font: inherit; color: var(--fg); cursor: pointer; }
  .kalender-wahl button:first-child { border-radius: 6px 0 0 6px; }
  .kalender-wahl button + button { border-left: 0; border-radius: 0 6px 6px 0; }
  .kalender-wahl button[aria-pressed="true"] { background: var(--akzent); border-color: var(--akzent); color: #fff; font-weight: 600; }
  .kalender-wahl-hinweis { color: var(--muted); font-size: 0.72rem; line-height: 1.2; }
}
body.seite-vollbild .vollbild-rahmen { display: block; width: 100%; height: 100%; border: 0; background: #fff; transform-origin: 0 0; }
body.seite-vollbild .vollbild-hinweis { padding: 1rem; }

/* Monatsübersicht (SPEC 24.2): Monatswähler, Kennzahlen, Tageszeilen mit Balken und Posten, Wochensummen,
   Kreuztabelle mit feststehender erster Spalte und Kopf; Farbe je Anlage über --mz (mz-f0 … mz-f7) */
.mz-f0 { --mz: #1f5fa8; } .mz-f1 { --mz: #d97706; } .mz-f2 { --mz: #059669; } .mz-f3 { --mz: #7c3aed; }
.mz-f4 { --mz: #dc2626; } .mz-f5 { --mz: #0891b2; } .mz-f6 { --mz: #65a30d; } .mz-f7 { --mz: #db2777; }
.mz-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; margin-bottom: 0.8rem; }
.mz-kopf h1 { margin: 0; }
.mz-monat { display: flex; align-items: center; gap: 0.4rem; flex: 1; min-width: 0; }
.mz-pfeil { display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; border: 1px solid var(--rand);
            border-radius: 6px; background: var(--karte); color: var(--fg); font-size: 1.4rem; text-decoration: none; }
.mz-pfeil:hover { border-color: var(--akzent); color: var(--akzent); }
.mz-wahl { position: relative; display: inline-flex; align-items: center; }
.mz-wahl input[type="month"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }   /* ganzer Titel öffnet die Monatswahl */
.mz-titel { font-size: 1.25rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 6px; min-width: 10rem; text-align: center; }
.mz-wahl:hover .mz-titel { background: var(--karte); box-shadow: inset 0 0 0 1px var(--rand); }
.mz-heute { font-size: 0.85rem; }
.mz-zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
.mz-zahlen > div { background: var(--karte); border: 1px solid var(--rand); border-radius: 8px; padding: 0.55rem 0.9rem; display: grid; }
.mz-wert { font-size: 1.45rem; font-weight: 600; color: var(--akzent); font-variant-numeric: tabular-nums; }
.mz-bez { font-size: 0.8rem; color: var(--muted); }

.mz-tage { list-style: none; margin: 0; padding: 0; background: var(--karte); border: 1px solid var(--rand); border-radius: 8px; overflow: hidden; }
.mz-woche { display: flex; justify-content: space-between; padding: 0.3rem 0.9rem; background: #eef2f7; color: var(--muted);
            font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.mz-woche span:last-child { font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0; }
.mz-tag { display: grid; grid-template-columns: 6.5rem 1fr 4.5rem; align-items: center; gap: 0.2rem 0.9rem;
          padding: 0.45rem 0.9rem; border-top: 1px solid var(--rand); }
.mz-woche + .mz-tag { border-top: 0; }
.mz-datum { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mz-wt { display: inline-block; width: 1.7rem; font-weight: 600; }
.mz-feiertag { display: block; font-size: 0.7rem; color: var(--akzent); font-weight: 600; }
.mz-balken { display: flex; height: 0.7rem; border-radius: 99px; background: #eef2f7; overflow: hidden; }
.mz-balken > span { width: var(--breite); background: var(--mz); }
.mz-balken > span + span { box-shadow: inset 1px 0 0 #fff; }
.mz-balken > .mz-anwesend { background: repeating-linear-gradient(45deg, var(--mz), var(--mz) 4px, #fff 4px, #fff 6px); }
.mz-summe { text-align: right; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.mz-posten { grid-column: 2 / -1; list-style: none; margin: 0.1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.85rem; }
.mz-posten li { display: inline-flex; align-items: baseline; gap: 0.35rem; min-width: 0; }
.mz-posten b { font-variant-numeric: tabular-nums; }
.mz-punkt { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--mz); flex: none; margin-right: 0.35rem; }
.mz-posten .mz-punkt { margin-right: 0; }
.mz-anlage { font-weight: 600; }
.mz-notiz { color: var(--muted); font-style: italic; max-width: 32rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mz-tag.mz-frei { background: #f7f8fa; }
.mz-tag.mz-frei .mz-datum { color: var(--muted); }
.mz-tag.mz-leer { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.mz-tag.mz-leer .mz-balken { visibility: hidden; }
.mz-tag.mz-leer .mz-summe { color: var(--muted); font-weight: 400; }
.mz-heute-zeile { box-shadow: inset 3px 0 0 var(--akzent); background: #f2f7fd !important; }
.mz-abschnitt { margin-top: 1.6rem; }
.mz-posten-tabelle .mz-anteil { width: 30%; }
.mz-anteil-balken { display: inline-block; vertical-align: middle; height: 0.55rem; width: var(--breite); max-width: calc(100% - 3rem);
                    background: var(--mz); border-radius: 99px; margin-right: 0.4rem; }
.mz-posten-tabelle tfoot th { text-align: left; }

.mz-tabelle-huelle { overflow: auto; max-height: calc(100vh - 16rem); border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); }
.mz-tabelle { border-collapse: separate; border-spacing: 0; font-size: 0.85rem; font-variant-numeric: tabular-nums; min-width: 100%; }
.mz-tabelle th, .mz-tabelle td { padding: 0.3rem 0.55rem; border-bottom: 1px solid var(--rand); border-right: 1px solid #eef0f3; white-space: nowrap; }
.mz-tabelle thead th { position: sticky; top: 0; background: #eef2f7; z-index: 2; font-weight: 600; text-align: center; }
.mz-tabelle thead tr:nth-child(2) th { top: 1.9rem; font-weight: 400; color: var(--muted); font-size: 0.78rem; }
.mz-tabelle .mz-anlage-kopf { box-shadow: inset 0 3px 0 var(--mz); }
.mz-tabelle .mz-ecke { position: sticky; left: 0; background: var(--karte); z-index: 1; text-align: left; }
.mz-tabelle thead .mz-ecke { z-index: 3; background: #eef2f7; }
.mz-tabelle tr.mz-frei td, .mz-tabelle tr.mz-frei th { background: #f4f5f7; color: var(--muted); }
.mz-tabelle td.zahl { text-align: right; }
.mz-tabelle .mz-summe-zelle, .mz-tabelle .mz-summe-kopf { font-weight: 700; background: #f6f8fb; }
.mz-tabelle tfoot td, .mz-tabelle tfoot th { position: sticky; bottom: 0; background: #eef2f7; font-weight: 700; border-top: 2px solid var(--rand); }
.mz-hat-notiz { color: var(--akzent); margin-left: 0.15rem; }
.mz-legende { margin-top: 0.4rem; }
@media (max-width: 700px) {
  .mz-kopf { gap: 0.5rem; }
  .mz-kopf h1 { flex: 1 1 100%; }
  .mz-monat { flex: 1 1 auto; }
  .mz-heute { padding: 0.3rem 0.5rem; }
  .mz-posten li { display: block; }                 /* als Fließtext umbrechen statt in Spalten */
  .mz-posten .mz-punkt { margin-right: 0.3rem; vertical-align: 0.05rem; }
  .mz-tag { grid-template-columns: 5.2rem 1fr 3.8rem; padding: 0.45rem 0.6rem; }
  .mz-posten { grid-column: 1 / -1; gap: 0.2rem 0.8rem; }
  .mz-notiz { max-width: 100%; white-space: normal; }
  .mz-titel { min-width: 0; font-size: 1.05rem; white-space: nowrap; }
  .mz-zahlen { grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
  .mz-zahlen > div { padding: 0.4rem 0.5rem; }
  .mz-wert { font-size: 1.05rem; }
  .mz-bez { font-size: 0.68rem; }
  .mz-posten-tabelle .mz-anteil { display: none; }
}

/* Urlaubsanfrage (SPEC 24.3): Karten für Anfrage, eigene Anträge, Entscheidungen; Status als farbige Marke */
.ur-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.ur-karte { background: var(--karte); border: 1px solid var(--rand); border-radius: 8px; padding: 0.9rem 1.1rem; margin-bottom: 1rem; }
.ur-raster .ur-karte { margin-bottom: 0; }
.ur-breit { grid-column: 1 / -1; }
.ur-formular { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 1rem; }
.ur-formular label, .ur-entscheiden label { display: grid; gap: 0.25rem; font-size: 0.85rem; color: var(--muted); }
.ur-formular input, .ur-formular textarea, .ur-entscheiden textarea { font-size: 1rem; }
.ur-tage { grid-column: 1 / -1; margin: 0; font-weight: 600; color: var(--akzent); font-size: 1.05rem; }
.ur-tage-null { color: var(--ueberfaellig-fg); }
.ur-senden { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.ur-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.ur-antrag { border-left: 3px solid var(--rand); padding: 0.3rem 0 0.3rem 0.7rem; }
.ur-antrag.ur-genehmigt { border-left-color: var(--erledigt-fg); }
.ur-antrag.ur-offen { border-left-color: var(--akzent); }
.ur-antrag.ur-abgelehnt, .ur-antrag.ur-widerrufen { border-left-color: var(--ueberfaellig-fg); }
.ur-zeile { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.3rem 0.8rem; }
.ur-status { font-size: 0.75rem; font-weight: 700; padding: 0.05rem 0.5rem; border-radius: 99px; background: #eef2f7; color: var(--muted); }
.ur-status-offen { background: #e6effa; color: var(--akzent); }
.ur-status-genehmigt { background: var(--erledigt-bg); color: var(--erledigt-fg); }
.ur-status-abgelehnt, .ur-status-widerrufen { background: #fbe9e9; color: var(--ueberfaellig-fg); }
.ur-antrag form.inline { margin-top: 0.3rem; }
.ur-kalender-titel { margin: 0.4rem 0 0.5rem; }
/* Kalender in der Urlaubsanfrage (SPEC 24.3/24.5): nur Urlaubs- und Schulungskalender — Legende als feste Zeichen (nicht
   abschaltbar), im Jahr der erste angeklickte Tag mit Akzentrahmen bis zum zweiten Klick */
.ur-kal-leiste { margin-top: 0; }
.ur-kal-legende { display: inline-flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; font-size: 0.9rem; }
.ur-kal-legende span { display: inline-flex; align-items: center; gap: 0.4rem; }
.ur-kal-legende i { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--uk); flex: none; }
.ur-kal-hinweis { margin: 0 0 0.5rem; }
.kal-jahr-tag.ur-erster { box-shadow: inset 0 0 0 2px var(--akzent); }
.ur-fakten { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.6rem 1.2rem; margin: 0; }
.ur-fakten dt { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.ur-fakten dd { margin: 0.1rem 0 0; font-size: 1.05rem; }
.ur-entscheiden { display: grid; gap: 0.7rem; max-width: 40rem; }
.ur-knoepfe { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.ur-knoepfe button { min-width: 9rem; padding: 0.6rem 1rem; font-size: 1rem; }
@media (max-width: 700px) {
  .ur-raster { grid-template-columns: 1fr; }
  .ur-formular { grid-template-columns: 1fr; }
  .ur-knoepfe button { flex: 1; }
}
.ur-karte h2.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
                       margin: 0 0 0.7rem; }
.ur-karte textarea { font: inherit; }
.ur-antrag a { color: var(--akzent); text-decoration: none; }
.ur-antrag a:hover { text-decoration: underline; }
.ur-kalender-titel { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
/* Urlaubsverwaltung (SPEC 24.3): offene Anfragen als Liste mit Entscheidung, entschiedene als Tabelle */
.uv-liste { gap: 1rem; }
.uv-antrag { padding: 0.5rem 0 0.6rem 0.9rem; display: grid; gap: 0.45rem; }
.uv-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; }
.uv-zeitraum { font-size: 1.05rem; }
.uv-text { margin: 0; font-size: 0.9rem; }
.uv-ueber { list-style: none; margin: 0.3rem 0 0; padding: 0; display: grid; gap: 0.3rem; }
.uv-entscheiden { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem 0.8rem; }
.uv-entscheiden label { display: grid; gap: 0.25rem; font-size: 0.85rem; color: var(--muted); flex: 1 1 18rem; max-width: 30rem; }
.uv-entscheiden input[type=text] { font-size: 1rem; }
.uv-details { font-size: 0.85rem; justify-self: start; }
.uv-markiert { background: var(--fehler-bg); }
.uv-nowrap { white-space: nowrap; }
.uv-widerruf summary { cursor: pointer; color: var(--ueberfaellig-fg); font-size: 0.85rem; white-space: nowrap; }
.uv-widerruf .uv-entscheiden { margin-top: 0.4rem; min-width: 16rem; }
.uv-nur-handy { display: none; }
/* Handy: entschiedene Anträge als Blöcke statt Tabelle — Person und Status oben, darunter Zeitraum mit Arbeitstagen,
   wer wann entschieden hat und „Widerrufen …“; nichts muss seitlich gerollt werden */
@media (max-width: 700px) {
  .uv-tabelle thead { display: none; }
  table.uv-tabelle, .uv-tabelle tbody { display: block; width: 100%; }
  .uv-tabelle tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.6rem; padding: 0.55rem 0;
                   border-bottom: 1px solid var(--rand); }
  table.uebersicht.uv-tabelle td { display: block; padding: 0; border: 0; white-space: normal; }
  .uv-tabelle td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .uv-tabelle td:nth-child(4) { grid-column: 2; grid-row: 1; align-self: center; }
  .uv-tabelle td:nth-child(2), .uv-tabelle td:nth-child(5), .uv-tabelle td:nth-child(6) { grid-column: 1 / -1; }
  table.uebersicht.uv-tabelle td:nth-child(3) { display: none; }
  .uv-tabelle td:nth-child(5) { font-size: 0.9rem; }
  table.uebersicht.uv-tabelle td:empty { display: none; }
  .uv-nur-handy { display: inline; }
  .uv-widerruf .uv-entscheiden { min-width: 0; }
}

/* ---- Tätigkeit eintragen (SPEC 24.4): Dev-Hinweis, Datumsleiste, geführte Eingabe, Tagesliste je Person ---- */
.tz-dev {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.7rem; margin: 0 0 0.9rem; padding: 0.55rem 0.9rem;
  border: 1px solid #e0b252; border-left: 5px solid #b06000; border-radius: 6px; color: #5a3a00; font-size: 0.88rem;
  background: repeating-linear-gradient(135deg, #fff6dc 0 14px, #fdf0c8 14px 28px);
}
.tz-dev strong { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; }
.tz-dev code { font-weight: 700; background: rgba(255,255,255,.6); padding: 0 0.25rem; border-radius: 3px; }
.tz-titel { margin-bottom: 0.6rem; }
.tz-tage { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.3rem; margin-bottom: 0.9rem; scrollbar-width: thin; }
.tz-tag {
  flex: 1 0 4.6rem; display: grid; justify-items: center; gap: 0.05rem; padding: 0.4rem 0.3rem; border: 1px solid var(--rand);
  border-radius: 8px; background: var(--karte); color: var(--fg); text-decoration: none; line-height: 1.2;
}
.tz-tag:hover { border-color: var(--akzent); }
.tz-tag-name { font-size: 0.78rem; font-weight: 700; }
.tz-tag-datum { font-size: 0.78rem; color: var(--muted); }
.tz-tag-summe { font-size: 0.82rem; color: var(--muted); }
.tz-tag-summe.tz-tag-voll { color: var(--erledigt-fg); font-weight: 700; }
.tz-tag-frei { background: #f3f3f3; }
.tz-tag.aktiv { border-color: var(--akzent); background: var(--akzent); }
.tz-tag.aktiv span { color: #fff; }
.tz-meldung { margin: 0 0 0.9rem; }
.tz-meldung ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.tz-karte { background: var(--karte); border: 1px solid var(--rand); border-radius: 10px; padding: 0.9rem 1.1rem 1rem; margin-bottom: 1.4rem; }
.tz-kopf { font-size: 1rem; font-weight: 500; margin: 0 0 0.7rem; color: var(--muted); }
.tz-kopf strong { color: var(--fg); }
.tz-pfad { list-style: none; margin: 0 0 0.8rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tz-pfad li + li::before { content: "›"; color: var(--muted); margin-right: 0.4rem; }
.tz-pfad li { display: flex; align-items: center; min-width: 0; }
button.tz-pfad-teil {
  display: grid; text-align: left; gap: 0; padding: 0.25rem 0.65rem; border: 1px solid #c9d6e8; border-radius: 8px;
  background: #eef3fa; color: var(--akzent); font: inherit; cursor: pointer; min-width: 0; max-width: 100%;
}
button.tz-pfad-teil small { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
button.tz-pfad-teil span { font-weight: 600; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.tz-pfad-teil:hover { border-color: var(--akzent); }
.tz-frage { display: flex; align-items: center; gap: 0.5rem; font-size: 1.02rem; margin: 0.2rem 0 0.6rem; }
.tz-nr {
  display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; flex: none;
  background: var(--akzent); color: #fff; font-size: 0.8rem; font-weight: 700;
}
.tz-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.5rem; }
.tz-kacheln-breit { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
button.tz-kachel {
  display: grid; align-content: center; gap: 0.15rem; min-height: 3.3rem; padding: 0.6rem 0.8rem; text-align: left;
  border: 1px solid var(--rand); border-radius: 8px; background: #fff; color: var(--fg); font: inherit; cursor: pointer;
}
button.tz-kachel:hover { border-color: var(--akzent); background: #f5f8fc; }
button.tz-kachel.aktiv { border-color: var(--akzent); box-shadow: inset 0 0 0 1px var(--akzent); background: #eef3fa; }
.tz-kachel-titel { font-weight: 600; line-height: 1.25; }
button.tz-kachel small { color: var(--muted); font-size: 0.8rem; }
button.tz-kachel.tz-sonder { border-style: dashed; background: #fafafa; }
.tz-regie { margin: 0 0 0.8rem; padding: 0.5rem 0.7rem; border-radius: 8px; background: #f6f6f6; }
.tz-regie input:checked + .schalter-knopf { background: #b06000; }
.tz-details { display: grid; gap: 1.1rem; }
.tz-block { min-width: 0; }
.tz-rechts { display: grid; gap: 1.1rem; align-content: start; min-width: 0; }
@media (min-width: 1000px) {                       /* Wer links, Menge und Beschreibung rechts */
  .tz-details { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 2rem; align-items: start; }
  .tz-details > .tz-senden { grid-column: 1 / -1; }
}
.tz-wer { display: inline-flex; border: 1px solid var(--rand); border-radius: 8px; overflow: hidden; margin-bottom: 0.6rem; }
.tz-wer label { position: relative; padding: 0.45rem 0.9rem; cursor: pointer; font-size: 0.92rem; }
.tz-wer label + label { border-left: 1px solid var(--rand); }
.tz-wer input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tz-wer label:has(input:checked) { background: var(--akzent); color: #fff; font-weight: 600; }
.tz-wer label:has(input:focus-visible) { outline: 2px solid var(--akzent); outline-offset: -3px; }
.tz-gewaehlt { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; min-height: 1.9rem; align-items: center; }
button.tz-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.55rem 0.2rem 0.25rem; border-radius: 999px;
  border: 1px solid var(--akzent); background: #eef3fa; color: var(--akzent); font: inherit; font-size: 0.88rem; cursor: pointer;
}
button.tz-chip .person-avatar { width: 1.35rem; height: 1.35rem; line-height: 1.35rem; font-size: 0.55rem; }
.tz-chip-x { font-size: 1.05rem; line-height: 1; opacity: 0.7; }
button.tz-chip:hover .tz-chip-x { opacity: 1; }
.tz-suche { width: 100%; max-width: 26rem; font-size: 1rem; padding: 0.45rem 0.6rem; margin-bottom: 0.4rem; box-sizing: border-box; }
.tz-auswahl { max-height: 19rem; overflow-y: auto; border: 1px solid var(--rand); border-radius: 8px; padding: 0.2rem 0.5rem 0.4rem; max-width: 40rem; }
.tz-gruppe-auswahl { border: 0; margin: 0; padding: 0; }
.tz-gruppe-auswahl legend {
  padding: 0.55rem 0 0.2rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.tz-zeile { display: flex; align-items: center; gap: 0.55rem; padding: 0.35rem 0.3rem; border-radius: 6px; cursor: pointer; }
.tz-zeile:hover { background: #f3f6fa; }
.tz-zeile input { width: 1.15rem; height: 1.15rem; margin: 0; flex: none; accent-color: var(--akzent); }
.tz-zeile:has(input:checked) { background: #eef3fa; }
.tz-zeile-name { flex: 1; min-width: 0; }
.tz-zeile[hidden], .tz-gruppe-auswahl[hidden] { display: none; }
.tz-einheit-marke { font-size: 0.72rem; color: var(--muted); border: 1px solid var(--rand); border-radius: 99px; padding: 0 0.45rem; }
.tz-menge { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
button.tz-stufe {
  width: 2.8rem; height: 2.8rem; border-radius: 50%; border: 1px solid var(--rand); background: #fff; font-size: 1.4rem;
  line-height: 1; cursor: pointer; color: var(--akzent); flex: none;
}
button.tz-stufe:hover { border-color: var(--akzent); }
.tz-menge input { width: 5.5rem; font-size: 1.6rem; font-weight: 700; text-align: center; padding: 0.3rem; }
.tz-einheit { font-size: 1.1rem; color: var(--muted); min-width: 1.6rem; }
.tz-block textarea { width: 100%; max-width: 40rem; box-sizing: border-box; font: inherit; font-size: 1rem; padding: 0.5rem 0.6rem; }
.tz-block[hidden] { display: none; }
.tz-senden {
  display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 0.5rem 1rem;
  border-top: 1px solid var(--rand); padding-top: 0.8rem;
}
.tz-senden button.primaer { min-width: 10rem; padding: 0.65rem 1.4rem; font-size: 1.05rem; }
.tz-senden button.primaer:disabled { opacity: 0.45; cursor: not-allowed; }
.tz-zusammenfassung { font-weight: 600; color: var(--akzent); }
.tz-zusammenfassung.tz-fehlt { font-weight: 400; color: var(--muted); }
.tz-tagesliste h2 { font-size: 1.1rem; margin: 0 0 0.6rem; }
.tz-abwesend { margin: 0 0 0.7rem; padding: 0.45rem 0.7rem; border-radius: 6px; background: #f6f0e6; font-size: 0.9rem; }
.tz-gruppe { background: var(--karte); border: 1px solid var(--rand); border-radius: 8px; margin-bottom: 0.5rem; }
.tz-gruppe.tz-ich { border-left: 4px solid var(--akzent); }
.tz-gruppe > summary {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.8rem; cursor: pointer; list-style: none;
}
.tz-gruppe > summary::-webkit-details-marker { display: none; }
.tz-gruppe > summary .person-avatar { width: 2rem; height: 2rem; line-height: 2rem; font-size: 0.7rem; }
.tz-maschine-icon { display: inline-grid; place-items: center; }
.tz-maschine-icon svg { width: 1.1rem; height: 1.1rem; }
.tz-g-name { flex: 1; font-weight: 600; min-width: 0; }
.tz-g-name small { font-weight: 400; color: var(--muted); }
.tz-g-summe { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tz-g-summe.tz-viel { color: var(--fehler-fg); background: var(--fehler-bg); padding: 0 0.45rem; border-radius: 99px; }
.tz-buchungen { list-style: none; margin: 0; padding: 0 0.8rem 0.5rem; }
.tz-buchung { display: flex; gap: 0.8rem; padding: 0.55rem 0; border-top: 1px solid #eee; }
.tz-buchung .tz-b-inhalt { flex: 1; }
.tz-b-menge { flex: none; width: 3.6rem; text-align: right; font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tz-b-menge small { font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.tz-b-text { flex: 1; min-width: 0; }
.tz-b-projekt { font-size: 0.85rem; color: var(--muted); }
.tz-b-notiz { margin: 0.25rem 0 0.1rem; font-size: 0.9rem; white-space: pre-line; overflow-wrap: anywhere; }
.tz-art { font-size: 0.72rem; font-weight: 700; padding: 0 0.45rem; border-radius: 99px; vertical-align: 1px; background: #eee; }
.tz-art-R { background: #fdebd3; color: #8a4a00; }
/* Wischen am Telefon (SPEC 24.4, 09.10.2026) per CSS Scroll-Snap: die Zeile ist ein waagrechter Streifen mit den Rastpunkten
   Bearbeiten (blau, links) · Inhalt · Löschen (rot, rechts); der Browser führt die Geste selbst. Innenabstand liegt im
   beweglichen Inhalt, damit die Farbflächen genau die Zeilenhöhe haben. Am Desktop (feiner Zeiger) nicht scrollbar. */
.tz-wischbar { display: flex; gap: 0; padding: 0; overflow-x: hidden; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
               scrollbar-width: none; -ms-overflow-style: none; }
.tz-wischbar::-webkit-scrollbar { display: none; }
@media (pointer: coarse) { .tz-wischbar { overflow-x: auto; } }   /* nur am Finger scrollbar */
@media (pointer: fine), (pointer: none) { .tz-wischbar .tz-wisch { display: none; } }   /* am Desktop gibt es die Wischflächen gar nicht (spezifischer als .tz-wisch unten) */
/* Am Desktop bleibt „Ändern oder löschen“ in der Zeile; am Telefon ersetzt das Wischen es, dazu der Tipp unter der Überschrift (10.10.2026) */
.tz-wisch-tipp { display: none; margin: -0.3rem 0 0.6rem; }
@media (pointer: coarse) { .tz-wischbar .tz-b-aendern { display: none; } .tz-wisch-tipp { display: block; } }
.tz-wischbar .tz-b-inhalt { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.tz-b-inhalt { display: flex; gap: 0.8rem; padding: 0.55rem 0; background: var(--karte); min-width: 0; }
.tz-wisch { flex: 0 0 96px; display: flex; scroll-snap-align: start; }
.tz-wisch-rechts { scroll-snap-align: end; }
.tz-wisch button { flex: 1; margin: 0; border: 0; border-radius: 0; color: #fff; font-weight: 700; font-size: 0.95rem; min-height: 100%; }
.tz-wisch-rechts button { background: var(--ueberfaellig-fg); }
.tz-wisch-links button { background: var(--akzent); }
.tz-b-aendern { margin-top: 0.3rem; }
.tz-b-aendern > summary { font-size: 0.82rem; color: var(--akzent); cursor: pointer; }
.tz-b-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem 0.8rem; margin-top: 0.4rem; }
.tz-b-form label { display: grid; gap: 0.2rem; font-size: 0.8rem; color: var(--muted); }
.tz-b-form input[name="menge"] { width: 5rem; font-size: 1rem; }
.tz-b-notizfeld { flex: 1 1 16rem; }
.tz-b-notizfeld textarea { width: 100%; box-sizing: border-box; font: inherit; }
.tz-b-knoepfe { display: flex; gap: 0.5rem; }
@media (max-width: 700px) {
  .tz-karte { padding: 0.8rem 0.75rem 0.9rem; margin-left: -0.25rem; margin-right: -0.25rem; }
  .tz-kacheln { grid-template-columns: 1fr 1fr; }
  .tz-pfad { flex-direction: column; }
  .tz-pfad li + li::before { content: none; }
  .tz-kacheln-breit { grid-template-columns: 1fr; }
  .tz-tag { flex-basis: 3.9rem; }
  .tz-wer { display: flex; }
  .tz-wer label { flex: 1; text-align: center; }
  .tz-auswahl { max-height: 16rem; }
  .tz-senden { position: sticky; bottom: var(--hm-hoehe, 0px); z-index: 5; background: var(--karte); margin: 0 -0.75rem -0.9rem;
               padding: 0.6rem 0.75rem; border-radius: 0 0 10px 10px; box-shadow: 0 -4px 10px rgba(0,0,0,.06); }
  .tz-senden button.primaer { flex: 1; }
  .tz-zusammenfassung { flex-basis: 100%; text-align: center; }
  .tz-b-menge { width: 3rem; font-size: 1rem; }
}

/* ---- Bereich Sicherheitskoordination (SPEC 23.7, sk-*): eigener schlanker Rahmen ohne Portal-Menü ---- */
body.sk-seite { margin: 0; padding: 0; background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.sk-kopf { display: flex; align-items: center; gap: 0.8rem; padding: 0.55rem 1rem; background: var(--karte); border-bottom: 1px solid var(--rand); }
.sk-marke { display: flex; align-items: center; gap: 0.6rem; color: var(--fg); text-decoration: none; min-width: 0; }
.sk-marke img { flex: none; border-radius: 6px; }
.sk-marke span { display: grid; line-height: 1.2; min-width: 0; }
.sk-marke strong { font-size: 1rem; }
.sk-marke small { color: var(--muted); font-size: 0.75rem; }
.sk-sprache { display: inline-flex; margin: 0 0 0 auto; }   /* Sprachwahl und Kontomenü ganz rechts (Dietmar 20.09.2026) */
.sk-sprache button { padding: 0.3rem 0.6rem; border: 1px solid var(--rand); background: var(--karte); color: var(--muted);
                     font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.sk-sprache button:first-of-type { border-radius: 999px 0 0 999px; }
.sk-sprache button:last-of-type { border-left: 0; border-radius: 0 999px 999px 0; }
.sk-sprache button:hover { color: var(--fg); }
.sk-sprache button.aktiv { background: var(--akzent); border-color: var(--akzent); color: #fff; cursor: default; }
.sk-konto { position: relative; }
.sk-konto > summary { display: flex; align-items: center; gap: 0.45rem; list-style: none; cursor: pointer; padding: 0.35rem 0.5rem;
                      border: 1px solid var(--rand); border-radius: 999px; color: var(--fg); }
.sk-konto > summary::-webkit-details-marker { display: none; }
.sk-konto > summary svg { width: 22px; height: 22px; }
.sk-konto-name { font-size: 0.85rem; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-konto-menue { position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 20; min-width: 15rem; padding: 0.8rem 1rem;
                  background: var(--karte); border: 1px solid var(--rand); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.12); display: grid; gap: 0.6rem; }
.sk-konto-menue p { margin: 0; font-size: 0.9rem; }
.sk-konto-menue a, .sk-konto-menue button { font: inherit; color: var(--akzent); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; text-decoration: underline; }
.sk-reiter { display: flex; gap: 0.3rem; overflow-x: auto; padding: 0 1rem; background: var(--karte); border-bottom: 1px solid var(--rand); scrollbar-width: thin; }
.sk-reiter a { flex: none; padding: 0.65rem 0.8rem; color: var(--muted); text-decoration: none; font-size: 0.9rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.sk-reiter a:hover { color: var(--fg); }
.sk-reiter a[aria-current="page"] { color: var(--akzent); border-bottom-color: var(--akzent); font-weight: 600; }
.sk-inhalt { flex: 1; width: 100%; max-width: 70rem; margin: 0 auto; padding: 1.2rem 1rem 2rem; box-sizing: border-box; }
.sk-fuss { text-align: center; color: var(--muted); font-size: 0.75rem; padding: 0.8rem; }
.sk-titel { margin: 0.2rem 0 0.8rem; }
.sk-titel small { color: var(--muted); font-size: 0.9rem; font-weight: 400; }
.sk-einleitung { max-width: 48rem; color: var(--fg); line-height: 1.5; }
.sk-warnung { padding: 0.5rem 0.8rem; border-radius: 6px; background: var(--fehler-bg); color: var(--fehler-fg); display: inline-block; }
.sk-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.8rem; margin-top: 1.2rem; }
.sk-kachel { display: flex; align-items: center; gap: 0.9rem; padding: 1rem; background: var(--karte); border: 1px solid var(--rand);
             border-radius: 10px; color: var(--fg); text-decoration: none; }
.sk-kachel:hover { border-color: var(--akzent); }
.sk-kachel svg { width: 34px; height: 34px; flex: none; color: var(--akzent); }
.sk-kachel span { display: grid; gap: 0.15rem; }
.sk-kachel small { color: var(--muted); }
.sk-listenkopf { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.2rem; margin-bottom: 1rem; }
.sk-listenkopf .sk-suche { margin-bottom: 0; }
.sk-gruppenwahl { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--muted); }
.sk-gruppenwahl a { padding: 0.3rem 0.7rem; border: 1px solid var(--rand); color: var(--fg); text-decoration: none; background: var(--karte); }
.sk-gruppenwahl a:first-of-type { border-radius: 6px 0 0 6px; }
.sk-gruppenwahl a + a { border-left: 0; border-radius: 0 6px 6px 0; }
.sk-gruppenwahl a.aktiv { background: var(--akzent); border-color: var(--akzent); color: #fff; font-weight: 600; }
.sk-marke { border: 1px solid var(--rand); border-radius: 99px; padding: 0 0.5rem; margin-right: 0.4rem; color: var(--fg); background: #f3f6fa; }
.sk-grundsatz { margin-top: 1.6rem; padding: 0.9rem 1.1rem; border-left: 4px solid var(--akzent); border-radius: 0 8px 8px 0;
                background: var(--karte); border-top: 1px solid var(--rand); border-right: 1px solid var(--rand); border-bottom: 1px solid var(--rand); }
.sk-grundsatz p { margin: 0 0 0.5rem; line-height: 1.5; }
.sk-grundsatz p:last-child { margin-bottom: 0; }
.sk-grundsatz a { color: var(--akzent); white-space: nowrap; }
.sk-suche { width: 100%; max-width: 30rem; box-sizing: border-box; font-size: 1rem; padding: 0.55rem 0.75rem; margin-bottom: 1rem;
            border: 1px solid var(--rand); border-radius: 8px; }
.sk-gruppe { margin-bottom: 1.1rem; }
.sk-gruppe > h2 { margin: 0; padding: 0.5rem 0.8rem; font-size: 0.95rem; background: #e6ebf1; border-left: 3px solid var(--akzent);
                  border-radius: 6px 6px 0 0; color: var(--akzent); }
.sk-gruppe > h2 small { color: var(--muted); font-weight: 400; margin-left: 0.3rem; }
.sk-gruppe > h2 small.sk-projekt-zusatz { display: block; margin: 0.15rem 0 0; font-size: 0.8rem; }
.sk-dokumente { list-style: none; margin: 0; padding: 0; background: var(--karte); border: 1px solid var(--rand); border-top: 0; border-radius: 0 0 8px 8px; }
.sk-ausweise { border-top: 1px solid var(--rand); border-radius: 8px; }
.sk-dokumente li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.2rem 1rem; padding: 0.55rem 0.8rem;
                   border-top: 1px solid #eee; }
.sk-dokumente li:first-child { border-top: 0; }
.sk-dokumente li[hidden], .sk-gruppe[hidden] { display: none; }
.sk-dokumente a { display: flex; align-items: center; gap: 0.55rem; color: var(--fg); text-decoration: none; min-width: 0; flex: 1 1 18rem; }
.sk-dokumente a:hover .sk-dok-titel { text-decoration: underline; color: var(--akzent); }
.sk-dokumente a svg { width: 20px; height: 20px; flex: none; color: var(--akzent); }
.sk-dok-titel { overflow-wrap: anywhere; }
.sk-dok-info { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.sk-plan .sk-dok-titel { font-weight: 600; }
.sk-ausweise li { padding: 0.5rem 0.8rem; }
.sk-ausweise a.sk-ausweis { gap: 1rem; flex: 1 1 auto; }
.sk-ausweis-bild { flex: none; width: 126px; height: auto; aspect-ratio: 85.6 / 54; object-fit: cover; border-radius: 8px;
                   background: #eef1f5; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.sk-ausweis-text { display: grid; gap: 0.2rem; min-width: 0; }
.sk-ausweis-text .sk-dok-titel { font-weight: 600; font-size: 1.02rem; }
.sk-ausweis-text small { color: var(--muted); }
.sk-ausweis-oeffnen { color: var(--akzent) !important; }
/* Vorschau der ersten Seite bei allen Dokumenten (Paperless) im Format des Dokuments; Ausweise quer 126 × 80 */
.sk-dokumente a.sk-mit-vorschau { gap: 1rem; }
.sk-vorschau { flex: none; width: 80px; height: auto; max-height: 113px; object-fit: contain; border-radius: 4px;
               background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); }   /* Seitenformat wie im Dokument: A4 hochkant 80 × 113 */
.sk-dokumente li:has(.sk-vorschau) { padding-top: 0.5rem; padding-bottom: 0.5rem; }
@media (max-width: 600px) { .sk-ausweis-bild { width: 91px; } .sk-vorschau { width: 60px; max-height: 85px; } }
.sk-plan ~ li { padding-left: 1.6rem; }            /* ESP: Unterlagen eingerückt unter dem Plan */
.sk-gueltig.sk-abgelaufen { color: var(--ueberfaellig-fg); font-weight: 600; }
.sk-gueltig.sk-bald { color: var(--fehler-fg); }
.sk-karte { background: var(--karte); border: 1px solid var(--rand); border-radius: 10px; padding: 1.2rem 1.3rem; }
.sk-schmal { max-width: 28rem; margin: 1rem auto; }
.sk-regel { margin: 0.2rem 0 0; padding: 0.45rem 0.7rem; border-radius: 6px; background: #eef3fa; color: var(--akzent); font-size: 0.9rem; }
.sk-anmelde-form { display: grid; gap: 0.8rem; margin-top: 0.6rem; }
.sk-anmelde-form label { display: grid; gap: 0.25rem; font-size: 0.85rem; color: var(--muted); }
.sk-anmelde-form input { font-size: 1rem; padding: 0.55rem 0.7rem; border: 1px solid var(--rand); border-radius: 8px; }
.sk-anmelde-form button.primaer { padding: 0.65rem 1rem; font-size: 1rem; }
body.sk-anmeldung { align-items: center; justify-content: center; padding: 1rem; box-sizing: border-box; }
.sk-anmelde-karte { width: 100%; max-width: 24rem; background: var(--karte); border: 1px solid var(--rand); border-radius: 12px;
                    padding: 1.5rem; text-align: center; box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.sk-anmelde-karte img { border-radius: 10px; }
.sk-anmelde-karte h1 { font-size: 1.2rem; margin: 0.6rem 0 1rem; display: grid; gap: 0.2rem; }
.sk-anmelde-karte h1 small { color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.sk-anmelde-karte .sk-anmelde-form { text-align: left; }
@media (max-width: 600px) {
  /* Am Telefon nur das Logo: Sprachumschalter und Kontomenü behalten Platz */
  .sk-marke span, .sk-konto-name { display: none; }
  .sk-kopf { gap: 0.5rem; padding: 0.5rem 0.6rem; }
  .sk-sprache button { padding: 0.3rem 0.5rem; }
  .sk-inhalt { padding: 0.9rem 0.7rem 1.5rem; }
  .sk-dok-info { white-space: normal; }
}

/* ---------------------------------------------------------------- Web-Terminal (SPEC 26.4, 14.4 „Terminal“)
   Stempelseite des Kiosks, nur für den Finger: Schrift 22 px, Zeilen 4,4 rem, Knöpfe ab 3,4 rem, Reiter mit
   Ausweisbild, gewählte Zeile mit Aktionsleiste unten, Bildschirmtastatur in der Seite. Klassen tm-*. */
body.tm-seite { margin: 0; padding: 0; box-sizing: border-box; background: #fff; color: var(--fg); font-size: 22px; height: 100vh; overflow: hidden; display: flex; flex-direction: column; -webkit-tap-highlight-color: transparent; user-select: none; }
/* Fenstermodus (Admin › Terminals „Fenster“, Dietmar 27.09.2026: „zu grobschlächtig“): alles in rem, also nur die
   Grundschrift nach Fenstergröße verkleinern (10–13 px statt 16 px, der Text 22 px mit). Vollbild-Terminals tragen
   data-vollbild="1" und bleiben unberührt, ebenso Browser ohne Terminal (Vorgabe Vollbild). */
html:has(> body.tm-seite[data-vollbild="0"]) { font-size: clamp(10px, min(0.9vw, 1.3vh), 13px); }
body.tm-seite[data-vollbild="0"] { font-size: 1.375rem; }
body.tm-seite input, body.tm-seite textarea { user-select: text; }
body.tm-seite button { font-family: inherit; cursor: pointer; touch-action: manipulation; }
body.tm-seite [data-zeile] { touch-action: manipulation; }   /* Doppeltipp ohne Zoom-Verzögerung (Tätigkeit/Maschine erneut) */
/* Kopf wie der Kiosk: hellgrauer Streifen, Uhr links schwarz auf Grau (Rot hieß im Kiosk „Zeit stimmt nicht“), Symbolknöpfe ohne Text (Kiosk 64 px) */
.tm-kopf { background: #efefef; color: var(--fg); height: 5.75rem; padding: 0 0.6rem 0 0; display: flex; align-items: center; gap: 0.8rem; border-bottom: 1px solid #c8c8c8; }
.tm-uhr { background: transparent; color: var(--fg); font-size: 3.9rem; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; height: 5.1rem; width: 4.5em; flex: none; box-sizing: content-box; padding: 0 0.3rem 0 0.7rem; display: inline-flex; align-items: center; margin-right: 0.4rem; overflow: hidden; white-space: nowrap; position: relative; top: 0.1rem; }   /* Ziffernhöhe = sichtbare Symbolhöhe (Segoe UI: Ziffern 0,72 em); feste Breite, damit die Symbole daneben nicht springen */
.tm-kopf-knoepfe { display: flex; align-items: center; gap: 0.3rem; }
.tm-sym-knopf { width: 4.46rem; height: 5.1rem; padding: 0; background: transparent; border: none; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--fg); }
.tm-sym-knopf:active { background: #d6dee8; }
.tm-sym-knopf .tm-sym { width: 3.7rem; height: 3.7rem; vertical-align: middle; margin: 0; }
.tm-sym-knopf svg.tm-ikon { width: 3.7rem; height: 3.7rem; }   /* eigene Kopf-Symbole in Symbolgröße */
.tm-kopf .tm-sym-knopf svg.tm-kachel { width: 3.4rem; height: 3.4rem; position: relative; top: 0.28rem; }   /* Kachel so hoch wie die Ziffern der Uhr, auf gleicher Höhe — nachgemessen am TERMINAL06 mit Segoe UI (Bildschirmfoto icongroesse.png 26.09.2026: Ziffern 48 px, Kachel 43 px, 4–5 px zu hoch) */
/* Symbolfamilie „Phosphor auf Farbkachel“ (SPEC 14.4): Farbe = Bedeutung, dunkler Rand unten + leichter Schatten */
.tm-kachel { --k: #1f4a8a; overflow: visible; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.28)); }
.tm-kachel-gruen { --k: #2e8b3a; } .tm-kachel-rot { --k: #c0392b; } .tm-kachel-gelb { --k: #c98a0b; } .tm-kachel-grau { --k: #4a5562; }
.tm-kachel-flaeche { fill: var(--k); }
.tm-kachel-rand { fill: color-mix(in srgb, var(--k) 68%, #000); }
button:disabled .tm-kachel, .tm-kachel[aria-disabled="true"] { filter: grayscale(1) opacity(.45); }
.tm-sym-knopf:disabled { cursor: default; }
.tm-sym-knopf:disabled:active { background: transparent; }
.tm-kopf-marke { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; color: var(--fg); }
.tm-kopf-marke img { border-radius: 3px; }
.tm-kopf-marke { min-width: 0; flex: 0 1 auto; overflow: hidden; }          /* bei Platzmangel kürzt sich der Terminalname */
.tm-kopf-marke .tm-wo { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-kopf-marke > img, .tm-kopf-marke .instanz-tag { flex: none; }
@media (max-width: 1500px) { .tm-kopf .tm-sym-knopf { width: 3.9rem; } .tm-kopf { gap: 0.5rem; } }   /* 1280er-Bildschirm: 10 Kopfsymbole + Uhr */
.tm-wo { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
/* Kopf auch auf test grau wie das Original (Dietmar 25.09.2026); Test erkennt man am Kennzeichen TESTVERSION rechts */
/* Kopf und Reiter stehen, nur der Inhalt darunter rollt (Dietmar 25.09.2026: „Die vertikale Bildlaufleiste darf den Header
   und die Tab-Leiste nicht mitziehen“). Wartseite und Fehlerfälle ohne .tm-stand rollen im #stand selbst. */
.tm-kopf { flex: none; }
.tm-inhalt { flex: 1; min-height: 0; overflow-y: auto; padding: 0 1.25rem; width: 100%; max-width: none; margin: 0; box-sizing: border-box; }
.tm-inhalt:has(> .tm-stand) { overflow: hidden; display: flex; flex-direction: column; }
.tm-stand { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tm-stand > .tm-reiter, .tm-stand > .tm-fehler { flex: none; }
.tm-rollbereich { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -1.25rem; padding: 0 1.25rem 6rem; overscroll-behavior: contain; }   /* unten nur so viel Luft, wie die Aktionsleiste braucht */
/* Laufleisten für den Finger: 48 px statt ~16 px (Dietmar 25.09.2026: „Dreifache Breite mindestens“), gilt für alle
   rollenden Flächen des Terminals (Inhalt, Dialoge, Auswahllisten). WebView2 = Chromium, daher ::-webkit-scrollbar;
   scrollbar-width darf dort nicht gesetzt sein, sonst gewinnt die schmale Standardleiste. */
body.tm-seite ::-webkit-scrollbar { width: 48px; height: 48px; }
body.tm-seite ::-webkit-scrollbar-track { background: #ececec; border-left: 1px solid #d4d4d4; }
body.tm-seite ::-webkit-scrollbar-thumb { background: #9a9a9a; border: 6px solid #ececec; border-radius: 3px; min-height: 96px; }
body.tm-seite ::-webkit-scrollbar-thumb:active { background: #6a6a6a; }
body.tm-seite ::-webkit-scrollbar-button { display: none; }
body.tm-seite .tm-reiter::-webkit-scrollbar { display: none; }
/* Fenstermodus: Arbeit mit der Maus, schmale Leiste (Dietmar 27.09.2026) */
body.tm-seite[data-vollbild="0"] ::-webkit-scrollbar { width: 14px; height: 14px; }
body.tm-seite[data-vollbild="0"] ::-webkit-scrollbar-thumb { border-width: 3px; min-height: 40px; }
/* START: Satz und Logo senkrecht in der Mitte der freien Fläche (Dietmar 25.09.2026) */
.tm-rollbereich[data-rollen="start"] { display: flex; flex-direction: column; justify-content: center; padding-bottom: 20vh; }   /* etwas über der Mitte */
.tm-rollbereich[data-rollen="start"] .tm-start { padding: 1rem 0; }
.tm-fehler { background: var(--ueberfaellig-bg); color: var(--ueberfaellig-fg); padding: 0.75rem 1rem; border-radius: 4px; margin: 1rem 0; }
.tm-leer { color: var(--muted); }
.tm-hinweis { position: fixed; left: 50%; bottom: 2.5rem; transform: translateX(-50%); background: #1a1a1a; color: #fff; padding: 1rem 1.6rem; border-radius: 6px; font-size: 1.2rem; max-width: 90vw; z-index: 60; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35); }

/* Reiter: START + je Person mit Ausweisbild — das Wiedererkennungsmerkmal der Seite */
/* Reiter wie der Kiosk (TabControl 36 px): START und die Kürzel der Anwesenden, aktiver Reiter weiß und mit dem Inhalt verbunden */
.tm-reiter { display: flex; gap: 0.25rem; align-items: flex-end; box-shadow: inset 0 -1px 0 #b8b8b8; margin: 0 -1.25rem 0.8rem; padding: 0.5rem 0.6rem 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; background: #fff; }
.tm-reiter::-webkit-scrollbar { display: none; }   /* keine Laufleiste; Grundlinie als Schatten, damit nichts nach unten übersteht */
.tm-reiter-knopf { height: 4.9rem; padding: 0 1.4rem; font-size: 2.2rem; font-weight: 400; background: #ececec; color: var(--fg); border: 1px solid #b8b8b8; border-radius: 0; white-space: nowrap; margin: 0; flex: none; }
.tm-reiter-knopf.tm-reiter-start { letter-spacing: 0.04em; }
.tm-reiter-knopf { display: inline-flex; align-items: center; gap: 0.7rem; }
.tm-reiter-knopf img, .tm-reiter-initialen { width: 3.8rem; height: 3.8rem; border-radius: 50%; object-fit: cover; object-position: center 20%; border: 1px solid #8a8a8a; box-sizing: border-box; flex: none; }
.tm-reiter-initialen { display: inline-flex; align-items: center; justify-content: center; background: var(--akzent); color: #fff; font-size: 1.1rem; }
.tm-reiter-knopf.aktiv { background: #fff; border-color: #8a8a8a; border-bottom-color: #fff; }
@media (max-width: 1500px) {   /* 1280er-Bildschirm (Dietmar 27.09.2026): Reiter schmäler, Name und Avatar höchstens 20 % kleiner */
  .tm-reiter-knopf { height: 4.2rem; padding: 0 1.1rem; font-size: 1.8rem; gap: 0.55rem; }
  .tm-reiter-knopf img, .tm-reiter-initialen { width: 3.1rem; height: 3.1rem; }
  .tm-reiter-initialen { font-size: 0.95rem; }
}

/* Start: Satz und Personenkacheln wie die Benutzerwahl des Kiosks (Bild 210 × 270) */
.tm-start { text-align: center; padding: 2.5rem 0 1rem; }
.tm-start-satz { font-size: 3.1rem; font-weight: 600; margin: 0 0 2rem; }
.tm-start-personen { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; }   /* Benutzerwahl im Dialog */
.tm-person { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; width: 13.5rem; padding: 0.9rem; background: var(--karte); border: 1px solid var(--rand); border-radius: 8px; font: inherit; color: inherit; }
.tm-person:active { border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent); }
.tm-person img, .tm-person .tm-person-initialen { width: 6.7rem; height: 6.7rem; border-radius: 50% !important; }   /* 30 % kleiner, rund als Avatar (Dietmar 25.09.2026, „testweise“) */
.tm-start-personen .tm-person { width: 10.5rem; padding: 0.8rem 0.5rem; }
.tm-person img { object-position: center 20%; }
.tm-person span:last-child { font-size: 1.1rem; font-weight: 600; text-align: center; }
.tm-person-initialen { display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; background: var(--akzent); color: #fff; font-size: 2.4rem; font-weight: 700; }
.tm-person img { object-fit: cover; object-position: top; border-radius: 4px; background: var(--offen); }

/* Personenkopf: Bild, Anwesenheit des Tages, Hauptaktionen */
/* Personenansicht wie der Kiosk: Anwesenheiten als Tabelle (Art, Eintritt, Austritt) untereinander, Ausweisbild rechts 140 px
   mit schwarzem Rand, darunter der 7-px-Trennbalken, dann die Tätigkeiten (Dietmar 25.09.2026: „die anzeige der ein- und
   austritte. die müssen untereinander angezeigt werden“). */
.tm-oben { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem; align-items: start; }
.tm-anwesenheiten td:first-child { width: 100%; }
.tm-anwesenheiten th.r, .tm-anwesenheiten td.r { min-width: 5.5ch; }
.tm-anwesenheiten tr.offen td.r:last-child { color: var(--erledigt-fg); }
.tm-bild { margin: 0; width: 6.4rem; text-align: center; }
.tm-bild img, .tm-bild .tm-person-initialen { width: 6.4rem; height: 8.2rem; object-fit: cover; object-position: top; border: 1px solid #000; box-sizing: border-box; border-radius: 0; font-size: 1.8rem; }
.tm-bild figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; line-height: 1.2; }
.tm-trenner { height: 7px; background: #000; margin: 0.6rem 0 0.8rem; }


/* Tätigkeiten: Zeilen 4,4 rem, gewählte Zeile mit Akzentkante, Maschinen als Unterzeilen */
.tm-tabelle { width: 100%; border-collapse: collapse; background: var(--karte); border: 1px solid #b8b8b8; }
.tm-tabelle th { text-align: left; font-size: 1.3rem; font-weight: 400; color: var(--fg); background: #f3f3f3; padding: 0.35rem 0.6rem; border: 1px solid #d4d4d4; }
.tm-tabelle td { padding: 0.4rem 0.6rem; border: 1px solid #d4d4d4; vertical-align: middle; }
.tm-tabelle .r { text-align: right; }
.tm-tabelle .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm-tabelle small { color: var(--muted); font-size: 0.85rem; display: block; }
.tm-taet { height: 4.4rem; cursor: pointer; }
.tm-taet td:first-child { box-shadow: inset 0.4rem 0 0 transparent; }
.tm-taet.offen td { background: var(--erledigt-bg); }
.tm-taet.offen td:first-child { box-shadow: inset 0.4rem 0 0 var(--erledigt-fg); }
.tm-taet.gewaehlt td { background: #e0eaf5; }
.tm-taet.gewaehlt td:first-child { box-shadow: inset 0.4rem 0 0 var(--akzent); }
.tm-taet.zu { color: #555; }
.tm-masch { height: 3.4rem; }
.tm-masch td { padding-top: 0.25rem; padding-bottom: 0.25rem; font-size: 1rem; background: #f3f6fa; }
.tm-masch.offen td { background: #e6f2e6; }
.tm-masch-name { padding-left: 2.6rem !important; }
.tm-masch-name::before { content: "└"; color: var(--muted); margin-right: 0.5rem; }
.tm-notiz { display: inline-block; color: var(--fg); background: #fbf1cc; padding: 0.05rem 0.4rem; border-radius: 3px; font-size: 0.9rem; margin-top: 0.15rem; }
.tm-knopfzelle { width: 3.2rem; text-align: center; padding-left: 0.2rem !important; padding-right: 0.2rem !important; }
.tm-rund { width: 3.4rem; height: 3.4rem; border-radius: 8px; border: none; background: transparent; color: var(--fg); display: inline-flex; align-items: center; justify-content: center; }
.tm-rund:active { background: #d6dee8; }
.tm-rund svg { width: 1.6rem; height: 1.6rem; }
.tm-zeile-aktionen { display: none; }

/* Aktionsleiste unten für die gewählte Zeile (Muster: Auswahlleiste der Werkstattseite) */
.tm-leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--fg); color: #fff; padding: 0.8rem 1.25rem; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.25); transform: translateY(110%); transition: transform 0.15s ease-out; }
.tm-leiste.offen { transform: none; }
.tm-leiste:not(.offen) { box-shadow: none; visibility: hidden; transition: transform 0.15s ease-out, visibility 0s 0.15s; }
.tm-leiste-titel { font-weight: 600; margin-right: auto; font-size: 1.05rem; opacity: 0.9; }
.tm-leiste button { min-height: 3.4rem; padding: 0 1.2rem; font-size: 1.05rem; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.12); color: #fff; display: inline-flex; align-items: center; gap: 0.5rem; }
.tm-leiste button svg { width: 1.3rem; height: 1.3rem; }
.tm-leiste button svg.tm-ikon, .tm-leiste button .tm-sym { width: 2rem; height: 2rem; flex: none; }   /* alle Kachelsymbole gleich groß */
.tm-leiste button:not(.tm-schliessen) { min-width: 15.5rem; min-height: 3.6rem; justify-content: flex-start; }   /* Knöpfe gleich breit (Dietmar 27.09.2026) */
.tm-leiste button.tm-gefahr { background: var(--ueberfaellig-fg); border-color: var(--ueberfaellig-fg); }
.tm-leiste button.tm-schliessen { background: transparent; border-color: transparent; font-size: 1.6rem; padding: 0 0.6rem; }
@media (prefers-reduced-motion: reduce) { .tm-leiste { transition: none; } }

/* Dialoge: Karte fast bildschirmfüllend, X oben rechts, Knöpfe 3,6 rem */
.tm-dialog-hintergrund { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 50; }
.tm-dialog { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(50rem, 96vw); max-height: 92vh; overflow: auto; background: var(--karte); border-top: 6px solid var(--akzent); border-radius: 8px; box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4); padding: 1.25rem 1.5rem 1.5rem; z-index: 51; }
.tm-dialog-schmal { width: min(32rem, 96vw); }
.tm-dialog-breit { width: min(70rem, 97vw); }
.tm-dialog-warnung { border-top-color: var(--ueberfaellig-fg); }
.tm-dialog h2 { margin: 0 3rem 0.9rem 0; font-size: 1.4rem; }
.tm-dialog h2 .tm-sym { width: 2.2rem; height: 2.2rem; vertical-align: -0.5rem; margin-right: 0.3rem; }
.tm-dialog h2 small { color: var(--muted); font-weight: 400; font-size: 0.95rem; }
.tm-dialog-x { position: absolute; top: 0.6rem; right: 0.6rem; width: 3.2rem; height: 3.2rem; border-radius: 50%; border: 1px solid var(--rand); background: #fff; font-size: 1.5rem; line-height: 1; }
.tm-dialog-text { font-size: 1.2rem; margin: 0 0 1rem; }
.tm-dialog-gross { font-size: 2.2rem; font-weight: 700; margin: 0 0 0.5rem; }
.tm-dialog-aktionen .tm-zurueck { margin-right: auto; }   /* Regel: „Zurück“ links (nur mit voriger Ansicht), „Schließen“ rechts */
.tm-dialog-aktionen button svg.tm-ikon { width: 2rem; height: 2rem; vertical-align: -0.55rem; margin-right: 0.35rem; }
.tm-system button svg.tm-ikon { width: 3.1rem; height: 3.1rem; flex: none; }
.tm-dialog h2 svg.tm-ikon { width: 2.4rem; height: 2.4rem; vertical-align: -0.6rem; margin-right: 0.35rem; }
.tm-dialog-aktionen { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.1rem; flex-wrap: wrap; }
.tm-dialog-aktionen button, .tm-vortag button { min-height: 3.6rem; padding: 0 1.6rem; font-size: 1.15rem; }
.tm-dialog textarea, .tm-dialog input[type=text], .tm-dialog input[type=time], .tm-dialog input[type=search], .tm-dialog select { width: 100%; box-sizing: border-box; font-size: 1.3rem; padding: 0.6rem 0.7rem; border: 1px solid var(--rand); border-radius: 4px; min-height: 3.2rem; }
.tm-dialog textarea:focus, .tm-dialog input:focus { outline: 3px solid var(--akzent); outline-offset: 0; }
.tm-pin input { width: 100%; box-sizing: border-box; font-size: 2.4rem; letter-spacing: 0.7em; text-align: center; padding: 0.5rem; border: 1px solid var(--rand); border-radius: 4px; margin-bottom: 0.8rem; }
.tm-ziffern { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.tm-ziffern button { min-height: 4.3rem; font-size: 1.8rem; background: #fff; border: 1px solid var(--rand); border-radius: 6px; }
.tm-ziffern button:active { background: #e0eaf5; }
.tm-ziffern button.primaer { background: var(--akzent); color: #fff; border-color: var(--akzent); }
.tm-filter { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 0.8rem; }
.tm-arten { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tm-arten button { min-height: 3rem; padding: 0 1.1rem; border: 1px solid var(--rand); border-radius: 999px; background: #fff; font-size: 1rem; }
.tm-arten button.aktiv { background: var(--akzent); color: #fff; border-color: var(--akzent); }
.tm-liste { display: flex; flex-direction: column; gap: 0.4rem; max-height: 58vh; overflow: auto; }
/* Projektwahl: Umschalter Liste/Kacheln (Dietmar 25.09.2026); Kacheln mit Projektbild (projekt_bilder), sonst Code */
/* Projektwahl groß: 80 % Breite (je 10 % Rand), von 4 % oben bis 10 % über dem unteren Rand; die Liste füllt den Rest */
.tm-dialog.tm-dialog-projekte { top: 4vh; transform: translateX(-50%); width: 80vw; height: 86vh; max-height: none; display: flex; flex-direction: column; box-sizing: border-box; overflow: hidden; }
.tm-dialog-projekte .tm-liste { flex: 1; min-height: 0; max-height: none; }
.tm-ansicht { display: inline-flex; border: 1px solid var(--rand); border-radius: 6px; overflow: hidden; align-self: flex-start; }
.tm-ansicht button { min-height: 3rem; padding: 0 1.3rem; border: none; background: #fff; font-size: 1rem; }
.tm-ansicht button + button { border-left: 1px solid var(--rand); }
.tm-ansicht button.aktiv { background: var(--akzent); color: #fff; }
.tm-kachel-bild { display: none; }
.tm-liste.tm-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); grid-auto-rows: max-content; gap: 0.7rem; align-content: start; }
.tm-liste.tm-kacheln .tm-zeile { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 0.35rem 0.5rem; padding: 0.6rem; min-height: 0; height: auto; }
.tm-liste.tm-kacheln .tm-zeile[hidden] { display: none; }
.tm-liste.tm-kacheln .tm-kachel-bild { display: block; flex: 0 0 100%; height: 10rem; background: #f1f1f1; border-radius: 4px; overflow: hidden; }
.tm-kachel-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-kachel-ohne { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 2.2rem; color: #b0b0b0; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.tm-liste.tm-kacheln .tm-zeile-haupt { flex: 0 0 100%; order: 5; font-size: 1rem; line-height: 1.25; }
.tm-liste.tm-kacheln .tm-zeile-jahr { margin-left: auto; }
.tm-liste.tm-kacheln .tm-zeile-haken { display: none; }
.tm-liste.tm-kacheln .tm-zeile .mono { font-weight: 600; }
.tm-zeile { display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left; padding: 0.7rem 0.9rem; min-height: 4rem; background: #fff; border: 1px solid var(--rand); border-radius: 6px; font: inherit; color: inherit; box-sizing: border-box; }
.tm-zeile:active { background: #e0eaf5; border-color: var(--akzent); }
.tm-zeile.vorgesehen { border-color: var(--erledigt-fg); box-shadow: inset 0.35rem 0 0 var(--erledigt-fg); }
.tm-zeile .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; min-width: 4.5ch; }
.tm-zeile-haupt { flex: 1; }
.tm-zeile small { color: var(--muted); }
.tm-zeile-jahr { color: var(--muted); }
.tm-faellig { display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--ueberfaellig-fg); color: #fff; font-weight: 700; }
.tm-marke { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 3px; font-size: 0.85rem; background: var(--offen); }
.tm-marke.gruen { background: var(--erledigt-bg); color: var(--erledigt-fg); }
.tm-wahl input { width: 1.9rem; height: 1.9rem; }
/* Austritt nachtragen: mittig, Eintritt/Austritt als gleich große Zeitfelder auf einer Höhe, Grund als Knöpfe */
.tm-dialog.tm-dialog-vortag { width: min(46rem, 94vw); border-top-color: var(--ueberfaellig-fg); }
.tm-dialog-vortag h2 svg { width: 1.6rem; height: 1.6rem; vertical-align: -0.3rem; color: var(--ueberfaellig-fg); margin-right: 0.3rem; }
.tm-vortag { border-top: 1px solid var(--rand); padding-top: 1rem; margin-top: 0.4rem; }
.tm-vortag + .tm-vortag { margin-top: 1.4rem; }
.tm-vortag-tag { font-size: 1.35rem; font-weight: 600; margin: 0 0 0.8rem; }
.tm-vortag-zeiten { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.tm-zeitfeld { display: flex; flex-direction: column; gap: 0.35rem; margin: 0; }
.tm-zeitfeld-name { font-size: 1rem; color: var(--muted); }
.tm-dialog .tm-zeitfeld-wert, .tm-zeitfeld-wert { box-sizing: border-box; height: 5rem; width: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem; font-variant-numeric: tabular-nums; border: 1px solid var(--rand); border-radius: 6px; background: #f3f3f3; color: var(--fg); padding: 0 0.6rem; text-align: center; font-family: inherit; }
.tm-dialog .tm-zeitfeld-eingabe input.tm-zeitfeld-wert { background: #fff; border: 2px solid var(--akzent); font-size: 2.6rem; padding: 0 0.6rem; }   /* schlägt .tm-dialog input[type=text] */
.tm-vortag-grund { border: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.tm-vortag-grund legend { font-size: 1rem; color: var(--muted); margin-bottom: 0.4rem; padding: 0; }
.tm-wahl-knopf { position: relative; display: block; margin: 0; }
.tm-wahl-knopf input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tm-wahl-knopf span { display: flex; align-items: center; min-height: 3.8rem; padding: 0 1rem 0 3rem; border: 1px solid var(--rand); border-radius: 6px; background: #fff; font-size: 1.15rem; position: relative; }
.tm-wahl-knopf span::before { content: ""; position: absolute; left: 1rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 2px solid #9a9a9a; box-sizing: border-box; }
.tm-wahl-knopf input:checked + span { border: 2px solid var(--akzent); background: #eef3fa; }
.tm-wahl-knopf input:checked + span::before { border: 0.38rem solid var(--akzent); }
.tm-wahl-knopf input:focus-visible + span { outline: 3px solid var(--akzent); outline-offset: 2px; }
.tm-vortag-frei { grid-column: 1 / -1; }
.tm-vortag-fehler { margin: 0.2rem 0 1rem; padding: 0.7rem 1rem; background: var(--ueberfaellig-bg); color: var(--ueberfaellig-fg); border-radius: 6px; font-size: 1.15rem; font-weight: 600; }
.tm-vortag .tm-dialog-aktionen { margin-top: 1.4rem; }

/* Bildschirmtastatur in der Seite (ersetzt osk.exe): unten angedockt, Tasten 3,4 rem, QWERTZ mit Umlauten */
.tm-tastatur { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: #2b2b2b; padding: 0.6rem 0.8rem 0.9rem; box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4); }
.tm-tastatur[hidden] { display: none; }
.tm-tastatur-reihe { display: flex; justify-content: center; gap: 0.35rem; margin-bottom: 0.35rem; }
.tm-tastatur button { min-width: 3.4rem; height: 3.4rem; padding: 0 0.4rem; font-size: 1.35rem; background: #fff; color: var(--fg); border: none; border-radius: 6px; }
.tm-tastatur button:active { background: #b8c8e0; }
.tm-tastatur button.tm-taste-breit { min-width: 5.4rem; background: #d9d9d9; font-size: 1rem; }
.tm-tastatur button.tm-taste-leer { min-width: 18rem; }
.tm-tastatur button.tm-taste-ok { background: var(--akzent); color: #fff; min-width: 6rem; }
.tm-tastatur button.tm-taste-an { background: #b8c8e0; }
.tm-tastatur.tm-tastatur-zahl .tm-tastatur-reihe { justify-content: center; }
.tm-tastatur.tm-tastatur-zahl button { min-width: 4.6rem; height: 4rem; font-size: 1.7rem; }
.tm-tastatur.tm-tastatur-zahl button.tm-taste-leer { min-width: 9.6rem; font-size: 1.1rem; }   /* Leertaste im Ziffernblock: zwei Tasten breit */
body.tm-tastatur-offen .tm-dialog { max-height: calc(100vh - var(--tastatur-hoehe, 16rem) - 2vh - 1rem); top: 2vh; transform: translateX(-50%); }
body.tm-tastatur-offen .tm-leiste { display: none; }

@media (max-width: 900px) {
  .tm-taetigkeiten .tm-tabelle th:nth-child(1), .tm-taetigkeiten .tm-tabelle td:nth-child(1) { display: none; }
  .tm-kopf-marke { display: none; }
}
.tm-start-logo { display: block; margin: 3rem auto 0; max-width: 66rem; width: 96%; opacity: 0.9; }   /* 50 % größer (Dietmar 25.09.2026), nur auf START */
.tm-zeile-haken { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 6px; background: var(--erledigt-bg); color: var(--erledigt-fg); flex: none; }
.tm-zeile-haken svg, .tm-marke svg { width: 1.3rem; height: 1.3rem; vertical-align: -0.25rem; }
.tm-notiz svg { width: 0.95rem; height: 0.95rem; vertical-align: -0.15rem; }
.tm-dialog-aktionen button svg { width: 1.25rem; height: 1.25rem; vertical-align: -0.25rem; margin-right: 0.3rem; }
.tm-pin input[readonly] { background: #fff; color: var(--fg); }

/* ---------------------------------------------------------------- Stützenbild-Auswertung (Experiment, SPEC 27) */
.sz-form { max-width: 62rem; margin-bottom: 1.5rem; }
.sz-form .sz-knopf { display: flex; align-items: flex-end; }
.sz-satz { font-size: 1.1rem; font-weight: 600; }
.sz-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.sz-bild img { max-width: 100%; max-height: 80vh; border: 1px solid var(--rand); border-radius: 4px; background: var(--karte); }
.sz-tabelle { max-width: 40rem; }
.sz-tabelle .zahl { text-align: right; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
@media (max-width: 930px) { .sz-raster { grid-template-columns: 1fr; } }
/* Werkstoffe (SPEC 26.4, Kiosk Werkstoff_Suche / Werkstoff.xaml): Übersicht mit Knopfreihen, Info mit Formbild */
.tm-ws-kopf { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.6rem; }
.tm-ws-rechts { margin-left: auto; margin-right: 3.6rem; display: flex; flex-direction: column; gap: 0.4rem; align-items: stretch; }   /* rechts, vor dem ×-Knopf */
.tm-ws-ansicht { display: flex; gap: 0.4rem; }
.tm-ws-ansicht .tm-ws-umschalten { flex: 1; justify-content: center; }
.tm-ws-umschalten.aktiv { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.tm-ws-neu, .tm-ws-umschalten { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 3.6rem; padding: 0 1.2rem; font-size: 1.2rem; background: #fff; border: 1px solid var(--rand); border-radius: 6px; }
.tm-ws-neu svg.tm-ikon, .tm-ws-umschalten svg.tm-ikon { width: 2.4rem; height: 2.4rem; }
/* Baumansicht der Werkstoffe (Dietmar 28.09.2026): Form → Art → Stäbe, fingergroße Zeilen */
.tm-ws-baum { flex: 1; min-height: 0; overflow-y: auto; }
.tm-ast { border: 1px solid var(--rand); border-radius: 6px; margin: 0 0 0.5rem; background: #fff; }
.tm-ast > summary { display: flex; align-items: baseline; gap: 1rem; min-height: 3.4rem; padding: 0.7rem 1rem; cursor: pointer; list-style: none; font-size: 1.25rem; }
.tm-ast > summary::-webkit-details-marker { display: none; }
.tm-ast > summary::before { content: "▸"; color: var(--akzent); transition: transform 120ms; }
.tm-ast[open] > summary::before { transform: rotate(90deg); }
.tm-ast > summary span { color: var(--muted); font-size: 1rem; margin-left: auto; font-family: var(--mono, monospace); }
.tm-ast-2 { margin: 0.2rem 0.8rem 0.6rem 2rem; background: var(--grund, #f5f6f8); }
.tm-ast-2 > summary { font-size: 1.12rem; min-height: 3rem; }
.tm-ast .tm-tabelle { margin: 0 0.8rem 0.6rem; width: calc(100% - 1.6rem); }
.tm-ast-mass { font-weight: 700; }
.tm-ws-ebenen { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.8rem; }
.tm-ws-ebene { align-items: center; max-height: 7.4rem; overflow-y: auto; flex: none; }   /* höchstens zwei Reihen, Rest rollt */
.tm-ws-ebene button { min-height: 3.2rem; padding: 0 0.9rem; }
.tm-dialog-werkstoffe .tm-ws-treffer { flex: 1; min-height: 12rem; }
.tm-ws-ebene button small { color: inherit; opacity: 0.65; margin-left: 0.25rem; }
.tm-ws-ebene-name { font-size: 0.9rem; color: var(--muted); min-width: 3.5rem; }
.tm-ws-treffer { display: block; }
.tm-ws-zeile { cursor: pointer; height: 3.6rem; }
.tm-ws-zeile:active td { background: #e0eaf5; }
.tm-ws-zeile.tm-ws-zuletzt td { background: #e6eefa; box-shadow: inset 0 2px 0 var(--akzent), inset 0 -2px 0 var(--akzent); }   /* zuletzt geöffnet */
.tm-ws-treffer tfoot td { font-weight: 600; background: #f3f3f3; }
.tm-dialog.tm-dialog-werkstoff { width: min(60rem, 94vw); }
.tm-ws-info { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 1.5rem; align-items: start; }
.tm-ws-name { grid-column: 1 / -1; font-size: 2.2rem; font-weight: 700; display: flex; gap: 1rem; align-items: center; }
.tm-ws-form { grid-column: 2; grid-row: 2; width: 12rem; max-height: 12rem; object-fit: contain; }
.tm-ws-daten { grid-column: 1; grid-row: 2; display: grid; grid-template-columns: 12rem 1fr; gap: 0.45rem 1rem; margin: 0; font-size: 1.2rem; }
.tm-ws-daten dt { color: var(--muted); }
.tm-ws-daten dd { margin: 0; }
.tm-ws-daten small { color: var(--muted); font-size: 0.9rem; margin-left: 0.4rem; }
.tm-ws-gross { font-size: 1.8rem; font-weight: 700; }
.tm-ws-zwischen { font-size: 1.1rem; margin: 1.2rem 0 0.5rem; color: var(--muted); font-weight: 400; }
.tm-ws-zert { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tm-ws-zert button { min-height: 3.4rem; padding: 0 1.2rem; font-size: 1.05rem; }
/* Werkstoff-Buchungen (Stufe 2) */
.tm-ws-aktionen { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.6rem; margin: 1.2rem 0 0.4rem; }
.tm-ws-aktionen button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem; min-height: 6.6rem;
  padding: 0.5rem; background: #fff; border: 1px solid var(--rand); border-radius: 8px; font-size: 1.05rem; }
.tm-ws-aktionen button:active { background: #e0eaf5; border-color: var(--akzent); }
.tm-ws-aktionen button svg.tm-ikon { width: 3.4rem; height: 3.4rem; }
.tm-dialog.tm-dialog-ws { width: min(60rem, 94vw); }
.tm-dialog-ok { border-top-color: var(--erledigt-fg) !important; }
.tm-ws-kurz { margin: -0.3rem 0 0.9rem; color: var(--muted); font-size: 1.1rem; }
.tm-ws-kurz strong { color: var(--fg); }
.tm-ws-felder { display: flex; align-items: flex-end; gap: 0.8rem; margin-bottom: 1rem; }
.tm-ws-felder .tm-zeitfeld { flex: 1; }
.tm-ws-mal { font-size: 2.2rem; color: var(--muted); padding-bottom: 1.1rem; }
.tm-ws-summe { font-size: 2.2rem !important; color: var(--erledigt-fg) !important; }
.tm-ws-zuviel { color: var(--ueberfaellig-fg) !important; }
.tm-ws-frage { font-size: 1.35rem; font-weight: 600; margin: 0.4rem 0 0; }
.tm-ws-namen { font-size: 1.5rem; margin: 0 0 1rem; padding-left: 1.4rem; column-count: 2; }
.tm-ws-teil { width: 9rem; font-size: 1.6rem; text-align: right; padding: 0.4rem 0.6rem; border: 2px solid var(--akzent); border-radius: 6px; font-family: inherit; }
.tm-ws-teilen td { height: 3.6rem; }
.tm-ws-hinweis { color: var(--muted); font-size: 1rem; }
.tm-ws-orte { margin-bottom: 0.5rem; }
.tm-ws-bisher { font-size: 0.95rem; }
/* Werkstoff einbuchen, Zeichnungssuche */
.tm-eb-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tm-eb-rollen { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; padding-right: 0.3rem; }
.tm-eb-gruppe { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.8rem; }
.tm-eb-gruppe .tm-wahl-knopf span { min-height: 5rem; font-size: 1.45rem; padding-left: 3.6rem; }   /* groß zum Antippen */
.tm-eb-gruppe .tm-wahl-knopf span::before { width: 1.6rem; height: 1.6rem; left: 1.1rem; }
.tm-eb-gruppe .tm-wahl-knopf input:checked + span::before { border-width: 0.5rem; }
.tm-eb-legende { font-size: 1.1rem !important; margin-bottom: 0.6rem !important; }
.tm-eb-werte { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; margin-bottom: 1rem; }
.tm-eb-werte .tm-zeitfeld-wert { font-size: 2rem; }
.tm-dialog .tm-eb-werte input.tm-zeitfeld-wert { font-size: 2rem; }
.tm-eb-schalter { font-size: 1.2rem; align-self: end; padding-bottom: 1.2rem; }
.tm-eb-nr { font-size: 1.5rem; font-family: inherit; background: none; border: none; color: var(--akzent); text-decoration: underline; padding: 0.2rem 0; }
.tm-dialog-eb .tm-dialog-aktionen { margin-top: auto; padding-top: 0.8rem; }
.tm-zg-suche { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 0.8rem; align-items: end; margin-bottom: 0.8rem; }
.tm-zg-suche input { font-size: 1.2rem; padding: 0.6rem; }
.tm-zg-suche button { min-height: 3.4rem; padding: 0 1.4rem; font-size: 1.15rem; }
.tm-zd { flex: 1; min-height: 0; display: grid; grid-template-columns: 24rem 1fr; gap: 1.2rem; }
.tm-zd-daten { grid-template-columns: max-content 1fr !important; align-content: start; font-size: 1.1rem !important; overflow-y: auto; }
.tm-zd-dateien { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tm-zd-datei { display: inline-flex; align-items: center; justify-content: center; min-width: 5rem; min-height: 3.2rem; padding: 0 1rem;
  font: 600 1.1rem/1 inherit; border: 1px solid var(--akzent); border-radius: 6px; background: #fff; color: var(--akzent); text-decoration: none; }
.tm-zd-datei:active { background: #e0eaf5; }
.tm-dialog-pdf .tm-dialog-aktionen { margin-top: 0.8rem; }
.tm-zd-pfad { font-size: 0.85rem; color: var(--muted); word-break: break-all; }
.tm-zd-vorschau { min-height: 0; display: flex; }
.tm-zd-vorschau iframe { flex: 1; width: 100%; border: 1px solid var(--rand); border-radius: 4px; }
.tm-zg-status { display: inline-block; width: 1.1rem; height: 1.1rem; border-radius: 50%; box-shadow: inset 0 -2px 3px rgba(0,0,0,.3); }
.tm-zg-gelb { background: #f2c230; } .tm-zg-gruen { background: #3a9e3f; } .tm-zg-blau { background: #2f74c4; }
.tm-zg-grau { background: #9aa6b2; } .tm-zg-rot { background: #d63c2a; }

/* Werkzeugbewegungen (SPEC 26.4): Mehrfachauswahl mit eckigem Kästchen, Filter, Gruppen je Typ bzw. Baustelle */
.tm-dialog-system .tm-system button span small { display: block; font-size: 1rem; color: var(--muted); font-weight: 400; }
.tm-wz-filter { margin-bottom: 0.8rem; }
.tm-wz-filter input { font-size: 1.3rem; padding: 0.6rem; }
.tm-wz-gruppe[hidden], .tm-wz-gruppe .tm-wahl-knopf[hidden] { display: none; }
.tm-wz-gruppe .tm-eb-legende { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.tm-wz-alle { min-height: 2.8rem; padding: 0 1rem; font-size: 1rem; margin-left: 0.4rem; }
.tm-dialog-wz .tm-eb-gruppe { grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); }
.tm-dialog-wz .tm-eb-gruppe .tm-wahl-knopf > span { font-size: 1.25rem; min-height: 4.6rem; line-height: 1.25; padding-top: 0.4rem; padding-bottom: 0.4rem; }
.tm-dialog-wz .tm-wz-text { display: block; font-style: normal; }
.tm-dialog-wz .tm-wz-text small { display: block; font-size: 0.95rem; color: var(--muted); }
.tm-wahl-mehr span::before { border-radius: 4px; }
.tm-wahl-mehr input:checked + span::before { border: none; background: var(--akzent); }
.tm-wahl-mehr input:checked + span::after { content: ""; position: absolute; left: 1.72rem; top: 50%; width: 0.45rem; height: 0.85rem; margin-top: -0.55rem; border: solid #fff; border-width: 0 0.22rem 0.22rem 0; transform: rotate(45deg); }
.tm-dialog-wz .tm-wz-ziele { grid-template-columns: 1fr; }
.tm-wz-chips { list-style: none; margin: 0 0 0.8rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tm-wz-chips li { padding: 0.35rem 0.7rem; border-radius: 6px; background: #eef3fa; border: 1px solid #c9d8ec; font-size: 1.05rem; }
.tm-wz-chips li small { display: block; color: var(--ueberfaellig-fg); }
.tm-wz-gut li { background: #eaf6ea; border-color: #b9dcb9; }
.tm-wz-schlecht li { background: #fdeeec; border-color: #f0c2bb; }
.tm-dialog-wz-person .tm-person[hidden] { display: none; }
/* „Wo befindet sich was?“ (SPEC 14.4): Kennzahlen, Liste oder Baustellen-Karten, Dauer farbig ab 30/90 Tagen */
.tm-wo-kopf { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.tm-wo-zahlen { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-right: auto; }
.tm-wo-zahlen span { padding: 0.45rem 0.9rem; border-radius: 6px; background: #f3f5f8; border: 1px solid var(--rand); font-size: 1.1rem; }
.tm-wo-zahlen strong { font-size: 1.35rem; }
.tm-wo-rollen [hidden] { display: none !important; }
.tm-wo-liste td { font-size: 1.15rem; padding: 0.55rem 0.7rem; }
.tm-wo-liste td small, .tm-wo-karte small { display: block; font-size: 0.92rem; color: var(--muted); }
.tm-wo-liste .nowrap { white-space: nowrap; }
.tm-wo-tage { display: inline-block; min-width: 5.5rem; padding: 0.25rem 0.6rem; border-radius: 999px; background: var(--erledigt-bg); color: var(--erledigt-fg); font-size: 1rem; text-align: center; white-space: nowrap; }
.tm-wo-tage.tm-wo-mittel { background: #fff1c9; color: #7a5200; }
.tm-wo-tage.tm-wo-lang { background: var(--ueberfaellig-bg); color: var(--ueberfaellig-fg); font-weight: 600; }
.tm-wo-karten { columns: 2 30rem; column-gap: 1rem; }
.tm-wo-karte { break-inside: avoid; margin: 0 0 1rem; border: 1px solid var(--rand); border-radius: 8px; background: #fff; overflow: hidden; }
.tm-wo-karte header { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "nr name anz" "nr sub anz"; column-gap: 0.8rem; align-items: center; padding: 0.7rem 0.9rem; background: #eef3fa; border-bottom: 1px solid #c9d8ec; }
.tm-wo-nr { grid-area: nr; font-size: 1.35rem; font-weight: 700; color: var(--akzent); }
.tm-wo-karte header strong { grid-area: name; font-size: 1.15rem; }
.tm-wo-karte header small { grid-area: sub; }
.tm-wo-anzahl { grid-area: anz; min-width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--akzent); color: #fff; font-weight: 700; font-size: 1.15rem; }
.tm-wo-karte ul { list-style: none; margin: 0; padding: 0; }
.tm-wo-karte li { display: flex; align-items: center; gap: 0.8rem; justify-content: space-between; min-height: 3.8rem; padding: 0.45rem 0.9rem; font-size: 1.15rem; cursor: pointer; }
.tm-wo-karte li + li { border-top: 1px solid #ececec; }
.tm-wo-karte li:active, .tm-wo-liste tr:active { background: #eef3fa; }
/* Projektstatistik (SPEC 14.4): links Kuchen + Legende, rechts Übersicht bzw. Zeiten der gewählten Tätigkeit */
.tm-st-zahlen { margin-bottom: 0.8rem; }
.tm-st { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(16rem, 24rem) minmax(0, 1fr); gap: 1.2rem; }
.tm-st-links { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 0.8rem; }
.tm-st-kuchen { flex: none; width: 100%; max-width: 17rem; height: auto; aspect-ratio: 1; align-self: center; }   /* flex: none — sonst auf 0 gedrückt */
.tm-st-kuchen path { stroke: #fff; stroke-width: 1.2; cursor: pointer; transition: opacity .15s; }
.tm-st-gewaehlt .tm-st-kuchen path:not(.aktiv) { opacity: .35; }
.tm-st-legende { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.tm-st-legende button { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 0.7rem; align-items: center; min-height: 3.6rem; padding: 0.4rem 0.8rem; background: #fff; border: 1px solid var(--rand); border-radius: 6px; text-align: left; font-size: 1.1rem; }
.tm-st-legende button.aktiv { border: 2px solid var(--akzent); background: #eef3fa; }
.tm-st-legende small, .tm-st-panel h3 small { display: block; font-size: 0.9rem; color: var(--muted); font-weight: 400; }
.tm-st-farbe { display: inline-block; width: 1.2rem; height: 1.2rem; border-radius: 3px; vertical-align: -0.15rem; }
.tm-st-wert { text-align: right; }
.tm-st-rechts { min-height: 0; overflow-x: hidden; }
.tm-st-zeilen { width: 100%; }
.tm-st-zeilen th { font-size: 1.1rem; }
.tm-st-panel h3 { margin: 0 0 0.6rem; font-size: 1.3rem; }
.tm-st-zeilen td { font-size: 1.05rem; padding: 0.4rem 0.6rem; }
.tm-st-zeilen tr.offen td { background: #eef7ee; }
.tm-st-zeilen tr.vergessen td { background: var(--ueberfaellig-bg); color: var(--ueberfaellig-fg); }
.tm-wo-zahlen .tm-st-warnung { background: var(--ueberfaellig-bg); color: var(--ueberfaellig-fg); border-color: #f0c2bb; }
.tm-st-zeilen tfoot td { font-weight: 700; background: #f3f3f3; }
.tm-st-panel .tm-wz-chips { margin-top: 0.4rem; }
/* Ausbuchen sammeln: großes Eingabefeld, Meldung farbig, gewählte als Chips (antippen entfernt) */
.tm-wz-sammeln input { font-size: 1.8rem; padding: 0.7rem 0.9rem; border: 2px solid var(--akzent); }
.tm-wz-meldung { min-height: 1.6rem; margin: -0.3rem 0 0.5rem; font-size: 1.2rem; font-weight: 600; }
.tm-wz-meldung-ok { color: var(--erledigt-fg); } .tm-wz-meldung-warnung { color: #8a5a00; } .tm-wz-meldung-fehler { color: var(--ueberfaellig-fg); }
.tm-wz-gewaehlt { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.tm-wz-gewaehlt:empty { display: none; }
.tm-wz-chip { padding: 0.45rem 0.8rem; border-radius: 6px; border: 1px solid #b9dcb9; background: var(--erledigt-bg); font-size: 1.05rem; }
/* „Wo befindet sich was?“, Liste: Spalten sortierbar, rechts Häkchen „zurück“ (retourgekommen) → Rückbuchen */
.tm-sortier { background: none; border: none; padding: 0.3rem 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; gap: 0.4rem; align-items: center; }
.tm-sortier span { color: var(--akzent); font-size: 0.9em; min-width: 1em; }
.tm-sortier:not([data-richtung]) span { color: #9a9a9a; }
.tm-wo-liste th.tm-wo-zurueck, .tm-wo-liste td.tm-wo-zurueck { width: 5.5rem; text-align: center; }
.tm-haken { position: relative; display: inline-grid; place-items: center; width: 3.6rem; height: 3.6rem; cursor: pointer; }   /* relative: das verborgene Kästchen bleibt im Häkchen — sonst hing es am Dialog, lag in der Spaltenansicht weit unten und der Fokus riss das Fenster mit (Befund 26.09.2026) */
.tm-haken input { position: absolute; top: 50%; left: 50%; opacity: 0; width: 1px; height: 1px; margin: 0; }
.tm-haken span { width: 2.4rem; height: 2.4rem; border: 2px solid #9a9a9a; border-radius: 5px; background: #fff; position: relative; }
.tm-haken input:checked + span { background: var(--erledigt-fg); border-color: var(--erledigt-fg); }
.tm-haken input:checked + span::after { content: ""; position: absolute; left: 0.72rem; top: 0.3rem; width: 0.55rem; height: 1.1rem; border: solid #fff; border-width: 0 0.26rem 0.26rem 0; transform: rotate(45deg); }
.tm-haken input:focus-visible + span { outline: 3px solid var(--akzent); outline-offset: 2px; }
.tm-wo-liste tr:has(input:checked) td { background: var(--erledigt-bg); }
.tm-wo-karte li:has(input[name=m]:checked) { background: var(--erledigt-bg); }
.tm-wo-karte li .tm-wo-tage { margin-left: auto; }
.tm-wo-karte header { grid-template-columns: auto 1fr auto auto; grid-template-areas: "nr name anz alle" "nr sub anz alle"; }
.tm-wo-alle { grid-area: alle; }
.tm-wo-rueck { display: inline-flex; align-items: center; gap: 0.6rem; }
.tm-wo-rueck[hidden] { display: none; }
.tm-wo-rueck svg.tm-ikon { width: 2.4rem; height: 2.4rem; }
/* Lagerpaletten (SPEC 14.4): Kacheln mit Foto, Nummer als Plakette, Inhalt dreizeilig; Einzelansicht Foto + Inhalt */
.tm-pal-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.9rem; }
.tm-pal-kachel { position: relative; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.6rem; min-height: 9rem; text-align: left; background: #fff; border: 1px solid var(--rand); border-radius: 8px; font-size: 1.05rem; }
.tm-pal-kachel[hidden] { display: none; }
.tm-pal-kachel:active { background: #eef3fa; }
.tm-pal-kachel img { width: 100%; height: 10rem; object-fit: cover; border-radius: 5px; background: #eee; }
.tm-pal-nr { position: absolute; top: 0.9rem; left: 0.9rem; padding: 0.2rem 0.6rem; border-radius: 6px; background: var(--akzent); color: #fff; font-weight: 700; font-size: 1.4rem; font-variant-numeric: tabular-nums; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.tm-pal-ohne { height: 10rem; display: grid; place-items: center; border-radius: 5px; background: #f3f3f3; color: var(--muted); }
.tm-pal-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.tm-pal-leer { min-height: 5rem; justify-content: flex-end; background: #fafafa; color: var(--muted); }
.tm-pal-leer .tm-pal-nr { background: #9aa6b2; }
.tm-pal-gross { font-size: 1.7rem; font-weight: 700; color: var(--akzent); margin-left: 0.3rem; }
.tm-pal-eins { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.2rem; }
.tm-pal-bild { min-height: 0; display: grid; place-items: center; background: #f3f3f3; border-radius: 8px; overflow: hidden; }
.tm-pal-bild img { max-width: 100%; max-height: 62vh; object-fit: contain; }
.tm-pal-seite h3 { margin: 0 0 0.5rem; font-size: 1.1rem; color: var(--muted); font-weight: 400; }
.tm-pal-inhalt { font-size: 1.45rem; line-height: 1.4; margin: 0; white-space: pre-wrap; }
.tm-pal-form { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.8rem; }
.tm-pal-form textarea { font: inherit; font-size: 1.2rem; padding: 0.6rem; border: 1px solid var(--rand); border-radius: 6px; resize: vertical; }
.tm-pal-form button, .tm-pal-knoepfe button, .tm-pal-datei { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.5rem; min-height: 3.4rem; padding: 0 1.1rem; font-size: 1.1rem; }
.tm-pal-datei { border: 1px solid var(--rand); border-radius: 6px; background: #fff; cursor: pointer; }
.tm-pal-datei input { display: none; }
.tm-pal-knoepfe { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.tm-pal-datei svg.tm-ikon, .tm-pal-knoepfe svg.tm-ikon { width: 2.2rem; height: 2.2rem; }
.tm-pal-blaettern { min-width: 5.5rem; font-size: 1.3rem; }
.tm-wz-info { display: grid; grid-template-columns: 1fr; gap: 0.6rem 1.4rem; padding-bottom: 1rem; }
.tm-wz-info.tm-wz-mit-bild { grid-template-columns: auto 1fr; }
.tm-wz-info + .tm-wz-info { border-top: 1px solid var(--rand); padding-top: 1rem; }
.tm-wz-bewegungen { grid-column: 1 / -1; }
.tm-wz-bild { width: 15rem; max-height: 15rem; object-fit: contain; border: 1px solid var(--rand); border-radius: 6px; background: #fff; }
.tm-wz-daten { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0 0 0.8rem; font-size: 1.15rem; }
.tm-wz-daten dt { color: var(--muted); }
.tm-wz-daten dd { margin: 0; }
.tm-wz-warn { color: var(--ueberfaellig-fg); font-weight: 600; }
.tm-wz-ort { margin: 0 0 0.8rem; padding: 0.8rem 1rem; border-radius: 6px; font-size: 1.3rem; }
.tm-wz-ort small { display: block; font-size: 1rem; color: var(--muted); }
.tm-wz-draussen { background: #fff4d6; border: 1px solid #f0d58a; }
.tm-wz-firma { background: var(--erledigt-bg); border: 1px solid #b9dcb9; }
.tm-wz-knoepfe { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.tm-wz-knoepfe button { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 4rem; padding: 0 1.3rem; font-size: 1.2rem; }
.tm-wz-knoepfe button svg.tm-ikon { width: 2.4rem; height: 2.4rem; }
button.tm-gefahr-knopf { background: var(--ueberfaellig-fg); border-color: var(--ueberfaellig-fg); }
.tm-dialog.tm-dialog-pdf { width: 92vw; height: 92vh; max-height: none; display: flex; flex-direction: column; box-sizing: border-box; }
.tm-dialog.tm-dialog-pdf { padding: 0.8rem 0.8rem 0.8rem; }
.tm-dialog-pdf iframe { border: none !important; }
.tm-dialog-pdf iframe { flex: 1; width: 100%; border: 1px solid var(--rand); }
/* Neuer Auftrag (SPEC 26.6): Schritt 1 links die durchsuchbare Kundenliste, rechts Beschreibung, Tätigkeit, wertschöpfend;
   Schritt 2 der QR-Code (schwarz auf Weiß, 16 rem) neben dem Foto vom Handy, das sich alle 3 s nachlädt. */
.tm-dialog-auftrag { width: min(66rem, 96vw); }
.tm-auftrag-spalten { display: grid; grid-template-columns: minmax(15rem, 1fr) minmax(18rem, 1.25fr); gap: 1.1rem; align-items: start; }
.tm-auftrag-kunden, .tm-auftrag-taetigkeiten { margin: 0; min-width: 0; }
.tm-auftrag-taetigkeiten legend small { color: var(--muted); font-weight: normal; }
.tm-auftrag-suche { width: 100%; font-size: 1.1rem; padding: 0.55rem 0.7rem; margin-bottom: 0.5rem; }
.tm-auftrag-liste { display: grid; gap: 0.35rem; max-height: 46vh; overflow: auto; padding-right: 0.3rem; }
.tm-auftrag-feld { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.95rem; }
.tm-auftrag-feld input { font-size: 1.15rem; padding: 0.6rem 0.7rem; }
.tm-auftrag-vorlagen { display: grid; gap: 0.4rem; margin: 0.9rem 0; }
.tm-auftrag-vorlagen small { color: var(--muted); margin-left: 0.4rem; }
.tm-auftrag-bildwahl { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.4rem 0 0.9rem; }
.tm-auftrag-foto { display: grid; grid-template-columns: 16rem 1fr; gap: 1.3rem; align-items: start; }
.tm-auftrag-qr { text-align: center; font-size: 0.95rem; }
.tm-auftrag-qr-code { background: #fff; padding: 0.3rem; border: 1px solid var(--rand); border-radius: 6px; }
.tm-auftrag-qr-code svg { display: block; width: 100%; height: auto; }
.tm-auftrag-bild img { display: block; max-width: 100%; max-height: 40vh; object-fit: contain; background: #fff; border: 1px solid var(--rand); border-radius: 6px; }
.tm-auftrag-warten { color: var(--muted); font-size: 1.15rem; }
.tm-auftrag-ok { font-size: 1.4rem; }
@media (max-width: 800px) { .tm-auftrag-spalten, .tm-auftrag-foto { grid-template-columns: 1fr; } }
/* Druckvorschau der Etiketten (SPEC 26.5, 14.x): Etikett als weiße Karte im Seitenverhältnis des Drucks, mehrere untereinander
   bzw. zweispaltig; der Satz mit dem Standort steht darüber, der Standort fett. */
.tm-dialog-etikett { width: min(64rem, 96vw); }
.tm-etikett-satz { font-size: 1.25rem; margin: 0.2rem 3.6rem 0.9rem 0; line-height: 1.45; }
.tm-etikett-satz strong { font-weight: 700; }
.tm-etikett-bilder { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(26rem, 100%), 1fr)); gap: 0.9rem;
                     max-height: 58vh; overflow: auto; padding: 0.6rem; background: var(--hintergrund, #eef1f5); border-radius: 6px; }
.tm-etikett-bild { display: block; width: 100%; height: auto; aspect-ratio: 98.5 / 50; background: #fff; border: 1px solid var(--rand);
                   border-radius: 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); }
.tm-etikett-bilder:has(.tm-etikett-bild:only-child) { grid-template-columns: 1fr; }
.tm-etikett-mehr, .tm-etikett-fehlt { color: var(--muted); margin: 0.6rem 0 0; }
/* Einstellungen (Zahnrad): Informationen als Liste, Bildschirm reinigen als Sperrfläche mit Countdown */
.tm-infos { display: grid; grid-template-columns: max-content 1fr; column-gap: 2rem; gap: 0; margin: 0; font-size: 1.25rem; border-top: 1px solid var(--rand); }
.tm-infos dt, .tm-infos dd { padding: 0.65rem 0.4rem; border-bottom: 1px solid var(--rand); margin: 0; }
.tm-infos dt { color: var(--muted); white-space: nowrap; }   /* Beschriftung einzeilig, Werte auf einer Linie */
.tm-infos dd.r { text-align: right; }
.tm-dialog-infos { max-height: 94vh; }
.tm-infos small { color: var(--muted); font-size: 1rem; margin-left: 0.4rem; }
.tm-fehlertext { color: var(--ueberfaellig-fg) !important; }
.tm-dialog-infos .tm-start-logo { max-width: 28rem; margin: 1.5rem auto 0; }
.tm-reinigen { position: fixed; inset: 0; z-index: 200; background: #000; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; touch-action: none; user-select: none; }
.tm-reinigen p { font-size: 2.6rem; margin: 0; }
.tm-reinigen strong { font-size: 8rem; font-variant-numeric: tabular-nums; }
/* Admin › Terminals: jede Zeile einzeilig, kein Umbruch in Zellen (Dietmar 25.09.2026: „alle Elemente auf einer Zeile“) */
/* Admin › Terminals als Tabelle (28.09.2026, Dietmar: „ordentliche Tabelle“): sechs Spalten, Zusammengehöriges
   untereinander in einer Zelle (Name/Notiz/UUID, Status/Knopf, Vollbild/Fenstergröße, Drucker/Standort, Verlauf),
   Zellen oben ausgerichtet; so bleibt die Tabelle schmal statt einer langen Zeile. */
table.terminal-tabelle td { vertical-align: top; }
table.terminal-tabelle form { margin: 0; }
.terminal-name { display: grid; grid-template-columns: minmax(8rem, 12rem) auto; gap: 0.3rem 0.4rem; align-items: center; }
.terminal-name input[name=name] { font-weight: 600; }
.terminal-name input[name=notiz] { grid-column: 1; }
.terminal-name button { grid-column: 2; grid-row: 1 / span 2; align-self: center; justify-self: start; }
.terminal-klein { font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; }
.terminal-klein.mono { word-break: break-all; max-width: 22rem; }
.terminal-zelle-status .badge { display: inline-block; margin-bottom: 0.4rem; }
.terminal-fenster { display: flex; align-items: center; gap: 0.3rem; margin-top: 0.4rem; }
.terminal-fenster input { width: 5rem; }
.terminal-drucker { max-width: 14rem; }
.terminal-verlauf { font-size: 0.85rem; }
.terminal-verlauf span { display: inline-block; min-width: 5.8rem; color: var(--muted); }
.terminal-verlauf b { font-weight: normal; white-space: nowrap; }
.terminal-name { grid-template-columns: minmax(7rem, 11rem) auto; }
/* Kiosk-Symbole als PNG (Dietmar 25.09.2026), Systemmenü */
.tm-sym { width: 1.6rem; height: 1.6rem; vertical-align: -0.35rem; object-fit: contain; }
.tm-rund .tm-sym { width: 2.8rem; height: 2.8rem; vertical-align: middle; }
.tm-zeile-haken { background: transparent; }
.tm-zeile-haken .tm-sym { width: 2.6rem; height: 2.6rem; }
.tm-faellig-sym .tm-sym { width: 1.8rem; height: 1.8rem; }
.tm-marke .tm-sym { width: 1.1rem; height: 1.1rem; vertical-align: -0.2rem; }
.tm-notiz .tm-sym { width: 1rem; height: 1rem; vertical-align: -0.15rem; }
.tm-system { display: flex; flex-direction: column; gap: 0.6rem; }
.tm-system button { display: flex; align-items: center; gap: 0.9rem; min-height: 4rem; padding: 0 1.2rem; font-size: 1.15rem; background: #fff; border: 1px solid var(--rand); border-radius: 6px; text-align: left; }
.tm-system button .tm-sym { width: 2.4rem; height: 2.4rem; }
.tm-system-frage { margin-top: 1rem; padding: 1rem; background: var(--ueberfaellig-bg); border-radius: 6px; }
/* Systemmenü mittig und 30 % größer als die übrigen Dialoge (Dietmar 25.09.2026) */
.tm-dialog.tm-dialog-mitte, .tm-dialog.tm-dialog-system { top: 50%; transform: translate(-50%, -50%); }   /* Rückfragen und Systemmenü senkrecht mittig */
.tm-dialog.tm-dialog-mitte { width: min(42rem, 96vw); }   /* alle Rückfragen gleich breit (Durchsicht 26.09.2026) */
.tm-dialog.tm-dialog-system { width: min(42rem, 96vw); }
@media (max-width: 1500px) {   /* 1280×1024 (Dietmar 27.09.2026): Listen- und Arbeitsfenster fast bis zum Rand, sonst wird es eng */
  .tm-dialog.tm-dialog-projekte { top: 1.5vh; width: 98vw; height: 97vh; }
  .tm-dialog.tm-dialog-breit:not(.tm-dialog-projekte) { width: 96vw; }
  .tm-dialog.tm-dialog-pdf { width: 98vw; height: 97vh; }
}
.tm-dialog-system h2 { font-size: 1.8rem; margin-right: 4.5rem; }
.tm-dialog-system h2 small { font-size: 1.25rem; }
.tm-dialog-system .tm-dialog-x { width: 4.2rem; height: 4.2rem; font-size: 2rem; }
.tm-dialog-system .tm-system { gap: 0.8rem; }
.tm-dialog-system .tm-system button { min-height: 5.2rem; font-size: 1.5rem; gap: 1.2rem; padding: 0 1.5rem; }
.tm-dialog-system .tm-system button .tm-sym { width: 3.1rem; height: 3.1rem; }
.tm-dialog-system .tm-system button svg { width: 3.1rem; height: 3.1rem; padding: 0.3rem; box-sizing: border-box; flex: none; }
.tm-dialog-system .tm-system button svg.tm-kachel { padding: 0; width: 3.3rem; height: 3.3rem; }   /* Farbkachel füllt die Symbolfläche */
.tm-dialog-system .tm-dialog-text { font-size: 1.56rem; }
.tm-dialog-system .tm-dialog-aktionen button { min-height: 4.7rem; font-size: 1.5rem; padding: 0 2.1rem; }

/* Wissen (SPEC 29.3, 14): das Wiki im Portal. Baum links (sticky, eigene Bildlaufleiste), Inhalt rechts mit lesbarer
   Zeilenlänge; Wiki-HTML mit Tabellenlinien, Bildern in Spaltenbreite und den Ausrichtungsklassen aus BookStack.
   Unter 900 px steht der Baum eingeklappt über dem Inhalt. Untersektionen im Baum fett, Seiten mit Unterseiten
   aufklappbar; Editor (Jodit) mit Titel darüber und Änderungsnotiz darunter; Versionsvergleich zeilenweise. */
.wissen-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.2rem; margin-bottom: 0.8rem; }
.wissen-kopf h1 { margin: 0; }
.wissen-suche { display: flex; gap: 0.5rem; flex: 1 1 20rem; max-width: 34rem; }
.wissen-suche input { flex: 1; }
.wissen { display: grid; grid-template-columns: minmax(15rem, 19rem) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.wissen-baum { position: sticky; top: 0.8rem; max-height: calc(100vh - 7rem); overflow: auto; font-size: 0.92rem;
               border-right: 1px solid var(--rand); padding-right: 0.8rem; }
.wissen-baum > details > summary { display: none; }
.wissen-baum ul { list-style: none; margin: 0.1rem 0 0.3rem; padding-left: 1rem; }
.wissen-baum li { margin: 0.12rem 0; }
.wissen-baum summary { cursor: pointer; padding: 0.15rem 0; }
.wissen-baum a { color: inherit; text-decoration: none; }
.wissen-baum a:hover { text-decoration: underline; }
.wissen-baum a.aktiv { color: var(--akzent); font-weight: 700; }
.wissen-kopf-link { color: inherit; text-decoration: none; }
.wissen-baum ul.wb-wurzel { padding-left: 0; }
.wb-sektion { margin-top: 0.35rem; }
.wb-sektion > details > summary, .wb-sektion > a { font-weight: 600; }
.wb-blatt { display: inline-block; padding: 0.15rem 0 0.15rem 1rem; }   /* bündig mit aufklappbaren Nachbarn */
.wb-sektion > a.wb-blatt { padding-left: 1rem; }
.wissen-inhalt { min-width: 0; max-width: 60rem; }
.wissen-inhalt > :first-child { margin-top: 0; }
.wissen-pfad { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.3rem; }
.wissen-titel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 1rem; }
.wissen-titel h2 { margin: 0; font-size: 1.6rem; }
.wissen-aktionen { margin-left: auto; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.wissen-meta { color: var(--muted); font-size: 0.88rem; margin: 0.3rem 0 0.6rem; }
.wissen-meta .person, .wissen-versionen .person { vertical-align: middle; }
.wissen-meta .person-avatar { width: 1.4rem; height: 1.4rem; font-size: 0.6rem; }
.wissen-tags span { display: inline-block; font-size: 0.8rem; background: var(--hintergrund, #eef1f5); border: 1px solid var(--rand);
                    border-radius: 3px; padding: 0 0.4rem; margin: 0 0.3rem 0.2rem 0; }
.wissen-typ { display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted);
              border: 1px solid var(--rand); border-radius: 3px; padding: 0 0.3rem; margin-right: 0.3rem; vertical-align: 0.1em; }
.wissen-liste, .wissen-treffer { list-style: none; padding: 0; margin: 0.6rem 0; }
.wissen-liste li, .wissen-treffer li { padding: 0.45rem 0; border-top: 1px solid var(--rand); }
.wissen-treffer li p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.92rem; overflow-wrap: anywhere; }
.wissen-treffer mark { background: #fff3a8; color: inherit; padding: 0 0.1em; }
.wissen-buecher { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.7rem; margin-top: 0.8rem; }
.wissen-buch { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.8rem 0.9rem; border: 1px solid var(--rand); border-radius: 6px;
               background: var(--karte); color: inherit; text-decoration: none; }
.wissen-buch:hover { border-color: var(--akzent); }
.wissen-buch small { color: var(--muted); }
.wissen-buch { overflow: hidden; }
.wissen-buch-bild { display: block; margin: -0.8rem -0.9rem 0.5rem; width: calc(100% + 1.8rem); aspect-ratio: 16 / 7;
                    object-fit: cover; background: var(--hintergrund, #eef1f5); border-bottom: 1px solid var(--rand); }
.wissen-buch-leer { display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700;
                    color: var(--muted); }
.wissen-titelbild { display: block; width: 100%; max-height: 14rem; object-fit: cover; border-radius: 6px;
                    border: 1px solid var(--rand); margin: 0.2rem 0 0.8rem; }
.admin-wissen-bild { white-space: nowrap; }
.admin-wissen-bild img { display: block; width: 7rem; height: 3.1rem; object-fit: cover; border: 1px solid var(--rand);
                         border-radius: 3px; margin-bottom: 0.3rem; }
.mini-datei { position: relative; display: inline-block; padding: 0.15rem 0.5rem; font-size: 0.85em; border: 1px solid var(--akzent);
              color: var(--akzent); background: #fff; border-radius: 3px; cursor: pointer; }
.mini-datei:hover, .mini-datei:focus-within { background: var(--akzent); color: #fff; }
.mini-datei input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.wissen-anhaenge { margin-top: 1.4rem; border-top: 1px solid var(--rand); padding-top: 0.6rem; }
.wissen-anhaenge h3 { font-size: 1rem; margin: 0 0 0.3rem; }
.wissen-blaettern { display: flex; gap: 1rem; align-items: center; }
.wissen-trefferpfad { color: var(--muted); }
.wissen-unterseiten { margin-top: 1.2rem; }
.wissen-unterseiten h3 { font-size: 1rem; margin: 0; }
.wissen-liste li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; }
.wissen-liste small { color: var(--muted); }
.wissen-dateien { list-style: none; padding: 0; margin: 0.3rem 0 0.6rem; }
.wissen-dateien li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.7rem; padding: 0.25rem 0; }
.wissen-dateien small { color: var(--muted); }
.wissen-hochladen { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.wissen-hochladen input[type=file] { max-width: 100%; }
.wissen-werkzeuge { margin-top: 1.4rem; border-top: 1px solid var(--rand); padding-top: 0.6rem; }
.wissen-werkzeuge summary { cursor: pointer; color: var(--muted); }
.wissen-werkzeuge form { margin: 0.7rem 0; }
.wissen-verschieben { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; }
.wissen-verschieben label { display: flex; flex-direction: column; gap: 0.2rem; flex: 1 1 16rem; min-width: 0; }
.wissen-verschieben select { max-width: 100%; }
/* Editor */
.wissen-editor-titel { width: 100%; font-size: 1.3rem; font-weight: 600; margin-bottom: 0.5rem; }
.wissen-editor-fuss { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.7rem; }
.wissen-editor-fuss input { flex: 1 1 18rem; min-width: 0; }
.wissen-editor-fuss .aktionen-rechts { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; }
.wissen-editor .jodit-wysiwyg.wiki-inhalt { padding: 0.75rem 1rem; }
.wissen-link-dialog { width: min(40rem, 94vw); }
.wissen-link-dialog h3 { margin-top: 0; }
.wissen-link-dialog input { width: 100%; }
.wissen-link-dialog ul { list-style: none; margin: 0.5rem 0 0; padding: 0; max-height: 50vh; overflow: auto; }
.wissen-link-dialog li button { display: block; width: 100%; text-align: left; padding: 0.4rem 0.5rem; background: none; border: 0;
                                border-bottom: 1px solid var(--rand); cursor: pointer; color: inherit; font: inherit; }
.wissen-link-dialog li button:hover, .wissen-link-dialog li button:focus { background: var(--hintergrund, #eef1f5); }
.wissen-link-dialog li small { display: block; color: var(--muted); }
/* Versionen */
.wissen-versionen td:first-child, .wissen-versionen td:nth-child(2) { width: 2.5rem; }
.wissen-alte-version { border-left: 4px solid var(--rand); padding-left: 1rem; margin-top: 0.8rem; }
.wissen-vergleich { font-family: var(--mono, ui-monospace, monospace); font-size: 0.86rem; border: 1px solid var(--rand); border-radius: 4px;
                    overflow-x: auto; margin-top: 0.6rem; }
.wissen-vergleich > div { display: flex; gap: 0.5rem; padding: 0.1rem 0.5rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.wv-zeichen { flex: 0 0 1ch; color: var(--muted); user-select: none; }
.wv-neu { background: #e6f4ea; } .wv-weg { background: #fbe9eb; }
.wv-luecke { color: var(--muted); background: var(--hintergrund, #eef1f5); }
.wissen-vergleich ins, .wissen-inhalt p.hinweis ins { background: #b7e1c1; text-decoration: none; }
.wissen-vergleich del, .wissen-inhalt p.hinweis del { background: #f4b8bf; }
/* Admin › Wissen */
.admin-wissen-name { display: flex; gap: 0.5rem; align-items: center; margin: 0; }
.admin-wissen-name input { min-width: 0; flex: 1 1 14rem; }
.wissen-knopf-form { display: inline-block; margin: 0; }
/* Ziehen im Baum (29.3): Rahmen für „hinein“, gezogener Eintrag blass */
.wissen-baum a[draggable="true"] { cursor: grab; }
.wissen-baum a.wb-ziehe { opacity: 0.45; }
.wissen-baum a.wb-drop-hinein { outline: 2px solid var(--akzent); outline-offset: 1px; border-radius: 2px; background: #fff; }
.wissen-rueck { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.8rem; background: var(--erledigt-bg, #e6f4ea);
                border: 1px solid var(--rand); border-radius: 4px; padding: 0.45rem 0.8rem; margin-bottom: 0.8rem; }
.admin-wissen-neu { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; margin-top: 1rem; }
/* Wiki-Inhalt */
.wiki-inhalt { line-height: 1.55; overflow-wrap: anywhere; }
.wiki-inhalt img { max-width: 100%; height: auto; }
article.wiki-inhalt img, img.wissen-titelbild, .bericht-inhalt img { cursor: zoom-in; }   /* öffnet die Lichtbox (03.10.2026) */
.wiki-inhalt figure { margin: 0.8rem 0; }
.wiki-inhalt table { border-collapse: collapse; max-width: 100%; margin: 0.8rem 0; display: block; overflow-x: auto; }
.wiki-inhalt td, .wiki-inhalt th { border: 1px solid var(--rand); padding: 0.3rem 0.5rem; vertical-align: top; }
/* Zellen nicht unter Lesebreite quetschen (Handy: Spalten mit 1–2 Buchstaben, Befund 29.09.2026) — die Tabelle rollt
   stattdessen waagrecht; Wörter trennen nach Silben, feste Pixelbreiten aus dem Wiki gelten nicht */
.wiki-inhalt td, .wiki-inhalt th { min-width: 6.5rem; overflow-wrap: break-word; hyphens: auto; }
.wiki-inhalt table { width: auto !important; height: auto !important; }
.wiki-inhalt tr, .wiki-inhalt td, .wiki-inhalt th { height: auto !important; }
.wiki-inhalt th { background: var(--hintergrund, #eef1f5); }
.wiki-inhalt pre { background: var(--hintergrund, #eef1f5); padding: 0.6rem 0.8rem; border-radius: 4px; overflow-x: auto; }
.wiki-inhalt blockquote { border-left: 4px solid var(--rand); margin: 0.8rem 0; padding: 0.2rem 0.9rem; color: var(--muted); }
.wiki-inhalt .align-center { text-align: center; } .wiki-inhalt .align-right { text-align: right; }
.wiki-inhalt .align-justify { text-align: justify; } .wiki-inhalt .align-left { text-align: left; }
.wiki-inhalt .callout { border-left: 4px solid var(--akzent); background: var(--hintergrund, #eef1f5); padding: 0.5rem 0.9rem; margin: 0.8rem 0; border-radius: 0 4px 4px 0; }
.wiki-inhalt .callout.success { border-left-color: #2e7d32; } .wiki-inhalt .callout.warning { border-left-color: #c77700; }
.wiki-inhalt .callout.danger { border-left-color: #b3001b; }
.wiki-inhalt .marker-yellow { background: #fff3a8; } .wiki-inhalt .pen-red { color: #b3001b; }
@media (max-width: 600px) {
  /* Monteure vor Ort: Kacheln zweispaltig, Baum und Knöpfe mit Fingerabstand */
  .wissen-buecher { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .wissen-buch { padding: 0.6rem 0.7rem; }
  .wissen-buch-bild { margin: -0.6rem -0.7rem 0.4rem; width: calc(100% + 1.4rem); aspect-ratio: 16 / 10; }
  .wissen-buch-leer { font-size: 1.5rem; }
  .wissen-buch strong { font-size: 0.95rem; overflow-wrap: anywhere; }
  .wissen-baum a, .wissen-baum summary { display: inline-block; padding: 0.4rem 0; }
  .wissen-baum li { margin: 0; }
  .wissen-titel h2 { font-size: 1.35rem; }
  .wissen-aktionen { margin-left: 0; width: 100%; }
  .wissen-liste li { padding: 0.6rem 0; }
  .wissen-dateien li { padding: 0.5rem 0; }
  .wissen-titelbild { max-height: 9rem; }
}
@media (max-width: 900px) {
  .wissen { grid-template-columns: 1fr; }
  .wissen-baum { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--rand); padding: 0 0 0.6rem; }
  .wissen-baum > details > summary { display: list-item; font-weight: 600; }
}

/* ---- Lantek Schachtelungen (SPEC 19.6): Platte mit Zoom, Teile anklickbar, Infobox und Legende ---- */
.sch-titelzeile { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin-bottom: 0.6rem; }
.sch-titelzeile h1 { margin: 0 auto 0 0; }
button.sch-rueckmelden { flex: none; min-height: 2.6rem; margin-left: auto; }   /* auch nach dem Umbruch rechts */
button.sch-rueckmelden:disabled { opacity: 0.5; cursor: not-allowed; }
button.sch-rueckmelden.erledigt { opacity: 1; cursor: default; background: var(--erledigt-fg); border-color: var(--erledigt-fg); color: #fff; }
.sch-kopf { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; align-items: center; color: var(--muted); margin: 0 0 0.8rem; }
.sch-kopf b { color: var(--text, #1a1a1a); font-weight: 600; }
.sch-ansicht { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1rem; align-items: start; }
.sch-buehne { position: relative; border: 1px solid var(--rand); border-radius: 6px; background: #f6f7f9; overflow: hidden;
              height: calc(100vh - 19.7rem); min-height: 22rem; }
.sch-buehne svg { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; user-select: none; }
.sch-buehne svg:active { cursor: grabbing; }
.sch-blech { fill: #e3e7ee; stroke: #6b7380; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.sch-blech-rahmen { fill: none; stroke: #b8bec8; stroke-width: 1; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }   /* Ausgangsmaß um ein Restblech */
.sch-teil { fill: color-mix(in srgb, var(--f) 12%, #fff); stroke: var(--f); stroke-width: 1.2; vector-effect: non-scaling-stroke;
            cursor: pointer; }
.sch-teil:hover { fill: color-mix(in srgb, var(--f) 28%, #fff); }
.sch-teil.sch-gleich { fill: color-mix(in srgb, var(--f) 32%, #fff); }
.sch-teil.sch-gewaehlt { fill: color-mix(in srgb, var(--f) 55%, #fff); stroke-width: 2.5; }
.sch-nummern text { fill: #333; text-anchor: middle; dominant-baseline: central; pointer-events: none; font-family: Arial, sans-serif; }
.sch-werkzeuge { position: absolute; top: 0.5rem; left: 0.5rem; z-index: 2; display: flex; flex-direction: column; gap: 0.3rem; }
.sch-knopf { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; font-size: 1.3rem; line-height: 1; border: 1px solid var(--rand);
             border-radius: 6px; background: #fff; color: var(--text, #1a1a1a); cursor: pointer; box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); }
.sch-knopf:hover { background: #eef1f5; }
.sch-order { font-size: 1.15rem; font-weight: 700; }
/* Infozeile über der Platte statt schwebender Box (01.10.2026): immer sichtbar, verdeckt keine Teile */
.sch-spalte { min-width: 0; display: grid; gap: 0.5rem; }
/* feste Standardhöhe von Anfang an (01.10.2026): sonst rutscht die Platte bei der ersten Auswahl nach unten */
.sch-infozeile { display: flex; align-items: flex-start; gap: 0.6rem; height: 5.6rem; overflow-y: auto; padding: 0.45rem 0.7rem; background: #fff;
                 border: 1px solid var(--rand); border-radius: 6px; }
.sch-info-inhalt { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.9rem; }
.sch-info-ref { overflow-wrap: anywhere; }
.sch-info-teil small { color: var(--muted); }
.sch-info-inhalt > small.hinweis { flex-basis: 100%; margin: 0; }
.sch-info-zu { flex: none; align-self: center; }
.sch-nr { display: inline-grid; place-items: center; min-width: 1.7rem; height: 1.7rem; padding: 0 0.3rem; border-radius: 4px;
          background: color-mix(in srgb, var(--f, #1f4a8a) 15%, #fff); border: 1.5px solid var(--f, #1f4a8a); font-weight: 700; }
.sch-legende ul { list-style: none; margin: 0.4rem 0; padding: 0; display: grid; gap: 0.3rem; }
/* Kopfzeile Nummer · Haken, darunter der Text über die ganze Breite (16.10.2026, Platz im Lantek-Terminal) */
.sch-legende-zeile { display: flex; flex-direction: column; align-items: stretch; gap: 0.3rem; width: 100%; text-align: left; border: 1px solid var(--rand);
                     border-radius: 6px; background: #fff; padding: 0.4rem 0.5rem; cursor: pointer; font: inherit; color: inherit; }
.sch-legende-zeile:hover { border-color: var(--akzent); background: #eef1f5; }
/* Markierter Eintrag deutlich dunkler als Hover (Dietmar 16.10.2026: „oft schlecht erkennbar“); Rand per Schatten verstärkt,
   damit sich nichts verschiebt */
.sch-legende-zeile.aktiv { border-color: var(--akzent); background: #c9d6ea; box-shadow: inset 0 0 0 1px var(--akzent); }
.sch-legende-zeile.aktiv .sch-legende-text small { color: #3d4652; }
.sch-legende-text { min-width: 0; overflow-wrap: anywhere; }
/* Erste Zeile: Nummer links, grüner Haken ganz rechts, wenn das Teil vollständig geschnitten ist (16.10.2026) */
.sch-zeile1 { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; }
/* gleicher grüner Haken wie in der Plattenliste (.sch-haken unten), hier etwas größer und ohne Abstand rechts */
.sch-zeile1 .sch-haken, .sch-gruppe-kopf .sch-haken { flex: none; margin: 0; font-size: 0.95em; width: 1.45em; height: 1.45em; }
.sch-gruppe-kopf.sch-fertig { position: relative; padding-right: 2.2rem; }
.sch-gruppe-kopf.sch-fertig .sch-haken { position: absolute; top: 0.3rem; right: 0.45rem; margin: 0; }
.sch-legende-text small { color: var(--muted); overflow-wrap: anywhere; }
.sch-teil.sch-gedimmt { fill: #f3f4f6; stroke: color-mix(in srgb, var(--f) 35%, #fff); }   /* andere Gruppen bei Markierung */
.sch-legende-text .sch-kunde { color: var(--text, #1a1a1a); }
.sch-gruppierung { margin: 0.3rem 0 0.6rem; flex-wrap: wrap; }
.sch-gruppierung .chips-titel { flex-basis: 100%; }   /* Beschriftung über den Knöpfen, in der schmalen Spalte */
.sch-gruppe { margin: 0 0 0.7rem; }
.sch-gruppe ul { margin: 0.3rem 0 0 0.6rem; }
.sch-gruppe-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.5rem; width: 100%; text-align: left; font: inherit;
                   color: inherit; background: none; border: 0; border-left: 4px solid var(--f, #1f4a8a); padding: 0.25rem 0.5rem;
                   cursor: pointer; border-radius: 0 4px 4px 0; }
.sch-gruppe-kopf:hover { background: color-mix(in srgb, var(--f, #1f4a8a) 12%, #fff); }
.sch-gruppe.aktiv .sch-gruppe-kopf { background: color-mix(in srgb, var(--f, #1f4a8a) 26%, #fff); }
.sch-gruppe-kopf small { color: var(--muted); overflow-wrap: anywhere; }
/* Gruppenkopf mit eigenem Druckknopf rechts (Sammeldruck der Gruppe, 01.10.2026) */
.sch-gruppe-zeile { display: flex; align-items: stretch; gap: 0.4rem; }
.sch-gruppe-zeile .sch-gruppe-kopf { flex: 1; min-width: 0; }
.sch-gruppe-druck { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 3.2rem; min-height: 2.4rem;
                    border: 1px solid var(--rand); border-radius: 6px; background: #fff; color: #1f4a8a; cursor: pointer; padding: 0; }
.sch-gruppe-druck:hover { border-color: #1f4a8a; background: #eef1f5; }
/* Teile mit weiteren Bearbeitungen: Gegenschraffur als Auflage, Klicks gehen ans Teil darunter */
.sch-mehrfach { fill: url(#sch-mehrfach); stroke: none; pointer-events: none; }
.sch-mehrfach-linie { stroke: rgb(0 0 0 / 0.45); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.sch-mehrfach-hinweis { display: flex; align-items: center; gap: 0.4rem; margin: -0.2rem 0 0.6rem; font-size: 0.85rem; color: var(--muted); }
.sch-legende-text .sch-schritte, .sch-info-teil .sch-schritte { color: #1f4a8a; }
/* Angemeldet im Portal (16.10.2026): die Liste ist nebeneinander genau so hoch wie Infozeile + Platte und rollt für sich —
   sonst war die Seite so lang wie die Liste, und das Heranholen des markierten Eintrags rollte die Platte aus dem Bild.
   height 0 + min-height 100 %: die Liste bestimmt die Zeilenhöhe des Rasters nicht mit, füllt sie aber aus. */
@media (min-width: 901px) {
  .sch-ansicht:not(.sch-ansicht-fest) .sch-legende { align-self: stretch; height: 0; min-height: 100%; overflow-y: auto;
                                                     overscroll-behavior: contain; padding-right: 0.3rem; }
}
@media (max-width: 900px) {
  .sch-ansicht { grid-template-columns: 1fr; }
  .sch-buehne { height: 70vh; }
}
/* Restbleche der Schachtelung und Restplattenschnitt (SPEC 19.6, 01.10.2026) */
.sch-restflaeche { fill: url(#sch-schraffur); stroke: #8a6d00; stroke-width: 1.2; vector-effect: non-scaling-stroke; pointer-events: none; }
.sch-schraffur-linie { stroke: #b59a3c; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.sch-restschnitt { fill: none; stroke: #c62828; stroke-width: 2; stroke-dasharray: 8 5; vector-effect: non-scaling-stroke; pointer-events: none; }
.sch-nummern text.sch-restname { fill: #6b5300; font-weight: 700; }
/* „8/12“ mitten im angetippten Teil (15.10.2026, SPEC 14.15/19.6): fett, dunkel, mit weißem Rand gegen Teil und Schraffur */
.sch-nummern text.sch-anzahl-text { fill: #111; font-weight: 700; stroke: #fff; paint-order: stroke; stroke-linejoin: round; }
/* Seiten ohne Anmeldung (frei_basis.html, SPEC 19.6): nur Kopfleiste mit Logo und Titel, kein Seitenmenü */
.frei-topbar { gap: 0.7rem; }
.frei-logo { height: 1.7rem; width: auto; border-radius: 3px; background: #fff; }
.frei-titel { font-weight: 600; font-size: 1.05rem; }
/* Übersicht: CNC als großer Chip mit Vorschau der Platte; Zurück oben und Schließen in der freien Ansicht (01.10.2026) */
.sch-chip-zelle { padding-top: 0.3rem; padding-bottom: 0.3rem; }
.sch-chip { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0.8rem 0.3rem 0.3rem; border: 1px solid var(--rand);
            border-radius: 8px; background: #fff; text-decoration: none; color: var(--akzent-text, #1f4a8a); font-weight: 600;
            min-height: 3.6rem; box-shadow: 0 1px 2px rgb(0 0 0 / 0.06); }
.sch-chip:hover { border-color: #1f4a8a; background: #eef1f5; }
.sch-chip img { width: 72px; height: 56px; object-fit: contain; background: #f6f7f9; border-radius: 4px; flex: none; }
.sch-zurueck { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0 0 0.6rem; padding: 0.55rem 1.1rem; border: 1px solid var(--rand);
               border-radius: 8px; background: #fff; font-size: 1.1rem; font-weight: 600; text-decoration: none; color: #1f4a8a; }
.sch-zurueck:hover { background: #eef1f5; }
.frei-schliessen { margin-left: auto; padding: 0.35rem 0.9rem; border: 1px solid rgb(255 255 255 / 0.7); border-radius: 6px;
                   background: transparent; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.frei-topbar .instanz-tag.topbar-instanz + .frei-schliessen { margin-left: 0.6rem; }
.frei-seite main { max-width: none; }   /* Vollbild in TerminalV2: die ganze Breite für Liste und Platte */
/* Schachtelungen als Kacheln (01.10.2026): große Vorschau, darunter CNC, Job und Eigenschaften */
.sch-zaehl-wahl { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
/* gleich hohe Kacheln je Zeile (Dietmar 21.10.2026: „richte die Chips innerhalb einer Zeile immer auf die selbe Größe (=Höhe) aus“) */
.sch-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.9rem; margin: 0.6rem 0 1rem; align-items: stretch; }
.sch-kachel { display: flex; flex-direction: column; border: 1px solid var(--rand); border-radius: 10px; background: #fff; overflow: hidden;
              text-decoration: none; color: inherit; box-shadow: 0 1px 3px rgb(0 0 0 / 0.07); }
.sch-kachel:hover { border-color: #1f4a8a; box-shadow: 0 3px 10px rgb(31 74 138 / 0.18); }
.sch-kachel-bild { display: block; position: relative; aspect-ratio: 4 / 3; background: #f6f7f9; border-bottom: 1px solid var(--rand); }
/* fest im 4:3-Rahmen, auch bei schmalen, hohen Platten (SVG ohne eigene Größe würde die Kachel sprengen) */
.sch-kachel-bild img { position: absolute; inset: 0.5rem; width: calc(100% - 1rem); height: calc(100% - 1rem); object-fit: contain; }
.sch-kachel-text { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; padding: 0.6rem 0.8rem 0.8rem; font-size: 0.95rem; }
.sch-kachel-text b { font-size: 1.15rem; color: #1f4a8a; }
.sch-kachel-text small { color: var(--muted); }
.sch-kachel-auftraege { color: var(--muted); font-size: 0.88rem; overflow-wrap: anywhere; }
.sch-kachel-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.sch-kachel-text .sch-kachel-dicke { white-space: nowrap; }
/* Schneidezeit rechts in der Jobzeile (21.10.2026): kleine Uhr, Stunden:Minuten */
.sch-kachel-job { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.sch-zeit { display: inline-flex; align-items: center; gap: 0.25rem; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.sch-zeit svg { flex: none; }
/* Umschalter Lantek Schachtelungen · Offene Planung als Überschrift (SPEC 14.4/19.6, Dietmar 21.10.2026): zwei Knöpfe,
   genau einer gedrückt (Akzent gefüllt wie .ansicht-wahl), groß für den Finger am Terminal */
h1.sch-bereich { display: inline-flex; flex-wrap: wrap; margin: 0.4rem 0 0.8rem; border: 1px solid var(--rand); border-radius: 6px;
                 overflow: hidden; font-size: 1.45rem; line-height: 1.2; }
h1.sch-bereich a { display: inline-flex; align-items: center; min-height: 2.9rem; padding: 0.2rem 1.1rem; background: var(--karte);
                   color: var(--fg); text-decoration: none; }
h1.sch-bereich a + a { border-left: 1px solid var(--rand); }
h1.sch-bereich a:hover { background: #f3f6fa; }
h1.sch-bereich a.aktiv { background: var(--akzent); color: #fff; }
h1.sch-bereich a:focus-visible { outline: 2px solid var(--akzent); outline-offset: -4px; }
h1.sch-bereich a.aktiv:focus-visible { outline-color: #fff; }
@media (max-width: 600px) {   /* Telefon: beide Knöpfe nebeneinander über die volle Breite statt umzubrechen */
  h1.sch-bereich { display: grid; grid-template-columns: 1fr 1fr; width: 100%; box-sizing: border-box; font-size: 1.05rem; }
  h1.sch-bereich a { justify-content: center; text-align: center; padding: 0.2rem 0.5rem; }
}
/* Offene Planung (SPEC 19.6, 21.10.2026): links der Baum Maschine › Werkstoff › Blechstärke (alles offen, Knoten 2,6 rem
   hoch), rechts die Laser-Arbeitsgänge; unter 1000 px klappt der Baum über einen Knopf auf */
.sch-pl-raster { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.sch-pl-baumknopf { display: none; }
.sch-pl-baum { position: sticky; top: 0.6rem; max-height: calc(100vh - 1.5rem); overflow-y: auto; background: var(--karte);
               border: 1px solid var(--rand); border-radius: 4px; padding: 0.35rem; font-size: 0.95rem; }
.sch-pl-baum ul { list-style: none; margin: 0 0 0 1rem; padding: 0 0 0 0.2rem; border-left: 1px dashed var(--rand); }
.sch-pl-knoten { display: flex; align-items: center; gap: 0.45rem; min-height: 2.6rem; padding: 0.15rem 0.45rem; border-radius: 4px;
                 color: inherit; text-decoration: none; }
.sch-pl-knoten:hover { background: #f3f5f9; }
.sch-pl-knoten.aktiv { background: #e8eef7; font-weight: 600; }
.sch-pl-knoten svg { flex: none; color: #5b6b85; }
.sch-pl-name { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.sch-pl-maschine { font-weight: 600; }
.sch-pl-dicke .sch-pl-name { font-variant-numeric: tabular-nums; }
.sch-pl-zahl { flex: none; min-width: 1.6rem; padding: 0 0.4rem; border-radius: 999px; background: #eef1f6; color: var(--muted);
               font-size: 0.75rem; text-align: center; font-variant-numeric: tabular-nums; }
.sch-pl-knoten.aktiv .sch-pl-zahl { background: var(--akzent); color: #fff; }
/* Lantek Optimierer (SPEC 19.7): Blechstärke, deren Teile komplett auf einen Rest passen — kleines „R“ in Restfarbe */
.sch-pl-restmarke { flex: none; display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 3px;
                    background: #f3e6b8; border: 1px solid #8a6d00; color: #8a6d00; font-size: 0.7rem; font-weight: 700; }
.sch-optimierer { margin-top: 0.9rem; }
.sch-optimierer-rest { max-height: 60vh; }
.sch-mass line { stroke: #4a4f57; stroke-width: 1px; vector-effect: non-scaling-stroke; }   /* Außenbemaßung des Rests */
.sch-mass text { fill: #1a1a1a; text-anchor: middle; font-weight: 600; }
.sch-optimierer-klein { margin: 0.7rem 0 0; max-width: 22rem; }
.sch-optimierer-klein figcaption { margin-top: 0.2rem; font-size: 0.8rem; }
.sch-probe-platte-angedeutet { fill: #eeeeee; stroke: #d6d6d6; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.sch-pl-leer { padding: 0.4rem 0.5rem; margin: 0; }
.sch-pl-tabelle td { vertical-align: middle; }
.sch-pl-tabelle td.zahl { white-space: nowrap; }   /* „195 × 95 mm“ in einer Zeile */
.sch-pl-artikel { display: flex; align-items: center; gap: 0.5rem; min-width: 10rem; }
.sch-pl-artikel > span { overflow-wrap: anywhere; }
.sch-pl-mno { display: block; color: var(--muted); font-size: 0.78rem; }   /* Fertigungsauftrag unter dem Artikel */
/* 1280 px (TERMINAL03) ohne Überbreite: Auftraggeber einzeilig, der Artikel bricht um, Köpfe dürfen trennen (21.10.2026) */
.sch-pl-tabelle th { white-space: normal; }
.sch-pl-tabelle td.sch-pl-kunde { white-space: nowrap; }
.sch-pl-vorschau { flex: none; display: block; width: 56px; height: 42px; object-fit: contain; box-sizing: border-box; padding: 2px;
                   background: #f6f7f9; border: 1px solid var(--rand); border-radius: 3px; }
.sch-pl-ueberfaellig { color: var(--ueberfaellig-fg); font-weight: 600; }
/* „…“ ganz rechts je Fertigungsauftrag (04.11.2026): fingergroß wie das „…“ der Werkstatt-Leiste; die Liste sitzt beim
   Öffnen fest am Fenster (der Rollrahmen der Tabelle schnitte sie ab), Einträge 1 rem; gesperrte grau mit Grund darunter */
.sch-pl-tabelle td.sch-pl-aktionen { width: 1%; padding-left: 0.2rem; text-align: right; }
.sch-pl-mehr { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 2.6rem;
  min-height: 2.6rem; padding: 0 0.6rem; border: 1px solid var(--rand); border-radius: 3px; background: #fff; color: var(--fg);
  font-weight: 700; letter-spacing: 0.1em; }
.sch-pl-mehr:hover, .sch-pl-menue[open] > .sch-pl-mehr { background: #f0f0f0; border-color: var(--akzent); color: var(--akzent); }
.sch-pl-menue .menue-liste { z-index: 120; }
.sch-pl-menue .menue-liste button { font-size: 1rem; padding: 0.7rem 1.1rem; }
.sch-pl-menue .menue-liste button:disabled { color: var(--muted); cursor: default; background: none; }
.sch-pl-menue .menue-liste button small { display: block; font-size: 0.78rem; color: var(--muted); }
.sch-pl-meldung { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 130; margin: 0;
  padding: 0.6rem 1rem; background: var(--karte); border: 1px solid var(--rand); border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14); }
.sch-pl-meldung.fehler { color: var(--ueberfaellig-fg); border-color: var(--ueberfaellig-fg); background: var(--ueberfaellig-bg); }
/* Probeschachtelung (SPEC 19.6, 21.10.2026): Knopf über der Tabelle, Ergebnis im Stil der Plattenvorschau; deutlich als
   Probe gekennzeichnet (keine Lantek-Schachtelung) */
.sch-probe { margin: 0.9rem 0 0; }
.sch-probe-knopf { min-height: 2.6rem; }
.sch-probe-laeuft { margin-left: 0.7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sch-probe-ergebnis:empty { display: none; }
.sch-probe-ergebnis { margin-top: 0.7rem; padding: 0.7rem 0.8rem; border: 1px solid var(--rand); border-radius: 4px; background: var(--karte); }
.sch-probe-titel { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.7rem; margin: 0 0 0.3rem; font-weight: 600; }
.sch-probe-werte { margin: 0 0 0.6rem; }
.sch-probe-passt { color: var(--erledigt-fg); } .sch-probe-passt-nicht { color: var(--ueberfaellig-fg); }
.sch-probe-platte { display: block; width: 100%; height: auto; }
.sch-probe-blech { fill: #e3e7ee; stroke: #6b7380; stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.sch-probe-nutz { fill: none; stroke: #9aa3b1; stroke-width: 1px; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.sch-probe-rest { fill: #f3e6b8; stroke: #8a6d00; stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.sch-probe-teil { fill: #c9d6ea; stroke: #1f4a8a; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.sch-probe-teil:hover { fill: #9db6dc; }
.sch-probe-platte [data-zeile] { cursor: pointer; }                /* Klick aufs Teil markiert seine Tabellenzeile */
.sch-probe-teil.sch-teil-gewaehlt { fill: var(--akzent); }        /* Teile der markierten Tabellenzeile (SPEC 14.5/19.6) */
.sch-probe-nr.sch-teil-gewaehlt { fill: #fff; }
.sch-probe-kante { stroke: var(--ueberfaellig-fg); stroke-width: 3px; stroke-dasharray: 10 6; vector-effect: non-scaling-stroke; }
.sch-probe-nr { text-anchor: middle; dominant-baseline: central; font-weight: 700; fill: #1a1a1a; pointer-events: none; }
.sch-probe-restname { font-size: 60px; text-anchor: middle; dominant-baseline: middle; font-weight: 600; fill: #8a6d00; }
.sch-probe-legende { margin-top: 0.6rem; border-collapse: collapse; font-size: 0.85rem; }
.sch-probe-legende th, .sch-probe-legende td { padding: 0.2rem 0.6rem; border-bottom: 1px solid var(--rand); text-align: left; }
.sch-probe-legende th { color: var(--muted); font-weight: 600; } .sch-probe-legende .zahl { text-align: right; }
.sch-probe-fehler { margin: 0.4rem 0; color: var(--ueberfaellig-fg); font-weight: 600; }
.sch-probe-annahmen { margin: 0.5rem 0 0; font-size: 0.8rem; }
@media (max-width: 1000px) {
  .sch-pl-raster { display: block; }
  .sch-pl-baumknopf { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; width: 100%; min-height: 2.9rem;
                      margin-bottom: 0.6rem; padding: 0.4rem 0.8rem; border: 1px solid var(--rand); border-radius: 4px;
                      background: var(--karte); color: inherit; font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
  .sch-pl-wahl { font-weight: 400; color: var(--muted); }
  .sch-pl-baum { display: none; position: static; max-height: none; margin-bottom: 0.8rem; }
  .sch-pl-rahmen.baum-offen .sch-pl-baum { display: block; }
}
/* Kommissionierungsdetails im Etikettendialog eines Auftrags (14.10.2026, vorher ein zweites Fenster): Umschalter unten
   links, das PDF ersetzt die Etiketten im selben Fenster (dann feste Höhe), Drucken über den Druckdialog von Windows */
.sch-etikett-aktionen .sch-komm-knopf { margin-right: auto; }
@media (max-width: 40rem) { .sch-etikett-aktionen .sch-komm-knopf { flex: 1 0 100%; margin-right: 0; } }   /* Handy: eigene Zeile über Abbrechen/Drucken */
.sch-etikett-aktionen button.primaer:disabled { opacity: 0.45; cursor: not-allowed; }   /* gesperrt (PDF lädt, keine Auswahl) sichtbar */
.sch-sammel-dialog.sch-komm-an { height: min(92vh, 60rem); }
.sch-komm-rahmen { flex: 1; min-height: 0; border: 1px solid var(--rand); border-radius: 6px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; }
/* PDF mit pdf.js im eigenen Rollbereich (15.10.2026): in TerminalV2 greift die 48-px-Leiste von html.in-huelle, rollt mit dem Finger */
.sch-komm-seiten { align-self: stretch; flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: .5rem; padding: .5rem; }
.sch-komm-seite { flex: none; width: 100%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.sch-komm-seite canvas { display: block; width: 100%; height: auto; }
.sch-komm-druck { position: fixed; right: 0; bottom: 0; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }
/* Mehrfach zu schneidende Platte (Lantek Quantity > 1, 07.10.2026): „3×“ als Abzeichen hinter der Nummer */
.sch-anzahl { display: inline-block; padding: 0 0.4em; border-radius: 0.5em; background: #e8820c; color: #fff; font-weight: 800;
              font-size: 0.85em; line-height: 1.45; vertical-align: 0.08em; white-space: nowrap; }
/* Plattenstatus mit Lantek-Symbol (06.10.2026): Text links, Symbol rechts unten in der Kachel */
/* Symbol mittig zur Zeile des Statustexts, bis auf 4 px an den rechten Kachelrand gerückt (Dietmar 06.10.2026) */
.sch-kachel-phase { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: auto; padding-top: 0.25rem; margin-right: calc(4px - 0.8rem); font-weight: 600; }
.sch-kachel-phase.sch-phase-programmierung { color: var(--muted); }
.sch-kachel-phase img { flex: none; display: block; }
.sch-phase-symbol { width: 21px; height: 18px; vertical-align: -4px; margin-right: 0.35rem; }
/* Terminal: Reiterleiste bei vielen Angemeldeten (01.10.2026) — kompakt, dann „+N“ für die übrigen */
.tm-reiter.tm-reiter-kompakt .tm-reiter-knopf { padding: 0 0.75rem; font-size: 1.7rem; gap: 0.45rem; }
.tm-reiter.tm-reiter-kompakt .tm-reiter-knopf img, .tm-reiter.tm-reiter-kompakt .tm-reiter-initialen { width: 3.2rem; height: 3.2rem; }
.tm-reiter-knopf.tm-reiter-mehr { font-weight: 700; background: #fff; border-style: dashed; min-width: 5rem; justify-content: center; }
.tm-reiter-knopf[hidden] { display: none; }
/* Bauteil-Etikette je Eintrag (01.10.2026): Druckknopf rechts am Chip, Vorschaudialog mit Anzahl */
.sch-legende-eintrag { display: flex; gap: 0.35rem; align-items: stretch; }
.sch-legende-eintrag .sch-legende-zeile { flex: 1; min-width: 0; }
.sch-etikett-knopf { flex: none; width: 3.2rem; display: grid; place-items: center; border: 1px solid var(--rand); border-radius: 6px;
                     background: #fff; color: #1f4a8a; cursor: pointer; }
.sch-etikett-knopf:hover { border-color: #1f4a8a; background: #eef1f5; }
/* Zweiter Knopf unter dem Drucker: Nochmal schneiden (16.10.2026) — beide teilen sich die Höhe des Eintrags */
.sch-eintrag-knoepfe { flex: none; display: flex; flex-direction: column; gap: 0.35rem; }
.sch-eintrag-knoepfe .sch-etikett-knopf { flex: 1; min-height: 2.8rem; }
/* Detailfenster je Eintrag (16.10.2026): Pfeil nach links vor dem Chip öffnet/schließt das eine #sch-detail (fest, links neben
   der Liste auf Höhe des Eintrags, schmal darunter) mit den Stückzahlen — helle Karte wie die Chips, ein Rahmen */
.sch-detail-pfeil { flex: none; width: 1.9rem; display: grid; place-items: center; padding: 0; border: 1px solid #d5d9df;
                    border-radius: 6px; background: #e9ecf0; color: #1f4a8a; cursor: pointer; }
.sch-detail-pfeil:hover { background: #d3dcea; border-color: #b4c2d8; }
.sch-detail-pfeil:active { background: #c2d0e6; }
.sch-detail-pfeil[aria-expanded="true"] { background: #1f4a8a; color: #fff; }
.sch-detail-pfeil[aria-expanded="true"] svg { transform: scaleX(-1); }
.sch-detail { position: fixed; z-index: 30; width: min(18rem, calc(100vw - 16px)); padding: 0.6rem 0.8rem; background: #fff;
              border: 1px solid var(--akzent); border-radius: 8px; box-shadow: 0 4px 14px rgb(0 0 0 / 0.12); }
.sch-detail ul { display: block; margin: 0; padding: 0; list-style: none; line-height: 1.5; }
.sch-detail .sch-schritte { color: #1f4a8a; }
/* „gebogen“ öffnet die Biegeinfo (17.10.2026): unterstrichen wie ein Link, mit Fläche für den Finger */
.sch-biege-link { display: inline; margin: -0.35rem -0.2rem; padding: 0.35rem 0.2rem; border: 0; background: none; font: inherit;
                  font-weight: 700; color: #1f4a8a; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sch-biege-link:hover, .sch-biege-link:active { background: #e9eef6; border-radius: 4px; }
.sch-biege-link:disabled { opacity: 0.55; cursor: progress; }
/* Nochmal schneiden: Teil groß, darunter Materialart und Dicke der Platte, darunter die Anzahl */
.sch-nb-dialog { width: min(40rem, 96vw); }
.sch-nb-teil { display: block; width: 100%; height: min(16rem, 34vh); margin: 0.4rem 0 0.8rem; background: #f6f7f9;
               border: 1px solid var(--rand); border-radius: 6px; }
.sch-nb-umriss { fill: color-mix(in srgb, #1f4a8a 18%, #fff); stroke: #1f4a8a; stroke-width: 2; vector-effect: non-scaling-stroke; }
.sch-nb-werte { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.2rem; margin: 0 0 0.6rem; font-size: 1.15rem; }
.sch-nb-werte dt { color: var(--muted); }
.sch-nb-werte dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.sch-nb-anzahl { justify-content: center; }
.sch-etikett-dialog { border: 0; border-radius: 10px; padding: 1.1rem 1.3rem; width: min(40rem, 94vw); box-shadow: 0 10px 40px rgb(0 0 0 / 0.3); }
.sch-etikett-dialog::backdrop { background: rgb(0 0 0 / 0.45); }
.sch-etikett-dialog h2 { margin: 0 0 0.3rem; font-size: 1.25rem; }
.sch-etikett-name { margin: 0 0 0.6rem; font-weight: 600; overflow-wrap: anywhere; }
.sch-etikett-bild { display: grid; place-items: center; min-height: 10rem; background: #f6f7f9; border: 1px solid var(--rand); border-radius: 6px; padding: 0.5rem; }
.sch-etikett-bild img { width: 100%; height: auto; display: block; background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 0.15); }
.sch-etikett-anzahl { display: flex; align-items: center; gap: 0.6rem; margin: 0.8rem 0 0.2rem; font-weight: 600; }
.sch-etikett-anzahl input { width: 5.5rem; font-size: 1.3rem; padding: 0.3rem 0.5rem; text-align: center; }
.sch-etikett-meldung { min-height: 1.3em; margin: 0.4rem 0; }
.sch-etikett-meldung.ok { color: #1d6b2f; font-weight: 600; } .sch-etikett-meldung.fehler { color: #a40010; font-weight: 600; }
.sch-etikett-aktionen { display: flex; justify-content: flex-end; gap: 0.6rem; flex-wrap: wrap; }   /* schmal: umbrechen statt links abschneiden */
.sch-etikett-aktionen button { min-height: 2.8rem; padding: 0 1.2rem; font-size: 1.05rem; }
/* Ohne Anmeldung: die Platte bleibt stehen, die Liste rechts rollt für sich (01.10.2026) */
.sch-ansicht-fest .sch-legende { position: sticky; top: 0.5rem; max-height: calc(100vh - 13rem); overflow-y: auto; padding-right: 0.3rem; }
@media (max-width: 900px) { .sch-ansicht-fest .sch-legende { position: static; max-height: none; overflow: visible; } }
/* In TerminalV2 (Lantek_Schachtelungen_starten.cmd): Bildlaufleisten dreifach breit wie im Terminal (48 px). WebView2 =
   Chromium, daher ::-webkit-scrollbar; scrollbar-width darf hier nicht gesetzt sein. */
html.in-huelle ::-webkit-scrollbar { width: 48px; height: 48px; }
html.in-huelle ::-webkit-scrollbar-track { background: #ececec; border-left: 1px solid #d4d4d4; }
html.in-huelle ::-webkit-scrollbar-thumb { background: #9a9a9a; border: 6px solid #ececec; border-radius: 3px; min-height: 96px; }
html.in-huelle ::-webkit-scrollbar-thumb:active { background: #6a6a6a; }
html.in-huelle ::-webkit-scrollbar-button { display: none; }
/* Höhen ohne Anmeldung: Kopf mit „← Übersicht“ ist höher — Platte und Liste passen ohne Seitenrollen in den Bildschirm */
.sch-ansicht-fest .sch-buehne { height: calc(100vh - 24rem); }
.sch-ansicht-fest .sch-legende { max-height: calc(100vh - 17.2rem); }
/* Anzahl im Etikettendialog: große − / + (01.10.2026) */
.sch-etikett-anzahl > span { margin-right: 0.4rem; }
.sch-zaehler { width: 4rem; height: 4rem; font-size: 2.2rem; font-weight: 700; line-height: 1; border: 1px solid var(--rand); border-radius: 8px;
               background: #fff; color: #1f4a8a; cursor: pointer; }
.sch-zaehler:hover { background: #eef1f5; border-color: #1f4a8a; }
.sch-etikett-anzahl input { width: 5.5rem; height: 4rem; font-size: 2rem; font-weight: 700; padding: 0.2rem; text-align: center; -moz-appearance: textfield; }
.sch-etikett-anzahl input::-webkit-outer-spin-button, .sch-etikett-anzahl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* Laser schneidet beim Öffnen einmal den Restplattenschnitt (01.10.2026, wie track.alpintec.com) */
.sch-restflaeche.sch-vor-schnitt, .sch-restschnitt.sch-vor-schnitt, .sch-restname.sch-vor-schnitt { opacity: 0; }
.sch-restflaeche.sch-nach-schnitt, .sch-restschnitt.sch-nach-schnitt, .sch-restname.sch-nach-schnitt { opacity: 1; transition: opacity 0.6s ease; }
.sch-laser-spur { fill: none; stroke: #ff3b1f; stroke-linecap: round; pointer-events: none; }   /* Breite im Skript, in Plattenmaß */
.sch-laser-funke { fill: #ffe066; opacity: 0; pointer-events: none; filter: drop-shadow(0 0 6px #ff5a00) drop-shadow(0 0 2px #ff2a00); }
/* Freie Übersicht frischt sich auf (01.10.2026): neue Platten leuchten kurz auf */
@keyframes sch-neu-leuchten { 0%, 30% { box-shadow: 0 0 0 4px #ffb300; background-color: #fff6d6; } 100% { box-shadow: 0 0 0 0 transparent; } }
.sch-kachel.sch-neu { animation: sch-neu-leuchten 6s ease-out; }
tr.sch-neu > td { animation: sch-neu-zeile 6s ease-out; }
@keyframes sch-neu-zeile { 0%, 30% { background-color: #fff3c4; } 100% { background-color: transparent; } }
.sch-kachel.sch-ohne-cnc { cursor: default; box-shadow: none; } .sch-kachel.sch-ohne-cnc b.kennung { color: var(--muted); }
/* Rückfrage „Anwendung beenden?“ in der Kioskansicht (01.10.2026) */
.frei-beenden { border: 0; border-radius: 12px; padding: 1.4rem 1.6rem; width: min(30rem, 92vw); box-shadow: 0 10px 40px rgb(0 0 0 / 0.35); }
.frei-beenden::backdrop { background: rgb(0 0 0 / 0.5); }
.frei-beenden h2 { margin: 0 0 0.5rem; font-size: 1.5rem; }
.frei-beenden-aktionen { display: flex; justify-content: flex-end; gap: 0.8rem; margin-top: 1.2rem; }
.frei-beenden-aktionen button { min-height: 3.6rem; padding: 0 1.5rem; font-size: 1.2rem; }
.frei-beenden-ja { background: #b3001b; border-color: #b3001b; }
/* Weitere Filter der Schachtelungen (01.10.2026): Trichter neben „Suchen“, gesetzt = gefüllt, blau, mit Anzahl */
.sch-filter-knopf { position: relative; display: inline-grid; place-items: center; width: 2.6rem; height: 2.4rem; border: 1px solid var(--rand);
                    border-radius: 6px; background: #fff; color: var(--muted); cursor: pointer; }
.sch-filter-knopf:hover { border-color: #1f4a8a; color: #1f4a8a; }
.sch-filter-knopf.aktiv { background: #1f4a8a; border-color: #1f4a8a; color: #fff; }
.sch-filter-zahl { position: absolute; top: -0.45rem; right: -0.45rem; min-width: 1.25rem; height: 1.25rem; padding: 0 0.2rem; border-radius: 999px;
                   background: #c77700; color: #fff; font-size: 0.75rem; font-weight: 700; display: grid; place-items: center; }
.sch-filter-aktiv { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; margin: -0.3rem 0 0.6rem; color: var(--muted); }
.sch-filter-wert b { color: var(--text, #1a1a1a); }
.sch-filter-dialog { border: 0; border-radius: 10px; padding: 1.1rem 1.3rem; width: min(30rem, 94vw); box-shadow: 0 10px 40px rgb(0 0 0 / 0.3); }
.sch-filter-dialog::backdrop { background: rgb(0 0 0 / 0.45); }
.sch-filter-dialog h2 { margin: 0; font-size: 1.25rem; }
.sch-filter-dialog label { display: grid; gap: 0.25rem; margin: 0.7rem 0; font-weight: 600; }
.sch-filter-dialog select { font-size: 1.05rem; padding: 0.45rem 0.5rem; min-height: 2.8rem; }
.sch-filter-aktionen { display: flex; gap: 0.6rem; margin-top: 1rem; }
.sch-filter-aktionen span { flex: 1; }
.sch-filter-aktionen button { min-height: 2.8rem; padding: 0 1.1rem; }
/* Schachtelungen: Chips der Filterleiste groß für die Fingerbedienung (Dietmar 01.10.2026: „breiter … wegen Wurstfinger“) */
.sch-uebersicht .liste-filter { gap: 0.8rem 1.4rem; }
.sch-uebersicht .chips { gap: 0.6rem; }
.sch-uebersicht form.stamm-filter .chip > span { min-height: 2.5rem; min-width: 5.25rem; padding: 0 1rem; font-size: 0.9rem; justify-content: center; }   /* −30 % (Dietmar 01.10.2026) */
.sch-uebersicht .chip > span::before { width: 0.85rem; height: 0.85rem; }
.sch-uebersicht .sch-filter-knopf { width: 2.8rem; height: 2.5rem; }
/* Vollständig zurückgemeldete Platten (01.10.2026): grüner Rand, Haken vor der Nummer — sonst wie alle anderen */
.sch-kachel.sch-gemeldet, .sch-chip.sch-gemeldet { border: 2px solid #2e7d32; }
.sch-kachel.sch-gemeldet:hover, .sch-chip.sch-gemeldet:hover { border-color: #1b5e20; }
.sch-haken { display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; margin-right: 0.35em; border-radius: 50%;
             background: #2e7d32; color: #fff; font-size: 0.8em; font-weight: 700; vertical-align: 0.1em; }
/* Sammeldruck der Etiketten (01.10.2026): Knopf neben „Gruppiert nach“, Dialog mit einer Vorschau je Eintrag */
.sch-sammel-knopf { display: inline-flex; align-items: center; gap: 0.35rem; margin-left: 0.4rem; padding: 0.35rem 0.7rem; border: 1px solid var(--rand);
                    border-radius: 999px; background: #fff; color: #1f4a8a; cursor: pointer; font: inherit; font-weight: 600; }
.sch-sammel-knopf:hover { border-color: #1f4a8a; background: #eef1f5; }
/* Platte rückmelden (SPEC 19.6): Rückfrage und Meldung wie die Etiketten-Dialoge, mit Tabelle der Teilzeilen */
.sch-rm-dialog { border: 0; border-radius: 10px; padding: 1.1rem 1.3rem; width: min(58rem, 96vw); max-height: 92vh; box-shadow: 0 10px 40px rgb(0 0 0 / 0.3); }
.sch-rm-dialog::backdrop { background: rgb(0 0 0 / 0.45); }
.sch-rm-dialog[open] { display: flex; flex-direction: column; gap: 0.6rem; }
.sch-rm-dialog h2 { margin: 0; font-size: 1.25rem; }
.sch-rm-dialog .sch-rm-text { margin: 0; }
.sch-rm-hinweis { margin: 0; color: var(--muted); font-size: 0.88rem; }
.sch-rm-hinweis:empty, .sch-rm-folgen:empty { display: none; }
.sch-rm-sicher { margin: 0; padding: 0.6rem 0.8rem; border-left: 4px solid var(--ueberfaellig-fg); border-radius: 4px;
  background: color-mix(in srgb, var(--ueberfaellig-fg) 9%, var(--karte)); font-weight: 600; }
.sch-rm-sicher[hidden] { display: none; }
.sch-rm-liste { overflow: auto; min-height: 0; }
.sch-rm-tabelle { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.sch-rm-tabelle th, .sch-rm-tabelle td { text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--rand); vertical-align: top; }
.sch-rm-tabelle th { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
.sch-rm-tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.sch-rm-tabelle tr.fertig td:last-child { color: var(--erledigt-fg); font-weight: 600; }
.sch-rm-folgen { margin: 0; padding-left: 1.2rem; font-weight: 600; }
/* nach dem Rückmelden bleibt das Restgitter: stahlgrau, damit die Löcher der herausgefallenen Teile deutlich sind */
/* Terminal: Auswahl „Wer meldet zurück?“ — große Kacheln mit Ausweisbild bzw. Initialen, gut zu treffen */
.sch-rm-personen { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.6rem; }
button.sch-rm-person { display: grid; justify-items: center; gap: 0.25rem; min-height: 8.5rem; padding: 0.8rem 0.5rem; border: 1px solid var(--rand);
  border-radius: 8px; background: var(--karte); color: var(--fg); font: inherit; cursor: pointer; }
button.sch-rm-person:hover, button.sch-rm-person:focus-visible { border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 8%, var(--karte)); }
.sch-rm-person small { color: var(--muted); }
button.sch-rm-person:disabled { cursor: progress; opacity: 0.55; }
button.sch-rm-person.wartet { opacity: 1; border-color: var(--akzent); }
button.sch-rm-person.wartet small::after { content: " · wird geprüft"; color: var(--akzent); }
.sch-rm-bild { position: relative; width: 4rem; height: 4rem; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: color-mix(in srgb, var(--akzent) 15%, var(--karte)); color: var(--akzent); font-weight: 700; font-size: 1.2rem; }
.sch-rm-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sch-blech.sch-restgitter { fill: #8f9aab; transition: fill 0.6s; }
.sch-sammel-dialog { border: 0; border-radius: 10px; padding: 1rem 1.2rem; width: min(64rem, 96vw); max-height: 92vh;
                     box-shadow: 0 10px 40px rgb(0 0 0 / 0.3); display: none; }
.sch-sammel-dialog[open] { display: flex; flex-direction: column; gap: 0.6rem; }
.sch-sammel-dialog::backdrop { background: rgb(0 0 0 / 0.45); }
.sch-sammel-kopf { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.sch-sammel-kopf h2 { margin: 0 auto 0 0; font-size: 1.25rem; }
.sch-sammel-zahl { color: var(--muted); }
.sch-sammel-kopf button { min-height: 2.6rem; padding: 0 1rem; }
.sch-sammel-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 0.7rem; overflow-y: auto; min-height: 0; padding: 0.2rem; }
.sch-sammel-eintrag { position: relative; display: grid; gap: 0.3rem; padding: 0.5rem; border: 2px solid var(--rand); border-radius: 8px; cursor: pointer; background: #fff; }
.sch-sammel-eintrag:has(input:checked) { border-color: #1f4a8a; background: #f4f7fb; }
.sch-sammel-eintrag:not(:has(input:checked)) { opacity: 0.5; }
.sch-sammel-eintrag input { position: absolute; top: 0.6rem; left: 0.6rem; width: 1.6rem; height: 1.6rem; accent-color: #1f4a8a; }
.sch-sammel-bild { display: block; aspect-ratio: 67 / 34; background: #fff; border: 1px solid var(--rand); border-radius: 4px; overflow: hidden; }
.sch-sammel-bild img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sch-sammel-text { display: grid; font-size: 0.9rem; overflow-wrap: anywhere; }
.sch-sammel-text small { color: var(--muted); }
/* Admin › Töne (SPEC 26.7): Zuordnung links, Katalog zum Probehören rechts */
.ton-seite { display: grid; grid-template-columns: minmax(0, 3fr) minmax(16rem, 2fr); gap: 2rem; align-items: start; }
@media (max-width: 1000px) { .ton-seite { grid-template-columns: 1fr; } }
.ton-zuordnung td { vertical-align: middle; }
.ton-zuordnung select { min-width: 13rem; }
.ton-zuordnung .ton-gruppe th { text-align: left; padding-top: 1rem; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ton-spalte-knopf { width: 3rem; }
.ton-probe { width: 2.4rem; height: 2.4rem; border: 1px solid var(--rand); border-radius: 50%; background: #fff; color: #1f4a8a;
             cursor: pointer; font-size: 0.9rem; line-height: 1; padding: 0 0 0 0.15rem; }
.ton-probe:hover { border-color: #1f4a8a; background: #eef1f5; }
.ton-probe:disabled { opacity: 0.35; cursor: default; }
.ton-katalog { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.ton-katalog li { display: flex; gap: 0.7rem; align-items: center; padding: 0.4rem 0.5rem; border: 1px solid var(--rand); border-radius: 6px; background: #fff; }
.ton-katalog .ton-probe { flex: none; }

/* Wertelisten am Handy (03.10.2026, Handyprüfung Nr. 5): je Eintrag Bezeichnung über die ganze Breite, darunter Reihung,
   Status und Speichern — vorher war die Bezeichnung 92 px schmal und der Schalter rechts angeschnitten */
@media (max-width: 700px) {
  .tabelle-scroll:has(> table.werteliste) { overflow: visible; margin: 0; padding: 0; }
  table.werteliste { display: block; min-width: 0 !important; }
  table.werteliste thead { display: none; }
  table.werteliste tbody { display: block; }
  table.werteliste tr { display: grid; grid-template-columns: 6.5rem 1fr auto; gap: 0.5rem 0.7rem; align-items: center;
                        padding: 0.7rem 0.8rem; margin-bottom: 0.6rem; border: 1px solid var(--rand); border-radius: 6px; background: var(--karte); }
  table.werteliste td { display: block; padding: 0; border: 0; text-align: left !important; }
  table.werteliste td.primaer { grid-column: 1 / -1; grid-row: 1; }
  table.werteliste td.primaer input { width: 100%; }
  table.werteliste td.zahl input { width: 100%; }
  table.werteliste td[data-label]::before { content: attr(data-label); display: block; font-size: 0.72rem; color: var(--muted);
                                           text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.15rem; }
  table.werteliste td .mini { min-height: 40px; padding: 0 1rem; }
  table.werteliste td[colspan] { grid-column: 1 / -1; }
}

/* Wissen: QR-Code der Seite (SPEC 29.3, 06.10.2026) */
.wissen-qr-knopf { display: inline-flex; align-items: center; justify-content: center; padding-inline: 0.55rem; }
.wissen-qr-knopf svg { width: 1.125rem; height: 1.125rem; }   /* so hoch wie die Textknöpfe daneben */
.wissen-qr { width: min(24rem, 94vw); }
.wissen-qr .modal-inhalt { padding: 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; text-align: center; }
.wissen-qr img { width: min(280px, 70vw); height: auto; }
.wissen-qr-link { margin: 0; font-size: 0.85em; word-break: break-all; }
.wissen-qr .hinweis { margin: 0; font-size: 0.85em; }
.wissen-qr .modal-aktionen { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }

/* ERP V4 › Tätigkeitsgruppen (SPEC 25.17, 07.10.2026): links die Gruppen, rechts die gewählte Gruppe */
.ev4tg { display: grid; grid-template-columns: minmax(14rem, 18rem) 1fr; gap: 1.2rem; align-items: start; }
.ev4tg-gruppen { display: flex; flex-direction: column; gap: 0.35rem; }
.ev4tg-gruppe { display: grid; gap: 0.1rem; padding: 0.55rem 0.75rem; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte);
                color: var(--fg); text-decoration: none; }
.ev4tg-gruppe:hover { border-color: var(--akzent); }
.ev4tg-gruppe.aktiv { border-color: var(--akzent); box-shadow: inset 4px 0 0 var(--akzent); }
.ev4tg-gruppe small, .ev4tg-zahl { color: var(--muted); font-size: 0.85rem; }
.ev4tg-detail { min-width: 0; }
.ev4pl-gruppe-uebernehmen { display: flex; flex-wrap: wrap; align-items: end; gap: 0.6rem; margin: 0.6rem 0; }
.ev4pl-gruppe-uebernehmen label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.9em; color: var(--muted); }
.ev4pl-gruppe-uebernehmen select, .ev4pl-gruppe-uebernehmen button { height: 2.4rem; box-sizing: border-box; }   /* auf einer Linie */
.ev4pl-gruppe-uebernehmen select { min-width: 16rem; font-size: 0.95rem; color: var(--fg); }
.ev4tg-spalten { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem); gap: 1rem; align-items: start; }
.ev4tg-links { min-height: 6rem; border-radius: 8px; }
.ev4tg-links.ev4tg-drop { outline: 2px dashed var(--akzent); outline-offset: 4px; }
.ev4tg-schnell { margin: 0 0 0.6rem; max-width: 34rem; }
.ev4tg-schnell label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.9em; color: var(--muted); }
.ev4tg-verfuegbar { position: sticky; top: 0.8rem; border: 1px solid var(--rand); border-radius: 8px; background: var(--karte); padding: 0.6rem 0.7rem; }
.ev4tg-verfuegbar h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.ev4tg-suche { width: 100%; box-sizing: border-box; margin-bottom: 0.4rem; }
/* beide Suchfelder wie die Formularfelder der Maske (Rand, Höhe, Schrift) */
.ev4tg-suche, .ev4tg-schnell input[role=combobox] { height: 2.3rem; padding: 0.35rem 0.6rem; border: 1px solid var(--rand); border-radius: 4px;
                                                    font: inherit; font-size: 0.95rem; color: var(--fg); background: #fff; width: 100%; box-sizing: border-box; }
.ev4tg-suche:focus, .ev4tg-schnell input[role=combobox]:focus { outline: 2px solid var(--akzent); outline-offset: -1px; }
.ev4tg-vliste { max-height: 60vh; overflow-y: auto; display: grid; gap: 0.5rem; }
.ev4tg-vgruppe { display: grid; gap: 0.15rem; }
.ev4tg-v { text-align: left; background: none; border: 1px solid transparent; border-radius: 5px; padding: 0.25rem 0.45rem; cursor: grab;
           font: inherit; font-size: 0.92rem; color: var(--fg); }
.ev4tg-v:hover { background: #eef2f8; border-color: var(--rand); }
.ev4tg-tipp { margin: 0.5rem 0 0; font-size: 0.82rem; }
/* Ziehen in der Gruppe: ganze Zeile, Einfügemarke als Linie (galt bisher nur in der Projektplanung) */
#ev4tg-taetigkeiten tbody tr { cursor: grab; }
#ev4tg-taetigkeiten tbody tr:active { cursor: grabbing; }
#ev4tg-taetigkeiten .ev4pl-griff { white-space: nowrap; user-select: none; }
#ev4tg-taetigkeiten .ev4pl-griffpunkte { color: var(--muted); letter-spacing: -0.15em; margin-right: 0.2rem; }
#ev4tg-taetigkeiten tr.ev4pl-zieht td { opacity: 0.45; }
#ev4tg-taetigkeiten tr.ev4pl-drop-davor td { box-shadow: inset 0 3px 0 var(--akzent); }
#ev4tg-taetigkeiten tr.ev4pl-drop-danach td { box-shadow: inset 0 -3px 0 var(--akzent); }
#ev4tg-taetigkeiten td { white-space: nowrap; }
.ev4tg-weg { width: 1%; text-align: right; }
.ev4tg-weg button.ev4tg-muell { display: inline-flex; align-items: center; justify-content: center; padding: 0.2rem 0.35rem; color: #a10000; }
.ev4tg-weg button.ev4tg-muell:hover { background: #fdecea; border-color: #a10000; }
.ev4tg-muell svg { width: 1.05rem; height: 1.05rem; }
.ev4tg-links, .ev4tg-detail { min-width: 0; }
.ev4tg-tabelle-rahmen { overflow-x: auto; }
@media (max-width: 900px) { .ev4tg, .ev4tg-spalten { grid-template-columns: minmax(0, 1fr); } .ev4tg-verfuegbar { position: static; } }


/* Biegeinfo der Arbeitsrückmeldungen (SPEC 19.5, 14.15; 08.10.2026): Info-Knopf links neben dem QR-Knopf, großer Dialog mit
   Biegefolge, 3D-Ansicht je Biegeschritt (three.js), Rüstplan und Werkzeugprofilen aus Cadman */
.ws-karte button.ws-info-knopf { min-height: 2.8rem; width: 2.8rem; padding: 0; margin-left: auto; display: inline-flex; align-items: center; justify-content: center; }
.ws-karte button.ws-info-knopf + .ws-qr-knopf { margin-left: 0; }
.modal.bi-modal { width: min(72rem, 96vw); max-height: 94vh; overflow: auto; position: relative; padding: 1rem 1.4rem 1.2rem; }
.bi-scroll { overflow-x: auto; }
/* Breite Bildlaufleiste wie im Terminal (48 px, 17.10.2026): in TerminalV2 kommt sie von html.in-huelle, an jedem anderen
   Touchgerät (Lantek-Terminal, Werkstatt) von pointer: coarse — der Dialog ist lang und rollt nur am Finger. Schmal bleibt
   sie am Desktop und in den Arbeitsrückmeldungen außerhalb des Vollbilds (body.tm-seite[data-vollbild="0"] wiegt mehr). */
@media (pointer: coarse) {
  .bi-modal::-webkit-scrollbar, .bi-modal ::-webkit-scrollbar { width: 48px; height: 48px; }
  .bi-modal::-webkit-scrollbar-track, .bi-modal ::-webkit-scrollbar-track { background: #ececec; border-left: 1px solid #d4d4d4; }
  .bi-modal::-webkit-scrollbar-thumb, .bi-modal ::-webkit-scrollbar-thumb { background: #9a9a9a; border: 6px solid #ececec; border-radius: 3px; min-height: 96px; }
  .bi-modal::-webkit-scrollbar-thumb:active, .bi-modal ::-webkit-scrollbar-thumb:active { background: #6a6a6a; }
  .bi-modal::-webkit-scrollbar-button, .bi-modal ::-webkit-scrollbar-button { display: none; }
}
.bi-modal > * { flex-shrink: 0; }   /* .modal ist eine Flex-Spalte: Ansicht und Tabelle sonst gestaucht */
.bi-modal .modal-schliessen { position: absolute; top: 0.5rem; right: 0.6rem; }
.bi-titel { margin: 0 2.5rem 0.4rem 0; } .bi-titel small { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.bi-fakten { display: flex; flex-wrap: wrap; gap: 0.3rem 1.6rem; margin: 0 0 0.8rem; }
.bi-fakten div { display: flex; gap: 0.4rem; } .bi-fakten dt { color: var(--muted); } .bi-fakten dd { margin: 0; font-weight: 600; }
.bi-3d { border: 1px solid var(--rand); border-radius: 6px; overflow: hidden; }
.bi-leiste { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; padding: 0.5rem; border-bottom: 1px solid var(--rand); }
.bi-leiste button { min-width: 2.6rem; min-height: 2.6rem; padding: 0 0.6rem; }
.bi-leiste button.aktiv { background: var(--akzent); color: #fff; border-color: var(--akzent); }
.bi-text { margin-left: 0.6rem; }
.bi-warnung { color: var(--fehler-fg); font-weight: 600; }
.bi-leiste button.bi-nr-warnung { border-color: var(--fehler-fg); }
/* Regler je Achse unter der 3D-Ansicht (17.10.2026): Terminals ohne Mehrfingergesten drehen, kippen und zoomen hier */
.bi-achsen { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; padding: 0.5rem; border-top: 1px solid var(--rand); background: #f6f8fb; }
.bi-achse { display: flex; align-items: center; gap: 0.35rem; flex: 1 1 15rem; min-width: 0; }
.bi-achse > span { min-width: 3.6rem; font-weight: 600; }
.bi-achse button { min-width: 2.6rem; min-height: 2.6rem; padding: 0; font-size: 1.15rem; }
.bi-achse input[type=range] { flex: 1; min-width: 5rem; height: 2.6rem; accent-color: var(--akzent); }
.bi-achse output { min-width: 3.4rem; text-align: right; font-variant-numeric: tabular-nums; }
.bi-canvas { display: block; width: 100%; height: 30rem; max-height: 60vh; background: linear-gradient(#fdfdfe, #eef2f6); touch-action: none; }
.bi-legende { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.8rem; color: var(--muted); margin: 0.5rem 0.6rem 0; }
.bi-legende i { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 2px; margin-right: 0.3rem; vertical-align: -1px; }
.bi-f-akt { background: #e8892b; } .bi-f-geb { background: #8fa7c4; } .bi-f-flach { background: #b9c2cc; }
.bi-f-mat { background: #1a9c9c; } .bi-f-stem { background: #7b8fa6; } .bi-f-ans { background: #45d05a; }
.bi-hinweis { font-size: 0.8rem; color: var(--muted); margin: 0.4rem 0.6rem 0.6rem; }
.bi-h { font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin: 1.2rem 0 0.5rem; }
.bi-tabelle { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bi-tabelle th, .bi-tabelle td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--rand); text-align: right; white-space: nowrap; }
.bi-tabelle th { font-size: 0.8rem; color: var(--muted); } .bi-tabelle .l { text-align: left; }
.bi-tabelle .bi-nrzelle { text-align: center; font-weight: 700; color: var(--akzent); }
.bi-ruest { width: 100%; height: auto; max-height: 15rem; }
.bi-ruest .bi-wange { fill: #eef2f7; stroke: #9aa9bd; } .bi-ruest .bi-staender { fill: #dfe5ee; stroke: #9aa9bd; }
.bi-ruest .bi-werkzeug { fill: #1a9c9c; } .bi-ruest .bi-teil { fill: #d4a017; } .bi-ruest .bi-skala { stroke: #556; }
.bi-ruest .bi-t { font-size: 15px; fill: #3b4a5c; font-weight: 600; text-anchor: middle; }
.bi-ruest .bi-s { font-size: 15px; fill: #1d2733; font-weight: 600; text-anchor: middle; }
.bi-ruest .bi-k { font-size: 14px; fill: #5d6b7a; text-anchor: middle; }
.bi-werkzeuge { display: flex; flex-wrap: wrap; gap: 2rem; }
.bi-wz { display: flex; align-items: center; gap: 0.8rem; }
.bi-profil path { fill: none; stroke: #1a9c9c; stroke-linejoin: round; }
/* Werkzeugaufbau (Segmente aus Cadman, 08.10.2026): Fugen im Rüstplan, Vergrößerung mit Segmentlängen */
.bi-ruest .bi-seg-fuge { stroke: #fff; stroke-width: 1; }
.bi-aufbau { width: 100%; height: auto; max-height: 13rem; }
.bi-aufbau .bi-seg { fill: #1a9c9c; stroke: #fff; stroke-width: 1.5; } .bi-aufbau .bi-horn { fill: #3fbf5f; }
.bi-aufbau .bi-seg-t { font-size: 15px; fill: #fff; font-weight: 600; text-anchor: middle; }
.bi-aufbau .bi-seg-k { font-size: 13px; fill: #1d2733; text-anchor: middle; }
.bi-aufbau .bi-teil { fill: #d4a017; } .bi-aufbau .bi-skala { stroke: #556; } .bi-aufbau .bi-k { font-size: 13px; fill: #5d6b7a; text-anchor: middle; }
.bi-aufbau-liste { margin: 0 0 0.4rem; padding-left: 1.1rem; } .bi-aufbau-liste small { color: var(--muted); }
.bi-modus, .bi-anim-knoepfe, .bi-schritt-knoepfe { display: inline-flex; gap: 0.35rem; }
.bi-modus { margin-right: 0.6rem; } .bi-anim-knoepfe[hidden], .bi-schritt-knoepfe[hidden] { display: none; }
/* Nachkalkulation: leere Belege im Einzelnen (08.10.2026) */
.ev4nk-leer p { margin: 0 0 0.4rem; }
.ev4nk-leer-tabelle { border-collapse: collapse; font-size: 0.9rem; }
.ev4nk-leer-tabelle th, .ev4nk-leer-tabelle td { text-align: left; padding: 0.25rem 0.7rem 0.25rem 0; vertical-align: top; }
.ev4nk-leer-tabelle th { font-weight: 600; }
.ev4nk-leer { background: #fdecee; border-left: 4px solid #b00020; margin: 0.8rem 0; }
.ev4nk-leer .mini { white-space: nowrap; }
.modal.ev4lb { width: min(34rem, 94vw); }
.ev4lb form, .ev4lb .modal-inhalt { padding: 0.8rem 1rem 1rem; }
.ev4lb-kopf { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; margin: 0 0 0.8rem; }
.ev4lb-kopf dt { color: var(--muted); } .ev4lb-kopf dd { margin: 0; }
.ev4lb-feld { display: flex; flex-direction: column; gap: 0.25rem; font-weight: 600; }
.ev4lb-feld input { font-size: 1.1rem; max-width: 12rem; }
.ev4lb-haken { display: flex; gap: 0.4rem; align-items: center; margin: 0.6rem 0; }
.ev4lb-summe { margin: 0.6rem 0; }
.ev4nk-leer-tabelle, .ev4nk-leer-tabelle tr, .ev4nk-leer-tabelle th, .ev4nk-leer-tabelle td { background: transparent; }
.ev4lb .ev4lb-haken { display: flex; align-items: center; gap: 0.5rem; margin: 0.6rem 0; }
.ev4lb .ev4lb-haken input { width: auto; margin: 0; flex: none; }
.ev4lb .ev4lb-haken label { display: inline; margin: 0; font-weight: 400; text-align: left; }
.ev4lb-erklaerung { margin: 0 0 0.8rem; padding: 0.5rem 0.7rem; background: var(--offen); border-radius: 4px; font-size: 0.92rem; }
.ev4lb-ergebnis { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; margin: 0.6rem 0; }
.ev4lb-ergebnis dt { color: var(--muted); } .ev4lb-ergebnis dd { margin: 0; }

/* Admin › Datenbank (SPEC 8.2, 11.10.2026): Kopfdaten, Tabellenliste, Datenansicht mit eigener Bildlaufleiste, SQL-Konsole */
.admin-db-kopf { margin: 0 0 1rem; }
.admin-db-struktur { margin: 0 0 1rem; }
.admin-db-struktur summary { cursor: pointer; font-weight: 600; }
.admin-db-definitionen code { font-size: 0.8em; }
.admin-db-blaettern { display: flex; gap: 1rem; margin: 0.4rem 0; }
.admin-db-rollen { overflow-x: auto; max-width: 100%; }
.admin-db-daten { white-space: nowrap; }
.admin-db-daten td { max-width: 24rem; overflow: hidden; text-overflow: ellipsis; font-size: 0.85em; }
.admin-db-daten th a { color: inherit; text-decoration: none; }
.admin-db-daten th a:hover { text-decoration: underline; }
.admin-db-sql textarea { width: 100%; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em; }
.admin-db-sql .aktionen { display: flex; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.admin-db-sql button small { opacity: 0.7; font-weight: 400; margin-left: 0.3rem; }

/* Admin › Tests (SPEC 8.2, 11.10.2026): Prüfarten als Karten, Läufe als Tabelle, Log als Block */
.admin-tests-arten { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1rem; margin: 0 0 1rem; }
.admin-tests-art { padding: 1rem; background: var(--karte); border: 1px solid var(--rand); }
.admin-tests-art h3 { margin: 0 0 0.4rem; color: var(--akzent); }
.admin-tests-art p { margin: 0 0 0.5rem; }
.admin-tests-stand { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.admin-tests-kopf { margin: 0 0 1rem; }
.admin-tests-dateien a { margin-right: 0.6rem; white-space: nowrap; }
.admin-tests-laeufe td.status small { display: block; }
.admin-tests-log { max-height: 30rem; overflow: auto; font-size: 0.8em; background: var(--karte); border: 1px solid var(--rand); padding: 0.75rem; white-space: pre-wrap; }
.admin-tests-kopf { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; background: var(--karte); border: 1px solid var(--rand); padding: 1rem; }
.admin-tests-kopf > div { display: contents; }
.admin-tests-kopf dt { font-weight: 600; color: var(--muted); }
.admin-tests-kopf dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 700px) { .admin-tests-kopf { grid-template-columns: 1fr; } .admin-tests-kopf dd { margin-bottom: 0.4rem; } }

/* Admin › Versandtexte (SPEC 20.2): Felder links, Platzhalter-Liste rechts, Vorschau und Spam-Prüfung darunter */
.vt-raster { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1rem; align-items: start; }
form.bestellform fieldset > .fehler-eingabe { grid-column: 1 / -1; }
.vt-felder { display: grid; gap: 0.75rem; }
.vt-felder textarea { min-height: 14rem; resize: vertical; }
@media (max-width: 930px) { .vt-raster { grid-template-columns: minmax(0, 1fr); } }
.vt-platzhalter { border: 1px solid var(--rand); border-radius: 4px; padding: 0.4rem 0.6rem; max-height: 24rem; overflow-y: auto; font-size: 0.9em; }
.vt-platzhalter-titel { font-weight: 600; margin-bottom: 0.3rem; }
.vt-platzhalter table { border-collapse: collapse; width: 100%; }
.vt-platzhalter td { padding: 0.2rem 0.3rem 0.2rem 0; vertical-align: top; }
.vt-ph { font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; padding: 0.1rem 0.4rem; border: 1px solid #c9d7ea; background: #eef3fa; color: #1f4a8a; border-radius: 3px; cursor: pointer; white-space: nowrap; }
.vt-ph:hover { background: #dfe9f6; }
.vt-pruefen { display: inline-flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.vt-vorschau:empty { display: none; }
.vt-vorschau { margin: 0.6rem 0 1.4rem; }
.vt-mail { border: 1px solid var(--rand); border-radius: 4px; overflow: hidden; }
.vt-mail-kopf { padding: 0.5rem 0.8rem; background: #f7f8fa; border-bottom: 1px solid var(--rand); font-size: 0.92em; display: grid; gap: 0.15rem; }
.vt-mail-kopf .hinweis:first-child { display: inline-block; min-width: 4.5rem; }
.vt-mail-html { display: block; width: 100%; height: 30rem; border: 0; background: #f5f5f5; }
.vt-mail details { padding: 0.4rem 0.8rem; border-top: 1px solid var(--rand); }
.vt-mail-text { white-space: pre-wrap; font-size: 0.9em; margin: 0.4rem 0; }
.vt-spam { border: 1px solid var(--rand); border-left-width: 4px; border-radius: 4px; padding: 0.5rem 0.8rem; margin-bottom: 0.6rem; }
.vt-spam-gut { border-left-color: var(--erledigt-fg); }
.vt-spam-maessig { border-left-color: #c9a227; }
.vt-spam-auffaellig { border-left-color: var(--ueberfaellig-fg); }
.vt-regeln { border-collapse: collapse; margin: 0.4rem 0; font-size: 0.9em; }
.vt-regeln td { padding: 0.15rem 0.6rem 0.15rem 0; vertical-align: top; }
.vt-regeln td.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vt-regeln tr.vt-plus td.zahl { color: var(--ueberfaellig-fg); }
.vt-regeln tr.vt-minus td.zahl { color: var(--erledigt-fg); }
.vt-zustellweg summary { cursor: pointer; color: var(--muted); }

/* Kalender im Portal (SPEC 24.5, PoC): Kopf mit Aktionen; Leiste mit Ansichten als Reiter, Schalter Sa/So, Knopf für die
   Legende (Unterkalender als Farb-Chips zum Ein- und Ausblenden, auf- und zuklappbar); FullCalendar in einer Karte; Jahr
   (Monate × Wochentage) und Planer (Unterkalender × Tage) als Raster, Feiertage und Wochenenden grau. Balken mit 6px
   Rundung, Schrift je Farbe weiß oder dunkel, helle Farben mit dunklerer Kante (SPEC 14.22). */
.kal-kopf { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }
.kal-kopf h1 { margin: 0; }
.kal-aktionen { display: flex; gap: 0.5rem; align-items: center; }
.kal-leiste { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin: 0.8rem 0 0.5rem; }
.kal-ansichten { display: inline-flex; border: 1px solid var(--rand); border-radius: 4px; overflow: hidden; }
.kal-ansichten button { border: 0; border-radius: 0; background: var(--karte); color: var(--fg); padding: 0 0.85rem; margin: 0;
                       min-height: calc(2.1rem - 2px); font-size: 0.9rem; font-weight: 500; cursor: pointer; }
.kal-ansichten button + button { border-left: 1px solid var(--rand); }
.kal-ansichten button:hover:not(.aktiv) { background: #f0f0f0; }
.kal-ansichten button.aktiv { background: var(--akzent); color: #fff; }
.kal-we { flex: none; }
.kal-legende-knopf { display: inline-flex; align-items: center; gap: 0.35rem; background: none; border: 0; padding: 0.3rem 0.2rem;
                     margin: 0; color: var(--fg); font-size: 0.9rem; cursor: pointer; }
.kal-legende-knopf i { width: 0.45rem; height: 0.45rem; border: solid currentColor; border-width: 0 2px 2px 0;
                       transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; margin-left: 0.2rem; }
.kal-legende-knopf[aria-expanded="true"] i { transform: rotate(-135deg) translate(-2px, -2px); }
.kal-legende-knopf:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.kal-verwalten { margin-left: auto; }
.kal-filter { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.6rem; }
.kal-filter[hidden] { display: none; }
.kal-uk { position: relative; cursor: pointer; }
.kal-uk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
/* Chips neutral umrandet, die Farbe trägt nur der Punkt (gefüllt = eingeblendet) — 30 farbige Ränder waren zu unruhig */
.kal-uk span { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.65rem 0.2rem 0.5rem; border: 1px solid var(--rand);
               border-radius: 999px; font-size: 0.82rem; color: var(--muted); background: var(--karte); }
.kal-uk span:hover { border-color: #b8bec6; }
.kal-uk span i { width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 2px solid var(--uk); flex: none; box-sizing: border-box; }
.kal-uk input:checked + span { color: var(--fg); }
.kal-uk input:checked + span i { background: var(--uk); }
.kal-uk input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 2px; }
.kal-ok { background: var(--erledigt-bg); color: var(--erledigt-fg); padding: 0.5rem 0.8rem; border-radius: 4px; }
.kal-fehler { background: var(--fehler-bg); color: var(--fehler-fg); padding: 0.5rem 0.8rem; border-radius: 4px; }
/* FullCalendar im Stil des Portals: Blätterleiste wie Jahr und Planer (einzelne Sekundärknöpfe, Titel links), feine
   Gitterlinien, Wochentage klein und grau, heute hellblau mit Tageszahl im Akzentkreis — in allen Ansichten gleich */
#kal-fc { background: var(--karte); border: 1px solid var(--rand); padding: 0.5rem;
          --fc-border-color: #e6e8eb; --fc-page-bg-color: var(--karte); --fc-neutral-bg-color: #f4f5f7;
          --fc-neutral-text-color: var(--muted); --fc-today-bg-color: #eef3fa; --fc-now-indicator-color: var(--akzent);
          --fc-highlight-color: rgba(31, 74, 138, .12); --fc-list-event-hover-bg-color: #f5f8fc;
          --fc-button-text-color: var(--fg); --fc-button-bg-color: #fff; --fc-button-border-color: var(--rand);
          --fc-button-hover-bg-color: #f0f0f0; --fc-button-hover-border-color: var(--rand);
          --fc-button-active-bg-color: #e8edf5; --fc-button-active-border-color: var(--rand); }
#kal-fc .fc-header-toolbar { margin-bottom: 0.5rem; }
#kal-fc .fc-toolbar-chunk { display: flex; align-items: center; gap: 0.4rem; }
#kal-fc .fc-button { font-size: 0.9rem; font-weight: 500; min-height: 2.1rem; padding: 0.4rem 0.9rem; border-radius: 3px; line-height: 1.2;
                     text-transform: none; box-shadow: none; margin: 0; }
#kal-fc .fc-prev-button, #kal-fc .fc-next-button { padding: 0.4rem 0.75rem; }
#kal-fc .fc-button:focus { box-shadow: none; }
#kal-fc .fc-button:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
#kal-fc .fc-button:disabled { opacity: 0.45; }
#kal-fc .fc-button .fc-icon { font-size: 1.1em; }
#kal-fc .fc-toolbar-title { font-size: 1.15rem; font-weight: 600; margin: 0 0 0 0.6rem; }
#kal-fc .fc-col-header-cell, #kal-fc .fc-col-header .fc-timegrid-axis { background: var(--karte); }
#kal-fc .fc-col-header .fc-timegrid-axis-cushion { font-weight: 400; }
#kal-fc .fc-col-header-cell-cushion { font-size: 0.75rem; font-weight: 600; color: var(--muted); padding: 0.3rem 0.2rem; }
#kal-fc .fc-daygrid-day-number { font-size: 0.8rem; padding: 0.2rem 0.35rem; margin: 0.15rem 0.15rem 0 0; line-height: 1.2rem;
                                 min-width: 1.2rem; text-align: center; color: var(--fg); }
#kal-fc .fc-day-today .fc-daygrid-day-number { background: var(--akzent); color: #fff; border-radius: 999px; font-weight: 600; padding: 0 0.35rem; margin-top: 0.25rem; }
#kal-fc .fc-daygrid-week-number { background: none; color: var(--muted); font-size: 0.7rem; padding: 0.3rem 0.35rem; }
#kal-fc .fc-daygrid-event { margin-top: 2px; }
#kal-fc .fc-daygrid-block-event .fc-event-main { font-weight: 500; }
#kal-fc .fc-daygrid-more-link { font-size: 0.78rem; color: var(--akzent); }
#kal-fc .fc-timegrid-axis-cushion, #kal-fc .fc-timegrid-slot-label-cushion { font-size: 0.72rem; color: var(--muted); }
#kal-fc .fc-timegrid-axis-cushion { max-width: none; white-space: normal; text-align: right; line-height: 1.1; hyphens: manual; }
#kal-fc .kal-kopftag { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.1rem 0; }
#kal-fc .kal-kopftag small { font-size: 0.72rem; font-weight: 400; color: var(--muted); }
#kal-fc .kal-kopftag b { font-size: 0.95rem; color: var(--fg); min-width: 1.6rem; line-height: 1.6rem; border-radius: 999px; }
#kal-fc .fc-day-today .kal-kopftag b { background: var(--akzent); color: #fff; }
#kal-fc .fc-list-day-cushion { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
#kal-fc .fc-list-day-side-text { font-weight: 400; color: var(--muted); }
#kal-fc .fc-list-event td { padding: 0.35rem 0.8rem; font-size: 0.88rem; }
#kal-fc .fc-list-event-time { color: var(--muted); font-size: 0.8rem; }
#kal-fc .fc-event { cursor: pointer; }
/* Balken: zarte Fläche, Kante links in der Farbe des Unterkalenders (SPEC 14.22), an Fortsetzungen ohne Kante */
#kal-fc .fc-h-event, #kal-fc .fc-v-event { border-radius: 6px; border-width: 0 0 0 3px; }
#kal-fc .fc-h-event:not(.fc-event-start) { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left-width: 0; }
#kal-fc .fc-h-event:not(.fc-event-end) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
#kal-fc .fc-v-event:not(.fc-event-start) { border-top-left-radius: 0; border-top-right-radius: 0; }
#kal-fc .fc-v-event:not(.fc-event-end) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
/* Urlaub und Schulung hervorgehoben (SPEC 14.22): breitere Kante, kräftigere Fläche (vom Server), Titel halbfett, Symbol davor */
#kal-fc .kal-hervor.fc-h-event, #kal-fc .kal-hervor.fc-v-event { border-left-width: 5px; }
#kal-fc .kal-hervor.fc-h-event:not(.fc-event-start) { border-left-width: 0; }
#kal-fc .kal-hervor .kal-titel { font-weight: 600; }
.kal-symbol { width: 1.15em; height: 1.15em; flex: none; margin-right: 0.25rem; vertical-align: -0.2em; }
#kal-fc .fc-event-main:has(.kal-symbol) { display: flex; align-items: center; }
/* Wischen blättert (Woche, Monat, Liste): der neue Zeitraum gleitet kurz aus der Wischrichtung herein */
#kal-fc.kal-wisch-vor .fc-view-harness { animation: kal-rein-rechts .18s ease-out; }
#kal-fc.kal-wisch-zurueck .fc-view-harness { animation: kal-rein-links .18s ease-out; }
@keyframes kal-rein-rechts { from { transform: translateX(24px); opacity: .4; } }
@keyframes kal-rein-links { from { transform: translateX(-24px); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { #kal-fc.kal-wisch-vor .fc-view-harness, #kal-fc.kal-wisch-zurueck .fc-view-harness { animation: none; } }
#kal-fc .fc-event .fc-avatar { width: 1.3rem; height: 1.3rem; line-height: 1.3rem; font-size: 0.55rem; margin-right: 0.3rem; }
#kal-fc .kal-titel { overflow: hidden; text-overflow: ellipsis; }
#kal-fc .kal-feiertag { background: #e9ecef; opacity: 1; }
#kal-fc .fc-day-sat, #kal-fc .fc-day-sun { background: #f4f5f7; }
#kal-fc .fc-col-header-cell.fc-day-sat, #kal-fc .fc-col-header-cell.fc-day-sun { background: #f4f5f7; }
#kal-fc .kal-beantragt { background: repeating-linear-gradient(135deg, #fff 0 6px, #eef3fa 6px 12px) !important;
                         border: 1px dashed var(--akzent) !important; }
#kal-fc .kal-beantragt .fc-event-main, #kal-fc .kal-beantragt .kal-titel { color: var(--akzent); }
#kal-tooltip { position: absolute; z-index: 90; background: var(--karte); border: 1px solid var(--rand); border-radius: 4px;
               padding: 0.4rem 0.6rem; box-shadow: 0 4px 12px rgba(0,0,0,.12); font-size: 0.85rem; max-width: 22rem;
               display: flex; flex-direction: column; gap: 0.1rem; pointer-events: none; }
#kal-tooltip[hidden] { display: none; }
#kal-tooltip span { color: var(--muted); }
.kal-modal { width: min(32rem, calc(100vw - 1.5rem)); max-width: none; min-width: 0; }
.kal-zeitraum { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.kal-zeitraum[hidden] { display: none; }
.kal-modal textarea { font: inherit; padding: 0.4rem; }
.kal-modal select { padding: 0.4rem; font-size: 1em; }
.kal-links { margin-right: auto; }
.kal-herkunft { margin: 0; font-size: 0.82rem; }
.kal-ansehen { padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.kal-ansehen dl { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; margin: 0; }
.kal-ansehen dt { color: var(--muted); }
.kal-ansehen dd { margin: 0; }
.kal-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.kal-uk-zeile { display: flex; align-items: center; gap: 0.4rem; margin: 0; color: var(--muted); }
.kal-uk-zeile i, .kal-uk-punkt { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 50%; margin-right: 0.3rem; vertical-align: -0.05rem; }
.kal-frage { padding: 1rem; }

.kal-planer { background: var(--karte); border: 1px solid var(--rand); padding: 0.5rem; }
.kal-planer-nav { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.5rem; }
.kal-planer-nav h2 { margin: 0 0 0 0.6rem; font-size: 1.15rem; }
.kal-planer-nav button[aria-label] { min-width: 2.65rem; font-size: 1.1rem; }   /* ‹ › so breit wie in Woche/Monat */
.kal-planer-rollen { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.kal-planer-gitter { min-width: calc(11rem + var(--tage) * 1.9rem); }
.kal-planer-kopf, .kal-planer-zeile { display: grid; grid-template-columns: 11rem minmax(0, 1fr); }
.kal-planer-kopf { grid-template-columns: 11rem repeat(var(--tage), minmax(0, 1fr)); position: sticky; top: 0; background: var(--karte); z-index: 2; }
.kal-planer-tag { text-align: center; font-size: 0.8rem; padding: 0.2rem 0; border-bottom: 1px solid var(--rand); }
.kal-planer-tag small { display: block; color: var(--muted); font-size: 0.72rem; }
.kal-planer-tag b { display: inline-block; font-weight: 500; min-width: 1.35rem; line-height: 1.35rem; border-radius: 999px; }
.kal-planer-tag.frei { background: #f4f5f7; }
.kal-planer-tag.heute { background: #eef3fa; }
.kal-planer-tag.heute b { background: var(--akzent); color: #fff; font-weight: 600; }
.kal-planer-zeile { border-bottom: 1px solid var(--rand); }
.kal-planer-name { position: sticky; left: 0; z-index: 1; background: var(--karte); display: flex; align-items: center; gap: 0.4rem;
                   padding: 0.3rem 0.5rem 0.3rem 0; font-size: 0.85rem; border-right: 1px solid var(--rand); }
.kal-planer-name i { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--uk); flex: none; }
.kal-planer-bahnen { display: grid; grid-template-columns: repeat(var(--tage), minmax(0, 1fr)); grid-auto-rows: minmax(1.9rem, auto); }
.kal-planer-feld { border-left: 1px solid #eef0f2; }
.kal-planer-feld.frei { background: #f4f5f7; }
.kal-planer-feld.heute { background: #eef3fa; }
.kal-anlegbar [data-tag] { cursor: copy; }
.kal-planer-eintrag { z-index: 1; margin: 0.15rem 1px; padding: 0 0.4rem; min-width: 0; border: 0; border-radius: 6px;
                      background: var(--uk-flaeche, #eef0f2); color: var(--fg); box-shadow: inset 3px 0 0 var(--uk);
                      font-size: 0.78rem; text-align: left; display: flex; align-items: center;
                      overflow: hidden; white-space: nowrap; cursor: pointer; }
.kal-planer-eintrag span { overflow: hidden; text-overflow: ellipsis; }
.kal-planer-eintrag .fc-avatar { width: 1.2rem; height: 1.2rem; line-height: 1.2rem; font-size: 0.5rem; margin-right: 0.25rem; }
.kal-planer-eintrag.links-offen { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; box-shadow: none; }
.kal-planer-eintrag.rechts-offen { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.kal-planer-eintrag.kal-hervor { box-shadow: inset 5px 0 0 var(--uk); font-weight: 600; padding-left: 0.5rem; }
.kal-planer-eintrag.kal-hervor.links-offen { box-shadow: none; padding-left: 0.4rem; }

/* Ressourcenplanung im Planer (SPEC 24.5/14.22, Mockups R1/R2): Gruppierung rechts in der Leiste, je Auftrag Kopfzeile mit
   Ist/Soll je Arbeitstag, darunter eingerückte Personenzeilen; je Person die verplanten Tage; Konflikte rot umrandet */
.kal-planer-nav { flex-wrap: wrap; }
.kal-gruppen { margin-left: auto; }
.kal-gruppen button { min-height: 2.4rem; font-size: 0.9rem; }
.kal-ress-auftrag { background: #fafbfc; border-top: 2px solid #d9dde3; }
.kal-ress-auftrag .kal-planer-name { background: #fafbfc; }
.kal-ress-auftragsname { display: flex; align-items: center; gap: 0.4rem; width: 100%; min-height: 0; margin: 0; padding: 0;
                         border: 0; background: none; color: var(--fg); font: inherit; font-size: 0.84rem; text-align: left;
                         line-height: 1.25; cursor: pointer; }
.kal-ress-auftragsname:hover span { text-decoration: underline; }
.kal-ress-auftragsname span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kal-ress-auftragsname i { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--uk); flex: none; }
.kal-ress-zahl { z-index: 1; align-self: center; margin: 0 1px; border-radius: 4px; text-align: center; font-size: 0.72rem;
                 font-weight: 600; line-height: 1.25rem; color: #4b5563; background: #eef0f2; pointer-events: none;
                 overflow: hidden; white-space: nowrap; }
.kal-ress-zahl.ok { background: #e6f4ea; color: #1e6b3a; }
.kal-ress-zahl.unter { background: #fde2e1; color: #b42318; }
.kal-ress-person-zeile .kal-planer-name { padding-left: 1.1rem; }
.kal-ress-summe { margin-left: auto; padding-left: 0.3rem; color: var(--muted); font-size: 0.75rem; white-space: nowrap; }
.kal-planer-name .person { min-width: 0; }
.kal-planer-name .person > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kal-planer-eintrag.kal-konflikt { outline: 2px solid #d92d20; outline-offset: -2px; }
.kal-planer-eintrag.kal-konflikt::after { content: "!"; margin-left: auto; padding-left: 0.3rem; color: #d92d20; font-weight: 800; }
/* Ziehen am Desktop (SPEC 14.22/24.5, Dietmar 02.11.2026): Griff vor dem Titel verschiebt, die Ränder ändern Beginn und
   Ende, tageweise am Raster; Zieltage als Vorschau, Datum am Zeiger; Rechtsklick öffnet ein Kontextmenü. Nur mit Maus —
   .kal-maus setzt das Skript in kalender.html (kein grober Zeiger, breiter als 900 px). */
.kal-griff, .kal-rand { display: none; }
.kal-maus .kal-griff { display: inline-block; flex: none; width: 0.6rem; height: 0.95rem; margin: 0 0.3rem 0 -0.1rem;
                       background: currentColor; opacity: 0.4; cursor: grab;
                       -webkit-mask: var(--kal-griff) center / contain no-repeat; mask: var(--kal-griff) center / contain no-repeat; }
.kal-maus .kal-griff:hover { opacity: 0.85; }
.kal-maus .kal-ziehbar { position: relative; }
.kal-maus .kal-ziehbar .kal-rand { display: block; position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; z-index: 1; }
.kal-maus .kal-ziehbar .kal-rand-start { left: 0; }
.kal-maus .kal-ziehbar .kal-rand-ende { right: 0; }
.kal-maus .kal-ziehbar:hover .kal-rand::after { content: ""; position: absolute; top: 22%; bottom: 22%; width: 2px; border-radius: 1px;
                                               background: var(--uk, var(--muted)); }
.kal-maus .kal-ziehbar:hover .kal-rand-start::after { left: 1px; }
.kal-maus .kal-ziehbar:hover .kal-rand-ende::after { right: 1px; }
:root { --kal-griff: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='black'%3E%3Ccircle cx='8' cy='5' r='2'/%3E%3Ccircle cx='8' cy='12' r='2'/%3E%3Ccircle cx='8' cy='19' r='2'/%3E%3Ccircle cx='16' cy='5' r='2'/%3E%3Ccircle cx='16' cy='12' r='2'/%3E%3Ccircle cx='16' cy='19' r='2'/%3E%3C/g%3E%3C/svg%3E"); }
.kal-planer-eintrag.kal-zieht { opacity: 0.4; }
.kal-ziel { background-image: linear-gradient(rgba(37, 99, 235, 0.18), rgba(37, 99, 235, 0.18)) !important;
            box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.35); }
body.kal-ziehen-ganz, body.kal-ziehen-ganz * { cursor: grabbing !important; }
body.kal-ziehen-start, body.kal-ziehen-start *, body.kal-ziehen-ende, body.kal-ziehen-ende * { cursor: ew-resize !important; }
body.kal-ziehen-ganz, body.kal-ziehen-start, body.kal-ziehen-ende { -webkit-user-select: none; user-select: none; }
.kal-zieh-info { position: fixed; z-index: 95; pointer-events: none; background: #1f2937; color: #fff; font-size: 0.78rem;
                 font-weight: 600; padding: 0.2rem 0.5rem; border-radius: 4px; white-space: nowrap; }
.kal-zieh-info[hidden] { display: none; }
.kal-kontext { position: absolute; z-index: 96; min-width: 10rem; display: flex; flex-direction: column; padding: 0.25rem;
               background: var(--karte); border: 1px solid var(--rand); border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14); }
.kal-kontext button { display: block; width: 100%; margin: 0; padding: 0.45rem 0.7rem; border: 0; border-radius: 4px; background: none;
                      color: var(--fg); font: inherit; font-size: 0.9rem; text-align: left; cursor: pointer; }
.kal-kontext button:hover, .kal-kontext button:focus-visible { background: #f1f3f5; outline: none; }
.kal-kontext button.loeschen { color: var(--ueberfaellig-fg); }
.kal-kontext button.loeschen.frage { background: var(--ueberfaellig-bg); font-weight: 600; }
.kal-ress-leer { padding: 0.8rem 0; }
/* Dialoge Einsatz planen und Auftrag */
.kal-auftragswahl { position: relative; display: flex; flex-direction: column; gap: 0.6rem; }
.kal-vorschlaege { display: flex; flex-direction: column; max-height: 14rem; overflow-y: auto; border: 1px solid var(--rand);
                   border-radius: 4px; background: var(--karte); margin-top: -0.4rem; }
.kal-vorschlaege[hidden] { display: none; }
.kal-vorschlaege button { display: block; width: 100%; margin: 0; padding: 0.45rem 0.6rem; border: 0; border-radius: 0;
                          background: none; color: var(--fg); text-align: left; font-size: 0.88rem; line-height: 1.3; }
.kal-vorschlaege button + button { border-top: 1px solid #eef0f2; }
.kal-vorschlaege button:hover, .kal-vorschlaege button:focus-visible { background: #eef3fa; }
.kal-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; border: 0; }
.kal-chips legend { margin-bottom: 0.35rem; padding: 0; }
/* Chips mit Avatar: label mit eigenem Inhalt (Person-Makro), deshalb nicht .chip — gegen `.modal label` (Spalte) gesetzt */
.modal .kal-chips label.kal-chip { display: inline-flex; flex-direction: row; align-items: center; gap: 0.35rem;
            padding: 0.2rem 0.6rem 0.2rem 0.45rem; border: 1px solid var(--rand); border-radius: 999px;
            background: var(--karte); color: var(--fg); cursor: pointer; font-size: 0.88rem; }
.modal .kal-chips label.kal-chip:has(input:checked) { border-color: var(--akzent); background: #e8eef7; color: var(--akzent); font-weight: 600; }
.kal-chip input { margin: 0; }
.kal-phasen { display: flex; flex-direction: column; gap: 0.4rem; margin: 0; padding: 0; border: 0; }
.kal-phasen legend { margin-bottom: 0.35rem; padding: 0; }
.kal-phase { display: grid; grid-template-columns: 1fr 1fr 5rem 2.4rem; gap: 0.4rem; align-items: center; }
.kal-phase-kopf { font-size: 0.78rem; color: var(--muted); }
.kal-phase input { min-width: 0; }
.kal-phase-weg { min-width: 0; padding: 0; }
[data-phase-neu] { align-self: flex-start; }
.kal-ress-einsaetze { display: flex; flex-direction: column; gap: 0.25rem; }
.kal-ress-einsaetze h3 { margin: 0.4rem 0 0.2rem; font-size: 0.95rem; }
.kal-ress-einsatz { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; width: 100%; margin: 0;
                    padding: 0.3rem 0.4rem; border: 0; border-radius: 4px; background: none; color: var(--fg); text-align: left; }
.kal-ress-einsatz:hover { background: #eef3fa; }
.kal-ress-auftragszeile { color: var(--fg); }

/* Jahr: Monate untereinander, Tage 1–31 als Spalten (der 1. unter dem 1.), im Feld der Wochentag; nach dem Monatsende ohne Rahmen */
.kal-jahr-gitter { min-width: calc(6rem + var(--spalten) * 1.7rem); }
.kal-jahr-kopf, .kal-jahr-monat { display: grid; grid-template-columns: 6rem minmax(0, 1fr); }
.kal-jahr-kopf { grid-template-columns: 6rem repeat(var(--spalten), minmax(0, 1fr)); background: var(--karte); border-bottom: 1px solid var(--rand); }
/* Kopfzeile klebt beim Rollen der Seite oben am Fenster (30.10.2026); waagrecht schiebt sie das Skript mit dem Rollbereich */
.kal-jahr-kopfzeile { position: sticky; top: 0; z-index: 3; overflow: hidden; background: var(--karte); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06); }
.kal-jahr-wt { text-align: center; font-size: 0.72rem; color: var(--muted); padding: 0.2rem 0; }
.kal-jahr-monat { border-bottom: 1px solid var(--rand); }
.kal-jahr-name { position: sticky; left: 0; z-index: 1; background: var(--karte); font-size: 0.85rem; font-weight: 600;
                 padding: 0.25rem 0.5rem 0 0; border-right: 1px solid var(--rand); }
.kal-jahr-tage { display: grid; grid-template-columns: repeat(var(--spalten), minmax(0, 1fr));
                 grid-template-rows: var(--reihen); padding-bottom: 0.2rem; }   /* Kopfzeile des Felds (Wochentag, montags die KW), Bahnen, Abstände vor den Bereichen (_raster) */
.kal-jahr-tag { grid-row: 1 / -1; border-left: 1px solid #e6e8eb; margin-bottom: -0.2rem; }
.kal-jahr-tag small { display: block; font-size: 0.72rem; color: var(--muted); padding: 0.05rem 0 0 0.2rem; line-height: 1.1rem; }
.kal-jahr-tag.frei { background: #f4f5f7; }
.kal-jahr-tag small.kal-kw { padding-top: 0; line-height: 0.95rem; font-size: 0.68rem; font-weight: 600; color: var(--akzent); white-space: nowrap; }   /* Montag: KW unter „Mo 6.“ */
.kal-jahr-tag small { white-space: nowrap; }      /* „Mo 6.“ bricht nicht um, sonst rutscht die KW in die Balken */
.kal-jahr-tag.heute { background: #eef3fa; }
.kal-jahr-tag.heute small:first-child { display: inline-block; background: var(--akzent); color: #fff; font-weight: 600; border-radius: 999px;
                            padding: 0 0.3rem; margin: 0.05rem 0 0 0.1rem; }
.kal-jahr-name .kal-kurz { display: none; }
.kal-jahr .kal-planer-eintrag { margin: 0.1rem 1px; font-size: 0.74rem; padding: 0 0.3rem; }
/* Bereiche Personalverfügbarkeit und Urlaub/Schulung (Variante D, 31.10.2026): Abstand davor (Rasterzeile), vertiefte
   Schale in eigener Tönung — Tage und Wochenenden darunter werden etwas dunkler —, links in der Monatsspalte eine
   Beschriftung mit Farbstreifen; Klicks gehen an den Tag darunter */
.kal-jahr-ebene { margin: 0 3px; border-radius: 7px; box-shadow: inset 0 1px 3px rgba(20, 40, 70, 0.20); pointer-events: none; }
.kal-jahr-ebene.personal, .kal-jahr-rand.personal { background: rgba(60, 120, 200, 0.09); }
.kal-jahr-ebene.urlaub, .kal-jahr-rand.urlaub { background: rgba(205, 150, 50, 0.11); }
.kal-jahr-rand { position: absolute; left: 0.4rem; right: 0.2rem; display: flex; align-items: center; padding-left: 0.35rem;
                 box-sizing: border-box; border-left: 4px solid; border-radius: 7px 0 0 7px;
                 font-size: 0.66rem; font-weight: 600; line-height: 1.15; color: #4b5866; }
.kal-jahr-rand.personal { border-left-color: #4a78b5; }
.kal-jahr-rand.urlaub { border-left-color: #b8873a; }
/* Knopf zum Ein- und Ausklappen eines Bereichs (Mockup M2, 31.10.2026); zugeklappt: eine Zeile, Einträge als Striche */
.kal-jahr-klappen { flex: none; width: 1rem; height: 1rem; margin: 0 0.35rem 0 0; padding: 0; display: inline-flex;
                    align-items: center; justify-content: center; border: 1px solid #9aa5b1; border-radius: 4px;
                    background: #fff; color: #3d4955; font: 700 0.8rem/1 system-ui, sans-serif; cursor: pointer; }
.kal-jahr-klappen:hover { border-color: #3d4955; }
.kal-jahr .kal-planer-eintrag.kal-strich { height: 6px; align-self: center; margin: 0 1px; padding: 0; font-size: 0;
                                           background: var(--uk); box-shadow: none; border-radius: 3px; opacity: 0.85; }
.kal-jahr .kal-planer-eintrag.kal-strich > * { display: none; }
.kal-jahr .kal-planer-eintrag .fc-avatar { width: 1.05rem; height: 1.05rem; line-height: 1.05rem; font-size: 0.45rem; margin-right: 0.2rem; }

/* Unterkalender verwalten (Dialog) und Admin › Kalender: Farbwahl aus der Palette als runde Felder */
.kal-farbwahl { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.3rem 0 0.5rem; }
/* je eine Reihe ruhige und kräftige Töne, davor die Gruppe klein (SPEC 14.22) */
.kal-farbreihe { display: flex; align-items: flex-start; gap: 0.35rem; }
.kal-farbfelder { display: flex; flex-wrap: wrap; gap: 0.35rem; }      /* umbrochene Felder bleiben eingerückt */
.kal-farbgruppe { font-size: 0.75rem; color: var(--muted); width: 3.6rem; flex: none; line-height: 1.6rem; }
.kal-farbwahl label { position: relative; cursor: pointer; }
.kal-farbwahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kal-farbwahl label > span { display: block; width: 1.6rem; height: 1.6rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.kal-farbwahl input:checked + span { box-shadow: 0 0 0 2px var(--karte), 0 0 0 4px var(--fg); }
.kal-farbwahl input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 4px; }
.kal-verwaltung .modal-inhalt { padding: 1rem; }
.kal-verwaltung h3 { font-size: 1rem; margin: 1rem 0 0.4rem; }
.kal-uk-form label { width: 100%; }
.kal-uk-knoepfe { display: flex; justify-content: flex-end; gap: 0.5rem; margin: 0 0 0.4rem; }
.kal-uk-liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rand); }
.kal-uk-liste > li { border-bottom: 1px solid var(--rand); padding: 0.45rem 0; }
.kal-uk-liste summary { cursor: pointer; display: flex; align-items: center; gap: 0.2rem; }
.kal-uk-liste summary .hinweis { margin-left: auto; }
.kal-uk-liste details[open] summary { margin-bottom: 0.5rem; }
.kal-uk-fest { color: var(--fg); }
.kal-uk-erklaerung { margin: 0; font-size: 0.82rem; }
.kal-uk-personal { margin: 0.5rem 0; }
.kal-uk-entfernen.bestaetigen { background: var(--fehler-bg); color: var(--fehler-fg); border-color: var(--fehler-fg); }
.kal-uk-zeile-archiv { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.kal-uk-zeile-archiv .hinweis { margin-left: 0.4rem; }
.kal-admin-rechte { list-style: none; padding: 0; margin: 0 0 0.6rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.4rem 1rem; }
.kal-admin-urlaub { display: flex; flex-direction: column; gap: 0.4rem; max-width: 30rem; align-items: flex-start; }
.kal-admin-urlaub > label { display: flex; flex-direction: column; gap: 0.2rem; width: 100%; }   /* nur das Namensfeld, nicht die Farbfelder */
.kal-zahl { width: 5rem; }
.kal-uebernahme { display: flex; gap: 0.8rem; align-items: end; flex-wrap: wrap; }
.kal-uebernahme label { display: flex; flex-direction: column; font-size: 0.9em; color: var(--muted); gap: 0.2rem; }
@media (max-width: 700px) {
  .kal-planer-kopf { grid-template-columns: 7rem repeat(var(--tage), minmax(0, 1fr)); }
  .kal-planer-zeile { grid-template-columns: 7rem minmax(0, 1fr); }
  .kal-planer-gitter { min-width: calc(7rem + var(--tage) * 1.9rem); }
  /* Jahr: Monat nur dreibuchstabig, damit mehr Tage ins Bild passen */
  .kal-jahr-kopf { grid-template-columns: 2.6rem repeat(var(--spalten), minmax(0, 1fr)); }
  .kal-jahr-monat { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .kal-jahr-gitter { min-width: calc(2.6rem + var(--spalten) * 2.2rem); }   /* 2,2 rem: „Mo 28.“ und „KW 41“ passen ins Feld */
  .kal-jahr-tag small { padding-left: 0.12rem; font-size: 0.66rem; }
  .kal-jahr-tag small.kal-kw { font-size: 0.62rem; }
  .kal-jahr-name .kal-lang { display: none; }
  .kal-jahr-rand span { display: none; }            /* schmale Monatsspalte: nur Farbstreifen und Tönung */
  .kal-jahr-name .kal-kurz { display: inline; }
  #kal-fc .fc-toolbar-title { font-size: 1rem; margin-left: 0.3rem; }
  #kal-fc .fc-button { padding: 0.4rem 0.7rem; }
  .kal-zeitraum { grid-template-columns: 1fr; }
  .kal-gruppen { margin-left: 0; width: 100%; }
  .kal-gruppen button { flex: 1; padding: 0 0.4rem; white-space: nowrap; }
  .kal-gruppe-je { display: none; }
  .kal-phase { grid-template-columns: 1fr 1fr 3.6rem 2.4rem; }
}

/* Anfragen (UX A3, 08.11.2026): Zahl am Chip „Nachfragen fällig“, „abschließen?“ unter der Nachfrage-Marke */
.chip .chip-zahl { margin-left: 0.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.anf-tabelle td.ergebnis .anf-abschliessen { display: block; margin-top: 0.3rem; }

/* Anfragen am Handy (UX A1, 08.11.2026): Statistik ohne eigene Wahl zu, Filter hinter „Filter (n)“, je Anfrage eine
   Karte (ein tbody je Anfrage) statt der 9-spaltigen Tabelle — Nummer und Datum, Besteller, Notiz, Ergebnis, darunter
   je Firma eine Zeile mit Versand, Angebot und PDF. Am Desktop unverändert. */
.anf-filterklappe .anf-filterknopf { display: none; }   /* Klassenpaar: schlägt den allgemeinen Knopfstil (.sekundaer) */
@media (max-width: 700px) {
  .dashboard.zu-handy .dashboard-grid { display: none; }
  .dashboard.zu-handy .dashboard-schalter svg { transform: rotate(-90deg); }
  .dashboard.zu-handy { margin-bottom: 0.75rem; }
  /* am Handy ist der Schalter der einzige Weg zur Statistik: Tippfläche 44 px (Oberflächenprüfung: vorher 27 px) */
  .dashboard[data-schluessel="dashboard_anfragen"] .dashboard-schalter { min-height: 44px; }
  .anf-filterklappe .anf-filterknopf { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; margin: 0 0 0.6rem; }
  .anf-filterzahl { display: inline-flex; align-items: center; justify-content: center; min-width: 1.3rem; height: 1.3rem; padding: 0 0.35rem;
                    border-radius: 1rem; background: var(--akzent); color: #fff; font-size: 0.78rem; font-weight: 700; }
  .anf-filterklappe:not(.offen) > .stamm-filter { display: none; }
  .tabelle-scroll:has(> table.anf-tabelle) { overflow: visible; margin: 0; padding: 0; }
  table.anf-tabelle { display: block; min-width: 0 !important; border: 0; background: none; }
  table.anf-tabelle thead { display: none; }
  table.anf-tabelle tbody { display: block; }
  table.anf-tabelle tbody.anf-gruppe { margin-bottom: 0.6rem; padding: 0.6rem 0.75rem; border: 1px solid var(--rand);
                                        border-left: 4px solid var(--akzent); border-radius: 6px; background: var(--karte); }
  table.anf-tabelle tbody.anf-gruppe.entwurf { border-left-color: var(--rand); }
  /* feste Spalten, damit Versand, Angebot und PDF in allen Firmenzeilen bündig stehen */
  table.anf-tabelle tr { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem 2.4rem; gap: 0.2rem 0.6rem; align-items: center; }
  table.anf-tabelle td { display: block; padding: 0; border: 0 !important; width: auto !important; max-width: none; min-width: 0;
                         background: none; white-space: normal; overflow-wrap: anywhere; }
  table.anf-tabelle td.primaer { grid-column: 1; font-size: 1.05rem; }
  table.anf-tabelle td.datum { grid-column: 2 / -1; text-align: right; color: var(--muted); }
  table.anf-tabelle td.besteller, table.anf-tabelle td.notiz, table.anf-tabelle td.ergebnis { grid-column: 1 / -1; }
  table.anf-tabelle td.notiz { max-width: none; }
  table.anf-tabelle td.notiz:has(> .leer-wert), table.anf-tabelle td.ergebnis:has(> .leer-wert:only-child) { display: none; }
  table.anf-tabelle td.ergebnis .anf-abschliessen { display: inline-flex; align-items: center; margin: 0.3rem 0 0 0.4rem; min-height: 44px;
                                                   padding: 0 0.9rem; vertical-align: middle; }
  table.anf-tabelle td.firma, table.anf-tabelle td.ohne-firma { grid-column: 1 / -1; margin-top: 0.35rem; padding-top: 0.4rem;
                                                                 border-top: 1px solid var(--rand) !important; }
  table.anf-tabelle tr.anfrage-unterzeile td.firma { border-top-style: dotted !important; }
  table.anf-tabelle td.versand { grid-column: 1; }
  table.anf-tabelle td.angebot { grid-column: 2; text-align: right; }
  table.anf-tabelle td.angebot:has(> .leer-wert) { visibility: hidden; }   /* kein Angebot: kein Strich als Füllung */
  table.anf-tabelle td.pdf { grid-column: 3; width: auto; text-align: right; }
  table.anf-tabelle td.versand:empty, table.anf-tabelle td.pdf:empty { display: block; }
}
