/* Prozessmanager – Stylesheet */
:root {
  --violet: #6d4fd8;
  --violet-600: #5a3ec4;
  --violet-50: #f1ecfe;
  --violet-100: #e5dcfc;
  --ink: #1f2133;
  --ink-2: #4b4f66;
  --muted: #8a8ea6;
  --line: #e6e7ef;
  --bg: #f7f7fb;
  --card: #ffffff;
  --green: #17915a; --green-bg: #e3f6ec;
  --amber: #b26b00; --amber-bg: #fff2d9;
  --red: #c93434;   --red-bg: #fde7e7;
  --blue: #2f66d0;  --blue-bg: #e5eeff;
  --grey-bg: #eef0f5;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(31,33,51,.05), 0 4px 16px rgba(31,33,51,.04);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 15px;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }
.ic { width: 18px; height: 18px; stroke-width: 1.8; vertical-align: -3px; flex-shrink: 0; }
.muted { color: var(--muted); }
.text-bad { color: var(--red); font-weight: 600; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--ink-2); }
.inline { display: inline; }
h3 { font-size: 15px; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
h3 .ic { color: var(--violet); }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, #f3effd 0%, #eaeefc 100%);
  border-right: 1px solid #e3e0f3; display: flex; flex-direction: column; padding: 14px 10px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 4px 10px 10px; color: var(--violet); }
.sidebar nav { flex: 1; overflow-y: auto; }
.nav-section { font-size: 11px; letter-spacing: .04em; color: #5c5f78; padding: 16px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin: 2px 0; border-radius: 8px;
  color: var(--ink); font-size: 15px; border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(109,79,216,.07); text-decoration: none; }
.nav-item.active { background: var(--violet-100); color: var(--violet-600); font-weight: 600; border-left-color: var(--violet); }
.nav-item .count { margin-left: auto; background: var(--violet); color: #fff; font-size: 11px; border-radius: 10px; padding: 1px 7px; font-weight: 600; }
.sidebar-bottom { border-top: 1px solid #e0ddf0; padding-top: 8px; }
.user-box { display: flex; align-items: center; gap: 10px; padding: 10px 8px 2px; position: relative; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; flex-shrink: 0; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-meta strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { color: var(--ink-2); font-size: 12px; }
.user-menu { margin-left: auto; }
.user-menu summary { list-style: none; cursor: pointer; padding: 4px; border-radius: 6px; color: var(--ink-2); }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu .dropdown { position: absolute; bottom: 48px; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); min-width: 190px; padding: 6px; z-index: 20; }
.user-menu .dropdown a { display: flex; gap: 8px; align-items: center; padding: 8px 10px; color: var(--ink); border-radius: 6px; }
.user-menu .dropdown a:hover { background: var(--violet-50); text-decoration: none; }

.main { flex: 1; min-width: 0; padding: 0 32px 40px; max-width: 1400px; }
.main.wide { max-width: none; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 22px 0 16px; position: sticky; top: 0; background: var(--bg); z-index: 5; flex-wrap: wrap; }
.topbar h1 { font-size: 22px; margin: 0; font-weight: 650; }
.topbar .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.burger { display: none; background: none; border: 0; cursor: pointer; }
.content > * + * { margin-top: 18px; }

/* ---------- Komponenten ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.grid-main > .side { display: flex; flex-direction: column; gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.side-action { margin: -8px 0 0; }

.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-size: 14px; cursor: pointer; text-decoration: none !important; white-space: nowrap; line-height: 1.2; }
.btn-primary { background: var(--violet); color: #fff; }
.btn-primary:hover { background: var(--violet-600); }
.btn-secondary { background: var(--violet-50); color: var(--violet-600); border-color: var(--violet-100); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { border-color: #cfd1de; color: var(--ink); }
.btn-danger { background: #fff; color: var(--red); border-color: #f2c9c9; }
.btn-danger:hover { background: var(--red-bg); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 6px; }
.btn-icon:hover { color: var(--red); background: var(--red-bg); }
.btn.pulse { box-shadow: 0 0 0 0 rgba(109,79,216,.5); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(109,79,216,0); } 100% { box-shadow: 0 0 0 0 rgba(109,79,216,0); } }

.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.badge-grey { background: var(--grey-bg); color: var(--ink-2); }
.badge-dark { background: #3b3e52; color: #fff; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-violet { background: var(--violet-50); color: var(--violet-600); }

.flash { padding: 11px 16px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.flash-success { background: var(--green-bg); color: #0f6b41; }
.flash-error { background: var(--red-bg); color: #9b2121; }
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; z-index: 100; font-size: 14px; animation: fadein .2s; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } }

/* Tabellen */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid #f0f1f6; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.row-link { cursor: pointer; }
.row-link:hover td { background: #faf9ff; }
.row-link.done td { color: var(--muted); }
.row-link.done td strong { text-decoration: line-through; font-weight: 400; }
.person { display: inline-flex; align-items: center; gap: 8px; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar h3 { margin: 0; }
.toolbar .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar > .muted:last-child { margin-left: auto; }
.search { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: #fff; flex: 1; max-width: 360px; }
.search input { border: 0 !important; outline: 0; padding: 8px 0 !important; flex: 1; box-shadow: none !important; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg a { padding: 7px 12px; color: var(--ink-2); font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.seg a + a { border-left: 1px solid var(--line); }
.seg a.on { background: var(--violet-50); color: var(--violet-600); font-weight: 600; }
.seg a:hover { text-decoration: none; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ic { width: 40px; height: 40px; stroke-width: 1.3; color: #c3c5d6; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 7px 0; border-bottom: 1px solid #f0f1f6; font-size: 14px; }
.plain-list li:last-child { border-bottom: 0; }

/* Formulare */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.field > span { font-weight: 600; color: var(--ink-2); font-size: 13px; }
.field.full { grid-column: 1 / -1; }
.form.narrow { max-width: 760px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
input, select, textarea {
  font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid #d9dbe6; border-radius: 8px; background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(109,79,216,.15); }
input[type=checkbox] { width: auto; }
fieldset:disabled input, fieldset:disabled select, fieldset:disabled textarea { background: #fafafc; color: var(--ink-2); }
select.multi { min-height: 150px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; }
.form-actions { margin-top: 18px; display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.form-actions.spread { justify-content: space-between; flex-wrap: wrap; }
.form-actions.spread > div { display: flex; gap: 14px; align-items: center; }

/* Login */
.login-page { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(135deg, #f3effd, #e7eefc); }
.login-card { background: #fff; padding: 34px; border-radius: 14px; width: 100%; max-width: 380px; box-shadow: 0 10px 40px rgba(60,40,140,.12); display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { margin: 0; font-size: 22px; color: var(--violet); }
.login-card p { margin: 0; }

/* Dashboard */
.greeting { font-size: 17px; color: var(--ink-2); margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--ink); box-shadow: var(--shadow); }
.kpi:hover { text-decoration: none; border-color: var(--violet-100); }
.kpi .ic { width: 34px; height: 34px; padding: 7px; border-radius: 9px; background: var(--violet-50); color: var(--violet); }
.kpi strong { font-size: 24px; display: block; line-height: 1.1; }
.kpi span { font-size: 13px; color: var(--ink-2); }
.kpi.ok .ic { background: var(--green-bg); color: var(--green); }
.kpi.warn .ic { background: var(--amber-bg); color: var(--amber); }
.kpi.bad .ic { background: var(--red-bg); color: var(--red); }
.stackbar { display: flex; height: 34px; border-radius: 8px; overflow: hidden; font-size: 13px; font-weight: 600; }
.stackbar > div { display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; padding: 0 8px; }
.seg-freigegeben { background: var(--green-bg); color: var(--green); }
.seg-pruefung { background: var(--amber-bg); color: var(--amber); }
.seg-entwurf { background: var(--grey-bg); color: var(--ink-2); }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--violet-100); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--violet); }

/* Prozess-Detail */
.process-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--ink-2); border-bottom: 2px solid transparent; display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; font-size: 14px; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--violet-600); border-bottom-color: var(--violet); font-weight: 600; }
.facts { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }

.flow { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0; }
.flow-node { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; width: 100%; max-width: 640px; display: flex; gap: 12px; }
.flow-start, .flow-end { justify-content: center; border-radius: 30px; max-width: 360px; background: var(--violet-50); border-color: var(--violet-100); color: var(--violet-600); font-weight: 600; align-items: center; }
.flow-end { background: #f0f1f6; border-color: #dfe1ea; color: var(--ink-2); }
.flow-entscheidung { border-color: #f1d08e; background: #fffaf0; }
.flow-teilprozess { border-width: 2px; border-color: var(--violet-100); }
.flow-ereignis { border-style: dashed; }
.flow-no { width: 26px; height: 26px; border-radius: 50%; background: var(--violet); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.flow-body { flex: 1; min-width: 0; }
.flow-body p { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
.flow-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.flow-meta .ic { width: 15px; height: 15px; color: var(--muted); }
.flow-arrow { color: #b9bbcc; }

.step-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fcfcfe; }
.step-row .handle { cursor: grab; color: var(--muted); align-self: stretch; display: flex; align-items: flex-start; padding: 8px 4px; margin: -10px 0 -10px -10px; border-radius: 10px 0 0 10px; touch-action: none; user-select: none; }
.step-row .handle:hover { background: var(--violet-50); color: var(--violet); }
.step-row .handle:active { cursor: grabbing; }
.step-fields { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.step-line { display: flex; gap: 8px; flex-wrap: wrap; }
.step-line select { width: auto; max-width: 240px; }
.step-line .grow { flex: 1; min-width: 200px; }
.step-more summary { font-size: 13px; color: var(--muted); cursor: pointer; }
.step-more[open] summary { margin-bottom: 8px; }
.sortable-ghost { opacity: .4; }

.bpmn-viewer { height: 560px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.bpmn-editor-wrap { position: relative; }
.bpmn-editor { height: calc(100vh - 140px); min-height: 500px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.bpmn-hint { font-size: 12px; margin-top: 6px; }

/* Organigramm */
.tree, .tree ul { list-style: none; margin: 0; padding-left: 22px; }
.tree { padding-left: 0; }
.tree li { padding: 3px 0; }
.tree-node { display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 8px; color: var(--ink); }
.tree-node:hover { background: var(--violet-50); text-decoration: none; }
.tree-node .ic { color: var(--violet); }
.orgchart-wrap { overflow-x: auto; padding: 10px 0 20px; }
.orgchart, .orgchart ul { display: flex; justify-content: center; padding: 20px 0 0; margin: 0; position: relative; list-style: none; }
.orgchart { padding-top: 0; }
.orgchart li { display: flex; flex-direction: column; align-items: center; position: relative; padding: 20px 8px 0; }
.orgchart > li { padding-top: 0; }
.orgchart li::before, .orgchart li::after { content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 20px; border-top: 2px solid #d4cdf3; }
.orgchart li::after { right: auto; left: 50%; border-left: 2px solid #d4cdf3; }
.orgchart li:only-child::before, .orgchart li:only-child::after { display: none; }
.orgchart li:only-child { padding-top: 20px; }
.orgchart > li:only-child { padding-top: 0; }
.orgchart li:first-child::before, .orgchart li:last-child::after { border: 0 none; }
.orgchart li:last-child::before { border-right: 2px solid #d4cdf3; border-radius: 0 6px 0 0; }
.orgchart li:first-child::after { border-radius: 6px 0 0 0; }
.orgchart ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 20px; border-left: 2px solid #d4cdf3; }
.orgchart li:only-child > .org-box::before { content: ""; position: absolute; top: -20px; left: 50%; height: 20px; border-left: 2px solid #d4cdf3; }
.orgchart > li:only-child > .org-box::before { display: none; }
.org-box { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 170px; max-width: 220px; padding: 12px 14px; background: #fff; border: 1px solid var(--violet-100); border-top: 3px solid var(--violet); border-radius: 10px; color: var(--ink); font-size: 13px; text-align: center; box-shadow: var(--shadow); }
.org-box:hover { text-decoration: none; border-color: var(--violet); }
.org-box strong { font-size: 14px; }
.org-box span { display: inline-flex; justify-content: center; gap: 5px; align-items: center; color: var(--ink-2); }
.org-box .ic { width: 14px; height: 14px; }

/* Prozesslandkarte */
.map-hint { margin: 0; font-size: 13px; }
.pmap { display: grid; grid-template-columns: 60px 1fr 60px; gap: 12px; }
.pmap-side { background: linear-gradient(180deg, var(--violet-50), #e9eefc); border: 1px solid var(--violet-100); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.pmap-side span { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 600; color: var(--violet-600); text-align: center; display: flex; align-items: center; gap: 8px; }
.pmap-side.right span { transform: none; }
.pmap-side small { font-weight: 400; color: var(--ink-2); }
.pmap-bands { display: flex; flex-direction: column; gap: 12px; }
.pmap-band { border-radius: 12px; padding: 14px 16px 16px; border: 1px solid var(--line); background: #fff; }
.pmap-band header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.pmap-band header small { color: var(--muted); }
.band-add { margin-left: auto; color: var(--muted); }
.band-fuehrung { background: #f6f3ff; border-color: #e2dafc; }
.band-kern { background: #eef4ff; border-color: #d6e3fb; }
.band-unterstuetzung { background: #f5f6f9; border-color: #e3e5ec; }
.pmap-items { display: flex; flex-wrap: wrap; gap: 12px; min-height: 64px; align-items: stretch; }
.pmap-item { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid #dcdff0; border-radius: 10px; padding: 10px 14px; min-width: 170px; max-width: 240px; color: var(--ink); box-shadow: var(--shadow); cursor: pointer; }
.pmap-item:hover { text-decoration: none; border-color: var(--violet); }
.band-kern .pmap-item { clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%, 18px 50%); padding: 12px 30px 12px 28px; border-radius: 0; border: 0; background: #fff; box-shadow: none; min-width: 200px; filter: drop-shadow(0 1px 2px rgba(31,33,51,.15)); }
.band-kern .pmap-item:first-child { clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%); padding-left: 16px; }
.band-kern .pmap-item:hover { background: var(--violet-50); }
.pmap-nr { font-size: 12px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.pmap-name { font-weight: 600; font-size: 14px; }
.pmap-meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.pmap-meta .ic { width: 13px; height: 13px; margin-right: 2px; }
.pmap-empty { align-self: center; font-size: 13px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #b8bccd; }
.status-freigegeben .dot { background: var(--green); }
.status-pruefung .dot { background: #e59a12; }
.status-entwurf .dot { background: #b8bccd; }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--ink-2); justify-content: center; }

/* Aufgaben */
.check-btn { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #c9ccdb; background: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; color: transparent; }
.check-btn .ic { width: 14px; height: 14px; stroke-width: 3; }
.check-btn:hover { border-color: var(--green); color: var(--green); }
.check-btn.on { background: var(--green); border-color: var(--green); color: #fff; }

/* Benachrichtigungen */
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li a { display: flex; gap: 12px; align-items: center; padding: 12px 8px; border-bottom: 1px solid #f0f1f6; color: var(--ink); font-size: 14px; }
.notif-list li a span { flex: 1; }
.notif-list li a:hover { background: #faf9ff; text-decoration: none; }
.notif-list li.unread a { font-weight: 600; }
.notif-list li.unread .ic { color: var(--violet); }

/* Responsive */
@media (max-width: 1000px) {
  .grid-main, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .sidebar { position: fixed; left: -260px; z-index: 50; transition: left .2s; box-shadow: 0 0 30px rgba(0,0,0,.15); }
  .sidebar.open { left: 0; }
  .burger { display: block; }
  .main { padding: 0 14px 30px; }
  .form-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .pmap { grid-template-columns: 1fr; }
  .pmap-side { display: none; }
  .table { display: block; overflow-x: auto; }
}

/* Druck */
@media print {
  .sidebar, .topbar .actions, .tabs, .map-hint, .burger, #steps-form, .side-action, .band-add { display: none !important; }
  .main { padding: 0; max-width: none; }
  .topbar { position: static; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  body { background: #fff; }
}

/* Einladung */
.small { font-size: 13px; }
.invite-link { margin-top: 12px; padding: 12px; background: var(--violet-50); border: 1px solid var(--violet-100); border-radius: 8px; display: flex; flex-direction: column; gap: 8px; }
.invite-link input { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.invite-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Verzweigungen im Schritt-Editor */
.step-no { min-width: 26px; height: 26px; border-radius: 50%; background: var(--violet-50); color: var(--violet-600); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; align-self: center; }
.exits { border: 1px dashed #f1d08e; background: #fffaf0; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.exits-head { font-size: 13px; font-weight: 600; color: var(--amber); display: flex; gap: 6px; align-items: center; }
.exit-list { display: flex; flex-direction: column; gap: 6px; }
.exit-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.exit-row .exit-label-in { max-width: 140px; }
.exit-row select.ziel { width: auto; max-width: 360px; flex: 1; }
.ende-label { max-width: 220px; }
.exits .add-exit { align-self: flex-start; }
.danach-label { font-size: 13px; color: var(--ink-2); align-self: center; white-space: nowrap; }
.danach select.ziel { width: auto; max-width: 360px; }
[hidden] { display: none !important; }

/* Verzweigungen in der Ablauf-Ansicht */
.flow-exits { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px dashed #ecd9a9; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.flow-exits li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.flow-exits .ic { width: 15px; height: 15px; }
.flow-exits .exit-label { background: var(--amber-bg); color: var(--amber); font-weight: 700; padding: 1px 8px; border-radius: 10px; }
.flow-node:target { box-shadow: 0 0 0 3px rgba(109,79,216,.35); }

/* Sortieren */
.step-actions { display: flex; flex-direction: column; gap: 2px; }
.btn-icon:hover { color: var(--violet); background: var(--violet-50); }
.btn-icon.danger:hover { color: var(--red); background: var(--red-bg); }
.sortable-chosen { box-shadow: 0 0 0 2px var(--violet-100); }
.sortable-ghost { opacity: .35; background: var(--violet-50) !important; border-style: dashed !important; }
.sortable-drag { opacity: .95 !important; box-shadow: 0 12px 30px rgba(31,33,51,.18) !important; transform: rotate(.4deg); }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; }
.pmap-item { touch-action: none; }
@keyframes flashmove { from { background: var(--violet-50); } to { background: #fcfcfe; } }
.step-row.flash-move { animation: flashmove .8s ease-out; }
