.container {
  width: 100%;
}

/* Header */
.header {
  margin-bottom: 2rem;
}

.headerContent {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary, #1a1612);
  margin-bottom: 0.5rem;
  font-family: var(--font-playfair), 'Playfair Display', serif;
}

.subtitle {
  font-size: 1rem;
  color: var(--text-secondary, #5c564d);
  margin: 0;
  line-height: 1.6;
}

.addButton {
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  background: var(--accent-coral, #e07256);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.addButton:hover {
  background: var(--accent-coral-dark, #c45a3f);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(224, 114, 86, 0.3);
}

/* Metric Selector */
.metricSelector {
  background: var(--bg-card, white);
  border: 1px solid var(--border-color, #e5dfd5);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-soft, 0 2px 8px rgba(26, 22, 18, 0.06));
}

.metricLabel {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary, #1a1612);
  white-space: nowrap;
}

.metricSelect {
  flex: 1;
  max-width: 400px;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  border: 1px solid var(--border-color, #e5dfd5);
  border-radius: 8px;
  background: var(--bg-card, white);
  color: var(--text-primary, #1a1612);
  cursor: pointer;
  transition: all 0.2s ease;
}

.metricSelect:hover {
  border-color: var(--accent-coral, #e07256);
}

.metricSelect:focus {
  outline: none;
  border-color: var(--accent-coral, #e07256);
  box-shadow: 0 0 0 3px rgba(224, 114, 86, 0.15);
}

/* Schools Section */
.schoolsSection {
  margin-bottom: 2rem;
}

.schoolsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.schoolCard {
  background: var(--bg-card, white);
  border: 1px solid var(--border-color, #e5dfd5);
  border-left: 3px solid var(--accent-teal, #2d7d7d);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  box-shadow: var(--shadow-soft, 0 2px 8px rgba(26, 22, 18, 0.06));
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.schoolCard:hover {
  box-shadow: var(--shadow-medium, 0 4px 20px rgba(26, 22, 18, 0.1));
  transform: translateY(-2px);
}

.removeButton {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-coral, #e07256);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.removeButton:hover {
  background: var(--accent-coral-dark, #c45a3f);
  transform: scale(1.1);
}

.schoolName {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-right: 2rem;
  line-height: 1.3;
  font-family: var(--font-playfair), 'Playfair Display', serif;
}

.schoolName a {
  color: var(--text-primary, #1a1612);
  text-decoration: none;
  transition: color 0.2s ease;
}

.schoolName a:hover {
  color: var(--accent-coral, #e07256);
}

.schoolMeta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex: 1;
}

.metaItem {
  font-size: 0.875rem;
  color: var(--text-secondary, #5c564d);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.latestValue {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #e5dfd5);
  text-align: center;
  background: var(--bg-secondary, #f3ede4);
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  margin-bottom: -1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 0 0 12px 9px;
}

.latestLabel {
  font-size: 0.75rem;
  color: var(--text-muted, #8a847a);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.latestNumber {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-teal, #2d7d7d);
}

/* Chart Section */
.chartSection {
  background: var(--bg-card, white);
  border: 1px solid var(--border-color, #e5dfd5);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-soft, 0 2px 8px rgba(26, 22, 18, 0.06));
}

.sectionTitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary, #1a1612);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color, #e5dfd5);
  font-family: var(--font-playfair), 'Playfair Display', serif;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sectionTitle::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1em;
  background: var(--accent-coral, #e07256);
  border-radius: 2px;
}

.chartContainer {
  width: 100%;
  height: 400px;
  position: relative;
}

.loadingMessage {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary, #5c564d);
  font-size: 1rem;
}

/* Table Section */
.tableSection {
  background: var(--bg-card, white);
  border: 1px solid var(--border-color, #e5dfd5);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-soft, 0 2px 8px rgba(26, 22, 18, 0.06));
}

.tableWrapper {
  overflow-x: auto;
  margin-top: 1rem;
}

.comparisonTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.comparisonTable thead {
  background: var(--bg-secondary, #f3ede4);
}

.comparisonTable th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary, #1a1612);
  border-bottom: 2px solid var(--border-color, #e5dfd5);
  white-space: nowrap;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.comparisonTable td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color, #e5dfd5);
  color: var(--text-secondary, #5c564d);
  text-align: left;
}

.comparisonTable tbody tr:last-child td {
  border-bottom: none;
}

.comparisonTable tbody tr:hover {
  background: var(--bg-secondary, #f3ede4);
}

.yearCell {
  font-weight: 700;
  color: var(--accent-gold, #c9a227);
}

/* Empty State */
.emptyState {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card, white);
  border: 1px solid var(--border-color, #e5dfd5);
  border-radius: 12px;
}

.emptyStateTitle {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary, #1a1612);
  margin-bottom: 0.5rem;
  font-family: var(--font-playfair), 'Playfair Display', serif;
}

.emptyStateDescription {
  font-size: 1rem;
  color: var(--text-secondary, #5c564d);
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .headerContent {
    flex-direction: column;
    align-items: stretch;
  }

  .addButton {
    width: 100%;
  }

  .header h1 {
    font-size: 1.75rem;
  }

  .metricSelector {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border-radius: 8px;
  }

  .metricSelect {
    max-width: 100%;
  }

  .schoolsGrid {
    grid-template-columns: 1fr;
  }

  .chartSection,
  .tableSection {
    padding: 1rem;
    border-radius: 8px;
  }

  .chartContainer {
    height: 300px;
  }

  .comparisonTable {
    font-size: 0.875rem;
  }

  .comparisonTable th,
  .comparisonTable td {
    padding: 0.75rem 0.5rem;
  }

  .latestValue {
    margin-left: -1rem;
    margin-right: -1rem;
    margin-bottom: -1rem;
    padding: 1rem;
    border-radius: 0 0 8px 5px;
  }
}
