/* AI V4 HACK — Premium Motion & Visual Polish Layer v1.0
   Performance-first: transform/opacity motion, pointer-aware effects, reduced-motion fallback. */
:root{
  --pm-ease:cubic-bezier(.22,.9,.24,1);
  --pm-spring:cubic-bezier(.18,1.22,.35,1);
  --pm-border:rgba(168,181,255,.15);
  --pm-glow:rgba(91,111,255,.15);
  --pm-mint:rgba(73,236,209,.12);
}
html{scroll-behavior:smooth;color-scheme:dark}
body{background-attachment:fixed}
body::before{
  content:"";position:fixed;inset:0;z-index:-3;pointer-events:none;opacity:.17;
  background-image:linear-gradient(rgba(129,146,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(129,146,255,.04) 1px,transparent 1px);
  background-size:54px 54px;
  -webkit-mask-image:radial-gradient(circle at 50% 34%,#000 0 26%,transparent 76%);
  mask-image:radial-gradient(circle at 50% 34%,#000 0 26%,transparent 76%);
  animation:pmGridDrift 28s linear infinite;
}
@keyframes pmGridDrift{to{background-position:54px 54px,54px 54px}}

/* staged entry */
.pm-reveal{opacity:0;transform:translate3d(0,14px,0) scale(.992);transition:opacity .52s var(--pm-ease),transform .72s var(--pm-ease);transition-delay:var(--pm-delay,0ms);will-change:opacity,transform}
.pm-reveal.pm-visible{opacity:1;transform:translate3d(0,0,0) scale(1)}
.pm-pop{animation:pmPop .5s var(--pm-spring) both}
@keyframes pmPop{0%{opacity:0;transform:translateY(8px) scale(.97)}100%{opacity:1;transform:none}}

/* premium glass edge + pointer spotlight */
.pm-card{position:relative;isolation:isolate;transition:border-color .32s ease,box-shadow .38s var(--pm-ease),transform .38s var(--pm-ease),background-color .32s ease}
.pm-card::before{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:-1;opacity:0;
  background:radial-gradient(430px circle at var(--pm-spot-x,50%) var(--pm-spot-y,50%),rgba(143,168,255,.12),rgba(68,227,210,.035) 34%,transparent 68%);
  transition:opacity .32s ease;
}
.pm-card:hover{border-color:rgba(158,170,255,.24);box-shadow:0 26px 75px rgba(0,0,0,.34),0 0 0 1px rgba(119,106,255,.05),0 0 44px rgba(75,102,255,.055)}
.pm-card:hover::before{opacity:1}

/* tactile controls */
.pm-magnetic{--pm-tx:0px;--pm-ty:0px;translate:var(--pm-tx) var(--pm-ty);transition:translate .22s var(--pm-ease),transform .28s var(--pm-ease),filter .25s ease,box-shadow .28s ease}
.pm-magnetic:active{transform:translateY(1px) scale(.985)!important}
.pm-ripple-host{position:relative!important;overflow:hidden!important;isolation:isolate}
.pm-ripple-wave{position:absolute;z-index:0;border-radius:999px;pointer-events:none;width:12px;height:12px;background:rgba(255,255,255,.24);transform:translate(-50%,-50%) scale(0);animation:pmRipple .62s ease-out forwards}
@keyframes pmRipple{65%{opacity:.22}100%{opacity:0;transform:translate(-50%,-50%) scale(18)}}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid rgba(104,224,219,.68);outline-offset:3px}

/* shared inputs */
input,select,textarea{transition:border-color .24s ease,box-shadow .28s ease,background-color .28s ease,transform .25s var(--pm-ease)}
input:focus,select:focus,textarea:focus{transform:translateY(-1px)}

/* landing page */
body.pm-home .glass{border-color:rgba(165,177,255,.13)}
body.pm-home .hero-left .grad{background-size:220% 100%;animation:pmTextFlow 7s ease-in-out infinite alternate}
@keyframes pmTextFlow{0%{background-position:0 50%}100%{background-position:100% 50%}}
body.pm-home .eyebrow{box-shadow:0 0 0 1px rgba(91,226,205,.035),0 10px 40px rgba(31,122,137,.05)}
body.pm-home .proof span{transition:transform .3s var(--pm-ease),color .3s ease}
body.pm-home .proof span:hover{transform:translateY(-2px);color:#eef3ff}
body.pm-home .trust-item{transition:transform .34s var(--pm-ease),background .3s ease}
body.pm-home .trust-item:hover{transform:translateY(-4px);background:rgba(255,255,255,.025)}
body.pm-home .feature-icon,body.pm-home .trust-icon{transition:transform .5s var(--pm-spring),box-shadow .35s ease}
body.pm-home .feature:hover .feature-icon,body.pm-home .trust-item:hover .trust-icon{transform:translateY(-3px) rotate(-4deg) scale(1.06);box-shadow:0 14px 34px rgba(74,106,255,.14)}
body.pm-home .signal-row{position:relative;overflow:hidden}
body.pm-home .signal-row::after{content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 28%,rgba(255,255,255,.045),transparent 62%);transform:translateX(-120%);transition:transform .8s var(--pm-ease);pointer-events:none}
body.pm-home .signal-row:hover::after{transform:translateX(120%)}
body.pm-home .auth-card{box-shadow:0 35px 110px rgba(0,0,0,.42),0 0 75px rgba(95,76,255,.08)}
body.pm-home .tabs .tab.active{background-size:180% 180%;animation:pmActiveGlow 5s ease-in-out infinite alternate}
@keyframes pmActiveGlow{to{background-position:100% 50%;filter:brightness(1.08)}}

/* dashboard */
body.pm-dashboard .sidebar{box-shadow:24px 0 70px rgba(0,0,0,.24)}
body.pm-dashboard .topbar{box-shadow:0 14px 45px rgba(0,0,0,.18);backdrop-filter:blur(25px) saturate(150%);-webkit-backdrop-filter:blur(25px) saturate(150%)}
body.pm-dashboard .nav-item{transition:transform .28s var(--pm-ease),background .28s ease,color .28s ease,box-shadow .3s ease}
body.pm-dashboard .nav-item.active{background-size:180% 180%;animation:pmNavFlow 7s ease-in-out infinite alternate}
@keyframes pmNavFlow{to{background-position:100% 50%}}
body.pm-dashboard .nav-item .ni{transition:transform .38s var(--pm-spring),background .3s ease,color .3s ease}
body.pm-dashboard .nav-item:hover .ni{transform:scale(1.08) rotate(-4deg)}
body.pm-dashboard .hero-panel h2 span{background-size:220% 100%;animation:pmTextFlow 6.5s ease-in-out infinite alternate}
body.pm-dashboard .panel{box-shadow:inset 0 1px 0 rgba(255,255,255,.065),0 26px 78px rgba(0,0,0,.31)}
body.pm-dashboard .mini-stats>div,body.pm-dashboard .profile-grid>div,body.pm-dashboard .metric{transition:transform .3s var(--pm-ease),border-color .28s ease,background .28s ease}
body.pm-dashboard .mini-stats>div:hover,body.pm-dashboard .profile-grid>div:hover,body.pm-dashboard .metric:hover{transform:translateY(-4px);border-color:rgba(116,224,214,.18);background:rgba(255,255,255,.04)}
body.pm-dashboard .market-switch{box-shadow:inset 0 1px rgba(255,255,255,.04),0 12px 36px rgba(0,0,0,.12)}
body.pm-dashboard .market-switch button.active{background-size:180% 180%;animation:pmNavFlow 6s ease-in-out infinite alternate}
body.pm-dashboard .primary{background-size:180% 180%;animation:pmPrimaryFlow 8s ease-in-out infinite alternate}
@keyframes pmPrimaryFlow{to{background-position:100% 50%}}
body.pm-dashboard .status-pill i{animation-duration:2.25s}
body.pm-dashboard .modal-backdrop.show{animation:pmBackdrop .25s ease both}
body.pm-dashboard .modal-backdrop.show .modal{animation:pmModal .46s var(--pm-spring) both}
@keyframes pmBackdrop{from{opacity:0}to{opacity:1}}
@keyframes pmModal{from{opacity:0;transform:translateY(18px) scale(.965)}to{opacity:1;transform:none}}
body.pm-dashboard .toast{animation:pmToast .45s var(--pm-spring) both}
@keyframes pmToast{from{opacity:0;transform:translateX(20px) scale(.97)}to{opacity:1;transform:none}}
body.pm-dashboard .fx-select.open .fx-select-menu{transform-origin:top center;animation:pmMenu .32s var(--pm-spring) both}
@keyframes pmMenu{from{opacity:0;transform:translateY(-5px) scale(.985)}to{opacity:1;transform:none}}

/* admin */
body.pm-admin .bg1{animation:pmAdminOrbA 15s ease-in-out infinite alternate}
body.pm-admin .bg2{animation:pmAdminOrbB 18s ease-in-out infinite alternate}
@keyframes pmAdminOrbA{to{transform:translate3d(80px,55px,0) scale(1.08)}}
@keyframes pmAdminOrbB{to{transform:translate3d(-70px,-45px,0) scale(.94)}}
body.pm-admin .side{box-shadow:20px 0 65px rgba(0,0,0,.22)}
body.pm-admin .nav{transition:transform .28s var(--pm-ease),background .3s ease,color .3s ease,box-shadow .3s ease}
body.pm-admin .nav:hover{transform:translateX(4px)}
body.pm-admin .nav.active{background:linear-gradient(100deg,rgba(132,101,255,.19),rgba(60,207,199,.07));box-shadow:inset 0 0 0 1px rgba(145,112,255,.18),0 10px 28px rgba(76,56,169,.08)}
body.pm-admin .stat{overflow:hidden;position:relative}
body.pm-admin .stat b{font-variant-numeric:tabular-nums;background:linear-gradient(100deg,#fff,#bfc9ff 55%,#7ff1d7);-webkit-background-clip:text;background-clip:text;color:transparent}
body.pm-admin .stat::after{content:"";position:absolute;width:90px;height:90px;right:-38px;bottom:-45px;border-radius:50%;background:radial-gradient(circle,rgba(114,85,255,.14),transparent 70%);pointer-events:none;transition:transform .45s var(--pm-ease)}
body.pm-admin .stat:hover::after{transform:scale(1.5)}
body.pm-admin .panel{box-shadow:0 28px 78px rgba(0,0,0,.27),inset 0 1px rgba(255,255,255,.04)}
body.pm-admin tbody tr{transition:background .22s ease,transform .25s var(--pm-ease)}
body.pm-admin tbody tr:hover{background:rgba(98,113,255,.045)}
body.pm-admin .modal-backdrop.show{animation:pmBackdrop .24s ease both}
body.pm-admin .modal-backdrop.show .modal{animation:pmModal .42s var(--pm-spring) both}
body.pm-admin .toast{animation:pmToast .42s var(--pm-spring) both}
body.pm-admin .manage:hover,body.pm-admin .ghost:hover{transform:translateY(-2px);filter:brightness(1.08)}
body.pm-admin .primary{background-size:180% 180%;animation:pmPrimaryFlow 8s ease-in-out infinite alternate}
body.pm-admin .admin-badge i{animation:pmSoftPulse 2.1s ease-in-out infinite}
@keyframes pmSoftPulse{50%{opacity:.55;transform:scale(.76);box-shadow:0 0 8px #61ebbe}}

/* verification + maintenance */
body.pm-verify .orb,body.pm-maintenance .pm-maintenance-orb{animation:pmVerifyOrb 12s ease-in-out infinite alternate}
@keyframes pmVerifyOrb{to{transform:translate3d(55px,-35px,0) scale(1.12)}}
body.pm-verify .card,body.pm-maintenance .card{box-shadow:0 34px 100px rgba(0,0,0,.44),0 0 85px rgba(102,78,255,.07)}
body.pm-verify .brand img,body.pm-maintenance .card img{animation:pmLogoFloat 5s ease-in-out infinite}
@keyframes pmLogoFloat{50%{transform:translateY(-5px) rotate(-2deg);filter:brightness(1.08)}}
body.pm-maintenance .dot{animation:pmDangerPulse 1.7s ease-in-out infinite}
@keyframes pmDangerPulse{50%{opacity:.45;transform:scale(.72);box-shadow:0 0 8px #ff6884}}

/* low-power and accessibility */
@media(max-width:760px){
  body::before{opacity:.09;background-size:42px 42px}
  .pm-card:hover{box-shadow:0 18px 52px rgba(0,0,0,.26)}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  body::before{animation:none}
  .pm-reveal{opacity:1!important;transform:none!important;transition:none!important}
  .pm-magnetic{translate:0 0!important}
  .pm-ripple-wave{display:none!important}
  body.pm-home .hero-left .grad,body.pm-home .tabs .tab.active,body.pm-dashboard .nav-item.active,body.pm-dashboard .market-switch button.active,body.pm-dashboard .primary,body.pm-admin .primary,body.pm-admin .bg1,body.pm-admin .bg2,body.pm-verify .orb,body.pm-maintenance .pm-maintenance-orb,body.pm-verify .brand img,body.pm-maintenance .card img{animation:none!important}
}
body.motion-reduced::before{animation:none;opacity:.06}
body.motion-reduced .pm-reveal{opacity:1!important;transform:none!important;transition-duration:.01ms!important}
body.motion-reduced .pm-magnetic{translate:0 0!important}
body.motion-reduced .pm-ripple-wave{display:none!important}
