/* v4: a bounded checkout workspace keeps the payment controls visible. */
header{padding:10px 18px;gap:8px;flex-wrap:wrap}header strong{font-size:18px;margin-right:auto}header nav{order:3;flex:0 0 100%;flex-wrap:nowrap;overflow:auto;white-space:nowrap;gap:3px;scrollbar-width:thin}header nav button{font-size:13px;padding:8px 11px}#module-menu{font-size:13px}header:not(.expanded-menu) nav{max-height:45px}header.expanded-menu nav{flex-wrap:wrap;max-height:180px}.status{padding:6px 18px}.checkout-mode main{padding:12px}#checkout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:14px;height:var(--work-height,70vh);min-height:340px}.sale-workspace{display:grid;grid-template-rows:auto auto minmax(0,1fr);min-width:0;min-height:0;gap:10px}.sale-workspace .scan{margin:0}.sale-workspace .scan input{padding:12px;font-size:15px}.sale-workspace .scan button{padding:10px}.sale-workspace .subbar{margin:0;display:grid;grid-template-columns:minmax(130px,.8fr) minmax(150px,1fr) auto;gap:8px}.sale-workspace .subbar label{display:block;font-size:11px}.sale-workspace .subbar input{margin:3px 0 0;padding:9px}.sale-workspace .subbar select{align-self:end;max-width:100%;padding:9px}.sale-workspace .subbar button{align-self:end;padding:9px;font-size:12px}.ticket-table{min-height:0;height:100%;border-radius:8px}.ticket-table table{table-layout:fixed;min-width:610px}.ticket-table th{position:sticky;top:0;z-index:1}.ticket-table th:nth-child(1){width:32px}.ticket-table th:nth-child(2){width:88px}.ticket-table th:nth-child(3){width:24%}.ticket-table th:nth-child(4){width:125px}.ticket-table th:nth-child(5){width:80px}.ticket-table th:nth-child(6){width:76px}.ticket-table th:nth-child(7){width:90px}.ticket-table th:nth-child(8){width:66px}.ticket-table td,.ticket-table th{padding:10px 6px;overflow-wrap:anywhere}.ticket-table td input{width:64px;padding:8px 4px}.ticket-table td select{width:100%;padding:8px 3px;font-size:12px}.ticket-table td button{padding:7px 5px;font-size:12px}.ticket-table td small{line-height:1.4}#empty{padding:35px 15px;font-size:18px}.sale-summary{background:white;border:1px solid #dce0e8;border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:12px;overflow:auto;min-height:0}.summary-title h2{font-size:18px;margin:0 0 6px}#shift-status{display:block;font-size:12px;color:#6c778a}.sale-summary label{margin:0}.sale-summary input,.sale-summary select{padding:8px;margin-top:4px}.summary-discount{display:grid;grid-template-columns:1fr;gap:5px}#sale-discount{max-width:none}.summary-amounts{border-top:1px solid #e6e9ee;padding-top:8px;font-size:13px}.summary-amounts p{display:flex;justify-content:space-between;margin:7px 0}#units{font-size:12px;color:#6c778a}.summary-total{display:flex;flex-direction:column;gap:5px;border-top:1px solid #e6e9ee;padding-top:12px;font-size:13px}.summary-total #total{font-size:34px;line-height:1.2;color:#303b57}.summary-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.summary-actions button{padding:9px 5px;font-size:12px}.sale-summary .pay-button{font-size:19px;padding:14px;margin:0}.summary-help{font-size:11px;line-height:1.7;color:#6c778a;margin:0}.settings-tabs{display:flex;gap:10px;margin:0 0 20px}.settings-tabs [aria-selected=true]{background:#464f69;color:white}.ticket-editor-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px}.ticket-editor-grid .grid{grid-template-columns:repeat(2,minmax(0,1fr))}.preview-card{background:#e5e8ee;border-radius:12px;padding:20px;align-self:start;position:sticky;top:16px}.preview-card h2{margin:0}.preview-card>p{font-size:12px;color:#68748a}.preview-card button{width:100%;margin-top:18px}#ticket-preview{background:#fff;box-shadow:0 5px 20px #20304015;padding:16px;width:100%;max-width:300px;margin:0 auto;font:12px monospace;overflow-wrap:anywhere}#ticket-preview.narrow{max-width:220px}#ticket-preview h2,#ticket-preview p{text-align:center}#ticket-preview table{font:11px monospace}#ticket-preview td,#ticket-preview th{padding:6px 3px}#ticket-preview small{display:block}.receipt-logo{display:block;max-width:65%;max-height:100px;object-fit:contain;margin:0 auto 12px}#logo-thumb{max-width:100px;max-height:60px;object-fit:contain}.logo-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0}.logo-controls span{font-size:12px}.visibility-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}.visibility-grid label{font-size:13px}#ticket-logo{padding:8px;font-size:12px}#ticket-settings small{display:block;color:#6c778a;font-weight:400;margin-top:5px}#receipt-content p{overflow-wrap:anywhere}#receipt-content .receipt-amount{font-size:13px}#message{max-width:min(700px,94vw);bottom:12px}#receipt[open]{width:390px}
@media(min-width:1100px){#module-menu{display:none}}
@media(max-width:1100px){#checkout{grid-template-columns:minmax(0,1fr) 260px}.sale-summary{padding:12px;gap:9px}.sale-workspace .subbar{grid-template-columns:minmax(100px,1fr) minmax(100px,1fr)}.sale-workspace .subbar button{grid-column:2}.ticket-editor-grid{grid-template-columns:minmax(0,1fr) 280px}.ticket-editor-grid .grid{grid-template-columns:1fr}}
@media(max-width:800px),(max-height:600px){#checkout{height:auto;grid-template-columns:1fr;min-height:0}.sale-workspace{grid-template-rows:auto auto minmax(220px,45vh)}.sale-summary{overflow:visible;display:grid;grid-template-columns:1fr 1fr}.summary-title,.summary-total,.summary-actions,.sale-summary .pay-button,.summary-help{grid-column:1/-1}.summary-total{flex-direction:row;justify-content:space-between;align-items:center}.ticket-editor-grid{grid-template-columns:1fr}.preview-card{position:static;max-width:400px}.ticket-editor-grid .grid{grid-template-columns:repeat(2,minmax(0,1fr))}header nav{font-size:12px}.status{gap:12px;font-size:11px}.sale-workspace .scan{flex-wrap:wrap}.sale-workspace .scan input{flex-basis:65%}}
@media(max-width:480px){.ticket-editor-grid .grid,.visibility-grid{grid-template-columns:1fr}.sale-workspace .subbar{grid-template-columns:1fr}.sale-workspace .subbar button{grid-column:auto}.sale-summary{grid-template-columns:1fr}.summary-title,.summary-total,.summary-actions,.sale-summary .pay-button,.summary-help{grid-column:auto}}
@media print{#receipt[open]{width:72mm}#receipt.paper58[open]{width:50mm}.receipt-logo{max-height:25mm}#receipt-content{overflow:visible}#receipt-content th{background:white;color:black}}
