/* Forja dos Mundos v4.3 — Fase 62: Ciel Workflow */
.ciel-workflow{width:min(1180px,96vw);max-height:94vh;padding:0;border:1px solid rgba(202,159,82,.55);border-radius:22px;background:#0c0b0f;color:#eee6d5;box-shadow:0 30px 90px rgba(0,0,0,.72)}.ciel-workflow::backdrop{background:rgba(4,4,8,.82);backdrop-filter:blur(8px)}.cwf-shell{display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;max-height:94vh;overflow:hidden}.cwf-header{display:flex;justify-content:space-between;gap:1rem;padding:18px 22px;border-bottom:1px solid rgba(202,159,82,.18);background:radial-gradient(circle at top left,rgba(132,91,191,.24),transparent 42%),linear-gradient(180deg,#17131f,#0e0c12)}.cwf-brand{display:flex;align-items:center;gap:14px}.cwf-brand>span{display:grid;place-items:center;width:48px;height:48px;border:1px solid #b89bff;border-radius:15px;background:linear-gradient(145deg,#5f3f91,#241a36);font-size:25px;color:#efe7ff;box-shadow:0 10px 26px rgba(94,60,145,.32)}.cwf-brand p,.cwf-card small,.cwf-section-head small,.cwf-detail>small,.cwf-step-list small,.cwf-run-card small,.cwf-form-dialog small{margin:0;color:#b9a8d4;font-size:.7rem;font-weight:800;letter-spacing:.1em}.cwf-brand h2{margin:2px 0 3px;font-size:1.55rem}.cwf-brand small{color:#a7a1ad}.cwf-close{width:40px;height:40px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:#18151e;color:#eee;font-size:24px;cursor:pointer}.cwf-overview{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:12px 20px;background:#100e14;border-bottom:1px solid rgba(255,255,255,.06)}.cwf-overview article{display:grid;gap:3px;padding:10px 12px;border:1px solid rgba(255,255,255,.07);border-radius:12px;background:rgba(255,255,255,.025)}.cwf-overview small{color:#98929f}.cwf-overview strong{font-size:1.18rem;color:#f2d695}.cwf-tabs{display:flex;gap:7px;padding:10px 20px;border-bottom:1px solid rgba(255,255,255,.06);background:#0e0c11;overflow:auto}.cwf-tabs button,.cwf-footer button,.cwf-card button,.cwf-detail button,.cwf-step-actions button,.cwf-run-actions button,.cwf-form-dialog button{min-height:38px;padding:0 13px;border:1px solid rgba(187,154,230,.3);border-radius:10px;background:#191522;color:#ddd3ea;font-weight:700;cursor:pointer}.cwf-tabs button.is-active,.cwf-footer button.is-primary,.cwf-card button.is-primary,.cwf-step-actions button.is-primary,.cwf-run-actions button.is-primary,.cwf-form-dialog button.is-primary{border-color:#bca1ff;background:linear-gradient(180deg,#7652ad,#4d3375);color:white}.cwf-main{min-height:0;overflow:auto;padding:18px}.cwf-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,.8fr);gap:16px}.cwf-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:11px}.cwf-section-head h3,.cwf-card h3,.cwf-detail h3,.cwf-run-detail h3,.cwf-form-dialog h3{margin:3px 0}.cwf-list,.cwf-run-list,.cwf-audit{display:grid;gap:10px}.cwf-card,.cwf-detail,.cwf-run-detail,.cwf-form-dialog form{border:1px solid rgba(255,255,255,.08);border-radius:16px;background:linear-gradient(160deg,rgba(255,255,255,.04),rgba(255,255,255,.015));padding:15px}.cwf-card.is-selected{border-color:#bca1ff;box-shadow:0 0 0 2px rgba(188,161,255,.08)}.cwf-card header,.cwf-run-detail>header{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.cwf-card p,.cwf-detail p,.cwf-run-detail p,.cwf-form-dialog p{color:#aaa3b1;line-height:1.5}.cwf-card footer,.cwf-run-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.cwf-card footer>span{margin-right:auto;color:#aa9dbb}.cwf-card header>span,.cwf-run-detail header>span,.cwf-run-card span{padding:5px 9px;border-radius:999px;background:#26202f;color:#c7bdd2;font-size:.74rem;font-weight:800}.cwf-card header>span.is-on,.cwf-run-detail .is-completed{background:rgba(63,158,104,.18);color:#8ee2b0}.cwf-card header>span.is-off,.cwf-run-detail .is-cancelled{background:rgba(158,83,83,.16);color:#e8a0a0}.cwf-detail{position:sticky;top:0;align-self:start}.cwf-trigger{display:flex;justify-content:space-between;padding:10px 0;border-top:1px solid rgba(255,255,255,.06);border-bottom:1px solid rgba(255,255,255,.06)}.cwf-detail ol{display:grid;gap:9px;padding-left:22px}.cwf-detail li{padding:8px 0}.cwf-detail li span,.cwf-detail li strong,.cwf-detail li small{display:block}.cwf-detail li span{color:#a991cc;font-size:.72rem}.cwf-detail li small{margin-top:3px;color:#81798a}.cwf-run-layout{display:grid;grid-template-columns:minmax(260px,.75fr) minmax(0,1.55fr);gap:16px}.cwf-run-card{display:flex;justify-content:space-between;gap:12px;padding:12px;border:1px solid rgba(255,255,255,.07);border-radius:13px;background:rgba(255,255,255,.025);cursor:pointer}.cwf-run-card.is-selected{border-color:#bca1ff;background:rgba(112,78,161,.14)}.cwf-run-card h3{margin:3px 0;font-size:.95rem}.cwf-run-card p{margin:0;color:#8f8798;font-size:.82rem}.cwf-run-card>div:last-child{display:grid;justify-items:end;align-content:start;gap:8px}.cwf-run-detail>header{padding-bottom:12px;border-bottom:1px solid rgba(255,255,255,.07)}.cwf-context{margin:13px 0;padding:12px;border:1px dashed rgba(188,161,255,.25);border-radius:12px;background:rgba(70,47,103,.11)}.cwf-context span{color:#bca1ff;font-size:.74rem;font-weight:800}.cwf-context code,.cwf-step-list code,.cwf-audit code{color:#9385a5;font-size:.72rem}.cwf-step-list{display:grid;gap:10px;margin:14px 0}.cwf-step-list article{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:11px;padding:12px;border:1px solid rgba(255,255,255,.07);border-radius:13px;background:#121017}.cwf-step-list article.is-completed{border-color:rgba(71,177,116,.34)}.cwf-step-list article.is-failed{border-color:rgba(218,91,91,.4)}.cwf-step-list article.is-waiting_user{border-color:rgba(224,171,77,.4)}.cwf-step-index{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:#2a2236;color:#d9c8ef;font-weight:900}.cwf-step-list h4{margin:2px 0 4px}.cwf-step-list p{margin:0;color:#97909e;font-size:.84rem}.cwf-step-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.cwf-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;border-top:1px solid rgba(255,255,255,.07);background:#0d0b10}.cwf-footer>span{color:#8f8797;font-size:.78rem}.cwf-footer>div{display:flex;gap:8px}.cwf-check{display:flex!important;align-items:center;gap:9px}.cwf-card label,.cwf-form-dialog label{display:grid;gap:6px;margin:10px 0;color:#c6bdcd;font-size:.84rem;font-weight:700}.cwf-card input,.cwf-card select,.cwf-card textarea,.cwf-form-dialog input,.cwf-form-dialog select,.cwf-form-dialog textarea{width:100%;box-sizing:border-box;min-height:42px;padding:9px 11px;border:1px solid rgba(188,161,255,.25);border-radius:10px;background:#0b0910;color:#eee}.cwf-card textarea,.cwf-form-dialog textarea{min-height:90px;resize:vertical}.cwf-card ul{padding-left:20px;color:#aaa3b1;line-height:1.7}.cwf-audit article{display:flex;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid rgba(255,255,255,.06);border-radius:11px;background:#111016}.cwf-audit article span{display:block;color:#837c8a;font-size:.75rem}.cwf-empty{padding:28px;text-align:center;color:#7f7885;border:1px dashed rgba(255,255,255,.09);border-radius:13px}.cwf-toast{position:fixed;right:24px;bottom:24px;max-width:420px;padding:12px 15px;border:1px solid #bca1ff;border-radius:12px;background:#21182f;color:white;opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s;z-index:99999}.cwf-toast.is-visible{opacity:1;transform:none}.cwf-form-dialog{width:min(580px,94vw);padding:0;border:1px solid rgba(188,161,255,.45);border-radius:18px;background:#0d0b11;color:#eee}.cwf-form-dialog::backdrop{background:rgba(0,0,0,.75)}.cwf-form-dialog form{border:0}.cwf-form-dialog header{display:flex;justify-content:space-between;gap:10px}.cwf-form-dialog footer{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.cwf-trigger{font-size:.62rem!important;line-height:1}.cwf-mobile{border-color:rgba(188,161,255,.38)!important}.cwf-run-detail .is-pending,.cwf-run-detail .is-ready{background:rgba(103,82,145,.2);color:#d2c0ef}.cwf-run-detail .is-paused,.cwf-run-detail .is-waiting_user{background:rgba(188,133,45,.18);color:#e9c780}.cwf-run-detail .is-failed{background:rgba(190,64,64,.18);color:#ef9c9c}
@media(max-width:860px){.cwf-overview{grid-template-columns:repeat(2,1fr)}.cwf-grid,.cwf-run-layout{grid-template-columns:1fr}.cwf-detail{position:static}.cwf-step-list article{grid-template-columns:34px minmax(0,1fr)}.cwf-step-actions{grid-column:2;justify-content:flex-start}.cwf-footer{align-items:flex-start;flex-direction:column}.cwf-footer>div{width:100%}.cwf-footer button{flex:1}}
@media(max-width:520px){.ciel-workflow{width:100vw;max-height:100dvh;height:100dvh;border-radius:0}.cwf-shell{max-height:100dvh}.cwf-header{padding:13px}.cwf-brand>span{width:40px;height:40px}.cwf-brand h2{font-size:1.2rem}.cwf-brand small{display:none}.cwf-overview,.cwf-tabs,.cwf-main,.cwf-footer{padding-left:12px;padding-right:12px}.cwf-card header,.cwf-run-detail>header{flex-direction:column}.cwf-step-actions{grid-column:1/-1}.cwf-toast{left:12px;right:12px;bottom:70px;max-width:none}}
