.report-insights {
  overflow: hidden;
}
.report-overview {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
}
.report-overview-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}
.primary-report-charts {
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, .75fr);
}

.chart-module {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  display: grid;
  gap: 10px;
  padding: 12px;
}

.chart-module-wide {
  min-height: 14rem;
}

.chart-module[hidden] {
  display: none;
}
.chart-restore-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-3);
}
.chart-restore-list[hidden] {
  display: none;
}

.chart-module h3 {
  margin: 0;
}
.chart-module-header {
  align-items: start;
}
.chart-module-description {
  margin-top: 4px;
}
.chart-module-body {
  display: grid;
  gap: var(--space-3);
}

.chart-module-actions {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}
.chart-module-empty {
  align-content: start;
  min-height: 0;
}
.chart-module-empty .compact-empty-state {
  background: var(--panel-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  display: block;
  min-height: 0;
  padding: 10px 12px;
  text-align: left;
}
.chart-module-body-with-legend {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(8rem, .55fr);
}
.chart-module-legend {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.chart-module-legend li {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 8px;
  justify-content: space-between;
}
.chart-module-legend span {
  background: var(--legend-color);
  border-radius: 999px;
  flex: 0 0 10px;
  height: 10px;
}
.chart-canvas-wrap {
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  height: 12rem;
  overflow: hidden;
  padding: 12px;
  position: relative;
}
.chart-empty-state {
  align-items: center;
  background: rgba(248, 251, 255, .92);
  border-radius: inherit;
  display: flex;
  inset: 0;
  justify-content: center;
  margin: 0;
  position: absolute;
  text-align: center;
  z-index: 1;
}
.chart-empty-state[hidden] {
  display: none;
}
.chart-canvas-wrap-small {
  height: 12rem;
  min-width: 10rem;
}
.chart-canvas-wrap canvas {
  display: block;
  height: 100%;
  width: 100%;
}
.reports-list-heading {
  border-top: 1px solid var(--line);
  padding-top: var(--space-3);
}
@media (max-width: 760px) {
  .primary-report-charts{
    grid-template-columns: 1fr;
  }
  .chart-module-body-with-legend {
    grid-template-columns: 1fr;
  }
  .chart-canvas-wrap {
    height: 10rem;
  }
}

.report-workspace-header {
  display: grid;
  gap: var(--space-3);
}

.report-workspace-header .page-header {
  margin-bottom: 0;
}

.report-tab-list {
  flex-wrap: nowrap;
  min-width: max-content;
}

.report-tab-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

.report-tab-scroll:focus-visible {
  border-radius: var(--radius-sm);
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.report-overview {
  margin-bottom: 0;
}

.report-state-card {
  min-height: 0;
}

.report-state-card .report-state-body {
  align-items: start;
  display: grid;
  gap: var(--space-2);
  inset: auto;
  justify-content: start;
  padding: var(--space-3);
  position: static;
  z-index: auto;
}

.report-state-card .report-state-body strong {
  color: var(--ink);
  font-size: .95rem;
}

.report-state-card .report-state-body p {
  margin: 0;
  max-width: 58ch;
}

.report-state-card .report-state-body .button {
  justify-self: start;
}

.report-state-card[data-report-state="not-chartable"] {
  border-color: #bfdbfe;
}

.report-state-card[data-report-state="unavailable"] {
  border-color: #f5c2c7;
}

.report-state-card[data-report-state="unavailable"] .report-state-body {
  background: #fff7f7;
}

.report-results {
  display: grid;
  gap: var(--space-3);
}

.report-empty-result {
  align-items: center;
  background: var(--panel-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  gap: var(--space-3);
  justify-content: space-between;
  padding: var(--space-4);
}

.report-empty-result h3,
.report-empty-result p {
  margin: 0;
}

.report-empty-result p {
  margin-top: var(--space-1);
}

@media (max-width: 560px) {
  .report-tab-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: var(--space-1);
    scrollbar-width: thin;
  }

  .report-tab-list .workspace-tab {
    flex: 0 0 auto;
  }

  .report-empty-result {
    align-items: stretch;
    flex-direction: column;
  }

  .report-empty-result .button {
    justify-content: center;
  }
}
