/*
 * Print stylesheet – standalone (layouts/print.php loads only this file) and also used via @media print.
 * FRONTEND (ChatGPT may modify). Black on white, A4.
 */
@page { size: A4; margin: 16mm 14mm; }
*, *::before, *::after { box-sizing: border-box; }
body.layout-print { margin: 0; padding: 24px; background: #f2f2f2; color: #111; font: 11pt/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.layout-print main { max-width: 210mm; margin: 0 auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: 9pt; } .muted { color: #555; }
.btn { font: inherit; font-weight: 700; padding: 8px 14px; border: 1px solid #333; border-radius: 6px; background: #fff; color: #111; cursor: pointer; }
.btn:focus-visible { outline: 3px solid #b45309; outline-offset: 2px; }
.print-actions { max-width: 210mm; margin: 0 auto 16px; display: flex; gap: 8px; }

.invoice { background: #fff; color: #111; padding: 18mm 16mm; box-shadow: 0 2px 12px rgb(0 0 0 / 0.12); }
.invoice p { margin: 0 0 4px; }
.invoice h1 { font-size: 18pt; margin: 0 0 8px; }
.invoice__head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.invoice__to { margin-bottom: 18px; padding: 10px 12px; border: 1px solid #ccc; border-radius: 4px; max-width: 90mm; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; margin: 0; }
.facts dt { color: #555; } .facts dd { margin: 0; }
.invoice__items { width: 100%; border-collapse: collapse; margin: 12px 0; }
.invoice__items th, .invoice__items td { padding: 6px; border-bottom: 1px solid #ddd; text-align: left; vertical-align: top; }
.invoice__items thead th { background: #f3f3f3; font-size: 9pt; text-transform: uppercase; letter-spacing: 0.03em; }
.invoice__items td:nth-child(n+2), .invoice__items thead th:nth-child(n+2) { text-align: right; white-space: nowrap; }
.invoice__items tfoot th { text-align: right; font-weight: 600; }
.invoice__items tfoot td { text-align: right; white-space: nowrap; }
.invoice__total th, .invoice__total td { font-weight: 800; font-size: 12pt; border-top: 2px solid #111; }
.invoice__foot { border-top: 1px solid #ccc; margin-top: 24px; padding-top: 10px; color: #333; }

@media print {
    body, body.layout-print { background: #fff !important; color: #000 !important; padding: 0; }
    .no-print, .print-actions, .site-header, .site-footer, .admin-header, .admin-nav, .panel-nav, .skip-link, .breadcrumbs, .ads, .notice-bar { display: none !important; }
    .invoice { box-shadow: none; padding: 0; }
    .admin-layout, .panel-layout { display: block; }
    a { color: #000; text-decoration: none; }
    tr, .invoice__foot { break-inside: avoid; }
}
