/* ── Print / PDF stylesheet ────────────────────────────────────
   Loaded only during window.print().
   Hides all UI chrome and renders only #printable-report on A4.
   ──────────────────────────────────────────────────────────── */

@page {
  size: A4 portrait;
  margin: 18mm 20mm;
}

/* ── Hide everything except the active print target ── */
body > * { display: none !important; }

/* Mode: Report */
body:not(.printing-voucher) #app-content,
body:not(.printing-voucher) #view-reports { display: block !important; }

body:not(.printing-voucher) #report-controls,
body:not(.printing-voucher) #report-print-bar { display: none !important; }

body:not(.printing-voucher) #report-output,
body:not(.printing-voucher) #printable-report { display: block !important; }

/* Mode: Voucher */
body.printing-voucher #voucher-print-template { 
  display: block !important; 
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

/* ── Base print styles ── */
body {
  background: #fff !important;
  color: #000 !important;
  font-family: 'Georgia', serif;
  font-size: 10pt;
  line-height: 1.45;
}

/* ── Report header ── */
.rpt-header {
  text-align: center;
  border-bottom: 2px solid #1a5c38;
  padding-bottom: 8pt;
  margin-bottom: 14pt;
}

.rpt-org {
  font-size: 10pt;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #555;
  margin-bottom: 3pt;
}

.rpt-title {
  font-size: 18pt;
  font-weight: bold;
  color: #1a5c38;
  margin: 0 0 3pt;
}

.rpt-meta { font-size: 8pt; color: #777; margin: 0; }

/* ── Sections ── */
.rpt-section {
  margin-bottom: 16pt;
  page-break-inside: avoid;
}

.rpt-section-heading {
  font-size: 11pt;
  font-weight: bold;
  color: #1a5c38;
  border-bottom: 1px solid #ccc;
  padding-bottom: 3pt;
  margin-bottom: 6pt;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Activities ── */
.rpt-activity {
  margin-bottom: 10pt;
  page-break-inside: avoid;
}

.rpt-activity-heading {
  font-size: 10pt;
  font-weight: bold;
  margin-bottom: 1pt;
}

.rpt-activity-meta {
  font-size: 8pt;
  color: #666;
  margin-bottom: 4pt;
}

/* ── Tables ── */
.rpt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8.5pt;
  margin-bottom: 6pt;
}

.rpt-table thead tr {
  background-color: #1a5c38 !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  color: #fff !important;
}

.rpt-table thead th {
  padding: 4pt 6pt;
  text-align: left;
  font-size: 7.5pt;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rpt-table tbody td {
  padding: 3pt 6pt;
  border-bottom: 0.5pt solid #ddd;
  vertical-align: top;
}

.rpt-table .total-row td {
  border-top: 1.5pt solid #1a5c38;
  border-bottom: none;
  background-color: #f2f7f4 !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  padding-top: 4pt;
}

.rpt-summary-table tbody tr:last-child td {
  font-size: 11pt;
  padding-top: 5pt;
}

.text-right { text-align: right !important; }

/* ── Signed Yes/No ── */
.signed-yes { color: #1a5c38; font-weight: bold; }
.signed-no  { color: #c0392b; }

/* ── Closing section ── */
.rpt-closing { page-break-inside: avoid; }

.rpt-balance-danger td { color: #c0392b !important; }
.rpt-balance-ok    td { color: #1a5c38 !important; }

/* ── Narrow tables (Budget Line, Closing Summary) ── */
.rpt-narrow { max-width: 320pt; }

/* ── Empty / placeholder ── */
.rpt-empty, .rpt-empty-cell {
  font-style: italic;
  color: #888;
  font-size: 8.5pt;
  padding: 4pt 0;
}

/* ── Badges ── */
.badge { border: 0.5pt solid #ccc; padding: 1pt 4pt; border-radius: 3pt; font-size: 7.5pt; }
