/* Service-Werkstatt: Ergänzungen zu styles.css (gleiche Farbwerte, Design-Vorlagen über /design.css) */
.linkish { background: none; border: 0; padding: 0; color: var(--accent-2); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: .92rem; margin-right: 14px; }
.chk input { width: auto; margin: 0; }
.chk.opt { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--paper); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.kpi.rot { color: var(--red); }
.kpi.gelb { color: var(--gold); }
.filterbar input[type=text] { flex: 1; }
table.anfragen tr.klick { cursor: pointer; }
table.anfragen tr.klick:hover td { background: var(--bg-2); }
.frist.rot { color: var(--red); font-weight: 600; }
.frist.gelb { color: var(--gold); font-weight: 600; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.dots i.d-fertig { background: var(--teal); }
.dots i.d-begonnen { background: var(--gold); }
.dots i.d-laeuft { background: var(--accent); animation: puls 1.4s infinite; }
@keyframes puls { 50% { opacity: .35; } }
.badge.emp-go { background: var(--teal-soft); color: #1d6f65; }
.badge.emp-pruefen { background: var(--gold-soft); color: #8a6a14; }
.badge.emp-nogo { background: var(--red-soft); color: var(--red); }
.badge.stufe-standard { background: var(--bg-2); color: var(--ink-2); }
.badge.stufe-erweitert { background: var(--gold-soft); color: #8a6a14; }
.badge.stufe-kritisch { background: var(--red-soft); color: var(--red); }
.badge.run-laeuft { background: var(--accent-soft); color: var(--accent-2); }
.badge.run-fertig { background: var(--teal-soft); color: #1d6f65; }
.badge.run-fehler, .badge.run-abgebrochen { background: var(--red-soft); color: var(--red); }
.badge.gate-gueltig { background: var(--teal-soft); color: #1d6f65; }
.badge.gate-offen { background: var(--bg-2); color: var(--ink-2); }
.badge.gate-abgelehnt, .badge.gate-veraltet { background: var(--red-soft); color: var(--red); }
.badge.ms-erf { background: var(--teal-soft); color: #1d6f65; }
.badge.ms-teil { background: var(--gold-soft); color: #8a6a14; }
.badge.ms-luecke { background: var(--red-soft); color: var(--red); }
.badge.ms-unklar { background: var(--bg-2); color: var(--ink-2); }
.ampel-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); vertical-align: middle; }
.ampel-dot.gruen { background: var(--teal); } .ampel-dot.gelb { background: var(--gold); } .ampel-dot.rot { background: var(--red); }

.anfrage-head { margin-top: 18px; }
.head-facts { display: grid; grid-template-columns: repeat(4, auto); gap: 6px 22px; }
.head-facts > div { display: flex; flex-direction: column; }
.rail { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; margin: 20px 0 6px; }
.rail-step { display: flex; flex-direction: column; gap: 2px; padding: 8px 9px 9px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); text-decoration: none; min-height: 74px; position: relative; }
.rail-step:hover { border-color: var(--line-2); background: #fff; }
.rail-step.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.rail-step .rail-nr { font-size: .74rem; color: var(--ink-3); font-weight: 600; }
.rail-step .rail-t { font-size: .82rem; line-height: 1.2; }
.rail-step.st-fertig { background: var(--teal-soft); border-color: #bfe3dd; }
.rail-step.st-begonnen { background: var(--gold-soft); border-color: #eadbb0; }
.rail-step.st-laeuft { background: var(--accent-soft); border-color: #efc9b7; }
.rail-gate { align-self: flex-start; font-size: .68rem; padding: 1px 6px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); margin-top: 3px; }
.rail-gate.g-gueltig { background: var(--teal); color: #fff; }
.rail-gate.g-abgelehnt, .rail-gate.g-veraltet { background: var(--red); color: #fff; }
@media (max-width: 900px) { .rail { grid-template-columns: repeat(5, minmax(0, 1fr)); } .head-facts { grid-template-columns: repeat(2, auto); } }
@media (max-width: 520px) { .rail { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

table.kv th { text-align: left; font-weight: 500; color: var(--ink-3); width: 42%; }
.torliste { list-style: none; padding: 0; margin: 0; }
.torliste li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.torliste li span { color: var(--ink-3); font-size: .85rem; text-align: right; }
.torliste li.g-gueltig a { color: #1d6f65; }
.torliste li.g-veraltet span, .torliste li.g-abgelehnt span { color: var(--red); }
.ki-card .doc-preview { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 6px 18px; margin-top: 12px; background: #fff; }
.gate-card { border-left: 4px solid var(--line-2); }
.gate-card.g-gueltig { border-left-color: var(--teal); }
.gate-card.g-veraltet, .gate-card.g-abgelehnt { border-left-color: var(--red); }
.gate-card textarea { margin: 10px 0; }
mark.offen { background: var(--red-soft); color: var(--red); padding: 0 4px; border-radius: 4px; font-weight: 500; }
.wbref, .qref { display: inline-block; font-size: .74rem; padding: 0 6px; border-radius: 999px; background: var(--teal-soft); color: #1d6f65; font-family: var(--mono); vertical-align: 1px; white-space: nowrap; }
.qref { background: var(--bg-2); color: var(--ink-2); }
.wbref.bad { background: var(--red-soft); color: var(--red); text-decoration: line-through; }
table.matrix td { vertical-align: top; }
table.matrix tr.offen td { background: #fff8f4; }
table.matrix select, table.matrix input.notiz { font-size: .82rem; padding: 4px 6px; margin-bottom: 4px; min-width: 150px; }
.pfad { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; margin-top: 10px; }
.pfad-step { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); display: flex; flex-direction: column; gap: 3px; min-width: 130px; background: var(--paper); }
.pfad-step.g-gueltig { background: var(--teal-soft); border-color: #bfe3dd; }
.pfad-step.g-veraltet, .pfad-step.g-abgelehnt { background: var(--red-soft); border-color: #eec3b8; }
.pfad-pfeil { align-self: center; color: var(--ink-3); font-size: 1.4rem; }
.comment-card { margin-bottom: 10px; }
.comment-card.pflicht { border-left: 4px solid var(--red); }
.comment-card.erledigt { opacity: .6; border-left-color: var(--teal); }
.editor-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; flex: 1; min-height: 0; }
.editor-src { font-family: var(--mono); font-size: .86rem; line-height: 1.5; border: 0; border-right: 1px solid var(--line); border-radius: 0; padding: 22px; resize: none; height: 100%; background: #fff; }
.editor-prev { overflow: auto; padding: 10px 26px; background: var(--paper); }
@media (max-width: 900px) { .editor-split { grid-template-columns: 1fr; } .editor-prev { display: none; } }
.ablauf { display: grid; gap: 10px; margin-top: 16px; }
.wb-actions { display: inline-flex; gap: 10px; margin-left: 8px; }
.filelist li { gap: 10px; }
.row > .btn, .row > a.btn, .row > button, .row > select.vers, .row > .chk, .row > .badge { flex: 0 0 auto; }
.ki-state, .gate-card > .row > .badge { flex: 0 0 auto !important; }
.ki-card > .row:first-child > div:first-child, .gate-card > .row:first-child > div:first-child { flex: 1 1 auto; }
.phase-head > .row > div:first-child { flex: 1 1 auto; }
.phase-head > .row > .row { flex: 0 0 auto; }
.mono.small, table.matrix td:first-child { white-space: nowrap; }
.rail-step .rail-t { hyphens: auto; overflow-wrap: anywhere; }
.ueber-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ueber-grid > .card + .card { margin-top: 0; }
@media (max-width: 860px) { .ueber-grid { grid-template-columns: 1fr; } }
table.kv td { overflow-wrap: anywhere; }

.wb-plain { white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: .84rem; line-height: 1.55; margin: 0; }
.filelist button.linkish[data-wbview] { text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Blöcke über den Phasen (wie die Szenario-Werkstatt: Block 1, 2, 3) */
:root { --chart-1: #2A9D8F; --chart-2: #D97757; }
.blockrail { display: flex; gap: 10px; margin: 20px 0 6px; align-items: stretch; flex-wrap: wrap; }
.blk { min-width: 150px; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; background: var(--bg-2); display: flex; flex-direction: column; gap: 6px; }
.blk.blk-fertig { background: var(--teal-soft); border-color: #bfe3dd; }
.blk.blk-aktiv { border-color: var(--accent); }
.blk-kopf { font-size: .82rem; font-weight: 600; color: var(--ink-2); padding: 0 2px; }
.blk-nr { color: var(--ink-3); font-weight: 500; }
.blk-steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; flex: 1; }
@media (max-width: 900px) { .blk { flex-basis: 100% !important; } }
.blockdots { display: inline-flex; gap: 8px; }
.blockdots .bd { display: inline-flex; gap: 3px; padding: 3px 5px; border-radius: 999px; background: var(--bg-2); }
.blockdots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.blockdots i.d-fertig { background: var(--teal); } .blockdots i.d-begonnen { background: var(--gold); } .blockdots i.d-laeuft { background: var(--accent); animation: puls 1.4s infinite; }
.grid.c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } .grid.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.c5, .grid.c6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ueber-grid .span2 { grid-column: 1 / -1; }
.kpi.kpi-s { font-size: 1.35rem; }
.notice.ok { background: var(--teal-soft); color: #1d6f65; }
.optionen { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.feld form input[type=text] { margin-bottom: 8px; }

/* Use Case Canvas und Business Canvas */
.canvas-kopf { margin-bottom: 12px; }
.canvas-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; grid-template-areas: "nutzen workflow output" "daten ziel bewertung"; gap: 10px; }
.cv { border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); padding: 12px 14px; }
.cv h4 { margin: 0 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-2); }
.cv ul, .cv ol { margin: 0; padding-left: 18px; font-size: .9rem; } .cv li { margin-bottom: 5px; } .cv p { margin: 0; font-size: .9rem; }
.cv.nutzen { grid-area: nutzen; } .cv.workflow { grid-area: workflow; } .cv.output { grid-area: output; } .cv.daten { grid-area: daten; } .cv.ziel { grid-area: ziel; } .cv.bewertung { grid-area: bewertung; }
ol.flow { counter-reset: f; list-style: none; padding: 0; } ol.flow li { counter-increment: f; position: relative; padding-left: 28px; }
ol.flow li::before { content: counter(f); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .72rem; display: flex; align-items: center; justify-content: center; }
.bew-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.bew { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 8px; background: var(--bg-2); }
.bew b { font-size: 1.15rem; } .bew.gesamt { grid-column: 1 / -1; background: var(--accent-soft); }
@media (max-width: 900px) { .canvas-grid { grid-template-columns: 1fr; grid-template-areas: "nutzen" "workflow" "output" "daten" "ziel" "bewertung"; } }
.bc .kpi-row { margin: 10px 0 14px; }
.bc-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
@media (max-width: 1100px) { .bc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .bc-grid { grid-template-columns: 1fr; } }
figure.chart { margin: 6px 0 0; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper); padding: 12px 14px; }
figure.chart figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .9rem; margin-bottom: 6px; }
figure.chart .legend { color: var(--ink-2); font-size: .85rem; display: inline-flex; align-items: center; gap: 6px; }
figure.chart .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
figure.chart .sw.s1, figure.chart path.s1 { background: var(--chart-1); fill: var(--chart-1); }
figure.chart .sw.s2, figure.chart path.s2 { background: var(--chart-2); fill: var(--chart-2); }
figure.chart svg { width: 100%; max-width: 760px; height: auto; display: block; margin: 0 auto; }
figure.chart .axis { stroke: var(--line-2); stroke-width: 1; }
figure.chart text.val { font-size: 12px; fill: var(--ink-2); font-family: var(--sans); }
figure.chart text.lab { font-size: 13px; fill: var(--ink); font-family: var(--sans); }
figure.chart g.bar:hover path { opacity: .82; }

/* Belegschaft, Modell, Webseite, Bau */
.agenten-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 12px; }
.agent-card { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; background: var(--paper); }
.werkzeuge { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.wz { display: inline-block; font-size: .72rem; padding: 1px 7px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font-family: var(--mono); margin: 2px 2px 0 0; }
.wz.mensch { background: var(--gold-soft); color: #8a6a14; } .wz.tor { background: var(--teal-soft); color: #1d6f65; }
.modell-bloecke { display: grid; gap: 10px; margin-top: 12px; }
.mb { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; background: var(--bg-2); }
.mp { background: var(--paper); border-radius: 8px; padding: 8px 10px; margin-top: 6px; }
iframe.vorschau { width: 100%; height: 620px; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff; margin-top: 10px; }
ul.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
ul.checks li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; background: var(--bg-2); }
ul.checks li.ok { background: var(--teal-soft); } ul.checks li.fehlt { background: var(--red-soft); }
ul.checks .ck { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 22px; background: #fff; }
ul.checks li.ok .ck { color: #1d6f65; } ul.checks li.fehlt .ck { color: var(--red); }
ol.bau-schritte { padding-left: 20px; } ol.bau-schritte li { margin-bottom: 6px; }
ol.bau-schritte li.bs-ok b { color: #1d6f65; } ol.bau-schritte li.bs-fehler b { color: var(--red); } ol.bau-schritte li.bs-laeuft b { color: var(--accent-2); }
.badge.bau-fertig { background: var(--teal-soft); color: #1d6f65; } .badge.bau-fehler { background: var(--red-soft); color: var(--red); }
.badge.bau-freigegeben, .badge.bau-laeuft { background: var(--accent-soft); color: var(--accent-2); }
.ablauf-block .ablauf { margin-top: 8px; }
