/* BMN Stylesheet, abgeleitet aus Design/skizzen/skizze.css (Dana, 27.10.2026). */
:root {
  --text: #1a1a1a;
  --muted: #5f6670;
  --bg: #ffffff;
  --bg2: #f4f5f7;
  --line: #d9dde3;
  --accent: #1f4e79;
  --ok: #1e7b3c; --ok-bg: #e6f3ea;
  --warn: #9a6200; --warn-bg: #fff3db;
  --bad: #b3261e; --bad-bg: #fbe9e7;
  --neutral: #5f6670; --neutral-bg: #eef0f3;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 "Segoe UI", Inter, Helvetica, Arial, sans-serif; }
a { color: var(--accent); }
h1 { font-size: 22px; line-height: 1.25; font-weight: 600; margin: 0 0 4px; }
h2 { font-size: 15px; font-weight: 600; margin: 32px 0 8px; }
h2:first-child { margin-top: 0; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 24px 32px 64px; }
.wrap.wide { max-width: none; }

/* Kopf */
.kopf { border-bottom: 1px solid var(--line); background: var(--bg); }
.kopf .zeile { max-width: 1200px; margin: 0 auto; padding: 12px 32px;
  display: flex; align-items: center; gap: 24px; }
.kopf.wide .zeile { max-width: none; }
.kopf .marke { font-weight: 600; }
.kopf .projekt { flex: 1; }
.kopf .projekt select { max-width: 420px; }
.kopf .nutzer { color: var(--muted); }
.reiter { max-width: 1200px; margin: 0 auto; padding: 0 32px; display: flex; gap: 24px; }
.kopf.wide .reiter { max-width: none; }
.reiter a { color: var(--muted); text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.reiter a.aktiv { color: var(--accent); border-color: var(--accent); }

/* Seitentitel */
.titel { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
.titel .meta { color: var(--muted); }
.zurueck { display: inline-block; margin-bottom: 12px; }
.meldung { padding: 12px 16px; border: 1px solid var(--line); background: var(--bg2); margin-bottom: 24px; }
.meldung.ok { background: var(--ok-bg); border-color: var(--ok); }
.meldung.warn { background: var(--warn-bg); border-color: var(--warn); }
.meldung.bad { background: var(--bad-bg); border-color: var(--bad); }

/* Knöpfe */
.btn { display: inline-block; padding: 8px 16px; border: 1px solid var(--accent); background: var(--bg);
  color: var(--accent); text-decoration: none; cursor: pointer; font: inherit; }
.btn.primaer { background: var(--accent); color: #fff; }
.btn.gesperrt { opacity: .4; cursor: not-allowed; }
.btn.klein { padding: 4px 10px; }
.aktionen { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 32px; }
.aktionen .links { margin-right: auto; }
.aktionen .sperrgrund { color: var(--muted); }

/* Status */
.status { display: inline-block; padding: 2px 8px; font-weight: 600; white-space: nowrap; }
.status.ok { color: var(--ok); background: var(--ok-bg); }
.status.warn { color: var(--warn); background: var(--warn-bg); }
.status.bad { color: var(--bad); background: var(--bad-bg); }
.status.neutral { color: var(--neutral); background: var(--neutral-bg); }
.unterziel { color: var(--warn); }

/* Tabellen */
table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { background: var(--bg2); font-weight: 600; color: var(--muted); }
td.zahl, th.zahl { text-align: right; }
td .name { font-weight: 600; }
.leer { color: var(--muted); padding: 12px 16px; border: 1px dashed var(--line); }
.filter { display: flex; gap: 12px; margin-bottom: 12px; }
.filter select { width: auto; }

/* Formular */
form, .formular { max-width: 640px; }
.feld { margin-bottom: 16px; }
.feld label, .feld .label { display: block; font-weight: 600; margin-bottom: 4px; }
.feld .pflicht { font-weight: 400; color: var(--muted); }
.feld input[type=text], .feld input[type=number], .feld input[type=date], .feld input[type=email],
.feld select, .feld textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); font: inherit; background: var(--bg); }
.feld textarea { min-height: 96px; }
.feld .hilfe { color: var(--muted); margin-top: 4px; }
.feld.fehler input, .feld.fehler select, .feld.fehler textarea { border-color: var(--bad); }
.feld .fehlertext { color: var(--bad); margin-top: 4px; }
.feld .zeileninfo { color: var(--muted); margin-top: 8px; }
.upload { border: 1px dashed var(--line); padding: 16px; color: var(--muted); }
.upload .datei { color: var(--text); display: flex; gap: 16px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.upload input[type=date] { width: 160px; padding: 4px 8px; border: 1px solid var(--line); font: inherit; }
.haken { display: flex; gap: 8px; align-items: flex-start; }
.haken input { margin-top: 5px; }
.inline { display: flex; gap: 16px; }
.inline > * { flex: 1; }
.vorschlag { background: var(--bg2); padding: 12px 16px; margin-top: 8px; }

/* Schrittbalken */
.schritte { display: flex; gap: 0; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.schritte div { padding: 8px 24px 8px 0; color: var(--muted); }
.schritte div.aktiv { color: var(--accent); font-weight: 600; border-bottom: 2px solid var(--accent); }
.schritte div.fertig { color: var(--text); }
.schritte div.fertig::before { content: "✓ "; }

/* Zusammenfassung */
dl.zusammenfassung { max-width: 640px; margin: 0; }
dl.zusammenfassung div { display: flex; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
dl.zusammenfassung dt { width: 180px; color: var(--muted); flex-shrink: 0; }
dl.zusammenfassung dd { margin: 0; flex: 1; }
dl.zusammenfassung dd a { margin-left: 8px; }

/* Aufklappblock */
details { border: 1px solid var(--line); margin-bottom: 16px; }
details summary { padding: 12px 16px; cursor: pointer; font-weight: 600; background: var(--bg2); display: flex; gap: 16px; align-items: center; }
details > div { padding: 16px; }
details summary .status { margin-left: auto; }

/* Kommentare */
.kommentar { padding: 12px 0; border-bottom: 1px solid var(--line); }
.kommentar .kopfzeile { color: var(--muted); }
.kommentar.intern { background: var(--bg2); padding: 12px 16px; border-left: 3px solid var(--muted); }
.kommentar .anhang { margin-top: 4px; }

/* Prüfmaske zweispaltig */
.pruef { display: grid; grid-template-columns: 55fr 45fr; gap: 32px; align-items: start; }
.doku { border: 1px solid var(--line); min-height: 700px; display: flex; flex-direction: column; }
.doku .dokreiter { display: flex; gap: 0; border-bottom: 1px solid var(--line); background: var(--bg2); flex-wrap: wrap; }
.doku .dokreiter div { padding: 8px 16px; border-right: 1px solid var(--line); color: var(--muted); }
.doku .dokreiter div.aktiv { background: var(--bg); color: var(--text); font-weight: 600; }
.doku .werkzeuge { display: flex; gap: 16px; padding: 8px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.doku .werkzeuge input { width: 200px; padding: 4px 8px; border: 1px solid var(--line); font: inherit; }
.doku .seite { flex: 1; padding: 32px; color: var(--muted); background: repeating-linear-gradient(#fff 0 22px, #f4f5f7 22px 23px); }
.doku .seite mark { background: #ffe86b; color: var(--text); }
.entscheidung { display: flex; gap: 0; margin-bottom: 16px; }
.entscheidung label { flex: 1; border: 1px solid var(--line); padding: 10px; text-align: center; cursor: pointer; }
.entscheidung label.aktiv { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.entscheidung input { margin-right: 6px; }
.bedingungen td:nth-child(1) { white-space: nowrap; }
.bedingungen select { padding: 4px 6px; font: inherit; border: 1px solid var(--line); }
.systemreiter { display: flex; gap: 0; margin: 12px 0 16px; border-bottom: 1px solid var(--line); }
.systemreiter div { padding: 8px 16px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.systemreiter div.aktiv { color: var(--accent); border-bottom: 2px solid var(--accent); font-weight: 600; }
.klebend { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; border-top: 1px solid var(--line); margin-top: 24px; }

@media (max-width: 900px) {
  .wrap, .kopf .zeile, .reiter { padding-left: 16px; padding-right: 16px; }
  .pruef { grid-template-columns: 1fr; }
  .doku { min-height: 400px; }
  .inline { flex-direction: column; }
  .kopf .zeile { flex-wrap: wrap; gap: 8px; }
}

/* Ergänzung Anwendung: Abmelden als Formular-Knopf im Linkstil */
.inline-form { display: inline; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* Ergänzung A3/A4/E1 (aus den Skizzen übernommen) */
.reiter span.gesperrt { color: var(--muted); padding: 8px 0; border-bottom: 2px solid transparent; opacity: .6; }
.system { display: flex; gap: 16px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.system .ziel { margin-left: auto; white-space: nowrap; }
.system select, table select { padding: 4px 6px; font: inherit; border: 1px solid var(--line); }
.system input[type=checkbox] { margin-top: 5px; }
.linkfeld { display: flex; gap: 8px; }
.linkfeld input { flex: 1; min-width: 200px; padding: 4px 8px; border: 1px solid var(--line); font: inherit; background: var(--bg2); }
.dialog { max-width: 560px; border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(0,0,0,.12); padding: 24px; background: var(--bg); margin-bottom: 32px; }
.blockaktion { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 8px; }
.formular.breit, form.breit { max-width: none; }
table input[type=text], table input[type=email] { width: 100%; padding: 6px; border: 1px solid var(--line); font: inherit; }
table select[multiple] { min-height: 72px; }
.feld input[type=password] { width: 100%; padding: 8px 10px; border: 1px solid var(--line); font: inherit; background: var(--bg); }
.fest { padding: 8px 0; }

/* Abstände statt Inline-Stilen (CSP ohne style-src erlaubt keine style-Attribute) */
.abstand-oben { margin-top: 8px; }
.block-abstand { margin-top: 24px; }
.einladung-block { margin-bottom: 32px; }

/* Einladungstabelle: feste Spaltenbreiten, Link in eigener Zeile über alle Spalten */
table.einladungen { table-layout: fixed; }
table.einladungen td, table.einladungen th { overflow-wrap: anywhere; }
table.einladungen .status { white-space: normal; }
table.einladungen .sp-email { width: 22%; }
table.einladungen .sp-firma { width: 17%; }
table.einladungen .sp-rolle { width: 11%; }
table.einladungen .sp-gewerke { width: 18%; }
table.einladungen .sp-status { width: 10%; }
table.einladungen .sp-aktiv { width: 10%; }
table.einladungen .sp-link { width: 12%; }
table.einladungen select { max-width: 100%; }
table.einladungen select.gewerke { width: 100%; min-height: 0; }
table.einladungen .linkzeile td { background: var(--bg2); }
table.einladungen .linkfeld input { min-width: 0; }

.verborgen { display: none; }

/* F2 Produkt einreichen (aus der Skizze übernommen) */
.wahl { border: 1px solid var(--line); }
.wahl label { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: flex-start; font-weight: 400; margin: 0; }
.wahl label:last-child { border-bottom: 0; }
.wahl input { margin-top: 5px; }
.wahl b { display: block; }
.wahl .muted { display: block; }
.systeme { border: 1px solid var(--line); }
.systeme label { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 400; margin: 0; align-items: flex-start; }
.systeme label:last-child { border-bottom: 0; }
.systeme input { margin-top: 5px; }
.fehler-rahmen { border-color: var(--bad); }
.check h3 { font-size: 15px; font-weight: 600; margin: 16px 0 4px; }
.check ul { list-style: none; margin: 0; padding: 0; }
.check li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.check li span:last-child { white-space: nowrap; }
.dateien td { vertical-align: top; }
.dateien select, .dateien input[type=date] { padding: 4px 6px; font: inherit; border: 1px solid var(--line); width: 100%; }
.dateien td.fehler select, .dateien td.fehler input { border-color: var(--bad); }
.dateien .hinweis { color: var(--warn); margin-top: 4px; }
.dateien .sp-datei { width: 46%; } .dateien .sp-typ { width: 22%; } .dateien .sp-datum { width: 20%; } .dateien .sp-aktion { width: 12%; }
.kasten { background: var(--bg2); padding: 12px 16px; margin-top: 8px; }
.schmal { max-width: 640px; }
.abstand-oben-neg { margin-top: -8px; margin-bottom: 16px; }
.feld .inline input[type=text] { flex: 2; }
.feld .inline select { flex: 1; }
.upload input[type=file] { margin-top: 8px; }

/* A2, nachgeschärft 27.10.2026 (aus Design/skizzen/skizze.css übernommen) */
.pruef > * { min-width: 0; }
.doku .werkzeuge { flex-wrap: wrap; }
.doku .werkzeuge .ziel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.chip { display: inline-block; padding: 2px 8px; border: 1px solid var(--line); margin: 0 6px 4px 0; }
.chip .status { padding: 0; background: none; white-space: normal; }
.chip .grund { color: var(--muted); display: block; }
.nachweise { table-layout: fixed; }
.nachweise th:nth-child(1) { width: 24%; } .nachweise th:nth-child(3) { width: 22%; }
.nachweise th:nth-child(4) { width: 11%; } .nachweise th:nth-child(5) { width: 15%; }
.nachweise td, .nachweise th { padding: 8px 12px; }
.nachweise .name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; text-align: left; }
.nachweise tr.aktiv td { background: var(--bg2); }
.nachweise tr.aktiv td .name { font-weight: 600; }
.nachweise td a, .nachweise td button.link { cursor: pointer; }
.doku .werkzeuge .seite-nav { display: flex; gap: 4px; align-items: center; }
.doku .werkzeuge .seite-nav input { width: 48px; }
.doku .werkzeuge .ziel { color: var(--muted); margin-left: auto; }
.bedingungen td.stufe { white-space: nowrap; width: 48px; }
.bedingungen td.stand { width: 128px; }
.bedingungen tr.aktiv td { background: var(--bg2); }
.bedingungen tr.aktiv td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.bedingungen .fundstelle { margin-top: 4px; color: var(--muted); }
.bedingungen .fundstelle.fehlt { color: var(--bad); }
.bedingungen .gw { margin-top: 8px; }
.bedingungen .verknuepfung { color: var(--muted); }
.bedingungen .formular.klein { margin-top: 8px; padding: 12px; border: 1px solid var(--line); background: var(--bg); }
.bedingungen .formular.klein .feld { margin-bottom: 8px; }
.bedingungen .formular.klein .inline input { width: 100%; }
.ergebnis { padding: 12px 16px; background: var(--bg2); margin-bottom: 8px; }
.ergebnis .luecke { color: var(--warn); }
.kommentarwahl { display: flex; gap: 16px; margin-bottom: 4px; }
.zeilenwahl { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
dl.paket { margin: 0 0 16px; }
dl.paket div { display: flex; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--line); }
dl.paket dt { width: 160px; color: var(--muted); flex-shrink: 0; }
dl.paket dd { margin: 0; flex: 1; }

/* A2 Anwendung */
.a2 { max-width: none; }
.titel-eng { margin-bottom: 12px; }
.doku .seite { padding: 0; background: var(--bg2); }
.doku .bild { max-width: 100%; display: block; margin: 0 auto; }
.doku .doku-hinweis { padding: 0 16px 8px; }
.doku .doku-leer { padding: 32px 16px; color: var(--muted); }
.systemreiter button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 16px; color: var(--muted); font: inherit; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.systemreiter button.aktiv { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.bedingungen .fs-formular summary { color: var(--accent); cursor: pointer; margin-top: 4px; }
.bedingungen .fs-formular > .formular { max-width: none; }
.inline-details summary { color: var(--accent); cursor: pointer; }
.abstand-links { margin-left: 12px; }
.schmal-feld { flex: 0 0 120px; }
.aktionen-leiste { margin-top: 0; }
.entscheidung label input { margin-right: 6px; }
.bedingungen button.link, .fundstelle button.link { text-align: left; }
.rechts .formular { max-width: none; }

/* A2 PDF-Anzeige mit pdf.js: Canvas plus Textebene (markierbar, Text transparent) */
.doku .pdf-ansicht { position: relative; background: #fff; min-height: 200px; overflow: auto; }
.doku .pdf-canvas { display: block; }
.doku .pdf-hinweis { padding: 16px; }
.doku .textebene { position: absolute; top: 0; left: 0; overflow: hidden; line-height: 1; opacity: 1; }
.doku .textebene span, .doku .textebene br { position: absolute; white-space: pre; color: transparent; transform-origin: 0 0; cursor: text; }
.doku .textebene ::selection { background: rgba(31, 78, 121, .35); }
.doku .textebene .endOfContent { display: block; position: absolute; inset: 100% 0 0; z-index: -1; cursor: default; user-select: none; }

/* F3 und F4 (aus Design/skizzen/skizze.css übernommen, 27.10.2026) */
.einstufung { table-layout: fixed; }
.einstufung th:nth-child(1) { width: 20%; } .einstufung th:nth-child(2) { width: 26%; }
.einstufung th:nth-child(3) { width: 14%; } .einstufung th:nth-child(4) { width: 8%; }
.einstufung th:nth-child(5) { width: 14%; } .einstufung th:nth-child(6) { width: 18%; }
.einstufung td { overflow-wrap: anywhere; }
.hash { white-space: nowrap; color: var(--muted); }
.kasten { padding: 12px 16px; border: 1px solid var(--line); background: var(--bg2); margin-bottom: 16px; }
.kasten.ok { background: var(--ok-bg); border-color: var(--ok); }
.kasten.warn { background: var(--warn-bg); border-color: var(--warn); }
.kasten.bad { background: var(--bad-bg); border-color: var(--bad); }
.kasten .wort { font-weight: 600; }
.kasten p:last-child { margin-bottom: 0; }
.kasten dl.paket { margin-top: 12px; }
.umbruch { white-space: pre-line; }
.dateizeile { display: grid; grid-template-columns: 1fr 220px 180px 80px; gap: 16px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.dateizeile .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.dateizeile select, .dateizeile input[type=date] { width: 100%; padding: 4px 8px; border: 1px solid var(--line); font: inherit; }
.dateizeile .feldlabel { color: var(--muted); display: block; margin-bottom: 2px; }
.dateizeile .fehler select, .dateizeile .fehler input { border-color: var(--bad); }
.produkte { table-layout: fixed; }
.produkte th:nth-child(1) { width: 22%; } .produkte th:nth-child(2) { width: 16%; }
.produkte th:nth-child(3) { width: 30%; } .produkte th:nth-child(4) { width: 12%; }
.produkte th:nth-child(5) { width: 10%; } .produkte th:nth-child(6) { width: 10%; }
.produkte.mit-firma th:nth-child(1) { width: 20%; } .produkte.mit-firma th:nth-child(2) { width: 13%; }
.produkte.mit-firma th:nth-child(3) { width: 11%; } .produkte.mit-firma th:nth-child(4) { width: 26%; }
.produkte.mit-firma th:nth-child(5) { width: 11%; } .produkte.mit-firma th:nth-child(6) { width: 9%; } .produkte.mit-firma th:nth-child(7) { width: 10%; }
.produkte td { overflow-wrap: anywhere; }
.filter { flex-wrap: wrap; align-items: center; }
.filter input[type=text] { padding: 6px 10px; border: 1px solid var(--line); font: inherit; width: 260px; }
.filter select { padding: 6px 10px; border: 1px solid var(--line); font: inherit; }
.rechts-link { font-weight: 400; margin-left: 12px; }
.blockaktion-links { justify-content: flex-start; }
@media (max-width: 900px) {
  .einstufung, .einstufung thead, .einstufung tbody, .einstufung tr, .einstufung td { display: block; }
  .einstufung thead { display: none; }
  .einstufung tr { border: 1px solid var(--line); margin-bottom: 8px; }
  .einstufung td { border: 0; padding: 4px 12px; }
  .dateizeile { grid-template-columns: 1fr; }
}

/* A5 Export (aus Design/skizzen/a5-export.html übernommen) */
.wahl label.gesperrt { opacity: .5; cursor: not-allowed; }
.wahl .druck-sperre { display: block; margin-top: 4px; }
.exporte { table-layout: fixed; }
.exporte th:nth-child(1) { width: 11%; } .exporte th:nth-child(2) { width: 17%; }
.exporte th:nth-child(3) { width: 19%; } .exporte th:nth-child(4) { width: 8%; }
.exporte th:nth-child(5) { width: 10%; } .exporte th:nth-child(6) { width: 13%; }
.exporte th:nth-child(7) { width: 12%; } .exporte th:nth-child(8) { width: 10%; }
.exporte td { overflow-wrap: anywhere; }
