/* Startseite (Dashboard), Bauplan docs/superpowers/specs/2026-11-14-web-app-dashboard-design.md.
   Marken nur aus oo.css (hell und dunkel); Präfix der Klassen: st-.
   Haarlinien statt Schatten, Flächen 4 px, Knöpfe 3 px wie die übrige Web-App. Blau nur für den Hauptknopf („Neuer Beleg“),
   den Fokus und die Diagrammlinie; Töne der Pillen aus --ok/--warn/--alarm, Ringstücke aus der Ampel.
   Schwellen messen die SEITE (Containerabfragen auf .st-seite), nicht das Fenster. */

/* ── Seite ─────────────────────────────────────────────────────────────────── */
/* ☠️ position: relative macht den Rollbereich zum enthaltenden Block der unsichtbaren Hilfstexte (.st-sr in Ringen, Verlauf, Neuigkeiten).
   Ohne ihn standen sie weit unten im Inhalt am Fenster, machten das Dokument länger als das Fenster, und wer über das Ende der Seite hinaus
   rollte, rollte das ganze Fenster mit (Kopfband weg, unten leer; 14.11.2026, Wächter RollbereicheTests). */
.st-seite { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; container: st / inline-size; }
.st-innen { max-width: 1480px; margin: 0 auto; padding: 14px 18px 28px; display: grid; gap: 12px; min-width: 0; }
.st-flaeche { display: grid; gap: 12px; min-width: 0; }
.st-reihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; min-width: 0; }
.st-widget { display: flex; flex-direction: column; min-width: 0; }
.st-inhalt { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.st-inhalt > .st-karte { flex: 1 1 auto; }
.st-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.st-leise { color: var(--tinte-5); }

/* ── Kopf ──────────────────────────────────────────────────────────────────── */
.st-kopf { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; min-height: 32px; }
.st-gruss { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; min-width: 0; }
.st-gruss h1 { font-size: 19px; font-weight: 600; color: var(--tinte-1); }
.st-datum { color: var(--tinte-5); }
.st-gruss-platz { width: 280px; max-width: 70vw; }
.st-kopf-rechts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.st-zeitraum { min-width: 210px; }
.st-stand { color: var(--tinte-4); }
.st-anpassen-knopf.an { color: var(--tinte-1); }
/* Gesperrt nur für Hilfsmittel (aria-disabled): der Knopf behält den Fokus (Durchsicht U4). */
.st-kopf .kn[aria-disabled="true"], .st-werkzeug .kn[aria-disabled="true"] { opacity: .55; cursor: default; }

/* ── Karten ────────────────────────────────────────────────────────────────── */
.st-karte { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px; border: 1px solid var(--linie); border-radius: 4px;
  background: var(--flaeche); color: inherit; text-decoration: none; overflow: hidden; }
a.st-verweis:hover { border-color: var(--linie-stark); background: color-mix(in srgb, var(--flaeche-2) 40%, var(--flaeche)); }
a.st-verweis:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.st-kopfzeile { display: flex; align-items: center; gap: 8px; min-height: 20px; }
.st-titel { font-size: 13px; font-weight: 500; color: var(--tinte-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.st-pille { margin-left: auto; flex: 0 0 auto; }
.st-wert { font-size: 27px; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; color: var(--tinte-1); margin-top: 6px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.st-wert.gross { font-size: 40px; margin-top: 10px; }
.st-wert.mittel { font-size: 21px; margin-top: 2px; }
.st-zeilen { display: flex; flex-direction: column; gap: 1px; font-size: 12px; color: var(--tinte-5); min-width: 0; }
.st-zeilen.waagerecht { flex-direction: row; flex-wrap: wrap; gap: 2px 16px; }
.st-warnzeile { color: var(--alarm); }
.st-hinweis { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 6px 0 0; font-size: 12.5px; color: var(--tinte-5); }
.st-hinweis.st-z-zuviele { color: var(--warn); }
.st-hinweis.st-z-fehler { color: var(--alarm); }
.st-weg { color: var(--tinte-2); font-weight: 500; }
.st-fehler { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 7px 8px 7px 12px; border-radius: 4px;
  background: var(--alarm-grund); color: var(--alarm); }
.st-alles-weg { margin: 0; }

/* ── Platzhalter: ruhig, in Kartengröße (keine Bewegung) ───────────────────── */
.st-platz { gap: 12px; }
.st-platz-z { display: block; height: 12px; width: 60%; border-radius: 3px; background: var(--flaeche-2); }
.st-platz-z.kurz { width: 34%; }
.st-platz-z.gross { height: 26px; width: 48%; }
.st-platz-umsatz { min-height: 312px; }
.st-platz-kachel, .st-kachel { min-height: 150px; }
.st-platz-klein, .st-ring, .st-belege { min-height: 100px; }
.st-platz-aufgaben { min-height: 190px; }

/* ── Umsatz mit Kacheln (breit: Umsatz ≈ 58 %, Kacheln 2 × 2 daneben) ─────── */
.st-umsatz-feld { display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); gap: 12px; min-width: 0; }
.st-umsatz-feld.ohne-kacheln { grid-template-columns: minmax(0, 1fr); }
.st-umsatz { min-height: 312px; }
.st-umsatz-diagramm { position: relative; flex: 1 1 150px; min-height: 150px; margin-top: 12px; }
.st-umsatz-diagramm .st-verlauf { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-achse { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 11.5px; color: var(--tinte-5); }
.st-legende { display: inline-flex; gap: 14px; }
.st-lg::before { content: ""; display: inline-block; width: 14px; margin-right: 5px; vertical-align: middle; border-top: 2px solid var(--akzent); }
.st-lg-vorjahr::before { border-top: 1.5px dashed var(--tinte-6); }
.st-kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.st-kachel { position: relative; }
.st-kachel-linie { display: block; width: calc(100% + 32px); height: 40px; margin: auto -16px -14px; }

/* ── Diagramme (SVG) ───────────────────────────────────────────────────────── */
.st-verlauf { display: block; overflow: visible; }
.st-vl-linie { fill: none; stroke: var(--akzent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.st-vl-flaeche { fill: var(--akzent-schein); opacity: .55; }
.st-vl-vorjahr { fill: none; stroke: var(--tinte-6); stroke-width: 1.5; stroke-dasharray: 4 4; }
.st-vl-spalte { fill: transparent; }
.st-vl-spalte:hover { fill: color-mix(in srgb, var(--tinte-6) 14%, transparent); }
.st-kachel-linie .st-vl-linie { stroke-width: 1.5; }

/* ── Ring ──────────────────────────────────────────────────────────────────── */
.st-ring { flex-direction: row; align-items: center; gap: 16px; }
.st-ring-bild { flex: 0 0 70px; width: 70px; height: 70px; }
.st-ring-bild circle { fill: none; stroke-width: 6; }
.st-ring-spur { stroke: var(--flaeche-2); }
.st-ring-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-ton-akzent { stroke: var(--akzent); }
.st-ton-gut { stroke: var(--ampel-gruen); }
.st-ton-warn { stroke: var(--ampel-gelb); }
.st-ton-schlecht { stroke: var(--ampel-rot); }
.st-ton-neutral { stroke: var(--tinte-5); }
.st-ton-leise { stroke: var(--tinte-6); }

/* ── Belege heute ──────────────────────────────────────────────────────────── */
.st-belege { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; }
.st-belege-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-belege-verweis { display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; min-width: 0; }
.st-belege-verweis:hover .st-zeilen { color: var(--tinte-2); text-decoration: underline; }

/* ── Aufgaben ──────────────────────────────────────────────────────────────── */
.st-aufgaben { gap: 2px; }
.st-gesamt { font-variant-numeric: tabular-nums; }
.st-aufgaben-liste { list-style: none; margin: 6px 0 0; padding: 0; }
.st-aufgabe { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 0; border-top: 1px solid var(--linie-fein); min-width: 0; }
.st-aufgabe:first-child { border-top: 0; }
.st-anzahl { flex: 0 0 auto; min-width: 24px; justify-content: center; }
.st-aufgabe-titel { flex: 0 0 auto; font-weight: 600; color: var(--tinte-1); }
.st-aufgabe-zeile { min-width: 0; color: var(--tinte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-aufgabe-grund { flex: 0 1 auto; min-width: 0; font-size: 12px; color: var(--tinte-5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-aktion { flex: 0 0 auto; margin-left: auto; padding: 2px 4px; color: var(--tinte-2); font-weight: 500; text-decoration: none; }
.st-aktion:hover { color: var(--tinte-1); text-decoration: underline; }
/* Aktion ohne Ziel (nur im PC-Programm): leiser Text, kein Verweis (Durchsicht U6). */
.st-aktion-text, .st-aktion-text:hover { color: var(--tinte-5); font-weight: 400; text-decoration: none; }

/* ── Anpassen ──────────────────────────────────────────────────────────────── */
.st-anpassen { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px 12px; border: 1px dashed var(--linie-stark); border-radius: 4px;
  background: var(--flaeche); }
.st-anpassen-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.st-anpassen-text span { color: var(--tinte-5); font-size: 12px; }
.st-weggenommen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.st-anpassen-knoepfe { display: flex; gap: 8px; margin-left: auto; }
.st-bearbeiten .st-widget { outline: 1px dashed var(--linie-stark); outline-offset: 4px; border-radius: 4px; }
.st-bearbeiten .st-inhalt { pointer-events: none; opacity: .6; }
.st-werkzeug { display: flex; align-items: center; gap: 2px; padding: 0 0 6px; }
.st-werkzeug-titel { margin-right: auto; font-size: 12px; font-weight: 600; color: var(--tinte-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Ohne Widgets ──────────────────────────────────────────────────────────── */
.st-ohne { margin-top: 10vh; }
.st-module { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Schmaler: erst stapeln die Kacheln unter dem Umsatz, dann einspaltig ──── */
/* Unter dem Umsatz bleiben die Kacheln 2 × 2: vier nebeneinander kürzten ihre Titel neben der Pille (Durchsicht U11). */
@container st (max-width: 1100px) {
  .st-umsatz-feld { grid-template-columns: minmax(0, 1fr); }
}
@container st (max-width: 820px) {
  .st-umsatz, .st-platz-umsatz { min-height: 270px; }
  .st-wert.gross { font-size: 34px; }
}
@container st (max-width: 560px) {
  .st-innen { padding: 12px 16px 24px; }
  .st-kacheln, .st-reihe { grid-template-columns: minmax(0, 1fr); }
  .st-kachel, .st-platz-kachel { min-height: 0; }
  .st-wert.gross { font-size: 30px; }
  .st-kopf-rechts { width: 100%; }
  .st-zeitraum { flex: 1 1 100%; min-width: 0; }
  .st-neuer-beleg { margin-left: auto; }
  .st-aufgabe { flex-wrap: wrap; gap: 4px 10px; }
  .st-aufgabe-zeile { order: 5; flex: 1 1 100%; padding-left: 34px; white-space: normal; }
  .st-aufgabe-grund { order: 6; flex: 1 1 100%; padding-left: 34px; white-space: normal; }
  .st-anpassen-knoepfe { margin-left: 0; }
}
