/* ============================================================
   TESOURARIA CADC — Animações e Micro-interações
   ============================================================ */

/* --- Entrada de Elementos --- */
.animate-in {
  animation: slide-up-fade 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slide-up-fade {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in-delay-1 { animation-delay: 0.05s; opacity: 0; }
.animate-in-delay-2 { animation-delay: 0.10s; opacity: 0; }
.animate-in-delay-3 { animation-delay: 0.15s; opacity: 0; }
.animate-in-delay-4 { animation-delay: 0.20s; opacity: 0; }
.animate-in-delay-5 { animation-delay: 0.25s; opacity: 0; }

/* --- Page Transitions --- */
.page-transition {
  animation: page-enter 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes page-enter {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* --- Ripple Effect nos botões --- */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  opacity: 0;
  border-radius: inherit;
  transition: opacity 0.2s;
}

.btn:active::after { opacity: 1; }

/* --- Hover glow nos cards KPI --- */
.kpi-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(circle at 50% 0, var(--kpi-color, var(--indigo-500)), transparent 70%);
  transition: opacity 0.4s;
  pointer-events: none;
}

.kpi-card:hover::after { opacity: 0.06; }

/* --- Counter animation --- */
.count-up {
  display: inline-block;
  transition: transform 0.3s ease;
}

/* --- Pulse para alertas urgentes --- */
.pulse-urgent {
  animation: pulse-urgent 2s ease-in-out infinite;
}

@keyframes pulse-urgent {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.15); }
}

/* --- Success check animation --- */
@keyframes check-pop {
  0%  { transform: scale(0) rotate(-45deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(5deg); }
  100%{ transform: scale(1) rotate(0); opacity: 1; }
}

.success-check { animation: check-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* --- WhatsApp send animation --- */
@keyframes send-slide {
  0% { transform: translateX(0) translateY(0) scale(1); opacity: 1; }
  100% { transform: translateX(30px) translateY(-30px) scale(0.5); opacity: 0; }
}

.sending-icon { animation: send-slide 0.5s ease-in forwards; }

/* --- Sidebar nav hover --- */
.nav-item { position: relative; overflow: hidden; }
.nav-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: var(--indigo-glow);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.nav-item:hover::after { opacity: 0.5; }
.nav-item.active::after { opacity: 1; }

/* --- Float animation for login orbs --- */
@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -20px) scale(1.05); }
  66%       { transform: translate(-20px, 30px) scale(0.95); }
}

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

/* --- Table row stagger on load --- */
.data-table tbody tr {
  animation: row-fade-in 0.3s ease both;
}

@keyframes row-fade-in {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

.data-table tbody tr:nth-child(1)  { animation-delay: 0.02s; }
.data-table tbody tr:nth-child(2)  { animation-delay: 0.04s; }
.data-table tbody tr:nth-child(3)  { animation-delay: 0.06s; }
.data-table tbody tr:nth-child(4)  { animation-delay: 0.08s; }
.data-table tbody tr:nth-child(5)  { animation-delay: 0.10s; }
.data-table tbody tr:nth-child(6)  { animation-delay: 0.12s; }
.data-table tbody tr:nth-child(7)  { animation-delay: 0.14s; }
.data-table tbody tr:nth-child(8)  { animation-delay: 0.16s; }
.data-table tbody tr:nth-child(9)  { animation-delay: 0.18s; }
.data-table tbody tr:nth-child(10) { animation-delay: 0.20s; }
