#page-workflow { --ws-ink:var(--text,#0c2946); --ws-muted:var(--sub,#526476); --ws-line:var(--line,#d8dfe1); }
.ws-titlebar,.ws-editor-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.ws-titlebar { margin-block-end:16px; }
.ws-titlebar .sec-title { margin-block-end:4px; }
.ws-titlebar .sec-desc,.ws-muted { margin:0; color:var(--sub,#526476); line-height:1.55; }
.ws-tabs { display:flex; width:max-content; max-width:100%; margin-block-end:16px; }
.ws-registry,.ws-editor { border:1px solid var(--ws-line); border-radius:var(--radius,12px); background:var(--panel,#fff); }
.ws-overview { display:flex; align-items:center; flex-wrap:wrap; gap:12px 22px; padding:14px 18px; border-block-end:1px solid var(--ws-line); color:var(--ws-muted); font-size:13px; }
.ws-overview b { color:var(--ws-ink); font-size:18px; font-weight:680; font-variant-numeric:tabular-nums; margin-inline-end:3px; }
.ws-overview .btn { margin-inline-start:auto; }
.ws-filters,.ws-metadata { display:grid; align-items:end; gap:10px; padding:15px 18px; }
.ws-filters { grid-template-columns:minmax(160px,1.5fr) minmax(100px,.7fr) minmax(120px,.8fr) auto; }
.ws-metadata { grid-template-columns:minmax(0,1.6fr) minmax(0,1fr) minmax(0,.8fr); border-block-end:1px solid var(--ws-line); }
.ws-field { min-width:0; display:block; margin:0; color:inherit; }
.ws-field > span { display:block; font-size:12px; font-weight:650; margin-block-end:5px; }
.ws-field input,.ws-field select,.ws-field textarea { min-width:0; width:100%; }
.ws-field textarea { min-height:72px; resize:vertical; line-height:1.55; }
.ws-table-wrap { overflow:auto; }
.ws-table { table-layout:auto; width:100%; }
.ws-table td:last-child { width:1%; }
.ws-table small,.ws-version small,.ws-step small,.ws-run small,.ws-trace small { display:block; margin-block-start:3px; color:var(--sub,#526476); font-size:11px; line-height:1.45; overflow-wrap:anywhere; }
.ws-table td,.ws-row-actions { white-space:nowrap; }
.ws-row-actions { display:flex; align-items:center; gap:5px; }
.ws-table .ws-name { display:block; width:max-content; max-width:460px; height:auto; padding:0; border:none; border-radius:2px; background:none; box-shadow:none; color:var(--brand,#174264); text-align:start; white-space:normal; overflow-wrap:anywhere; }
.ws-table .ws-name:hover { background:none; color:var(--brand-2,#295476); text-decoration:underline; }
.ws-table .ws-error-count { color:#a63838; }
.ws-state { display:inline-block; padding:4px 8px; border-radius:99px; background:#eef1f3; color:#4c6074; font-weight:640; font-size:11px; line-height:1.2; white-space:nowrap; }
.ws-state[data-state="on"] { color:#155f50; background:#e4f4ed; }
.ws-state[data-state="draft"] { color:#77510d; background:#faf0d7; }
.ws-empty { display:grid; justify-items:start; gap:8px; padding:30px 18px; }
.ws-empty strong { color:var(--text,#0c2946); font-size:15px; font-weight:680; }
.ws-empty p { color:var(--sub,#526476); margin:0; line-height:1.55; }
.ws-editor-head { padding:16px 18px 11px; align-items:flex-end; }
.ws-editor-head h3 { margin:7px 0 4px; color:var(--ws-ink); font-size:21px; line-height:1.2; overflow-wrap:anywhere; }
.ws-header-actions { display:flex; flex-wrap:wrap; gap:7px; }
.ws-breadcrumb .btn { padding-inline:0; border:0; background:none; box-shadow:none; }
.ws-editor-grid { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(220px,.9fr); align-items:stretch; }
.ws-flow,.ws-inspector { min-width:0; padding:16px; }
.ws-flow { background:var(--panel-2,#f8f9f8); border-inline-end:1px solid var(--ws-line); }
.ws-flow header { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-block-end:12px; }
.ws-flow header h3,.ws-inspector h3 { font-size:15px; margin:0; }
.ws-flow header span { color:var(--ws-muted); font-size:12px; }
.ws-inspector { align-content:start; display:grid; gap:12px; }
.ws-inspector .ws-empty { padding:18px 0; }
.ws-flow .ws-canvas-header { align-items:center; }
.ws-canvas-tools { display:flex; align-items:center; gap:5px; }
.ws-canvas-tools output { min-width:3.4em; text-align:center; color:var(--ws-muted); font-size:12px; font-variant-numeric:tabular-nums; }
.ws-canvas-view {
  height:clamp(360px,63vh,740px); overflow:auto; border:1px solid var(--ws-line); border-radius:9px;
  background:radial-gradient(circle at 1px 1px,#b5cdc9 1px,transparent 1.5px) 0 0 / 17px 17px #eff5f4;
  cursor:grab;
}
.ws-canvas-view.is-panning { cursor:grabbing; user-select:none; }
.ws-canvas-stage { display:grid; justify-items:center; width:max-content; min-width:100%; min-height:100%; padding:30px; box-sizing:border-box; }
.ws-canvas-graph { position:relative; width:max-content; height:max-content; }
.ws-canvas-links { position:absolute; inset:0; z-index:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.ws-canvas-links path { fill:none; stroke:#718b8b; stroke-width:1.5; }
.ws-canvas-links path[data-route="then"] { stroke:#357c68; }
.ws-canvas-links path[data-route="else"] { stroke:#9a7240; }
.ws-canvas-lane { display:flex; flex-direction:column; align-items:center; min-width:230px; }
.ws-canvas-graph > .ws-canvas-lane { position:relative; z-index:1; }
.ws-canvas-card { position:relative; width:230px; margin:0; cursor:default; }
.ws-canvas-card .ws-step-row { min-height:71px; }
.ws-canvas-card [draggable="true"] { cursor:grab; }
.ws-canvas-grip { align-self:center; color:#628580; padding:0 2px; font:700 17px/1 system-ui,sans-serif; }
.ws-canvas-category { display:block; color:var(--ws-muted); font-size:10px; font-weight:650; line-height:1.15; }
.ws-canvas-port {
  position:absolute; z-index:2; inset-inline-start:50%; translate:-50% 0; display:block; width:8px; height:8px;
  border:1px solid #5e827e; border-radius:50%; background:#fff;
}
.ws-canvas-in { inset-block-start:-4px; }
.ws-canvas-out { inset-block-end:-4px; }
.ws-canvas-join { position:relative; min-height:20px; width:100%; }
.ws-canvas-join .ws-canvas-port { inset-block-start:0; }
.ws-canvas-join small {
  display:block; width:max-content; max-width:90px; margin-inline:calc(50% + 10px) 0;
  color:#456b65; font-size:10px; line-height:14px;
}
.btn.ws-canvas-socket {
  display:grid; place-items:center; width:24px; height:24px; padding:0; margin:14px 0; border:1px solid #8caeaa;
  border-radius:50%; background:#fdfefe; color:#245950; font:650 17px/1 system-ui,sans-serif; cursor:pointer;
}
.btn.ws-canvas-socket:hover,.btn.ws-canvas-socket:focus-visible { border-color:#296e61; background:#e1f1ed; color:#113d35; }
.btn.ws-canvas-socket[aria-expanded="true"] { outline:2px solid #448e81; background:#bce4dc; }
.ws-canvas-lane > .ws-canvas-socket:only-child { margin:26px 0; }
.ws-canvas-view.is-dragging .ws-canvas-socket { outline:1px dashed #6a918b; outline-offset:3px; }
.ws-canvas-view.is-dragging .ws-canvas-socket.is-drop-target { outline:2px solid #1c7765; background:#bae6dc; }
.ws-canvas-branches,.ws-canvas-trigger-group { display:flex; align-items:flex-start; gap:34px; }
.ws-canvas-branches { padding-block-start:18px; }
.ws-canvas-branches > section { min-width:0; }
.ws-canvas-branches h4 {
  position:relative; z-index:1; width:fit-content; margin:0 auto; padding:3px 7px; border-radius:5px;
  color:#224f44; background:#e6f0eb; font-size:11px; font-weight:650;
}
.ws-canvas-branches [data-route="else"] > h4 { color:#6d4b1b; background:#f5eddd; }
.ws-step-row { display:flex; align-items:center; gap:6px; padding:6px 8px 6px 5px; border:1px solid var(--ws-line); border-radius:9px; background:var(--panel,#fff); }
.ws-step-row.is-current { border-color:var(--brand-2,#295476); box-shadow:0 0 0 1px var(--brand-2,#295476); }
.ws-step-select { display:flex; flex:1; align-items:center; gap:10px; min-width:0; padding:3px; text-align:start; background:none; color:var(--ws-ink); border:0; font:inherit; line-height:1.35; cursor:pointer; }
.ws-step-select strong { display:block; color:inherit; font-size:13px; font-weight:680; overflow-wrap:anywhere; }
.ws-step-icon { display:grid; place-items:center; flex:none; width:26px; height:26px; border-radius:7px; background:#eaf0f5; color:#214762; font-size:16px; font-weight:700; }
.ws-step[data-type="trigger"] > .ws-step-row .ws-step-icon { background:#f8ebca; color:#79520e; }
.ws-step[data-type="branch"] > .ws-step-row .ws-step-icon { background:#e2f0ed; color:#205c57; }
.ws-step[data-type="delay"] > .ws-step-row .ws-step-icon { background:#f3ead7; color:#745420; }
.ws-step-tools { display:flex; flex:none; gap:2px; }
.ws-step-tools .btn { display:grid; place-items:center; min-width:23px; min-height:26px; padding:0 3px; }
.ws-step-tools .btn:disabled { opacity:.35; }
.ws-condition { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:10px; border:1px solid var(--line,#d8dfe1); border-radius:8px; background:#f8faf9; }
.ws-condition [name="value"],.ws-condition .ws-field:has([name="value"]) { grid-column:1 / -1; }
.ws-time-range,.ws-duration { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.ws-time-range,.ws-time-range > p,.ws-schedule-timing { grid-column:1 / -1; }
.ws-condition button { justify-self:start; }
.ws-notice { margin:0 18px 8px; padding:8px 10px; border:1px solid #e8c0bc; border-radius:8px; color:#923631; background:#fcf0ef; overflow-wrap:anywhere; }
.ws-modal-content .ws-notice { margin:12px 0 0; }
.ws-notice[hidden] { display:none; }
.ws-template-grid,.ws-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.ws-template { min-height:82px; padding:12px; border:1px solid var(--line,#d8dfe1); border-radius:8px; background:var(--panel-2,#f8f9f8); text-align:start; cursor:pointer; font:inherit; color:var(--text,#0c2946); }
.ws-template:hover { border-color:var(--brand,#174264); }
.ws-template strong,.ws-template span { display:block; }
.ws-template span { margin-block-start:6px; color:var(--sub,#526476); font-size:12px; line-height:1.5; }
.ws-form-grid { margin-block-start:12px; }
.ws-form-grid .ws-field:has(textarea) { grid-column:1 / -1; }
.ws-version-list,.ws-trace { display:grid; gap:8px; }
.ws-version,.ws-run,.ws-trace li { border:1px solid var(--line,#d8dfe1); border-radius:8px; padding:10px; }
.ws-version,.ws-run summary,.ws-trace li { display:flex; align-items:start; justify-content:space-between; gap:10px; }
.ws-run summary { cursor:pointer; }
.ws-run summary span,.ws-trace li > span { text-align:end; color:var(--sub,#526476); }
.ws-trace { list-style:none; padding:0; margin:10px 0; }
.ws-result { margin-block-start:13px; padding:12px; border:1px solid var(--line,#d8dfe1); border-radius:8px; background:var(--panel-2,#f8f9f8); }
.ws-result h3,.ws-result h4 { margin:0 0 8px; }
.ws-result-actions { padding-inline-start:20px; margin:8px 0; line-height:1.65; overflow-wrap:anywhere; }
.ws-node-menu { display:grid; gap:14px; }
.ws-inspector-library { min-width:0; }
.ws-inspector-library > header { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-bottom:9px; border-bottom:1px solid var(--ws-line); }
.ws-inspector-library .ws-node-menu { max-height:clamp(350px,59vh,700px); overflow:auto; padding:12px 3px 4px 1px; }
.ws-node-menu h4 { margin:0 0 7px; color:var(--text,#0c2946); font-size:12px; }
.ws-node-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.btn.ws-node-choice {
  display:block;
  min-width:0;
  min-height:59px;
  padding:8px 10px;
  border:1px solid var(--line,#d8dfe1);
  border-radius:8px;
  color:var(--text,#0c2946);
  background:var(--panel,#fff);
  text-align:start;
  white-space:normal;
}
.btn.ws-node-choice:hover { border-color:var(--brand-2,#295476); background:var(--panel-2,#f8f9f8); }
.ws-node-choice strong,.ws-node-choice span { display:block; }
.ws-node-choice span { margin-top:3px; color:var(--sub,#526476); font-size:11px; font-weight:400; line-height:1.5; }
.ws-modal-copy { color:var(--text,#0c2946); line-height:1.6; }
.ws-attachments { display:grid; gap:8px; min-width:0; padding:12px; border:1px solid var(--ws-line); border-radius:8px; background:var(--panel-2,#f8f9f8); }
.ws-attachment-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.ws-attachment-head h4 { margin:0; color:var(--ws-ink); font-size:14px; }
.ws-attachment-head span,.ws-attachment-info small { display:block; margin-block-start:2px; color:var(--ws-muted); font-size:11px; font-variant-numeric:tabular-nums; }
.ws-attachments > .ws-muted { font-size:12px; }
.ws-attachment-list { display:grid; gap:6px; margin:0; padding:0; list-style:none; }
.ws-attachment-list > li { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; padding:8px; border:1px solid var(--ws-line); border-radius:6px; background:var(--panel,#fff); }
.ws-attachment-info { display:flex; align-items:center; gap:8px; min-width:0; }
.ws-attachment-info > div { min-width:0; }
.ws-attachment-info strong { display:block; color:var(--ws-ink); font-size:12px; font-weight:650; overflow-wrap:anywhere; }
.ws-attachment-type { flex:none; border-radius:4px; padding:4px 5px; background:var(--panel-2,#f8f9f8); color:var(--ws-muted); font-size:11px; }
.ws-attachment-tools { display:flex; gap:4px; }
.ws-attachment-feedback { margin:0; color:var(--ws-muted); overflow-wrap:anywhere; }
.ws-attachment-feedback[data-error="true"] { color:var(--red,#a63838); }
.ws-attachment-dialog { inset:0; margin:auto; max-width:min(760px,calc(100% - 24px)); max-height:calc(100% - 24px); padding:12px; border:1px solid var(--line,#d8dfe1); border-radius:var(--radius,12px); background:var(--panel,#fff); color:var(--text,#0c2946); }
.ws-attachment-dialog::backdrop { background:rgb(8 31 53 / 65%); }
.ws-attachment-dialog header { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-block-end:8px; }
.ws-attachment-dialog h3 { margin:0; font-size:14px; overflow-wrap:anywhere; }
.ws-attachment-dialog img,.ws-attachment-dialog video { display:block; max-width:100%; max-height:calc(100dvh - 92px); margin-inline:auto; object-fit:contain; }
@media(max-width:800px) {
  .ws-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ws-editor-grid { grid-template-columns:minmax(0,1fr); }
  .ws-flow { border-inline-end:0; border-block-end:1px solid var(--ws-line); }
}
@media(max-width:530px) {
  .ws-filters,.ws-metadata,.ws-overview,.ws-editor-head { padding-inline:11px; }
  .ws-metadata,.ws-template-grid,.ws-node-choices { grid-template-columns:minmax(0,1fr); }
  .ws-flow,.ws-inspector { padding:11px; }
  .ws-filters .ws-field:first-child { grid-column:1 / -1; }
  .ws-overview { gap:8px 12px; }
  .ws-step-tools .btn { min-height:31px; min-width:25px; }
  .ws-attachment-head .btn,.ws-attachment-tools .btn { min-height:40px; }
}
