/* ============================================================
   SJC ERP - Animations Stylesheet
   ============================================================ */

/* ─── Fade Animations ─────────────────────────────────────── */
.fade-in    { animation: fadeIn    0.4s ease both; }
.fade-in-up { animation: fadeInUp  0.4s ease both; }
.fade-in-down { animation: fadeInDown 0.4s ease both; }
.slide-in-left  { animation: slideInLeft  0.4s ease both; }
.slide-in-right { animation: slideInRight 0.4s ease both; }

@keyframes fadeIn      { from { opacity:0 } to { opacity:1 } }
@keyframes fadeInUp    { from { opacity:0; transform:translateY(24px) } to { opacity:1; transform:translateY(0) } }
@keyframes fadeInDown  { from { opacity:0; transform:translateY(-24px) } to { opacity:1; transform:translateY(0) } }
@keyframes slideInLeft  { from { opacity:0; transform:translateX(-24px) } to { opacity:1; transform:translateX(0) } }
@keyframes slideInRight { from { opacity:0; transform:translateX(24px) } to { opacity:1; transform:translateX(0) } }

/* ─── Staggered Delays ────────────────────────────────────── */
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.10s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.20s; }
.delay-5 { animation-delay: 0.25s; }
.delay-6 { animation-delay: 0.30s; }
.delay-7 { animation-delay: 0.35s; }
.delay-8 { animation-delay: 0.40s; }

/* ─── Hover Lift ──────────────────────────────────────────── */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ─── Card Entrance ───────────────────────────────────────── */
.card-enter {
  animation: cardEntrance 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes cardEntrance {
  from { opacity: 0; transform: scale(0.93) translateY(16px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* ─── Pulse ───────────────────────────────────────────────── */
.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

/* ─── Spin ────────────────────────────────────────────────── */
.spin { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ─── Shimmer Loading Skeleton ────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 0%, var(--bg-2) 50%, var(--border) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Progress Bar Animate ────────────────────────────────── */
.progress-animate .progress-bar {
  width: 0;
  animation: growBar 1.2s ease 0.3s forwards;
}
@keyframes growBar {
  to { width: var(--target-w); }
}

/* ─── Number Counter ──────────────────────────────────────── */
.counter { display: inline-block; }

/* ─── Ripple Effect ───────────────────────────────────────── */
.ripple-btn { position: relative; overflow: hidden; }
.ripple-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  border-radius: 50%;
  transition: transform 0.4s, opacity 0.4s;
  opacity: 0;
}
.ripple-btn:active::after {
  transform: scale(3);
  opacity: 0;
  transition: 0s;
}

/* ─── Chart Animation ─────────────────────────────────────── */
.chart-container {
  animation: fadeInUp 0.5s ease 0.2s both;
}

/* ─── Notification Bell ───────────────────────────────────── */
.bell-shake { animation: bellShake 0.5s ease; }
@keyframes bellShake {
  0%,100% { transform: rotate(0); }
  25%     { transform: rotate(-15deg); }
  75%     { transform: rotate(15deg); }
}

/* ─── Badge Pop ───────────────────────────────────────────── */
.badge-pop { animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes badgePop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* ─── Sidebar Item Hover ──────────────────────────────────── */
.nav-item {
  position: relative;
  overflow: hidden;
}
.nav-item::before {
  content: '';
  position: absolute;
  left: -100%; top: 0; bottom: 0;
  width: 3px;
  background: var(--primary);
  transition: left 0.2s ease;
  border-radius: 0 2px 2px 0;
}
.nav-item:hover::before { left: 0; }
.nav-item.active::before { left: 0; background: #FFF; }

/* ─── Float Animation ─────────────────────────────────────── */
.float-anim { animation: float 3s ease-in-out infinite; }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}

/* ─── Gradient Text ───────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Card Glow ───────────────────────────────────────────── */
.card-glow { transition: box-shadow 0.3s ease; }
.card-glow:hover { box-shadow: 0 0 30px rgba(37,99,235,0.12); }
