/* Emergency official invoice print geometry; 2026-10-27; scoped to official bundle. */
@page baazOfficialSafe { size: A4 landscape; margin: 10mm; }
@media print {
 html:has(.official-print-bundle), body:has(.official-print-bundle) {
  width: auto !important; min-width: 0 !important; max-width: none !important;
  height: auto !important; overflow: visible !important; margin: 0 !important; padding: 0 !important;
 }
 body *:has(.official-print-bundle) {
  position: static !important; transform: none !important; contain: none !important;
  overflow: visible !important; width: auto !important; min-width: 0 !important;
  max-width: none !important; height: auto !important; min-height: 0 !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important;
 }
 html body .official-print-bundle {
  page: baazOfficialSafe; position: absolute !important; inset: 0 auto auto 0 !important;
  width: 100% !important; max-width: 277mm !important; min-width: 0 !important;
  box-sizing: border-box !important; margin: 0 !important; padding: 0 !important;
  overflow: visible !important;
 }
 html body .official-print-bundle .official-print-content {
  width: 100% !important; max-width: 100% !important; min-width: 0 !important;
  box-sizing: border-box !important; margin: 0 !important; padding: 0 !important;
 }
 html body .official-print-bundle .print-page { min-height: 185mm !important; box-sizing: border-box !important; }
 html body .official-print-bundle .items-table { width: 100% !important; max-width: 100% !important; }
 html body .official-print-bundle .items-table td:nth-child(n+6) { white-space: nowrap; direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
}

@media screen { body:has(.official-print-bundle)::after { content: "قالب امن چاپ · نسخه ۱۴۰۵/۰۸/۰۵-۲"; position: fixed; bottom: 8px; left: 8px; z-index: 99999; background: #dcfce7; color: #14532d; border: 1px solid #16a34a; padding: 6px 12px; border-radius: 6px; font: 12px sans-serif; } }
