.constituency-breakdown {
  background: white;
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.breakdown-header {
  margin-bottom: 2rem;
}

.breakdown-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.breakdown-header p {
  color: #666;
}

/* Loading and error states */
.loading-state,
.error-state,
.no-data-state {
  text-align: center;
  padding: 3rem 2rem;
}

.loading-state .loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

.error-state {
  color: #dc2626;
}

.no-data-state {
  color: #6b7280;
}

/* Statistics Section - New Clean Layout */
.stats-container {
  margin-bottom: 2rem;
}

.stats-grid {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}

.stat-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon {
  font-size: 1.25rem;
  color: white;
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.stat-title {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

/* Controls */
.constituency-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  max-width: 400px;
  display: flex;
  align-items: center;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  gap: 0.75rem;
  transition: border-color 0.2s ease;
}

.search-box:focus-within {
  border-color: #2c5282;
}

.search-box svg {
  color: #718096;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.search-box input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.9375rem;
  color: #1a1a1a;
}

.exact-match-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  cursor: pointer;
  user-select: none;
  font-size: 0.875rem;
  color: #4a5568;
}

.exact-match-toggle input[type="checkbox"] {
  cursor: pointer;
}

.exact-match-toggle span {
  white-space: nowrap;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  padding: 0.5rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}

.sort-control label {
  font-size: 0.875rem;
  color: #4a5568;
  font-weight: 500;
}

.sort-control select {
  border: none;
  outline: none;
  background: none;
  color: #1a1a1a;
  font-size: 0.875rem;
  cursor: pointer;
}

/* Chart */
.constituency-chart {
  margin-bottom: 2rem;
}

.constituency-chart h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

/* Table */
.constituency-table h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}

.constituency-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.constituency-table th {
  background: #f7fafc;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #4a5568;
  font-size: 0.875rem;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.constituency-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f7fafc;
  font-size: 0.875rem;
}

.constituency-table tr:last-child td {
  border-bottom: none;
}

.constituency-table tr:hover {
  background: #f7fafc;
}

.constituency-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #1a1a1a;
}

.constituency-icon {
  color: #718096;
  font-size: 1rem;
}

.utilization-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.813rem;
  display: inline-block;
}

.utilization-badge.utilization-high {
  background: #c6f6d5;
  color: #22543d;
}

.utilization-badge.utilization-medium {
  background: #fed7aa;
  color: #c05621;
}

.utilization-badge.utilization-low {
  background: #feb2b2;
  color: #c53030;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .stats-grid {
    gap: 1rem;
  }
  
  .stat-item {
    padding: 0.75rem;
  }
  
  .stat-number {
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  .constituency-breakdown {
    padding: 1.5rem;
  }

  .stats-grid {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .stat-item {
    flex-direction: row;
    padding: 1rem;
  }

  .stat-icon-wrapper {
    width: 40px;
    height: 40px;
  }

  .stat-icon {
    font-size: 1rem;
  }

  .stat-number {
    font-size: 1.125rem;
  }

  .constituency-controls {
    flex-direction: column;
  }

  .search-box {
    max-width: 100%;
  }

  .constituency-table {
    font-size: 0.813rem;
  }

  .constituency-table th,
  .constituency-table td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    padding: 0.75rem;
  }

  .stat-item {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .stat-icon-wrapper {
    width: 36px;
    height: 36px;
  }

  .stat-number {
    font-size: 1rem;
  }

  .stat-title {
    font-size: 0.75rem;
  }
}