/* Animações BACA (PR #87, aprovadas pelo gestor em 01/11/2026: M1, M2, M5, N1–N6).
   Extraído de lab/biblioteca-baca/biblioteca.css; cores da marca; movimento reduzido = estático. */
:root{--bl-petroleo:#103D40;--bl-verde:#45C168;--bl-laranja:#F24501;--bl-acao:#1B6751;--bl-tinta:#183D42;--bl-suave:#506970;--bl-linha:#D4E0DA;
 --baca-ui-radius-card:16px;--baca-ui-danger-fg:#963A31;--baca-ui-neutral-25:#F7FAF9;--baca-ui-neutral-100:#E3ECE8;--bl-font:Inter,Arial,sans-serif;
 --ms-inout:cubic-bezier(.65,0,.35,1);--ms-spring:cubic-bezier(.34,1.56,.64,1)}
/* ---------- Motion com ícones de serviço (PROPOSTA, pedido do gestor 28/10) ---------- */
:root{--ms-out:cubic-bezier(.16,1,.3,1);--ms-inout:cubic-bezier(.65,0,.35,1);--ms-spring:cubic-bezier(.34,1.56,.64,1)}
.ms-tile{display:block;width:48px;height:48px;border-radius:12px;object-fit:contain;filter:drop-shadow(0 4px 10px #082b2c33)}
.ms-demo{display:flex;flex-direction:column;gap:14px}
.ms-demo-stage{position:relative;display:grid;grid-template-columns:minmax(0,1fr);place-items:center;min-height:280px;border-radius:var(--baca-ui-radius-card);background:radial-gradient(120% 90% at 50% 0%,#1d5051 0%,var(--bl-petroleo) 60%,#0b2e31 100%);overflow:hidden;color:#fff}
.ms-demo-stage.is-light{background:var(--baca-ui-neutral-25);color:var(--bl-tinta);border:1px solid var(--bl-linha)}
.ms-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.ms-state{font-size:13px;color:var(--bl-suave);margin-left:auto}
.ms-uso{font-size:13px;color:var(--bl-suave)}
.ms-uso b{color:var(--bl-tinta)}

/* finalização */
.ms-finale{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
.ms-badge{display:grid;place-items:center;width:64px;height:64px;border-radius:50%;background:var(--bl-acao);box-shadow:0 8px 24px #1b675155}
.ms-badge svg{width:34px;height:30px;fill:none;stroke:#fff;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.ms-err .ms-badge{background:var(--baca-ui-danger-fg);box-shadow:0 8px 24px #963a3155}
.ms-err .ms-badge svg{width:30px;height:30px}
.ms-finale-text{font-weight:600;font-size:15px}
.ms-demo-stage:not(.is-light) .ms-ok .ms-badge,.bl-loader-box .ms-ok .ms-badge{background:var(--bl-verde);box-shadow:0 8px 28px #45c16855}
.ms-demo-stage:not(.is-light) .ms-ok .ms-badge svg{stroke:var(--bl-petroleo)}

/* M1 vitrine */
.ms-vitrine{display:flex;flex-direction:column;align-items:center;gap:10px}
.ms-vitrine-stage{position:relative;width:56px;height:56px}
.ms-vitrine-stage .ms-tile{position:absolute;inset:0;width:56px;height:56px}
.ms-vitrine-label{position:relative;height:20px;min-width:240px;text-align:center;font-size:14px;font-weight:600;color:#e4f3ef}
.ms-vitrine-label span{position:absolute;inset:0;white-space:nowrap}
.ms-vitrine.ms-sm{flex-direction:row;gap:12px}
.ms-vitrine.ms-sm .ms-vitrine-stage,.ms-vitrine.ms-sm .ms-vitrine-stage .ms-tile{width:40px;height:40px}
.ms-vitrine.ms-sm .ms-vitrine-label{min-width:0;width:260px;text-align:left;font-size:13px}
.ms-header-demo{display:flex;align-items:center;gap:16px;padding:12px 16px;border-radius:var(--baca-ui-radius-card);background:var(--bl-petroleo);color:#fff;flex-wrap:wrap}
.ms-header-demo img.logo{width:96px}
.ms-header-demo .ms-sep{width:1px;height:32px;background:#ffffff33}

/* M2 órbita */
.ms-orbita{--r:88px;position:relative;width:264px;height:264px}
.ms-ring{position:absolute;inset:20px;transition:rotate 760ms var(--ms-inout)}
.ms-orbit-slot{position:absolute;inset:0;pointer-events:none}
.ms-orbit-tile{position:absolute;top:0;left:50%;margin-left:-24px;transition:rotate 760ms var(--ms-inout),scale 360ms var(--ms-spring),opacity 300ms ease-out;opacity:.55}
.ms-orbit-tile.is-top{scale:1.32;opacity:1;filter:drop-shadow(0 8px 18px #45c16866)}
.ms-center{position:absolute;inset:72px 56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center}
.ms-center-text{font-size:13px;color:#d9ebe1}
.ms-center-name{font-size:14px;font-weight:600;line-height:1.25;color:#fff;max-width:140px}
.ms-orbita .ms-badge{width:56px;height:56px}
.ms-orbita .ms-finale-text{font-size:14px}
.ms-orbita.is-error .ms-orbit-tile{opacity:.25;filter:grayscale(1);scale:1}

/* M3 esteira */
.ms-esteira{position:relative;width:100%;overflow:hidden;padding-block:18px;-webkit-mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent);mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent)}
.ms-track{display:flex;gap:18px;width:max-content}
.ms-esteira .ms-tile{width:52px;height:52px;flex:none}
.ms-esteira-fin{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}
.ms-esteira.is-done .ms-track,.ms-esteira.is-error .ms-track{opacity:.18;transition:opacity 300ms ease-out}
.ms-esteira-wrap{width:100%;display:flex;flex-direction:column;align-items:center;gap:6px}

/* M4 mosaico */
.ms-mosaico{position:relative;display:grid;place-items:center;min-height:240px;width:100%}
.ms-grid{display:grid;grid-template-columns:repeat(var(--cols,4),48px);gap:14px}
.ms-mosaico-fin{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}
.ms-mosaico.is-error .ms-grid{opacity:.2;filter:grayscale(1)}

/* M5 etapas */
.ms-etapas{width:min(100%,640px);display:flex;flex-direction:column;gap:14px;position:relative}
.ms-steps-bar{height:6px;border-radius:999px;background:var(--baca-ui-neutral-100);overflow:hidden}
.ms-steps-bar i{display:block;height:100%;width:0;background:var(--bl-acao);border-radius:inherit}
.ms-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.ms-step{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;font-size:12px;color:var(--bl-suave)}
.ms-step .ms-tile{width:44px;height:44px;opacity:.35;filter:grayscale(1);transition:opacity 300ms ease-out,filter 300ms ease-out}
.ms-step.is-current .ms-tile,.ms-step.is-done .ms-tile{opacity:1;filter:drop-shadow(0 4px 10px #082b2c33)}
.ms-step.is-current{color:var(--bl-tinta);font-weight:600}
.ms-step.is-done{color:var(--bl-tinta)}
.ms-step.is-error .ms-tile{filter:grayscale(1);opacity:.5}
.ms-step-check{position:absolute;top:-6px;right:calc(50% - 30px);width:22px;height:22px;border-radius:50%;background:var(--bl-acao);display:grid;place-items:center;scale:0;transition:scale 280ms var(--ms-spring)}
.ms-step-check svg{width:14px;height:12px;fill:none;stroke:#fff;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.ms-step.is-done .ms-step-check{scale:1}
.ms-steps-caption{font-size:14px;color:var(--bl-tinta);min-height:20px;text-align:center}
.ms-etapas-fin{display:flex;justify-content:center}
.ms-etapas .ms-finale-text{color:var(--bl-tinta)}
@media(max-width:560px){.ms-steps{grid-template-columns:repeat(5,minmax(0,1fr))}.ms-step-name{display:none}}

/* comparação antes/depois do motion */
.ms-before{display:flex;align-items:center;gap:16px;flex-wrap:wrap}

@media(prefers-reduced-motion:reduce){.ms-ring,.ms-orbit-tile,.ms-step .ms-tile,.ms-step-check,.ms-esteira .ms-track{transition:none!important}}
.bl-reduce .ms-ring,.bl-reduce .ms-orbit-tile,.bl-reduce .ms-step .ms-tile,.bl-reduce .ms-step-check,.bl-reduce .ms-esteira .ms-track{transition:none!important}
.bl-reduce .ms-esteira .ms-track,.ms-reduced-static .ms-track{flex-wrap:wrap;width:auto;justify-content:center}
.ms-esteira-fin .ms-finale{flex-direction:row;gap:12px}
.ms-esteira-fin .ms-badge{width:48px;height:48px}
.ms-esteira-fin .ms-badge svg{width:26px;height:22px}
.ms-header-demo{max-width:100%;min-width:0}
.ms-vitrine-label{min-width:min(240px,70vw)}
@media(max-width:560px){.ms-header-demo .ms-sep{display:none}.ms-header-demo img.logo{width:72px}.ms-vitrine.ms-sm .ms-vitrine-label{width:min(190px,48vw)}}

/* ---------- Motion do ramo de controle de pragas N1–N6 (PROPOSTA, pedido do gestor 28/10) ---------- */
.mp-fin{display:flex;justify-content:center;min-height:0}
.mp-fin-below{margin-top:10px}
.mp-caption{margin:8px 0 0;font-size:13px;text-align:center;color:inherit;opacity:.9}
.ms-demo-stage .mp-nevoa,.ms-demo-stage .mp-trilha,.ms-demo-stage .mp-radar,.ms-demo-stage .mp-rota,.ms-demo-stage .mp-proveta,.ms-demo-stage .mp-selo{display:flex;flex-direction:column;align-items:center;width:100%;padding-block:14px}
/* N1 névoa */
.mp-canvas-wrap{position:relative;width:min(100%,320px);aspect-ratio:320/200}
.mp-canvas-wrap canvas,.mp-overlay{position:absolute;inset:0;width:100%;height:100%}
.mp-nevoa .mp-fin{position:absolute;inset:0;align-items:center;pointer-events:none}
.mp-nevoa{position:relative}
/* N2 trilha */
.mp-trilha svg{width:min(100%,320px);height:auto;overflow:visible}
.mp-trail{fill:none;stroke:var(--baca-ui-neutral-200);stroke-width:1.5;stroke-dasharray:2 6;stroke-linecap:round}
.mp-check{fill:none;stroke:var(--bl-acao);stroke-width:6;stroke-linecap:round;stroke-linejoin:round}
.mp-ant ellipse,.mp-ant circle{fill:var(--bl-petroleo)}
.mp-ant-legs{fill:none;stroke:var(--bl-petroleo);stroke-width:.8;stroke-linecap:round}
.mp-trilha.is-error .mp-trail{stroke:var(--baca-ui-danger-fg);opacity:.35}
/* N3 radar */
.mp-radar-box{position:relative;width:240px;height:240px;max-width:100%}
.mp-radar-box svg{position:absolute;inset:0;width:100%;height:100%}
.mp-plan{fill:none;stroke:#ffffff40;stroke-width:1.5;stroke-linejoin:round}
.mp-ring{fill:none;stroke:#45c16833;stroke-width:1}
.mp-cross{stroke:#45c16826;stroke-width:1}
.mp-sweep{position:absolute;inset:16px;border-radius:50%;background:conic-gradient(from 0deg,transparent 0deg 290deg,#45c16808 290deg,#45c16866 359deg,#45c168cc 360deg);pointer-events:none}
.mp-pt .mp-dot{fill:#ffffff40;transition:fill 300ms ease-out}
.mp-pt .mp-ping{fill:none;stroke:var(--bl-verde);stroke-width:1.5;opacity:0;transform-box:fill-box;transform-origin:center}
.mp-pt.lit .mp-dot{fill:var(--bl-verde)}
.mp-pt.is-hit.lit .mp-dot{fill:var(--bl-laranja)}
.mp-pt.is-hit .mp-ping{stroke:var(--bl-laranja)}
.mp-radar.is-error .mp-sweep{opacity:.2}
.mp-radar .mp-caption{color:#e4f3ef}
/* N4 rota */
.mp-rota svg{width:min(100%,340px);height:auto}
.mp-street{stroke:var(--baca-ui-neutral-100);stroke-width:6}
.mp-route{fill:none;stroke:#1b675133;stroke-width:5;stroke-linecap:round}
.mp-route-flow{fill:none;stroke:var(--bl-acao);stroke-width:2.5;stroke-linecap:round;stroke-dasharray:2 9;animation:mp-flow 900ms linear infinite}
@keyframes mp-flow{to{stroke-dashoffset:-11}}
.mp-stop-bg{fill:#fff;stroke:var(--bl-borda-controle);stroke-width:2;transform-box:fill-box;transform-origin:center;transition:fill 300ms ease-out,stroke 300ms ease-out}
.mp-stop-t{font:700 12px var(--bl-font);fill:var(--bl-tinta)}
.mp-stop.on .mp-stop-bg{fill:var(--baca-ui-baca-green-100);stroke:var(--bl-acao)}
.mp-stop.ok .mp-stop-bg{fill:var(--bl-acao);stroke:var(--bl-acao)}
.mp-stop.ok .mp-stop-t{fill:#fff}
.mp-stop.is-base .mp-stop-bg{fill:var(--bl-petroleo);stroke:var(--bl-petroleo)}
.mp-stop.is-base .mp-stop-t{fill:#fff}
.mp-van-bg{fill:var(--bl-laranja);filter:drop-shadow(0 3px 6px #f2450155)}
.mp-van-ico{fill:none;stroke:#fff;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.mp-rota.is-error .mp-route-flow{animation:none;stroke:var(--baca-ui-danger-fg);opacity:.5}
/* N5 proveta */
.mp-proveta-row>svg{display:block;width:220px;height:250px;flex:none;overflow:visible}
.mp-glass{fill:none;stroke:var(--bl-tinta);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.mp-tick{stroke:var(--bl-tinta);stroke-width:1.4}
.mp-tick-t{font:400 12px var(--bl-font);fill:var(--bl-suave)}
.mp-liquid{fill:#45c168b3}
.mp-wave{fill:#45c168b3}
.mp-drop{fill:var(--bl-verde)}
.mp-proveta.is-error .mp-liquid,.mp-proveta.is-error .mp-wave{fill:#963a3166}
.mp-proveta .mp-caption{color:var(--bl-tinta)}
/* N6 selo */
.mp-selo svg{width:220px;max-width:100%;height:auto;overflow:visible}
.mp-selo-ring{transform-box:view-box;transform-origin:110px 110px}
.mp-selo-outer{fill:none;stroke:#45c16866;stroke-width:1.5}
.mp-selo-t{font:600 12px var(--bl-font);letter-spacing:.06em;fill:#e4f3ef}
.mp-selo-inner{fill:#ffffff0d;stroke:var(--bl-verde);stroke-width:2;stroke-dasharray:3 5}
.mp-burst{fill:none;stroke:var(--bl-verde);stroke-width:3;opacity:0}
.mp-shield{fill:none;stroke:var(--bl-verde);stroke-width:2.6;stroke-linejoin:round}
.mp-shield-check{fill:none;stroke:var(--bl-verde);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:40;stroke-dashoffset:40}
.mp-selo.is-done .mp-selo-inner{stroke-dasharray:none}
.mp-selo.is-done .mp-shield{fill:#45c16826}
.mp-selo.is-done .mp-shield-check{stroke-dashoffset:0}
.mp-selo .mp-caption{color:#fff;font-weight:600;font-size:15px}
.mp-selo.is-error .mp-selo-t{opacity:.35}
@media(prefers-reduced-motion:reduce){.mp-route-flow{animation:none}}
.bl-reduce .mp-route-flow{animation:none}
.mp-strong{font-weight:600;font-size:15px;color:var(--bl-tinta);opacity:1}
.mp-proveta-row{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap}
.mp-fin-side{min-width:0}
.mp-fin-side:empty{display:none}

/* ---------- Integração no sistema (gestor 01/11/2026) ---------- */
.bm-overlay{position:fixed;inset:0;z-index:9000;display:grid;place-items:center;background:rgba(8,43,44,.38);padding:16px}
.bm-overlay.bm-corner{inset:auto 16px 48px auto;background:none;padding:0;pointer-events:none}
.bm-card{width:min(360px,92vw);min-height:0;padding:22px 16px;border-radius:20px;display:flex;flex-direction:column;align-items:center;gap:8px;box-shadow:0 18px 48px #082b2c55}
.bm-corner .bm-card{width:min(300px,80vw);padding:10px 12px;border-radius:14px}
.bm-host{display:flex;justify-content:center;width:100%}
.bm-label{margin:0;font:600 14px/1.4 var(--bl-font);color:#e4f3ef;text-align:center}
.bm-embed{margin:12px 0;padding:14px 10px;border-radius:16px;min-height:0;display:flex;flex-direction:column;align-items:center;gap:6px}
.bm-vitrine{margin:-4px -4px 16px;padding:18px 12px;border-radius:14px;min-height:0;display:flex;justify-content:center}
.bm-mosaico{padding:22px 12px;border-radius:18px;min-height:0;display:flex;flex-direction:column;align-items:center;gap:10px;width:min(420px,92vw);margin:40px auto}
.bm-overlay .ms-orbita{transform:scale(.86)}
.bm-overlay svg,.bm-embed svg{max-width:100%}
@media(prefers-reduced-motion:reduce){.bm-overlay *,.bm-embed *,.bm-vitrine *{transition:none!important}}
.is-light .bm-label{color:var(--bl-tinta)}
.bm-card.is-light,.bm-embed.is-light,.bm-mosaico.is-light{background:#F7FAF9;color:var(--bl-tinta)}
/* Sistema publicado: sem faixas de laboratório (gestor 01/11/2026). */
.baca-real #ux05-lab{display:none!important}
