body[data-page="competition"] {
  background: #eef1f7;
}

.competition-page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.competition-header,
.competition-filterbar {
  border-radius: 10px;
  box-shadow: none;
  background: #f2f4f8;
}

.competition-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.competition-header__title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.15;
  color: #0f172a;
}

.competition-header__title span {
  font-size: 1.95rem;
  margin-left: 8px;
}

.competition-header__title small {
  font-size: 1.4rem;
  color: #64748b;
  font-weight: 500;
}

.competition-header__actions .toolbar-btn,
.competition-header__actions .toolbar-select {
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
}

.competition-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 14px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.filter-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #334155;
  font-size: 0.92rem;
}

.filter-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff;
  color: #64748b;
  font-size: 0.84rem;
}

.filter-chip.is-active {
  background: #e9f8ef;
  color: #237b4b;
  border-color: #9ad4b3;
  font-weight: 600;
}

#refresh-status {
  color: #64748b;
  font-size: 0.8rem;
  margin-left: 4px;
}

.competition-layout {
  display: grid;
  grid-template-columns: 1.75fr 0.95fr;
  gap: 12px;
}

.competition-main,
.competition-side {
  display: grid;
  gap: 12px;
}

.title-muted {
  color: #64748b;
  font-weight: 500;
}

.selected-field {
  margin: 0 0 10px;
  color: #334155;
  font-size: 0.95rem;
  font-weight: 500;
}

.competition-map-shell {
  border-radius: 10px;
}

.competition-map-shell .map-canvas {
  height: 305px;
}


.competition-profile-image {
  position: relative;
  z-index: 2;
  margin-top: -108px;
  margin-bottom: -62px;
  pointer-events: none;
}

.competition-profile-image img {
  display: block;
  width: min(100%, 240px);
  height: auto;
  border-radius: 12px;
  margin-left: auto;
  object-fit: cover;
}

.competition-overview-panel {
  position: relative;
  z-index: 3;
}
.competition-table tbody tr td:last-child,
.roi-value {
  font-weight: 700;
  color: #1f7a4f;
}

.leader-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface-elevated) 72%, #fff);
  cursor: pointer;
}

.leader-item strong {
  font-size: 0.95rem;
}

.leader-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.leader-item .trend {
  align-self: center;
}

.stats-panel .panel__title {
  margin-bottom: 10px;
}

.stats-list {
  display: grid;
  gap: 8px;
}

.stats-item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 7px;
  font-size: 0.9rem;
}

.stats-item:last-child {
  border-bottom: 0;
}

.stats-item__icon {
  color: #237b4b;
}

.stats-item__label {
  color: #334155;
}

.stats-item__value {
  color: #237b4b;
}

.competition-legend .elite::before { background: #2a9d59; }
.competition-legend .transitioning::before { background: #d6aa34; }
.competition-legend .risk::before { background: #d96a4a; }

.notes-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

@media (max-width: 1180px) {
  .competition-layout {
    grid-template-columns: 1fr;
  }

  .competition-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .competition-header__title {
    font-size: 1.3rem;
  }

  .competition-header__title span,
  .competition-header__title small {
    font-size: 1rem;
  }
}
