.popup__section {
  display: grid;
  gap: 8px;
}

.popup__section--occurrences {
  gap: 12px;
}

.popup__section-title {
  margin: 0;
  color: var(--popup-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
}

.popup__group {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--popup-border);
}

.popup__group:first-of-type {
  padding-top: 0;
  border-top: none;
}

.popup__group-title {
  font-weight: 600;
  color: var(--popup-accent);
}

.popup__list {
  display: grid;
  gap: 6px;
}

.popup__kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.popup__kv-label {
  color: var(--popup-muted);
}

.popup__kv-value {
  text-align: right;
}

.popup__status-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  margin-left: 4px;
  border: 1px solid var(--popup-badge-border);
  border-radius: 999px;
  color: var(--popup-accent);
  cursor: help;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  vertical-align: text-top;
}

.popup__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.popup__row-main {
  min-width: 0;
}

.popup__row-title {
  font-weight: 500;
}

.popup__meta {
  color: var(--popup-muted);
  font-style: italic;
}

.popup__badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.popup__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--popup-badge-border);
  background: var(--popup-badge-bg);
  color: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.popup__badge--env {
  background: rgba(216, 107, 62, 0.2);
  border-color: rgba(216, 107, 62, 0.35);
}

.popup__badge--na {
  background: rgba(203, 213, 201, 0.18);
  border-color: rgba(203, 213, 201, 0.3);
}

.popup__badge--pat {
  background: rgba(169, 200, 141, 0.22);
  border-color: rgba(169, 200, 141, 0.34);
}

.popup__badge--action {
  background: rgba(116, 160, 209, 0.2);
  border-color: rgba(116, 160, 209, 0.34);
}

.popup__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.popup__tag {
  display: inline-flex;
  align-items: center;
  position: relative;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--popup-badge-border);
  background: var(--popup-badge-bg);
  font-size: 11px;
  font-weight: 600;
}

.popup__tag[data-tooltip] {
  cursor: help;
}

.popup__tooltip {
  position: absolute;
  z-index: 5;
  width: max-content;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: rgba(10, 14, 12, 0.96);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  text-transform: none;
  transform: translateY(4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  white-space: normal;
}

.popup__tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.popup__tag--env {
  background: rgba(210, 43, 43, 0.28);
  border-color: rgba(210, 43, 43, 0.62);
}

.popup__tag--positive {
  background: rgba(169, 200, 141, 0.24);
  border-color: rgba(169, 200, 141, 0.46);
}

.popup__tag--pat {
  background: rgba(74, 144, 196, 0.24);
  border-color: rgba(74, 144, 196, 0.52);
}

.popup__tag--sui {
  background: rgba(224, 196, 79, 0.28);
  border-color: rgba(224, 196, 79, 0.6);
}

.popup__tag--link {
  background: rgba(116, 160, 209, 0.22);
  border-color: rgba(116, 160, 209, 0.46);
  color: inherit;
  text-decoration: none;
}

.popup__tag--env.popup__tag--link {
  background: rgba(210, 43, 43, 0.28);
  border-color: rgba(210, 43, 43, 0.62);
}

.popup__action:hover {
  filter: brightness(1.08);
}

.popup__empty {
  color: var(--popup-muted);
  font-style: italic;
}

.eco-report {
  --eco-blue: #1d3557;
  --eco-teal: #2a9d8f;
  --eco-sky: #457b9d;
  --eco-rust: #c05c2f;
  --eco-yellow: #a67c2e;
  --eco-purple: #7b5ea7;
  --eco-red: #c62828;
  max-width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  color: #203036;
}

.eco-report__header {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 18px 58px 18px 22px;
  background: linear-gradient(135deg, rgba(29, 53, 87, 0.96), rgba(29, 53, 87, 0.58));
  color: #ffffff;
}

.eco-report__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 700;
}

.eco-report__title {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 21px;
  line-height: 1.1;
}

.eco-report__subtitle {
  margin-top: 4px;
  font-size: 13px;
  font-style: italic;
  opacity: 0.86;
}

.eco-report__kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.eco-report__kpi {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 16px 14px 12px;
  color: #ffffff;
  text-align: center;
}

.eco-report__kpi--surface {
  background: var(--eco-blue);
}

.eco-report__kpi--species {
  background: var(--eco-teal);
}

.eco-report__kpi--data {
  background: var(--eco-sky);
}

.eco-report__kpi--status {
  background: var(--eco-rust);
}

.eco-report__kpi-value {
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
}

.eco-report__kpi-label {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.26);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eco-report__kpi-sub {
  font-size: 11px;
  font-style: italic;
  opacity: 0.78;
}

.eco-report__body,
.eco-report__panel,
.eco-report__habitats,
.eco-report__obs-table,
.eco-report__status-list,
.eco-report__profile-table {
  display: grid;
  min-width: 0;
}

.eco-report__body {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "habitats status"
    "observations profile";
  align-items: start;
}

.eco-report__panel--habitats {
  grid-area: habitats;
}

.eco-report__panel--observations {
  grid-area: observations;
}

.eco-report__panel--status-species {
  grid-area: status;
}

.eco-report__panel--functional-profile {
  grid-area: profile;
}

.eco-report__section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 9px 18px;
  background: var(--eco-teal);
  color: #ffffff;
  font-size: 14px;
  line-height: 1.2;
  min-width: 0;
  overflow-wrap: anywhere;
}

.eco-report__section-title--observations {
  background: var(--eco-sky);
}

.eco-report__section-title--status-species {
  background: var(--eco-rust);
}

.eco-report__panel--habitats .eco-report__section-title {
  background: var(--eco-yellow);
}

.eco-report__section-title--functional-profile {
  background: var(--eco-purple);
}

.eco-report__section-title--observations span:last-child,
.eco-report__section-title--status-species span:last-child {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.82;
}

.eco-report__habitat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 48px;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  padding: 6px 18px;
  border-bottom: 1px solid #e1ecea;
  background: #f8fbfa;
  font-size: 13px;
  min-width: 0;
}

.eco-report__habitat-row:nth-child(even) {
  background: #eef5f3;
}

.eco-report__habitat-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.eco-report__bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #d9e9e7;
}

.eco-report__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #1a6e8a;
}

.eco-report__pct {
  color: #087a6d;
  font-weight: 700;
  text-align: right;
}

.eco-report__obs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px 72px;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  padding: 6px 18px;
  border-bottom: 1px solid #dfe8ef;
  background: #f8fbff;
  font-size: 13px;
  min-width: 0;
}

.eco-report__obs-row:nth-child(odd) {
  background: #eef3f8;
}

.eco-report__obs-row--head {
  background: #e6eef6;
  color: var(--eco-sky);
  font-size: 12px;
  font-weight: 800;
}

.eco-report__obs-row span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.eco-report__obs-row span:nth-child(2),
.eco-report__obs-row span:nth-child(3) {
  color: #2d79a2;
  font-weight: 700;
  text-align: right;
}

.eco-report__obs-row--head span:nth-child(2),
.eco-report__obs-row--head span:nth-child(3) {
  color: inherit;
}

.eco-report__status-list {
  max-height: 244px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.eco-report__status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px minmax(86px, auto);
  align-items: center;
  gap: 10px;
  min-height: 32px;
  padding: 6px 16px;
  border-bottom: 1px solid #ecd8cf;
  background: #fff9f6;
  font-size: 12px;
  min-width: 0;
}

.eco-report__status-row:nth-child(even) {
  background: #f8eee9;
}

.eco-report__status-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.eco-report__status-count {
  color: var(--eco-rust);
  font-weight: 800;
  text-align: right;
}

.eco-report__status-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

.eco-report__status-tag {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 16px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #2d79a2;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.eco-report__profile-row {
  display: grid;
  grid-template-columns: minmax(0, 132px) minmax(120px, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 8px 16px;
  border-bottom: 1px solid #dfe8ef;
  background: #f8fbff;
  font-size: 12px;
  min-width: 0;
}

.eco-report__profile-row:nth-child(even) {
  background: #eef3f8;
}

.eco-report__profile-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.eco-report__profile-meter {
  display: grid;
  grid-template-columns: 16px minmax(120px, 1fr) minmax(38px, max-content);
  grid-template-rows: 16px 13px 16px;
  align-items: center;
  column-gap: 6px;
  row-gap: 3px;
  min-width: 0;
}

.eco-report__profile-track {
  position: relative;
  grid-column: 2;
  grid-row: 1 / 4;
  display: grid;
  grid-template-rows: 16px 13px 16px;
  gap: 3px;
  min-width: 0;
}

.eco-report__profile-bar {
  position: relative;
  grid-row: 2;
  height: 13px;
  overflow: hidden;
  border-radius: 2px;
  background: #d8e5ee;
}

.eco-report__profile-fill {
  display: block;
  height: 100%;
  background: var(--eco-blue);
}

.eco-report__profile-marker {
  position: absolute;
  top: 17px;
  height: 19px;
  width: 2px;
  background: var(--eco-red);
  transform: translateX(-1px);
  z-index: 2;
}

.eco-report__profile-average,
.eco-report__profile-current {
  position: absolute;
  max-width: min(116px, 48%);
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eco-report__profile-average {
  top: 0;
  color: var(--eco-red);
}

.eco-report__profile-current {
  bottom: 0;
  color: var(--eco-blue);
}

.eco-report__profile-bound {
  overflow: hidden;
  color: #6c7b7c;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eco-report__profile-bound--min {
  grid-column: 1;
  grid-row: 2;
  text-align: left;
}

.eco-report__profile-bound--max {
  grid-column: 3;
  grid-row: 2;
  max-width: 54px;
  text-align: right;
}

.eco-report__profile-position--start {
  text-align: left;
  transform: translateX(0);
}

.eco-report__profile-position--middle {
  text-align: center;
  transform: translateX(-50%);
}

.eco-report__profile-position--end {
  text-align: right;
  transform: translateX(-100%);
}

.eco-report__empty {
  padding: 12px 18px;
  background: #f8fbfa;
  color: #6c7b7c;
  font-style: italic;
}

@media (max-width: 720px) {
  .eco-report__header {
    padding: 16px 52px 16px 16px;
  }

  .eco-report__kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .eco-report__body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "habitats"
      "observations"
      "status"
      "profile";
  }

  .eco-report__habitat-row {
    grid-template-columns: minmax(0, 1fr) 76px 42px;
    padding-inline: 12px;
  }

  .eco-report__obs-row {
    grid-template-columns: minmax(0, 1fr) 64px 52px;
    padding-inline: 12px;
  }

  .eco-report__status-row {
    grid-template-columns: minmax(0, 1fr) 44px minmax(74px, auto);
    padding-inline: 12px;
  }

  .eco-report__profile-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding-inline: 12px;
  }

  .eco-report__section-title {
    align-items: flex-start;
    flex-direction: column;
  }
}
