/* Sales documents use the established header/footer, with scoped content geometry. */
.proforma-paper .proforma-details{display:block;padding:12px 0!important}
.proforma-paper .proforma-details dl{display:grid;grid-template-columns:120px 1fr;gap:5px 16px;margin:0}
.proforma-paper .proforma-details dt{font-weight:600}.proforma-paper .proforma-details dd{margin:0}
.proforma-paper .proforma-details dt::after{content:none!important}
.proforma-intro{font-size:11px;margin:8px 0 16px}.proforma-intro p{margin:6px 0}.proforma-intro p:first-child{margin-bottom:15px}
.proforma-paper .proforma-items{table-layout:fixed;width:calc(100% - 2px)!important;min-width:0}
.proforma-paper .proforma-items th,.proforma-paper .proforma-items td{width:auto!important;padding:6px 4px;overflow-wrap:anywhere}
.proforma-paper .proforma-items th{text-align:center;background:#dce3f2!important;font-weight:700}
.proforma-paper .proforma-summary{width:43%;margin:12px 0 10px auto;font-size:11px}
.proforma-paper .proforma-summary>div{display:grid;grid-template-columns:1fr 110px;gap:8px;padding:4px 0}
.proforma-paper .proforma-summary strong{text-align:center;font-size:11px!important}.proforma-paper .proforma-summary .print-total{margin-top:0;padding-top:5px}
.proforma-paper .print-notes{border-top:0;margin:8px 0 16px}.proforma-paper .print-notes p{white-space:pre-wrap;font-size:11px;line-height:1.4;min-height:12px}
.proforma-signoff{font-size:11px;line-height:1.45;break-inside:avoid;margin:14px 0}
.proforma-signatures{display:grid;grid-template-columns:1fr 1fr;gap:20%;margin-top:16px}.proforma-signatures p{margin:4px 0;min-height:14px}.proforma-write-line{height:22px;border-bottom:1px solid #000;width:180px;max-width:100%;margin:8px 0}
#quote-form .item-table textarea{min-width:210px;resize:vertical;font:inherit;padding:10px;border:1px solid var(--line);border-radius:6px;width:100%}
.door-editor-row{border:1px solid var(--line);border-radius:8px;padding:18px;margin:12px 0}.door-hardware{margin-top:20px}.door-hardware summary{cursor:pointer;font-weight:600;margin-bottom:16px}.door-editor .grid{gap:14px}.door-editor .field{min-width:0}
.extended-paper[data-type="door_schedule"]{min-width:1500px}
.paper .door-print-table th,.paper .door-print-table td{padding:4px 2px!important;font-size:8px!important;width:auto!important;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
.paper .door-print-table th{background:#dce3f2!important;text-align:center;font-weight:700}
.paper .door-print-table th{font-size:6.8px!important;text-transform:none!important;letter-spacing:0!important;overflow-wrap:normal}
.extended-paper[data-type="door_schedule"] .extended-closing{width:65mm;align-self:flex-end;margin-left:auto}
.extended-paper[data-type="door_schedule"] .extended-closing .ext-pair{display:block}.extended-paper[data-type="door_schedule"] .extended-closing .ext-signatures{display:block}
@media print{
 body.quotation-print.swal2-shown:has(.quotation-pages)>.main[aria-hidden=true]{display:none!important}
 @page door-a3{size:A3 landscape;margin:8mm 12mm}
 .extended-pages[data-paper-size="A3"],.ios-print-92 .extended-pages[data-paper-size="A3"]{width:396mm!important}
 .extended-pages[data-paper-size="A3"] .extended-sheet.ext-landscape{page:door-a3;width:396mm!important;height:281mm!important;min-height:281mm!important;max-height:281mm!important}
 .extended-pages[data-paper-size="A3"] .extended-closing{left:auto!important;right:2px!important;width:65mm}
 .extended-pages[data-paper-size="A3"] .extended-sheet .door-print-table{margin-top:4mm}
 .webkit-print .extended-pages[data-paper-size="A3"] .extended-sheet.ext-landscape{height:275mm!important;min-height:275mm!important}
 .proforma-paper .proforma-details{padding:8px 0!important}
 .proforma-paper .proforma-details dl{gap:2px 16px;font-size:10px}
 .proforma-paper .document-dates{padding:10px 0!important}
 .proforma-paper .proforma-intro{margin:5px 0 10px;font-size:10px}
 .proforma-paper .proforma-intro p:first-child{margin-bottom:8px}
 .proforma-paper .print-notes{border:0;padding:0;margin:6px 0}
 .proforma-paper .print-notes h3{margin:0 0 4px;font-size:10px}
 .proforma-paper .print-notes p{margin:0;font-size:10px;line-height:1.25}
 .proforma-paper .proforma-signoff{font-size:10px;margin:8px 0;line-height:1.3}
 .proforma-paper .proforma-signatures{margin-top:10px}
 .proforma-paper .proforma-signatures p{min-height:12px;margin:2px 0}
 .proforma-paper .proforma-summary>div{padding:2px 0;font-size:10px}
 .proforma-paper .proforma-summary strong{font-size:10px!important}
 .proforma-paper .proforma-items th,.proforma-paper .proforma-items td{font-size:10px}
}

/* October 20: final authorization sits just above the approved footer line. */
.proforma-closing{display:flow-root}
@media screen{
 .proforma-paper:not(.quotation-sheet){display:flex;flex-direction:column;min-height:1050px}
 .proforma-paper:not(.quotation-sheet)>.proforma-closing{margin-top:auto;padding-top:16px}
 .business-paper[data-business-type="invoice"]>.business-closing{display:flex!important;flex-direction:column;flex:1}
 .business-paper[data-business-type="invoice"] .invoice-authorization{margin-top:auto;padding-top:12px}
 .business-paper[data-business-type="invoice"]>.document-contact-footer{margin-top:0!important}
}
@media print{
 .business-pages .invoice-authorization{display:flow-root}
 .business-pages .invoice-authorization .business-banks{margin-bottom:0}
 .quotation-pages .proforma-closing>.proforma-signoff:last-child{margin-bottom:0}
}

/* Temporary proforma-only header comparison. */
.proforma-paper.proforma-header-plain .proforma-items th{background:#fff!important}
.proforma-design-selector{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 22px;padding:16px 20px;background:#fff;border:1px solid var(--line);border-radius:10px}
.proforma-design-selector>strong{font-size:13px}
#quote-form .item-table{min-width:680px}
#quote-form .item-table th:nth-child(1){width:4%}
#quote-form .item-table th:nth-child(2){width:50%}
#quote-form .item-table th:nth-child(3){width:11%}
#quote-form .item-table th:nth-child(4){width:15%}
#quote-form .item-table th:nth-child(5){width:15%}
#quote-form .item-table th:nth-child(6){width:5%}
@media(max-width:640px){.proforma-design-selector{align-items:flex-start;flex-direction:column}.proforma-design-selector .actions{flex-wrap:wrap}}

/* October21 client comments: proforma content only; approved stationery stays fixed. */
.proforma-paper .proforma-details{display:grid!important;grid-template-columns:1fr 1fr;gap:8%}
.proforma-paper .proforma-details dl{grid-template-columns:100px minmax(0,1fr);align-content:start}
.proforma-paper .proforma-summary>div{grid-template-columns:minmax(0,1fr) 145px}
.proforma-paper .proforma-summary strong{display:grid;grid-template-columns:30px minmax(0,1fr);gap:5px;text-align:right}
.proforma-paper .proforma-summary .money-currency{text-align:left}
.proforma-acceptance-row{display:grid;grid-template-columns:78px minmax(0,1fr);gap:6px;align-items:end;margin:8px 0;min-height:16px}
.proforma-acceptance-line{border-bottom:1px solid #000;min-height:16px}
