.pie-chart-container {
  display: flex;
  flex-direction: column;
  height: 400px;
  min-height: 400px;
  padding: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: all 0.3s ease;
  border: 1px solid #eaeaea;
}

.pie-chart-container:hover {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.chart-title {
  font-size: 26px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 20px;
  text-align: center;
  padding-bottom: 15px;
  border-bottom: 2px solid #3498db;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chart-wrapper {
  position: relative;
  flex: 1;
  min-height: 250px;
  margin: 15px 0;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-wrapper canvas {
  max-width: 100%;
  max-height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.chart-wrapper canvas:hover {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
  transform: scale(1.02);
  transition: all 0.3s ease;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  border: 1px solid #dee2e6;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.legend-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 25px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #eaeaea;
  cursor: pointer;
}

.legend-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border-color: #3498db;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 12px;
  display: inline-block;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.legend-label {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin-right: 15px;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.legend-value {
  font-size: 16px;
  font-weight: 700;
  color: #3498db;
  background: linear-gradient(135deg, #e9ecef 0%, #dde1e5 100%);
  padding: 6px 12px;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  min-width: 40px;
  text-align: center;
}

.loading-indicator, .no-data-message {
  text-align: center;
  padding: 30px;
  color: #666;
  font-size: 18px;
  font-style: italic;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.loading-indicator p, .no-data-message p {
  margin: 10px 0 0 0;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

// Filter section styles
.filter-section {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f9f9f9;
}

.filter-group {
  margin-bottom: 15px;
  
  h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
  }
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.filter-item {
  flex: 1 1 300px;
  min-width: 250px;
  padding: 10px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.filter-label {
  font-weight: 500;
  margin-bottom: 8px;
  color: #555;
  font-size: 14px;
}

.filter-input {
  width: 100%;
  
  .filter-text-input,
  .filter-select,
  .filter-date {
    width: 100%;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
  }
  
  .filter-select {
    height: 34px;
  }
}

.multiselect-container {
  position: relative;
}

.multiselect-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  min-height: 34px;
  
  .multiselect-label {
    flex: 1;
    font-size: 14px;
  }
  
  .multiselect-value {
    color: #666;
    font-size: 12px;
    margin-right: 8px;
  }
  
  .dropdown-icon {
    flex-shrink: 0;
    transition: transform 0.2s ease;
  }
  
  &:hover {
    border-color: #999;
  }
}

.multiselect-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  max-height: 200px;
  overflow-y: auto;
  
  .checkbox-group {
    padding: 8px;
    
    .checkbox-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 4px 0;
      
      .checkbox-label {
        margin: 0;
        font-size: 14px;
        cursor: pointer;
      }
    }
  }
}

.date-range {
  .date-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .date-separator {
    margin: 0 5px;
    color: #777;
  }
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  
  .toggle-label {
    margin: 0;
    font-size: 14px;
    cursor: pointer;
  }
}

.filter-actions {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  
  .btn {
    font-size: 13px;
  }
}

// New header row styling
.header-row {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
  
  .chart-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-align: left;
    padding-bottom: 0;
    border-bottom: none;
  }
}

// Responsive design
@media (max-width: 768px) {
  .pie-chart-container {
    padding: 15px;
    height: auto;
    min-height: 300px;
  }
  
  .chart-title {
    font-size: 20px;
    margin-bottom: 15px;
  }
  
  .chart-wrapper {
    min-height: 200px;
  }
  
  .chart-legend {
    flex-direction: column;
    align-items: center;
  }
  
  .legend-item {
    width: 100%;
    max-width: 300px;
    justify-content: space-between;
  }
  
  .no-data-message {
    font-size: 16px;
    padding: 20px;
  }
  
  .filter-controls {
    flex-direction: column;
  }
  
  .filter-item {
    min-width: 100%;
  }
  
  .header-row {
    .chart-title {
      font-size: 16px;
    }
  }
}