/* ============================================================
   LCR MANDAL ERP — ANIMATIONS & MICRO-INTERACTIONS
   ============================================================ */

/* ── Keyframes ──────────────────────────────────────────────── */
@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(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

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

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

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position:  200% center; }
}

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

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

@keyframes ripple {
  0%   { transform: scale(0); opacity: 0.6; }
  100% { transform: scale(2.5); opacity: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-8px) rotate(1deg); }
  66%       { transform: translateY(-4px) rotate(-1deg); }
}

@keyframes mandalaRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(212,175,55,0.3); }
  50%       { box-shadow: 0 0 40px rgba(212,175,55,0.6); }
}

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

@keyframes progressFill {
  from { width: 0; }
  to   { width: var(--target-width, 100%); }
}

@keyframes toastSlideIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(120%); opacity: 0; }
}

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

@keyframes modalContentIn {
  from { opacity: 0; transform: scale(0.92) translateY(24px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes dotFlash {
  0%, 80%, 100% { transform: scale(0); opacity: 0; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── Animation Classes ──────────────────────────────────────── */
.animate-fade-in     { animation: fadeIn var(--duration) var(--ease-out) both; }
.animate-fade-in-up  { animation: fadeInUp var(--duration-slow) var(--ease-out) both; }
.animate-fade-in-down { animation: fadeInDown var(--duration) var(--ease-out) both; }
.animate-scale-in    { animation: scaleIn var(--duration) var(--ease-out) both; }
.animate-float       { animation: float 6s ease-in-out infinite; }
.animate-spin        { animation: spin 1s linear infinite; }
.animate-pulse       { animation: pulse 1.5s ease-in-out infinite; }
.animate-bounce      { animation: bounce 2s ease-in-out infinite; }
.animate-glow        { animation: glow 2s ease-in-out infinite; }

/* Stagger delays for list items */
.stagger-1  { animation-delay: 0ms; }
.stagger-2  { animation-delay: 60ms; }
.stagger-3  { animation-delay: 120ms; }
.stagger-4  { animation-delay: 180ms; }
.stagger-5  { animation-delay: 240ms; }
.stagger-6  { animation-delay: 300ms; }
.stagger-7  { animation-delay: 360ms; }
.stagger-8  { animation-delay: 420ms; }

/* ── Skeleton Loaders ───────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f2f5 25%, #e8eaed 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
.skeleton-text  { height: 14px; border-radius: 4px; }
.skeleton-title { height: 22px; border-radius: 4px; }
.skeleton-avatar { border-radius: var(--radius-full); }
.skeleton-card  {
  height: 120px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, #f0f2f5 25%, #e8eaed 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ── Hover & Interaction States ─────────────────────────────── */
.hover-lift {
  transition: transform var(--duration) var(--ease-out),
              box-shadow var(--duration) var(--ease-out);
}
.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.hover-scale {
  transition: transform var(--duration-fast) var(--ease-out);
}
.hover-scale:hover {
  transform: scale(1.03);
}

.press-effect {
  transition: transform var(--duration-fast) var(--ease);
}
.press-effect:active {
  transform: scale(0.97);
}

/* ── Page Transitions ───────────────────────────────────────── */
.page-enter {
  animation: fadeInUp 0.35s var(--ease-out) both;
}

.page-exit {
  animation: fadeIn 0.15s var(--ease-in) reverse both;
}

/* ── Ripple Effect ──────────────────────────────────────────── */
.ripple-container {
  position: relative;
  overflow: hidden;
}
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

/* ── Loading Dots ───────────────────────────────────────────── */
.loading-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: dotFlash 1.4s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ── Mandala Spinner ────────────────────────────────────────── */
.mandala-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
