/* ========== DISTRIBUIÇÃO DE DESPESAS (PREMIUM) ========== */
.expense-categories {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px 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 Categorias */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-radius: 12px;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  background: rgba(255, 255, 255, 0.03);
  border-left: 4px solid transparent;
  position: relative;
  overflow: hidden;
}

.category-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.02), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.category-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.category-item:hover::before {
  opacity: 1;
}

/* Temas de Cores */
.housing-category {
  border-left-color: var(--primary-accent);
}

.food-category {
  border-left-color: #FF9F43;
}

.transport-category {
  border-left-color: #2E86DE;
}

.leisure-category {
  border-left-color: #5F27CD;
}

.others-category {
  border-left-color: var(--secondary-gray);
}

/* Informações da Categoria */
.category-info {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex: 1;
}

.category-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: all 0.3s;
}

.category-item:hover .category-icon {
  transform: scale(1.1);
}

.housing-category .category-icon {
  background: rgba(255, 4, 1, 0.1);
  color: var(--primary-accent);
}

.food-category .category-icon {
  background: rgba(255, 159, 67, 0.1);
  color: #FF9F43;
}

.transport-category .category-icon {
  background: rgba(46, 134, 222, 0.1);
  color: #2E86DE;
}

.leisure-category .category-icon {
  background: rgba(95, 39, 205, 0.1);
  color: #5F27CD;
}

.others-category .category-icon {
  background: rgba(116, 125, 140, 0.1);
  color: var(--secondary-gray);
}

.category-details {
  flex: 1;
  min-width: 0;
}

.category-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--pure-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-description {
  font-size: 0.85rem;
  color: var(--secondary-gray);
  margin-bottom: 0.8rem;
}

.category-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.category-progress {
  height: 100%;
  border-radius: 3px;
}

.housing-category .category-progress {
  background: var(--gradient-accent);
}

.food-category .category-progress {
  background: linear-gradient(90deg, #FF9F43, #FECA57);
}

.transport-category .category-progress {
  background: linear-gradient(90deg, #2E86DE, #54A0FF);
}

.leisure-category .category-progress {
  background: linear-gradient(90deg, #5F27CD, #A55EEA);
}

.others-category .category-progress {
  background: linear-gradient(90deg, #747578, #A4B0BE);
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--secondary-gray);
}

/* Valores da Categoria */
.category-value {
  text-align: right;
  margin-left: 1rem;
  flex-shrink: 0;
}

.amount {
  display: block;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  color: var(--pure-white);
}

.percentage {
  font-size: 0.85rem;
  font-weight: 500;
}

.housing-category .percentage {
  color: var(--primary-accent);
}

.food-category .percentage {
  color: #FF9F43;
}

.transport-category .percentage {
  color: #2E86DE;
}

.leisure-category .percentage {
  color: #5F27CD;
}

.others-category .percentage {
  color: var(--secondary-gray);
}

/* Gráfico de Visualização */
.expense-visualization {
  margin-top: 3rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-container {
  height: 300px;
  position: relative;
}

/* Responsividade */
@media (max-width: 1200px) {
  .categories-grid {
    gap: 1.2rem;
  }
  
  .category-item {
    padding: 1.2rem;
  }
}

@media (max-width: 992px) {
  .expense-categories {
    padding: 2rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .category-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
  }
  
  .category-value {
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    margin-left: 0;
    margin-top: 0.8rem;
  }
  
  .expense-visualization {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .expense-categories {
    padding: 1.5rem;
  }
  
  .category-info {
    gap: 1rem;
  }
  
  .category-icon {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }
  
  .amount {
    font-size: 1.1rem;
  }
}
