/* Druckansicht der Rechnung (A4) – Design wie die Pages-Rechnungsvorlage */
.print-view{background:#EDEAE3;min-height:100vh;padding:24px 16px 60px}
.print-bar{max-width:210mm;margin:0 auto 18px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.print-bar .grow{flex:1}
.print-warn{max-width:210mm;margin:0 auto 14px}

.sheet{width:210mm;min-height:297mm;margin:0 auto 18px;background:#fff;position:relative;box-shadow:0 10px 30px -12px rgba(28,26,22,.3);
  font-family:'Inter',-apple-system,Helvetica,Arial,sans-serif;color:#55524A;font-size:10pt;line-height:1.4;overflow:hidden}
.sheet{display:flex;flex-direction:column}
.sheet.fixed{height:297mm}
.sheet .content{padding:0 20mm 0 25mm}
.sheet .hdr{padding:14mm 20mm 0 25mm}
.sheet .hdr .line{border-bottom:0.5pt solid #C39A44;padding-bottom:3.5mm}
.sheet .hdr img{width:38mm;display:block}
.sheet .sender{margin:22mm 0 0 93mm;font-size:7pt;color:#8B877C;border-bottom:0.5pt solid #E9E4D8;padding-bottom:1mm;margin-bottom:1.5mm}
.sheet .recipient{margin-left:93mm;font-size:10.5pt;color:#1C1A16;line-height:1.45;min-height:24mm}
.sheet .eyebrow-p{font-size:7.5pt;letter-spacing:.3em;font-weight:700;color:#A8813A;margin-top:11mm}
.sheet h1.title{font-family:'Source Serif 4',Georgia,serif;font-size:18pt;font-weight:700;color:#1C1A16;margin:1mm 0 5mm;letter-spacing:-.01em}
.sheet .facts{display:grid;grid-template-columns:repeat(4,1fr);gap:3mm;margin-bottom:6mm}
.sheet .facts .k{font-size:6.5pt;letter-spacing:.12em;font-weight:700;color:#8B877C;text-transform:uppercase}
.sheet .facts .v{font-size:9.5pt;color:#1C1A16;margin-top:1mm}
.sheet .intro{margin-bottom:5mm;white-space:pre-wrap}
.sheet .greet{color:#1C1A16;margin-bottom:2.5mm}
.sheet table.pos{width:100%;border-collapse:collapse;font-size:9.5pt}
.sheet table.pos th{font-size:6.5pt;letter-spacing:.12em;font-weight:700;color:#A8813A;text-transform:uppercase;text-align:left;padding:0 1.5mm 2mm;border-bottom:0.75pt solid #C39A44}
.sheet table.pos td{padding:2.2mm 1.5mm;border-bottom:0.5pt solid #E9E4D8;vertical-align:top}
.sheet table.pos td.d{color:#1C1A16;white-space:pre-wrap}
.sheet table.pos .r{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.sheet table.pos td.amt{color:#1C1A16}
.sheet .sum{margin-left:auto;width:72mm;margin-top:2mm;font-size:9pt}
.sheet .sum .l{display:flex;justify-content:space-between;padding:1.2mm 1.5mm}
.sheet .sum .l span:last-child{color:#1C1A16;font-variant-numeric:tabular-nums}
.sheet .sum .g{border-top:1pt solid #1C1A16;margin-top:1mm;padding-top:2mm;font-weight:700;color:#1C1A16;font-size:10.5pt}
.sheet .sum .g span:last-child{font-family:'Source Serif 4',Georgia,serif;font-size:12pt}
.sheet .closing{margin-top:6mm;white-space:pre-wrap}
.sheet .pay{margin-top:5mm;font-size:8.5pt}
.sheet .pay .k{font-size:6.5pt;letter-spacing:.12em;font-weight:700;color:#A8813A;text-transform:uppercase;margin-bottom:1.2mm}
.sheet .pay .grid{display:grid;grid-template-columns:30mm 1fr;row-gap:.6mm}
.sheet .pay .grid span:nth-child(odd){color:#8B877C}
.sheet .pay .grid span:nth-child(even){color:#1C1A16}
.sheet .sign{margin-top:5mm}
.sheet .sign b{color:#1C1A16}
.sheet .ftr{margin:auto 20mm 10mm 25mm;flex:none;border-top:0.5pt solid #E9E4D8;padding-top:2.5mm;text-align:center;font-size:7.5pt;color:#8B877C;line-height:1.35}
.sheet .ftr b{color:#A8813A}
.sheet.flow .ftr{margin:10mm 20mm 10mm 25mm}
.sheet .storno{position:absolute;top:95mm;left:50%;transform:translateX(-50%) rotate(-18deg);font-family:'Source Serif 4',serif;font-size:60pt;font-weight:700;color:rgba(156,74,60,.16);letter-spacing:.1em;pointer-events:none}

/* Zahlteil: unterste 105 mm der Seite, Schrift nach Norm (Helvetica/Arial, keine Kursiv) */
.qrbill-wrap{position:relative;margin-top:auto;flex:none;height:105mm;border-top:0.2mm dashed #000;break-inside:avoid}
.qrbill-wrap::before{content:'✂';position:absolute;top:-3.2mm;left:8mm;font-size:9pt;color:#000;background:#fff;line-height:1}
.qrbill{display:flex;height:105mm;font-family:Helvetica,Arial,'Liberation Sans',sans-serif;color:#000}
.qrbill .h{font-weight:700;font-size:6pt;line-height:9pt}
.qrbill .v{font-size:8pt;line-height:9pt;margin-bottom:2.5mm}
.qrbill .qb-title{font-weight:700;font-size:11pt;line-height:13pt;height:7mm}
.qb-receipt{width:62mm;padding:5mm;border-right:0.2mm dashed #000;position:relative;display:flex;flex-direction:column}
.qb-receipt .qb-info{height:56mm;overflow:hidden}
.qb-receipt .qb-amount{display:flex;gap:6mm;height:14mm}
.qb-receipt .qb-accept{font-weight:700;font-size:6pt;text-align:right;margin-top:auto}
.qb-payment{width:148mm;padding:5mm;display:flex;gap:5mm}
.qb-payment .h{font-size:8pt;line-height:11pt}
.qb-payment .v{font-size:10pt;line-height:11pt;margin-bottom:3mm}
.qb-left{width:51mm;flex:none;display:flex;flex-direction:column}
.qb-qr{width:46mm;height:46mm;margin:5mm 0}
.qb-qr svg{width:46mm;height:46mm;display:block}
.qb-payment .qb-amount{display:flex;gap:8mm;margin-top:auto;height:22mm}
.qb-payment .qb-info{flex:1;overflow:hidden}
.corner{display:block;margin-top:1mm}

@page{size:A4;margin:0}
@media print{
  html,body,#root{background:#fff!important;margin:0!important;padding:0!important;min-height:0!important;height:auto!important}
  .print-view{padding:0;background:#fff;min-height:0}
  .print-bar,.print-warn,.no-print,.toast,.overlay{display:none!important}
  /* knapp unter A4, damit Rundungen im Druck nie ein Leerblatt erzeugen */
  .sheet{margin:0;box-shadow:none;break-after:page;page-break-after:always;break-inside:avoid;page-break-inside:avoid}
  .sheet.fixed{height:296mm}
  .sheet.flow{min-height:0;break-inside:auto;page-break-inside:auto;padding:0 0 12mm;-webkit-box-decoration-break:clone;box-decoration-break:clone}
  .sheet:last-child{break-after:auto;page-break-after:auto}
  *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* Kompakt: Seite 1 mit QR-Zahlteil (Zahlungsangaben stehen dann im Zahlteil) */
.sheet.compact .hdr{padding-top:11mm}
.sheet.compact .sender{margin-top:16mm}
.sheet.compact .recipient{min-height:19mm}
.sheet.compact .eyebrow-p{margin-top:7mm}
.sheet.compact h1.title{margin-bottom:3.5mm;font-size:16pt}
.sheet.compact .facts{margin-bottom:4mm}
.sheet.compact .greet{margin-bottom:1.5mm}
.sheet.compact .intro{margin-bottom:3.5mm}
.sheet.compact table.pos td{padding:1.6mm 1.5mm}
.sheet.compact .sum{margin-top:1mm}
.sheet.compact .sum .l{padding:.8mm 1.5mm}
.sheet.compact .closing{margin-top:4mm}
.sheet.compact .sign{margin-top:3mm}
.sheet .vatline{margin-top:2mm;font-size:7.5pt;color:#8B877C}
