@page{size:58mm auto;margin:0}
.thermal-logo{display:block;width:16mm;height:16mm;margin:0 auto 1mm;border-radius:50%;object-fit:cover}
@media screen{
  html{min-width:0!important;background:#e9e7e3}
  body.print-preview-document{width:min(520px,calc(100% - 20px));min-width:0;min-height:calc(100dvh - 20px);margin:10px auto;padding:0;background:#fff;color:#000;font:13px/1.4 Arial,Helvetica,sans-serif;box-shadow:0 3px 18px #0002}
  .print-preview-document .print-receipt{display:block;width:100%;max-width:100%;min-width:0;margin:0 auto;padding:18px 16px 22px;box-sizing:border-box;color:#000;background:#fff;font:13px/1.4 Arial,Helvetica,sans-serif}
  .print-preview-document .print-receipt *{box-sizing:border-box;color:#000;box-shadow:none;text-shadow:none}
  .print-preview-document .thermal-logo{width:clamp(56px,16vw,76px);height:clamp(56px,16vw,76px);filter:grayscale(1) invert(1) contrast(1.7)}
  .print-preview-document .thermal-brand{text-align:center;padding-bottom:1.5mm;border-bottom:1px dashed #000}
  .print-preview-document .thermal-brand strong,.print-preview-document .thermal-brand span,.print-preview-document .thermal-brand b{display:block}
  .print-preview-document .thermal-brand strong{font-size:20px;line-height:1.15;font-weight:700}
  .print-preview-document .thermal-brand span{margin-top:5px;font-size:10px;letter-spacing:.08em}
  .print-preview-document .thermal-brand b{margin-top:9px;font-size:14px}
  .print-preview-document .thermal-meta{padding:10px 0;border-bottom:1px dashed #000}
  .print-preview-document .thermal-meta>div{display:grid;grid-template-columns:88px minmax(0,1fr);gap:8px;padding:2px 0;font-size:12px}
  .print-preview-document .thermal-meta strong{font-weight:400;overflow-wrap:anywhere}
  .print-preview-document .thermal-table-head,.print-preview-document .thermal-item-row{display:grid;grid-template-columns:minmax(0,1fr) 42px 92px;gap:8px;align-items:start}
  .print-preview-document .thermal-table-head{padding:10px 0 7px;border-bottom:1px dashed #000;font-weight:700;font-size:12px}
  .print-preview-document .thermal-table-head span:nth-child(n+2),.print-preview-document .thermal-item-row>span:nth-child(2),.print-preview-document .thermal-item-row>strong{text-align:right}
  .print-preview-document .thermal-item-row{padding:8px 0;border-bottom:1px dotted #777;font-size:12px;line-height:1.35;break-inside:avoid}
  .print-preview-document .thermal-item-row>span:first-child{overflow-wrap:anywhere;padding-right:1mm}
  .print-preview-document .thermal-item-row>strong{font-weight:400;white-space:nowrap}
  .print-preview-document .thermal-summary{padding-top:7px}
  .print-preview-document .thermal-summary-row,.print-preview-document .thermal-payment{display:flex;justify-content:space-between;gap:8px;padding:4px 0;font-size:12px}
  .print-preview-document .thermal-summary-row strong,.print-preview-document .thermal-payment strong{font-weight:400;white-space:nowrap}
  .print-preview-document .thermal-total{display:flex;justify-content:space-between;gap:8px;margin-top:6px;padding:9px 0;border-top:1px dashed #000;border-bottom:1px dashed #000;font-size:17px;font-weight:700}
  .print-preview-document .thermal-total strong{font-size:18px;white-space:nowrap}
  .print-preview-document .thermal-payment{padding-top:7px;font-weight:700}
  .print-preview-document .thermal-payment strong{font-weight:700}
  .print-preview-document .thermal-footer{padding-top:12px;text-align:center;font-size:11px}
  .print-preview-document .thermal-footer strong,.print-preview-document .thermal-footer span{display:block}
  .print-preview-document .thermal-footer span{margin-top:4px}
}
@media print{
  html,body{width:58mm!important;min-width:0!important;min-height:0!important;height:auto!important;margin:0!important;padding:0!important;background:#fff!important;box-shadow:none!important}
  body{color:#000!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .app-shell,.modal,.toast{display:none!important}
  .print-receipt{display:block!important;width:48mm!important;max-width:48mm!important;min-width:48mm!important;margin:0 auto!important;padding:1.5mm 0 2mm!important;box-sizing:border-box!important;color:#000!important;background:#fff!important;font:8.5pt/1.25 Arial,Helvetica,sans-serif!important}
  .print-receipt *{box-sizing:border-box!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}
  .thermal-brand{text-align:center;padding-bottom:1.5mm;border-bottom:1px dashed #000}
  .thermal-logo{filter:grayscale(1) invert(1) contrast(1.7)}
  .thermal-brand strong,.thermal-brand span,.thermal-brand b{display:block}
  .thermal-brand strong{font-size:12pt;line-height:1.1;font-weight:700}
  .thermal-brand span{margin-top:.7mm;font-size:7pt;letter-spacing:.05em}
  .thermal-brand b{margin-top:1.4mm;font-size:9pt}
  .thermal-meta{padding:1.5mm 0;border-bottom:1px dashed #000}
  .thermal-meta>div{display:grid;grid-template-columns:14mm minmax(0,1fr);gap:1mm;padding:.25mm 0;font-size:7.5pt}
  .thermal-meta strong{font-weight:400;overflow-wrap:anywhere}
  .thermal-table-head,.thermal-item-row{display:grid;grid-template-columns:minmax(0,1fr) 5mm 15mm;gap:1mm;align-items:start}
  .thermal-table-head{padding:1.4mm 0 .8mm;border-bottom:1px dashed #000;font-weight:700;font-size:8pt}
  .thermal-table-head span:nth-child(n+2),.thermal-item-row>span:nth-child(2),.thermal-item-row>strong{text-align:right}
  .thermal-item-row{padding:1mm 0;border-bottom:.2mm dotted #777;font-size:8pt;line-height:1.2;break-inside:avoid}
  .thermal-item-row>span:first-child{overflow-wrap:anywhere;padding-right:1mm}
  .thermal-item-row>strong{font-weight:400;white-space:nowrap}
  .thermal-summary{padding-top:1mm}
  .thermal-summary-row,.thermal-payment{display:flex;justify-content:space-between;gap:2mm;padding:.45mm 0;font-size:8pt}
  .thermal-summary-row strong,.thermal-payment strong{font-weight:400;white-space:nowrap}
  .thermal-total{display:flex;justify-content:space-between;gap:2mm;margin-top:1mm;padding:1.3mm 0;border-top:1px dashed #000;border-bottom:1px dashed #000;font-size:11pt;font-weight:700}
  .thermal-total strong{font-size:12pt;white-space:nowrap}
  .thermal-payment{padding-top:1mm;font-weight:700}
  .thermal-payment strong{font-weight:700}
  .thermal-footer{padding-top:2mm;text-align:center;font-size:7.5pt}
  .thermal-footer strong,.thermal-footer span{display:block}
  .thermal-footer span{margin-top:.5mm}
}
