/* Capa de movimiento compartida. La personalización ajusta velocidad y acento. */
:root {
  --color-acento: #6DD3FF;
  --radio-sm: 16px;
  --velocidad-animacion: 1;
}

/* Movimiento de paneles/modales: solo translate3d + opacity (sin left/width/top). */
@keyframes entradaSuave {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes flotarSuave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes latidoSuave {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes barridoBrillo {
  from { transform: translateX(-130%); }
  to { transform: translateX(230%); }
}
@keyframes crecerBarra {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes destelloAnimado {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-acento) 55%, transparent); }
  70% { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@keyframes girarLento {
  to { transform: rotate(360deg); }
}
@keyframes confetiCaer {
  0% { opacity: 0; transform: translateY(-8px) rotate(0deg); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translateY(170px) rotate(var(--giro, 360deg)); }
}

.anim-entrar { animation: entradaSuave calc(.46s / var(--velocidad-animacion)) var(--ease-sa) both; will-change: transform, opacity; }
.anim-flotar { animation: flotarSuave calc(3.6s / var(--velocidad-animacion)) ease-in-out infinite; }
.anim-latido { animation: latidoSuave calc(2.2s / var(--velocidad-animacion)) ease-in-out infinite; }
.anim-destello { animation: destelloAnimado calc(.7s / var(--velocidad-animacion)) ease-out; }

.anim-brillo { position: relative; overflow: hidden; }
.anim-brillo::after {
  content: ''; position: absolute; inset: 0; width: 35%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.38), transparent);
  animation: barridoBrillo calc(2.8s / var(--velocidad-animacion)) ease-in-out infinite;
}

.anim-barra { transform-origin: left center; animation: crecerBarra calc(.7s / var(--velocidad-animacion)) var(--ease-sa) both; }
.anim-giro { animation: girarLento calc(9s / var(--velocidad-animacion)) linear infinite; }

.view > .card,
.view > .dash-kpi,
.view > .hel-producto,
.view > .hel-ultimo-cobro {
  animation: entradaSuave calc(.38s / var(--velocidad-animacion)) var(--ease-sa) both;
}
.view > .card:nth-child(2) { animation-delay: calc(.05s / var(--velocidad-animacion)); }
.view > .card:nth-child(3) { animation-delay: calc(.1s / var(--velocidad-animacion)); }

html[data-movimiento="off"] *,
html[data-movimiento="off"] *::before,
html[data-movimiento="off"] *::after {
  animation: none !important;
  transition-duration: .01ms !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
