/* Used both by browser print and by Dompdf (loaded as @media print and as the
   base stylesheet for the PDF body). Keep this conservative — Dompdf supports
   a subset of CSS, so avoid grid, flexbox tricks, custom properties, etc. */

body { background: #fff; color: #111; font-family: "DejaVu Sans", "Helvetica", "Arial", sans-serif; font-size: 12pt; }

.r-wrap { width: 100%; padding: 0; }
.r-header { border-bottom: 2pt solid #111; padding-bottom: 6pt; margin-bottom: 12pt; }
.r-title { font-size: 20pt; font-weight: bold; letter-spacing: 1pt; text-transform: uppercase; }
.r-sub { font-size: 10pt; color: #555; }
.r-section { margin-bottom: 10pt; }
.r-section h4 { font-size: 9pt; text-transform: uppercase; letter-spacing: 1pt; color: #666; margin: 0 0 4pt; }
.r-row { width: 100%; margin-bottom: 4pt; }
.r-row .lbl { color: #555; display: inline-block; width: 110pt; vertical-align: top; }
.r-row .val { font-weight: bold; color: #111; display: inline-block; vertical-align: top; }
.r-row.is-empty, [data-optional-row].is-empty { display: none; }

/* Rent receipt: Style 3 — Stub (Dompdf-safe; no flex/grid, uses tables for layout) */
.rs-paper { background: #fff; color: #1a2330; font-family: "DejaVu Sans", Helvetica, Arial, sans-serif; border: 0.5pt solid #1a2330; padding: 18pt 22pt; font-size: 9pt; }
.rs-top { width: 100%; margin-bottom: 16pt; }
.rs-brand { font-size: 16pt; font-weight: bold; color: #5b6b81; float: left; }
.rs-top-meta { float: right; padding-top: 6pt; }
.rs-top::after { content: " "; display: block; clear: both; }
.rs-mini-label { color: #5fa3e3; }
.rs-body { width: 100%; }
.rs-body::after { content: " "; display: block; clear: both; }
.rs-col-left  { float: left; width: 58%; }
.rs-col-right { float: right; width: 38%; }
.rs-row { width: 100%; margin-bottom: 6pt; }
.rs-row .rs-label { color: #1a2330; display: inline-block; width: 80pt; vertical-align: bottom; }
.rs-row .rs-fill  { display: inline-block; border-bottom: 0.5pt solid #1a2330; padding: 0 3pt 1pt; min-width: 150pt; vertical-align: bottom; }
.rs-row-period .rs-fill { min-width: 70pt; }
.rs-to { padding: 0 3pt; color: #1a2330; display: inline-block; vertical-align: bottom; }
.rs-fill-lg { min-width: 220pt; }

.rs-paid-by { margin-bottom: 14pt; }
.rs-paid-by-label { font-weight: bold; display: inline-block; vertical-align: top; margin-right: 8pt; }
.rs-mode-list { list-style: none; margin: 0; padding: 0; display: inline-block; vertical-align: top; }
.rs-mode-list li { margin-bottom: 4pt; }
.rs-checkbox { display: inline-block; width: 8pt; height: 8pt; border: 0.5pt solid #1a2330; margin-right: 5pt; vertical-align: middle; }
.rs-checkbox.is-checked { background: #1a2330; }
.rs-checkbox.is-checked::after { content: "✓"; color: #fff; font-size: 7pt; line-height: 8pt; }

.rs-sig-block { text-align: right; }
.rs-stamp-slot { display: inline-block; margin-bottom: 4pt; }
.rs-sig-line { border-bottom: 0.5pt solid #1a76d2; width: 170pt; display: inline-block; height: 8pt; }
.rs-sig-label { display: block; margin-top: 2pt; color: #1a2330; font-weight: bold; }

/* Rent receipt: Style 2 — Classic fill-in (Dompdf-safe) */
.rc-paper { background: #f5ecd0; color: #2b2b2b; font-family: "DejaVu Serif", Georgia, serif; padding: 30pt 36pt; border: 0.5pt solid #d0c8a8; }
.rc-title { text-align: center; font-size: 18pt; font-weight: bold; margin: 0 0 18pt; }
.rc-meta { width: 100%; margin-bottom: 16pt; font-size: 10pt; }
.rc-meta > div:first-child { float: left; }
.rc-meta > div:last-child  { float: right; }
.rc-meta::after { content: " "; display: block; clear: both; }
.rc-body { font-size: 10.5pt; line-height: 22pt; margin: 0 0 16pt; }
.rc-fill { display: inline-block; min-width: 100pt; border-bottom: 0.5pt solid #333; padding: 0 4pt 1pt; }
.rc-fill-sm { min-width: 70pt; }
.rc-fill-lg { min-width: 220pt; }
.rc-stamp-row { text-align: right; padding: 10pt 0; }
.rc-stamp-row .rc-stamp { background: #fff; }
.rc-footer { width: 100%; margin-top: 18pt; font-size: 10pt; }
.rc-footer::after { content: " "; display: block; clear: both; }
.rc-foot-left { float: left; font-weight: bold; }
.rc-foot-right { float: right; text-align: right; }
.rc-sig { font-weight: bold; margin-bottom: 4pt; }
.rc-pan { font-weight: bold; }

/* Revenue stamp placeholder (Dompdf-safe) */
.r-stamp-placeholder { display: inline-block; width: 70pt; height: 56pt; border: 1pt dashed #888; background: #fafafa; text-align: center; padding: 4pt; vertical-align: top; }
.r-stamp-amount { font-weight: bold; font-size: 14pt; color: #555; }
.r-stamp-label { font-size: 7pt; letter-spacing: 0.5pt; color: #777; text-transform: uppercase; margin-top: 2pt; }
.r-table { width: 100%; border-collapse: collapse; margin: 6pt 0; font-size: 11pt; }
.r-table th, .r-table td { padding: 5pt 6pt; border-bottom: 0.5pt solid #ccc; text-align: left; }
.r-table th { background: #eef1f6; }
.r-table .num { text-align: right; }
.r-total { border-top: 2pt solid #111; padding: 5pt 0; font-weight: bold; font-size: 13pt; }
.r-signature { margin-top: 30pt; font-size: 10pt; }
/* Dompdf has no flexbox — use floats to mirror the screen's stamp-left /
   signature-right layout. */
.r-signature::after { content: " "; display: block; clear: both; }
.r-signature .r-stamp-placeholder { float: left; }
.r-signature .sig { float: right; width: 180pt; text-align: center; border-top: 0.5pt solid #555; color: #555; padding-top: 4pt; }
.r-stamp { border: 1.5pt solid #0fb27a; color: #0fb27a; padding: 4pt 8pt; font-weight: bold; letter-spacing: 1pt; text-transform: uppercase; font-size: 10pt; display: inline-block; }
.r-note { font-size: 9pt; color: #777; margin-top: 10pt; }

/* Thermal-receipt look — Dompdf has no clip-path support, so fall back to a
   thin border for the PDF. Layout matches the on-screen variant otherwise. */
.r-thermal { width: 240pt; margin: 0 auto; }
.r-thermal .t-paper { background: #fff; color: #111; font-family: "DejaVu Sans Mono", "Courier New", monospace; font-size: 10pt; text-align: center; padding: 18pt 14pt; border: 0.5pt solid #ddd; }
.r-thermal .t-paper-tex2 { background-image: url(/assets/img/texture-2.webp); background-repeat: no-repeat; background-size: cover; background-position: center; }
.r-thermal .t-logo { margin: 0 auto 4pt; }
.r-thermal .t-logo .logo-img { max-width: 70pt; max-height: 65pt; }
.r-thermal .t-welcome { letter-spacing: 1.5pt; font-weight: bold; font-size: 11pt; margin: 4pt 0 1pt; }
.r-thermal .t-pump-name { font-weight: bold; font-size: 10pt; margin-bottom: 8pt; }
.r-thermal .t-group { text-align: left; margin-bottom: 8pt; }
.r-thermal .t-line { font-size: 10pt; }
.r-thermal .t-footer { margin-top: 8pt; font-size: 10pt; }
.r-thermal .t-stars { letter-spacing: 0.5pt; margin-bottom: 2pt; }

/* Multi-receipt: one receipt per page */
.r-page-break { page-break-after: always; }

/* Logo badge / image in PDFs (Dompdf-safe) */
.logo-badge { display: inline-block; width: 36pt; height: 36pt; line-height: 36pt; text-align: center; border-radius: 18pt; font-weight: bold; font-size: 9pt; letter-spacing: 0.5pt; }
.logo-img { max-width: 48pt; max-height: 48pt; }

/* Variant switcher in PDF: only the active variant is rendered by PHP, so
   no toggling needed — but keep .r-variant defaulting to block so it shows. */
.r-variant { display: block; }

/* Internet invoice: Style 2 — Detailed Postpaid (Dompdf-safe) */
.ii-paper { background: #fff; color: #1a2330; border: 0.5pt solid #cdd3df; padding: 14pt 18pt 18pt; font-family: "DejaVu Sans", Helvetica, Arial, sans-serif; font-size: 8.5pt; }
.ii-band { border-top: 2pt dotted #1a76d2; margin: -4pt -18pt 12pt; }
.ii-top { width: 100%; margin-bottom: 10pt; }
.ii-top::after { content: " "; display: block; clear: both; }
.ii-customer { float: left; width: 38%; font-size: 9pt; }
.ii-logo-slot { float: left; width: 22%; text-align: center; padding-top: 4pt; }
.ii-logo-slot .logo-img { max-width: 80pt; max-height: 50pt; }
.ii-meta { float: right; width: 38%; font-size: 8pt; }
.ii-strong { font-weight: bold; margin-bottom: 2pt; }
.ii-soft { color: #4a5568; }
.ii-meta-row { padding: 1pt 0; }
.ii-meta-row > span:first-child { color: #1a76d2; display: inline-block; width: 50%; }
.ii-meta-row > span:last-child  { font-weight: bold; display: inline-block; width: 48%; text-align: right; }

.ii-payable { background: #f5f8fc; border: 0.5pt solid #cdd3df; padding: 6pt 9pt; font-weight: bold; margin: 10pt 0 14pt; font-size: 11pt; }
.ii-payable > span:first-child { float: left; }
.ii-payable > span:last-child  { float: right; color: #0a3aa4; font-size: 12pt; }
.ii-payable::after { content: " "; display: block; clear: both; }

.ii-section-title { text-align: center; font-size: 11pt; font-weight: bold; color: #0a3aa4; margin: 8pt 0 6pt; }
.ii-subtitle { font-weight: bold; margin: 10pt 0 4pt; }

.ii-table { width: 100%; border-collapse: collapse; margin-bottom: 10pt; font-size: 8.5pt; }
.ii-table th, .ii-table td { border: 0.5pt solid #cdd3df; padding: 4pt 6pt; text-align: left; }
.ii-table th { background: #eef2f7; font-weight: bold; }
.ii-table .num { text-align: right; }
.ii-row-strong td { background: #f5f8fc; font-weight: bold; }

.ii-plan-box { border: 0.5pt solid #cdd3df; padding: 8pt; margin-bottom: 10pt; background: #fafbfd; }
.ii-plan-name { font-weight: bold; margin-bottom: 5pt; }

.ii-charges thead tr:first-child th { background: #1a76d2; color: #fff; }

.ii-total-bar { background: #1a2330; color: #fff; padding: 5pt 9pt; font-weight: bold; margin-top: 5pt; font-size: 10pt; }
.ii-total-bar > span:first-child { float: left; }
.ii-total-bar > span:last-child  { float: right; }
.ii-total-bar::after { content: " "; display: block; clear: both; }

.ii-foot-note { color: #6b7280; font-size: 7.5pt; margin-top: 10pt; }

/* Tax-invoice variant (Dompdf-safe) */
.inv-style .inv-header { border-bottom: 1.5pt solid #111; padding-bottom: 6pt; margin-bottom: 10pt; }
.inv-brand-name { font-size: 14pt; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5pt; }
.inv-brand-addr { font-size: 9pt; color: #555; }
.inv-brand-meta { font-size: 8.5pt; color: #555; }
.inv-title { font-size: 10pt; font-weight: bold; text-transform: uppercase; letter-spacing: 2pt; background: #111; color: #fff; padding: 4pt 10pt; }
.inv-meta-table { width: 100%; border-collapse: collapse; margin: 8pt 0 12pt; font-size: 9pt; }
.inv-meta-table td { border: 0.5pt solid #ccc; padding: 5pt 6pt; vertical-align: top; width: 33%; }
.inv-meta-table td strong { font-size: 7pt; text-transform: uppercase; color: #777; letter-spacing: 0.5pt; }

/* Compact card variant (Dompdf-safe) */
.r-compact { width: 320pt; margin: 0 auto; border: 0.5pt solid #ccc; padding: 16pt 18pt; text-align: center; font-family: Helvetica, Arial, sans-serif; }
.cmp-head .cmp-name { font-size: 12pt; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5pt; }
.cmp-head .cmp-sub { font-size: 9pt; color: #777; }
.cmp-big { margin: 14pt 0; padding: 10pt 0; border-top: 0.5pt dashed #999; border-bottom: 0.5pt dashed #999; }
.cmp-amount { font-size: 22pt; font-weight: bold; color: #1f6feb; }
.cmp-amount-label { font-size: 7pt; text-transform: uppercase; letter-spacing: 2pt; color: #888; margin-top: 2pt; }
.cmp-grid { width: 100%; margin-bottom: 12pt; }
.cmp-grid > div { width: 48%; display: inline-block; vertical-align: top; text-align: left; margin-bottom: 6pt; }
.cmp-grid span { font-size: 7pt; text-transform: uppercase; letter-spacing: 0.5pt; color: #888; display: block; }
.cmp-grid strong { font-size: 10pt; color: #111; }
.cmp-foot { font-size: 8pt; color: #888; padding-top: 6pt; border-top: 0.5pt dashed #999; }

/* Hide site chrome when printing the page directly */
@media print {
  .site-header, .site-footer, .gen-form, .gen-head, .actions, .menu-toggle { display: none !important; }
  .gen-preview-wrap { border: 0 !important; box-shadow: none !important; padding: 0 !important; }
  .gen-grid { display: block !important; }
  body { background: #fff !important; }
}
