/* ═══════════════════════════════════════════════════════════════════
   ServietSoft Soporte — animations.css
   Todas las animaciones y microinteracciones
   ═══════════════════════════════════════════════════════════════════ */

/* ── PAGE LOAD — staggered fade-in ────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Stagger helpers */
.animate-fade-up     { animation: fadeInUp 0.5s ease both; }
.animate-fade-in     { animation: fadeIn 0.4s ease both; }
.animate-scale-in    { animation: scaleIn 0.35s ease both; }
.animate-slide-right { animation: slideInRight 0.4s ease both; }

.stagger-1  { animation-delay: 0.05s; }
.stagger-2  { animation-delay: 0.10s; }
.stagger-3  { animation-delay: 0.15s; }
.stagger-4  { animation-delay: 0.20s; }
.stagger-5  { animation-delay: 0.25s; }
.stagger-6  { animation-delay: 0.30s; }
.stagger-7  { animation-delay: 0.35s; }
.stagger-8  { animation-delay: 0.40s; }
.stagger-9  { animation-delay: 0.45s; }
.stagger-10 { animation-delay: 0.50s; }

/* ── MESH GRADIENT (login background) ─────────────────────────────── */
@keyframes meshMove1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(40px, -30px) scale(1.1); }
  66%       { transform: translate(-20px, 40px) scale(0.95); }
}

@keyframes meshMove2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-50px, 30px) scale(1.08); }
  66%       { transform: translate(30px, -40px) scale(1.05); }
}

@keyframes meshMove3 {
  0%, 100% { transform: translate(0, 0) scale(1.05); }
  50%       { transform: translate(20px, 50px) scale(0.95); }
}

/* ── RING PULSE (timeline active node) ────────────────────────────── */
@keyframes ringPulse {
  0%   { box-shadow: 0 0 0 0 rgba(30,45,107,0.4); }
  70%  { box-shadow: 0 0 0 10px rgba(30,45,107,0); }
  100% { box-shadow: 0 0 0 0 rgba(30,45,107,0); }
}

@keyframes ringPulseAccent {
  0%   { box-shadow: 0 0 0 0 rgba(192,40,45,0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(192,40,45,0); }
  100% { box-shadow: 0 0 0 0 rgba(192,40,45,0); }
}

.ring-pulse        { animation: ringPulse 2s ease-in-out infinite; }
.ring-pulse-accent { animation: ringPulseAccent 2s ease-in-out infinite; }

/* ── CARD HOVER (elevación) ────────────────────────────────────────── */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(30,45,107,0.14), 0 4px 12px rgba(30,45,107,0.09);
}

/* ── SIDEBAR PILL indicator ─────────────────────────────────────────── */
@keyframes pillSlide {
  from { opacity: 0; transform: scaleY(0.5); }
  to   { opacity: 1; transform: scaleY(1); }
}

/* ── STAT COUNTER ──────────────────────────────────────────────────── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stat-number { animation: countUp 0.6s ease both; }

/* ── PROGRESS BAR FILL ─────────────────────────────────────────────── */
@keyframes progressFill {
  from { width: 0; }
}

.progress-fill { animation: progressFill 1s cubic-bezier(0.4, 0, 0.2, 1) both 0.3s; }

/* ── SPINNER ───────────────────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(30,45,107,0.15);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }
.spinner-white {
  border-color: rgba(255,255,255,0.3);
  border-top-color: white;
}

/* ── MODAL ─────────────────────────────────────────────────────────── */
@keyframes modalBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,20,40,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: modalBackdropIn 0.25s ease both;
}

.modal {
  background: var(--color-white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.3s var(--transition-spring) both;
}

.modal-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body { padding: var(--space-6); }

.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* ── WIZARD STEPS ──────────────────────────────────────────────────── */
@keyframes stepActive {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

@keyframes stepComplete {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.step-complete { animation: stepComplete 0.4s ease both; }

/* ── DROPDOWN ──────────────────────────────────────────────────────── */
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-menu {
  animation: dropdownIn 0.2s ease both;
}

/* ── RIPPLE BUTTON ─────────────────────────────────────────────────── */
@keyframes ripple {
  from { transform: scale(0); opacity: 0.4; }
  to   { transform: scale(4); opacity: 0; }
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  width: 100px;
  height: 100px;
  margin-top: -50px;
  margin-left: -50px;
  animation: ripple 0.6s linear;
  pointer-events: none;
}

/* ── NOTIFICATION DOT ─────────────────────────────────────────────── */
@keyframes dotPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.3); }
}

.notif-dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  border: 2px solid white;
  animation: dotPulse 2s ease-in-out infinite;
}
