
/* ------------------------------------------------------------------ Workflows: designer en diagram */
.wf-layout { display: grid; grid-template-columns: 150px minmax(0, 1fr) 360px; gap: 12px; height: calc(100vh - var(--topbar-h, 56px) - 150px); min-height: 480px; }
.wf-layout--ro { grid-template-columns: minmax(0, 1fr); height: 520px; }
.wf-palette { display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.wf-palette__item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--white, #fff); border: 1px solid var(--slate-200, #e2e8f0); border-radius: 8px; cursor: grab; font-size: 13px; user-select: none; }
.wf-palette__item:hover { border-color: var(--slate-300, #cbd5e1); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.wf-palette__hint { font-size: 12px; color: var(--text-muted, #64748b); margin-top: 8px; line-height: 1.4; }
.wf-props { background: var(--white, #fff); border: 1px solid var(--slate-200, #e2e8f0); border-radius: 8px; padding: 12px 14px; overflow: auto; }
.wf-props h4 { margin: 0 0 10px; font-size: 14px; }
.wf-props .wf-field { margin-bottom: 10px; }
.wf-props label { display: block; font-size: 12px; color: var(--text-muted, #64748b); margin-bottom: 3px; }
.wf-props .hint { font-size: 12px; }
.wf-fields-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wf-fields-table td { padding: 3px 4px 3px 0; vertical-align: middle; }
.wf-errors { background: #fff1f2; border: 1px solid #fecdd3; color: #9f1239; border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; }
.wf-errors ul { margin: 4px 0 0 18px; padding: 0; }

.wfd { position: relative; overflow: auto; background: #f8fafc; border: 1px solid var(--slate-200, #e2e8f0); border-radius: 8px;
       background-image: radial-gradient(#dbe3ec 1px, transparent 1px); background-size: 20px 20px; }
.wfd__sizer { position: relative; }
.wfd__stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.wfd__svg { position: absolute; left: 0; top: 0; overflow: visible; color: #64748b; }
.wfd__tmp { fill: none; stroke: #DB2448; stroke-width: 2; stroke-dasharray: 5 4; display: none; }
.wfe__path { fill: none; stroke: #94a3b8; stroke-width: 2; }
.wfe__hit { fill: none; stroke: transparent; stroke-width: 14; cursor: pointer; }
.wfe.is-sel .wfe__path { stroke: #DB2448; }
.wfe__lblbg { fill: #fff; stroke: #cbd5e1; rx: 9; }
.wfe__lbl { font: 600 12px Inter, Segoe UI, sans-serif; fill: #334155; text-anchor: middle; cursor: pointer; }
.wfd--ro .wfe__hit, .wfd--ro .wfe__lbl { cursor: default; }

.wfn { position: absolute; min-width: 160px; max-width: 230px; padding: 8px 12px 10px; background: #fff; border: 2px solid #cbd5e1; border-radius: 10px;
       box-shadow: 0 1px 2px rgba(0,0,0,.06); font-size: 13px; cursor: move; user-select: none; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.wfd--ro .wfn { cursor: default; }
.wfn__icon { grid-row: span 2; font-size: 15px; color: #64748b; }
.wfn__title { font-weight: 600; line-height: 1.25; }
.wfn__sub { font-size: 11px; color: #64748b; }
.wfn__sub:empty { display: none; }
.wfn__port { position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; border: 2px solid #94a3b8; cursor: crosshair; }
.wfn__port:hover { border-color: #DB2448; background: #ffe4e9; }
.wfn.is-sel { border-color: #DB2448; box-shadow: 0 0 0 3px rgba(219,36,72,.15); }
.wfn--start, .wfn--einde { min-width: 110px; border-radius: 999px; justify-content: center; background: #f1f5f9; }
.wfn--start { border-color: #16a34a; } .wfn--start .wfn__icon { color: #16a34a; }
.wfn--einde { border-color: #475569; }
.wfn--beslissing { border-color: #d97706; background: #fffbeb; } .wfn--beslissing .wfn__icon { color: #d97706; }
.wfn--mail { border-color: #2563eb; background: #eff6ff; } .wfn--mail .wfn__icon { color: #2563eb; }
.wfn--wachten { border-style: dashed; }
.wfn--splitsen, .wfn--samenvoegen { min-width: 140px; background: #f1f5f9; border-color: #475569; border-radius: 4px; }
/* lopende workflow */
.wfn.wfn--klaar { border-color: #16a34a; background: #f0fdf4; }
.wfn.wfn--klaar .wfn__icon::after { content: " ✓"; color: #16a34a; }
.wfn.wfn--actief { border-color: #ea580c; background: #fff7ed; box-shadow: 0 0 0 4px rgba(234,88,12,.18); }

.wf-check { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; }
.wf-data { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; font-size: 13px; margin: 0 0 10px; }
.wf-data dt { color: var(--text-muted, #64748b); }
.wf-data dd { margin: 0; }
.wf-outcomes { display: flex; gap: 8px; flex-wrap: wrap; }
.wf-log { list-style: none; margin: 0; padding: 0; font-size: 13px; max-height: 360px; overflow: auto; }
.wf-log li { padding: 4px 0; border-bottom: 1px solid var(--slate-100, #f1f5f9); display: grid; grid-template-columns: 120px 140px 1fr; gap: 8px; }
.wf-log .muted { color: var(--text-muted, #64748b); }
.wf-start-form .wf-field { margin-bottom: 10px; }
.wf-start-form label { display: block; font-size: 12px; color: var(--text-muted, #64748b); margin-bottom: 3px; }
.wfn--voorwaarde { border-color: #7c3aed; background: #f5f3ff; } .wfn--voorwaarde .wfn__icon { color: #7c3aed; }
.wfn--actie { border-color: #0891b2; background: #ecfeff; } .wfn--actie .wfn__icon { color: #0891b2; }
.wf-w230 { width: 230px; }
.wf-w170 { width: 170px; }
.wf-val { color: var(--text); font-size: 13px; font-weight: 500; }
