.grup-changes-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grup-section {
  margin-bottom: 1.5rem;
}

.grup-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.grup-section__header .hisse-section-title {
  margin-bottom: 0;
}

.grup-pagination {
  margin-top: 0;
}

.grup-section .table-wrap {
  margin-top: 0;
}

.groups-chart-section {
  margin-top: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem 1.25rem;
}

.groups-chart-section.hidden {
  display: none;
}

.groups-chart-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.groups-chart-section__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.groups-chart {
  width: 100%;
  height: 360px;
}

.groups-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin-top: 0.85rem;
}

.groups-chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.78rem;
}

.groups-chart-legend__item:hover {
  color: var(--accent);
  text-decoration: underline;
}

.groups-chart-legend__swatch {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 99px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .grup-changes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .groups-chart {
    height: 280px;
  }
}

@media (max-width: 560px) {
  .grup-changes-grid {
    grid-template-columns: 1fr;
  }
}
