/* Bauleitung 2.0 – Oberfläche im Look der Burgstrasse-App («Schwarz · Weiss · Silber», Marke Wölfli):
   schwarzer Rahmen (Seitenleiste, Kopf, Hauptknöpfe), helle Inhalte in weissen Karten mit Schatten,
   Akzent Silber, Schrift Manrope (lokal). Status-Farben (rot/gelb/grün) bleiben für die Prüfung erhalten, aber gedämpft. */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/static/fonts/manrope-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/static/fonts/manrope-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Rahmen (Schwarz) */
  --ink: #0e0e0d; --ink-2: #1a1a18; --ink-3: #1f1f1d; --ink-border: #3a3a37;
  --on-ink: #fff; --on-ink-muted: #b5b5b0; --on-ink-dim: #9a9a95;
  /* Inhalt (Hell) */
  --bg: #f4f3f7; --karte: #fff; --text: #17161c; --text-2: #4e4b5a; --text-3: #6e6b7a;
  --line: #eceaf2; --line-2: #e4e2ec; --line-3: #dad7e4; --rand: var(--line-2);
  /* Akzent Silber */
  --accent: #9ca3af; --accent-tint: #eef0f3; --accent-text: #5f6672; --accent-on-ink: #d7dbe1;
  /* Bisherige Namen, auf die neue Palette gelegt */
  --grau: var(--text-2); --grau2: var(--text-3);
  --primaer: var(--ink); --primaer-dunkel: var(--ink-2); --blau-bg: var(--accent-tint);
  --info: var(--accent-text); --info-bg: var(--accent-tint); --ki: var(--accent-text); --ki-bg: var(--accent-tint);
  /* Status (nur für die Prüfung, gedämpft) */
  --fehler: #b42318; --fehler-bg: #fbe3e0; --warnung: #8a5a00; --warnung-bg: #fbefd5; --ok: #1f6b3a; --ok-bg: #e6f2ea;
  --radius: 20px; --radius-klein: 14px; --radius-knopf: 12px;
  --schatten: 0 2px 10px rgba(23,22,28,.06); --schatten-hoch: 0 4px 16px rgba(95,102,114,.18); --schatten-schweb: 0 10px 28px rgba(23,22,28,.14);
}
* { box-sizing: border-box; }
html { font-size: 15px; background: var(--bg); }
body { margin: 0; font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1 { font-size: 28px; margin: 2px 0 4px; letter-spacing: -.4px; font-weight: 800; line-height: 1.15; } h2 { font-size: 18px; margin: 0 0 10px; font-weight: 800; letter-spacing: -.2px; } h3 { font-size: 15px; margin: 0 0 6px; font-weight: 800; }
h4 { font-size: 11px; margin: 16px 0 8px; color: var(--text-3); text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
p { margin: 6px 0 10px; line-height: 1.5; }
a { color: var(--text); text-decoration-color: var(--line-3); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--text); }
.klein { font-size: 12.5px; color: var(--text-3); } .mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px; }
.warn { color: var(--warnung); } .fehlertext { color: var(--fehler); font-weight: 700; }
[hidden] { display: none !important; }
::selection { background: var(--accent-on-ink); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.ico { width: 18px; height: 18px; flex-shrink: 0; }

/* Marke */
.logo { display: block; height: 34px; width: auto; user-select: none; }
.logo.gross { height: 44px; }
.caps { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }

/* Rahmen: Seitenleiste (schwarz) + Hauptbereich (hell) */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.seite { background: var(--ink); color: var(--on-ink); padding: 24px 14px 20px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.seite .marke { padding: 0 8px; }
.seite .marke .caps { display: block; color: var(--on-ink-dim); margin-top: 8px; }
.sb-zurueck { display: inline-flex; align-items: center; gap: 8px; margin: 0 2px; padding: 8px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--on-ink-muted); text-decoration: none; }
.sb-zurueck:hover { background: var(--ink-2); color: var(--on-ink); }
.projekt-karte { display: flex; gap: 10px; align-items: center; background: var(--ink-2); border: 1px solid var(--ink-border); border-radius: 14px; padding: 10px 12px; cursor: pointer; }
.projekt-karte:hover { border-color: var(--accent); }
.projekt-karte b { display: block; font-size: 13.5px; color: var(--on-ink); } .projekt-karte small { color: var(--on-ink-muted); font-size: 12px; }
.pk-icon { color: var(--accent-on-ink); display: inline-flex; } .pk-pfeil { margin-left: auto; color: var(--on-ink-dim); font-size: 12px; }
.sb-select { font: inherit; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 10px; }
.sb-nav { display: flex; flex-direction: column; gap: 4px; }
.sb-link { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; text-decoration: none; color: var(--on-ink-muted); font-weight: 700; font-size: 14px; }
.sb-link:hover { background: var(--ink-2); color: var(--on-ink); } .sb-link.aktiv { background: var(--ink-3); color: var(--accent-on-ink); }
.sb-titel { color: var(--on-ink-dim); margin: 16px 0 6px 12px; }
.stufe { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 12px; cursor: pointer; color: var(--on-ink-muted); }
.stufe:hover { background: var(--ink-2); }
.stufe b { display: block; font-size: 13.5px; color: var(--on-ink-muted); } .stufe small { color: var(--on-ink-dim); font-size: 11.5px; }
.stufe-nr { width: 28px; height: 28px; border-radius: 9px; background: var(--ink-3); color: var(--on-ink-muted); display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800; flex-shrink: 0; }
.stufe.aktiv { background: var(--ink-3); } .stufe.aktiv b { color: var(--on-ink); }
.stufe.aktiv .stufe-nr { background: var(--accent); color: var(--ink); }
.stufe.fertig .stufe-nr { background: var(--accent-on-ink); color: var(--ink); }
.stufe.fertig .stufe-nr::before { content: "✓"; } .stufe.fertig .stufe-nr span { display: none; }
.stufe.offen .stufe-nr { background: var(--ink-3); color: var(--accent-on-ink); box-shadow: inset 0 0 0 2px var(--ink-border); }
.sb-unten { margin-top: auto; border-top: 1px solid var(--ink-3); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.sb-kv { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--on-ink-dim); padding: 0 4px; } .sb-kv b { color: var(--on-ink); }
.sb-user { display: flex; gap: 10px; align-items: center; padding: 0 4px; } .sb-user > div { flex: 1; min-width: 0; }
.sb-user b { display: block; font-size: 13px; color: var(--on-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sb-user small { color: var(--on-ink-muted); font-size: 11.5px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.seite .klein { color: var(--on-ink-dim); padding: 0 4px; }
#btn-abmelden { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 12px; font-weight: 700; color: var(--on-ink-muted); border-radius: 10px; }
#btn-abmelden:hover { background: var(--ink-2); color: var(--on-ink); }
.haupt { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 36px 0; font-size: 12.5px; color: var(--text-3); }
.brotkrumen { font-weight: 700; } .brotkrumen a { color: var(--text-3); text-decoration: none; } .brotkrumen a:hover { color: var(--text); }
.topbar-rechts { display: flex; gap: 6px; }
.inhalt { padding: 22px 36px 130px; max-width: 1400px; width: 100%; }
.kopfzeile { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 800; }
.untertitel { color: var(--text-3); font-size: 13.5px; margin-top: 4px; }
.pille { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 800; white-space: nowrap; background: var(--line); color: var(--text-2); }
.pille::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pille.ok { background: var(--ok-bg); color: var(--ok); } .pille.warn { background: var(--warnung-bg); color: var(--warnung); }
.pille.fehler { background: var(--fehler-bg); color: var(--fehler); } .pille.blau { background: var(--ink); color: var(--on-ink); }
.pille.blau::before { background: var(--accent-on-ink); }
.pille:empty { display: none; }

/* Grundelemente */
.karte { background: var(--karte); border: 0; border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--schatten); }
.karte-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; flex-wrap: wrap; }
.zeile { display: flex; gap: 10px; align-items: center; margin: 8px 0; }
.zeile label { min-width: 140px; color: var(--text-2); font-weight: 600; font-size: 13.5px; } .zeile label.check { min-width: 0; }
input[type=text], input[type=password], input[type=number], select, textarea { font: inherit; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 12px; flex: 1; width: 100%; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
button { font: inherit; font-weight: 700; padding: 9px 14px; border-radius: var(--radius-knopf); border: 1px solid var(--line-2); background: #fff; color: var(--text); cursor: pointer; transition: background .15s, border-color .15s, transform .1s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button:hover { border-color: var(--accent); background: var(--bg); } button:active { transform: scale(.99); } button:disabled { opacity: .55; cursor: not-allowed; }
button.primaer { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
button.primaer:hover:not(:disabled) { background: var(--ink-2); border-color: var(--ink-2); }
button.weiss { background: #fff; border-color: var(--line-2); }
button.leise { background: transparent; border-color: transparent; color: var(--text-2); } button.leise:hover { background: var(--accent-tint); border-color: transparent; color: var(--text); }
button.gross { padding: 13px 24px; font-size: 15px; min-height: 48px; }
button.klein-btn { padding: 4px 10px; font-size: 12.5px; }
.link { color: var(--text); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-3); }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); margin: 8px 0; font-weight: 500; }
.zwei-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.zwei-spalten-breit { display: grid; grid-template-columns: minmax(380px, 7fr) minmax(320px, 5fr); gap: 18px; align-items: start; }
@media (max-width: 1150px) { .zwei-spalten, .zwei-spalten-breit { grid-template-columns: 1fr; } .app { grid-template-columns: 208px 1fr; } .inhalt, .topbar { padding-left: 20px; padding-right: 20px; } }
.schrittliste { padding-left: 22px; line-height: 1.55; } .schrittliste li { margin-bottom: 6px; }
.band { border-radius: 16px; padding: 13px 16px; margin-bottom: 16px; background: var(--accent-tint); color: var(--text-2); display: flex; gap: 12px; align-items: center; }
.band.blau { background: var(--accent-tint); color: var(--text); }
.band.gruen { background: var(--ok-bg); color: var(--ok); } .band.warn { background: var(--warnung-bg); color: var(--warnung); }
.band > div { flex: 1; } .band-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.band.gross-band { flex-direction: column; text-align: center; padding: 24px; font-size: 16px; }
.einrichten { box-shadow: var(--schatten-hoch), inset 0 0 0 2px var(--accent); }
details.mehr summary { cursor: pointer; color: var(--accent-text); font-weight: 800; }
details.mehr > :not(summary) { margin-top: 10px; }
.fortschritt { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 8px 0; }
#fortschritt-balken { height: 100%; width: 0; background: var(--accent); transition: width .3s; }

/* Übersicht */
.wurzel-zeile { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.wurzel-zeile .knoepfe { display: flex; gap: 8px; }
.summe { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 16px; }
.summe .kachel { border-radius: 16px; padding: 14px 16px; min-width: 140px; background: var(--accent-tint); color: var(--text); }
.summe .kachel b { display: block; font-size: 26px; line-height: 1.05; font-weight: 800; letter-spacing: -.5px; }
.summe .kachel.erledigt { background: var(--ok-bg); color: var(--ok); } .summe .kachel.offen { background: var(--warnung-bg); color: var(--warnung); }
.summe .kachel.unvollstaendig { background: var(--fehler-bg); color: var(--fehler); } .summe .kachel.alle { background: var(--ink); color: var(--on-ink); }
.uebersicht { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.uebersicht th { text-align: left; font-size: 11px; color: var(--text-3); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; padding: 8px 8px; background: var(--bg); }
.uebersicht th:first-child { border-radius: 10px 0 0 10px; } .uebersicht th:last-child { border-radius: 0 10px 10px 0; }
.uebersicht td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.uebersicht tr.zeile-ordner { cursor: pointer; } .uebersicht tr.zeile-ordner:hover { background: var(--bg); }
.uebersicht .name { font-weight: 700; }
.status-pille { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.status-pille::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pille.erledigt { background: var(--ok-bg); color: var(--ok); } .status-pille.veraltet { background: var(--warnung-bg); color: var(--warnung); }
.status-pille.bereit { background: var(--ink); color: var(--on-ink); } .status-pille.bereit::before { background: var(--accent-on-ink); }
.status-pille.unvollstaendig { background: var(--fehler-bg); color: var(--fehler); }
.status-pille.leer { background: var(--line); color: var(--text-3); }
.balken { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 6px; width: 120px; } .balken div { height: 100%; background: var(--accent); }
.fehlt-liste { color: var(--fehler); } .fehlt-warn { color: var(--warnung); }
.uebersicht button { padding: 6px 12px; font-size: 13px; white-space: nowrap; }
.dropzone { border: 2px dashed var(--line-3); border-radius: 14px; padding: 18px; text-align: center; color: var(--text-3); background: #fff; }
.dropzone.aktiv { border-color: var(--ink); background: var(--accent-tint); }
.dropzone ul { text-align: left; margin: 8px 0 0; padding-left: 18px; max-height: 120px; overflow: auto; }

/* Stufe 1: Checkliste */
.ck-gruppe { border-top: 1px solid var(--line); padding: 12px 0; }
.ck-gruppe:first-child { border-top: 0; }
.ck-kopf { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.ck-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-tint); display: inline-flex; align-items: center; justify-content: center; color: var(--text); font-size: 16px; }
.ck-kopf b { display: block; font-size: 14px; } .ck-kopf small { color: var(--text-3); font-size: 12px; }
.ck-kopf .wachsen { flex: 1; }
.zaehler { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 800; background: var(--ok-bg); color: var(--ok); }
.zaehler.offen { background: var(--warnung-bg); color: var(--warnung); } .zaehler.fehlt { background: var(--fehler-bg); color: var(--fehler); }
.ck-pfeil { color: var(--text-3); font-size: 12px; width: 16px; text-align: center; }
.ck-punkte { margin: 8px 0 0 52px; }
.ck-punkt { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; gap: 8px; }
.ck-punkt .dok-namen { color: var(--text-3); font-size: 12px; }
.ck-ok { color: var(--ok); font-weight: 800; }
.ck-fehlt { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 800; background: var(--warnung-bg); color: var(--warnung); }
.ck-fehlt.pflicht { background: var(--fehler-bg); color: var(--fehler); } .ck-fehlt::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ck-punkt button { padding: 4px 10px; font-size: 12px; }
.erforderlich { background: var(--ink); color: var(--on-ink); border-radius: var(--radius); padding: 24px; box-shadow: var(--schatten-hoch); }
.erforderlich .pdf-icon { width: 54px; height: 54px; border-radius: 14px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--ink); margin-bottom: 18px; }
.erforderlich .eyebrow { color: var(--accent-on-ink); }
.erforderlich h2 { font-size: 20px; margin: 4px 0 8px; color: var(--on-ink); }
.erforderlich p, .erforderlich .klein { color: var(--on-ink-muted); }
.erforderlich button.primaer { width: 100%; padding: 13px; font-size: 15px; margin-top: 10px; background: var(--accent); color: var(--ink); border-color: var(--accent); }
.erforderlich button.primaer:hover:not(:disabled) { background: var(--accent-on-ink); border-color: var(--accent-on-ink); }
.alles-da { background: var(--ok-bg); border-radius: var(--radius); padding: 24px; color: var(--ok); }
.alles-da h2 { color: var(--ok); margin: 4px 0 8px; }

/* Dokumentliste */
.dok-liste { list-style: none; margin: 0; padding: 0; }
.kapitel { display: flex; align-items: center; gap: 10px; margin: 12px 0 6px; padding: 6px 8px; border-bottom: 2px solid var(--line-2); font-weight: 800; }
.kapitel-nr { display: inline-flex; min-width: 26px; height: 22px; align-items: center; justify-content: center; border-radius: 11px; background: var(--ink); color: var(--on-ink); font-size: 12px; }
.kapitel-name { flex: 1; }
.kapitel-fehlt { font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.kapitel.fehlt-pflicht { border-color: var(--fehler); } .kapitel.fehlt-pflicht .kapitel-fehlt { background: var(--fehler-bg); color: var(--fehler); }
.kapitel.fehlt-warnung { border-color: var(--warnung); } .kapitel.fehlt-warnung .kapitel-fehlt { background: var(--warnung-bg); color: var(--warnung); }
.dok { display: grid; grid-template-columns: 22px 46px 1fr auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 12px; margin-bottom: 6px; background: var(--bg); }
.dok.aus { background: transparent; color: var(--text-3); box-shadow: inset 0 0 0 1px var(--line); } .dok.aus .dok-name { text-decoration: line-through; }
.dok-pos { color: var(--text-3); font-size: 12px; text-align: right; }
.dok-thumb { width: 46px; height: 60px; object-fit: contain; background: #fff; border: 1px solid var(--line-2); border-radius: 4px; }
.dok-name { font-weight: 700; word-break: break-word; font-size: 13.5px; }
.dok-meta { font-size: 12.5px; color: var(--text-3); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.typ-link { color: var(--text); cursor: pointer; border-bottom: 1px dotted var(--accent-text); font-weight: 600; }
.typ-select { font-size: 12.5px; padding: 2px 4px; border: 1px solid var(--ink); border-radius: 6px; width: auto; max-width: 260px; background: #fff; }
.dok-aktionen button { padding: 4px 9px; font-size: 12.5px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; margin-right: 4px; background: var(--line); color: var(--text-2); }
.badge.scan { background: var(--warnung-bg); color: var(--warnung); } .badge.aus { background: var(--fehler-bg); color: var(--fehler); }
.badge.ersatz { background: var(--accent-tint); color: var(--accent-text); } .badge.neu { background: var(--ok-bg); color: var(--ok); } .badge.ki { background: var(--ink); color: var(--on-ink); }

/* Stufe 2: Befunde */
.befund { background: #fff; border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px; box-shadow: var(--schatten); }
.befund.FEHLER { box-shadow: var(--schatten), inset 0 0 0 2px #f1c7c3; } .befund.WARNUNG { box-shadow: var(--schatten), inset 0 0 0 2px #f1dfb6; } .befund.INFO { box-shadow: var(--schatten); }
.befund.uebersteuert, .befund.beurteilt-unwichtig, .befund.beurteilt-falsch { opacity: .6; }
.befund .eyebrow { display: flex; align-items: center; gap: 6px; }
.befund.FEHLER .eyebrow { color: var(--fehler); } .befund.WARNUNG .eyebrow { color: var(--warnung); } .befund.INFO .eyebrow { color: var(--accent-text); }
.befund .eyebrow::before { content: "!"; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; }
.befund.INFO .eyebrow::before { content: "i"; }
.befund-titel { font-size: 18px; font-weight: 800; margin: 4px 0 6px; letter-spacing: -.2px; }
.befund-text { font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.sg { margin: 12px 0; border-top: 1px solid var(--line); }
.sg-zeile { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.sg-zeile .punkt { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.sg-zeile.soll .punkt { background: var(--ink); } .sg-zeile.gefunden .punkt { background: var(--warnung); }
.sg-zeile small { display: block; color: var(--text-3); font-size: 11.5px; }
.sg-zeile b { font-weight: 700; }
.sg-zeile.gefunden b { background: var(--warnung-bg); padding: 1px 6px; border-radius: 6px; }
.fund-knopf { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-tint); border: 1px solid transparent; border-radius: 12px; padding: 8px 12px; font-size: 13px; margin: 4px 6px 4px 0; cursor: pointer; font-weight: 600; }
.fund-knopf:hover { border-color: var(--accent); background: var(--line); }
.fund-knopf.aktiv { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.befund-aktionen { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 12px; font-size: 13px; }
.befund-aktionen button.primaer { padding: 9px 16px; }
.beurteilung { display: inline-flex; gap: 4px; align-items: center; margin-left: auto; }
.beurteilung .frage { color: var(--text-3); margin-right: 4px; font-size: 12.5px; }
.beurteilung button { padding: 4px 11px; font-size: 12.5px; border-radius: 20px; }
.beurteilung button.aktiv-stimmt { background: var(--ok); color: #fff; border-color: var(--ok); }
.beurteilung button.aktiv-unwichtig { background: var(--accent-text); color: #fff; border-color: var(--accent-text); }
.beurteilung button.aktiv-falsch { background: var(--fehler); color: #fff; border-color: var(--fehler); }
.gelernt-hinweis { font-size: 12px; color: var(--accent-text); margin-top: 6px; font-weight: 600; }
.vorschlag-zeile { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: var(--bg); border-radius: 12px; padding: 9px 12px; margin-top: 8px; font-size: 13px; }
.vorschlag-zeile .status { font-size: 11.5px; padding: 2px 8px; border-radius: 20px; background: var(--line); margin-left: 6px; font-weight: 700; }
.vorschlag-zeile .status.uebernommen { background: var(--ok-bg); color: var(--ok); } .vorschlag-zeile .status.abgelehnt { background: var(--line); color: var(--text-3); }
.vorschlag-zeile button { padding: 4px 10px; font-size: 12.5px; }
.bereiche { list-style: none; margin: 8px 0 0; padding: 0; }
.bereiche li { padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; display: flex; gap: 8px; align-items: center; }
.bereiche li.ok::before { content: "✓"; color: var(--ok); font-weight: 800; }
.bereiche li.offen::before { content: "•"; color: var(--warnung); font-weight: 800; font-size: 18px; line-height: 12px; }
.bereiche li.ungeprueft::before { content: "–"; color: var(--text-3); }
.bereiche li.ungeprueft { color: var(--text-3); }
#bereiche-karte summary { cursor: pointer; font-weight: 800; color: var(--ok); }
#bereiche-karte summary.offen { color: var(--warnung); }
.viewer { position: sticky; top: 16px; padding: 12px 14px; }
.viewer-kopf, .viewer-fuss { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 2px 2px 8px; }
.viewer-fuss { padding: 8px 2px 0; }
.viewer-bild { background: var(--accent-tint); border-radius: 14px; min-height: 360px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.viewer-bild img { width: 100%; height: auto; display: block; border-radius: 6px; box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.viewer-leer { padding: 24px; text-align: center; }
.ki-box { border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; background: var(--ink); color: var(--on-ink); font-size: 13px; box-shadow: var(--schatten-hoch); }
.ki-box .klein, .ki-box a { color: var(--on-ink-muted); } .ki-box a { text-decoration-color: var(--ink-border); }
.ki-box button { background: var(--accent); color: var(--ink); border-color: var(--accent); } .ki-box button:hover:not(:disabled) { background: var(--accent-on-ink); border-color: var(--accent-on-ink); }
.ki-box button.leise { background: transparent; color: var(--on-ink-muted); border-color: var(--ink-border); } .ki-box button.leise:hover { background: var(--ink-2); color: var(--on-ink); }
.ki-box .ki-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ki-box .ki-titel { font-weight: 800; font-size: 14px; }
.ki-box .punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; background: var(--on-ink-dim); }
.ki-box.laeuft .punkt { background: var(--accent-on-ink); animation: blink 1s infinite; } .ki-box.fertig .punkt { background: #7fd19a; } .ki-box.fehler .punkt { background: #f08c84; }
.ki-box .fortschritt { background: var(--ink-3); } .ki-box .fortschritt > div { background: var(--accent-on-ink); }
@keyframes blink { 50% { opacity: .3; } }
.ki-box ul { margin: 4px 0 0; padding-left: 18px; }

/* Stufe 3: Ausgabe */
.vorschau-karte { background: var(--accent-tint); display: flex; flex-direction: column; align-items: center; padding: 30px 20px; box-shadow: none; }
.stapel { position: relative; width: 240px; height: 320px; margin-bottom: 16px; }
.stapel img, .stapel .blatt { position: absolute; width: 220px; height: 300px; object-fit: cover; object-position: top; background: #fff; border: 1px solid var(--line-2); border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.stapel .blatt.b2 { left: 10px; top: 10px; } .stapel .blatt.b3 { left: 20px; top: 20px; }
.stapel img { left: 0; top: 0; z-index: 2; }
.stapel-text { text-align: center; }
.bereit-zeile { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.bereit-zeile:first-of-type { border-top: 0; } .bereit-zeile span { color: var(--text-2); } .bereit-zeile b { font-weight: 700; }
.bereit-kopf { display: flex; gap: 8px; align-items: center; font-weight: 800; margin-bottom: 6px; }
.bereit-kopf.ok { color: var(--ok); } .bereit-kopf.warn { color: var(--warnung); }
.dateiname { background: var(--accent-tint); border-radius: 12px; padding: 10px 12px; margin: 8px 0 12px; font-size: 13px; }
.reihenfolge { list-style: none; margin: 0; padding: 0; }
.reihenfolge li { display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.reihenfolge li .nr { color: var(--text-3); min-width: 26px; } .reihenfolge li .wachsen { flex: 1; }
.reihenfolge li .kap { font-size: 11.5px; color: var(--text-3); margin-left: 6px; }
.reihenfolge button { padding: 3px 9px; font-size: 12px; }
.ergebnis h2 { color: var(--ok); } .ergebnis .knoepfe { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.ergebnis table { border-collapse: collapse; width: 100%; font-size: 13px; margin-top: 8px; } .ergebnis th, .ergebnis td { border: 1px solid var(--line-2); padding: 5px 8px; text-align: left; }

/* Fusszeile */
.fuss { position: fixed; left: 240px; right: 0; bottom: 0; background: #fff; padding: 12px 36px; display: flex; justify-content: space-between; align-items: center; gap: 16px; z-index: 5; box-shadow: 0 -4px 16px rgba(23,22,28,.07); }
@media (max-width: 1150px) { .fuss { left: 208px; padding: 12px 20px; } }
.fuss .knoepfe { display: flex; gap: 10px; align-items: center; } .fuss button { white-space: nowrap; }
.fuss-links { font-size: 13.5px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.fuss-links.blockiert { color: var(--fehler); font-weight: 700; } .fuss-links.bereit { color: var(--ok); font-weight: 700; }

/* Dialoge */
.dialog { position: fixed; inset: 0; background: rgba(14,14,13,.45); display: flex; align-items: center; justify-content: center; z-index: 20; }
.dialog-inhalt { background: #fff; border-radius: var(--radius); padding: 20px 24px; max-width: 560px; width: 92%; max-height: 90vh; overflow: auto; box-shadow: var(--schatten-schweb); }
.dialog-inhalt.breit { max-width: 780px; }
.dialog-knoepfe { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.zuordnen-liste { max-height: 40vh; overflow: auto; border: 1px solid var(--line-2); border-radius: 14px; }
.zuordnen-liste .eintrag { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.zuordnen-liste .eintrag:last-child { border-bottom: 0; }
.zuordnen-liste .eintrag small { color: var(--text-3); } .zuordnen-liste button { padding: 4px 10px; font-size: 12.5px; }
.regeln { list-style: none; padding: 0; margin: 0 0 10px; max-height: 45vh; overflow: auto; }
.regeln li { display: flex; gap: 8px; align-items: center; padding: 8px 8px; border-bottom: 1px solid var(--line); } .regeln li.aus { opacity: .5; }
.regeln .kat { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: var(--line); color: var(--text-2); min-width: 84px; text-align: center; font-weight: 700; }
.regeln .quelle { font-size: 11px; color: var(--text-3); min-width: 50px; } .regeln .text { flex: 1; } .regeln button { padding: 2px 8px; font-size: 12px; }

/* Projekte */
.projekt-liste { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.projekt-zeile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--bg); }
.projekt-zeile.aktiv { background: var(--ink); color: var(--on-ink); } .projekt-zeile.aktiv small, .projekt-zeile.aktiv .klein { color: var(--on-ink-muted); }
.projekt-zeile .wachsen { flex: 1; } .projekt-zeile small { display: block; color: var(--text-3); font-size: 12px; }
.projekt-zeile button { padding: 4px 10px; font-size: 12.5px; }
.kandidat { background: var(--accent-tint); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; font-size: 13.5px; display: flex; gap: 10px; align-items: center; }
.kandidat .wachsen { flex: 1; } .kandidat button { padding: 4px 10px; font-size: 12.5px; }

/* Portal: Startseite */
.portal-body { background: var(--bg); }
.portal-kopf { background: var(--ink); color: var(--on-ink); }
.portal-kopf-innen { max-width: 1180px; margin: 0 auto; padding: 0 24px; height: 68px; display: flex; align-items: center; gap: 18px; }
.portal-kopf .caps { color: var(--on-ink-dim); }
.portal-rechts { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.portal-rechts .sb-user { margin-right: 8px; } .portal-rechts .sb-user b { color: var(--on-ink); } .portal-rechts .sb-user small { color: var(--on-ink-muted); }
.portal-rechts button { background: transparent; border-color: transparent; color: var(--on-ink-muted); padding: 8px 12px; font-size: 13px; }
.portal-rechts button:hover { background: var(--ink-2); color: var(--on-ink); border-color: transparent; }
.portal-rechts button.rahmen { border-color: var(--ink-border); background: var(--ink-2); color: var(--on-ink); border-radius: 20px; }
.portal { max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; }
.portal-gruss { margin-bottom: 22px; } .portal-gruss .caps { color: var(--text-3); } .portal-gruss h1 { font-size: 32px; margin-top: 4px; }
.portal-gruss .klein { margin-top: 4px; }
.portal-projekt { margin-bottom: 28px; }
.portal-select { max-width: 520px; font-size: 15px; padding: 11px 14px; font-weight: 600; }
.abschnitt-titel { display: flex; align-items: center; gap: 8px; color: var(--text-3); margin-bottom: 12px; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.kachel { display: flex; flex-direction: column; gap: 8px; background: #fff; border-radius: 16px; padding: 20px 20px 18px; text-decoration: none; color: var(--text); min-height: 180px; box-shadow: var(--schatten); transition: transform .15s, box-shadow .15s; }
.kachel:hover { transform: translateY(-2px); box-shadow: var(--schatten-schweb); }
.kachel b { font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
.kachel-symbol { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-tint); color: var(--text); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.kachel-symbol .ico { width: 22px; height: 22px; }
.kachel-pfeil { margin-top: auto; color: var(--accent-text); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; padding-top: 10px; display: inline-flex; align-items: center; gap: 6px; }
.kachel.dunkel { background: var(--ink); color: var(--on-ink); } .kachel.dunkel .klein { color: var(--on-ink-muted); }
.kachel.dunkel .kachel-symbol { background: var(--accent); color: var(--ink); } .kachel.dunkel .kachel-pfeil { color: var(--accent-on-ink); }
.kachel.inaktiv { opacity: .55; cursor: default; background: var(--accent-tint); box-shadow: none; }
.kachel.inaktiv:hover { transform: none; box-shadow: none; }
.kachel.inaktiv .kachel-symbol { background: #fff; color: var(--text-3); } .kachel.inaktiv .kachel-pfeil { color: var(--text-3); }
.fern-band { margin-top: 24px; }

/* Login / Einrichtung: schwarze Seite, weisse Karte */
.login-body { background: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 24px 16px; }
.login-marke { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 26px; color: var(--on-ink-dim); }
.login-marke .logo { height: 56px; }
.login-karte { width: 100%; max-width: 480px; padding: 30px 32px; margin: 0; box-shadow: var(--schatten-schweb); }
.login-karte h1 { font-size: 22px; margin: 0; }
.login-karte .titel { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.login-karte .titel .kachel-symbol { margin: 0; background: var(--accent); color: var(--ink); flex-shrink: 0; }
.login-karte .zeile { flex-direction: column; align-items: stretch; gap: 4px; margin: 12px 0; }
.login-karte .zeile label { min-width: 0; font-size: 13px; }
.login-karte .band { margin-top: 10px; }
.login-karte .dialog-knoepfe { justify-content: stretch; } .login-karte .dialog-knoepfe button { width: 100%; }
.login-fuss { color: var(--on-ink-dim); margin-top: 22px; text-align: center; }
@media (max-width: 600px) { .zeile { flex-wrap: wrap; } .zeile label { min-width: 100%; } .login-karte { padding: 22px 18px; } .portal-kopf-innen { gap: 10px; padding: 0 16px; } .portal { padding: 20px 16px 40px; } .portal-rechts .sb-user div { display: none; } }
#p-projekt-hinweis, .portal-projekt .mono { overflow-wrap: anywhere; }
@media (max-width: 600px) { .portal-kopf-innen { flex-wrap: wrap; height: auto; padding: 10px 16px; row-gap: 4px; } .portal-kopf .caps { display: none; } .portal-rechts { flex-basis: 100%; justify-content: flex-end; margin-left: 0; } .portal-rechts .sb-user { margin-right: auto; } .portal-rechts button { padding: 8px 9px; font-size: 12.5px; } }
.zip-zeile { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 6px; }
.zip-zeile .pille { padding: 2px 8px; font-size: 11px; } .zip-zeile .pille::before { display: none; }

/* Modul Submissionsmantel */
.adr-block { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 6px 0 4px; }
.adr-feld { display: flex; flex-direction: column; gap: 3px; } .adr-feld input { width: 100%; }
.foto-zeile { display: flex; gap: 14px; align-items: flex-start; }
.foto-vorschau { width: 180px; height: 110px; object-fit: cover; border-radius: 12px; background: var(--accent-tint); }
.abzuege input, .bkp-tabelle input { padding: 6px 8px; }
.abzuege td, .bkp-tabelle td { padding: 4px 6px; }
.ordner-liste { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px 18px; }
.ordner-liste details { padding: 6px 0; border-top: 1px solid var(--line); } .ordner-liste ul { margin: 6px 0 0; padding-left: 18px; }
a.stufe { text-decoration: none; }
@media (max-width: 700px) { .adr-block { grid-template-columns: 1fr; } }
