/* Compact POS invoice, shared by the document and its A4 preview. */
html body .receipt-print{box-sizing:border-box;width:100%;max-width:960px!important;margin:0 auto;padding:22px 26px;border:1px solid #dce2eb;border-radius:10px;box-shadow:none;background:#fff;font:12px/1.5 Tahoma,Arial,sans-serif;color:#182338}
html body .receipt-print .receipt-header{display:block;text-align:center;position:relative;margin:0 0 12px;padding:0 0 10px;border-bottom:1px solid #dce2eb}
html body .receipt-print .receipt-header img{width:auto;max-width:65px;max-height:55px;object-fit:contain;margin:0 auto 4px}
html body .receipt-print .receipt-header h2{font-size:18px;margin:0;text-align:center!important;width:100%}
html body .receipt-print .receipt-header p{font-size:11px;margin:2px 0}
html body .receipt-print .receipt-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px 12px;margin:10px 0 14px}
html body .receipt-print .receipt-meta>span{padding:4px 6px;font-size:11px;min-width:0;background:#f6f8fb;border-radius:3px;overflow-wrap:anywhere}
html body .receipt-print .receipt-lines{display:table;width:100%;table-layout:fixed;border-collapse:collapse;margin:0;font:11px/1.45 Tahoma,Arial,sans-serif}
html body .receipt-print .receipt-lines thead{display:table-header-group}
html body .receipt-print .receipt-lines tbody{display:table-row-group}
html body .receipt-print .receipt-lines tr{display:table-row;height:auto;break-inside:avoid}
html body .receipt-print .receipt-lines th,html body .receipt-print .receipt-lines td{display:table-cell;width:12%;min-width:0;max-width:none;height:auto;padding:6px 5px;vertical-align:top;text-align:center;border:1px solid #dce2eb;font-size:11px;line-height:1.45;word-break:normal;overflow-wrap:normal;white-space:normal}
html body .receipt-print .receipt-lines th{background:#465267;color:white;font-weight:700}
html body .receipt-print .receipt-lines th:first-child,html body .receipt-print .receipt-lines td:first-child{width:40%;text-align:right;overflow-wrap:anywhere;font-weight:500}
html body .receipt-print .receipt-lines td:not(:first-child){font-variant-numeric:tabular-nums}
html body .receipt-print .receipt-lines small,html body .receipt-print .receipt-lines em{display:block;font-size:9px;line-height:1.35;margin:2px 0 0;font-weight:400;overflow-wrap:anywhere;color:#667085}
html body .receipt-print .receipt-lines tbody tr:nth-child(even){background:#f8fafc}
html body .receipt-print .receipt-totals{width:340px;max-width:100%;margin:14px 0 10px auto;padding-top:8px;border-top:1px solid #dce2eb;break-inside:avoid}
html body .receipt-print .receipt-totals>div{display:flex;justify-content:space-between;gap:16px;padding:4px 8px;font-size:12px}
html body .receipt-print .receipt-totals .grand{background:#f1eaf0;border-radius:4px;font-size:14px;font-weight:700}
html body .receipt-print .receipt-payments{font-size:11px;break-inside:avoid}
html body .receipt-print .receipt-payments h3{font-size:12px;margin:8px 0 4px}
html body .receipt-print .receipt-footer{font-size:11px;text-align:center;margin:10px 0 0;padding:8px 0;border-top:1px solid #dce2eb;break-inside:avoid}
@media(max-width:600px){html body .receipt-print{padding:12px 8px}html body .receipt-print .receipt-meta{grid-template-columns:repeat(2,minmax(0,1fr))}html body .receipt-print .receipt-lines th,html body .receipt-print .receipt-lines td{padding:5px 2px;font-size:9px}}
@media print{
 html body .receipt-print{border:0;border-radius:0;padding:0;box-shadow:none;max-width:100%}
 html body .receipt-print .receipt-lines th{-webkit-print-color-adjust:exact;print-color-adjust:exact}
 body[data-print-mode="receipt"] .receipt-print{width:80mm!important;max-width:80mm!important;padding:3mm!important;box-sizing:border-box!important}
 body[data-print-mode="receipt"] .receipt-print .receipt-meta{grid-template-columns:repeat(2,minmax(0,1fr));gap:2px;font-size:9px}
 body[data-print-mode="receipt"] .receipt-print .receipt-meta>span{font-size:9px;padding:2px}
 body[data-print-mode="receipt"] .receipt-print .receipt-lines th,body[data-print-mode="receipt"] .receipt-print .receipt-lines td{padding:3px 1px;font-size:8px}
 body[data-print-mode="receipt"] .receipt-print .receipt-lines small,body[data-print-mode="receipt"] .receipt-print .receipt-lines em{font-size:7px}
}

/* Vertical cashier receipt: give the item name a full line instead of a narrow column. */
html body .receipt-print{width:100%!important;max-width:390px!important;padding:16px!important;margin:0 auto!important}
html body .receipt-print .receipt-meta{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 6px;margin:8px 0}
html body .receipt-print .receipt-meta>span{font-size:10px;padding:3px}
html body .receipt-print .receipt-header{padding-bottom:8px;margin-bottom:8px}
html body .receipt-print .receipt-header img{max-height:48px}
html body .receipt-print .receipt-lines{display:block!important;border:0!important}
html body .receipt-print .receipt-lines thead,html body .receipt-print .receipt-lines tbody{display:block!important;width:100%!important}
html body .receipt-print .receipt-lines tr{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));width:100%!important;border-bottom:1px dashed #b8c2d1;padding:4px 0;break-inside:avoid}
html body .receipt-print .receipt-lines th,html body .receipt-print .receipt-lines td{display:block!important;width:auto!important;min-width:0!important;border:0!important;padding:2px!important;font-size:10px!important;text-align:center!important;line-height:1.4!important}
html body .receipt-print .receipt-lines th:first-child{grid-column:1/-1;text-align:right!important;font-size:11px!important}
html body .receipt-print .receipt-lines td:first-child{grid-column:1/-1;text-align:right!important;font-size:11px!important;font-weight:700;white-space:normal!important;overflow-wrap:anywhere;padding:3px 2px 5px!important}
html body .receipt-print .receipt-lines small,html body .receipt-print .receipt-lines em{display:inline;font-size:8px;line-height:1.3;margin-inline-end:6px}
html body .receipt-print .receipt-lines small:before{content:' · '}
html body .receipt-print .receipt-lines thead tr{background:#465267;color:white}
html body .receipt-print .receipt-lines td:not(:first-child){white-space:nowrap!important;font-size:10px!important}
html body .receipt-print .receipt-totals{width:100%;margin:10px 0 6px;padding-top:4px}
html body .receipt-print .receipt-totals>div{padding:3px 2px;font-size:11px}
html body .receipt-print .receipt-payments>div{display:flex;justify-content:space-between;gap:8px;padding:3px}
html body .receipt-print .jofotara-evidence{font-size:10px;padding:6px!important}
@media print{body[data-print-mode="receipt"] .receipt-print{width:80mm!important;max-width:80mm!important;padding:3mm!important}html body .receipt-print .receipt-lines tr{break-inside:avoid!important}html body .receipt-print .receipt-header{break-inside:avoid}}
html body #detailModalBody .receipt-print{width:390px!important;max-width:100%!important;min-width:0!important;margin:0 auto!important;flex:none!important} html body .paper:has(.receipt-print){max-width:420px;min-height:0;padding:12px}

/* One compact row per product, with its name beside all numeric details. */
html body .receipt-print .receipt-lines{display:table!important;table-layout:fixed!important;width:100%!important}
html body .receipt-print .receipt-lines thead{display:table-header-group!important}
html body .receipt-print .receipt-lines tbody{display:table-row-group!important}
html body .receipt-print .receipt-lines tr{display:table-row!important;padding:0!important}
html body .receipt-print .receipt-lines th,html body .receipt-print .receipt-lines td{display:table-cell!important;width:11.6%!important;padding:5px 2px!important;vertical-align:top!important;font-size:8px!important;line-height:1.4!important;white-space:normal!important;border-bottom:1px solid #e2e6ed!important}
html body .receipt-print .receipt-lines th:first-child,html body .receipt-print .receipt-lines td:first-child{width:42%!important;padding:5px 3px!important;text-align:right!important;font-size:9px!important;font-weight:500!important;overflow-wrap:anywhere!important;white-space:normal!important}
html body .receipt-print .receipt-lines td:not(:first-child){font-size:8px!important;white-space:normal!important;font-variant-numeric:tabular-nums}
html body .receipt-print .receipt-lines small,html body .receipt-print .receipt-lines em{display:block!important;font-size:7px!important;line-height:1.3!important;margin:2px 0 0!important}
html body .receipt-print .receipt-lines small:before{content:none}
/* POS receipt: keep only customer-facing invoice fields. */
html body .receipt-print .receipt-meta>span:nth-child(3),html body .receipt-print .receipt-meta>span:nth-child(4),html body .receipt-print .receipt-meta>span:nth-child(5),html body .receipt-print .receipt-meta>span:nth-child(7){display:none!important}
html body .receipt-print .receipt-payments{display:none!important}
html body .receipt-print .receipt-lines small,html body .receipt-print .receipt-lines em{display:none!important}
