.relatorio-resultado-page {
  min-height: 100vh;
  padding: 34px clamp(22px, 3vw, 54px) 42px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.64), rgba(232, 223, 209, 0.84)),
    var(--color-bg);
}

.relatorio-resultado-header,
.relatorio-resultado-workspace {
  max-width: var(--content-max);
  margin: 0 auto;
}

.relatorio-resultado-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.relatorio-resultado-header h1 {
  margin: 0;
  color: var(--sa-marrom-escuro);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1;
}

.relatorio-resultado-header p {
  max-width: 780px;
  margin: 10px 0 0;
  color: var(--color-text-muted);
  font-size: 1rem;
}

.relatorio-resultado-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.relatorio-resultado-panel {
  min-width: 0;
}

.relatorio-resultado-records-header {
  align-items: flex-start;
}

.relatorio-resultado-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}

.relatorio-resultado-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.relatorio-resultado-table th,
.relatorio-resultado-table td {
  min-width: 210px;
  max-width: 240px;
  padding: 12px 14px;
  border-right: 1px solid rgba(62, 45, 31, 0.12);
  border-bottom: 1px solid rgba(62, 45, 31, 0.10);
  vertical-align: middle;
}

.relatorio-resultado-table th:first-child,
.relatorio-resultado-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
}

.relatorio-resultado-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f7efe3;
  color: var(--sa-marrom-escuro);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.relatorio-resultado-table thead th:first-child {
  z-index: 4;
}

.relatorio-resultado-table tbody th {
  background: #fffaf1;
  color: var(--color-text);
  font-size: 0.92rem;
  text-align: left;
}

.relatorio-resultado-table tbody td {
  background: rgba(255, 253, 248, 0.92);
  color: var(--color-text);
}

.relatorio-resultado-table .metric-column {
  min-width: 280px;
  max-width: 320px;
}

.report-column-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.report-column-title span {
  overflow-wrap: anywhere;
}

.report-select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(62, 45, 31, 0.22);
  border-radius: var(--radius-sm);
  background: #fffdf8;
  color: var(--color-text);
  font: inherit;
}

/* Mesmo bege do cabeçalho "Comparativo 1". */
.relatorio-resultado-table tbody .report-section-row > th {
  background: #f7efe3;
}

.report-section-row th {
  position: static;
  min-width: 0;
  max-width: none;
  padding: 10px 14px;
  color: var(--sa-marrom-escuro);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.relatorio-resultado-table tbody th small {
  display: block;
  margin-top: 3px;
  color: var(--color-text-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.report-value {
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.report-muted {
  color: var(--color-text-muted);
  font-weight: 800;
}

.report-cell-note {
  display: block;
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.report-cell-note.error {
  color: #a94438;
  white-space: normal;
}

@media (max-width: 1100px) {
  .relatorio-resultado-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .relatorio-resultado-header-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .relatorio-resultado-page {
    padding: 84px 16px 30px;
  }

  .relatorio-resultado-header-actions {
    width: 100%;
  }

  .relatorio-resultado-header-actions .primary-action,
  .relatorio-resultado-header-actions .secondary-action {
    flex: 1 1 100%;
    justify-content: center;
  }

  .relatorio-resultado-table th,
  .relatorio-resultado-table td {
    min-width: 190px;
    max-width: 220px;
  }

  .relatorio-resultado-table .metric-column {
    min-width: 230px;
    max-width: 260px;
  }
}
