/* ========== RESUMO FINANCEIRO (PREMIUM) ========== */
.financial-summary {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.section-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pure-white);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--secondary-gray);
  max-width: 700px;
  margin: 0 auto;
}

/* Grid de Consolidação */
.consolidation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.consolidation-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

.consolidation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.3s;
}

.consolidation-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.consolidation-card:hover::before {
  opacity: 1;
}

.consolidation-card.receitas {
  border-top: 4px solid #00A859;
}

.consolidation-card.despesas {
  border-top: 4px solid var(--primary-accent);
}

.consolidation-card.saldo {
  border-top: 4px solid #2E86DE;
}

.consolidation-card.economia {
  border-top: 4px solid #FFC72C;
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  transition: all 0.3s;
}

.consolidation-card:hover .card-icon {
  transform: scale(1.1);
}

.consolidation-card.receitas .card-icon {
  background: rgba(0, 168, 89, 0.1);
  color: #00A859;
}

.consolidation-card.despesas .card-icon {
  background: rgba(255, 4, 1, 0.1);
  color: var(--primary-accent);
}

.consolidation-card.saldo .card-icon {
  background: rgba(46, 134, 222, 0.1);
  color: #2E86DE;
}

.consolidation-card.economia .card-icon {
  background: rgba(255, 199, 44, 0.1);
  color: #FFC72C;
}

.label {
  font-size: 0.95rem;
  color: var(--secondary-gray);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.value {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--pure-white);
}

.variation {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
}

.variation.positive {
  color: #00A859;
}

.variation.negative {
  color: var(--primary-accent);
}

.goal {
  font-size: 0.85rem;
  color: var(--secondary-gray);
  margin-top: 0.8rem;
}

/* Lista de Estatísticas (Mobile) */
.stats-list {
  display: none;
  margin-bottom: 2rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  transition: all 0.3s;
}

.stat-item:nth-child(1) .stat-icon {
  background: rgba(0, 168, 89, 0.1);
  color: #00A859;
}

.stat-item:nth-child(2) .stat-icon {
  background: rgba(255, 4, 1, 0.1);
  color: var(--primary-accent);
}

.stat-item:nth-child(3) .stat-icon {
  background: rgba(46, 134, 222, 0.1);
  color: #2E86DE;
}

.stat-item:nth-child(4) .stat-icon {
  background: rgba(255, 199, 44, 0.1);
  color: #FFC72C;
}

.stat-details {
  flex: 1;
  min-width: 0;
}

.stat-label {
  display: block;
  font-size: 0.95rem;
  color: var(--secondary-gray);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-weight: 700;
  color: var(--pure-white);
  font-size: 1.2rem;
}

.stat-variation {
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 0.8rem;
}

.stat-variation.positive {
  color: #00A859;
}

.stat-variation.negative {
  color: var(--primary-accent);
}

/* Gráfico de Visualização */
.chart-container {
  height: 350px;
  position: relative;
  margin-top: 3rem;
  background: rgba(8, 9, 62, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--secondary-gray);
  cursor: pointer;
  transition: all 0.3s;
}

.legend-item:hover {
  color: var(--pure-white);
}

.legend-item[data-type="receitas"] .legend-color {
  background: #00A859;
}

.legend-item[data-type="despesas"] .legend-color {
  background: var(--primary-accent);
}

.legend-item[data-type="saldo"] .legend-color {
  background: #2E86DE;
}

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transition: transform 0.3s;
}

.legend-item:hover .legend-color {
  transform: scale(1.2);
}

/* Responsividade */
@media (max-width: 1200px) {
  .consolidation-grid {
    gap: 1.2rem;
  }
  
  .consolidation-card {
    padding: 1.5rem;
  }
  
  .value {
    font-size: 1.6rem;
  }
}

@media (max-width: 992px) {
  .financial-summary {
    padding: 2rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .chart-container {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .consolidation-grid {
    display: none;
  }
  
  .stats-list {
    display: block;
  }
  
  .chart-container {
    height: 280px;
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .financial-summary {
    padding: 1.5rem;
  }
  
  .stat-item {
    gap: 1rem;
    padding: 1rem 0;
  }
  
  .stat-icon {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }
  
  .chart-container {
    height: 250px;
  }
}
