@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardOut {
  from {
    opacity: 1;
    transform: scale(1);
    max-height: 600px;
  }
  to {
    opacity: 0;
    transform: scale(0.92);
  }
}

@keyframes saveFlash {
  0% { box-shadow: 0 0 0 0 var(--accent-soft); }
  30% { box-shadow: 0 0 0 6px var(--accent-soft); }
  100% { box-shadow: var(--shadow-sm); }
}

@keyframes pulse-warn {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.15); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

@keyframes statPulse {
  0% { box-shadow: 0 0 0 0 var(--accent-soft); }
  50% { box-shadow: 0 0 0 5px var(--accent-soft); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.stat-pulse {
  animation: statPulse 0.7s var(--ease-out);
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-root.view-enter {
  animation: viewIn 0.35s var(--ease-out);
}

@keyframes pageProgress {
  0% { width: 0; opacity: 1; }
  60% { width: 75%; opacity: 1; }
  100% { width: 100%; opacity: 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Continuous / ambient motion ---------- */

@keyframes heroFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes heroBlobFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-2%, 2%); }
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes fabPulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(91, 91, 246, 0.4), 0 0 0 0 rgba(91, 91, 246, 0.4); }
  50% { box-shadow: 0 10px 28px rgba(91, 91, 246, 0.4), 0 0 0 8px rgba(91, 91, 246, 0); }
}

.kpi-icon { animation: iconFloat 3.2s ease-in-out infinite; }
.kpi-card:nth-child(2) .kpi-icon { animation-delay: 0.3s; }
.kpi-card:nth-child(3) .kpi-icon { animation-delay: 0.6s; }
.kpi-card:nth-child(4) .kpi-icon { animation-delay: 0.9s; }

.fab { animation: fabPulse 2.6s ease-in-out infinite; }

@keyframes gelatoGlow {
  0%, 100% { box-shadow: 0 4px 14px -2px rgba(236, 72, 153, 0.5); }
  50% { box-shadow: 0 4px 18px -1px rgba(16, 185, 129, 0.6); }
}

@keyframes demoShimmerSweep {
  0% { left: -60%; }
  50% { left: 130%; }
  100% { left: 130%; }
}

@keyframes demoIconBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(-4deg); }
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Skeleton loading shimmer ---------- */

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.skeleton-card {
  height: 140px;
  border-radius: var(--radius-md);
  background: linear-gradient(100deg, var(--bg-elev) 30%, var(--bg-hover) 50%, var(--bg-elev) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border: 1px solid var(--border);
}

@keyframes shimmer {
  0% { background-position: 150% 0; }
  100% { background-position: -50% 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
