/* CronJobX motion layer (light): short entrance, calm hovers, no endless animations, so pages stay fast. Brings the landing page's movement (spotlight cards, flowing amber line,
   pulsing glows, lift on hover) to the admin console, portal and reseller panel.
   Loaded after admin.css. Everything here is decoration: with "reduce motion" switched on in the
   operating system, admin.css already turns every animation and transition off. CSP-safe (no inline styles). */

/* ---------------------------------------------------------------- page entrance (short, so pages feel instant) */
@keyframes cx-rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes cx-fade{from{opacity:0}to{opacity:1}}
.content>*{animation:cx-rise .24s cubic-bezier(.2,.7,.2,1) both}
.content>*:nth-child(2){animation-delay:.03s}
.content>*:nth-child(3){animation-delay:.06s}
.content>*:nth-child(4){animation-delay:.09s}
.content>*:nth-child(n+5){animation-delay:.12s}

/* ---------------------------------------------------------------- headline like the landing hero */
.page-head h1{background:linear-gradient(180deg,var(--text) 45%,var(--muted) 120%);-webkit-background-clip:text;background-clip:text;color:transparent}

/* ---------------------------------------------------------------- spotlight cards (mouse-follow glow) */
.card{position:relative;transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease}
.card:hover{border-color:var(--line-2)}
/* Small cards lift like the landing's bento tiles; big table cards stay still. */
.card.stat:hover,.store-plan:hover,.status-item:hover{transform:translateY(-2px);border-color:var(--accent-line);box-shadow:var(--shadow),0 18px 36px -22px rgba(245,158,11,.55)}

/* Stat icons breathe like the landing's amber icons. */
.card.stat:hover .stat-icon{transform:rotate(-6deg) scale(1.06)}
.stat-icon{transition:transform .3s cubic-bezier(.2,.7,.2,1)}

/* Numbers settle in (motion.js counts them up). */
.stat-value{font-variant-numeric:tabular-nums}

/* ---------------------------------------------------------------- flowing amber line under the top bar */
@keyframes cx-flow{from{background-position:-40% 0}to{background-position:140% 0}}
.topbar{position:sticky}
.topbar::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(251,191,36,.9),transparent) no-repeat;background-size:30% 100%;
  animation:cx-flow 1.6s cubic-bezier(.2,.7,.2,1) 1 both;opacity:.7}

/* ---------------------------------------------------------------- top glow drifts slowly, like the hero */
@keyframes cx-drift{0%{transform:translateX(-6%) scale(1)}100%{transform:translateX(6%) scale(1.08)}}
.main{position:relative;isolation:isolate}
.main::before{content:"";position:absolute;top:-120px;left:15%;right:15%;height:420px;pointer-events:none;z-index:-1;
  background:radial-gradient(50% 50% at 50% 50%,var(--glow),transparent 70%)}
.auth,.install{position:relative;isolation:isolate;overflow:hidden}
.auth::before,.install::before{content:"";position:absolute;top:-160px;left:20%;right:20%;height:520px;pointer-events:none;z-index:-1;
  background:radial-gradient(50% 50% at 50% 50%,var(--glow),transparent 70%);animation:cx-drift 12s ease-in-out infinite alternate}

/* ---------------------------------------------------------------- sidebar */
.nav a::before{content:"";position:absolute;left:-12px;top:9px;bottom:9px;width:3px;border-radius:0 3px 3px 0;
  background:linear-gradient(#fcd34d,#f97316);transform:scaleY(0);transition:transform .3s cubic-bezier(.2,.7,.2,1)}
.nav a.active::before{transform:scaleY(1)}
.nav a .icon{transition:transform .2s ease,color .2s ease}
.nav a:hover .icon{transform:translateX(2px)}
.nav a:hover{color:var(--text)}
.brand-mark{transition:transform .35s cubic-bezier(.2,.7,.2,1)}
a:hover>.brand-mark,.brand:hover .brand-mark{transform:rotate(-8deg) scale(1.05)}

/* ---------------------------------------------------------------- buttons */
.btn{transition:transform .15s ease,box-shadow .2s ease,background .15s,border-color .15s,color .15s}
.btn:not(.btn-ghost):not(:disabled):hover{transform:translateY(-1px)}
.btn:not(:disabled):active{transform:translateY(0)}
.btn-primary,.btn-accent{position:relative;overflow:hidden}
.btn-primary::after,.btn-accent::after{content:"";position:absolute;top:0;bottom:0;left:-60%;width:40%;pointer-events:none;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.35),transparent);transform:skewX(-20deg);transition:left .6s ease}
html.dark .btn-primary::after{background:linear-gradient(100deg,transparent,rgba(245,158,11,.30),transparent)}
.btn-primary:hover::after,.btn-accent:hover::after{left:130%}
.btn-primary:hover{box-shadow:0 10px 24px -12px rgba(245,158,11,.7)}

/* ---------------------------------------------------------------- live dots ping like the landing badge */
@keyframes cx-ping{0%{box-shadow:0 0 0 0 currentColor}80%,100%{box-shadow:0 0 0 6px transparent}}
.eyebrow::before{animation:cx-ping 2s ease-out infinite}

/* ---------------------------------------------------------------- bars grow in */
@keyframes cx-grow{from{transform:scaleX(0)}to{transform:scaleX(1)}}
.bar>span,.bar>i,.bar>div{transform-origin:left center;animation:cx-grow .5s cubic-bezier(.2,.7,.2,1) .08s both}

/* ---------------------------------------------------------------- tables and inputs */
.table tbody tr{transition:background .15s ease}
.input,select.input,textarea.input{transition:border-color .2s ease,box-shadow .2s ease,background .2s ease}

/* ---------------------------------------------------------------- charts draw in (revenue report) */
@keyframes cx-grow-y{from{transform:scaleY(0)}to{transform:scaleY(1)}}
svg.chart .chart-bar{transform-box:fill-box;transform-origin:center bottom;animation:cx-grow-y .45s cubic-bezier(.2,.7,.2,1) .05s both}
@keyframes cx-draw{from{stroke-dashoffset:3000}to{stroke-dashoffset:0}}
svg.chart .chart-line{stroke-dasharray:3000;animation:cx-draw .9s cubic-bezier(.2,.7,.2,1) .05s both}
svg.chart .chart-dot{animation:cx-fade .3s ease .6s both}
svg.chart .chart-hit:hover{fill:var(--accent-soft)}

@media (prefers-reduced-motion:reduce){
  .content>*,svg.chart *{animation:none!important;opacity:1!important;transform:none!important}
  .card.stat:hover,.store-plan:hover,.status-item:hover,.btn:hover{transform:none!important}
  .topbar::after,.main::before,.auth::before,.install::before{animation:none!important}
}
