/* stoerungen.css — Ergänzungen für „Wenige Anlagen machen die meiste Arbeit.“ (nur diese Seite). */

:root { --s-neutral: #8d8b83; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s-neutral: #8b8a80; } }
:root[data-theme="dark"] { --s-neutral: #8b8a80; }

html, body { overflow-x: clip; }

/* Tastatur: sichtbarer Rahmen an Knöpfen, Verweisen und Eingaben */
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
a:focus-visible, button:focus-visible, .knopf:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.knopf:has(input:focus-visible) { outline: 2px solid var(--akzent); outline-offset: 2px; }

.s-hinweis { margin: -16px 0 24px; font-size: 14px; color: var(--text-2); max-width: 100ch; }

/* Auswahl Gebäude und Gewerk, Fristen */
.s-wahl { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; }
.s-wahl select { max-width: min(100%, 300px); }
.s-felder { gap: 8px 14px; }
.s-felder .s-abstand { margin-left: 14px; }
.s-feld { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.s-feld input {
  width: 64px; min-height: 42px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--linie);
  background: var(--flaeche-1); color: var(--text-1); font: inherit; font-size: 14px; text-align: right;
}
@media (max-width: 720px) { .s-felder .f-name { flex-basis: 100%; margin-left: 0; } .s-felder .s-abstand { margin-top: 6px; } }

/* allein stehende Karte nimmt die ganze Breite; zwei Karten übereinander in einer Spalte */
.gitter > .allein { grid-column: 1 / -1; }
.s-stapel { grid-column: span 4; display: grid; gap: 12px; align-content: start; min-width: 0; }
@media (max-width: 1020px) { .s-stapel { grid-column: 1 / -1; } }

/* ---------- Balkenliste (eigene, damit am Handy nichts abgeschnitten wird) ---------- */
.s-liste { display: grid; }
.s-zeile {
  display: grid; grid-template-columns: minmax(0, var(--nb, 250px)) minmax(40px, 1fr) minmax(var(--wb, 96px), auto);
  gap: 2px 12px; align-items: center; padding: 7px 0; border-top: 1px solid var(--raster);
}
.s-zeile:first-child { border-top: 0; }
.s-name { font-size: 13px; line-height: 1.3; color: var(--text-1); overflow-wrap: anywhere; }
.s-name small { display: block; font-size: 12px; color: var(--text-3); }
.s-spur { display: flex; flex-direction: column; gap: 2px; min-width: 0; border-left: 1px solid var(--linie); }
.s-spur.voll { background: var(--flaeche-2); border-left: 0; border-radius: 0 4px 4px 0; }
.s-spur i { display: block; height: 16px; min-width: 2px; border-radius: 0 4px 4px 0; transform-origin: 0 50%; animation: s-wachsen .8s cubic-bezier(.2,.7,.2,1) both; }
.s-spur.doppelt i { height: 9px; border-radius: 0 3px 3px 0; }
.s-spur i.vor { opacity: .38; }
.s-wert { font-size: 13px; font-weight: 600; color: var(--text-1); text-align: right; white-space: nowrap; }
.s-wert small { display: block; font-weight: 450; font-size: 12px; color: var(--text-3); }
.s-wert .status { margin-left: 6px; }
.s-zeile.blass .s-spur i { opacity: .35; }
.s-leer { margin: 6px 0; font-size: 14px; color: var(--text-3); }
.s-block { margin: 10px 0 2px; font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: none; }
.s-block:first-child { margin-top: 0; }
@keyframes s-wachsen { from { transform: scaleX(0); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .s-spur i { animation: none; } }
@media (max-width: 620px) {
  .s-zeile { grid-template-columns: minmax(0, 1fr) auto; }
  .s-name { grid-column: 1 / -1; }
  .s-wert { white-space: normal; max-width: 46vw; }
}

/* kleines zweites Diagramm unter dem Pareto */
.s-summe { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--raster); }
.s-klein { margin: 0 0 6px; font-size: 13px; color: var(--text-2); }

/* Tabelle der Wiederkehrer: eigener waagrecht scrollender Kasten */
.s-tabelle { max-width: 100%; min-width: 0; }
.s-tabelle .tabelle-huelle { max-height: 440px; }
.als-tabelle { max-width: 100%; min-width: 0; }

/* Flächen je Gebäude */
.s-flaechen { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--raster); }
.s-flaechen .s-feld input { width: 76px; min-height: 40px; }
.s-flaechen .s-feld span:first-child { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.s-tabelle table.daten th:nth-child(-n+2), .s-tabelle table.daten td:nth-child(-n+2) { white-space: normal; min-width: 150px; max-width: 280px; }
.s-wisch { display: none; margin: 0 0 6px; font-size: 12px; color: var(--text-3); }
@media (max-width: 900px) { .s-wisch { display: block; } .s-tabelle table.daten th:nth-child(-n+2), .s-tabelle table.daten td:nth-child(-n+2) { min-width: 130px; max-width: 170px; } }

/* Knöpfe: gedrückt und gesperrt */
.knopf { white-space: nowrap; }
.knopf:active, .tabelle-knopf:active { transform: translateY(1px); }
button:disabled, input:disabled, select:disabled { opacity: .45; cursor: not-allowed; }

.s-aus { display: none; }

/* ---------- Excel-Vorlage: dritter Knopf im Ablagefeld und neben dem CSV-Knopf ---------- */
@media (min-width: 721px) and (max-width: 1100px) { .ablage .knoepfe { max-width: 330px; } }
#vorlage, #vorlage ~ a.knopf { margin-block: 4px; }

/* Verweis auf „Datei erkennen lassen“ */
.erkennen-satz { display: block; margin-top: 6px; font-size: 14px; color: var(--text-2); }
.erkennen-satz a { color: var(--akzent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
