/* =====================================================================
   DASHBOARD MOTION — las mismas animaciones de la web pública aplicadas
   a los paneles (/cuenta/ y /admin/): fondo ambiental, entrada escalonada,
   foco de luz que sigue al cursor, reflejo en botones naranjas y barra
   de progreso. Lógica del foco de luz: js/core/spotlight.js
   ===================================================================== */

@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

/* fondo: luz naranja que se desplaza + rejilla tenue (como la web) */
.ambient {
  position: fixed; inset: -10%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 480px at 82% -4%, rgba(255,122,26,.10), transparent 60%),
    radial-gradient(700px 500px at 8% 22%, rgba(255,122,26,.05), transparent 60%),
    radial-gradient(1000px 600px at 50% 110%, rgba(255,122,26,.06), transparent 60%);
  animation: aurora 18s ease-in-out infinite alternate;
}
.gridlines {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .45;
  background-image: linear-gradient(rgba(255,122,26,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,122,26,.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
}
@keyframes aurora { to { transform: translate3d(-3%, 2%, 0) scale(1.08); } }

/* entrada escalonada (--i lo pone spotlight.js o el HTML) */
.rise { animation: riseIn .7s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes riseIn { from { opacity: 0; transform: translateY(22px) scale(.98); filter: blur(4px); } }

/* foco de luz que sigue al cursor */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255,122,26,.14), transparent 45%);
}
.spot:hover::before { opacity: 1; }

/* borde de luz giratorio para la tarjeta destacada */
.glow-ring { position: relative; }
.glow-ring::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 62%, rgba(255,176,92,.9) 78%, #ff7a1a 88%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spinAng 4.5s linear infinite;
}
@keyframes spinAng { to { --ang: 360deg; } }

/* reflejo que cruza los botones naranjas */
.btn-orange, .k-pay-btn, .btn-shine { position: relative; overflow: hidden; }
.btn-orange::after, .k-pay-btn::after, .btn-shine::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-120%);
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.4) 50%, transparent 70%);
}
.btn-orange:hover::after, .k-pay-btn:hover::after, .btn-shine:hover::after { transform: translateX(120%); transition: transform .75s ease; }

/* números que brillan al actualizarse */
.flash { animation: flashNum 1.2s ease; }
@keyframes flashNum { 0% { color: var(--orange2, #ff8c3a); text-shadow: 0 0 18px rgba(255,122,26,.7); } }

/* barra de progreso de scroll */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 101; pointer-events: none;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, #ff7a1a, #ff8c3a); box-shadow: 0 0 12px rgba(255,122,26,.7);
}

@media (prefers-reduced-motion: reduce) {
  .ambient, .rise, .glow-ring::after, .flash { animation: none !important; }
}
