:root {
  --gold: #b8862f;
  --gold-soft: #d9b877;
  --bg: #f7f5f1;
  --surface: #ffffff;
  --surface-2: #f0ece4;
  --text: #16202e;
  --muted: #5d6b7d;
  --border: #e2dcd1;
  --blue: #0e1726;
  --danger: #b4452f;
  --ok: #3a7d4f;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(20,30,46,.08), 0 8px 24px rgba(20,30,46,.05);
}
[data-theme="dark"] {
  --bg: #0e1726; --surface: #15233a; --surface-2: #1c2c46;
  --text: #e8edf4; --muted: #93a3b8; --border: #25364f; --blue: #cbd3e0;
  --shadow: 0 1px 3px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 Inter, system-ui, sans-serif;
}
h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; font-weight: 700; line-height: 1.2; }
a { color: var(--gold); text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* Topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-size: 18px; }
.brand b { color: var(--gold); font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.plan-badge { font-size: 12px; padding: 3px 9px; border-radius: 20px; background: var(--surface-2); color: var(--muted); }
.plan-badge.pro { background: var(--gold); color: #fff; }
.langsw button, .icon-btn {
  background: none; border: 1px solid var(--border); color: var(--muted);
  padding: 4px 8px; border-radius: 7px; font-size: 13px;
}
.langsw button.on { background: var(--gold); color: #fff; border-color: var(--gold); }

.view { max-width: 1080px; margin: 0 auto; padding: 28px 20px 80px; }
.loading { color: var(--muted); text-align: center; padding: 60px; }

/* Buttons */
.btn { background: var(--gold); color: #fff; border: none; padding: 10px 18px; border-radius: 9px; font-weight: 600; }
.btn:hover { background: #a5772a; }
.btn.ghost { background: none; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Auth */
.auth-wrap { max-width: 420px; margin: 6vh auto 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.auth-wrap h1 { margin: 0 0 4px; font-size: 26px; }
.auth-wrap p.sub { color: var(--muted); margin: 0 0 16px; }
.auth-wrap p.auth-why { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin: 0 0 20px;
  background: var(--surface-2); border-left: 3px solid #b8862f; border-radius: 8px; padding: 12px 14px; }
.tabs { display: flex; gap: 4px; margin-bottom: 20px; background: var(--surface-2); padding: 4px; border-radius: 9px; }
.tabs button { flex: 1; background: none; border: none; padding: 8px; border-radius: 6px; color: var(--muted); font-weight: 600; }
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
label.field { display: block; margin-bottom: 14px; }
label.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
input, textarea, select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit;
}
textarea { min-height: 70px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold-soft); border-color: var(--gold); }
.form-err { color: var(--danger); font-size: 14px; margin: 4px 0 10px; min-height: 18px; }

/* Dashboard */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.dash-head h1 { margin: 0; font-size: 28px; }
.dash-head p { margin: 4px 0 0; color: var(--muted); }
.dash-purpose { max-width: 780px; line-height: 1.5; }
/* Onboarding-Hero (Erstnutzer, 0 Dokumente): Klartext-Einstieg statt leerer Heatmap. */
.ob-hero { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px 24px; margin-bottom: 28px; }
.ob-steps { margin: 0 0 18px; padding-left: 20px; color: var(--text); display: grid; gap: 8px; }
.ob-steps li { line-height: 1.45; }
.ob-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.doc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); cursor: pointer; transition: transform .08s; }
.doc-card:hover { transform: translateY(-2px); border-color: var(--gold-soft); }
.doc-card .type { font-size: 12.5px; letter-spacing: .01em; color: var(--gold); font-weight: 700;
  line-height: 1.3; display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 6px;
  overflow-wrap: anywhere; word-break: break-word; }
.doc-card h3 { margin: 6px 0 8px; font-size: 17px; overflow-wrap: anywhere; word-break: break-word; hyphens: auto; }
.doc-card .meta { font-size: 12px; color: var(--muted); }
.empty { color: var(--muted); padding: 40px; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); }
.section-title { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 30px 0 12px; }
.type-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.type-list button { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.type-list button:hover { border-color: var(--gold); }
.type-list b { display: block; font-family: "Playfair Display", serif; font-size: 16px; margin-bottom: 4px; }
.type-list small { color: var(--muted); }


/* ── Kaskaden-Fortschritt (Dashboard): jeder Doktyp als Status-Kachel ───────────
   erstellt = grün/klickbar, offen = ausgegraut „noch offen“ + anlegen. */
.cas-scope { margin: 22px 0; }
.cas-scope-h, .proj-title { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 0 0 6px; }
.cas-scope .sec-help { margin: 0 0 12px; }
.cas-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; }
.cas-arrow { align-self: center; color: var(--muted); font-size: 20px; flex: 0 0 auto; }
.cas-tile { position: relative; flex: 1 1 230px; max-width: 320px; min-height: 128px; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; background: var(--surface); display: flex; flex-direction: column; gap: 5px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .1s; }
.cas-tile:hover { border-color: var(--gold); box-shadow: var(--shadow); transform: translateY(-1px); }
.cas-tile.done { border-left: 4px solid var(--ok); }
.cas-tile.todo { background: var(--surface-2); border-style: dashed; opacity: .82; }
.cas-tile.todo:hover { opacity: 1; border-color: var(--gold); }
.cas-tile.is-star { border-top: 3px solid var(--gold); }
.cas-badge { font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.cas-badge.done { color: var(--ok); }
.cas-badge.todo { color: var(--muted); }
.cas-name { font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.cas-name .dt-abbr { color: var(--gold); }
.cas-title { font-size: 14px; }
.cas-meta { font-size: 12px; color: var(--muted); margin-top: auto; }
.cas-desc { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
/* Klartext-Bedeutung des Doktyps im Wizard-Kopf — Verständlichkeit, wo gearbeitet wird. */
.wz-doctype { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); max-width: 720px; }

/* ── Prozess-Modul (BPMN-artig) im Anwendungsfall-Editor ──────────────────────── */
.proc-help { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin: 0 0 12px; }
.proc-block { margin-bottom: 16px; }
.proc-bh { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 7px; }
.proc-rows { display: flex; flex-direction: column; gap: 7px; margin-bottom: 8px; }
.proc-row { display: flex; gap: 7px; align-items: center; }
.proc-in { flex: 1 1 auto; min-width: 0; }
.proc-row select { flex: 0 0 auto; max-width: 42%; }
.proc-row .proc-in.proc-cond { flex: 0 1 30%; }
.proc-arrow { color: var(--muted); font-weight: 700; }
.proc-del { flex: 0 0 auto; width: 28px; height: 30px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 7px; cursor: pointer; }
.proc-del:hover { color: #c0392b; border-color: #c0392b; }
.proc-type { border-left-width: 4px !important; }
.proc-type.pn-trigger { border-left-color: #2e7d52 !important; }
.proc-type.pn-task { border-left-color: #34507e !important; }
.proc-type.pn-decision { border-left-color: #b8862f !important; }
.proc-type.pn-end { border-left-color: #4a5568 !important; }

/* SVG-Ablaufdiagramm (read-only) */
.proc-diagram { margin-top: 8px; overflow-x: auto; }
.proc-dh { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.proc-empty { font-size: 12.5px; color: var(--muted); padding: 10px 0; }
.proc-svg { display: block; max-width: 100%; height: auto; }
.proc-band { fill: transparent; }
.proc-band.alt { fill: rgba(127, 127, 127, .055); }
.proc-lane-h { fill: var(--muted); font-size: 11px; text-anchor: middle; font-weight: 700; }
.proc-edge-line { fill: none; stroke: var(--muted); stroke-width: 1.6; opacity: .8; }
.proc-arrowhead { fill: var(--muted); }
.proc-edge-lab { fill: var(--muted); font-size: 10.5px; text-anchor: middle; }
.proc-node-t { fill: #fff; font-size: 12px; text-anchor: middle; font-weight: 600; }
.proc-shape { stroke: rgba(0, 0, 0, .15); stroke-width: 1; }
.pn-trigger .proc-shape { fill: #2e7d52; }
.pn-task .proc-shape { fill: #34507e; }
.pn-decision .proc-shape { fill: #b8862f; }
.pn-end .proc-shape { fill: #4a5568; }

/* ── „Wohin gehört das?“ — Anforderungs-Klassifikator ─────────────────────────── */
.clf-modal { max-width: 620px; }
.clf-in { width: 100%; box-sizing: border-box; margin: 6px 0 14px; resize: vertical; }
.clf-results { display: flex; flex-direction: column; gap: 10px; }
.clf-card { border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--surface); }
.clf-card.best { border-left-color: var(--gold); background: var(--surface-2); }
.clf-rank { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.clf-card.best .clf-rank { color: var(--gold); }
.clf-name { font-weight: 600; margin: 3px 0 5px; }
.clf-scope { font-size: 12.5px; line-height: 1.45; color: var(--muted); margin: 0 0 8px; }
.clf-terms { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.clf-terms-l { font-weight: 600; }
.clf-chip { display: inline-block; background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 1px 8px; margin: 2px 1px; font-size: 11.5px; }
.clf-none { font-size: 13px; color: var(--muted); line-height: 1.5; padding: 6px 0; }
.clf-lead { font-size: 13px; line-height: 1.5; padding: 11px 13px; border-radius: 9px; margin-bottom: 4px; border-left: 4px solid var(--gold); background: var(--surface-2); }
.clf-lead.comp { border-left-color: #2e7d52; }
.clf-lead.deliv { border-left-color: #34507e; }
.clf-create { margin-top: 14px; padding: 10px 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-radius: 8px; transition: background .15s; }
.clf-create.hl { background: var(--surface-2); border: 1px solid var(--gold); }
.clf-create-l { font-weight: 600; }
.clf-link { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 20px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.clf-link:hover { border-color: var(--gold); color: var(--gold); }

/* ── Parameter-Bibliothek (bSDD) ──────────────────────────────────────────────── */
.pp-wrap { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
@media (max-width: 760px) { .pp-wrap { grid-template-columns: 1fr; } }
.pp-list { display: flex; flex-direction: column; gap: 6px; }
.pp-item { border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 9px; padding: 9px 11px; background: var(--surface); cursor: pointer; }
.pp-item:hover { border-color: var(--gold); }
.pp-item.on { border-left-color: var(--gold); background: var(--surface-2); }
.pp-item-n { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pp-edit { min-width: 0; }
.pp-empty { color: var(--muted); font-size: 13px; padding: 16px 0; line-height: 1.5; }
.pp-form { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.pp-bsdd-src { font-size: 11px; color: var(--muted); word-break: break-all; margin: 0; }
.pp-bind { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 14px; }
.pp-bind-rows { display: flex; flex-direction: column; gap: 7px; }
.pp-bind-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.pp-bind-row .proc-del { margin-left: auto; }
.pp-bind-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px; border: 1px dashed var(--border); border-radius: 9px; margin-top: 4px; }
.pp-bind-add input, .pp-bind-add select { flex: 1 1 110px; min-width: 0; }
.ppb-req { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); flex: 0 0 auto; }
/* bSDD-Lookup-Modal */
.pp-bsdd-modal { max-width: 640px; }
/* Suchfeld bleibt beim Scrollen oben; das Modal ist der EINZIGE Scroll-Container
   (kein verschachtelter Scroll → expandierte Properties werden nicht verdeckt). */
.pp-bsdd-q { position: sticky; top: -2px; z-index: 2; width: 100%; box-sizing: border-box; margin: 0 0 12px; background: var(--surface); }
.pp-bsdd-out { display: flex; flex-direction: column; gap: 6px; }
.pp-bsdd-cls { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.pp-bsdd-cn { padding: 9px 11px; cursor: pointer; background: var(--surface); }
.pp-bsdd-cn:hover { background: var(--surface-2); }
.pp-bsdd-props { display: none; }
.pp-bsdd-props.open { display: block; padding: 6px 11px 10px; border-top: 1px solid var(--border); background: var(--bg); }
.pp-bsdd-prop { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.pp-bsdd-prop:last-child { border-bottom: none; }
.pp-bsdd-prop > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pp-bsdd-prop .btn { flex: 0 0 auto; }

/* ── Anwendungsfall-Detailseite (read-only, großzügig, theme-aware/Dark-Mode-fest) ── */
.ucd { max-width: 1040px; margin: 18px auto 72px; padding: 0 28px; }
@media (max-width: 560px) { .ucd { padding: 0 16px; } }
/* Hero: Navy in BEIDEN Modi (kein weißes Dokument mehr → Dark-Mode korrekt). */
.ucd-hero { background: linear-gradient(115deg, #0e1726, #1c2c46); color: #fff; padding: 32px 36px; border-radius: 16px; margin-bottom: 36px; }
.ucd-kick { font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.ucd-hero h1 { font-family: "Playfair Display", Georgia, serif; font-size: 30px; line-height: 1.15; margin: 8px 0 8px; color: #fff; }
.ucd-sub { font-size: 14.5px; color: #cfe0ea; margin: 0; line-height: 1.55; max-width: 780px; }
.ucd h2 { font-size: 17px; margin: 30px 0 14px; color: var(--text); display: flex; align-items: center; gap: 9px; font-weight: 700; }
.ucd h2::before { content: ""; width: 13px; height: 13px; background: var(--gold); border-radius: 3px; flex: 0 0 auto; }
.ucd-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 34px; align-items: start; }
.ucd-grid .ucd-main > h2:first-child { margin-top: 6px; }
.ucd-grid .ucd-side > h2:first-child { margin-top: 2px; }
@media (max-width: 820px) { .ucd-grid { grid-template-columns: 1fr; gap: 4px; } .ucd-side { position: static; } }
/* Prozess als Flussdiagramm: Schritt-Karten + Pfeile, voller Text (kein Abschneiden). */
.ucd-flow { display: flex; flex-direction: column; }
.ucd-step { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 11px; padding: 13px 16px; }
.ucd-step.first { border-left-color: #2e7d52; }
.ucd-step.last { border-left-color: #34507e; }
.ucd-step-n { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; margin-top: 1px; }
.ucd-step.first .ucd-step-n { background: #2e7d52; }
.ucd-step.last .ucd-step-n { background: #34507e; }
.ucd-step-txt { line-height: 1.5; font-size: 14px; color: var(--text); }
.ucd-arrow { text-align: center; color: var(--muted); font-size: 16px; line-height: 1; padding: 6px 0; }
/* Sidebar: Akteure + Liefergegenstände (mit Luft nach oben) */
.ucd-side { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px 24px; position: sticky; top: 16px; }
.ucd-actors { display: flex; flex-wrap: wrap; gap: 7px; }
.ucd-reqs { margin: 0; padding-left: 18px; line-height: 1.75; color: var(--text); }
/* LOIN-Tabelle: theme-aware + Darstellungs-Bild je Bauteil/Detailstufe */
.ucd-loin { width: 100%; border-collapse: collapse; font-size: 13px; }
.ucd-loin th { background: var(--surface-2); color: var(--muted); text-align: left; padding: 9px 11px; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.ucd-loin td { padding: 9px 11px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: top; }
.ucd-loin tbody tr:nth-child(even) td { background: var(--surface); }
.ucd-loin td:nth-child(2) { white-space: nowrap; text-align: center; width: 1%; }
.ucd-loin td:first-child { font-weight: 600; white-space: nowrap; }
.ucd-img-cell { width: 110px; }
.ucd-img-cell img { max-width: 96px; max-height: 66px; border: 1px solid var(--border); border-radius: 6px; background: #fff; display: block; }
.ucd-img-cell.noimg::after { content: "—"; color: var(--muted); }
.ucd-log { display: inline-block; background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 2px 11px; font-size: 12px; color: var(--text); }
.cas-add { display: inline-flex; align-items: center; gap: 5px; margin-top: auto; font-weight: 700; color: var(--gold); }
.cas-add .plus { font-size: 17px; line-height: 1; }
.cas-tile .doc-del { position: absolute; top: 8px; right: 8px; background: none; border: 0; cursor: pointer; opacity: .55; font-size: 13px; }
.cas-tile .doc-del:hover { opacity: 1; }
.cas-bidder { font-size: 12px; font-weight: 600; }
.cas-projects { display: flex; flex-direction: column; gap: 18px; }
.cas-proj { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: var(--surface); }
.cas-proj-h { font-weight: 800; font-size: 16px; margin-bottom: 10px; }
.cas-zone { margin-top: 12px; }
.cas-zone .zone-h { margin: 0 0 8px; }
.cas-bap { margin-bottom: 12px; padding-left: 10px; border-left: 2px solid var(--border); }
.cas-bap-ph { border-left-style: dashed; }
.cas-bap-top { align-items: center; }
.cas-sub { margin-top: 8px; padding-left: 20px; }
.cas-sub .cas-tile { min-height: 102px; flex-basis: 190px; }
.cas-offer-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
/* „Fließt ein"-Block (vererbte Anforderungen aus der Kaskade) im Fragebogen */
.inh-box { border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: 10px; background: var(--surface-2); padding: 12px 16px; margin: 14px 0; }
.inh-h { font-weight: 700; cursor: pointer; color: var(--text); }
.inh-sub { font-size: 12.5px; color: var(--muted); margin: 6px 0 4px; }
.inh-grp { margin-top: 10px; }
.inh-grp-h { font-size: 12.5px; font-weight: 700; }
.inh-list { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.inh-list li { margin: 1px 0; }
/* Standard-Katalog in den Managern (Bauteile / Anwendungsfälle) */
.cat-h { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin: 22px 0 2px; border-top: 1px solid var(--border); padding-top: 14px; }
.cat-row { opacity: .92; }
.cat-row .cat-use { color: var(--gold); font-weight: 600; }
.cat-item { margin-bottom: 6px; }
/* Katalog-Umschalter (Vorlagen: ÖIAV · Anhang B · …) im Anwendungsfall-Manager */
.uc-cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.uc-cat-tab { border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 20px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.uc-cat-tab:hover { color: var(--text); }
.uc-cat-tab.active { background: var(--gold); border-color: var(--gold); color: #1a1200; }
/* Detailansicht: Cashflow / Wirtschaftlichkeit / Formel / Quelle (Anhang-B-Superset) */
.ucd-cf { width: 100%; border-collapse: collapse; font-size: 13px; }
.ucd-cf th { background: var(--surface-2); color: var(--muted); text-align: left; padding: 9px 11px; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.ucd-cf td { padding: 9px 11px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: top; }
.cf-dir { display: inline-block; border-radius: 20px; padding: 2px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.cf-out { background: rgba(200, 60, 60, .12); color: #b23b3b; }
.cf-in { background: rgba(40, 150, 80, .14); color: #1e874b; }
.ucd-econ { margin: 6px 0; padding-left: 18px; }
.ucd-econ li { margin: 3px 0; }
.ucd-monet { color: var(--text); }
.ucd-formula { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; overflow-x: auto; }
.ucd-formula code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14px; color: var(--text); white-space: pre-wrap; }
.ucd-vars { list-style: none; margin: 10px 0 0; padding: 0; font-size: 12.5px; color: var(--muted); }
.ucd-vars li { margin: 3px 0; }
.ucd-vars code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; color: var(--text); }
.var-unit { color: var(--gold); font-weight: 600; }
.ucd-source { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 12px; }
.ucd-cite { font-size: 13px; color: var(--muted); }
.ucd-quote { border-left: 3px solid var(--gold); margin: 8px 0 0; padding: 4px 0 4px 14px; color: var(--text); font-style: italic; }
.cat-imgs { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px 2px 10px; }
.cat-img { margin: 0; width: 120px; text-align: center; }
.cat-img img { width: 120px; height: 84px; object-fit: contain; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; cursor: zoom-in; }
.cat-img figcaption { font-size: 11px; color: var(--muted); margin-top: 3px; }
/* Drei Detailstufen-Uploads im Bauteil-Editor */
.el-imgs { display: flex; gap: 12px; flex-wrap: wrap; }
.el-imgfig { margin: 0; width: 150px; }
.el-imgthumb { width: 150px; height: 96px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.el-imgthumb img { width: 100%; height: 100%; object-fit: contain; }
.el-imgph { color: var(--muted); font-size: 22px; }
.el-imgfig figcaption { font-size: 12px; font-weight: 600; margin: 4px 0 2px; }
.el-imgfig input[type=file] { font-size: 11px; max-width: 120px; }
.el-imgfig .el-imgthumb img { cursor: zoom-in; }
.el-imgdesc { width: 100%; margin-top: 6px; font: inherit; font-size: 12px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; resize: vertical; }
.cat-desc-txt { font-size: 11px; color: var(--muted); margin: 3px 0 0; line-height: 1.35; max-width: 150px; }
.lightbox { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 90vw; max-height: 90vh; }
.lightbox img { max-width: 90vw; max-height: 78vh; object-fit: contain; }
.lightbox-cap { color: #fff; font-size: 13px; max-width: 680px; text-align: center; line-height: 1.4; }
.cas-invite, .cas-newproj { margin-top: 6px; }
.cas-empty { margin-top: 8px; }

/* Wizard */
.wizard { display: grid; grid-template-columns: 1.1fr .9fr; gap: 26px; align-items: start; }
@media (max-width: 880px) { .wizard { grid-template-columns: 1fr; } }
.wz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.wz-head h1 { margin: 0; font-size: 24px; }
.wz-actions { display: flex; gap: 8px; align-items: center; }
.save-state { font-size: 13px; color: var(--muted); }
.sec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.sec > h2 { margin: 0 0 4px; font-size: 19px; }
.sec .sec-help { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.fld { margin-bottom: 16px; }
.fld > label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.fld .help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.fld.info { background: var(--surface-2); border-radius: 8px; padding: 12px 14px; font-size: 13px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--text); }
.checks input { width: auto; }
.lang-hint { font-size: 12px; color: var(--gold); margin-bottom: 14px; }

/* Frage-Rationale (Warum & Auswirkung) + gruppierte Auswahl */
.q-why { border-left: 3px solid var(--gold); background: var(--surface-2); padding: 8px 12px; border-radius: 0 7px 7px 0; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.q-why-h { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--gold); margin-bottom: 2px; }
/* Dark-Mode: hellere Akzente für Lesbarkeit */
[data-theme="dark"] .q-why { background: #1a2538; color: #c3ccd8; border-left-color: var(--gold-soft); }
[data-theme="dark"] .q-why-h { color: var(--gold-soft); }
[data-theme="dark"] .help { color: #9fb0c2; }
.ms-group { margin-bottom: 12px; }
.ms-group-h { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 6px; padding-bottom: 3px; border-bottom: 1px solid var(--border); }
.doc-host { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow); overflow-x: auto; }
[data-theme="dark"] .doc-host { background: #f7f5f1; }

/* Live-Anzeige der resultierenden Anforderungen beim Anwählen eines Ziels.
   Festes Navy in BEIDEN Modi (var(--blue) kippt im Dark-Mode auf Hellgrau!). */
.derived { margin-top: 14px; background: #0e1726; color: #e8edf4; border-radius: 10px; padding: 14px 16px; }
.derived-empty { color: #93a3b8; font-size: 13px; font-style: italic; }
.derived-h { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; color: var(--gold-soft); margin-bottom: 10px; }
.derived-item { border-top: 1px solid rgba(255,255,255,.08); padding: 9px 0; }
.derived-item:first-of-type { border-top: 0; padding-top: 0; }
.derived-obj { font-weight: 700; font-size: 13.5px; color: #fff; }
.derived-metric { font-size: 12px; color: #aeb9c6; margin: 2px 0 4px; }
.derived-inv { color: var(--gold-soft); font-weight: 600; }
.derived ul { margin: 0; padding-left: 18px; }
.derived li { font-size: 12.5px; margin: 2px 0; color: #d7dee6; }

/* Tables */
.tbl-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th { text-align: left; padding: 6px 8px; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--border); white-space: nowrap; }
table.grid td { padding: 4px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.grid td input, table.grid td textarea, table.grid td select { padding: 6px 8px; font-size: 13px; }
table.grid td textarea { min-height: 38px; }
.row-del { background: none; border: none; color: var(--muted); font-size: 16px; line-height: 1; padding: 4px; }
.row-del:hover { color: var(--danger); }
.add-row { margin-top: 10px; }

/* LOG-Referenzbilder je Bauteil */
.loglevel-row td { background: var(--surface-2); padding: 8px 6px; }
.loglevels { display: flex; gap: 10px; flex-wrap: wrap; }
.loglevel { border: 2px solid var(--border); border-radius: 8px; padding: 5px; cursor: pointer; background: var(--surface); text-align: center; width: 132px; transition: border-color .1s; }
.loglevel:hover { border-color: var(--gold-soft); }
.loglevel.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.loglevel img { width: 120px; height: 90px; object-fit: contain; display: block; background: #fff; border-radius: 4px; }
.loglevel span { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: capitalize; }
.loglevel.on span { color: var(--gold); font-weight: 600; }
.lightbox { background: #fff; border-radius: 10px; padding: 10px; max-width: 92vw; max-height: 92vh; }
.lightbox img { max-width: 88vw; max-height: 86vh; object-fit: contain; display: block; }

/* Geführter Fragebogen-Flow */
.fl-progress { font-size: 13px; color: var(--muted); margin: 4px 0 8px; font-weight: 600; }
.fl-bar { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; margin-bottom: 20px; }
.fl-bar-fill { height: 100%; background: var(--gold); transition: width .25s; }
.fl-card { max-width: 720px; }
.fl-card h2 { font-size: 20px; margin: 0 0 18px; }
.fl-nav { display: flex; justify-content: space-between; align-items: center; max-width: 720px; margin-top: 18px; }
.fld .opt { color: var(--muted); font-weight: 400; font-size: 12px; }
.checks .chip { border: 1px solid var(--border); border-radius: 999px; padding: 7px 13px; cursor: pointer; transition: border-color .1s, background .1s; }
.checks .chip:hover { border-color: var(--gold-soft); }
.doc-preview { position: static; max-height: none; max-width: 820px; }
.doc-preview h3 { font-size: 16px; color: var(--gold); border: 0; margin: 20px 0 6px; }
.doc-preview h4 { font-size: 14px; margin: 14px 0 4px; }
.doc-preview .pv-para { font-size: 13.5px; line-height: 1.65; margin: 6px 0; }
.doc-preview ul { margin: 6px 0; padding-left: 20px; font-size: 13.5px; }
.doc-preview .pv-fig { margin: 10px 0; }
.doc-preview .pv-fig img { max-width: 260px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.doc-preview .pv-fig figcaption { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* Preview */
.preview { position: sticky; top: 78px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); max-height: calc(100vh - 110px); overflow: auto; }
.preview h2.pv-title { font-size: 20px; margin: 0 0 2px; }
.preview .pv-sub { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.preview h3 { font-size: 15px; margin: 18px 0 6px; border-bottom: 1px solid var(--border); padding-bottom: 3px; }
.preview .pv-field { margin: 7px 0; font-size: 13px; }
.preview .pv-label { color: var(--muted); }
.preview .pv-val { white-space: pre-wrap; }
.preview table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 6px 0; }
.preview table th, .preview table td { border: 1px solid var(--border); padding: 4px 6px; text-align: left; }
.preview .pv-empty { color: var(--muted); font-style: italic; }

/* Modal + toast */
.modal-bg { position: fixed; inset: 0; background: rgba(14,23,38,.55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal { background: var(--surface); border-radius: var(--radius); padding: 28px; max-width: 460px; width: 100%; box-shadow: var(--shadow); max-height: calc(100vh - 40px); overflow-y: auto; }
.modal h2 { margin: 0 0 8px; font-size: 22px; }
.modal p { color: var(--muted); margin: 0 0 18px; }
.plan-opts { display: grid; gap: 12px; }
.plan-opt { border: 1px solid var(--border); border-radius: 10px; padding: 16px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.plan-opt:hover { border-color: var(--gold); }
.plan-opt .price { font-family: "Playfair Display", serif; font-size: 20px; }
.plan-opt small { color: var(--muted); }
.modal-close { float: right; background: none; border: none; font-size: 20px; color: var(--muted); }
#toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--blue); color: #fff; padding: 11px 18px; border-radius: 9px; font-size: 14px; box-shadow: var(--shadow); }
[data-theme="dark"] .toast { background: var(--gold); color: #0e1726; }
.toast.err { background: var(--danger); color: #fff; }

/* Feedback-Modal: Sterne-Bewertung + Freitext */
.fb-stars { display: flex; gap: 4px; margin: 0 0 14px; }
.fb-star { background: none; border: none; font-size: 30px; line-height: 1; color: var(--border); cursor: pointer; padding: 2px; transition: color .12s; }
.fb-star:hover, .fb-star.on { color: var(--gold); }
.fb-msg { width: 100%; margin-bottom: 14px; }
.modal .fb-send { width: 100%; }

/* Markteinführungs-Countdown (Gratis bis FREE_UNTIL) */
.countdown { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 22px; padding: 11px 20px; background: linear-gradient(90deg, #b8862f, #d9b877); color: #1a1205; text-align: center; }
.countdown .cd-text { font-size: 15px; }
.countdown .cd-after { font-weight: 600; }
.countdown .cd-clock { font-size: 14px; font-variant-numeric: tabular-nums; }
.countdown .cd-clock b { font-size: 19px; font-weight: 800; margin-left: 3px; }
.countdown .cd-cta { background: #1a1205; color: #f5e6c8; border: none; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; }
.countdown .cd-cta:hover { background: #2a1d08; }

/* Zahlungsbereitschafts-Modal (WTP) */
.wtp-q { font-size: 13px; color: var(--muted); margin: 6px 0 8px; font-weight: 600; }
.wtp-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.wtp-opt { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); padding: 9px 16px; border-radius: 9px; font-weight: 600; font-size: 15px; cursor: pointer; }
.wtp-opt:hover { border-color: var(--gold); }
.wtp-opt.on { background: var(--gold); color: #fff; border-color: var(--gold); }
.wtp-customwrap { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.wtp-amount { width: 130px; }
.wtp-msg { width: 100%; margin-bottom: 14px; }
.wtp-actions { display: flex; gap: 10px; }

/* Unterstützen: Segmented-Toggle Einmalig/Jährlich */
.sup-seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; margin-bottom: 14px; }
.sup-kind { background: transparent; border: none; color: var(--muted); padding: 7px 18px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; }
.sup-kind:hover { color: var(--text); }
.sup-kind.on { background: var(--gold); color: #fff; }
.support-btn { color: var(--gold) !important; font-weight: 600; }
.support-badge { border: none; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; }

/* ── Kollaboration: Review-Ansicht + Diskussion + Teilen ─────────────────────── */
.review-area { display: flex; gap: 20px; align-items: flex-start; }
.review-area .doc-host { flex: 1 1 auto; min-width: 0; }
.cmt-panel { flex: 0 0 320px; width: 320px; position: sticky; top: 12px; max-height: calc(100vh - 90px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.cmt-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cmt-count { color: var(--muted); font-size: 13px; }
.cmt-compose { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.cmt-compose select, .cmt-compose textarea { width: 100%; }
.cmt-list { display: flex; flex-direction: column; gap: 10px; }
.cmt { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: var(--bg); }
.cmt.done { opacity: .6; }
.cmt-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.cmt-status { background: var(--gold); color: #fff; border-radius: 6px; padding: 0 6px; margin-left: 4px; font-size: 10.5px; }
.cmt-text { font-size: 13.5px; white-space: pre-wrap; }
.cmt-actions { display: flex; gap: 10px; margin-top: 6px; }
.cmt-empty, .cmt-empty { color: var(--muted); font-size: 13px; }
.cmt-badge { display: inline-block; margin-left: 8px; font-size: 11px; background: var(--gold); color: #fff; border-radius: 8px; padding: 0 6px; vertical-align: middle; }
.link-btn { background: none; border: none; color: var(--blue); cursor: pointer; font-size: 12px; padding: 0; }
.link-btn.danger { color: #b23b3b; }
[data-anchor]:hover { outline: 2px dashed var(--gold); outline-offset: 3px; }

.share-modal { max-width: 520px; }
.share-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.sh-tab { flex: 1; padding: 7px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; cursor: pointer; color: var(--ink); }
.sh-tab.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.sh-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; font-size: 13px; }
.sh-result { margin-top: 10px; }
.sh-link { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.sh-link code { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; word-break: break-all; font-size: 11.5px; }
.share-list { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.share-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.shared-sec { margin-top: 34px; }
.shared-sec h2 { font-size: 16px; margin-bottom: 12px; }
.shared-docs { display: flex; flex-wrap: wrap; gap: 12px; }
.doc-card.shared { border-left: 3px solid var(--blue); }

@media (max-width: 860px) { .review-area { flex-direction: column; } .cmt-panel { width: 100%; flex-basis: auto; position: static; max-height: none; } }

/* ── Governance-Leiste (CDE-Status + Freigabe) ──────────────────────────────── */
.gov-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.gov-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gov-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gov-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 3px 9px; border-radius: 20px; color: #fff; }
.gov-wip { background: #8a8f98; } .gov-shared { background: var(--blue, #1d6e9e); } .gov-published { background: #2e8b6f; } .gov-archived { background: #5d6a72; }
.gov-prog { font-size: 12px; color: var(--muted); }
.gov-stale { font-size: 12px; color: #b23b3b; font-weight: 600; }
.gov-decide { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gov-comment { min-width: 160px; }
.gov-hist { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.gov-hrow { font-size: 12.5px; display: flex; gap: 8px; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 4px 0; }
.gov-haction { font-weight: 600; } .gov-hactor { color: var(--muted); flex: 1; } .gov-hat { color: var(--muted); }

/* ── Review-Spalte (Diskussion + Abstimmungen gestapelt) ─────────────────────── */
.review-side { flex: 0 0 340px; width: 340px; display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 12px; max-height: calc(100vh - 90px); overflow-y: auto; }
.review-side .cmt-panel, .review-side .poll-panel { width: 100%; flex: initial; position: static; max-height: none; }
.poll-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.poll-new { margin-bottom: 10px; }
.poll-list { display: flex; flex-direction: column; gap: 12px; }
.poll { border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; background: var(--bg); }
.poll-q { font-weight: 600; font-size: 13.5px; margin-bottom: 8px; }
.poll-opts { display: flex; flex-direction: column; gap: 5px; }
.poll-opt { position: relative; border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; overflow: hidden; display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.poll-opt.clickable { cursor: pointer; }
.poll-opt.clickable:hover { border-color: var(--gold); }
.poll-opt.mine { border-color: var(--gold); }
.poll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--gold) 22%, transparent); z-index: 0; }
.poll-lbl, .poll-pct { position: relative; z-index: 1; }
.poll-pct { color: var(--muted); white-space: nowrap; }
.poll-foot { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.checkbox { display: flex; align-items: center; gap: 7px; font-size: 13px; margin: 8px 0; }

@media (max-width: 860px) { .review-side { width: 100%; flex-basis: auto; position: static; max-height: none; } }

/* ── Use-Case-Manager ───────────────────────────────────────────────────────── */
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.uc-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.uc-card { cursor: pointer; border-left: 3px solid var(--gold); }
.uc-actions { display: flex; gap: 10px; margin-top: 6px; }
.btn.danger { color: #b23b3b; }

/* ── Kuratierung ────────────────────────────────────────────────────────────── */
.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cur-card .uc-actions { margin-top: 10px; }

/* ── Use-Case-Editor (Formular + Live-Vorschau) ─────────────────────────────── */
.uc-editor { display: flex; gap: 24px; align-items: flex-start; }
.uce-foot { display: flex; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.uce-form { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.uce-preview { flex: 0 0 430px; width: 430px; position: sticky; top: 12px; max-height: calc(100vh - 90px); overflow-y: auto; }
.uce-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.uce-sec h2 { font-size: 15px; margin: 0 0 12px; }
.uce-sec .field { margin-bottom: 10px; }
.uce-list { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.uce-list-rows { display: flex; flex-direction: column; gap: 6px; }
.uce-row { display: flex; gap: 6px; align-items: center; }
.uce-row > input, .uce-row > select, .uce-row > textarea { flex: 1 1 0; min-width: 0; }
.uce-attr, .uce-loin { flex-wrap: wrap; }
.row-del { flex: 0 0 auto; background: none; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; color: #b23b3b; width: 30px; height: 30px; }
@media (max-width: 900px) { .uc-editor { flex-direction: column; } .uce-preview { width: 100%; flex-basis: auto; position: static; max-height: none; } }

/* ── Dokument löschen (Mülleimer auf der Karte) ─────────────────────────────── */
.doc-card { position: relative; }
.doc-del { position: absolute; top: 6px; right: 6px; background: none; border: none; cursor: pointer;
  font-size: 14px; line-height: 1; opacity: .35; padding: 3px; border-radius: 6px; }
.doc-del:hover { opacity: 1; background: rgba(178, 59, 59, .14); }

/* ── Broadcast-Vorschau ─────────────────────────────────────────────────────── */
.bc-modal { max-width: 660px; }
.bc-preview { border: 1px solid var(--line); border-radius: 10px; padding: 14px; max-height: 46vh; overflow-y: auto; background: #fff; margin-top: 8px; }

/* ── LOIN-Referenzbild im Use-Case-Editor ───────────────────────────────────── */
.uce-thumb { flex: 0 0 auto; width: 46px; height: 46px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: zoom-in; }

/* ── Informationskaskaden-Header (Eingänge/Ausgänge) ────────────────────────── */
.casc-bar { display: flex; gap: 14px; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; flex-wrap: wrap; }
.casc-col { flex: 1 1 240px; min-width: 0; }
.casc-right { text-align: right; }
.casc-h { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.casc-mid { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.casc-self { background: var(--blue, #1d6e9e); color: #fff; border-radius: 20px; padding: 4px 12px; font-weight: 700; font-size: 12px; }
.casc-in-items, .casc-out-items { display: flex; flex-direction: column; gap: 5px; }
.casc-right .casc-in-items, .casc-right .casc-out-items { align-items: flex-end; }
.casc-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; font-size: 12.5px; }
.casc-chip.off { opacity: .5; }
.casc-chip.ro { background: transparent; border-style: dashed; }
.casc-x { background: none; border: none; cursor: pointer; color: #b23b3b; font-size: 12px; }
.casc-add { margin-top: 4px; font-size: 12.5px; max-width: 100%; }
.casc-empty { color: var(--muted); font-size: 12px; }
@media (max-width: 760px) { .casc-bar { flex-direction: column; } .casc-right { text-align: left; } .casc-right .casc-in-items, .casc-right .casc-out-items { align-items: flex-start; } }

/* ── TIDP-Editor + Gantt ─────────────────────────────────────────────────────── */
.te-wrap { display: flex; flex-direction: column; gap: 18px; }
.te-gantt { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); overflow-x: auto; margin-bottom: 12px; }
.te-gantt-host { min-width: 480px; }
.te-del { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 6px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.te-del .te-dname { flex: 1 1 180px; }
.te-del input, .te-del select { flex: 1 1 92px; min-width: 78px; }
.te-del .row-del { flex: 0 0 auto; }

.gantt { position: relative; font-size: 11px; }
.g-axis { position: relative; }
.g-tick { position: absolute; top: 0; color: var(--muted); border-left: 1px solid var(--line); padding-left: 3px; height: 100%; }
.g-wrap { position: relative; }
.g-team { font-weight: 700; font-size: 11px; color: var(--blue, #1d6e9e); margin: 8px 0 2px; }
.g-row { position: relative; height: 22px; margin: 2px 0; }
.g-label { position: absolute; left: 0; width: 144px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 22px; color: var(--ink); }
.g-bar { position: absolute; height: 14px; top: 4px; border-radius: 4px; background: var(--blue, #1d6e9e); }
.g-bar.st-delivered { background: #2e8b6f; } .g-bar.st-accepted { background: #1f6f56; }
.g-bar.st-in_progress { background: #b8862f; } .g-bar.st-planned { background: #8a8f98; }
.g-bar.g-conflict { outline: 2px solid #b23b3b; }
.g-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; }
.g-ms { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--gold); }
.g-ms .g-diamond { position: absolute; top: 2px; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg) translateX(-5px); }
.g-ms-lbl { position: absolute; top: -2px; left: 6px; font-size: 10px; color: var(--gold-d, #936a22); white-space: nowrap; }
.g-today { position: absolute; top: 0; bottom: 0; border-left: 2px dashed #b23b3b; }

/* ── Parteien (ISO-Rollen): Chips + Projektteam ─────────────────────────────── */
.party-chip { display: inline-block; font-size: 9.5px; font-weight: 700; padding: 1px 6px; border-radius: 10px; color: #fff; vertical-align: middle; margin-left: 4px; }
.pk-appointing { background: #1d6e9e; } .pk-lead { background: #b8862f; } .pk-task { background: #2e8b6f; }
.proj-card { cursor: pointer; border-left: 3px solid var(--blue, #1d6e9e); }
.pt-parties { display: flex; flex-direction: column; gap: 8px; }
.pt-party { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; font-size: 13px; }
.pf-contacts { display: flex; flex-direction: column; gap: 5px; margin: 6px 0; }

/* ── Kaskaden-Header: Projekt-Zuordnung + Übergabe ──────────────────────────── */
.casc-bar { flex-direction: column; }
.casc-cols { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; width: 100%; }
.casc-project { display: flex; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 8px; flex-wrap: wrap; }
.ho-list { display: flex; flex-direction: column; gap: 10px; }
.ho-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; }
.ho-result code { display: block; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; word-break: break-all; font-size: 11px; margin-top: 4px; }

.proj-title { font-size: 16px; margin: 8px 0 12px; }
.doc-card.pkb-appointing { border-left: 3px solid #1d6e9e; } .doc-card.pkb-lead { border-left: 3px solid #b8862f; } .doc-card.pkb-task { border-left: 3px solid #2e8b6f; }

/* ── Komposition (Tochterdokumente) + AG/Bieter-Zonen + Vergabe ──────────────── */
.zone-h { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 12px 0 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.zone-h.zone-req { color: #1d6e9e; } .zone-h.zone-off { color: #b8862f; }
.award { font-weight: 700; border-radius: 8px; padding: 0 6px; }
.aw-offer { background: #8a8f98; color: #fff; } .aw-awarded { background: #2e8b6f; color: #fff; } .aw-rejected { background: #b23b3b; color: #fff; }
.ib-result { margin-top: 10px; }

/* ── IFC-vs-LOIN-Check ──────────────────────────────────────────────────────── */
.ifc-modal { max-width: 680px; }
.ifc-pick { display: inline-block; cursor: pointer; margin: 4px 0 10px; }
.ifc-busy { color: var(--muted); font-size: 13px; padding: 8px 0; }
.ifc-err { color: #b23b3b; font-size: 13px; padding: 8px 0; }
.ifc-summary { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; margin: 6px 0 14px; }
.ifc-summary.good { background: rgba(46,139,111,.12); } .ifc-summary.warn { background: rgba(184,134,47,.12); } .ifc-summary.bad { background: rgba(178,59,59,.12); }
.ifc-pct { font-size: 30px; font-weight: 800; }
.ifc-summary.good .ifc-pct { color: #2e8b6f; } .ifc-summary.warn .ifc-pct { color: #b8862f; } .ifc-summary.bad .ifc-pct { color: #b23b3b; }
.ifc-cov { font-weight: 700; font-size: 13px; } .ifc-sub { color: var(--muted); font-size: 12px; }
.ifc-spec { padding: 8px 0; border-top: 1px solid var(--line); }
.ifc-spec.absent { opacity: .55; }
.ifc-spec-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 13px; }
.ifc-spec-n { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.ifc-facets { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ifc-facet { font-size: 11px; padding: 1px 7px; border-radius: 8px; border: 1px solid var(--line); }
.ifc-facet.ok { background: rgba(46,139,111,.14); border-color: transparent; }
.ifc-facet.part { background: rgba(184,134,47,.16); border-color: transparent; }
.ifc-facet.miss { background: rgba(178,59,59,.13); border-color: transparent; }


/* Doktyp-Abkürzungs-Chip (voller Name steht daneben) + Quickguide-Overlay */
.dt-abbr { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; vertical-align: middle; white-space: nowrap; }
.guide-modal { max-width: 620px; }
.guide-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 6px; max-height: 56vh; overflow-y: auto; }
.guide-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.guide-abbr { flex: 0 0 auto; min-width: 64px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .03em; color: var(--gold); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.guide-txt b { font-size: 14px; }
.guide-txt p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.guide-foot { font-size: 12px; color: var(--muted); margin-top: 8px; }
/* ISO-19650:2026-Revisionshinweis: dezent, abgegrenzt — kein Alarm, nur Transparenz. */
.guide-rev { font-size: 12.5px; line-height: 1.5; color: var(--muted); margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--gold); background: var(--surface-2); border-radius: 0 8px 8px 0; }
/* Release-Notes (Was ist neu) */
.rel-modal { max-width: 580px; }
.rel-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--gold); border-radius: 999px; padding: 3px 11px; margin-bottom: 8px; }
.rel-date { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.rel-list { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 9px; max-height: 56vh; overflow-y: auto; }
.rel-list li { position: relative; padding: 10px 12px 10px 34px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; line-height: 1.5; }
.rel-list li::before { content: "✓"; position: absolute; left: 12px; top: 10px; color: var(--gold); font-weight: 700; }

/* BAP — operative Antwortmatrix je AIA-Forderung */
.opmatrix { display: flex; flex-direction: column; gap: 12px; }
.opmatrix-row { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.opmatrix-req { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.opmatrix-nr { display: inline-block; min-width: 26px; font-size: 11px; font-weight: 700; color: var(--gold); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; text-align: center; }
.opmatrix-del { font-size: 11.5px; font-weight: 400; color: var(--muted); margin-top: 3px; }
.opmatrix-ta { width: 100%; min-height: 46px; resize: vertical; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.opmatrix-ta:focus { outline: none; border-color: var(--gold); }

/* Feature-Tour (Spotlight) + Hilfe-Menü */
.tour-overlay { position: fixed; inset: 0; z-index: 9998; }
.tour-hole { position: fixed; z-index: 9999; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(8,14,24,.62); outline: 2px solid var(--gold); outline-offset: 2px; pointer-events: none; transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; }
.tour-tip { position: fixed; z-index: 10000; width: min(340px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px -12px rgba(8,14,24,.5); padding: 16px 16px 12px; transition: left .2s ease, top .2s ease; }
.tour-tip h3 { font-size: 15px; margin: 4px 0 6px; }
.tour-tip p { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0 0 12px; }
.tour-step { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--gold); text-transform: uppercase; }
.tour-nav { display: flex; align-items: center; gap: 8px; }
.tour-spacer { flex: 1; }
.tour-skip { background: none; border: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 4px; }
.tour-skip:hover { color: var(--text); }
/* „✨ Tour"-Button im Maskenkopf (h2) — Inter statt Serif, dezent neben dem Titel */
.mask-tour { font-family: Inter, system-ui, sans-serif; font-size: 12px; font-weight: 600; vertical-align: middle; margin-left: 10px; }
.popmenu { position: fixed; z-index: 10001; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 40px -12px rgba(8,14,24,.5); padding: 6px; min-width: 210px; display: flex; flex-direction: column; gap: 2px; }
.popmenu-item { text-align: left; background: none; border: none; border-radius: 7px; padding: 9px 11px; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; }
.popmenu-item:hover { background: var(--surface-2); }
.popmenu-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 4px 11px 6px; }

/* White-Label-Branding-Dialog + Live-Vorschau */
.brand-modal, .sec-modal { max-width: 720px; }
.brand-grid { display: grid; grid-template-columns: 1fr 260px; gap: 20px; margin: 14px 0; }
@media (max-width: 640px) { .brand-grid { grid-template-columns: 1fr; } }
.brand-fields { display: flex; flex-direction: column; gap: 12px; }
.bf { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text); }
.bf input[type=text], .bf input:not([type]), .bf input[type=file] { font: inherit; font-size: 13px; font-weight: 400; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
.bf .brow { display: flex; align-items: center; gap: 8px; }
.bf .brow input[type=color] { width: 40px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; flex: 0 0 auto; }
.bf .brow input[type=text] { flex: 1; }
.bf.bf-check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.brand-preview .bp-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.bp-hero { color: #fff; border-radius: 10px; padding: 14px 16px; }
.bp-hero .bp-logo { display: block; max-height: 28px; max-width: 130px; background: #fff; padding: 3px 5px; border-radius: 4px; margin-bottom: 8px; }
.bp-kick { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }
.bp-title { font-size: 14px; font-weight: 700; margin: 3px 0; line-height: 1.2; }
.bp-meta { font-size: 10px; opacity: .85; }
.bp-body { padding: 12px 4px 0; }
.bp-h2 { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.bp-mark { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.bp-li { font-size: 12px; color: var(--muted); margin-top: 7px; }
.bp-li i { font-style: normal; }
/* Eigene Abschnitte */
.sec-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; max-height: 50vh; overflow-y: auto; }
.sec-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.sec-row .sec-h { grid-column: 1; font: inherit; font-weight: 600; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--text); }
.sec-row .sec-t { grid-column: 1; font: inherit; font-size: 13px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--text); resize: vertical; }
.sec-row .sec-del { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

/* Eigene Bauteile */
.el-modal { max-width: 640px; }
.el-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.el-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.el-info b { font-size: 14px; }
.el-info .muted { font-size: 12px; }
.el-acts { display: flex; gap: 10px; flex: 0 0 auto; }
.el-form { display: flex; flex-direction: column; gap: 11px; margin: 4px 0 14px; }
.el-form .bf input:not([type=file]) { font: inherit; font-size: 13px; font-weight: 400; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
.el-params { display: flex; flex-direction: column; gap: 6px; margin: 4px 0; }
.el-prow { display: flex; gap: 8px; align-items: center; }
.el-prow input { flex: 1; font: inherit; font-size: 13px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--text); }
.el-prow.bsdd input { border-color: var(--accent, var(--brand, #b8862f)); }
.el-prow .el-pbsdd { flex: 0 0 auto; padding: 2px 6px; font-size: 14px; line-height: 1; }
.el-pmeta { display: flex; flex-wrap: wrap; gap: 4px; flex: 0 0 auto; }
.el-pchip { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--surface-2, #eef0f3); color: var(--muted); white-space: nowrap; }
.el-paddrow { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
/* Kompakter Property-Picker (bSDD + Bibliothek) im Bauteil-Editor */
.pp-pick-modal { max-width: 640px; }
.pp-pick-lib { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.pp-pick-h { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 2px 0; }

/* ── Dashboard-Aktivität: Gesamtchart + GitHub-artige Contribution-Heatmap ───── */
.act-sec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 24px; box-shadow: var(--shadow); }
.act-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.act-head h2 { margin: 0; font-size: 18px; }
.act-total { font-size: 12.5px; }
.act-card-h { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; margin-bottom: 8px; }
.act-empty { padding: 18px 4px; }

/* Gesamtaktivitäts-Chart (Tagesbalken, letzte 12 Wochen; SVG-Rects) */
.act-chart { display: block; width: 100%; height: 84px; }
.act-bar { fill: var(--gold); transition: opacity .12s; }
.act-bar:hover { opacity: .6; }
.act-bar.empty { fill: var(--surface-2); }

/* Heatmap (SVG) */
.act-heat-scroll { overflow-x: auto; padding-bottom: 2px; }
.act-heat { display: block; }
.act-heat .act-wd, .act-heat .act-mon { font-size: 9px; fill: var(--muted); font-family: inherit; }
.act-cell { stroke: rgba(0,0,0,.04); shape-rendering: geometricPrecision; }
.act-cell:hover { stroke: var(--gold); stroke-width: 1.2; }
.act-cell.lvl-0 { fill: var(--surface-2); }
.act-cell.lvl-1 { fill: #ecd9ab; }
.act-cell.lvl-2 { fill: #ddbb78; }
.act-cell.lvl-3 { fill: #c4992f; }
.act-cell.lvl-4 { fill: #946615; }
[data-theme="dark"] .act-cell { stroke: rgba(255,255,255,.05); }
[data-theme="dark"] .act-cell.lvl-0 { fill: #1c2c46; }
[data-theme="dark"] .act-cell.lvl-1 { fill: #5c4a22; }
[data-theme="dark"] .act-cell.lvl-2 { fill: #8a6a26; }
[data-theme="dark"] .act-cell.lvl-3 { fill: #b8862f; }
[data-theme="dark"] .act-cell.lvl-4 { fill: #e0b85e; }
.act-legend { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 8px; font-size: 11px; color: var(--muted); }
.act-legend-cells { flex: 0 0 auto; }

/* ── Informationskaskade als grafische Pipeline (GitHub-Actions-Optik) ───────── */
.casc-pipeline .casc-in-items, .casc-pipeline .casc-out-items { position: relative; padding: 4px 0; }
.casc-pipeline .casc-chip { position: relative; }
/* Status-Knoten links am Chip */
.casc-pipeline .casc-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 22%, transparent); flex: 0 0 auto; }
.casc-pipeline .casc-chip.off::before { background: var(--muted); box-shadow: none; }
.casc-pipeline .casc-chip.ro::before { background: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }
/* Vertikaler Bus + Elbow-Konnektoren zur Mitte (Eingänge → self, self → Ausgänge) */
.casc-pipeline .casc-in-items::after, .casc-pipeline .casc-right .casc-out-items::after {
  content: ""; position: absolute; top: 14px; bottom: 14px; width: 2px; background: var(--gold-soft); }
.casc-pipeline .casc-in-items::after { right: -8px; }
.casc-pipeline .casc-right .casc-out-items::after { left: -8px; }
.casc-pipeline .casc-in-items .casc-chip::after, .casc-pipeline .casc-right .casc-out-items .casc-chip::after {
  content: ""; position: absolute; top: 50%; width: 8px; height: 2px; background: var(--gold-soft); }
.casc-pipeline .casc-in-items .casc-chip::after { right: -8px; }
.casc-pipeline .casc-right .casc-out-items .casc-chip::after { left: -8px; }
/* Self-Knoten: hervorgehobener Pipeline-Node mit ein-/ausgehenden Stutzen */
.casc-pipeline .casc-mid { position: relative; }
.casc-pipeline .casc-self { box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 14%, transparent); position: relative; z-index: 1; }
.casc-pipeline .casc-mid::before, .casc-pipeline .casc-mid::after { content: ""; position: absolute; top: 50%; width: 8px; height: 2px; background: var(--gold-soft); transform: translateY(-50%); }
.casc-pipeline .casc-mid::before { left: -8px; }
.casc-pipeline .casc-mid::after { right: -8px; }
@media (max-width: 760px) {
  .casc-pipeline .casc-in-items::after, .casc-pipeline .casc-right .casc-out-items::after,
  .casc-pipeline .casc-in-items .casc-chip::after, .casc-pipeline .casc-right .casc-out-items .casc-chip::after,
  .casc-pipeline .casc-mid::before, .casc-pipeline .casc-mid::after { display: none; }
}

/* ── MCP / API-Zugang (tokens.js) ─────────────────────────────────────────── */
.btn-sm { font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 7px;
  border: 1px solid var(--line, #d5d5d5); background: var(--surface, #fff); color: inherit; cursor: pointer; }
.btn-sm:hover { border-color: var(--accent, #888); }
.btn-sm.danger { color: #b23c3c; border-color: #e3b7b7; }
.mcp-modal .mcp-connect { margin: 12px 0; }
.mcp-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mcp-row label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; opacity: .65; min-width: 68px; }
.mcp-row code, .mcp-token-raw, .mcp-url { flex: 1 1 240px; font-family: ui-monospace, Menlo, monospace; font-size: 13px;
  background: #f1f1f3; color: #1a1a1a; padding: 7px 10px; border-radius: 7px; word-break: break-all; }
:root[data-theme="dark"] .mcp-row code, :root[data-theme="dark"] .mcp-token-raw, :root[data-theme="dark"] .mcp-url { background: #0f1a2e; color: #e8edf4; }
.mcp-list { margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.mcp-token { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line, #e2e2e2); border-radius: 9px; }
.mcp-token.revoked { opacity: .5; }
.mcp-token-main { display: flex; flex-direction: column; gap: 2px; }
.mcp-token-main .muted { font-size: 12px; }
.mcp-new { display: flex; gap: 8px; margin: 12px 0; }
.mcp-new .mcp-name { flex: 1; font: inherit; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line, #d5d5d5); background: var(--surface, #fff); color: inherit; }
.mcp-reveal { margin: 10px 0; padding: 12px; border: 1px solid #cfe3cf; background: #f2f8f2; border-radius: 9px; }
:root[data-theme="dark"] .mcp-reveal { background: #1c2a1c; border-color: #2f472f; }
.mcp-once { font-size: 13px; margin: 0 0 8px; font-weight: 600; }
.mcp-help { margin-top: 8px; }
.mcp-help summary { cursor: pointer; font-size: 14px; }
.mcp-pre { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: #f1f1f3; color: #1a1a1a;
  padding: 10px 12px; border-radius: 8px; overflow-x: auto; white-space: pre; }
:root[data-theme="dark"] .mcp-pre { background: #0f1a2e; color: #e8edf4; }

/* ── E-Mail-Verifikations-Banner (nicht-brechend) ─────────────────────────── */
.verify-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin: 0 0 18px; padding: 10px 14px; border-radius: 10px;
  background: #fef6e6; border: 1px solid #f0dcae; color: #6b4e12; font-size: 14px; }
:root[data-theme="dark"] .verify-banner { background: #2a2413; border-color: #4a3d1c; color: #e9d7a6; }
.verify-actions { display: flex; align-items: center; gap: 6px; }
.verify-x { background: none; border: none; cursor: pointer; font-size: 15px; color: inherit; opacity: .6; padding: 2px 6px; }
.verify-x:hover { opacity: 1; }

/* ── TIDP-Editor: abgeleitete Container (read-only) + Zuordnungen ──────────── */
.te-containers { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.te-crow { display: grid; grid-template-columns: minmax(180px,2fr) 100px minmax(120px,1fr) minmax(120px,1fr) 110px; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line, #e2e2e2); border-radius: 8px; }
.te-crow.te-chead { border: none; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; opacity: .6; padding: 2px 8px; }
.te-cname { display: flex; flex-direction: column; gap: 2px; }
.te-params { font-size: 12px; opacity: .7; }
.te-clevel { font-size: 13px; opacity: .85; }
.te-crow select.te-sm, .te-crow input.te-sm { width: 100%; font: inherit; font-size: 13px; padding: 5px 7px; border-radius: 6px; border: 1px solid var(--line, #d5d5d5); background: var(--surface, #fff); color: inherit; }
@media (max-width: 760px) { .te-crow { grid-template-columns: 1fr 1fr; } .te-chead { display: none; } }
