/* Isolated reporting workspace. All report columns and totals remain visible. */

.report-page {
  --report-ink: #172448;
  --report-muted: #66728c;
  --report-line: #dde4ef;
  --report-line-soft: #e9edf4;
  --report-surface: #fff;
  --report-accent: #112262;
  display: grid;
  gap: 16px;
  min-width: 0;
  color: var(--report-ink);
}

.report-page *,
.report-page *::before,
.report-page *::after {
  box-sizing: border-box;
}

.report-page .report-heading {
  min-height: 56px;
  padding: 0 2px;
  align-items: center;
}

.report-page .report-heading > div:first-child {
  min-width: 0;
}

.report-page .report-heading .eyebrow {
  margin: 0 0 4px;
  color: #71809d;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.report-page .report-heading h1 {
  color: var(--report-ink);
  font-size: clamp(1.16rem, 1.7vw, 1.42rem);
  font-weight: 780;
  letter-spacing: -.025em;
}

.report-page .report-heading__actions .table-excel-button {
  min-height: 40px;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgb(17 34 98 / 7%);
}

.report-page .report-filters {
  padding: 15px;
  border: 1px solid var(--report-line);
  border-radius: 13px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 11px;
  background: var(--report-surface);
  box-shadow: 0 7px 22px rgb(17 34 98 / 5%);
}

.report-page .report-filter {
  gap: 6px;
}

.report-page .report-filter > span {
  color: #53617d;
  font-size: .67rem;
  font-weight: 760;
  letter-spacing: .012em;
}

.report-page .report-filter input,
.report-page .report-filter select {
  height: 40px;
  border-color: #c8d1e0;
  border-radius: 8px;
  background: #fbfcfe;
  color: #243254;
  font-size: .75rem;
}

.report-page .report-filter input:hover,
.report-page .report-filter select:hover {
  border-color: #94a1ba;
  background: #fff;
}

.report-page .report-filter input:focus,
.report-page .report-filter select:focus {
  border-color: var(--report-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgb(17 34 98 / 10%);
}

.report-page .report-filters > .primary-button {
  min-width: 120px;
  min-height: 40px;
  border-radius: 8px;
  justify-self: end;
}

.report-page .report-feedback {
  min-height: 0;
  margin: -5px 2px 0;
}

.report-page .report-feedback:not(:empty) {
  min-height: 34px;
  padding: 9px 11px;
  border: 1px solid #d9e1ed;
  border-radius: 8px;
  background: #f7f9fc;
}

.report-page .report-feedback--error:not(:empty) {
  border-color: #efcecc;
  background: #fff5f4;
}

.report-page .report-coverage {
  margin: -5px 2px 0;
  padding: 9px 11px;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #f4f8fc;
  color: #40506d;
  font-size: .72rem;
  font-weight: 650;
}

.report-page .report-results {
  overflow: hidden;
  border: 1px solid var(--report-line);
  border-radius: 13px;
  box-shadow: 0 9px 28px rgb(17 34 98 / 6%);
}

.report-page .profit-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--report-line);
  background: var(--report-line);
}

.report-page .profit-summary__explanation {
  grid-column: 1 / -1;
  margin: 0;
  padding: 11px 16px;
  background: #fff;
  color: #4f5d78;
  font-size: .75rem;
}

.report-page .profit-summary__card {
  display: grid;
  gap: 7px;
  min-height: 90px;
  padding: 17px;
  align-content: center;
  background: #fff;
}

.report-page .profit-summary__card span {
  color: #67738b;
  font-size: .65rem;
  font-weight: 760;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.report-page .profit-summary__card strong {
  color: #1a2a54;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-variant-numeric: tabular-nums;
}

.report-page .profit-summary__card--result {
  background: #f0f4fb;
}

.report-page .profit-summary__card--result strong {
  color: #112262;
}

.report-page .profit-summary__warning {
  display: flex;
  grid-column: 1 / -1;
  gap: 9px;
  min-height: 42px;
  padding: 11px 16px;
  align-items: center;
  background: #fff3d8;
  color: #6d4300;
  font-size: .72rem;
}

.report-page .report-table-region {
  max-height: min(70vh, 760px);
  overflow: auto;
  outline: 0;
  scrollbar-gutter: stable;
}

.report-page .report-table-region:focus-visible {
  box-shadow: inset 0 0 0 2px rgb(17 34 98 / 15%);
}

.report-page .report-table {
  min-width: max(760px, 100%);
  color: #293653;
  font-size: .72rem;
}

.report-page .report-table th,
.report-page .report-table td {
  height: 43px;
  padding: 9px 12px;
  border-bottom-color: var(--report-line-soft);
}

.report-page .report-table thead th {
  position: sticky;
  z-index: 4;
  top: 0;
  background: #f4f6fa;
  box-shadow: inset 0 -1px 0 #dce2ed;
  color: #4c5974;
  font-size: .64rem;
  font-weight: 780;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.report-page .report-table__sort {
  display: flex;
  width: calc(100% + 24px);
  min-height: 43px;
  margin: -9px -12px;
  padding: 9px 12px;
  border: 0;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.report-page .report-table__sort:hover {
  background: #e9eef6;
}

.report-page .report-table__sort:focus-visible {
  border-radius: 4px;
  outline: 2px solid rgb(17 34 98 / 34%);
  outline-offset: -3px;
}

.report-page .report-table__sort::after {
  content: '↕';
  min-width: .8em;
  color: var(--report-accent);
  font-size: .78rem;
  line-height: 1;
}

.report-page .report-table th[aria-sort="ascending"] .report-table__sort::after {
  content: '↑';
}

.report-page .report-table th[aria-sort="descending"] .report-table__sort::after {
  content: '↓';
}

.report-page .report-table thead th:first-child,
.report-page .report-table tbody td:first-child,
.report-page .report-table tfoot th:first-child {
  position: sticky;
  left: 0;
  box-shadow: 1px 0 0 #e1e6ef, 7px 0 14px rgb(17 34 98 / 3%);
}

.report-page .report-table thead th:first-child {
  z-index: 6;
  background: #eef2f8;
}

.report-page .report-table tbody td:first-child {
  z-index: 2;
  background: #fff;
}

.report-page .report-table tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.report-page .report-table tbody tr:nth-child(even) td:first-child {
  background: #f8fafe;
}

.report-page .report-table tbody tr:hover > td,
.report-page .report-table tbody tr:focus-within > td {
  background: #fffbea;
}

.report-page .report-table tbody tr.report-table__row--warning > td {
  background: #fff3d8;
  color: #6d4300;
}

.report-page .report-table tbody tr.report-table__row--warning:hover > td,
.report-page .report-table tbody tr.report-table__row--warning:focus-within > td {
  background: #ffe9b8;
}

.report-page .report-table tfoot th {
  position: sticky;
  z-index: 3;
  bottom: 0;
  border-top: 1px solid #cfd7e6;
  background: #edf2fa;
  box-shadow: 0 -5px 14px rgb(17 34 98 / 4%);
  color: #182b61;
  font-weight: 790;
}

.report-page .report-table tfoot th:first-child {
  z-index: 5;
  background: #e9eef7;
}

.report-page .report-state {
  min-height: 190px;
  border: 0;
  background: linear-gradient(180deg, #fff 0%, #fafbfe 100%);
}

@media (max-width: 760px) {
  .report-page {
    gap: 12px;
  }

  .report-page .report-heading {
    min-height: 0;
  }

  .report-page .report-heading__actions,
  .report-page .report-heading__actions .table-excel-button {
    width: 100%;
  }

  .report-page .report-filters {
    padding: 13px;
    grid-template-columns: minmax(0, 1fr);
  }

  .report-page .report-table-region {
    max-height: none;
  }

  .report-page .profit-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .report-page .profit-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .report-page *,
  .report-page *::before,
  .report-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .report-page .report-heading__actions,
  .report-page .report-filters {
    display: none !important;
  }

  .report-page .report-results,
  .report-page .report-table-region {
    max-height: none;
    overflow: visible;
    border: 0;
    box-shadow: none;
  }

  .report-page .report-table thead th,
  .report-page .report-table tbody td:first-child,
  .report-page .report-table tfoot th {
    position: static;
  }
}
