*{box-sizing:border-box}body{margin:0;background:#eceae6;color:#14283d;font:14px/1.65 Arial,sans-serif}.print-toolbar{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:16px 24px;background:#14283d;color:white}.print-toolbar button,.print-toolbar a{border:0;background:#b8955b;color:white;padding:10px 16px;border-radius:5px;text-decoration:none;cursor:pointer}.print-toolbar span{font-size:12px}.invoice-sheet{max-width:840px;min-height:1040px;padding:50px 55px;margin:28px auto;background:#fff}.invoice-sheet header{display:flex;gap:24px;align-items:center;border-bottom:2px solid #b8955b;padding-bottom:24px;margin-bottom:34px}.invoice-sheet header img{border-radius:50%;object-fit:contain}.invoice-sheet h1{font-size:25px;letter-spacing:4px;margin:0}.invoice-sheet header p{font-size:12px;margin:5px 0}.invoice-addresses{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin:24px 0 38px}.metadata{text-align:right}.invoice-sheet h2{font-size:20px;margin:6px 0}.invoice-sheet small{color:#8b713f;letter-spacing:1px}.invoice-sheet table{border-collapse:collapse;width:100%;margin-bottom:22px}.invoice-sheet th{text-align:left;color:#8b713f;font-size:11px;border-bottom:2px solid #b8955b;padding:12px 8px}.invoice-sheet td{padding:15px 8px;border-bottom:1px solid #e6dfd2;overflow-wrap:anywhere}.invoice-sheet th:not(:first-child),.invoice-sheet td:not(:first-child){text-align:right}.totals{max-width:340px;margin-left:auto}.totals p{display:flex;justify-content:space-between;gap:24px}.grand{border-top:2px solid #b8955b;font-size:20px;padding-top:12px}.invoice-sheet footer{border-top:1px solid #d9d4c9;margin-top:50px;padding-top:18px;color:#68717a;font-size:11px}.draft-banner,.cancelled-banner{padding:12px;background:#fff0d5;color:#86652c;text-align:center;font-weight:bold}.multiline{white-space:pre-line;overflow-wrap:anywhere}tr{break-inside:avoid}footer,.totals{break-inside:avoid}@page{size:A4;margin:16mm}@media print{body{background:white}.print-toolbar{display:none}.invoice-sheet{margin:0;padding:0;max-width:none;min-height:0}.invoice-sheet header{margin-top:0}}@media(max-width:600px){.invoice-sheet{padding:24px 18px;margin:12px}.invoice-sheet header{gap:14px}.invoice-sheet h1{font-size:20px;letter-spacing:2px}.invoice-addresses{grid-template-columns:1fr}.metadata{text-align:left}.invoice-sheet td{font-size:12px;padding:12px 5px}}
.notice-amount{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #b8955b;border-bottom:1px solid #b8955b;padding:16px 0;margin:24px 0;font-size:16px}.notice-amount strong{font-size:23px}.notice-paragraph{line-height:1.85;margin:22px 0}
[hidden]{display:none!important}.letter-content{line-height:1.85}.letter-content h2{font-size:17px;margin-bottom:22px}.letter-body{white-space:pre-wrap;overflow-wrap:anywhere}.letter-date{text-align:right}.letter-sheet{position:relative}.window-address{margin:28px 0 22px;max-width:90mm;min-height:40mm}.window-address small{font-size:9px;letter-spacing:0;display:block;border-bottom:1px solid #ddd;margin-bottom:6px}.window-address div{line-height:1.4}.letter-sheet header{margin-bottom:0}.letter-sheet footer{margin-top:35px}@media print{.letter-sheet .draft-banner{position:absolute;right:0;top:0;font-size:9px;padding:2px}.letter-sheet header{height:28mm;padding:0;border:0;align-items:flex-start;margin:0}.letter-sheet header img{width:22mm;height:22mm}.letter-sheet .window-address{position:relative;margin:0;min-height:45mm;padding-top:1mm;padding-left:4mm;max-width:89mm}.letter-sheet .letter-date{margin:4mm 0 6mm}.letter-content p,.letter-body{orphans:3;widows:3}.letter-content h2{break-after:avoid}}@media(max-width:600px){.document-tools{display:grid;gap:12px}.document-tools button{width:100%}.invoice-line{display:flex;flex-wrap:wrap}.invoice-line .field{flex:1 1 110px}.invoice-line .field:first-child{flex-basis:100%}.letter-sheet{padding:24px}.print-toolbar{gap:10px}}
.invoice-sheet.pdf-export{width:178mm!important;max-width:none!important;min-height:0!important;padding:0!important;margin:0!important;background:white!important;color:#14283d!important}.pdf-export .invoice-addresses{grid-template-columns:1fr 1fr!important}.letter-sheet.pdf-export header{height:28mm;padding:0;border:0;align-items:flex-start;margin:0}.letter-sheet.pdf-export header img{width:22mm;height:22mm}.letter-sheet.pdf-export .window-address{margin:0;min-height:45mm;padding-top:1mm;padding-left:4mm;max-width:89mm}.letter-sheet.pdf-export .letter-date{margin:4mm 0 6mm}
body{color:#111;background:#f5f5f5}.invoice-sheet{color:#111}.invoice-sheet header img{border-radius:0;background:transparent}.invoice-sheet header{border-bottom:1px solid #b89b53}.invoice-sheet th{color:#333;border-bottom:1px solid #b89b53}.invoice-sheet small{color:#555}.grand{border-top:1px solid #b89b53}.draft-banner,.cancelled-banner{background:#f2f2f2;color:#333}.notice-amount{border-color:#ccc}.invoice-sheet footer{color:#444}.invoice-sheet.pdf-export{color:#111!important}@media print{body{color:#000;background:#fff}.draft-banner,.cancelled-banner{background:none;border:1px solid #aaa}.invoice-sheet header img{print-color-adjust:exact;-webkit-print-color-adjust:exact}}
.pdf-export header{margin-bottom:20px;padding-bottom:16px}.pdf-export .invoice-addresses{margin:18px 0 24px}.pdf-export td{padding:10px 8px}.pdf-export footer{margin-top:24px;padding-top:12px}.pdf-export .notice-paragraph{margin:15px 0;line-height:1.7}.pdf-export .notice-amount{margin:18px 0;padding:12px 0}
.pdf-export .notice-paragraph{margin:12px 0;line-height:1.5}@media print{.notice-paragraph{margin:12px 0;line-height:1.5}.invoice-sheet footer{margin-top:24px}}
/* Fixed A4 stationery; same layout on mobile, PDF and paper. */
.invoice-sheet[hidden]{display:none!important}#document-pages{padding:18px;overflow:auto}.document-page{position:relative;width:210mm;height:297mm;padding:16mm 18mm 27mm;margin:12px auto;background:#fff;color:#111;box-sizing:border-box;font:10.5pt/1.42 Arial,sans-serif;overflow:hidden}.page-flow{height:254mm;overflow:visible}.document-page header{display:flex;align-items:center;gap:6mm;border-bottom:1px solid #baa064;padding-bottom:4mm;margin-bottom:7mm}.document-page header img{width:23mm;height:23mm;object-fit:contain}.document-page h1{font-size:18pt;letter-spacing:2px;margin:0}.document-page header p{margin:1mm 0;font-size:9pt}.brand-script{font-family:'Segoe Script','Apple Chancery','Brush Script MT',cursive!important;font-style:italic;font-size:13pt!important;color:#806b39}.document-page p{margin:0 0 3.5mm;white-space:pre-wrap;overflow-wrap:anywhere}.document-page h2{font-size:11pt;line-height:1.4;margin:0 0 5mm}.document-page .window-address{margin:0 0 9mm;min-height:36mm;max-width:86mm;padding-top:2mm}.document-page .window-address small{font-size:6.5pt;letter-spacing:0}.document-page .letter-reference{float:right;width:58mm;font-size:7.5pt;line-height:1.5;margin-top:-45mm;margin-bottom:5mm}.document-page .letter-reference hr{border:0;border-top:1px solid #ddd;margin:2mm 0}.document-page .letter-date{clear:both;text-align:right;font-size:9pt;margin:0 0 6mm}.document-page .page-footer{position:absolute;bottom:12mm;left:18mm;right:18mm;border-top:1px solid #ccc;padding-top:3mm;font:7pt/1.4 Arial,sans-serif;color:#444;margin:0}.page-number{position:absolute;bottom:7mm;right:18mm;font:7pt Arial;color:#666}.continuation{font-size:8pt;color:#555;border-bottom:1px solid #ddd;padding-bottom:3mm;margin-bottom:7mm}.document-page table{width:100%;border-collapse:collapse;font-size:9pt}.document-page td,.document-page th{padding:3mm 2mm;border-bottom:1px solid #ddd;text-align:left}.document-page .invoice-addresses{display:grid;grid-template-columns:1fr 1fr;gap:10mm;margin-bottom:6mm}.document-page .metadata{text-align:right}.document-page .totals{margin-left:auto;width:80mm}.document-page .totals p{display:flex;justify-content:space-between}.document-page .grand{font-size:13pt}.document-page .notice-amount{margin:4mm 0;padding:3mm 0}.document-page .draft-banner{position:absolute;top:3mm;right:18mm;background:none;font-size:7pt;padding:0}.document-page .multiline{white-space:pre-wrap}.print-toolbar{position:sticky;top:0;z-index:20;background:#fff;color:#111;border-bottom:1px solid #ddd}.print-toolbar button,.print-toolbar a{background:#a98d50;color:#fff;min-height:44px}.print-toolbar #export-status{font-size:12px;max-width:650px}.document-page .letter-content{line-height:inherit}@media print{@page{size:A4;margin:0}html,body{margin:0!important;padding:0!important;background:white}.print-toolbar{display:none!important}#document-pages{margin:0;padding:0;overflow:visible}.document-page{margin:0;box-shadow:none;break-after:page;page-break-after:always}.document-page:last-child{break-after:auto;page-break-after:auto}}
