/* Workflow is a bounded sheet: only its content scrolls, never its controls. */
.workflow-dialog{width:min(760px,calc(100vw - 32px));max-width:760px;max-height:calc(100dvh - 32px);margin:auto;padding:0;overflow:hidden;border:1px solid #dce4e8;border-radius:16px;color:var(--ink,#17313b);box-shadow:0 24px 80px #142b3b33;outline:none}
.workflow-dialog[open]{display:flex;flex-direction:column}
.workflow-dialog::backdrop{background:#152d3d88}
.workflow-dialog>.dialog-heading{flex:none;align-items:flex-start;gap:16px;padding:20px 24px 16px;margin:0;border-bottom:1px solid #e5ebef;background:white}
.workflow-dialog .dialog-heading>div{min-width:0}
.workflow-dialog .dialog-heading h2{font-size:22px;line-height:1.25;margin:0;overflow-wrap:anywhere}
.workflow-dialog .dialog-heading .eyebrow{margin-bottom:6px;line-height:1.5}
.workflow-dialog .icon-button{flex:none;width:44px;height:44px;margin:0;display:grid;place-items:center;line-height:1;background:#f7f9fa}
.workflow-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:20px 24px}
.workflow-loading{padding:24px;overflow:auto}
.workflow-dialog section{margin-top:20px;padding-top:18px;border-top:1px solid #dce4e8}
.workflow-dialog section h3{font-size:18px;line-height:1.35;margin:0 0 12px}
.workflow-dialog select,.workflow-dialog textarea,.workflow-dialog input:not([type=checkbox]){width:100%;box-sizing:border-box;font-size:16px}
.workflow-dialog textarea{min-height:80px;line-height:1.5}
.workflow-stage-line{display:flex;align-items:center;gap:16px}
.workflow-stage-line label{flex:none;margin:0;font-size:14px;font-weight:600}
.workflow-stage-line select{flex:1;min-width:0;width:auto}
.workflow-stage-description{margin:10px 0 0;color:#637580;font-size:14px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
.workflow-dialog .button{min-height:44px;padding:10px 14px;font-size:14px;line-height:1.3;border-radius:8px}
.workflow-actions .quiet{min-height:44px;padding:10px 12px;line-height:1.3;font-size:14px;border-radius:8px}
.workflow-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.workflow-dialog>footer{flex:none;display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:14px 24px;margin:0;border-top:1px solid #e5ebef;background:white}
.workflow-dialog .workflow-saved:disabled{opacity:1;background:#e5f3e9;color:#28603b;border:1px solid #c4e0cc;cursor:default}
.workflow-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid #edf0f2}
.workflow-row>div:first-child{flex:1;min-width:0}.workflow-row small{display:block;color:#637580;margin-top:5px}.workflow-row p{margin:6px 0;overflow-wrap:anywhere}
.workflow-active-pane{background:#eef8f0;border:1px solid #d2e8d6!important;border-radius:12px;padding:16px!important}
.workflow-active-row{padding:12px 0}
.workflow-active-row+.workflow-active-row{border-top:1px solid #d2e8d6}
.workflow-badge-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.workflow-badge-heading>.workflow-actions{flex:none;align-items:center}
.workflow-chip{display:inline-flex;align-items:center;gap:5px;width:fit-content;background:#fff0cb;color:#785200;border:1px solid #eed99b;border-radius:20px;padding:5px 10px;margin:3px 5px 3px 0;font-size:13px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
.workflow-chip.info{background:#e8f0f7;border-color:#c7d8e5;color:#365773}
.workflow-badge-heading>.workflow-chip{margin:0;background:white;border-color:#bdd8c3;color:#254b32}
.workflow-remove{border-color:#e0b6b2;color:#a22218;background:#fff}
.workflow-remove span{color:#b42318;font-size:20px;line-height:1}
.workflow-remove:hover{background:#fff2f1;filter:none}
.workflow-resolve:hover{background:#e0f1e5;filter:none}
.workflow-pill-list{display:flex;flex-wrap:wrap;gap:8px;margin:0}
.workflow-add-pill{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:44px;margin:0;padding:8px 12px;cursor:pointer;background:#fff;border-color:#ccd7dc;color:#264853;font:inherit;font-size:14px}
.workflow-add-pill:hover{background:#e4f2e8;border-color:#7ab78c}
.workflow-other-badges{margin-top:8px}
.workflow-other-badges summary{cursor:pointer;font-weight:600;font-size:14px;line-height:1.5;min-height:44px;padding:11px 0}
.workflow-other-badges .workflow-pill-list{padding:4px 0}
.workflow-action-form{background:#fff;border:1px solid #d2e8d6;padding:14px;border-radius:8px;margin-top:12px}
.workflow-action-form h4{font-size:14px;line-height:1.4;margin:0 0 10px}
.workflow-action-form .workflow-actions{margin-top:10px}
.workflow-active-row textarea{background:white;min-height:72px}
.workflow-dialog .workflow-active-pane .help{margin:8px 0}
.workflow-warning{background:#fff4d8;border:1px solid #e7cd85;padding:16px;border-radius:10px;margin:20px 0 16px;font-size:14px;line-height:1.5}
.workflow-warning>strong{display:block}
.workflow-warning p{font-size:14px;margin:4px 0 8px;overflow-wrap:anywhere}
.workflow-warning label{display:flex;align-items:flex-start;gap:10px;min-height:44px;padding:10px 0;margin:0;font-size:14px;line-height:1.5;cursor:pointer}
.workflow-warning input[type=checkbox]{flex:none;width:20px;height:20px;min-height:20px;padding:0;margin:1px 0 0;accent-color:var(--teal)}
.workflow-warning label span{min-width:0}
.workflow-content>.error-text:empty,.workflow-action-form>.error-text:empty{display:none}
.workflow-dialog [hidden]{display:none!important}
.workflow-chip:focus-visible,.workflow-add-pill:focus-visible{outline:3px solid #167b91;outline-offset:2px}
.workflow-quick-resolutions{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 12px}
.workflow-quick-resolutions .button{background:#fff;color:#28603b;border-color:#9dcaaa;white-space:normal;text-align:left}
.workflow-summary{margin-bottom:18px}.workflow-summary .button{margin-top:10px}.intake-wizard .workflow-summary{display:none}
#workflow-yaml{font:14px/1.5 ui-monospace,monospace;min-height:320px;white-space:pre;overflow:auto}
.stage-help-button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:4px;border:0;border-radius:50%;background:transparent;color:#365773;font:inherit;font-size:21px;cursor:pointer;vertical-align:middle}
.stage-help-button:hover{background:#e8f0f7}.stage-help-button:focus-visible{outline:3px solid #365773;outline-offset:2px}.stage-help-dialog{width:min(520px,92vw)}#stage-help-description{white-space:pre-wrap;overflow-wrap:anywhere}.stage-help-heading{display:flex;align-items:center;gap:8px}
@media(max-width:520px){
 .workflow-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:12px}
 .workflow-dialog>.dialog-heading{padding:16px;gap:10px}.workflow-dialog .dialog-heading h2{font-size:20px}
 .workflow-content{padding:16px}.workflow-dialog>footer{padding:12px 16px}
 .workflow-stage-line{gap:10px}.workflow-stage-line label{max-width:115px}.workflow-stage-line select{padding:10px}
 .workflow-active-pane{padding:12px!important}.workflow-badge-heading{gap:8px}.workflow-badge-heading>.workflow-chip{max-width:100%}.workflow-badge-heading>.workflow-actions{width:100%;justify-content:flex-end}
 .workflow-pill-list{gap:6px}.workflow-add-pill{padding:8px 10px}
}
