
/* ===== K80 BILL PREVIEW / PRINT FIX V43 ===== */
#modal.billOnly43 .sheet{
  width:auto!important;
  max-width:calc(80mm + 36px)!important;
  padding:12px!important;
  border-radius:18px!important;
  background:#fff!important;
}
#modal.billOnly43 .sheetHead{
  min-height:34px!important;
  padding:0 0 6px!important;
  border:0!important;
  justify-content:flex-end!important;
}
#modal.billOnly43 .sheetHead h3{
  display:none!important;
}
#modal.billOnly43 .sheetHead button{
  position:relative!important;
  top:auto!important;
  right:auto!important;
  width:36px!important;
  height:36px!important;
  min-height:36px!important;
  border-radius:50%!important;
}
#modal.billOnly43 #modalBody{
  padding:0!important;
  overflow:visible!important;
}
.billPreview43{
  width:80mm!important;
  max-width:80mm!important;
  margin:0 auto!important;
}
.billPreview43 .billPaper{
  box-sizing:border-box!important;
  width:80mm!important;
  max-width:80mm!important;
  min-width:80mm!important;
  margin:0 auto!important;
  padding:4mm 4mm!important;
  border:1px solid #e2e2e2!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:0 6px 22px rgba(0,0,0,.07)!important;
  overflow:hidden!important;
}
.billPreview43 .billPaper *{
  box-sizing:border-box!important;
  max-width:100%!important;
}
.billPreview43 .billBrand,
.billPreview43 .billTitle,
.billPreview43 .billInfo,
.billPreview43 .billTable,
.billPreview43 .moneyRow{
  width:100%!important;
}
.billPreview43 .billTable{
  table-layout:fixed!important;
  border-collapse:collapse!important;
}
.billPreview43 .billTable th:first-child,
.billPreview43 .billTable td:first-child{width:64%!important}
.billPreview43 .billTable th:nth-child(2),
.billPreview43 .billTable td:nth-child(2){width:12%!important;text-align:center!important}
.billPreview43 .billTable th:nth-child(3),
.billPreview43 .billTable td:nth-child(3){width:24%!important;text-align:right!important}
.billPreview43 .billBrand div,
.billPreview43 .billInfo span,
.billPreview43 .billTable td{
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
}
.billActions43{
  display:flex!important;
  justify-content:center!important;
  gap:8px!important;
  margin:10px auto 0!important;
}
.billActions43 button{
  min-height:40px!important;
  border-radius:11px!important;
  padding:8px 14px!important;
  font-size:10px!important;
}

/* K80 physical print: invoice only, exact 80mm width */
@media print{
  @page{
    size:80mm auto;
    margin:0;
  }
  html,body{
    width:80mm!important;
    max-width:80mm!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
    overflow:visible!important;
  }
  body.printingBill43 *{
    visibility:hidden!important;
  }
  body.printingBill43 .billPaper,
  body.printingBill43 .billPaper *{
    visibility:visible!important;
  }
  body.printingBill43 .billPaper{
    position:absolute!important;
    left:0!important;
    top:0!important;
    width:80mm!important;
    min-width:80mm!important;
    max-width:80mm!important;
    margin:0!important;
    padding:3mm 3mm!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#fff!important;
  }
  body.printingBill43 .billActions43,
  body.printingBill43 #modal .sheetHead{
    display:none!important;
  }
}

/* Small phones: preview scales to viewport but print remains 80mm */
@media(max-width:380px){
  #modal.billOnly43 .sheet{
    max-width:calc(100vw - 12px)!important;
    padding:7px!important;
  }
  .billPreview43{
    width:100%!important;
    max-width:100%!important;
  }
  .billPreview43 .billPaper{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    padding:10px!important;
  }
}
