.dashboard-stage:has(#reportFormView.is-active) { grid-template-columns: minmax(0, 1fr); }
#reportFormView { min-width: 0; }
.report-sheet {
  min-width: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.report-sheet [hidden] { display: none; }
.report-heading, .report-doctors-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.report-heading { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.report-heading h2 { margin: 0 0 8px; font-size: 1.15rem; }
.report-heading p, .report-heading > span, .report-doctors-heading > span {
  margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5;
}
.report-sheet h3 { margin: 24px 0 14px; font-size: 1rem; }
.report-sheet table { min-width: 0; table-layout: fixed; }
.report-sheet th, .report-sheet td {
  padding: 13px 10px; border-bottom: 1px solid var(--line);
  white-space: normal; overflow-wrap: anywhere; line-height: 1.4;
}
.report-sheet thead th { color: var(--muted); background: var(--surface-soft); font-size: 0.72rem; text-transform: none; }
.report-summary-table td { text-align: right; font-variant-numeric: tabular-nums; }
.report-summary-table th { text-align: left; font-weight: 400; }
.report-summary-table thead th:not(:first-child) { text-align: right; }
.report-summary-table th:first-child { width: 40%; }
.report-summary-table .report-total th, .report-summary-table .report-total td { font-weight: 500; background: var(--surface-soft); }
.report-footnote { margin: 12px 0; color: var(--muted); font-size: 0.76rem; line-height: 1.5; }
.report-column-modes { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 16px; }
.report-column-modes button {
  border: 1px solid var(--line); padding: 9px 14px; background: var(--surface);
  color: var(--muted); font: inherit; font-size: 0.8rem; cursor: pointer;
}
.report-column-modes button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.report-column-modes button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.report-doctors-wrap { max-width: 100%; overflow: auto; }
.report-doctors-table { font-size: 0.8rem; }
.report-doctors-table th { text-align: center; }
.report-doctors-table td { text-align: center; }
.report-doctors-table .report-identity { text-align: left; }
.report-doctors-table th:first-child { width: 8%; }
.report-doctors-table th:nth-child(2) { width: 23%; }
.report-doctors-table th:nth-child(3) { width: 22%; }
.report-doctors-table tbody tr:hover { background: var(--surface-soft); }
.report-doctors-table .report-blank { background: #fafbfc; }
.report-doctors-table tfoot { font-weight: 500; background: var(--surface-soft); }
.report-doctors-wrap.is-wide .report-doctors-table { min-width: 1350px; }
.report-doctors-wrap.is-wide th:first-child { width: 65px; }
.report-doctors-wrap.is-wide th:nth-child(2) { width: 170px; }
.report-doctors-wrap.is-wide th:nth-child(3) { width: 150px; }
.report-matching { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; font-size: 0.8rem; line-height: 1.5; }
.report-matching summary { cursor: pointer; color: var(--accent); }
.report-matching p { color: var(--muted); }
.report-notice { padding: 12px; border-left: 3px solid var(--orange, #f2a65a); background: #fff9f0; }
.report-detail-link {
  display: block; width: 100%; border: 0; padding: 0;
  color: inherit; background: none; font: inherit; text-align: inherit;
  line-height: inherit; cursor: pointer; overflow-wrap: anywhere;
}
.report-detail-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.report-detail-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.report-sheet tr[data-report-kind] { cursor: pointer; }
.report-sheet tr[data-report-kind]:hover { background: var(--surface-soft); }
body.report-details-open { overflow: hidden; }
.report-details-dialog .service-details-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.report-details-dialog .report-column-modes { margin-top: 18px; }
.report-details-dialog .service-details-table th:first-child,
.report-details-dialog .service-details-table td:first-child { width: auto; }
.report-details-dialog .service-details-table { table-layout: fixed; }
.report-details-dialog .report-detail-services th:first-child,
.report-details-dialog .report-detail-services td:first-child { width: 52%; }
.report-details-dialog .service-details-table th,
.report-details-dialog .service-details-table td { white-space: normal; overflow-wrap: anywhere; }
.report-details-dialog .service-details-table td.report-detail-selected { background: #f7edf5; }
.report-details-dialog small { display: block; color: var(--muted); margin-top: 5px; }
.report-details-dialog button:disabled { opacity: 0.5; cursor: default; }
@media (min-width: 981px) and (max-width: 1180px) {
  .dashboard-tabs.scenario-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .report-details-dialog .report-detail-services td:first-child { width: 100%; }
  .report-details-dialog .service-details-metrics { gap: 10px; }
  .report-details-dialog .service-details-metrics dd { font-size: 1rem; }
  .report-sheet { padding: 14px; }
  .report-heading, .report-doctors-heading { flex-direction: column; gap: 8px; }
  .report-summary-table { font-size: 0.78rem; }
  .report-sheet th, .report-sheet td { padding: 10px 5px; }
  .report-summary-table th:first-child { width: 32%; }
  .report-column-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-doctors-wrap.is-wide .report-doctors-table { min-width: 0; }
  .report-doctors-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .report-doctors-table tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 0; }
  .report-doctors-table td { display: flex; justify-content: space-between; gap: 12px; width: 100%; border: 0; text-align: right; }
  .report-doctors-table td::before { content: attr(data-label); flex: 0 0 48%; color: var(--muted); text-align: left; font-size: 0.74rem; }
  .report-doctors-table .report-detail-link { width: auto; min-width: 0; }
  .report-doctors-table .report-blank { min-height: 38px; }
}
