/* ==========================================================================
   VENDEDOR PROSPECÇÃO — ANIMAÇÕES DE CASCATA (ENTRADA & SAÍDA)
   Arquivo dedicado exclusivamente a transições e animações fluidas
   PRESERVAÇÃO ESTRITA E TOTAL DO GLASSMORPHISM (BACKDROP-FILTER)
   ========================================================================== */

/* ──────────────────────────────────────────────────────────────────────────
   1. KEYFRAMES DE ENTRADA (CASCATA SUAVE SEM QUEBRAR O BACKDROP-FILTER)
   ────────────────────────────────────────────────────────────────────────── */
@keyframes prospectContentFadeDown {
  0% {
    opacity: 0;
    transform: translateY(-16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes prospectCardCascadeIn {
  0% {
    opacity: 0;
    transform: translateY(22px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes prospectItemFadeIn {
  0% {
    opacity: 0;
    transform: translateX(-8px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   2. KEYFRAMES DE SAÍDA (DESVANECIMENTO SUAVE EM CASCATA)
   ────────────────────────────────────────────────────────────────────────── */
@keyframes prospectHeroExit {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-16px);
  }
}

@keyframes prospectGridExit {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   3. APLICAÇÃO DA CASCATA DE ENTRADA (STAGGERED CASCADE)
   ────────────────────────────────────────────────────────────────────────── */

/* Nível 1: Conteúdo interno do Hero Banner */
.prospect-hero-content {
  animation: prospectContentFadeDown 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.prospect-hero-topbar {
  animation: prospectContentFadeDown 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

.prospect-nav-subtabs {
  animation: prospectContentFadeDown 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.09s both;
}

/* Nível 2: Ribbon Glassmorphic dos KPIs (Preserva 100% o Backdrop-Filter e a Translucidez) */
.prospect-kpi-ribbon {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  border-radius: 24px !important;
  box-shadow: 
    0 20px 45px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

/* Cascata suave de texto dos KPIs dentro do Ribbon */
.prospect-kpi-ribbon .prospect-kpi-card:nth-child(1) {
  animation: prospectItemFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}
.prospect-kpi-ribbon .prospect-kpi-card:nth-child(2) {
  animation: prospectItemFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
}
.prospect-kpi-ribbon .prospect-kpi-card:nth-child(3) {
  animation: prospectItemFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.20s both;
}
.prospect-kpi-ribbon .prospect-kpi-card:nth-child(4) {
  animation: prospectItemFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.24s both;
}
.prospect-kpi-ribbon .prospect-kpi-card:nth-child(5) {
  animation: prospectItemFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
}

/* Nível 3: Bento Grid Cards (Cascata fluida de cards principais) */
.prospect-main-grid > div:nth-child(1) .prospect-bento-card:nth-child(1) {
  animation: prospectCardCascadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
}

.prospect-main-grid > div:nth-child(2) .prospect-bento-card:nth-child(1) {
  animation: prospectCardCascadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both;
}

.prospect-right-col .prospect-shortcut-hero {
  animation: prospectCardCascadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.26s both;
}

.prospect-main-grid > div:nth-child(1) .prospect-bento-card:nth-child(2) {
  animation: prospectCardCascadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.30s both;
}

.prospect-main-grid > div:nth-child(2) .prospect-bento-card:nth-child(2) {
  animation: prospectCardCascadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.34s both;
}

.prospect-right-col .prospect-shortcut-card:nth-of-type(1) {
  animation: prospectCardCascadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.36s both;
}

.prospect-right-col .prospect-shortcut-card:nth-of-type(2) {
  animation: prospectCardCascadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.40s both;
}

.prospect-right-col .prospect-shortcut-card:nth-of-type(3) {
  animation: prospectCardCascadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.44s both;
}

/* Cascata das linhas de leads dentro da tabela */
.prospect-leads-list .prospect-lead-row:nth-child(1) {
  animation: prospectItemFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both;
}
.prospect-leads-list .prospect-lead-row:nth-child(2) {
  animation: prospectItemFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.26s both;
}
.prospect-leads-list .prospect-lead-row:nth-child(3) {
  animation: prospectItemFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.30s both;
}
.prospect-leads-list .prospect-lead-row:nth-child(4) {
  animation: prospectItemFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.34s both;
}

/* ──────────────────────────────────────────────────────────────────────────
   4. APLICAÇÃO DA CASCATA DE SAÍDA (EXIT CASCADE)
   ────────────────────────────────────────────────────────────────────────── */
.prospect-page-container.prospect-exiting,
body.prospect-exiting .prospect-page-container {
  pointer-events: none;
}

.prospect-page-container.prospect-exiting .prospect-hero-content,
body.prospect-exiting .prospect-hero-content {
  animation: prospectHeroExit 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.prospect-page-container.prospect-exiting .prospect-main-grid,
body.prospect-exiting .prospect-main-grid {
  animation: prospectGridExit 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}
