@keyframes msgIn{from{transform:scale(.7);opacity:0}to{transform:none;opacity:1}}
@keyframes msgOut{to{transform:scale(.88);opacity:0}}
@keyframes backIn{from{opacity:0}to{opacity:1}}
@keyframes shake{0%,100%{transform:none}15%{transform:translateX(-9px)}30%{transform:translateX(8px)}45%{transform:translateX(-6px)}60%{transform:translateX(5px)}75%{transform:translateX(-2px)}}
.bm-popup .msg-box{padding:30px 28px 22px;text-align:center}
.bm-popup .msg-head{display:flex;flex-direction:column;align-items:center;gap:16px;margin-bottom:8px}
.bm-popup .msg-ico{--c:var(--bm-popup-primary);--cs:var(--primary-soft);width:84px;height:84px;position:relative;color:var(--c);flex:none}
.bm-popup .msg-ico.t-good{--c:var(--good);--cs:var(--good-soft);background:none}
.bm-popup .msg-ico.t-bad{--c:var(--bad);--cs:var(--bad-soft);background:none}
.bm-popup .msg-ico.t-warn{--c:var(--warn);--cs:var(--warn-soft);background:none}
.bm-popup .msg-ico.t-info{--c:var(--bm-popup-primary);--cs:var(--primary-soft);background:none}
.bm-popup .msg-ico svg{width:100%;height:100%;display:block;overflow:visible}
.bm-popup .msg-ico .anel{fill:var(--cs);stroke:var(--c);stroke-width:3;stroke-dasharray:1;animation:mDraw .55s cubic-bezier(.4,.1,.3,1) .08s both}
.bm-popup .msg-ico .tr{fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1}
.bm-popup .msg-ico .tr.a{animation:mDraw .4s ease .5s both}
.bm-popup .msg-ico .tr.b{animation:mDraw .3s ease .72s both}
.bm-popup .msg-ico .glifo{fill:currentColor;font-family:var(--font);font-weight:800;font-size:44px;text-anchor:middle;transform-box:fill-box;transform-origin:center;animation:glifoIn .6s cubic-bezier(.34,1.7,.64,1) .45s both}
.bm-popup .msg-ico .glifo.gira{animation:glifoGira .7s cubic-bezier(.34,1.5,.64,1) .4s both}
.bm-popup .msg-ico .tr.fino{stroke-width:4}
.bm-popup .msg-ico .tampa{transform-box:view-box;transform-origin:28px 33px;animation:tampa .8s ease 1s both}
.bm-popup .msg-ico::after{content:"";position:absolute;inset:0;border-radius:50%;border:2px solid var(--c);opacity:0;animation:pulso 1.7s ease-out .7s 2}
@keyframes mDraw{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
@keyframes glifoIn{from{transform:translateY(-16px) scale(.5);opacity:0}to{transform:none;opacity:1}}
@keyframes glifoGira{from{transform:rotate(-100deg) scale(.3);opacity:0}to{transform:none;opacity:1}}
@keyframes tampa{0%{transform:none}35%{transform:rotate(-22deg) translateY(-2px)}55%{transform:rotate(7deg)}75%{transform:rotate(-8deg)}100%{transform:none}}
@keyframes pulso{0%{opacity:.5;transform:scale(1)}100%{opacity:0;transform:scale(1.55)}}
.bm-popup .msg-head h3{font-size:20px;font-weight:800;letter-spacing:-.015em;animation:subir .45s ease .3s both}
.bm-popup .msg-box p{color:var(--muted);font-size:14.5px;line-height:1.55;margin-bottom:22px;overflow-wrap:anywhere;animation:subir .45s ease .38s both}
.bm-popup .msg-box p b{color:var(--ink);font-weight:700}
.bm-popup .msg-foot{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;animation:subir .45s ease .46s both}
@keyframes subir{from{transform:translateY(8px);opacity:0}to{transform:none;opacity:1}}
.bm-popup .msg-foot .btn{min-width:124px;height:44px;border-radius:12px;font-weight:700;transition:transform .12s,box-shadow .15s,background .15s,border-color .15s}
.bm-popup .msg-foot .btn:hover{transform:translateY(-1px)}
.bm-popup .msg-foot .btn.danger{box-shadow:0 10px 22px -10px var(--bad)}
.bm-popup .msg-foot .btn.primary{box-shadow:0 10px 22px -10px var(--bm-popup-primary)}

/* Scoped dialog presentation. App colors remain the source of truth. */
dialog.bm-popup{--e-icone:8px;--e-acoes:8px;--e-campo:16px;--e-grupo:24px;--e-cartao:24px;--bm-popup-primary:var(--shop-primary,#6236cc);--primary-soft:color-mix(in srgb,var(--bm-popup-primary) 12%,transparent);--good:var(--bm-popup-primary);--bad:var(--bm-popup-primary);--warn:var(--bm-popup-primary);--good-soft:var(--primary-soft);--bad-soft:var(--primary-soft);--warn-soft:var(--primary-soft);box-sizing:border-box!important;width:min(520px,calc(100vw - 32px))!important;max-width:calc(100vw - 32px)!important;max-height:calc(100dvh - 32px)!important;overflow:auto!important;margin:auto!important;inset:0!important;padding:var(--e-cartao)!important;border:1px solid var(--border,#ded5ee)!important;border-radius:20px!important;background:var(--sf-card,var(--surface,#fff))!important;color:var(--sf-text,var(--ink,#302052))!important;white-space:normal!important;overflow-wrap:anywhere}
dialog.bm-popup[open]{animation:msgIn .35s cubic-bezier(.34,1.3,.64,1)}
dialog.bm-popup::backdrop{background:#13102099;backdrop-filter:blur(3px)}
dialog.bm-popup.bm-popup-form{width:min(760px,calc(100vw - 32px))!important}
dialog.bm-popup .msg-box{padding:0!important;display:flex;flex-direction:column;gap:var(--e-campo)}
dialog.bm-popup .msg-head{margin:0;gap:var(--e-campo)}
dialog.bm-popup .msg-head :is(h1,h2,h3){margin:0!important;line-height:1.3;max-width:100%;font-size:1.4rem}
dialog.bm-popup .msg-box p{margin:0!important;white-space:pre-line!important;max-width:100%;overflow-wrap:anywhere}
dialog.bm-popup .msg-foot{display:flex!important;gap:var(--e-campo)!important;align-items:stretch!important;justify-content:center!important;margin:0!important;flex-wrap:wrap}
dialog.bm-popup .msg-foot button{flex:1 1 120px!important;width:auto!important;min-width:0!important;min-height:46px!important;height:auto!important;margin:0!important;white-space:normal!important;line-height:1.4!important;padding:12px 16px!important}
dialog.bm-popup .msg-foot button:not(.secondary){background:var(--bm-popup-primary)!important;color:var(--shop-foreground,#fff)!important;border-color:var(--bm-popup-primary)!important}
dialog.bm-popup.bm-popup-form :is(input,select,textarea){max-width:100%;box-sizing:border-box;min-width:0}
dialog.bm-popup.bm-popup-form :is(.operation-detail-actions,.settings-confirm-actions){display:flex;gap:var(--e-campo);flex-wrap:wrap}
@media(prefers-reduced-motion:reduce){dialog.bm-popup,dialog.bm-popup *,dialog.bm-popup *::after{animation:none!important;transition:none!important}}
