/* Shared report layout, independent of the application viewport and navigation. */
.report-screen button { min-height: 44px; padding: 10px 18px; border: 1px solid var(--crivi-line, #ded5e8); border-radius: var(--radius-control, 14px); background: white; color: var(--crivi-text, #2d2257); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.report-screen button.primary { background: var(--crivi-purple, #4b2184); border-color: transparent; color: white; }
.report-screen button:hover { filter: brightness(.96); }
.report-screen button:disabled { opacity: .55; cursor: wait; }
.report-screen :focus-visible { outline: 3px solid var(--crivi-purple-3, #9b52df); outline-offset: 3px; }
.report-screen input[type="checkbox"], .report-screen input[type="radio"] { accent-color: var(--crivi-purple, #4b2184); width: 17px; height: 17px; flex-shrink: 0; }
.report-screen [role="status"] { color: var(--crivi-text, #2d2257); }
.report-screen { max-width: 1150px; margin: 0 auto; color: var(--crivi-text, #2d2257); }
.report-screen-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 24px; }
.report-screen-heading span { font-size: 11px; font-weight: 700; letter-spacing: .13em; color: var(--crivi-muted, #766d8f); }
.report-screen-heading h1 { font-size: 30px; margin: 8px 0; }
.report-screen-heading p, .report-filter-heading p { color: var(--crivi-muted, #766d8f); line-height: 1.5; }
.report-filter-form { padding: 28px; border: 1px solid var(--crivi-line, #ded5e8); border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(42, 20, 82, .04); }
.report-filter-heading h2 { font-size: 20px; margin: 0 0 6px; }
.report-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 24px 0; }
.report-filter-grid label { display: grid; gap: 8px; font-size: 13px; font-weight: 600; min-width: 0; }
.report-filter-grid input, .report-filter-grid select { box-sizing: border-box; width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #d6cbe2; border-radius: 9px; background: #fff; color: var(--crivi-text, #2d2257); font: inherit; }
.report-environments { border: 1px solid var(--crivi-line, #ded5e8); border-radius: 12px; padding: 16px; min-width: 0; }
.report-environments legend { padding: 0 7px; font-weight: 600; }
.report-environments > label { display: inline-flex; margin: 6px 22px 6px 0; gap: 7px; }
.report-environments p { font-size: 12px; color: var(--crivi-muted, #766d8f); }
.report-environment-options, .report-column-options > div { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 14px 0; }
.report-environment-options[hidden] { display: none; }
.report-environment-options label, .report-column-options label { display: flex; align-items: center; gap: 7px; overflow-wrap: anywhere; }
.report-column-options { margin: 20px 0; font-size: 13px; }
.report-column-options summary { cursor: pointer; font-weight: 600; }
.report-form-actions, .report-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.report-form-actions [role="status"] { font-size: 13px; }
.report-actions { margin-bottom: 20px; }
.report-document { page: crivi-report; box-sizing: border-box; max-width: 210mm; margin: 0 auto; background: #fff; padding: 14mm; border: 1px solid var(--crivi-line, #ded5e8); color: var(--crivi-ink, #201345); font: 12px/1.45 Arial, sans-serif; overflow-wrap: anywhere; }
.report-heading { border-bottom: 2px solid var(--crivi-purple, #4b2184); padding-bottom: 16px; margin-bottom: 15px; }
.report-brand { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 700; color: var(--crivi-purple, #4b2184); }
.report-heading h1 { font-size: 27px; line-height: 1.2; margin: 14px 0 6px; color: var(--crivi-ink, #201345); }
.report-heading p { margin: 5px 0; }
.report-tenant { font-weight: 600; }
.report-metadata { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 16px; margin: 0; }
.report-metadata div { display: flex; gap: 5px; flex-wrap: wrap; }
.report-metadata dt { font-weight: 700; }
.report-metadata dd { margin: 0; }
.report-issued { color: var(--crivi-muted, #766d8f); font-size: 10px; margin: 14px 0; }
.report-table-wrap { width: 100%; }
.report-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 10px; }
.report-table caption { text-align: left; font-weight: 600; padding: 0 0 8px; }
.report-table th, .report-table td { padding: 8px 5px; border-bottom: 1px solid #e6dfec; text-align: left; vertical-align: top; overflow-wrap: anywhere; white-space: normal; }
.report-table th { background: var(--crivi-lavender, #f5effb); color: var(--crivi-purple, #4b2184); font-weight: 700; }
.report-table .report-number { text-align: right; font-variant-numeric: tabular-nums; }
.report-totals { display: flex; flex-wrap: wrap; gap: 24px; justify-content: flex-end; margin-top: 16px; padding: 14px; background: var(--crivi-lavender-2, #fbf8ff); }
.report-totals div { display: grid; gap: 5px; }
.report-totals span { font-size: 10px; }
.report-totals strong { font-size: 17px; }
.report-observations { margin-top: 22px; font-size: 10px; color: var(--crivi-muted, #766d8f); }
.report-observations h2 { font-size: 11px; margin: 0; }
.report-footer { border-top: 1px solid #e6dfec; margin-top: 24px; padding-top: 10px; font-size: 9px; color: var(--crivi-muted, #766d8f); }
.report-print-frame { position: fixed; left: -10000px; top: 0; width: 210mm; height: 297mm; border: 0; }
.report-print-page { margin: 0; background: white; }
@media screen and (max-width: 700px) {
  .report-screen-heading { align-items: flex-start; flex-direction: column; }
  .report-filter-form { padding: 18px; }
  .report-filter-grid { grid-template-columns: 1fr; }
  .report-document { padding: 18px; }
  .report-metadata { grid-template-columns: 1fr; }
  .report-table-wrap { overflow-x: auto; }
  .report-table { min-width: 620px; }
}
@page crivi-report {
  size: A4 portrait;
  margin: 14mm 12mm 17mm;
  @bottom-right { content: "Página " counter(page) " de " counter(pages); font: 9px Arial, sans-serif; color: var(--crivi-muted, #766d8f); }
}
@media print {
  /* Also handle Ctrl+P from a preview: expose only the document and its ancestors. */
  body:has(.report-document) *:not(.report-document):not(.report-document *):not(:has(.report-document)) { display: none !important; }
  body:has(.report-document), body:has(.report-document) *:has(.report-document) { display: block !important; position: static !important; width: auto !important; max-width: none !important; height: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; background: white !important; box-shadow: none !important; border: 0 !important; transform: none !important; }
  .report-document { max-width: none; width: 100%; margin: 0; padding: 0; border: 0; box-shadow: none; }
  .report-table-wrap { overflow: visible; }
  .report-table { width: 100%; min-width: 0; font-size: 9pt; }
  .report-table thead { display: table-header-group; }
  .report-table tr, .report-totals, .report-footer { break-inside: avoid; page-break-inside: avoid; }
  .report-heading, .report-table caption { break-after: avoid; }
  .report-document p { orphans: 3; widows: 3; }
  .report-heading { print-color-adjust: exact; }
  .report-actions, .report-print-frame { display: none !important; }
}
