
/* Biblioteca de fluxos: desenhos para consulta (v15). */
.flowHero{background:linear-gradient(110deg,#fff,#eff7ff)}.flowHero h2{font-size:25px}.flowHeroPills{display:flex;gap:7px;flex-wrap:wrap}.flowHeroPills span{font-size:10.5px}
.flowVisualHeader{display:flex;align-items:flex-start;justify-content:space-between;gap:13px;flex-wrap:wrap;margin:8px 0}.flowVisualHeader h3{color:#244363;font-size:17px;margin:0}.flowVisualHeader p{font-size:12px;color:#6f8297;line-height:1.6;margin:6px 0 0}.flowVisualStats{font-size:11px;font-weight:800;color:#6280a0;white-space:nowrap}
.flowGraphScroll{overflow:auto;overscroll-behavior-x:contain;border:1px solid #dce7f1;background-color:#f8fbfe;background-image:radial-gradient(#d5e4f2 1px,transparent 1px);background-size:19px 19px;border-radius:13px;max-width:100%;margin-top:8px;box-shadow:inset 0 3px 8px #143c5e07}
.flowGraphCanvas{position:relative;margin:0 auto;flex-shrink:0}.flowGraphSvg{position:absolute;inset:0;pointer-events:none}.flowGraphLink{fill:none;stroke:#7894ac;stroke-width:2;stroke-linecap:round;opacity:.93}.flowEdgeTagBg{fill:#fff;stroke:#d8e5ef;stroke-width:1}.flowEdgeTagText{font-size:11px;fill:#466985;font-weight:850;dominant-baseline:middle;text-anchor:middle;paint-order:stroke}
.flowDiagramNode{position:absolute;display:flex;align-items:flex-start;flex-direction:column;gap:5px;text-align:left;overflow:hidden;width:238px;height:137px;background:#fff;padding:12px 15px;border:1.5px solid #bdd4e8;border-radius:13px;box-shadow:0 5px 15px #1a507d14;color:#253c52;transition:transform .12s,border-color .12s,box-shadow .12s}
.flowDiagramNode:hover,.flowDiagramNode:focus-visible{outline:none;transform:translateY(-2px);border-color:#468cc5;box-shadow:0 8px 23px #25567d29}.flowDiagramNode.is-start{border-radius:50px;background:#ecf5ff;border-color:#90b6dc}.flowDiagramNode.is-start .flowNodeEyebrow{margin-left:3px}.flowDiagramNode.is-decision{border-color:#e7b767;background:#fff9ed}.flowDiagramNode.is-vosso{background:#edf7ff;border-color:#81b6e0}.flowDiagramNode.is-end{background:#e9f8ef;border-color:#8ccca7}.flowDiagramNode.is-review{background:#fff5f4;border-color:#e9aea9}
.flowNodeEyebrow{display:flex;align-items:center;gap:6px;color:#63809a;font-size:9px;letter-spacing:.65px;font-weight:900}.flowNodeIcon{width:20px;height:20px;border-radius:6px;background:#e5eff8;color:#306b99;display:grid;place-items:center;font-size:13px}.is-decision .flowNodeIcon{background:#f9e2b4;color:#93600b}.is-vosso .flowNodeIcon{background:#c9e4fb}.is-end .flowNodeIcon{background:#b9e9d0;color:#27694e}.is-review .flowNodeIcon{background:#fcdad7;color:#af4a42}
.flowDiagramNode>strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;line-height:1.22}.flowNodeBrief{font-size:10.5px;color:#687f93;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.flowNodeSector{font-size:9.5px;font-weight:800;color:#285f8b;background:#e0eefc;padding:3px 7px;border-radius:5px;margin-top:auto;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.flowExplainCard{margin-top:15px;border:1px solid #dbe8f4;background:#f7fbff;border-radius:11px;padding:16px;color:#304d69;line-height:1.6}.flowExplainHead{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.flowExplainCard strong{display:block;font-size:15px;margin-bottom:5px}.flowExplainCard p{font-size:12px;margin:7px 0}.flowExplainCard small{display:block;color:#6c849b;font-size:10px;margin-top:9px}.flowNodeKindTag{font-size:10px;color:#4176a3;font-weight:900;letter-spacing:.8px}.flowExplainCard .flowVossoHint{border-left:3px solid #5a9acb;padding:8px 11px;background:#e5f1fa}
.flowModelNotice{font-size:11px;line-height:1.6;color:#61788e;margin-top:14px;background:#f4f8fb;border-radius:8px;padding:10px 13px}.flowVisualFoot{margin-top:12px;color:#7b90a5;font-size:11px}
.flowEditorSectionTitle{display:flex;align-items:center;justify-content:space-between;gap:11px;flex-wrap:wrap;margin:24px 0 11px;padding-bottom:9px;border-bottom:1px solid #e6edf4}.flowEditorSectionTitle h3{margin:0;color:#2b5474;font-size:15px}.flowEditorSectionTitle p{font-size:11px;margin:5px 0 0;max-width:560px}.flowNodeEdit{border:1px solid #deebf4;background:#fafdff;padding:14px;border-radius:11px;margin:9px 0}.flowNodeEdit .field textarea{min-height:70px}.flowEdgeEdit{border:1px solid #e1e9f1;background:#fff;display:grid;grid-template-columns:52px 1fr 1fr 120px 62px;gap:9px;align-items:end;padding:12px;border-radius:10px;margin:9px 0}.flowEdgeEdit>.field{margin:0}.flowEdgeEdit>strong{font-size:11px;color:#5b7388;align-self:center}.flowEdgeEdit>.btn{padding:8px}.flowModelPreview{margin-top:12px;max-width:100%}.flowModelPreview .flowDiagramNode{pointer-events:none}.flowModelPreview .flowGraphScroll{max-height:590px}
.flowCatalogItem .flowCatalogFoot .flowMiniIcon{color:#3e84b8;font-weight:900;margin-right:5px}
@media(max-width:760px){.flowEdgeEdit{grid-template-columns:repeat(2,minmax(0,1fr))}.flowEdgeEdit>strong{grid-column:1/-1}.flowGraphScroll{border-radius:8px}.flowDiagramNode{box-shadow:0 3px 9px #16467414}.flowVisualHeader h3{font-size:15px}}
@media(max-width:420px){.flowEditorSectionTitle .btn{width:100%}}
/* O cabeçalho permanece escuro para garantir contraste dos textos claros. */
.flowHero{background:linear-gradient(123deg,#153b63,#256095);color:#fff}
.flowHero h2{color:#fff}.flowHero .muted{color:#dbe9f5}
@media(max-width:760px){.flowCatalogList{display:flex;gap:9px;max-height:none;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;padding-bottom:10px}.flowCatalogItem{min-width:215px;max-width:250px;flex:0 0 215px}.flowCatalog{position:static}}
@media(max-width:780px){.flowLayout{grid-template-columns:minmax(0,1fr);min-width:0;max-width:100%}.flowCatalog,.flowWorkspace,.flowWorkspace>.panel,.flowCatalogList{min-width:0;max-width:100%}.flowCatalog{overflow:hidden}.flowCatalogList{width:100%}}

/* Fluxos: somente catálogo e fluxograma, sem simulador guiado. */
#view-flows .flowSimpleHero{margin-bottom:12px;padding:15px 19px}
#view-flows .flowSimpleHero h2{font-size:21px;margin:0 0 4px}
#view-flows .flowSimpleHero p{font-size:12px;margin:0;line-height:1.5}
#view-flows .flowSimpleLayout{grid-template-columns:minmax(220px,260px) minmax(0,1fr);gap:12px}
#view-flows .flowCatalog{padding:15px}
#view-flows .flowCatalog>h3{font-size:14px;margin:0 0 8px}
#view-flows .flowCatalog .field{margin:8px 0}
#view-flows .flowCompactSearch input{width:100%}
#view-flows .flowCompactStatus>span{display:block;font-size:11px;color:#647d93;margin-bottom:4px}
#view-flows .flowCatalogList{gap:6px;margin-top:12px}
#view-flows .flowCatalogItem{padding:10px 12px;gap:5px;border-radius:9px}
#view-flows .flowCatalogItem strong{font-size:12px}
#view-flows .flowCatalogTop small{font-size:9px}
#view-flows .flowWorkspace>.panel{padding:17px 19px}
#view-flows .flowDetailHead{gap:9px;margin-bottom:8px}
#view-flows .flowDetailHead h2{font-size:19px;margin:6px 0 3px}
#view-flows .flowDetailHead p{font-size:12px}
#view-flows .flowValidationWarning{font-size:11px;padding:9px 11px;margin:10px 0}
#view-flows .flowVisualHeader{display:flex;align-items:baseline;justify-content:flex-start;gap:10px;flex-wrap:wrap;margin:11px 0 7px}
#view-flows .flowVisualHeader h3{font-size:14px}
#view-flows .flowVisualHeader p{font-size:11px;margin:0}
#view-flows .flowGraphScroll{margin-top:5px}
#view-flows .flowExplainCard{margin-top:10px;padding:12px 14px}
#view-flows .flowCompactReferences{margin:12px 0 0;border-top:1px solid #e4ecf3;padding:11px 0 0}
#view-flows .flowCompactReferences summary{font-size:11px;font-weight:750;color:#496f8b;cursor:pointer;list-style:revert}
#view-flows .flowCompactReferences p{font-size:11px;color:#647b90;line-height:1.6;white-space:pre-wrap;margin:7px 0 0}
#view-flows .flowCompactNotice{margin:11px 0 0;font-size:10.5px;color:#778da0;line-height:1.5}
#view-flows .flowRelated{margin:11px 0}
#view-flows .flowEmpty{padding:40px 16px}
@media(max-width:850px){#view-flows .flowSimpleLayout{grid-template-columns:minmax(0,1fr)}#view-flows .flowCatalog{position:static}#view-flows .flowCatalogList{max-height:none;display:flex;overflow-x:auto;overflow-y:hidden;padding-bottom:6px}#view-flows .flowCatalogItem{flex:0 0 200px;min-width:200px;max-width:230px}#view-flows .flowWorkspace>.panel{padding:15px}}
@media(max-width:550px){#view-flows .flowSimpleHero{padding:13px 15px}#view-flows .flowSimpleHero h2{font-size:19px}#view-flows .flowDetailHead{display:flex;flex-wrap:wrap}#view-flows .flowVisualHeader{display:block}#view-flows .flowVisualHeader p{margin-top:4px}}

/* Editor livre dos fluxos: blocos arrastáveis e linhas editáveis. */
.drawer.drawerWide:has(#flowModelForm){width:min(1400px,98vw);padding:20px 22px}
.flowFreeHeader h2{font-size:21px;color:#214665;margin:4px 0 5px}
.flowFreeHeader p{font-size:12px;line-height:1.55;color:#607d95;margin:0 0 12px}
.flowFreeForm{display:grid;gap:12px}
.flowFreeName{max-width:650px;margin:0}
.flowFreeToolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 12px;background:#f5f9fd;border:1px solid #dce8f1;border-radius:11px}
.flowFreeToolbar .btn{font-size:12px;padding:9px 12px}
.flowFreeToolbar .flowToolActive{background:#245d89;color:#fff;border-color:#245d89}
.flowFreeHint{color:#607f98;font-size:11px;line-height:1.4;margin-left:5px;flex:1 1 240px}
.flowFreeWorkspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(235px,285px);align-items:start;gap:13px;min-width:0}
.flowFreeStage{min-width:0}
.flowFreeStage .flowGraphScroll{height:min(64vh,690px);max-height:none;min-height:435px;margin:0;border-radius:11px;overscroll-behavior:contain;background-color:#f9fcff}
.flowFreeStage .flowGraphCanvas{margin:0}
.flowFreeStage .flowDiagramNode{cursor:grab;touch-action:none;user-select:none;overflow:visible}
.flowFreeStage .flowDraggableNode:hover,.flowFreeStage .flowDraggableNode:focus-visible{z-index:2}
.flowFreeStage .flowDraggableNode[aria-pressed="true"]{border-color:#2979b4;box-shadow:0 0 0 3px #2979b42e,0 5px 16px #204f7615}
.flowFreeStage .flowDraggableNode.is-dragging{cursor:grabbing;transition:none;transform:none!important;z-index:4;box-shadow:0 8px 25px #265b8738}
.flowFreeStage .flowDraggableNode.is-linking{outline:3px solid #2a8fa4;outline-offset:4px}
.flowFreeStage .flowDraggableNode.is-connect-target{outline:3px dashed #2c9784;outline-offset:3px}
.flowNodePort{position:absolute;right:-12px;top:calc(50% - 17px);width:32px;height:34px;display:grid;place-items:center;background:#277f9d;border:3px solid #fff;box-shadow:0 2px 8px #2252722c;color:white;border-radius:50%;font-size:18px;cursor:crosshair;z-index:2;touch-action:none}
.flowNodePort:hover,.flowNodePort:focus-visible{background:#135c82;outline:2px solid #acd6ef}
.flowGraphSvg.is-editable{pointer-events:auto}
.flowGraphHit{fill:none;stroke:transparent;stroke-width:20;pointer-events:stroke;cursor:pointer}
.flowGraphEdge[role="button"]{cursor:pointer}
.flowGraphEdge.is-selected .flowGraphLink,.flowGraphEdge:hover .flowGraphLink{stroke:#267cae;stroke-width:3.5}
.flowGraphEdge.is-selected .flowEdgeTagBg{fill:#e2f3fe;stroke:#5da7d5}
.flowGraphEdge[role="button"]:focus-visible{outline:none}
.flowGraphEdge:focus-visible .flowGraphLink{stroke:#1e70a3;stroke-width:4}
.flowGraphEdge .flowEdgeTagBg,.flowGraphEdge .flowEdgeTagText{cursor:move;pointer-events:all}
.flowLinkDraft{fill:none;stroke:#208f9e;stroke-width:3;stroke-dasharray:8 5;pointer-events:none}
.flowFreeInspector{position:sticky;top:0;border:1px solid #dce8f1;background:white;border-radius:11px;padding:14px;min-width:0;max-height:calc(64vh + 1px);overflow-y:auto}
.flowFreeInspector .field{display:grid;gap:5px;margin:11px 0 0;font-size:12px}
.flowFreeInspector input,.flowFreeInspector textarea,.flowFreeInspector select{width:100%;min-width:0;font-size:12px}
.flowFreeInspector textarea{resize:vertical;line-height:1.55}
.flowFreeInspectorHead{display:flex;align-items:center;justify-content:space-between;gap:9px;flex-wrap:wrap;margin-bottom:12px}
.flowFreeInspectorHead strong{font-size:13px;color:#245574}
.flowFreeDelete{background:transparent;color:#a94b4b;font-size:11px;font-weight:700;padding:5px 0}
.flowFreeDelete:hover,.flowFreeDelete:focus-visible{text-decoration:underline}
.flowFreeInspectorNote,.flowFreeInspectorEmpty p{font-size:11px;line-height:1.55;color:#7891a5;margin:14px 0 0}
.flowFreeInspectorEmpty strong{font-size:13px;color:#365d7a}
.flowFreeSettings{margin:0;padding:12px;border:1px solid #deebf4;background:#fafdff;border-radius:10px}
.flowFreeSettings>summary{font-size:12px;font-weight:800;color:#33658a;cursor:pointer}
.flowFreeSettings[open]>summary{margin-bottom:11px}
.flowFreeSettings .field{margin:8px 0}
.flowFreeSettings .field input,.flowFreeSettings .field textarea,.flowFreeSettings .field select{font-size:12px}
.flowFreeBottom{position:sticky;bottom:-1px;background:#fff;border-top:1px solid #e2ebf3;padding:11px 1px 3px;display:flex;gap:11px;align-items:center;justify-content:space-between;z-index:6;flex-wrap:wrap}
.flowFreeBottom small{font-size:10px;color:#758ca0;line-height:1.5}
.flowFreeBottom .inlineButtons{display:flex;gap:8px;flex-wrap:wrap}
.flowFreeBottom .btn{font-size:12px}
@media(max-width:950px){.flowFreeWorkspace{grid-template-columns:1fr}.flowFreeStage .flowGraphScroll{height:52vh;min-height:320px}.flowFreeInspector{position:static;max-height:none}.drawer.drawerWide:has(#flowModelForm){padding:17px}}
@media(max-width:530px){.flowFreeToolbar .btn{flex:1 1 auto}.flowFreeHint{flex-basis:100%;margin:2px 0 0}.flowFreeStage .flowGraphScroll{min-height:280px}.flowFreeBottom .inlineButtons{width:100%}.flowFreeBottom .btn{flex:1}}

/* Mantém a altura ampla apesar do limite legado do preview antigo. */
#flowModelPreview .flowGraphScroll{max-height:none;height:min(64vh,690px);min-height:435px}
@media(max-width:950px){#flowModelPreview .flowGraphScroll{height:52vh;min-height:320px}}
@media(max-width:530px){#flowModelPreview .flowGraphScroll{min-height:280px}}
