/* =====================================================
   assets/css/animations.css
   Global Animations Library — v3
   ===================================================== */

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

@keyframes fadeInFast {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(99, 102, 241, 0.2); }
  50%       { box-shadow: 0 0 30px rgba(99, 102, 241, 0.5); }
}

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

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

/* ── Page-level fade-ins ── */
.stat-card,
.card {
  animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page-content h1 {
  animation: slideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── Stagger for grid rows ── */
.row > div:nth-child(1) { animation-delay: 0.05s; }
.row > div:nth-child(2) { animation-delay: 0.10s; }
.row > div:nth-child(3) { animation-delay: 0.15s; }
.row > div:nth-child(4) { animation-delay: 0.20s; }
.row > div:nth-child(5) { animation-delay: 0.25s; }
.row > div:nth-child(6) { animation-delay: 0.30s; }

/* ── Utility classes ── */
.pulse-glow { animation: pulseGlow 2.5s ease-in-out infinite; }
.spin       { animation: spin 1s linear infinite; }
.float-anim { animation: float 3.5s ease-in-out infinite; }

/* ── Table row hover ── */
.table tbody tr {
  transition: background 0.2s ease, transform 0.15s ease;
}
.table tbody tr:hover {
  background: rgba(99, 102, 241, 0.05) !important;
  transform: translateX(3px);
}

/* ── Button press micro-animation ── */
.btn:active { transform: scale(0.97) !important; }
