#salePrecount090Sheet{display:none}
@page salePrecount090{size:auto;margin:4mm}
@media print{
  body.sale-precount-printing{page:salePrecount090;margin:0!important;padding:0!important;height:auto!important;min-height:0!important;overflow:visible!important;background:#fff!important;color:#000!important}
  body.sale-precount-printing>:not(#salePrecount090Sheet),body.sale-precount-printing dialog,body.sale-precount-printing dialog::backdrop{display:none!important}
  body.sale-precount-printing #salePrecount090Sheet,body.sale-precount-printing #salePrecount090Sheet *{visibility:visible!important}
  body.sale-precount-printing>#salePrecount090Sheet{display:block!important;page:salePrecount090;box-sizing:border-box;width:72mm;max-width:72mm;margin:0;padding:0;background:#fff;color:#000;font:11px/1.4 Arial,sans-serif;overflow-wrap:anywhere;print-color-adjust:exact}
  .precount090 .precount-legend090{display:block;text-align:center;font-size:11px;border-top:1px dashed #000;border-bottom:1px dashed #000;padding:7px 0;margin:0 0 9px}
  .precount090 .precount-legend090:last-child{margin:12px 0 0}
  .precount090 .precount-logo090{display:block;max-width:44mm;max-height:18mm;object-fit:contain;margin:8px auto}
  .precount090 h1{font-size:16px;line-height:1.3;text-align:center;margin:6px 0}
  .precount090 .precount-date090{text-align:center;margin-bottom:12px}
  .precount090 .precount-line090{border-bottom:1px dashed #888;padding:7px 0;break-inside:avoid}
  .precount090 dl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:5px 0 0}
  .precount090 dl>div{text-align:right}.precount090 dl>div:first-child{text-align:left}
  .precount090 dt{font-size:9px}.precount090 dd{margin:0;font-size:11px}
  .precount090 .precount-totals090{margin-top:12px;break-inside:avoid}
  .precount090 .precount-totals090>div{display:flex;justify-content:space-between;gap:8px;margin:4px 0}
  .precount090 [data-precount="total"]{border-top:1px solid #000;padding-top:8px;font-size:17px}
}
@media screen{
  #createDialog[data-flow="sale-new"] .dialog-body090{padding:20px 24px}
  #createDialog[data-flow="sale-new"] .dialog-section090{padding:0;border:0;background:transparent}
  #createDialog[data-flow="sale-new"] .dialog-section-head090{display:none}
  #createDialog[data-flow="sale-new"] .sale090{display:block;min-width:0}
  #createDialog[data-flow="sale-new"] .cash-top090{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:16px}
  #createDialog[data-flow="sale-new"] .cash-section090{min-width:0;border:1px solid var(--line);border-radius:11px;background:#f8fafc;padding:15px;margin-bottom:16px}
  #createDialog[data-flow="sale-new"] .cash-top090>.cash-section090{margin:0}
  #createDialog[data-flow="sale-new"] .cash-section-head090{display:flex;align-items:center;gap:9px;margin-bottom:12px;color:var(--text)}
  #createDialog[data-flow="sale-new"] .cash-section-head090 h3{font-size:14px;margin:0;flex:1}
  #createDialog[data-flow="sale-new"] .cash-section-head090 .btn{padding:2px;width:28px;height:28px;font-size:19px}
  #createDialog[data-flow="sale-new"] label{margin:8px 0 5px;font-size:12px}
  #createDialog[data-flow="sale-new"] .cash-section090 input,#createDialog[data-flow="sale-new"] .cash-section090 select{padding:8px 9px;font-size:13px}
  #createDialog[data-flow="sale-new"] .sale-client-picker{display:grid;grid-template-columns:minmax(0,1fr);gap:7px}
  #createDialog[data-flow="sale-new"] .sale-client-field{position:relative}
  #createDialog[data-flow="sale-new"] .cash-client-details090{display:grid;gap:5px;margin-top:12px;font-size:12px;color:var(--muted);overflow-wrap:anywhere}
  #createDialog[data-flow="sale-new"] .cash-client-details090>div:first-child{font-size:14px;font-weight:600;color:var(--text)}
  #createDialog[data-flow="sale-new"] .cash-number090{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:14px;font-size:12px;color:var(--muted)}
  #createDialog[data-flow="sale-new"] .cash-number090 strong{color:var(--text)}
  #createDialog[data-flow="sale-new"] #saleLoyaltyPanel{padding:0;margin:8px 0;border:0;background:transparent;box-shadow:none}
  #createDialog[data-flow="sale-new"] #saleLoyaltyPanel .row{display:block}
  #createDialog[data-flow="sale-new"] #saleLoyaltyPanel p{font-size:11px}
  #createDialog[data-flow="sale-new"] .cash-tools090{display:flex;align-items:flex-end;gap:8px;margin-bottom:12px}
  #createDialog[data-flow="sale-new"] .cash-tools090>div{flex:1;min-width:0;position:relative}
  #createDialog[data-flow="sale-new"] .cash-tools090 .btn{font-size:12px;min-height:35px;white-space:nowrap;padding:8px 10px}
  #createDialog[data-flow="sale-new"] .cash-tools090 label{margin-top:0}
  #createDialog[data-flow="sale-new"] #saleLookupResults:empty{display:none}
  #createDialog[data-flow="sale-new"] #saleLookupResults:not(:empty){position:absolute;z-index:5;left:0;right:0;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);padding:8px;max-height:220px;overflow:auto}
  #createDialog[data-flow="sale-new"] .sale-cart-table{max-height:none;overflow:visible!important;border:1px solid var(--line);background:#fff;border-radius:9px;margin:0 0 12px}
  #createDialog[data-flow="sale-new"] .sale-cart-table table{table-layout:fixed;width:100%;font-size:12px}
  #createDialog[data-flow="sale-new"] .sale-cart-table th,#createDialog[data-flow="sale-new"] .sale-cart-table td{padding:9px 5px;vertical-align:middle;overflow-wrap:anywhere}
  #createDialog[data-flow="sale-new"] .sale-cart-table th:nth-child(n){width:auto;font-size:10px;background:#f1f5fa}
  #createDialog[data-flow="sale-new"] .sale-cart-table th:nth-child(1){width:3%}
  #createDialog[data-flow="sale-new"] .sale-cart-table th:nth-child(2){width:5%}
  #createDialog[data-flow="sale-new"] .sale-cart-table th:nth-child(3){width:19%}
  #createDialog[data-flow="sale-new"] .sale-cart-table th:nth-child(4){width:7%}
  #createDialog[data-flow="sale-new"] .sale-cart-table th:nth-child(5){width:9%}
  #createDialog[data-flow="sale-new"] .sale-cart-table th:nth-child(6){width:14%}
  #createDialog[data-flow="sale-new"] .sale-cart-table th:nth-child(7){width:16%}
  #createDialog[data-flow="sale-new"] .sale-cart-table th:nth-child(8){width:5%}
  #createDialog[data-flow="sale-new"] .sale-cart-table th:nth-child(9){width:11%}
  #createDialog[data-flow="sale-new"] .sale-cart-table td small{display:block;color:var(--muted);margin-top:5px}
  #createDialog[data-flow="sale-new"] .sale-cart-table td input,#createDialog[data-flow="sale-new"] .sale-cart-table td select{padding:6px 4px;font-size:12px;min-width:0;width:100%}
  #createDialog[data-flow="sale-new"] .cash-photo090{width:38px;height:38px;object-fit:cover;border-radius:7px}
  #createDialog[data-flow="sale-new"] .cash-quantity090{display:grid;grid-template-columns:25px minmax(0,1fr) 25px;gap:3px;align-items:center}
  #createDialog[data-flow="sale-new"] .cash-quantity090 .btn{padding:0;height:30px;min-width:0;border-radius:6px}
  #createDialog[data-flow="sale-new"] .cash-quantity090 input{appearance:textfield;text-align:center}
  #createDialog[data-flow="sale-new"] .cash-quantity090 input::-webkit-inner-spin-button{appearance:none}
  #createDialog[data-flow="sale-new"] .sale-line-discount{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px}
  #createDialog[data-flow="sale-new"] .sale-line-discount small{grid-column:1/-1;margin:0!important}
  #createDialog[data-flow="sale-new"] .sale-cart-table td:last-child .btn{font-size:10px;padding:4px;margin:2px 0;min-height:26px}
  #createDialog[data-flow="sale-new"] #saleReceiptEmpty{padding:12px}
  #createDialog[data-flow="sale-new"] .cash-line-error090{background:#fff1f1}
  #createDialog[data-flow="sale-new"] #saleFreeLine090{font-size:12px}
  #createDialog[data-flow="sale-new"] .cash-line-editor090{margin-top:12px;border-top:1px solid var(--line);padding-top:10px}
  #createDialog[data-flow="sale-new"] .cash-line-editor090 summary{cursor:pointer;font-size:12px;color:var(--brand);font-weight:600}
  #createDialog[data-flow="sale-new"] .cash-line-editor090 .sale-product-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
  #createDialog[data-flow="sale-new"] .cash-line-editor090 .sale-product-row>div{min-width:0;flex:initial!important}
  #createDialog[data-flow="sale-new"] .cash-totals090{display:flex;justify-content:flex-end;align-items:center;gap:25px;background:#fff}
  #createDialog[data-flow="sale-new"] .cash-totals090>.cash-section-head090{margin:0 auto 0 0}
  #createDialog[data-flow="sale-new"] .cash-totals090 .kpi{border:0;background:transparent;box-shadow:none;padding:0;min-width:90px;margin:0}
  #createDialog[data-flow="sale-new"] .cash-totals090 .kpi .val{font-size:19px;margin-top:7px;text-align:right}
  #createDialog[data-flow="sale-new"] .cash-totals090 .kpi:last-child .val{font-size:28px;color:var(--brand)}
  #createDialog[data-flow="sale-new"] [hidden]{display:none!important}
  #saleClientCreateDialog090 .create-dialog-card>h2{display:none}
  @media(max-width:900px){
    #createDialog[data-flow="sale-new"] .cash-top090{grid-template-columns:minmax(0,1fr)}
    #createDialog[data-flow="sale-new"] .sale-cart-table thead{display:none}
    #createDialog[data-flow="sale-new"] .sale-cart-table tbody{display:grid;gap:12px;padding:10px}
    #createDialog[data-flow="sale-new"] .sale-cart-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--line);border-radius:9px;padding:8px}
    #createDialog[data-flow="sale-new"] .sale-cart-table td{display:block;min-width:0;border:0;padding:6px}
    #createDialog[data-flow="sale-new"] .sale-cart-table td::before{content:attr(data-label);display:block;color:var(--muted);font-size:10px;margin-bottom:5px}
    #createDialog[data-flow="sale-new"] .sale-cart-table td:nth-child(3){grid-column:1/-1}
    #createDialog[data-flow="sale-new"] .sale-cart-table td:last-child{display:flex;align-items:center;gap:10px;grid-column:1/-1}
    #createDialog[data-flow="sale-new"] .sale-cart-table td:last-child .btn{font-size:12px;padding:7px}
  }
  @media(max-width:600px){
    #createDialog[data-flow="sale-new"] .dialog-body090{padding:12px}
    #createDialog[data-flow="sale-new"] .cash-tools090{flex-wrap:wrap}
    #createDialog[data-flow="sale-new"] .cash-tools090>div{flex-basis:100%}
    #createDialog[data-flow="sale-new"] .cash-line-editor090 .sale-product-row{grid-template-columns:minmax(0,1fr)}
    #createDialog[data-flow="sale-new"] .cash-line-editor090 .row>div{min-width:0}
    #createDialog[data-flow="sale-new"] .cash-totals090{flex-wrap:wrap;gap:15px}
    #createDialog[data-flow="sale-new"] .cash-totals090>.cash-section-head090{flex-basis:100%}
    #createDialog[data-flow="sale-new"] .cash-totals090 .kpi{min-width:0;flex:1}
    #createDialog[data-flow="sale-new"] .cash-totals090 .kpi:last-child .val{font-size:24px}
  }
}

/* Ciclo 091: il piede include il salvataggio del conto. */
#createDialog[data-flow="sale-new"] .dialog-foot090{flex-wrap:wrap}
