/* ==========================================================================
   DWO Operations Hub – Design-System
   Ruhig, sachlich, gut lesbar. Keine externen Ressourcen (CSP: 'self').
   ========================================================================== */

:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --surface-2: #f8f9fb;
    --border: #e2e5ea;
    --border-strong: #cfd4dc;
    --text: #1a2230;
    --text-2: #3b4555;
    --muted: #677180;
    --primary: #1d4e6f;
    --primary-600: #163d58;
    --primary-50: #eaf1f6;
    --focus: #2f7bb3;

    --success: #1d6f48; --success-bg: #e5f3eb;
    --info: #1d5a85;    --info-bg: #e6eff7;
    --warning: #8a5300; --warning-bg: #fdf1dc;
    --danger: #b3261e;  --danger-bg: #fcebea;
    --neutral: #3b4555; --neutral-bg: #eceff3;
    --muted-c: #6b7480; --muted-bg: #f1f2f4;

    --sidebar: #142030;
    --sidebar-text: #b9c4d1;
    --sidebar-active: #ffffff;

    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, .18);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.55 var(--font); color: var(--text); background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; color: var(--text); }
h1 { font-size: 1.45rem; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; font-weight: 620; }
h3 { font-size: .95rem; font-weight: 620; }
p { margin: 0 0 .75rem; }
code, pre { font-family: var(--mono); font-size: .85em; }
code { background: var(--muted-bg); padding: .1em .35em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .85rem; }
.right { text-align: right; }
.inline { display: inline; }
.stack > * + * { margin-top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Icons (SVG-Masken) ---------- */
.icon { display: inline-block; width: 18px; height: 18px; flex: none; background: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; vertical-align: -4px; }

/* ---------- App-Layout ---------- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; gap: 10px; align-items: center; color: #fff; padding: 4px 8px 18px; text-decoration: none !important; }
.brand-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: linear-gradient(135deg, #2a6a93, #1d4e6f);
    color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .04em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text small { color: var(--sidebar-text); font-size: 11.5px; }
.nav-group { margin-top: 14px; }
.nav-group-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #7f8da0; padding: 0 10px 6px; font-weight: 600; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--sidebar-text); font-size: 13.5px; }
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav-link.is-active { background: rgba(255,255,255,.1); color: var(--sidebar-active); box-shadow: inset 3px 0 0 #5aa5d6; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px 28px;
    background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(6px); border-bottom: 1px solid var(--border); }
.topbar-search { position: relative; flex: 1; max-width: 560px; }
.topbar-search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.topbar-search input { width: 100%; padding: 8px 12px 8px 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font: inherit; }
.topbar-search input:focus { background: #fff; border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px var(--primary-50); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar-icon { position: relative; color: var(--text-2); display: inline-flex; padding: 6px; border-radius: 8px; }
.topbar-icon:hover { background: var(--muted-bg); }
.dot-count { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--danger); color: #fff;
    font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--muted-bg); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.user-name { display: flex; flex-direction: column; line-height: 1.2; font-weight: 560; font-size: 13px; }
.user-name small { color: var(--muted); font-weight: 400; font-size: 11.5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg);
    min-width: 230px; padding: 6px; z-index: 30; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--muted-bg); text-decoration: none; }
.nav-toggle { display: none; }
.content { padding: 24px 28px 48px; max-width: 1480px; width: 100%; }

/* ---------- Seitenkopf ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .subtitle { color: var(--muted); margin: 2px 0 0; }
.page-head .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.breadcrumb a { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Raster & Karten ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-main-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .count { color: var(--muted); font-weight: 500; font-size: .85rem; margin-left: 6px; }
.card-body { padding: 16px 18px; }
.card-body.flush { padding: 0; }
.card + .card { margin-top: 18px; }
.card-foot { padding: 10px 18px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); font-size: .85rem; }
.card.accent-danger { border-top: 3px solid var(--danger); }
.card.accent-warning { border-top: 3px solid #d9960f; }
.card.accent-info { border-top: 3px solid var(--info); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); color: inherit; }
.kpi:hover { text-decoration: none; border-color: var(--border-strong); }
.kpi .kpi-label { color: var(--muted); font-size: 12.5px; }
.kpi .kpi-value { font-size: 1.6rem; font-weight: 680; line-height: 1.2; margin-top: 2px; }
.kpi.is-danger .kpi-value { color: var(--danger); }
.kpi.is-warning .kpi-value { color: var(--warning); }

/* ---------- Listen ---------- */
.item-list { list-style: none; margin: 0; padding: 0; }
.item-list li { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid var(--border); }
.item-list li:last-child { border-bottom: 0; }
.item-list .item-title { font-weight: 560; }
.item-list .item-meta { color: var(--muted); font-size: 12.5px; }
.item-list .item-side { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.empty { color: var(--muted); padding: 18px; text-align: center; font-size: .9rem; }
.empty-lg { padding: 40px 18px; }

/* ---------- Tabellen ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
    padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fbfcfd; }
.table .cell-title { font-weight: 560; }
.table .cell-sub { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.row-problem td:first-child { box-shadow: inset 3px 0 0 var(--danger); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1.6; }
.badge-success { color: var(--success); background: var(--success-bg); }
.badge-info { color: var(--info); background: var(--info-bg); }
.badge-warning { color: var(--warning); background: var(--warning-bg); }
.badge-danger { color: var(--danger); background: var(--danger-bg); }
.badge-neutral { color: var(--neutral); background: var(--neutral-bg); }
.badge-muted { color: var(--muted-c); background: var(--muted-bg); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 5px; background: var(--primary-50); color: var(--primary); font-size: 12px; margin: 0 4px 4px 0; }
.overdue { color: var(--danger); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid transparent;
    font: 560 13.5px/1.2 var(--font); cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--muted-bg); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f0c5c2; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.95); }
.btn-sm { padding: 6px 10px; font-size: 12.5px; }
.btn-xs { padding: 3px 8px; font-size: 12px; }
.btn-icon { padding: 6px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Formulare ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.form-section { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px 18px; margin: 0; background: var(--surface); }
.form-section > legend { padding: 0 6px; font-weight: 620; font-size: .95rem; }
.form-section .section-hint { color: var(--muted); font-size: .85rem; margin: -4px 0 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .span-2, .form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .field-label { font-weight: 560; font-size: 13px; color: var(--text-2); }
.field .req::after { content: " *"; color: var(--danger); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], input[type=month], input[type=datetime-local],
input[type=url], input[type=file], select, textarea {
    width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 7px; background: #fff; font: inherit; color: var(--text); }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
textarea.code, textarea.tall { font-family: var(--mono); font-size: 13px; min-height: 260px; }
select[multiple] { min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--primary-50); }
[aria-invalid=true] { border-color: var(--danger) !important; }
.hint { color: var(--muted); font-size: 12px; margin: 0; }
.field-error { color: var(--danger); font-size: 12.5px; margin: 0; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 3px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; align-items: center; padding-top: 4px; }
.form-actions .spacer { margin-right: auto; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 16px; }
.filters .field { min-width: 150px; flex: 1 1 150px; max-width: 260px; }
.filters .field label { font-size: 12px; }
.filters input, .filters select { padding: 6px 9px; }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.checklist label { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); cursor: pointer; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 560; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.is-active { color: var(--primary); border-color: var(--primary); }
.tabs .count { background: var(--muted-bg); border-radius: 9px; padding: 0 7px; font-size: 11.5px; margin-left: 4px; }

/* ---------- Meldungen ---------- */
.alert { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 8px; margin-bottom: 14px;
    border: 1px solid transparent; font-size: 13.5px; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: #c6e6d3; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #c9dcec; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: #f2d9a8; }
.alert-error, .alert-danger, .alert-critical { background: var(--danger-bg); color: var(--danger); border-color: #f3c7c4; }
.alert-close { background: none; border: 0; font-size: 18px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.notice { border-left: 4px solid var(--info); background: var(--surface); padding: 12px 16px; border-radius: 0 8px 8px 0; margin-bottom: 10px; box-shadow: var(--shadow); }
.notice.level-warning { border-color: #d9960f; }
.notice.level-critical { border-color: var(--danger); background: #fff8f7; }
.notice h3 { margin: 0 0 2px; }

/* ---------- Schlüssel/Wert ---------- */
.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 8px 14px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; border-left: 2px solid var(--border); margin-left: 6px; }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--border-strong); }
.timeline li.t-deviation::before, .timeline li.t-escalation::before { border-color: #d9960f; background: var(--warning-bg); }
.timeline li.t-error::before, .timeline li.t-rejected::before, .timeline li.t-cancelled::before { border-color: var(--danger); background: var(--danger-bg); }
.timeline li.t-completed::before, .timeline li.t-approved::before, .timeline li.t-finished::before, .timeline li.t-action_ok::before { border-color: var(--success); background: var(--success-bg); }
.timeline .t-head { font-size: 12px; color: var(--muted); }
.timeline .t-msg { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Prozessschritte (Instanz) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.step { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); scroll-margin-top: 80px; }
.step-head { display: flex; gap: 12px; align-items: center; padding: 12px 16px; flex-wrap: wrap; }
.step-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--muted-bg); color: var(--muted); flex: none; }
.step.is-active { border-color: #9cc3df; box-shadow: 0 0 0 3px var(--primary-50); }
.step.is-active .step-num { background: var(--primary); color: #fff; }
.step.is-completed .step-num { background: var(--success-bg); color: var(--success); }
.step.is-failed { border-color: #f0b5b0; }
.step.is-failed .step-num { background: var(--danger); color: #fff; }
.step.is-skipped .step-num, .step.is-waiting_approval .step-num { background: var(--warning-bg); color: var(--warning); }
.step-title { font-weight: 620; }
.step-type { font-size: 12px; color: var(--muted); }
.step-meta { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.step-body { border-top: 1px solid var(--border); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.step-body .md { font-size: 13.5px; }
.step-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Flussdarstellung (read-only) ---------- */
.flow { display: flex; flex-direction: column; gap: 6px; }
.flow-node { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.flow-node .type { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); min-width: 118px; }
.flow-node .next { margin-left: auto; font-size: 12px; color: var(--muted); text-align: right; }
.flow-node.t-start, .flow-node.t-end { background: var(--surface-2); }
.flow-node.t-decision { border-color: #d9c28f; background: #fffaf0; }
.flow-node.t-approval { border-color: #b8cfe4; background: #f5f9fc; }

/* ---------- Phasen (Release/Incident) ---------- */
.phases { display: flex; gap: 0; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; }
.phase { flex: 1 0 110px; position: relative; padding: 10px 8px 8px; text-align: center; font-size: 12px; color: var(--muted); border-top: 4px solid var(--border); }
.phase.is-passed, .phase.is-done { border-color: #5bb58a; color: var(--success); }
.phase.is-skipped { border-color: #e2b155; color: var(--warning); }
.phase.is-active { border-color: var(--primary); color: var(--primary); font-weight: 650; }
.phase.is-failed { border-color: var(--danger); color: var(--danger); font-weight: 650; }
.phase small { display: block; font-weight: 400; }

/* ---------- Markdown ---------- */
.md { overflow-wrap: anywhere; }
.md h2 { font-size: 1.15rem; margin-top: 1.4rem; } .md h3 { font-size: 1.02rem; margin-top: 1.2rem; }
.md ul, .md ol { padding-left: 1.3rem; margin: 0 0 .8rem; }
.md li { margin: .2rem 0; }
.md blockquote { margin: 0 0 .8rem; padding: 8px 14px; border-left: 3px solid var(--border-strong); color: var(--text-2); background: var(--surface-2); }
.md pre.md-code { background: #0f1722; color: #e4ebf3; padding: 12px 14px; border-radius: 8px; overflow-x: auto; }
.md pre.md-code code { background: none; padding: 0; color: inherit; }
.md .md-task { list-style: none; margin-left: -1.2rem; display: flex; gap: 8px; align-items: baseline; }
.md .md-check { width: 13px; height: 13px; border: 1.5px solid var(--border-strong); border-radius: 3px; display: inline-block; flex: none; }
.md .md-check.is-checked { background: var(--success); border-color: var(--success); }
.md table { margin-bottom: .8rem; }
.runbook-section { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.runbook-section h2 { display: flex; align-items: center; gap: 8px; }
.runbook-section.warn { background: var(--warning-bg); border: 1px solid #f2d9a8; border-radius: 8px; padding: 12px 14px; }

/* ---------- Diff ---------- */
.diff { font-family: var(--mono); font-size: 12.5px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.diff div { padding: 1px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff .d-add { background: #e9f7ef; } .diff .d-add::before { content: "+ "; color: var(--success); }
.diff .d-del { background: #fdeeee; text-decoration: line-through; color: #7a2a24; } .diff .d-del::before { content: "− "; }
.diff .d-same::before { content: "  "; }

/* ---------- Modal ---------- */
dialog.modal { border: 0; border-radius: 12px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); color: var(--text); }
dialog.modal::backdrop { background: rgba(15, 23, 34, .45); }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.modal-body h2 { margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* ---------- Anhänge ---------- */
.file-list { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.file-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.upload-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.upload-form input[type=file] { flex: 1 1 220px; padding: 5px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; font-size: 13px; }

/* ---------- Fehler / Minimal ---------- */
.error-page { max-width: 640px; margin: 40px auto; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 36px; }
.error-code { font-size: 3rem; font-weight: 800; color: var(--primary); margin: 0; line-height: 1; }
.debug { text-align: left; background: #0f1722; color: #e4ebf3; padding: 14px; border-radius: 8px; overflow-x: auto; font-size: 12px; }
body.minimal { background: radial-gradient(1200px 600px at 20% -10%, #dfe9f2, transparent), var(--bg); }
.minimal-wrap { max-width: 420px; margin: 0 auto; padding: 56px 18px; }
.minimal-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.minimal-brand strong { display: block; font-size: 1.15rem; }
.minimal-brand small { color: var(--muted); }
.minimal-foot { color: var(--muted); font-size: 12px; text-align: center; margin-top: 18px; }
.login-card { padding: 24px; }
.login-card .btn { width: 100%; padding: 10px; }
.secret-box { font-family: var(--mono); font-size: 1.1rem; letter-spacing: .08em; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 8px; padding: 12px; text-align: center; overflow-wrap: anywhere; }

/* ---------- Prozess-Designer ---------- */
.designer { display: grid; grid-template-columns: 200px minmax(0, 1fr) 360px; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
    height: calc(100vh - 230px); min-height: 560px; overflow: hidden; }
.designer-palette { border-right: 1px solid var(--border); padding: 12px; overflow-y: auto; background: var(--surface-2); }
.designer-palette h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 0 8px; }
.palette-btn { display: flex; width: 100%; align-items: center; gap: 8px; padding: 7px 9px; margin-bottom: 5px; border: 1px solid var(--border); border-radius: 7px; background: #fff;
    font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.palette-btn:hover { border-color: var(--focus); }
.palette-btn .swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.designer-canvas-wrap { position: relative; overflow: auto; background-color: #fbfcfd;
    background-image: radial-gradient(#dde2e8 1px, transparent 1px); background-size: 20px 20px; }
.designer-canvas { position: relative; width: 2400px; height: 3000px; }
.designer-canvas svg.edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.edges path { fill: none; stroke: #8a96a6; stroke-width: 1.6; }
.edges path.is-option { stroke: #b88a1d; }
.edges text { font: 600 11px var(--font); fill: #7a5a10; paint-order: stroke; stroke: #fbfcfd; stroke-width: 4px; }
.node { position: absolute; width: 230px; min-height: 58px; padding: 8px 10px 8px 12px; background: #fff; border: 1.5px solid var(--border-strong); border-radius: 10px;
    box-shadow: var(--shadow); cursor: grab; user-select: none; font-size: 13px; }
.node:active { cursor: grabbing; }
.node.is-selected { border-color: var(--focus); box-shadow: 0 0 0 3px var(--primary-50), var(--shadow); }
.node.has-error { border-color: var(--danger); }
.node .n-type { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.node .n-title { font-weight: 600; line-height: 1.3; margin-top: 2px; overflow-wrap: anywhere; }
.node .n-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.node::before { content: ""; position: absolute; left: -1.5px; top: -1.5px; bottom: -1.5px; width: 5px; border-radius: 10px 0 0 10px; background: var(--node-color, #8a96a6); }
.node .n-type { color: var(--node-color, #8a96a6); }
.designer-panel { border-left: 1px solid var(--border); overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.designer-panel h3 { margin: 0; }
.designer-panel .field { gap: 4px; }
.designer-panel textarea { min-height: 70px; }
.designer-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.designer-errors { max-height: 140px; overflow: auto; }
.option-row { display: grid; grid-template-columns: 1fr 1fr 30px; gap: 6px; align-items: center; }
.list-editor { display: flex; flex-direction: column; gap: 6px; }
.list-editor .row { display: flex; gap: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-main-side { grid-template-columns: minmax(0, 1fr) 300px; }
    .designer { grid-template-columns: 170px minmax(0, 1fr) 320px; }
}
@media (max-width: 980px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
    .app.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
    .nav-toggle { display: inline-flex; }
    .grid-2, .grid-3, .layout-main-side { grid-template-columns: 1fr; }
    .content { padding: 18px 16px 40px; }
    .topbar { padding: 10px 16px; }
    .user-name { display: none; }
    .designer { grid-template-columns: 1fr; height: auto; }
    .designer-palette { display: flex; flex-wrap: wrap; gap: 6px; border-right: 0; border-bottom: 1px solid var(--border); }
    .designer-palette h3 { width: 100%; }
    .palette-btn { width: auto; margin: 0; }
    .designer-canvas-wrap { height: 60vh; }
    .designer-panel { border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 640px) {
    .grid-4, .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
    .kv { grid-template-columns: 1fr; gap: 2px 0; }
    .kv dd { margin-bottom: 8px; }
    .page-head { flex-direction: column; }
    .table th, .table td { padding: 8px 10px; }
}
@media print {
    .sidebar, .topbar, .actions, .form-actions, .btn, .upload-form { display: none !important; }
    .app { display: block; } .content { padding: 0; } .card { box-shadow: none; }
}

/* ---------- Icon-Definitionen (generiert) ---------- */
.icon-handshake { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M11 17l2 2a1.5 1.5 0 0 0 2-2%22/%3E%3Cpath d=%22M14 14l2.5 2.5a1.5 1.5 0 0 0 2-2L15 11%22/%3E%3Cpath d=%22M3 11l4-4 4 1 3-2 7 7-2 2%22/%3E%3Cpath d=%22M3 11l6 6%22/%3E%3Cpath d=%22M11 8l-3 3a1.5 1.5 0 0 0 2 2l3-2%22/%3E%3C/svg%3E"); }
.icon-grid { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%223%22 width=%227%22 height=%227%22 rx=%221.5%22/%3E%3Crect x=%2214%22 y=%223%22 width=%227%22 height=%227%22 rx=%221.5%22/%3E%3Crect x=%223%22 y=%2214%22 width=%227%22 height=%227%22 rx=%221.5%22/%3E%3Crect x=%2214%22 y=%2214%22 width=%227%22 height=%227%22 rx=%221.5%22/%3E%3C/svg%3E"); }
.icon-check { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M9 11l3 3L21 5%22/%3E%3Cpath d=%22M20 12v7a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h9%22/%3E%3C/svg%3E"); }
.icon-shield { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 3l8 3v6c0 4.5-3.4 8.3-8 9-4.6-.7-8-4.5-8-9V6z%22/%3E%3Cpath d=%22M9 12l2 2 4-4%22/%3E%3C/svg%3E"); }
.icon-play { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22M10 8.5v7l6-3.5z%22/%3E%3C/svg%3E"); }
.icon-chat { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M21 12a8 8 0 0 1-11.6 7.1L4 20l1.1-4.4A8 8 0 1 1 21 12z%22/%3E%3C/svg%3E"); }
.icon-users { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%229%22 cy=%228%22 r=%223.5%22/%3E%3Cpath d=%22M2.5 20a6.5 6.5 0 0 1 13 0%22/%3E%3Cpath d=%22M16 4.5a3.5 3.5 0 0 1 0 7%22/%3E%3Cpath d=%22M18 14a6 6 0 0 1 3.5 6%22/%3E%3C/svg%3E"); }
.icon-alert { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 3l9.5 17h-19z%22/%3E%3Cpath d=%22M12 10v4%22/%3E%3Cpath d=%22M12 17.5v.5%22/%3E%3C/svg%3E"); }
.icon-rocket { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 15c-1.5 1.5-2 5-2 5s3.5-.5 5-2%22/%3E%3Cpath d=%22M9 15l-3-3c1-4 4-8.5 13-9-.5 9-5 12-9 13z%22/%3E%3Ccircle cx=%2215%22 cy=%229%22 r=%221.5%22/%3E%3C/svg%3E"); }
.icon-tool { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M14.5 6.5a4 4 0 0 0 5 5L12 19a2.1 2.1 0 0 1-3-3z%22/%3E%3Cpath d=%22M14.5 6.5L17 4l3 3-2.5 2.5%22/%3E%3C/svg%3E"); }
.icon-repeat { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M17 2l3 3-3 3%22/%3E%3Cpath d=%22M4 11V9a4 4 0 0 1 4-4h12%22/%3E%3Cpath d=%22M7 22l-3-3 3-3%22/%3E%3Cpath d=%22M20 13v2a4 4 0 0 1-4 4H4%22/%3E%3C/svg%3E"); }
.icon-book { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 19V5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2z%22/%3E%3Cpath d=%22M4 19a2 2 0 0 0 2 2h13%22/%3E%3Cpath d=%22M8 7h7%22/%3E%3C/svg%3E"); }
.icon-terminal { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%224%22 width=%2218%22 height=%2216%22 rx=%222%22/%3E%3Cpath d=%22M7 9l3 3-3 3%22/%3E%3Cpath d=%22M13 15h4%22/%3E%3C/svg%3E"); }
.icon-flow { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%223%22 y=%223%22 width=%226%22 height=%226%22 rx=%221%22/%3E%3Crect x=%2215%22 y=%2215%22 width=%226%22 height=%226%22 rx=%221%22/%3E%3Cpath d=%22M6 9v4a2 2 0 0 0 2 2h7%22/%3E%3Cpath d=%22M12 12l3 3-3 3%22/%3E%3C/svg%3E"); }
.icon-user { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%228%22 r=%224%22/%3E%3Cpath d=%22M4 21a8 8 0 0 1 16 0%22/%3E%3C/svg%3E"); }
.icon-key { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%228%22 cy=%2215%22 r=%224%22/%3E%3Cpath d=%22M11 12l9-9%22/%3E%3Cpath d=%22M16 7l3 3%22/%3E%3C/svg%3E"); }
.icon-list { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M8 6h13%22/%3E%3Cpath d=%22M8 12h13%22/%3E%3Cpath d=%22M8 18h13%22/%3E%3Cpath d=%22M3.5 6h.5%22/%3E%3Cpath d=%22M3.5 12h.5%22/%3E%3Cpath d=%22M3.5 18h.5%22/%3E%3C/svg%3E"); }
.icon-lock { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%224%22 y=%2211%22 width=%2216%22 height=%2210%22 rx=%222%22/%3E%3Cpath d=%22M8 11V7a4 4 0 0 1 8 0v4%22/%3E%3C/svg%3E"); }
.icon-gear { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%223%22/%3E%3Cpath d=%22M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z%22/%3E%3C/svg%3E"); }
.icon-bell { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9%22/%3E%3Cpath d=%22M10.3 21a1.9 1.9 0 0 0 3.4 0%22/%3E%3C/svg%3E"); }
.icon-plug { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M9 2v6%22/%3E%3Cpath d=%22M15 2v6%22/%3E%3Cpath d=%22M6 8h12v3a6 6 0 0 1-12 0z%22/%3E%3Cpath d=%22M12 17v5%22/%3E%3C/svg%3E"); }
.icon-menu { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 6h18%22/%3E%3Cpath d=%22M3 12h18%22/%3E%3Cpath d=%22M3 18h18%22/%3E%3C/svg%3E"); }
.icon-search { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2211%22 cy=%2211%22 r=%227%22/%3E%3Cpath d=%22M20 20l-4-4%22/%3E%3C/svg%3E"); }
.icon-file { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z%22/%3E%3Cpath d=%22M14 3v6h6%22/%3E%3C/svg%3E"); }
.icon-plus { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M12 5v14%22/%3E%3Cpath d=%22M5 12h14%22/%3E%3C/svg%3E"); }

/* ---------- Hilfsklassen (keine Inline-Styles wegen CSP) ---------- */
.narrow { max-width: 560px; }
.medium { max-width: 860px; }
.wide { max-width: 1100px; }
.flex-1 { flex: 1; min-width: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 12px; }
.pl-0 { padding-left: 0 !important; }
details.card > summary { list-style: none; cursor: pointer; }
details.card > summary::-webkit-details-marker { display: none; }
details.card:not([open]) > summary { border-bottom: 0; }
.designer-toolbar .spacer { flex: 1; }
.designer-toolbar .field { max-width: 420px; }

/* ---------- Spezifitäts-Korrekturen ---------- */
.topbar-search input[type=search] { padding-left: 34px; background: var(--surface-2); border-color: var(--border); }
.topbar .nav-toggle { display: none; }
.grid > .card, .grid > section.card { margin-top: 0; }
@media (max-width: 980px) { .topbar .nav-toggle { display: inline-flex; } }
[hidden] { display: none !important; }
.designer-toolbar .field { flex: 1 1 260px; max-width: 480px; margin-left: auto; }

/* ---------- Kündigungsanalyse: Einzelreihen-Balken (native <progress>, CSP-konform) ---------- */
.bar-table .bar-col { width: 45%; }
.bar-table progress { width: 100%; height: 10px; border: 0; border-radius: 4px; background: var(--muted-bg); appearance: none; -webkit-appearance: none; vertical-align: middle; }
.bar-table progress::-webkit-progress-bar { background: var(--muted-bg); border-radius: 4px; }
.bar-table progress::-webkit-progress-value { background: var(--primary); border-radius: 4px; }
.bar-table progress::-moz-progress-bar { background: var(--primary); border-radius: 4px; }
.pre-line { white-space: pre-line; }
.icon-server { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%224%22 y=%224%22 width=%2216%22 height=%226%22 rx=%221.5%22/%3E%3Crect x=%224%22 y=%2214%22 width=%2216%22 height=%226%22 rx=%221.5%22/%3E%3Cpath d=%22M8 7h.01M8 17h.01%22/%3E%3C/svg%3E"); }
.icon-bug { --icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%227%22 y=%228%22 width=%2210%22 height=%2212%22 rx=%225%22/%3E%3Cpath d=%22M9 8a3 3 0 0 1 6 0M12 12v8M3 13h4M17 13h4M4 7l3 2M20 7l-3 2M4 19l3-2M20 19l-3-2%22/%3E%3C/svg%3E"); }
