/* ── Keyframes ─────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ── Entrada de tarjetas ───────────────────────────── */
.card-enter {
  animation: fadeUp 0.25s ease-out both;
}
.card-enter:nth-child(2) { animation-delay: 0.04s; }
.card-enter:nth-child(3) { animation-delay: 0.08s; }
.card-enter:nth-child(4) { animation-delay: 0.12s; }

/* ── Entrada de vistas ─────────────────────────────── */
.view-enter {
  animation: fadeUp 0.22s ease-out both;
}

/* ── Hero card ─────────────────────────────────────── */
.card-hero { animation: scaleIn 0.30s ease-out; }

/* ── Persona card hover ────────────────────────────── */
.pc {
  transition: border-color var(--t-base), box-shadow var(--t-base),
              transform var(--t-fast);
}
.pc:hover { transform: translateY(-1px); }

/* ── Metric card hover ─────────────────────────────── */
.metric-card {
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.metric-card:hover { transform: translateY(-2px); }

/* ── Admin table row ───────────────────────────────── */
.admin-table tbody tr { transition: background var(--t-fast); }

/* ── Spinner ───────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--c-primary-light);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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