/* The printable bill (Components/BillDocument.razor): two A4 sheets, always light. */
.bill-sheets { display: flex; flex-direction: column; gap: 16px; align-items: center; padding-bottom: 32px; }
.bill {
    --b-text: #18202a; --b-muted: #5f6b78; --b-line: #d9dee5; --b-accent: #0E7C8A; --b-tint: #eaf5f6;
    width: 100%; max-width: 210mm; min-height: 297mm; background: #fff; color: var(--b-text);
    padding: 14mm 14mm 10mm; display: flex; flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.08);
    font-family: 'Inter', 'IBM Plex Sans', Helvetica, Arial, sans-serif;
    font-size: 10pt; line-height: 1.4; color-scheme: light;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.bill h3 { font-size: 8.5pt; text-transform: uppercase; letter-spacing: .06em; color: var(--b-accent); margin: 0 0 6px; font-weight: 600; }
.bill section { margin-top: 14px; break-inside: avoid; }
.bill .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bill p { margin: 0; }

.bill-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--b-accent); }
.bill-head.is-short { align-items: baseline; padding-bottom: 8px; }
.bill-issuer { display: flex; gap: 12px; font-size: 9pt; color: var(--b-muted); }
.bill-logo { width: 46px; height: 46px; flex: none; }
.bill-name { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 13pt; font-weight: 700; color: var(--b-text); margin-bottom: 2px; }
.bill-heading { text-align: right; }
.bill-kind { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 14pt; font-weight: 700; color: var(--b-accent); margin-bottom: 6px; }
.bill-meta { margin: 0; display: grid; gap: 1px; font-size: 9pt; }
.bill-meta div { display: flex; justify-content: flex-end; gap: 10px; }
.bill-meta dt { color: var(--b-muted); }
.bill-meta dd { margin: 0; font-weight: 600; min-width: 36mm; }

.bill-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bill-box { border: 1px solid var(--b-line); padding: 10px 12px; font-size: 9pt; }
.bill-recipient { border: 1px solid var(--b-line); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.bill-recipient strong { font-size: 12pt; }
.bill-label { font-size: 8pt; text-transform: uppercase; letter-spacing: .06em; color: var(--b-muted); }
.bill-small { font-size: 8.5pt; color: var(--b-muted); margin-top: 6px; }
.bill-muted { color: var(--b-muted); }

.bill-data { margin: 0; font-size: 9pt; }
.bill-data div { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.bill-data dt { color: var(--b-muted); }
.bill-data dd { margin: 0; text-align: right; font-weight: 500; }
.bill-data .is-column { flex-direction: column; gap: 2px; }
.bill-data .is-column dd { text-align: left; }
.bill-iban { font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace; letter-spacing: .02em; }

.bill-band { display: flex; background: var(--b-accent); color: #fff; }
.bill-band div { flex: 1; padding: 10px 14px; display: flex; flex-direction: column; }
.bill-band div + div { border-left: 1px solid rgba(255,255,255,.25); }
.bill-band span { font-size: 8.5pt; text-transform: uppercase; letter-spacing: .05em; opacity: .85; }
.bill-band strong { font-size: 15pt; font-variant-numeric: tabular-nums; }
.bill-band div:first-child strong { font-size: 20pt; }
.bill-band.is-credit { background: #2e6b3a; }

.bill-table { width: 100%; border-collapse: collapse; font-size: 9pt; }
.bill-table th { text-align: left; font-size: 8pt; font-weight: 600; color: var(--b-muted); border-bottom: 1px solid var(--b-text); padding: 3px 4px; }
.bill-table td { padding: 3px 4px; border-bottom: 1px solid var(--b-line); vertical-align: top; }
.bill-table .is-sub td { font-weight: 600; }
.bill-table .is-muted td { color: var(--b-muted); }
.bill-table .is-total td { font-weight: 700; font-size: 10.5pt; border-top: 1.5px solid var(--b-text); border-bottom: none; padding-top: 5px; }
.bill-table .is-group td { background: var(--b-tint); font-weight: 600; color: var(--b-accent); }

.bill-tariff { margin-top: 8px; }
.bill-tariff + .bill-tariff { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--b-line); }
.bill-tariff-head { font-size: 9pt; margin-bottom: 6px; }
.bill-tariff .bill-table + .bill-table { margin-top: 8px; }
.bill-tariffs > .bill-small { margin-top: 8px; }
.bill-notes p { font-size: 8.5pt; color: var(--b-muted); }
.bill-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--b-line); display: flex; justify-content: space-between; gap: 12px; font-size: 7.5pt; color: var(--b-muted); }

@media (max-width: 760px) {
    .bill { padding: 18px 14px; font-size: 9.5pt; min-height: 0; }
    .bill-head, .bill-issuer { flex-direction: column; }
    .bill-heading { text-align: left; }
    .bill-meta div { justify-content: flex-start; }
    .bill-two { grid-template-columns: 1fr; }
    .bill-band { flex-direction: column; }
    .bill-band div + div { border-left: none; border-top: 1px solid rgba(255,255,255,.25); }
    .bill-detail th:nth-child(3), .bill-detail td:nth-child(3), .bill-detail th:nth-child(5), .bill-detail td:nth-child(5) { display: none; }
    .bill-foot { flex-direction: column; }
}

/* Printing: only the sheets, one per A4 page, no app chrome. */
@media print {
    @page { size: A4; margin: 0; }
    html, body, .mud-layout, .mud-main-content { background: #fff !important; }
    .no-print, .mud-appbar, .mud-drawer, .mud-snackbar-provider { display: none !important; }
    .mud-main-content { padding: 0 !important; margin: 0 !important; }
    .page-container { padding: 0 !important; margin: 0 !important; max-width: none !important; }
    .bill-sheets { gap: 0; padding: 0; display: block; }
    .bill { box-shadow: none; max-width: none; width: 210mm; min-height: 296mm; padding: 12mm 14mm 10mm; break-after: page; }
    .bill:last-child { break-after: auto; }
    .bill-two { grid-template-columns: 1fr 1fr !important; }
    .bill-head, .bill-issuer { flex-direction: row !important; }
}
