/* Print identity lives outside the scrollable screen container. */
html:root body #previewPaper .print-footer{display:flex!important;position:static!important;gap:12px!important;margin-top:18px!important;break-inside:avoid!important}
@media print{
 html:root body:not(.print-report-frame):not(.audit-print-blocked)>#printFooter{display:flex!important;position:fixed!important;inset:auto 12mm 7mm 20mm!important;z-index:100!important;visibility:visible!important;opacity:1!important;overflow:visible!important}
 html:root body .print-footer,html:root body .print-footer *{color:#3e544b!important;-webkit-text-fill-color:#3e544b!important;text-shadow:none!important;filter:none!important;opacity:1!important;visibility:visible!important}
 html:root body .print-footer{background:#fff!important;border-top:1px solid #aebdb6!important;padding-top:2mm!important;font:700 7.5px/1.5 Tahoma,Arial,sans-serif!important;gap:12px!important}
 html:root body .print-footer #printUser{text-align:right!important;overflow-wrap:anywhere}
 html:root body .print-footer #printDateTime{direction:ltr!important;text-align:left!important;white-space:nowrap!important}
}
/* Output-only palette: never inherits a user's screen theme or custom colors. */
html:root body #previewPaper{--paper:#fff!important;--panel:#fff!important;--ink:#172c26!important;--muted:#4f625a!important;--forest:#173f35!important;--forest-2:#24594b!important;--gold:#9a7320!important;--gold-soft:#f3ead7!important;--line:#c8d4ce!important;--theme-font:Tahoma,Arial,sans-serif!important;--theme-accent-text:#172c26!important;--theme-radius:8px!important;--theme-shadow:none!important;color-scheme:light!important;background:#fff!important;background-image:none!important;color:#172c26!important;-webkit-text-fill-color:#172c26!important;text-shadow:none!important}
html:root body #previewPaper *{color:#172c26!important;-webkit-text-fill-color:#172c26!important;text-shadow:none!important;box-shadow:none!important;filter:none!important;backdrop-filter:none!important}
html:root body #previewPaper :is(.panel,.card,.report-sheet,.settings-sheet,.table-wrap,.invoice-sheet,.invoice-meta,.invoice-party-card,.invoice-title-block,.invoice-header-facts,.invoice-brand-block,.invoice-formal-header,.invoice-summary,.totals,.total-row,.field,.voucher-sheet,.voucher-print-sheet,.voucher-print-header,.production-sheet,.production-formal-header,.production-meta-grid,.production-summary-strip,table,thead,tbody,tfoot,tr,td,input,select,textarea){background:#fff!important;background-image:none!important;border-color:#c8d4ce!important}
html:root body #previewPaper :is(.sheet-title,.detail-title,.statement-final,.invoice-section-title,.invoice-section-title span,.badge,.voucher-print-title,th,.total-row.final){background:#edf3ef!important;background-image:none!important;border-color:#b9cbc2!important}
html:root body #previewPaper :is(label,small,.print-field-value,.total-row,.total-row>*,.sheet-title,.detail-title){opacity:1!important}
html:root body #previewPaper .print-field-value{display:block;background:transparent!important;min-width:0;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
html:root body #previewPaper :is(input,select,textarea){color-scheme:light!important;appearance:none!important;opacity:1!important}
html:root body #previewPaper :is(input,textarea)::placeholder{color:transparent!important;-webkit-text-fill-color:transparent!important}
html:root body #previewPaper :is(img,svg){background:transparent!important}
@media print{
html:root{--paper:#fff!important;--panel:#fff!important;--ink:#172c26!important;--muted:#4f625a!important;--forest:#173f35!important;--forest-2:#24594b!important;--gold:#9a7320!important;--gold-soft:#f3ead7!important;--line:#c8d4ce!important;--theme-font:Tahoma,Arial,sans-serif!important;--theme-accent-text:#172c26!important;--theme-radius:8px!important;--theme-shadow:none!important;color-scheme:light!important;}
html:root body,html:root body .app-shell,html:root body .main{background:#fff!important;background-image:none!important;color:#172c26!important;color-scheme:light!important}
html:root body #printSelection{--paper:#fff!important;--panel:#fff!important;--ink:#172c26!important;--muted:#4f625a!important;--forest:#173f35!important;--forest-2:#24594b!important;--gold:#9a7320!important;--gold-soft:#f3ead7!important;--line:#c8d4ce!important;--theme-font:Tahoma,Arial,sans-serif!important;--theme-accent-text:#172c26!important;--theme-radius:8px!important;--theme-shadow:none!important;color-scheme:light!important;background:#fff!important;background-image:none!important;color:#172c26!important;-webkit-text-fill-color:#172c26!important;text-shadow:none!important}
html:root body #printSelection *{color:#172c26!important;-webkit-text-fill-color:#172c26!important;text-shadow:none!important;box-shadow:none!important;filter:none!important;backdrop-filter:none!important}
html:root body #printSelection :is(.panel,.card,.report-sheet,.settings-sheet,.table-wrap,.invoice-sheet,.invoice-meta,.invoice-party-card,.invoice-title-block,.invoice-header-facts,.invoice-brand-block,.invoice-formal-header,.invoice-summary,.totals,.total-row,.field,.voucher-sheet,.voucher-print-sheet,.voucher-print-header,.production-sheet,.production-formal-header,.production-meta-grid,.production-summary-strip,table,thead,tbody,tfoot,tr,td,input,select,textarea){background:#fff!important;background-image:none!important;border-color:#c8d4ce!important}
html:root body #printSelection :is(.sheet-title,.detail-title,.statement-final,.invoice-section-title,.invoice-section-title span,.badge,.voucher-print-title,th,.total-row.final){background:#edf3ef!important;background-image:none!important;border-color:#b9cbc2!important}
html:root body #printSelection :is(label,small,.print-field-value,.total-row,.total-row>*,.sheet-title,.detail-title){opacity:1!important}
html:root body #printSelection .print-field-value{display:block;background:transparent!important;min-width:0;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
html:root body #printSelection :is(input,select,textarea){color-scheme:light!important;appearance:none!important;opacity:1!important}
html:root body #printSelection :is(input,textarea)::placeholder{color:transparent!important;-webkit-text-fill-color:transparent!important}
html:root body #printSelection :is(img,svg){background:transparent!important}
html:root body #content{--paper:#fff!important;--panel:#fff!important;--ink:#172c26!important;--muted:#4f625a!important;--forest:#173f35!important;--forest-2:#24594b!important;--gold:#9a7320!important;--gold-soft:#f3ead7!important;--line:#c8d4ce!important;--theme-font:Tahoma,Arial,sans-serif!important;--theme-accent-text:#172c26!important;--theme-radius:8px!important;--theme-shadow:none!important;color-scheme:light!important;background:#fff!important;background-image:none!important;color:#172c26!important;-webkit-text-fill-color:#172c26!important;text-shadow:none!important}
html:root body #content *{color:#172c26!important;-webkit-text-fill-color:#172c26!important;text-shadow:none!important;box-shadow:none!important;filter:none!important;backdrop-filter:none!important}
html:root body #content :is(.panel,.card,.report-sheet,.settings-sheet,.table-wrap,.invoice-sheet,.invoice-meta,.invoice-party-card,.invoice-title-block,.invoice-header-facts,.invoice-brand-block,.invoice-formal-header,.invoice-summary,.totals,.total-row,.field,.voucher-sheet,.voucher-print-sheet,.voucher-print-header,.production-sheet,.production-formal-header,.production-meta-grid,.production-summary-strip,table,thead,tbody,tfoot,tr,td,input,select,textarea){background:#fff!important;background-image:none!important;border-color:#c8d4ce!important}
html:root body #content :is(.sheet-title,.detail-title,.statement-final,.invoice-section-title,.invoice-section-title span,.badge,.voucher-print-title,th,.total-row.final){background:#edf3ef!important;background-image:none!important;border-color:#b9cbc2!important}
html:root body #content :is(label,small,.print-field-value,.total-row,.total-row>*,.sheet-title,.detail-title){opacity:1!important}
html:root body #content .print-field-value{display:block;background:transparent!important;min-width:0;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
html:root body #content :is(input,select,textarea){color-scheme:light!important;appearance:none!important;opacity:1!important}
html:root body #content :is(input,textarea)::placeholder{color:transparent!important;-webkit-text-fill-color:transparent!important}
html:root body #content :is(img,svg){background:transparent!important}

body.print-invoice.print-selected #printSelection{width:100%!important;max-width:100%!important;box-sizing:border-box!important}
#printSelection input::-webkit-inner-spin-button,#printSelection input::-webkit-calendar-picker-indicator{display:none!important}
}
/* Stable output geometry after converting controls to text. */
html:root body :is(#previewPaper,#printSelection) .invoice-header-facts{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:4px!important}
html:root body :is(#previewPaper,#printSelection) .invoice-header-facts .field{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:2px!important;min-width:0!important}
html:root body :is(#previewPaper,#printSelection) .localized-date-control{display:block!important;min-width:0!important}
html:root body :is(#previewPaper,#printSelection) .invoice-header-facts .print-field-value{font-size:9px!important;line-height:1.5!important;min-height:0!important;padding:3px!important;border:0!important;border-bottom:1px solid #c8d4ce!important;border-radius:0!important;direction:ltr;text-align:right}
html:root body :is(#previewPaper,#printSelection) .localized-date-control .print-field-value{white-space:nowrap!important}
html:root body :is(#previewPaper,#printSelection) .invoice-notes-box .print-field-value{font-size:10px!important;font-weight:400!important;white-space:pre-wrap!important;line-height:1.7!important}

/* The exact owner-provided PNG is loaded only after company authentication.
   Keep the white signature panel readable in all screen and output themes. */
html:root body .document-signature-cell{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:0!important;min-width:0!important;text-align:center!important;break-inside:avoid;page-break-inside:avoid}
html:root body .document-signature-label{display:block!important;font-size:11px!important;line-height:1.6!important;padding:0!important;border:0!important;color:#172c26!important;-webkit-text-fill-color:#172c26!important}
html:root body .document-signature-frame{display:flex!important;align-items:center!important;justify-content:center!important;gap:0!important;min-width:0!important;height:100px!important;min-height:100px!important;padding:4px!important;box-sizing:border-box!important;background:#fff!important;background-image:none!important;border:0!important}
html:root body .management-signature-image{display:block!important;width:190px!important;max-width:100%!important;height:auto!important;max-height:100%!important;object-fit:contain!important;background:transparent!important;filter:none!important;opacity:1!important;box-shadow:none!important;border:0!important;border-radius:0!important}
html:root body .document-signature-line{display:block!important;border:0!important;border-bottom:1px solid #83958d!important;width:100%!important;height:0!important;margin:0!important}
html:root body .management-approval-note{grid-column:1/-1!important;break-inside:avoid;page-break-inside:avoid;background:#fff!important;color:#172c26!important}
html:root body .invoice-approval{gap:24px!important}
html:root body .voucher-signatures{margin-top:18px!important;background:#fff!important}
html:root body .management-approval-block{display:block!important;box-sizing:border-box;clear:both;grid-column:1/-1;flex-basis:100%;border:1px solid #c8d4ce!important;border-radius:8px!important;padding:12px 18px!important;margin-top:18px!important;background:#fff!important;color:#172c26!important;break-inside:avoid;page-break-inside:avoid}
html:root body .management-approval-block>.document-signature-cell{width:240px;max-width:100%;margin-right:auto}
@media print{
 html:root body :is(.management-approval-block,.management-approval-note,.voucher-signatures){break-inside:avoid!important;page-break-inside:avoid!important}
 html:root body .document-signature-frame{height:24mm!important;min-height:24mm!important}
}

/* Invoice footer: signature first; optional notes below, at full width. */
html:root body .invoice-closing-grid{grid-template-columns:minmax(0,1fr)!important;gap:12px!important;margin-top:12px!important}
html:root body .invoice-closing-grid>.invoice-document-note{min-height:0!important}
html:root body .invoice-closing-grid>.invoice-notes-box{grid-column:1/-1!important}
html:root body .invoice-closing-grid>.invoice-notes-box>strong{margin-bottom:4px!important;padding-bottom:5px!important}
html:root body .invoice-closing-grid .invoice-notes-box input{min-height:36px!important}
/* Live screen only: never let the white print palette leak into any theme.
   The original PNG stays unchanged; its screen ink follows actual contrast. */
@media screen{
 html:root body #content :is(.document-signature-frame,.management-approval-note,.management-approval-block,.voucher-signatures){background:transparent!important;background-image:none!important}
 html:root body #content .invoice-closing-grid>.invoice-document-note{padding:12px 16px!important}
 html:root body #content .invoice-closing-grid>.invoice-document-note>strong{margin-bottom:8px!important;padding-bottom:6px!important;color:var(--approval-screen-ink,var(--ink))!important;-webkit-text-fill-color:var(--approval-screen-ink,var(--ink))!important}
 html:root body #content .document-signature-label{color:var(--approval-screen-ink,var(--ink))!important;-webkit-text-fill-color:var(--approval-screen-ink,var(--ink))!important;font-size:11px!important}
 html:root body #content .invoice-notes-box :is(input,textarea){color:var(--approval-screen-ink,var(--ink))!important;-webkit-text-fill-color:var(--approval-screen-ink,var(--ink))!important}
 html:root body #content .invoice-notes-box :is(input,textarea)::placeholder{color:var(--approval-screen-ink,var(--ink))!important;-webkit-text-fill-color:var(--approval-screen-ink,var(--ink))!important;opacity:.75!important}
 html:root body #content .document-signature-frame{height:76px!important;min-height:76px!important}
 html:root body #content .management-signature-image{width:150px!important;filter:var(--approval-screen-signature-filter,none)!important}
 html:root body #content .invoice-approval>.document-signature-cell{width:100%;max-width:320px;justify-self:center}
 html:root body #content .document-signature-line{border-color:var(--line)!important}
 html:root body #content .management-approval-block{padding:12px 16px!important;margin-top:12px!important;border-color:var(--line)!important}
}

/* One frameless document identity for invoices, production and report headers. */
html:root body :is(.invoice-brand-block,.production-brand,.print-header)>img{
 background:transparent!important;background-image:none!important;
 border:0!important;border-radius:0!important;outline:0!important;box-shadow:none!important;
 padding:0!important;object-fit:contain!important;object-position:center!important;
 width:104px!important;height:80px!important;max-width:32%!important;flex:0 0 auto!important;
}
html:root body .print-header>img{width:110px!important;height:84px!important}
html:root body :is(#previewPaper,#printSelection) :is(.invoice-brand-block,.production-brand)>img{width:78px!important;height:64px!important}
html:root body :is(#previewPaper,#printSelection) .print-header>img{width:90px!important;height:72px!important}
@media(max-width:720px){
 html:root body #content :is(.invoice-brand-block,.production-brand)>img{width:86px!important;height:70px!important}
}
@media print{
 html:root body :is(.invoice-brand-block,.production-brand)>img{width:21mm!important;height:17mm!important;filter:none!important}
 html:root body .print-header>img{width:25mm!important;height:20mm!important;filter:none!important}
}

/* Rework/disposal signatures must keep the preview's three columns in the
   separate print document, which does not include inventory-operations.css. */
html:root body :is(#previewPaper,#printSelection) .io-report .io-signatures{
 display:grid!important;
 grid-template-columns:repeat(3,minmax(0,1fr))!important;
 gap:12px!important;
 align-items:end!important;
 width:100%!important;
 box-sizing:border-box!important;
 margin-top:20px!important;
 padding:30px 0 0!important;
 border-top:1px solid #637b75!important;
 direction:rtl;
 break-inside:avoid!important;
 page-break-inside:avoid!important;
}
html:root body :is(#previewPaper,#printSelection) .io-report .io-signatures>span{
 display:block!important;
 min-width:0;
 white-space:nowrap;
 text-align:right;
}
