:root {
  --navy: #011530;
  --bg: #ECEFF3;
  --panel: #FFFFFF;
  --panel-2: #F5F7F8;
  --ink: #22262C;
  --muted: #666B76;
  --line: #DDE1E8;
  --line-strong: #C3C9D3;
  --act: #0069FF;
  --act-hover: #0052CC;
  --act-ink: #FFFFFF;
  --act-soft: #EAF3FF;
  --warn: #8A5A00;
  --warn-soft: #FBF1DC;
  --err: #B23A2A;
  --err-soft: #FBE7E3;
  --logic: #6A3FA0;
  --logic-soft: #F0EAF7;
  --r: 8px;
  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.45 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--act); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
a { color: var(--act); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------ Knöpfe */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--line-strong); background: var(--panel-2); }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.btn-primary { background: var(--act); border-color: var(--act); color: var(--act-ink); }
.btn-primary:hover { background: var(--act-hover); border-color: var(--act-hover); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgb(0 0 0 / .05); border-color: transparent; }
.btn-danger { color: var(--err); }
.btn-danger:hover { background: var(--err-soft); border-color: var(--err-soft); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn-icon { width: 30px; height: 30px; padding: 0; }
.btn:disabled { opacity: .45; cursor: default; }

/* ------------------------------------------------ Übersicht */
.dash { max-width: 1160px; margin: 0 auto; padding: 40px 28px 80px; }
.dash-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.dash-head h1 { font-size: 30px; letter-spacing: -.02em; }
.dash-head p { color: var(--muted); margin-top: 6px; max-width: 60ch; }
.dash-head .grow { flex: 1; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.fcard { background: var(--panel); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); transition: border-color .15s; }
.fcard:hover { border-color: var(--line-strong); }
.fcard-art { all: unset; cursor: pointer; display: grid; grid-template-columns: 38% 1fr; height: 150px; position: relative; }
.fcard-art:focus-visible { outline: 2px solid var(--act); outline-offset: -2px; }
.fcard-aside { padding: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.fcard-aside b { font-size: 13px; line-height: 1.2; }
.fcard-main { padding: 16px 14px; display: flex; flex-direction: column; gap: 7px; }
.fcard-main i { display: block; height: 7px; border-radius: 4px; background: rgb(0 0 0 / .08); }
.fcard-main i:first-child { width: 70%; height: 11px; background: rgb(0 0 0 / .16); margin-bottom: 4px; }
.fcard-main .fcard-btn { margin-top: auto; align-self: flex-end; width: 58px; height: 18px; border-radius: 4px; }
.fcard-logo { max-height: 22px; max-width: 110px; object-fit: contain; object-position: left; }
.fcard-body { padding: 14px 16px 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.fcard-body div { flex: 1; min-width: 0; }
.fcard-body h3 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcard-body p { color: var(--muted); font-size: 13px; }
.empty { background: var(--panel); border: 1px dashed var(--line-strong); border-radius: 12px; padding: 48px 28px; text-align: center; }
.empty h2 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--muted); margin-bottom: 18px; }

/* ------------------------------------------------ Editor-Gerüst */
.ed { height: 100vh; height: 100dvh; display: grid; grid-template-rows: 52px 1fr; }
.top { display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); min-width: 0; }
.top-name { display: flex; flex-direction: column; min-width: 0; max-width: 260px; }
.top-name input { border: 1px solid transparent; background: none; border-radius: 6px; padding: 2px 6px; font-weight: 600; font-size: 15px; width: 100%; }
.top-name input:hover { border-color: var(--line); }
.top-name span { font-size: 12px; color: var(--muted); padding: 0 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabs { display: flex; gap: 2px; margin: 0 auto; background: var(--panel-2); padding: 3px; border-radius: 9px; }
.tabs button { border: 0; background: none; padding: 6px 14px; border-radius: 7px; font-weight: 500; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .1); }
.saved { font-size: 12px; color: var(--muted); white-space: nowrap; }
.work { display: grid; grid-template-columns: 300px 1fr 340px; min-height: 0; }
.work.no-inspector { grid-template-columns: 360px 1fr; }
.side { background: var(--panel); border-right: 1px solid var(--line); overflow: auto; min-height: 0; }
.insp { background: var(--panel); border-left: 1px solid var(--line); overflow: auto; min-height: 0; }

/* ------------------------------------------------ Gliederung */
.ol { padding: 10px 8px 40px; }
.ol-sec { font-size: 12px; font-weight: 600; color: var(--muted); padding: 14px 10px 6px; display: flex; align-items: center; }
.ol-sec .btn { margin-left: auto; }
.row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 5px 8px; border: 1px solid transparent; border-radius: 7px; background: none; text-align: left; position: relative; }
.row:hover { background: var(--panel-2); }
.row.is-sel { background: var(--act-soft); border-color: color-mix(in srgb, var(--act) 30%, transparent); }
.row-num { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.row-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-step .row-txt { font-weight: 600; }
.row-field { padding-left: 38px; min-height: 30px; font-size: 13px; }
.row-type { flex: 0 0 auto; width: 20px; height: 20px; display: grid; place-items: center; color: var(--muted); }
.row-type svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.row-req { color: var(--err); font-weight: 700; }
.badge-logic { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--logic); background: var(--logic-soft); padding: 1px 6px; border-radius: 10px; }
.badge-logic svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.row-grip { flex: 0 0 auto; width: 10px; color: var(--line-strong); cursor: grab; opacity: 0; font-size: 12px; letter-spacing: -2px; }
.row:hover .row-grip { opacity: 1; }
.row.drop-before::before, .row.drop-after::after { content: ""; position: absolute; left: 6px; right: 6px; height: 2px; background: var(--act); border-radius: 2px; }
.row.drop-before::before { top: -2px; }
.row.drop-after::after { bottom: -2px; }
.row.drop-into { border-color: var(--act); border-style: dashed; }
.add-field { margin: 2px 0 8px 38px; font-size: 13px; color: var(--act); background: none; border: 0; padding: 4px 6px; border-radius: 6px; font-weight: 500; }
.add-field:hover { background: var(--act-soft); }

/* ------------------------------------------------ Typ-Menü */
.menu { position: fixed; z-index: 50; width: 300px; max-height: 70vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px rgb(22 33 43 / .18); padding: 6px; }
.menu h4 { font-size: 11px; font-weight: 600; color: var(--muted); padding: 8px 8px 4px; }
.menu button { display: flex; align-items: flex-start; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 7px 8px; border-radius: 7px; }
.menu button:hover, .menu button:focus-visible { background: var(--panel-2); }
.menu button b { display: block; font-weight: 600; }
.menu button small { color: var(--muted); font-size: 12px; }
.menu .row-type { margin-top: 1px; }

/* ------------------------------------------------ Vorschau */
.canvas { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background-color: var(--bg); background-image: radial-gradient(rgb(22 33 43 / .13) 1px, transparent 1.2px); background-size: 16px 16px; }
.canvas-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; flex-wrap: wrap; }
.canvas-bar .grow { flex: 1; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.seg button { border: 0; background: none; height: 28px; padding: 0 10px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; font-size: 13px; }
.seg button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 6px 20px 24px; overflow: hidden; }
.dev-wrap { position: relative; }
.dev { position: absolute; top: 0; left: 0; transform-origin: 0 0; background: #fff; border-radius: 14px; box-shadow: 0 1px 0 rgb(0 0 0 / .04), 0 24px 60px rgb(22 33 43 / .18); overflow: hidden; }
.dev.is-mobile { border-radius: 28px; outline: 8px solid #1B232C; }
.dev-host { height: 100%; }
.stage-note { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); font-size: 12px; color: var(--muted); background: var(--panel); padding: 3px 10px; border-radius: 10px; border: 1px solid var(--line); white-space: nowrap; }

/* ------------------------------------------------ Eigenschaften */
.pane { padding: 18px 18px 60px; display: grid; gap: 18px; align-content: start; }
.pane-head { display: flex; align-items: center; gap: 8px; }
.pane-head h2 { font-size: 16px; flex: 1; }
.pane-head .kind { font-size: 12px; color: var(--muted); display: block; font-weight: 500; margin-bottom: 2px; }
.group { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.group > h3 { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.group > h3 .btn { margin-left: auto; }
.group > p.help { color: var(--muted); font-size: 13px; margin-top: -6px; }
.fld { display: grid; gap: 5px; }
.fld > span { font-size: 12.5px; font-weight: 600; color: #2E3A45; }
.fld > small { color: var(--muted); font-size: 12px; }
.inp { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); transition: border-color .12s, box-shadow .12s; }
textarea.inp { height: auto; min-height: 76px; padding: 8px 10px; resize: vertical; line-height: 1.45; }
select.inp { padding-right: 6px; }
.inp:hover { border-color: var(--line-strong); }
.inp:focus { outline: none; border-color: var(--act); box-shadow: 0 0 0 3px color-mix(in srgb, var(--act) 18%, transparent); }
.inp-mono { font-family: var(--mono); font-size: 12.5px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { appearance: none; width: 34px; height: 20px; border-radius: 10px; background: var(--line-strong); position: relative; flex: 0 0 auto; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--act); }
.switch input:checked::after { transform: translateX(14px); }
.switch small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 7px; padding: 5px 10px; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; }
.chip:hover { border-color: var(--line-strong); }
.chip[aria-pressed="true"] { border-color: var(--act); background: var(--act-soft); color: var(--act-hover); }
.pane-actions { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line); }

/* Optionen */
.opts { display: grid; gap: 6px; }
.opt { display: grid; grid-template-columns: 14px 1fr auto auto; gap: 6px; align-items: center; }
.opt.has-icon { grid-template-columns: 14px auto 1fr auto auto; }
.opt .row-grip { opacity: 1; }
.icon-btn { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); display: grid; place-items: center; }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.icon-grid button { height: 38px; border: 1px solid transparent; border-radius: 7px; background: none; display: grid; place-items: center; }
.icon-grid button:hover { background: var(--panel-2); border-color: var(--line); }
.icon-grid svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Logik */
.cond { display: grid; gap: 8px; padding: 12px; background: var(--logic-soft); border-radius: 9px; }
.cond-rule { display: grid; gap: 6px; padding: 10px; background: var(--panel); border-radius: 7px; position: relative; }
.cond-rule .del { position: absolute; top: 6px; right: 6px; }
.cond-rule .inp { height: 32px; }
.cond-match { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.cond-match select { width: auto; height: 28px; }
.cond-word { font-size: 12px; font-weight: 600; color: var(--logic); }
.logic-list { display: grid; gap: 8px; padding: 14px; }
.logic-item { all: unset; box-sizing: border-box; cursor: pointer; display: block; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; font-size: 13px; line-height: 1.55; }
.logic-item:hover { border-color: var(--logic); }
.logic-item:focus-visible { outline: 2px solid var(--logic); }
.logic-item b { font-weight: 600; }
.logic-item .what { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.logic-item q { quotes: "„" "“"; font-weight: 600; color: var(--logic); }

/* Hinweise */
.note { font-size: 13px; padding: 9px 11px; border-radius: 7px; background: var(--panel-2); color: var(--muted); }
.note-warn { background: var(--warn-soft); color: var(--warn); }
.note-err { background: var(--err-soft); color: var(--err); }
.note-ok { background: var(--act-soft); color: var(--act-hover); }

/* ------------------------------------------------ Design */
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.swatch { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 6px; text-align: left; font-size: 12px; font-weight: 500; }
.swatch:hover { border-color: var(--line-strong); }
.swatch span { display: flex; height: 18px; border-radius: 4px; overflow: hidden; margin-bottom: 5px; }
.swatch span i { flex: 1; }
.color { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: center; }
.color input[type="color"] { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 2px; background: var(--panel); cursor: pointer; }
.color label { display: grid; gap: 2px; }
.color label b { font-size: 12.5px; font-weight: 600; }
.color label small { color: var(--muted); font-size: 12px; }
.color-row { display: grid; grid-template-columns: 1fr 96px; gap: 8px; align-items: center; }
.fonts { display: grid; gap: 4px; max-height: 280px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 8px; }
.font-opt { display: flex; align-items: baseline; gap: 8px; border: 1px solid transparent; background: none; border-radius: 6px; padding: 6px 8px; text-align: left; }
.font-opt:hover { background: var(--panel-2); }
.font-opt[aria-pressed="true"] { border-color: var(--act); background: var(--act-soft); }
.font-opt span { font-size: 17px; flex: 1; }
.font-opt small { color: var(--muted); font-size: 11px; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumbs.scenes { grid-template-columns: repeat(3, 1fr); }
.thumb { border: 2px solid transparent; border-radius: 9px; padding: 0; background: var(--panel-2); overflow: hidden; display: flex; flex-direction: column; text-align: left; }
.thumb:hover { border-color: var(--line-strong); }
.thumb[aria-pressed="true"] { border-color: var(--act); }
.thumb-art { height: 74px; width: 100%; display: block; }
.thumb-label { font-size: 11.5px; padding: 4px 6px 5px; font-weight: 500; line-height: 1.25; }
.thumb-none { height: 74px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.shape-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 12px; font-weight: 500; }
.shape-opt i { display: block; width: 44px; height: 26px; background: var(--ink); }
.shape-opt[aria-pressed="true"] { border-color: var(--act); background: var(--act-soft); }
.shapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.logo-box { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: 8px; min-height: 64px; }
.logo-box img { max-height: 44px; max-width: 160px; object-fit: contain; }
.logo-box .grow { flex: 1; }

/* ------------------------------------------------ Dialog */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 30px 80px rgb(22 33 43 / .3); color: var(--ink); }
dialog::backdrop { background: rgb(22 33 43 / .45); }
.dlg { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.dlg-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { font-size: 18px; flex: 1; }
.dlg-body { padding: 18px 22px 22px; overflow: auto; display: grid; gap: 16px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--panel-2); border-radius: 0 0 14px 14px; }
.code { width: 100%; height: 190px; font-family: var(--mono); font-size: 12px; line-height: 1.5; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #F7F9FA; resize: vertical; white-space: pre; }
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tpl { border: 1.5px solid var(--line); border-radius: 10px; background: var(--panel); padding: 14px; text-align: left; display: grid; gap: 4px; align-content: start; }
.tpl:hover { border-color: var(--line-strong); }
.tpl[aria-pressed="true"] { border-color: var(--act); background: var(--act-soft); }
.tpl b { font-size: 14px; }
.tpl small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.steps-howto { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: #2E3A45; }
.steps-howto code { font-family: var(--mono); font-size: 12px; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
.checks-list { display: grid; gap: 6px; }

#toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 9px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .work { grid-template-columns: 260px 1fr 300px; }
  .work.no-inspector { grid-template-columns: 320px 1fr; }
  .tabs button { padding: 6px 10px; }
}
@media (max-width: 860px) {
  .ed { height: auto; min-height: 100vh; }
  .work, .work.no-inspector { grid-template-columns: 1fr; }
  .canvas { min-height: 70vh; order: -1; }
  .side, .insp { border: 0; border-top: 1px solid var(--line); }
  .top { flex-wrap: wrap; height: auto; padding: 8px 12px; }
  .ed { grid-template-rows: auto 1fr; }
  .tpl-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ------------------------------------------------ TaxIt-Marke */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.brand img { display: block; height: 26px; width: auto; }
.brand span { font-weight: 600; font-size: 15px; padding-left: 10px; border-left: 1px solid var(--line); line-height: 1.1; }
.dash-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 36px; }
.dash-brand img { height: 36px; }
.dash-brand span { font-size: 18px; }
.top .brand img { height: 22px; }
.top .brand span { font-size: 13px; color: var(--muted); font-weight: 500; }
.top-sep { width: 1px; align-self: stretch; margin: 10px 2px; background: var(--line); }

/* ------------------------------------------------ Ablaufkarte (Reiter Logik) */
.flow { position: relative; flex: 1; min-height: 0; overflow: auto; }
.flow-hint { position: sticky; top: 0; left: 0; z-index: 5; margin: 0 14px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.flow-hint .port { position: static; transform: none; flex: 0 0 auto; }
.flow-inner { position: relative; transform-origin: 0 0; }
.flow svg.flow-lines { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.flow-lines path { fill: none; stroke-width: 2; }
.flow-lines .e-seq { stroke: #9AA3AF; }
.flow-lines .e-cond { stroke: var(--logic); }
.flow-lines .e-field { stroke: var(--logic); stroke-dasharray: 5 4; opacity: .8; }
.flow-lines .e-temp { stroke: var(--act); stroke-dasharray: 6 5; }
.flow-lines .hit { stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
.flow-lines .hit:hover + path, .flow-lines path.is-hot { stroke-width: 3.5; }
.fnode { position: absolute; width: 270px; background: var(--panel); border: 1.5px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px rgb(22 33 43 / .07); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.fnode:hover { border-color: var(--line-strong); }
.fnode.is-sel { border-color: var(--act); box-shadow: 0 0 0 3px color-mix(in srgb, var(--act) 18%, transparent); }
.fnode.is-cond { border-color: color-mix(in srgb, var(--logic) 45%, var(--line)); }
.fnode.is-drop { border-color: var(--act); background: var(--act-soft); }
.fnode.is-invalid { opacity: .45; }
.fnode-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.fnode-head b { flex: 1; min-width: 0; font-size: 14px; line-height: 1.25; }
.fnode-cond { margin: -2px 12px 8px; font-size: 12px; color: var(--logic); line-height: 1.4; }
.fnode-body { border-top: 1px solid var(--line); padding: 6px 0; }
.frow { position: relative; display: flex; align-items: center; gap: 6px; padding: 3px 12px; font-size: 12.5px; min-height: 24px; }
.frow .row-type { width: 16px; height: 16px; }
.frow .row-type svg { width: 14px; height: 14px; }
.frow > span:not(.row-type):not(.port) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow.is-cond { box-shadow: inset 3px 0 0 var(--logic); }
.frow.is-drop { background: var(--act-soft); }
.frow-when { display: block; padding: 0 12px 4px 34px; font-size: 11.5px; color: var(--logic); margin-top: -2px; }
.fopt { position: relative; display: flex; align-items: center; padding: 2px 26px 2px 34px; font-size: 12px; color: var(--muted); min-height: 22px; }
.fopt span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.port { position: absolute; right: -7px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 2px solid var(--logic); cursor: crosshair; z-index: 2; transition: transform .12s, background .12s; }
.port:hover, .port.is-active { background: var(--logic); transform: translateY(-50%) scale(1.25); }
.port.is-used { background: var(--logic); }
.fterm { position: absolute; width: 170px; padding: 9px 12px; border-radius: 22px; background: var(--ink); color: #fff; font-weight: 600; font-size: 13px; text-align: center; }
.fterm.is-end { background: var(--act); }
.fchip { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 4px; max-width: 230px; padding: 3px 4px 3px 9px; font-size: 11.5px; line-height: 1.3; background: var(--logic-soft); color: var(--logic); border: 1px solid color-mix(in srgb, var(--logic) 30%, transparent); border-radius: 12px; z-index: 3; cursor: pointer; }
.fchip span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fchip.is-seq { background: var(--panel); color: var(--muted); border-color: var(--line); padding-right: 9px; }
.fchip button { flex: 0 0 auto; width: 18px; height: 18px; border: 0; border-radius: 50%; background: transparent; color: inherit; display: grid; place-items: center; padding: 0; }
.fchip button:hover { background: rgb(0 0 0 / .08); }
.fchip button svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.flow.is-dragging, .flow.is-dragging * { cursor: crosshair !important; user-select: none; }
.fopt-more { padding: 1px 12px 3px 34px; color: var(--logic); font-size: 12px; cursor: pointer; }
.fopt-more:hover span { text-decoration: underline; }

/* ------------------------------------------------ Anmeldung, Team, Veröffentlichung */
.dash-top { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; }
.dash-top .dash-brand { margin-bottom: 0; }
.dash-top .grow { flex: 1; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 4px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); font-weight: 500; flex: 0 0 auto; }
.user-btn:hover { border-color: var(--line-strong); }
.user-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.top .user-name { display: none; }
.top .user-btn { padding: 0 3px; }
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--navy); }
.login-card { width: min(400px, 100%); background: var(--panel); border-radius: 16px; padding: 32px 28px; display: grid; gap: 14px; box-shadow: 0 30px 80px rgb(0 0 0 / .35); }
.login-logo { height: 34px; width: auto; justify-self: start; }
.login-card h1 { font-size: 24px; margin-top: 6px; }
.login-sub { color: var(--muted); margin-top: -6px; }
.login-card .inp { height: 40px; }
.utable { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.urow { display: grid; grid-template-columns: minmax(0, 1fr) 150px 120px 130px 340px; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.urow:first-child { border-top: 0; }
.uhead { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--panel-2); padding-top: 9px; padding-bottom: 9px; }
.urow b { display: block; }
.urow small { color: var(--muted); font-size: 12.5px; }
.urow .inp { height: 30px; }
.urow.is-off > span:first-child { opacity: .55; }
.uactions { display: flex; gap: 6px; justify-content: flex-end; }
.muted { color: var(--muted); font-size: 13px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 10px; }
.pill-ok { background: var(--act-soft); color: var(--act-hover); }
.pill-wait { background: var(--warn-soft); color: var(--warn); }
.pill-off { background: var(--err-soft); color: var(--err); }
.fcard-live { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 700; color: #fff; background: #1F9D55; padding: 2px 8px; border-radius: 10px; }
.pub-box { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.pub-state { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.pub-state .pill { flex: 0 0 auto; }
@media (max-width: 860px) {
  .urow { grid-template-columns: 1fr 1fr; }
  .uhead { display: none; }
  .uactions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ------------------------------------------------ Einspielen */
.imp-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.imp-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--panel-2); border-radius: 8px; }
.imp-row > div { flex: 1; min-width: 0; }
.imp-row b { display: block; font-size: 14px; }
.imp-row small { color: var(--muted); font-size: 12.5px; }
.imp-row .pill { flex: 0 0 auto; }
