/* Reports inherit the cabinet palette and control system. */
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.report-filter { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.report-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.report-presets button { min-height: 30px; padding: 4px 10px; font-size: 12px; font-weight: 500; }
.reports form { display: grid; grid-template-columns: 1fr 1fr 1.3fr 1.3fr; gap: 12px; align-items: end; }
.reports form > div { min-width: 0; }
.reports form label { font-size: 12px; }
.report-search { grid-column: span 3; }
.report-note { max-width: 1080px; margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.report-totals { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 32px; padding: 0 0 24px; margin: 0 0 22px; border-bottom: 1px solid var(--border); }
.report-net > span { color: var(--muted); font-size: 12px; }
.report-net > strong { display: block; margin: 5px 0; font-size: 32px; font-weight: 600; line-height: 1.3; letter-spacing: -.9px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.report-net > small { display: block; font-size: 11px; }
.report-totals dl { display: grid; gap: 9px; margin: 0; }
.report-totals dl > div { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.report-totals dt { color: var(--muted); }
.report-totals dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-graph { padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.report-graph h2 { margin-bottom: 14px; font-size: 14px; }
.report-chart { display: block; width: 100%; height: auto; max-height: 230px; min-height: 140px; }
.report-chart text { fill: var(--muted); font: 12px "Segoe UI", Arial, sans-serif; }
.report-legend { display: flex; gap: 20px; margin-bottom: 10px; font-size: 12px; }
.report-legend span { display: flex; align-items: center; gap: 7px; }
.report-legend i { width: 16px; height: 0; border-top: 3px solid var(--primary); }
.report-legend i.refund { border-color: #687386; border-top-style: dashed; }
.report-daily { margin-top: 10px; font-size: 12px; }
.report-daily summary { min-height: 32px; color: var(--primary); cursor: pointer; }
.report-daily .table-wrap { margin-top: 8px; }
.report-table td, .report-table th { padding: 10px 12px; }
.report-table td:first-child { min-width: 166px; }
.report-table td small { display: block; max-width: 220px; margin-top: 2px; font-size: 12px; overflow-wrap: anywhere; white-space: normal; }
.report-table td:nth-child(2) { min-width: 140px; max-width: 220px; white-space: normal; overflow-wrap: anywhere; }
.report-table th:nth-child(n+5) { text-align: right; }
.report-actions a[aria-disabled=true] { opacity: .45; cursor: default; pointer-events: none; }
#report-print-document { display: none; }

@media (max-width: 1100px) {
  .reports form { grid-template-columns: 1fr 1fr; }
  .report-search { grid-column: auto; }
  .report-totals { grid-template-columns: 1fr 1fr; gap: 24px; }
  .report-net > strong { font-size: 28px; }
}

@media (max-width: 760px) {
  .reports .page-title { align-items: flex-start; flex-wrap: wrap; }
  .report-actions { width: 100%; }
  .report-actions > * { flex: 1; padding-inline: 10px; font-size: 12px; }
  .report-filter { padding-bottom: 20px; margin-bottom: 20px; }
  .report-presets { gap: 6px; }
  .report-presets button { min-height: 44px; padding-inline: 9px; }
  .reports form { gap: 12px 10px; }
  .reports form input, .reports form select { min-width: 0; padding-inline: 8px; font-size: 14px; }
  .report-search, .reports form > button { grid-column: 1 / -1; }
  .report-note { font-size: 11px; }
  .report-totals { grid-template-columns: 1fr; gap: 18px; padding-bottom: 20px; }
  .report-net > strong { font-size: 30px; }
  .report-totals dl { gap: 10px; }
  .report-chart { min-height: 130px; }
  .report-daily summary { min-height: 44px; padding-block: 10px; }
  .report-rows .table-footer { flex-wrap: wrap; }
}

/* Printing uses the complete, atomic snapshot fetched by reports-print. */
@media print {
  body.printing-report { background: white; color: black; }
  body.printing-report > #app,
  body.printing-report > #toast,
  body.printing-report > dialog { display: none !important; }
  body.printing-report > #report-print-document { display: block; padding: 0; font-size: 10pt; }
  #report-print-document .report-totals { grid-template-columns: 1fr 1fr; padding: 14px 0; margin: 14px 0; background: white; break-inside: avoid; }
  #report-print-document .report-net > strong { font-size: 25px; }
  #report-print-document .table-wrap { overflow: visible; }
  #report-print-document table { table-layout: fixed; white-space: normal; }
  #report-print-document th,
  #report-print-document td { min-width: 0; padding: 7px 4px; font-size: 8pt; overflow-wrap: anywhere; }
  #report-print-document td small { font-size: 7pt; }
  #report-print-document .amount { white-space: normal; }
  #report-print-document thead { display: table-header-group; }
  #report-print-document tr { break-inside: avoid; }
  #report-print-document h1 { font-size: 21pt; }
  #report-print-document .status { padding: 0; background: none; color: black; font-size: 7pt; white-space: normal; }
  #report-print-document .report-note { color: #333; font-size: 8pt; }
  @page { size: A4 landscape; margin: 12mm; }
}
