/* Result popup + confirm dialog (2026-11-10): one design for the public site and the admin / reseller panels.
   Shown by app.js: [data-pop] flash messages become popups, form[data-confirm] asks in the dialog. Uses the page's own tokens. */
.cp-dlg-scrim { position: fixed; inset: 0; z-index: 180; background: rgba(5,5,6,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .22s; }
.cp-dlg-scrim.open { opacity: 1; pointer-events: auto; }
.cp-dlg { position: fixed; z-index: 181; left: 50%; top: 50%; width: min(400px, calc(100% - 32px)); padding: 24px 22px 20px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); color: var(--text);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.6); text-align: center; display: grid; gap: 14px; opacity: 0; pointer-events: none; transform: translate(-50%, -46%) scale(.96); transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .22s; }
.cp-dlg.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.cp-dlg-ic { width: 60px; height: 60px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); }
.cp-dlg-ic svg { width: 28px; height: 28px; }
.cp-dlg.danger .cp-dlg-ic { background: rgba(229,72,77,.12); color: #e5484d; }
.cp-dlg h4 { margin: 0; font: 700 19px/1.3 var(--font-d, var(--font)); text-wrap: balance; }
.cp-dlg p { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.55; text-wrap: balance; }
.cp-dlg p:empty { display: none; }
.cp-dlg-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.cp-dlg-acts button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: 700 15px/1.1 var(--font); cursor: pointer; transition: border-color .2s, background-color .2s, transform .2s; }
.cp-dlg-acts button:hover { border-color: var(--gold); background: var(--gold-soft); }
.cp-dlg-acts button:active { transform: scale(.97); }
.cp-dlg-acts button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.cp-dlg-acts .yes { background: linear-gradient(180deg,#f2da86,#d4af37 55%,#b8901f); border-color: transparent; color: #17130a; }
.cp-dlg-acts .yes:hover { background: linear-gradient(180deg,#f7e4a0,#e0bd4a 55%,#c49a26); }
.cp-dlg.danger .cp-dlg-acts .yes { background: #e5484d; border-color: #e5484d; color: #fff; box-shadow: 0 12px 26px -14px rgba(229,72,77,.8); }
.cp-dlg.danger .cp-dlg-acts .yes:hover { background: #d63e43; }

.cp-pop-scrim { position: fixed; inset: 0; z-index: 190; display: grid; place-items: center; padding: 20px; background: rgba(5,5,6,.42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: cpPopFade .3s ease both; }
.cp-pop-scrim.out { animation: cpPopFadeOut .32s ease forwards; }
@keyframes cpPopFade { from { opacity: 0; } }
@keyframes cpPopFadeOut { to { opacity: 0; } }
.cp-pop { --c: #d4af37; --glow: rgba(212,175,55,.32); position: relative; width: min(360px, 100%); padding: 30px 24px 26px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); color: var(--text);
  text-align: center; overflow: hidden; isolation: isolate; box-shadow: 0 50px 100px -40px rgba(0,0,0,.7); animation: cpPopIn .6s cubic-bezier(.2,1.35,.4,1) both; }
.cp-pop.del, .cp-pop.err { --c: #e5484d; --glow: rgba(229,72,77,.24); }
.cp-pop.save { --c: #2fbf7f; --glow: rgba(60,207,142,.24); }
.cp-pop-scrim.out .cp-pop { animation: cpPopOut .32s cubic-bezier(.5,0,.75,0) forwards; }
@keyframes cpPopIn { from { opacity: 0; transform: translateY(26px) scale(.82); } }
@keyframes cpPopOut { to { opacity: 0; transform: translateY(10px) scale(.92); } }
.cp-pop::before { content: ""; position: absolute; inset: -40% -20% auto; height: 70%; z-index: -1; background: radial-gradient(closest-side, var(--glow), transparent); animation: cpPopGlow 2.4s ease-in-out .3s both; }
@keyframes cpPopGlow { 0% { opacity: 0; transform: scale(.6); } 40% { opacity: 1; transform: scale(1.05); } 100% { opacity: .7; transform: scale(1); } }
.cp-pop-art { position: relative; width: 112px; height: 112px; margin: 0 auto 18px; }
.cp-pop-art .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.cp-pop-art .trk { fill: none; stroke: var(--line); stroke-width: 5; }
.cp-pop-art .arc { fill: none; stroke: var(--c); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 302; stroke-dashoffset: 302; animation: cpPopArc .7s cubic-bezier(.65,0,.35,1) .15s forwards; }
@keyframes cpPopArc { to { stroke-dashoffset: 0; } }
.cp-pop-core { position: absolute; inset: 14px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); animation: cpPopCore .5s cubic-bezier(.2,1.6,.4,1) .55s both; }
@keyframes cpPopCore { from { transform: scale(0); } }
.cp-pop-core svg { width: 44px; height: 44px; overflow: visible; }
.cp-pop-core .draw { fill: none; stroke: var(--c); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: cpPopDraw .45s ease-out .85s forwards; }
@keyframes cpPopDraw { to { stroke-dashoffset: 0; } }
.cp-pop-core .bin { fill: none; stroke: var(--c); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cp-pop-core .lid { transform-origin: 6px 7px; animation: cpPopLid .9s ease-in-out .7s both; }
@keyframes cpPopLid { 0% { transform: rotate(0); } 30%, 60% { transform: rotate(-28deg) translateY(-1px); } 100% { transform: rotate(0); } }
.cp-pop-fly { position: absolute; left: 50%; top: 50%; width: 30px; height: 22px; margin: -11px 0 0 -15px; border-radius: 5px; background: linear-gradient(180deg,#f2da86,#d4af37); box-shadow: 0 6px 14px -6px rgba(184,144,31,.9); opacity: 0; animation: cpPopFly .7s cubic-bezier(.3,0,.2,1) .1s both; }
.cp-pop-fly::before, .cp-pop-fly::after { content: ""; position: absolute; left: 5px; right: 5px; height: 2px; border-radius: 2px; background: rgba(23,19,10,.45); top: 6px; }
.cp-pop-fly::after { top: 12px; right: 11px; }
@keyframes cpPopFly { 0% { opacity: 0; transform: translate(-90px, -70px) rotate(-24deg) scale(.7); } 25% { opacity: 1; } 80% { opacity: 1; transform: translate(0, 0) rotate(0) scale(.9); } 100% { opacity: 0; transform: scale(.3); } }
.cp-pop-drop { position: absolute; left: 50%; top: 18px; width: 18px; height: 13px; margin-left: -9px; border-radius: 3px; background: var(--muted); opacity: 0; animation: cpPopDrop .7s cubic-bezier(.5,0,.8,.6) .85s both; }
@keyframes cpPopDrop { 0% { opacity: 0; transform: translateY(-14px) rotate(-14deg); } 25% { opacity: 1; } 85% { opacity: 1; transform: translateY(34px) rotate(8deg) scale(.7); } 100% { opacity: 0; transform: translateY(40px) scale(.4); } }
.cp-pop.err .cp-pop-art { animation: cpPopShake .5s ease 1.05s both; }
@keyframes cpPopShake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.cp-pop-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.cp-pop-burst i { position: absolute; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--c); opacity: 0; transform: rotate(var(--a)); animation: cpPopBurst .8s cubic-bezier(.1,.7,.3,1) .9s both; }
.cp-pop-burst i:nth-child(even) { width: 5px; height: 5px; background: #f2da86; }
@keyframes cpPopBurst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(-30px) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-78px) scale(.3); } }
.cp-pop h4 { margin: 0; font: 800 21px/1.25 var(--font-d, var(--font)); animation: cpPopUp .5s cubic-bezier(.2,.8,.2,1) .9s both; }
html[dir="rtl"] .cp-pop h4 { line-height: 1.45; }
.cp-pop p { margin: 8px 0 0; color: var(--text-2); font-size: 14.5px; line-height: 1.55; text-wrap: balance; overflow-wrap: anywhere; animation: cpPopUp .5s cubic-bezier(.2,.8,.2,1) 1s both; }
.cp-pop p:empty { display: none; }
@keyframes cpPopUp { from { opacity: 0; transform: translateY(10px); } }
.cp-pop-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--line); }
.cp-pop-bar i { display: block; height: 100%; background: var(--c); transform-origin: left; animation: cpPopBar var(--ms, 3800ms) linear both; }
html[dir="rtl"] .cp-pop-bar i { transform-origin: right; }
@keyframes cpPopBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.cp-pop-x { position: absolute; top: 12px; inset-inline-end: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.cp-pop-x svg { width: 16px; height: 16px; }
.cp-pop-x:hover { background: var(--surface-2); color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  .cp-pop, .cp-pop *, .cp-pop-scrim, .cp-pop::before { animation-duration: .01ms !important; animation-delay: 0s !important; }
  .cp-pop-bar i { animation-duration: var(--ms, 3800ms) !important; }
}
