/* QS PlotFactory – Oberfläche
   Farben als Variablen, damit sie später an das PlotFactory-Erscheinungsbild
   angepasst werden können. Keine externen Schriften oder Bibliotheken. */
:root {
  --bg: #f3f5f9;
  --flaeche: #ffffff;
  --flaeche-2: #f8fafc;
  --text: #0f172a;
  --text-2: #5b6475;
  --text-3: #8a93a3;
  --rand: #e3e7ee;
  --rand-stark: #cfd6e1;
  --akzent: #b71d41;
  --akzent-dunkel: #93162f;
  --akzent-hell: #fbeaee;
  --akzent-text: #ffffff;
  --grafik: #656a73;
  --info: #2f6fed;
  --info-dunkel: #1f56c7;
  --info-hell: #eaf1fe;
  --navi: #1d1f23;
  --navi-2: #2a2d33;
  --navi-text: #c9ccd2;
  --ok: #15803d;
  --ok-hell: #e9f8ef;
  --warn: #b45309;
  --warn-hell: #fff5e6;
  --fehler: #c2262e;
  --fehler-hell: #fdeeee;
  --violett: #6d3fc9;
  --violett-hell: #f1ebfd;
  --radius: 14px;
  --radius-klein: 9px;
  --schatten: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 16px rgba(15, 23, 42, .05);
  --schatten-hoch: 0 10px 30px rgba(15, 23, 42, .12);
  --schrift: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--schrift); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--akzent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 1rem; letter-spacing: -.01em; font-weight: 700; }
h1 small { color: var(--text-2); font-weight: 500; font-size: 1rem; margin-left: .35rem; }
h2 { font-size: 1.05rem; margin: 0 0 .85rem; font-weight: 650; }
h2 small { font-weight: 500; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid #9cbcf7; outline-offset: 2px; border-radius: 6px; }

/* Aufbau: Seitenleiste + Hauptbereich */
.app { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--navi) 256px, transparent 256px); }
.seitenleiste { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: .75rem; padding: 1.1rem .9rem; background: var(--navi); color: var(--navi-text); overflow-y: auto; }
.marke { display: flex; align-items: center; gap: .65rem; color: #fff; font-size: 1.05rem; padding: .2rem .4rem; }
.marke:hover { text-decoration: none; }
.marke-zeichen { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #d0284f, #b71d41 60%, #7d1430); box-shadow: 0 6px 16px rgba(183, 29, 65, .35); }
.marke-zeichen svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.neu-knopf { justify-content: center; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: 10px; color: var(--navi-text); font-weight: 500; }
.nav a:hover { background: var(--navi-2); color: #fff; text-decoration: none; }
.nav a[aria-current="page"] { background: rgba(183, 29, 65, .22); color: #fff; box-shadow: inset 3px 0 0 #e0466b; }
.nav-titel { margin: 1rem .75rem .35rem; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6f7d93; }
.konto { margin-top: auto; display: flex; align-items: center; gap: .65rem; padding: .75rem .5rem 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.konto form { margin: 0 0 0 auto; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: #2a3b55; color: #fff; font-weight: 650; font-size: .85rem; }
.konto-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.konto-text strong { color: #fff; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.konto-text a { color: #8fa3c0; font-size: .8rem; }
.icon-knopf { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; }
.icon-knopf:hover { background: rgba(127, 140, 160, .16); }

.hauptbereich { min-width: 0; display: flex; flex-direction: column; }
.kopfleiste { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .75rem; padding: .75rem 2rem; background: rgba(243, 245, 249, .85); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--rand); }
.menu-knopf, .marke-mobil { display: none; }
.schnellsuche { position: relative; flex: 1; max-width: 520px; margin: 0; }
.schnellsuche .icon { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.schnellsuche input[type=search] { width: 100%; max-width: none; padding: .6rem .8rem .6rem 2.4rem; border-radius: 999px; background: var(--flaeche); }
.inhalt { width: 100%; max-width: 1240px; margin: 0 auto; padding: 1.75rem 2rem 4rem; }
.inhalt.einzeln { min-height: 100vh; display: grid; place-items: center; max-width: none; background: radial-gradient(1200px 600px at 10% -10%, #f6dde3 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #e6e7ea 0%, transparent 55%), var(--bg); }
.inhalt.einzeln > * { width: 100%; }
.schleier { position: fixed; inset: 0; z-index: 40; background: rgba(15, 23, 42, .45); }

/* Karten und Grundbausteine */
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 1.35rem 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--schatten); }
.schmal { max-width: 420px; margin: 2rem auto; }
.hinweis { color: var(--text-2); }
.klein { font-size: .85rem; }
.abstand { margin-bottom: 1.25rem; }
.abstand-oben { margin-top: 1.5rem; }
.titelzeile { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.titelzeile h1, .titelzeile h2 { margin: 0; }
.knopfzeile { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.zurueck { display: inline-flex; align-items: center; gap: .35rem; color: var(--text-2); font-size: .9rem; margin-bottom: .75rem; }

.knopf { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1rem; border: 1px solid var(--rand-stark); border-radius: var(--radius-klein); background: var(--flaeche); color: var(--text); font: inherit; font-weight: 550; line-height: 1.3; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; }
.knopf:hover { border-color: var(--akzent); text-decoration: none; }
.knopf:active { transform: translateY(1px); }
.knopf.primaer { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); box-shadow: 0 4px 12px rgba(183, 29, 65, .25); }
.knopf.primaer:hover { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); }
.knopf.klein { padding: .3rem .65rem; font-size: .85rem; }
.knopf.breit { width: 100%; justify-content: center; margin-top: .5rem; }
.knopf.gross { padding: .75rem 1.3rem; font-size: 1rem; }
.knopf.warnung { border-color: #f0b4b7; color: var(--fehler); }
.knopf.warnung:hover { background: var(--fehler-hell); }
button.link { background: none; border: 0; color: var(--akzent); font: inherit; cursor: pointer; padding: 0; }
form.inline { display: inline; }
.inhalt > form[data-bestaetigen] { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1rem; }

/* Formulare */
.feld { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.1rem; }
.feld[hidden] { display: none; }
.feld label, legend { font-weight: 600; font-size: .9rem; }
.pflicht > label::after { content: " *"; color: var(--fehler); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], input[type=file], select, textarea {
  font: inherit; padding: .6rem .75rem; border: 1px solid var(--rand-stark); border-radius: var(--radius-klein); background: #fff; color: var(--text); width: 100%; max-width: 42rem; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 4px rgba(183, 29, 65, .14); }
textarea { resize: vertical; }
input[type=file] { padding: .5rem; background: var(--flaeche-2); border-style: dashed; }
fieldset { border: 1px solid var(--rand-stark); border-radius: var(--radius-klein); padding: .6rem .9rem .75rem; max-width: 42rem; margin: 0; }
fieldset div { display: flex; flex-direction: column; gap: .3rem; }
fieldset label { font-weight: normal; font-size: .95rem; display: inline-flex; gap: .45rem; align-items: center; }
.radio-liste div, .radio-liste ul { display: flex; flex-direction: column; gap: .3rem; list-style: none; padding: 0; margin: 0; }
.radio-liste label { font-weight: normal; }
.check-gross { display: flex; gap: .55rem; align-items: flex-start; font-weight: 600; }
.check-gross input { margin-top: .3rem; width: 1rem; height: 1rem; accent-color: var(--akzent); }
input[type=checkbox], input[type=radio] { accent-color: var(--akzent); }
.hilfe { color: var(--text-2); font-size: .82rem; }
.feld-fehler input, .feld-fehler select, .feld-fehler textarea, .feld-fehler .suchauswahl-eingabe { border-color: var(--fehler); }
.fehler { color: var(--fehler); font-size: .85rem; }
.fehlerbox { border: 1px solid #f3c2c4; background: var(--fehler-hell); color: var(--fehler); border-radius: var(--radius-klein); padding: .6rem .9rem; margin-bottom: 1rem; }
.fehlerbox p { margin: .25rem 0; }
.zeile { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.zeile .feld { margin-bottom: 0; }
.formular-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
.formular-raster .feld { min-width: 0; }
.formular-raster .breit-feld { grid-column: 1 / -1; }

/* Durchsuchbare Auswahl */
.suchauswahl { position: relative; max-width: 42rem; }
.suchauswahl select { display: none; }
.suchauswahl-eingabe { width: 100%; padding-right: 2.2rem !important; }
.suchauswahl::after { content: ""; position: absolute; right: .85rem; top: 1.05rem; width: 8px; height: 8px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); pointer-events: none; }
.suchauswahl-liste { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow-y: auto; margin: 0; padding: .3rem; list-style: none; background: #fff; border: 1px solid var(--rand-stark); border-radius: var(--radius-klein); box-shadow: var(--schatten-hoch); }
.suchauswahl-liste li { padding: .5rem .65rem; border-radius: 7px; cursor: pointer; }
.suchauswahl-liste li[aria-selected="true"], .suchauswahl-liste li:hover { background: var(--akzent-hell); color: var(--akzent-dunkel); }
.suchauswahl-liste li.leer { color: var(--text-3); cursor: default; background: none; }

/* Filter und Tabellen */
.filter { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; padding: .75rem; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten); }
.filter input[type=search] { flex: 1 1 260px; max-width: none; }
.filter select { width: auto; flex: 0 1 220px; }
.check { display: inline-flex; gap: .4rem; align-items: center; color: var(--text-2); }
.tabelle-rahmen { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten); }
.tabelle { width: 100%; border-collapse: separate; border-spacing: 0; }
.tabelle th, .tabelle td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--rand); vertical-align: middle; }
.tabelle th { font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); font-weight: 650; background: var(--flaeche-2); white-space: nowrap; }
.tabelle tbody tr { transition: background .1s; }
.tabelle tbody tr:hover { background: #f6f9ff; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle tr.inaktiv td { color: var(--text-3); }
.tabelle td a strong { font-variant-numeric: tabular-nums; }
tr.ueberfaellig td:first-child { box-shadow: inset 3px 0 0 var(--fehler); }
.zahl { font-variant-numeric: tabular-nums; white-space: nowrap; }
.leer-zeile { text-align: center !important; color: var(--text-3); padding: 2rem 1rem !important; }
.aktionen { display: flex; gap: .35rem; flex-wrap: wrap; }
.aktionen form { margin: 0; }
.aenderungen { margin: .25rem 0 0; padding-left: 1.1rem; font-size: .85rem; color: var(--text-2); }
.aenderungen strong { color: var(--text); font-weight: 600; }
.seiten { margin-top: 1rem; display: flex; gap: 1rem; align-items: center; }

/* Etiketten (Status, Typ) */
.etikett { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; background: #eef1f5; color: var(--text-2); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.etikett::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.etikett.warn { background: var(--warn-hell); color: var(--warn); }
.etikett.kunde { background: var(--info-hell); color: var(--info-dunkel); }
.etikett.intern { background: var(--violett-hell); color: var(--violett); }
.etikett.lieferant { background: var(--ok-hell); color: var(--ok); }
.etikett.status-erfasst { background: var(--warn-hell); color: var(--warn); }
.etikett.status-in_bearbeitung { background: var(--info-hell); color: var(--info-dunkel); }
.etikett.status-abgeschlossen { background: var(--ok-hell); color: var(--ok); }
.etikett.rot { background: var(--fehler-hell); color: var(--fehler); }
.etikett.gruen { background: var(--ok-hell); color: var(--ok); }

/* Meldungen */
.meldungen { margin-bottom: 1.25rem; }
.meldung { margin: 0 0 .5rem; padding: .75rem 1rem; border-radius: var(--radius-klein); border: 1px solid var(--rand); background: var(--flaeche); box-shadow: var(--schatten); }
.meldung-success { border-color: #b7e3c7; background: var(--ok-hell); color: var(--ok); }
.meldung-error { border-color: #f3c2c4; background: var(--fehler-hell); color: var(--fehler); }
.meldung-warning { border-color: #f5d7a8; background: var(--warn-hell); color: var(--warn); }
.meldung-info { border-color: #c9dafc; background: var(--info-hell); color: var(--info-dunkel); }
.alarm { display: flex; gap: .75rem; align-items: flex-start; border: 1px solid #f3c2c4; background: var(--fehler-hell); color: var(--fehler); border-radius: var(--radius); padding: .9rem 1.1rem; margin-bottom: 1.25rem; }
.alarm .icon { margin-top: .15rem; }
.alarm a { color: var(--fehler); font-weight: 600; }

/* Startseite */
.begruessung { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.begruessung h1 { margin: 0; font-size: 1.85rem; }
.begruessung p { margin: .25rem 0 0; color: var(--text-2); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem 1.25rem; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten); color: var(--text); }
.kpi:hover { text-decoration: none; border-color: #efc3cd; box-shadow: var(--schatten-hoch); }
.kpi-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--info-hell); color: var(--info); margin-bottom: .5rem; }
.kpi-wert { font-size: 1.9rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-text { color: var(--text-2); font-size: .88rem; }
.kpi.rot .kpi-icon { background: var(--fehler-hell); color: var(--fehler); }
.kpi.orange .kpi-icon { background: var(--warn-hell); color: var(--warn); }
.kpi.violett .kpi-icon { background: var(--violett-hell); color: var(--violett); }
.kpi.rot .kpi-wert { color: var(--fehler); }
.raster-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.liste-kompakt { list-style: none; margin: 0; padding: 0; }
.liste-kompakt li { display: flex; gap: .75rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--rand); }
.liste-kompakt li:last-child { border-bottom: 0; }
.liste-kompakt .titel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.kachel { display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.2rem; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten); color: var(--text); transition: box-shadow .15s, border-color .15s; }
.kachel:hover { border-color: #efc3cd; box-shadow: var(--schatten-hoch); text-decoration: none; }
.kachel span { color: var(--text-2); font-size: .9rem; }
.schnellzugriff { display: grid; gap: .5rem; }
.schnellzugriff a { display: flex; align-items: center; gap: .65rem; padding: .65rem .75rem; border-radius: 10px; color: var(--text); border: 1px solid var(--rand); }
.schnellzugriff a:hover { background: var(--flaeche-2); text-decoration: none; border-color: var(--rand-stark); }

/* Reklamation Detail */
.kopfkarte { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.kopfkarte .nummer { font-size: .85rem; font-weight: 650; letter-spacing: .03em; color: var(--text-3); font-variant-numeric: tabular-nums; }
.kopfkarte h1 { margin: .15rem 0 .5rem; }
.schritte { display: flex; gap: 0; list-style: none; padding: 0; margin: 0; counter-reset: schritt; }
.schritte li { position: relative; display: flex; align-items: center; gap: .5rem; padding: .25rem 1.4rem .25rem 0; color: var(--text-3); font-weight: 600; font-size: .9rem; counter-increment: schritt; }
.schritte li::before { content: counter(schritt); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--rand-stark); background: #fff; font-size: .8rem; }
.schritte li:not(:last-child)::after { content: ""; width: 1.1rem; height: 2px; background: var(--rand-stark); margin-left: .4rem; }
.schritte li.aktiv { color: var(--akzent-dunkel); }
.schritte li.aktiv::before { border-color: var(--akzent); background: var(--akzent); color: #fff; box-shadow: 0 0 0 4px var(--akzent-hell); }
.schritte li.erledigt { color: var(--ok); }
.schritte li.erledigt::before { content: "✓"; border-color: var(--ok); background: var(--ok); color: #fff; }
.daten { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.25rem; margin: 0; }
.daten dt { color: var(--text-2); font-size: .88rem; }
.daten dd { margin: 0; white-space: pre-line; }
.offen-wert { color: var(--text-3); font-style: italic; }
.spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.spalten > .karte { margin-bottom: 0; }
.fotos { display: flex; flex-wrap: wrap; gap: .9rem; }
.fotos figure { margin: 0; width: 190px; }
.fotos img { width: 190px; height: 140px; object-fit: cover; border-radius: 10px; border: 1px solid var(--rand); display: block; transition: transform .15s; }
.fotos a:hover img { transform: scale(1.02); }
.fotos figcaption { font-size: .8rem; color: var(--text-2); display: flex; justify-content: space-between; gap: .25rem; margin-top: .3rem; }
.dateiliste { list-style: none; margin: 0; padding: 0; }
.dateiliste li { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--rand); }
.dateiliste li:last-child { border-bottom: 0; }
.verlauf { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--rand); }
.verlauf > li { position: relative; padding: 0 0 1rem .9rem; }
.verlauf > li::before { content: ""; position: absolute; left: -1.55rem; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--akzent); }
.verlauf > li:last-child { padding-bottom: 0; }
details > summary { cursor: pointer; font-weight: 600; margin-bottom: .5rem; color: var(--akzent-dunkel); }
.passwort { font: 600 1.4rem/1.4 ui-monospace, Consolas, monospace; letter-spacing: .05em; padding: .75rem; background: var(--akzent-hell); border-radius: var(--radius-klein); text-align: center; user-select: all; }

/* Anmeldung */
.anmeldung { max-width: 420px; margin: 0 auto; padding: 2.25rem 2rem; border-radius: 20px; box-shadow: var(--schatten-hoch); }
.anmeldung .marke-zeichen { width: 48px; height: 48px; border-radius: 14px; margin-bottom: 1rem; }
.anmeldung .marke-zeichen svg { width: 26px; height: 26px; }
.anmeldung h1 { margin-bottom: .25rem; }

/* Navigation: Zähler und geplante Module */
.zaehler { margin-left: auto; min-width: 22px; padding: 0 .45rem; border-radius: 999px; background: var(--akzent); color: #fff; font-size: .75rem; font-weight: 700; line-height: 20px; text-align: center; }
.bald { margin-left: auto; padding: 0 .4rem; border-radius: 6px; background: rgba(255, 255, 255, .07); color: #7d8aa0; font-size: .68rem; font-weight: 600; line-height: 18px; }
.nav a { padding: .45rem .7rem; gap: .6rem; font-size: .93rem; }
.nav-titel { margin-top: .8rem !important; }

/* Listen */
.untertitel { margin: .2rem 0 0; color: var(--text-2); }
.gedaempft { color: var(--text-3); }
.klein { font-size: .85rem; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.mini-kpi { display: flex; align-items: baseline; gap: .5rem; padding: .75rem 1rem; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius-klein); color: var(--text); }
.mini-kpi strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.mini-kpi span { color: var(--text-2); font-size: .88rem; }
a.mini-kpi:hover { text-decoration: none; border-color: #efc3cd; }
.mini-kpi.rot strong { color: var(--fehler); }
.mini-kpi.orange strong { color: var(--warn); }
.reiter { display: flex; gap: .25rem; margin-bottom: .75rem; border-bottom: 1px solid var(--rand); overflow-x: auto; }
.reiter a { padding: .6rem .75rem; color: var(--text-2); font-weight: 550; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.reiter a:hover { color: var(--text); text-decoration: none; }
.reiter a[aria-current="page"] { color: var(--akzent); border-bottom-color: var(--akzent); }
.filter-chip { padding: .35rem .75rem; border-radius: 999px; background: var(--akzent-hell); color: var(--akzent-dunkel); font-size: .85rem; font-weight: 600; }
.filter-kompakt { margin: 0; padding: .4rem; flex-wrap: nowrap; }
.filter-kompakt select { flex: 0 1 auto; width: auto; }
.tabelle td:first-child { white-space: nowrap; }
.leerzustand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; padding: 2.5rem 1.5rem; }
.leerzustand h2 { margin: .5rem 0 0; }
.leerzustand p { margin: 0 0 .75rem; color: var(--text-2); max-width: 520px; }
.leerzustand-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--akzent-hell); color: var(--akzent); }
.leerzustand-icon .icon { width: 24px; height: 24px; }
.punkte { margin: 0; padding-left: 1.2rem; }
.punkte li { margin: .35rem 0; }

/* Auswertung */
.kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi-wert small { font-size: .9rem; font-weight: 600; color: var(--text-2); }
.karte-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.saeulen { display: flex; align-items: flex-end; gap: 6px; height: 220px; padding-top: 1.5rem; border-bottom: 1px solid var(--rand-stark); }
.saeule { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; outline: none; }
.saeule-balken { display: block; width: min(100%, 44px); min-height: 2px; border-radius: 4px 4px 0 0; background: var(--grafik); transition: background .15s; }
.saeule-balken.null { background: var(--rand-stark); }
.saeule:hover .saeule-balken, .saeule:focus-visible .saeule-balken { background: var(--akzent); }
.saeule-text { position: absolute; bottom: -1.6rem; font-size: .72rem; color: var(--text-3); white-space: nowrap; }
.saeule-tipp { position: absolute; bottom: calc(100% + 4px); z-index: 2; display: none; padding: .3rem .55rem; border-radius: 8px; background: var(--text); color: #fff; font-size: .8rem; white-space: nowrap; pointer-events: none; }
.saeule:hover .saeule-tipp, .saeule:focus-visible .saeule-tipp { display: block; }
.tabellenansicht { margin-top: 2.4rem; }
.tabellenansicht summary { cursor: pointer; color: var(--text-2); font-size: .88rem; }
.raster-auswertung { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.balkenliste { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.balkenliste a, .balkenliste li > span { display: block; color: var(--text); }
.balkenliste a:hover { text-decoration: none; }
.balkenliste a:hover .balken-wert { background: var(--akzent); }
.balken-kopf { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; margin-bottom: .25rem; }
.balken-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balken-kopf strong { font-variant-numeric: tabular-nums; }
.balken-spur { display: block; height: 8px; border-radius: 4px; background: #eef1f5; }
.balken-wert { display: block; height: 100%; min-width: 2px; border-radius: 4px; background: var(--grafik); transition: background .15s; }
.erklaerung { margin: 1rem 0 0; padding-top: .75rem; border-top: 1px dashed var(--rand); color: var(--text-3); font-size: .82rem; }
.hinweis-karte { background: var(--flaeche-2); box-shadow: none; }

/* Detailseite: Inhalt mit Reitern links, Eckdaten rechts */
.detail-raster { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; margin-top: 1.25rem; }
.detail-seite { position: sticky; top: 84px; }
.detail-haupt .reiter { margin-bottom: 1rem; }
.reiter-zahl { display: inline-block; min-width: 20px; margin-left: .3rem; padding: 0 .4rem; border-radius: 999px; background: #e9edf3; color: var(--text-2); font-size: .75rem; line-height: 18px; text-align: center; }
.reiter a[aria-current="page"] .reiter-zahl { background: var(--akzent-hell); color: var(--akzent-dunkel); }
.eckdaten { display: grid; gap: .15rem; margin: 0; }
.eckdaten dt { color: var(--text-3); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: .65rem; }
.eckdaten dt:first-child { margin-top: 0; }
.eckdaten dd { margin: 0; }
.aktionen { display: grid; gap: .5rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rand); }
.person { display: inline-flex; align-items: center; gap: .5rem; }
.avatar.klein { width: 26px; height: 26px; font-size: .7rem; background: var(--akzent-hell); color: var(--akzent-dunkel); }
.mini-fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.mini-fotos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--rand); display: block; }
.text-block { white-space: normal; }
.formular-raster textarea, .formular-raster fieldset, .formular-raster input[type=file], .detail-haupt textarea, .detail-haupt fieldset, .detail-haupt input, .detail-haupt select, .detail-haupt .suchauswahl { max-width: none; }
.formular-fuss { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rand); }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .raster-2 { grid-template-columns: minmax(0, 1fr); }
  .kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-raster { grid-template-columns: minmax(0, 1fr); }
  .detail-seite { position: static; order: -1; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); background: none; }
  .seitenleiste { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .2s ease; }
  .seitenleiste.offen { transform: none; box-shadow: var(--schatten-hoch); }
  .menu-knopf { display: inline-grid; }
  .marke-mobil { display: inline; color: var(--text); white-space: nowrap; }
  .kopfleiste { padding: .6rem 1rem; }
  .inhalt { padding: 1.25rem 1rem 3rem; }
  .spalten, .formular-raster, .raster-auswertung { grid-template-columns: minmax(0, 1fr); }
  .mini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .schnellsuche { display: none; }
  .kpis { gap: .75rem; }
  .kpi { padding: .9rem 1rem; }
  .kpi-wert { font-size: 1.5rem; }
  .daten { grid-template-columns: 1fr; gap: .1rem; }
  .daten dt { margin-top: .5rem; }
  .karte { padding: 1.1rem 1rem; }
  .tabelle th, .tabelle td { padding: .6rem .7rem; }
  .fotos figure, .fotos img { width: calc(50vw - 2.2rem); }
  .filter select { flex: 1 1 45%; }
  .kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-kompakt { flex-wrap: wrap; width: 100%; }
  .saeule-text { font-size: .62rem; }
  .saeulen { gap: 3px; }
  .saeule:nth-child(even) .saeule-text { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.kachel-modul strong { font-size: 1.02rem; }
.kachel-zahl { margin-top: auto; padding-top: .5rem; font-size: .82rem !important; font-weight: 600; color: var(--akzent) !important; }
.nowrap { white-space: nowrap; }
.etikett.aktion-angelegt, .etikett.aktion-aktiviert { background: var(--ok-hell); color: var(--ok); }
.etikett.aktion-geaendert, .etikett.aktion-verknuepft, .etikett.aktion-hochgeladen { background: var(--info-hell); color: var(--info-dunkel); }
.etikett.aktion-abgeschlossen, .etikett.aktion-wirksamkeit { background: var(--violett-hell); color: var(--violett); }
.etikett.aktion-deaktiviert, .etikett.aktion-archiviert, .etikett.aktion-wiedereroeffnet, .etikett.aktion-login_fehler, .etikett.aktion-login_gesperrt { background: var(--warn-hell); color: var(--warn); }
.aufgabenblock { margin-bottom: 1.75rem; }
.aufgabenblock-kopf { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.aufgabenblock-kopf h2 { margin: 0; }
.kpi-icon.klein { width: 30px; height: 30px; border-radius: 9px; margin: 0; }
.kpi-icon.klein .icon { width: 16px; height: 16px; }
.leer-zeile { display: flex; align-items: center; gap: .5rem; margin: 0; padding: .9rem 1.1rem; background: var(--flaeche); border: 1px dashed var(--rand-stark); border-radius: var(--radius-klein); color: var(--text-2); }
.leer-zeile .icon { color: var(--ok); }
.tabelle.feste-spalten { table-layout: fixed; }
.alarm-liste { margin: .3rem 0 0; padding-left: 1.1rem; }
@media (max-width: 900px) { .tabelle.feste-spalten { table-layout: auto; } .tabelle.feste-spalten col { width: auto !important; } }
/* Firmenlogo (static/img/logo.svg oder .png) */
.marke-logo { flex-direction: column; align-items: stretch; gap: .45rem; padding: 0; }
.logo-platte { display: flex; align-items: center; justify-content: center; padding: .7rem .9rem; background: #fff; border-radius: 12px; }
.logo-platte img { display: block; max-width: 100%; max-height: 44px; }
.marke-zusatz { padding-left: .3rem; color: #8fa3c0; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.marke-mobil img { height: 24px; vertical-align: middle; }
.marke-mobil span { color: var(--text-2); font-weight: 600; margin-left: .35rem; }
.anmeldung-logo { display: block; max-width: 220px; max-height: 70px; margin-bottom: 1.25rem; }
@media (max-width: 600px) {
  .schritte { flex-wrap: wrap; row-gap: .35rem; }
  .schritte li { padding-right: .6rem; font-size: .82rem; }
  .schritte li:not(:last-child)::after { width: .6rem; }
}
@media (max-width: 900px) { .detail-seite .karte + .karte { display: none; } }

/* Etappe 3: Massnahmen und Kosten */
.mini-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.massnahmenliste { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.massnahme { border: 1px solid var(--rand); border-left: 3px solid var(--akzent); border-radius: var(--radius-klein); padding: .7rem .9rem; }
.massnahme.erledigt { border-left-color: var(--ok); opacity: .8; }
.massnahme.ueberfaellig { border-left-color: var(--fehler); }
.massnahme-kopf { display: flex; gap: .4rem; flex-wrap: wrap; }
.massnahme-text { margin: .4rem 0 .2rem; font-weight: 550; }
.massnahme p { margin-bottom: 0; }
.massnahme-erledigen { margin-top: .5rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.massnahme-erledigen input { flex: 1 1 14rem; min-width: 0; }
.kosten-summen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.kosten-summen > div { display: flex; flex-direction: column; padding: .6rem .8rem; background: var(--flaeche-2); border-radius: var(--radius-klein); }
.kosten-summen strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.tabelle td.zahl, .tabelle th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.hinweis-wiederholung { border-left: 3px solid var(--warn); }
.hinweis-wiederholung h2 { display: flex; align-items: center; gap: .4rem; color: var(--warn); }
.warnhinweis { display: flex; gap: .5rem; align-items: flex-start; padding: .6rem .8rem; background: var(--warn-hell); border-radius: var(--radius-klein); color: var(--warn); font-size: .9rem; }
@media (max-width: 700px) {
  .kosten-summen, .mini-kpis-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Etappe 4 */
.klasse { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; font-weight: 800; }
.klasse.klein { width: 24px; height: 24px; border-radius: 7px; font-size: .8rem; }
.klasse-a { background: var(--ok-hell); color: var(--ok); }
.klasse-b { background: var(--warn-hell); color: var(--warn); }
.klasse-c { background: var(--fehler-hell); color: var(--fehler); }
.klasse-text.a { color: var(--ok); }
.klasse-text.b { color: var(--warn); }
.noten-raster .radio-liste > div { display: flex; flex-direction: row; flex-wrap: wrap; gap: .4rem; margin: .3rem 0 0; }
.noten-raster .radio-liste > div > div { display: block; }
.noten-raster .radio-liste label { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .7rem; border: 1px solid var(--rand); border-radius: 999px; cursor: pointer; font-weight: 500; }
.noten-raster .radio-liste label:has(input:checked) { border-color: var(--akzent); background: var(--akzent-hell); color: var(--akzent-dunkel); }
.noten-raster .feld { margin-bottom: 1rem; }
.kpis-kunden .kpi { gap: .2rem; }
.kpis-kunden .balken-spur { margin-top: .5rem; }
.fragebogen-wahl select { flex: 1 1 18rem; min-width: 0; }
.lesestand { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
tr.gedaempft td { color: var(--text-3); }

/* E-Mail einlesen (E-020) */
.email-zone { display: grid; gap: .6rem; margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--rand); }
.email-ziel { display: flex; gap: .9rem; align-items: center; padding: 1rem 1.1rem; border: 2px dashed var(--rand-stark); border-radius: var(--radius); background: var(--flaeche-2); cursor: pointer; transition: border-color .15s, background .15s; }
.email-ziel .kpi-icon { margin: 0; flex: none; background: var(--akzent-hell); color: var(--akzent); }
.email-ziel strong { display: block; font-size: 1.05rem; }
.email-ziel span { color: var(--text-2); font-size: .92rem; }
.email-ziel:hover, .email-ziel:focus-visible, .email-ziel.aktiv { border-color: var(--akzent); background: var(--akzent-hell); outline: none; }
.email-zone textarea { min-height: 2.8rem; resize: vertical; }
.email-status { margin: 0; padding: .6rem .8rem; border-radius: var(--radius-klein); background: var(--flaeche-2); font-size: .92rem; }
.email-status.ok { background: var(--ok-hell); color: var(--ok); }
.email-status.fehler { background: var(--fehler-hell); color: var(--fehler); }
.feld.aus-email input, .feld.aus-email textarea, .feld.aus-email select, .feld.aus-email .suchauswahl-eingabe { border-color: var(--ok); background: #f6fcf8; }
label.link { color: var(--akzent); cursor: pointer; text-decoration: underline; font-weight: 600; }
