/* Counters in the generated reports list. */
.report-overview h2 { margin: 0 0 10px; }
.summary.report-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 16px 0;
  margin-top: 0;
}
.report-counts > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-inline: 8px;
  text-align: center;
}
.report-counts > div + div { border-inline-start: 1px solid var(--line); }
.report-counts dt { color: var(--muted); font-size: .875rem; line-height: 1.25; }
.report-counts dd { order: -1; margin: 0; font-size: 1.5rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }

#report-generator { max-width: 940px; max-height: 90dvh; overflow: auto; background: var(--paper, #fff); }
[data-theme="dark"] #report-generator { background: #242427; }
#report-generator [hidden] { display: none !important; }
.report-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 12px 0; }
.report-controls label { display: grid; gap: 5px; flex: 1 1 150px; min-width: 0; font-size: .85rem; }
.report-controls input, .report-controls select { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: inherit; }
.report-controls select,
.report-controls select option {
  background-color: var(--surface);
  color: var(--ink);
}
.report-controls select { color-scheme: light; }
[data-theme="dark"] .report-controls select { color-scheme: dark; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.report-message { margin: 10px 0; }
.report-sheet { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 12px; }
#report-generator .report-sheet-header {
  position: static;
  height: auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  background: transparent;
  border: 0;
  padding: 0;
}
.report-sheet-header > div { min-width: 0; overflow-wrap: anywhere; }
.report-sheet-header img { width: 105px; max-width: 30%; height: auto; }
.report-sheet h2, .report-sheet h3 { margin: 8px 0; }
.report-sheet section { margin-block: 16px; }
.report-fields { display: flex; flex-wrap: wrap; gap: 12px; }
.report-fields div { flex: 1 1 135px; min-width: 0; overflow-wrap: anywhere; }
.report-fields dt { font-size: .8em; font-weight: 600; }
.report-fields dd { margin: 0; }
.report-table { overflow-x: auto; }
.report-table table { width: 100%; display: table !important; font-size: .85em; }
.report-photos { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(200px,100%),1fr)); gap: 12px; }
.report-photos figure { margin: 0; break-inside: avoid; }
.report-photos img { display: block; width: 100%; height: auto; }
.report-photos figcaption { font-size: .8em; }
.report-sheet footer { position: static; padding: 8px 0; }
@media print {
  @page { margin: 13mm; }
  body.report-printing > :not(#report-generator) { display: none !important; }
  body.report-printing, body.report-printing #report-generator { color: #1b1b1e !important; background: #fff !important; }
  body.report-printing #report-generator { position: static; width: 100%; max-width: none; max-height: none; overflow: visible; border: 0; padding: 0; margin: 0; }
  #report-generator::backdrop, #report-generator > :not(.report-sheet) { display: none !important; }
  .report-sheet { border: 0; margin: 0; padding: 0; }
  .report-sheet-header, .report-sheet table, .report-sheet table :is(th, td), .report-sheet footer, .report-sheet .subtitle { color: #1b1b1e !important; background: #fff !important; }
  .report-sheet-header { break-after: avoid; }
  .report-sheet h3 { break-after: avoid; }
  .report-table { overflow: visible; }
  .report-table th, .report-table td { padding: 5px !important; overflow-wrap: anywhere; }
  .report-table tr { break-inside: avoid; }
  .report-photos { grid-template-columns: repeat(2,1fr); }
}
