/* Checkout v5. Four explicit rows include scanner status without displacing the table. */
@media screen {
 :root{background:#f2f5f8;color:#1c3041;font-family:'Segoe UI',Arial,sans-serif}
 header{background:#142e3d;padding:12px 22px;gap:12px}
 header strong{letter-spacing:.3px}header nav{gap:5px;padding-top:8px;border-top:1px solid #ffffff18}
 header nav button{border-radius:7px;padding:9px 14px;color:#c8d8e2;font-weight:600}
 header nav button.active{background:#e8f7f2;color:#0b5e49}
 .status{background:#e6edf2;color:#435c6d;padding:8px 22px}
 .checkout-mode main{padding:18px}
 #checkout{grid-template-columns:minmax(0,1fr) 320px;gap:18px;min-height:420px}
 .sale-workspace{grid-template-rows:auto auto auto minmax(0,1fr);gap:12px}
 .sale-workspace .scan{background:white;padding:12px;border:1px solid #dce5ec;border-radius:12px;box-shadow:0 3px 12px #19364705}
 .sale-workspace .scan input{border:0;background:#f3f6f9;padding:14px;font-size:16px}
 .primary{background:#13745a;border-color:#13745a;color:#fff}
 .scanner-ready{color:#496575;font-size:12px;line-height:1.5;padding:0 8px}
 .sale-workspace .subbar{padding:0 2px;grid-template-columns:minmax(120px,1fr) minmax(160px,1fr) auto;align-items:end}
 .sale-workspace .subbar label{font-size:12px;font-weight:600;color:#526776}
 .sale-workspace .subbar button{min-height:38px}
 .ticket-table{border:1px solid #dce5ec;border-radius:12px;box-shadow:0 3px 12px #19364705;min-height:0}
 .ticket-table table{min-width:730px;table-layout:auto}
 .ticket-table th{background:#ecf2f5;color:#425b6b;font-size:11px;padding:13px 9px;white-space:nowrap}
 .ticket-table td{padding:13px 9px;border-color:#edf1f5;font-size:13px}
 .ticket-table th:nth-child(3){width:auto;min-width:140px}
 .ticket-table th:nth-child(4){width:110px}.ticket-table th:nth-child(2){width:85px}
 .ticket-table tbody tr:nth-child(even){background:#fafcfd}
 .ticket-table td strong{font-size:14px;color:#20394a}
 .ticket-table td input{width:65px;text-align:center;min-height:36px}
 .ticket-table td button{color:#8b3440;border-color:#ead9dc}
 #empty{padding:65px 22px;color:#738a98;font-size:20px;line-height:1.6}
 .sale-summary{border-radius:14px;border-color:#dce5ec;padding:20px;gap:15px;box-shadow:0 5px 20px #19364707}
 .summary-title{padding-bottom:12px;border-bottom:1px solid #e8eef2}
 .summary-title h2{font-size:21px;color:#183749;margin-bottom:8px}
 #shift-status{display:inline-block;background:#e8f6ef;color:#247051;padding:5px 10px;border-radius:20px;font-size:11px}
 .sale-summary label{font-weight:600;color:#526776;font-size:12px}
 .sale-summary input,.sale-summary select{border-color:#d8e2e9;min-height:40px}
 .summary-total{background:#eff7f4;border:1px solid #d8eae2;border-radius:10px;padding:16px;color:#3d6355}
 .summary-total #total{font-size:38px;letter-spacing:-1px;color:#125b44;overflow-wrap:anywhere}
 .summary-amounts{font-size:14px}.summary-amounts p{margin:10px 0}
 .sale-summary .pay-button{background:#13745a;padding:17px;border-radius:9px;font-size:20px;box-shadow:0 4px 10px #13745a20}
 .summary-actions button{font-size:12px;min-height:38px;background:#f7f9fb;border-color:#dce5ec}
 .summary-help{font-size:11px;line-height:1.8}
 .card{border-radius:12px;border-color:#dce5ec}dialog{border-radius:16px;box-shadow:0 24px 80px #142e3d30}
 #receipt-content{background:white}.ticket-end{border-top:1px dashed #9ba5ab;margin-top:22px;text-align:center;padding:8px;color:#647784;font:10px monospace}
 @media(max-width:1100px){#checkout{grid-template-columns:minmax(0,1fr) 280px;gap:12px}.sale-summary{padding:15px}.sale-workspace .subbar{grid-template-columns:1fr 1fr}.sale-workspace .subbar button{grid-column:2}.checkout-mode main{padding:12px}}
 @media(max-width:800px),(max-height:600px){#checkout{height:auto;min-height:0;grid-template-columns:1fr}.sale-workspace{grid-template-rows:auto auto auto minmax(240px,45vh)}.sale-summary{display:grid;grid-template-columns:1fr 1fr}.summary-total{margin:0}.sale-summary .pay-button{position:static}}
 @media(max-width:480px){.sale-summary{grid-template-columns:1fr}.sale-workspace .subbar{grid-template-columns:1fr}.sale-workspace .subbar button{grid-column:auto}.scan button{width:100%}.scan input{width:100%}}
}
@media print {
 @page{margin:0}
 html,body{background:white!important;margin:0!important;padding:0!important;height:auto!important}
 #receipt[open]{position:static!important;width:72mm!important;max-width:none!important;max-height:none!important;padding:2mm 0 0!important;margin:0 auto!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow:visible!important}
 #receipt.paper58[open]{width:50mm!important}
 #receipt-content{width:100%;color:#000;font:11px monospace;overflow:visible}
 #receipt-content table{table-layout:fixed;width:100%;font-size:10px}
 #receipt-content th:first-child{width:70%}#receipt-content th:last-child,#receipt-content td:last-child{text-align:right}
 #receipt-content th,#receipt-content td{padding:2mm 0;border-bottom:1px dashed #aaa;overflow-wrap:anywhere}
 #receipt-content td:first-child{padding-right:2mm}
 #receipt-content tr,.receipt-amount,.receipt-logo,.ticket-end{break-inside:avoid;page-break-inside:avoid}
 #receipt-content h2{font-size:16px}#receipt-content small{color:#000}
 .ticket-end{margin-top:6mm;border-top:1px dashed #000;text-align:center;padding-top:2mm;padding-bottom:12mm;font:9px monospace;color:#000}
}
