.boleto-print { max-width: 900px; margin: 0 auto; font-family: Arial, sans-serif; color: #000; background: #fff !important; }
.boleto-print .card-header, .boleto-print .card-body { color: #000; background: #fff !important; }
.theme-dark .boleto-print .card-header .h4, .theme-dark .boleto-print .card-header .h5 { color: #172033; }
.boleto-print .card-body { padding: 1.5rem; }.boleto-head { display:flex; justify-content:space-between; align-items:center; min-height:42px; border-bottom:1px solid #000; font-size:1.05rem; }.boleto-print table { width:100%; border-collapse:collapse; font-size:.78rem; }.boleto-print th,.boleto-print td { padding:.2rem .3rem; border:1px solid #000; vertical-align:top; }.boleto-print th { font-weight:700; }.boleto-print p { margin:.55rem .25rem; font-size:.8rem; }.boleto-cut { margin:1.5rem 0; border:0; border-top:2px dashed #000; }.boleto-barcode { display:flex; justify-content:space-between; align-items:end; border-top:1px solid #000; padding-top:.5rem; }.boleto-barcode img { max-width:72%; height:58px; }.boleto-barcode span { font-size:.78rem; font-weight:700; }
.boleto-period-item { margin-bottom: 2rem; }

/* Layout do documento: dados e cálculo bancário são fornecidos pelos serviços existentes. */
.boleto-print { max-width: calc(190mm + 3rem); }
.boleto-sheet { width: 190mm; max-width: 100%; margin: 0 auto; }
.boleto-sheet .boleto-head { gap: 3mm; }
.boleto-sheet .boleto-head strong { white-space: nowrap; }
.boleto-sheet table.boleto-fields { table-layout: fixed; width: 100%; font-size: 9pt; line-height: 1.15; }
.boleto-sheet .boleto-fields tr { height: 7mm; }
.boleto-sheet .boleto-fields td { padding: 0 .8mm; border: 0; border-right: .2mm solid #000; border-bottom: .2mm solid #000; overflow-wrap: anywhere; }
.boleto-sheet .boleto-fields td:last-child { border-right: 0; }
.boleto-label { display: block; font-size: 8pt; line-height: 1.1; font-weight: 700; }
.boleto-value { display: block; text-align: right; padding-top: .5mm; }
.boleto-beneficiary { display: flex; justify-content: space-between; gap: 2mm; padding-top: .5mm; }
.boleto-beneficiary > span { white-space: nowrap; }
.boleto-receipt-instructions { min-height: 30mm; font-size: 9pt; }
.boleto-instruction-heading { display: flex; justify-content: space-between; gap: 2mm; font-size: 8pt; }
.boleto-instruction-heading span { text-align: right; }
.boleto-instruction-text { padding: 3mm .8mm 0; font-size: 9pt; line-height: 1.3; overflow-wrap: anywhere; }
.boleto-sheet .boleto-instructions { height: 35mm; }
.boleto-payer { min-height: 12mm; box-sizing: border-box; border-top: .2mm solid #000; padding: 2mm .8mm; font-size: 8pt; line-height: 1.15; overflow-wrap: anywhere; }
.boleto-sheet .boleto-cut { margin: 4mm 0; border-top: .3mm dashed #000; }
.boleto-sheet .boleto-barcode { border-top: .2mm solid #000; padding-top: 3mm; gap: 5mm; min-height: 16mm; }
.boleto-sheet .boleto-barcode img { width: 123.5mm; max-width: 68%; height: 13mm; }
.boleto-sheet .boleto-barcode span { font-size: 8pt; text-align: right; }
.boleto-barcode small { display: block; margin-top: 1mm; font-size: 6pt; font-weight: 400; }
@media screen and (max-width: 767px) {
    .boleto-print .card-body { overflow-x: auto; }
    .boleto-sheet { min-width: 190mm; }
}
@media print {
    @page boleto { size: A4 portrait; margin: 10mm; }
    html:has(.boleto-print), body:has(.boleto-print) { min-height: 0 !important; height: auto !important; min-width: 0 !important; width: auto !important; overflow: visible !important; }
    body:has(.boleto-print) { margin: 0 !important; padding: 0 !important; page: boleto; }
    body:has(.boleto-print) .container, body:has(.boleto-print) .container-fluid { min-width: 0 !important; max-width: 190mm !important; }
    main:has(.boleto-print) { width: 100% !important; max-width: 190mm !important; margin: 0 auto !important; padding: 0 !important; overflow: visible !important; }
    .boleto-print { width: 190mm; max-width: 100%; min-width: 0 !important; margin: 0 auto !important; padding: 0; border: 0; border-radius: 0; overflow: visible !important; box-shadow: none !important; }
    .boleto-print .card-header { display: none !important; }
    .boleto-print .card-body { width: 100%; min-width: 0; flex: none; padding: 0 !important; overflow: visible !important; }
    .boleto-sheet { page: boleto; width: 190mm; min-width: 0 !important; max-width: 100%; margin: 0 auto; padding-top: 5mm; box-sizing: border-box; overflow: visible !important; break-inside: avoid; page-break-inside: avoid; }
    .boleto-print .boleto-period-item { margin: 0; break-after: auto; page-break-after: auto; }
    .boleto-period-item + .boleto-period-item { break-before: page; page-break-before: always; }
    .boleto-print .no-print { display: none !important; }
}
