.report-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  min-height: calc(100vh - 73px);
}

.report-main {
  min-width: 0;
  padding: 1.1rem 1.35rem 2.5rem;
}

.report-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  height: 36px;
  margin-bottom: 0.9rem;
  padding: 0 0.75rem;
  border: 1px solid oklch(78% 0 0 / 0.12);
  border-radius: 8px;
  background: oklch(16% 0.006 95);
  color: var(--muted);
  font-size: 0.82rem;
}

.report-search kbd {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.62rem;
  border: 1px solid oklch(78% 0 0 / 0.14);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
}

.crumb {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 0.85rem;
}

.crumb strong { color: var(--fg); font-weight: 600; }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 30px;
  padding: 0 0.7rem;
  border-radius: 8px;
  border: 1px solid oklch(78% 0 0 / 0.14);
  background: oklch(18% 0.006 95);
  color: var(--fg);
  font-size: 0.78rem;
}

.chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: oklch(78% 0.16 145);
}

.query-card,
.table-card {
  border: 1px solid oklch(78% 0 0 / 0.1);
  border-radius: 12px;
  background: oklch(13% 0.006 95);
}

.query-card { padding: 1rem 1rem 0.35rem; margin-bottom: 0.85rem; }

.query-kicker {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.query-total {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.query-total strong {
  font-size: 1.85rem;
  letter-spacing: -0.04em;
  font-weight: 650;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.delta {
  font-size: 0.82rem;
  font-weight: 600;
  color: oklch(78% 0.16 145);
  font-variant-numeric: tabular-nums;
}

.delta.down { color: oklch(72% 0.16 25); }

.chart-wrap {
  position: relative;
  margin: 0.55rem 0 0.35rem;
}

.chart-stage {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  height: 240px;
}

.y-axis,
.x-axis {
  color: var(--muted);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding-right: 0.4rem;
}

.x-axis {
  display: flex;
  justify-content: space-between;
  margin-left: 46px;
  padding-top: 0.35rem;
}

.chart-wrap svg { width: 100%; height: 100%; display: block; }

.chart-tip {
  position: absolute;
  min-width: 168px;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: oklch(22% 0.008 95);
  border: 1px solid oklch(78% 0 0 / 0.16);
  color: var(--fg);
  font-size: 0.75rem;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -110%);
  box-shadow: 0 10px 30px oklch(0% 0 0 / 0.35);
}

.chart-tip.visible { opacity: 1; }

.chart-tip b { display: block; font-size: 0.92rem; margin: 0.1rem 0; }

.annotation {
  position: absolute;
  width: 220px;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: oklch(96% 0.01 95);
  color: oklch(18% 0.01 95);
  font-size: 0.72rem;
  line-height: 1.35;
  box-shadow: 0 8px 24px oklch(0% 0 0 / 0.28);
}

.annotation strong { display: block; margin-bottom: 0.15rem; }

.table-card { overflow: auto; }

.report-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }

.report-table th,
.report-table td {
  padding: 0.62rem 0.9rem;
  border-bottom: 1px solid oklch(78% 0 0 / 0.08);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.report-table th:first-child,
.report-table td:first-child { text-align: left; }

.report-table th {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  background: transparent;
  font-family: var(--sans);
}

.report-table tr.totals td {
  font-weight: 650;
  color: var(--fg);
  border-bottom: 1px solid oklch(78% 0 0 / 0.14);
}

.report-table tbody tr:hover td { background: oklch(78% 0 0 / 0.03); }

.inspector {
  border-left: 1px solid oklch(78% 0 0 / 0.1);
  padding: 1rem 0.9rem 2rem;
  background: oklch(10% 0.005 95);
}

.inspector h3 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1rem 0 0.45rem;
}

.inspector h3:first-child { margin-top: 0; }

.inspector label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  padding: 0.28rem 0;
  color: var(--text);
}

.inspector input { accent-color: oklch(70% 0.12 188); }

@media (max-width: 1100px) {
  .report-shell { grid-template-columns: 1fr; }
  .inspector { border-left: 0; border-top: 1px solid oklch(78% 0 0 / 0.1); }
}

@media (prefers-reduced-motion: reduce) {
  .chart-tip { transition: none; }
}
