*{box-sizing:border-box}body{margin:0;background:#f4f5f7;color:#203041;font:14px Arial,Helvetica,sans-serif;padding-bottom:100px}main{max-width:1250px;margin:24px auto;background:white;padding:28px;border:1px solid #dfe3e8;border-radius:6px}header{display:flex;align-items:center;gap:28px;flex-wrap:wrap;padding-bottom:22px}header img{height:auto}h1{font-size:24px;letter-spacing:1px;color:#b51e2e;margin:0 0 6px}header p{font-size:12px;color:#75808a;margin:0}header .button{margin-left:auto}button,.button,input{font:inherit}button,.button{cursor:pointer;border:0;border-radius:4px;background:#20374b;color:white;padding:13px 18px;font-size:13px;font-weight:bold;text-decoration:none;display:inline-block}button:focus-visible,a:focus-visible,input:focus-visible,.table-wrap:focus-visible{outline:3px solid #c59a3c;outline-offset:2px}.secondary{background:#edf1f5;color:#20374b}.terms{padding:15px;background:#f6f7f9;border-left:3px solid #c3a66c;line-height:1.7;font-size:13px}.details{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:24px 0}.details label{font-size:12px;font-weight:bold}.details input{display:block;width:100%;margin-top:8px;padding:12px;border:1px solid #cfd5dc;border-radius:4px;min-height:44px;background:#fffef8;font-size:16px}.toolbar{display:flex;align-items:center;gap:18px;margin:0 0 12px}.toolbar>input{flex:1;max-width:440px;min-width:0;padding:12px;border:1px solid #cfd5dc;border-radius:4px;font-size:16px}.check{display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:12px}.check input{accent-color:#20374b;width:16px;height:16px}#result{font-size:12px;color:#7a858e;margin-left:auto}.hint{font-size:12px;line-height:1.6;color:#6c7884}.table-wrap{overflow:auto;border:1px solid #d6dce3;border-radius:4px;max-height:66vh}table{border-collapse:separate;border-spacing:0;width:100%;table-layout:fixed;min-width:820px;font-size:13px}.code-col{width:155px}.name-col{width:auto}.stock-col{width:65px}.price-col{width:90px}.qty-col{width:115px}th{position:sticky;top:0;background:#20374b;color:white;padding:14px 12px;text-align:left;font-size:12px;z-index:2;border-right:1px solid #ffffff24}td{border-bottom:1px solid #e0e5ea;border-right:1px solid #e5e9ed;padding:10px 12px;height:55px;background:white;line-height:1.45}tr:nth-child(even) td{background:#f5f7fa}td.code{color:#73808c;font-size:11px;overflow-wrap:anywhere}.num{text-align:right;font-variant-numeric:tabular-nums}.qty-head,.qty-cell{position:sticky;right:0;z-index:1;box-shadow:-2px 0 3px #20374b12}.qty-head{z-index:3;background:#665321}.qty-cell,tr:nth-child(even) .qty-cell{background:#fff2c9;padding:6px 10px}.qty-cell input{width:100%;min-height:42px;border:1px solid #dac994;border-radius:3px;background:#fffaf0;padding:8px;text-align:center;font-size:16px;color:#20374b}.qty-cell input:disabled{background:#f0ece0;color:#a5a09a}.out{color:#939da5}footer{font-size:11px;color:#7a858f;margin-top:20px;line-height:1.6}footer a{color:#526e88}.orderbar{position:fixed;bottom:0;left:0;right:0;background:#20374b;color:white;padding:17px max(20px,calc((100vw - 1194px)/2));display:flex;justify-content:space-between;align-items:center;gap:15px;z-index:4;padding-bottom:max(17px,env(safe-area-inset-bottom))}.orderbar span{display:block;font-size:11px;margin-bottom:6px;color:#c5cfd8}.orderbar strong{font-size:18px;font-weight:500}.orderbar button{background:#e4c580;color:#213247}dialog{width:680px;max-width:calc(100% - 24px);max-height:90dvh;border:0;border-radius:7px;padding:25px;color:#203041}dialog::backdrop{background:#152b3e88}.dialoghead{display:flex;align-items:center;justify-content:space-between}h2{font-size:22px}.dialoghead button{background:none;color:#203041;font-size:22px}.orderline{display:grid;grid-template-columns:1fr auto;gap:12px;padding:12px 0;border-bottom:1px solid #e2e6eb;font-size:13px;line-height:1.5}.orderline small{display:block;color:#78858e}.orderline button{padding:6px 0;background:none;color:#a22a35;font-size:12px}.orderline input{width:60px;padding:7px;margin:6px 10px 0 0;font-size:16px;border:1px solid #cfd5dc;border-radius:3px}#order-total{font-size:20px;font-weight:bold;margin-top:22px}.note{font-size:12px;line-height:1.6;color:#77838d}.actions{display:flex;gap:12px;margin-top:20px}#customer-summary{font-size:13px;line-height:1.7;overflow-wrap:anywhere}#message{font-size:12px}
@media(max-width:650px){body{background:white}main{margin:0;border:0;border-radius:0;padding:18px 12px}header{gap:16px;padding-bottom:17px}header img{width:130px}header h1{font-size:19px}header p{font-size:10px}header .button{margin-left:0;width:100%;text-align:center;padding:12px}.details{grid-template-columns:1fr;gap:14px;margin:20px 0}.toolbar{flex-wrap:wrap;gap:10px}.toolbar>input{flex-basis:100%;max-width:none}.terms{font-size:12px;padding:12px}.table-wrap{max-height:62dvh}table{min-width:650px;font-size:12px}.code-col{width:125px}.name-col{width:230px}.stock-col{width:50px}.price-col{width:75px}.qty-col{width:95px}td{padding:8px;height:60px}th{padding:12px 8px}.qty-cell{padding:6px}th,td.code{font-size:10px}.orderbar{padding-left:14px;padding-right:14px}.orderbar strong{font-size:16px}.orderbar button{padding:14px;font-size:12px}.actions{flex-direction:column}dialog{padding:18px}}

/* One stable horizontal scroll surface; cells move together. */
html{scrollbar-gutter:stable}main{min-width:0;max-width:min(1250px,100%)}.table-wrap{max-height:none;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;touch-action:pan-x pan-y;isolation:isolate}table{min-width:820px}th{position:static}.qty-head,.qty-cell{position:static;right:auto;box-shadow:none}.qty-head{background:#665321}.actions{flex-wrap:wrap}.actions button{white-space:normal;line-height:1.4}
@media(max-width:650px){.table-wrap{max-height:none}table{width:650px;min-width:650px}.code-col{width:110px}.name-col{width:225px}.stock-col{width:45px}.price-col{width:80px}.qty-col{width:110px}}
/* Compact sheet: the logo and table headings stay visible. */
body{height:100dvh;overflow:hidden;padding-bottom:0}main{height:calc(100dvh - 78px);margin:0 auto;padding:10px 14px;display:flex;flex-direction:column;border-radius:0;border-top:0;border-bottom:0}header{flex:none;gap:18px;padding:4px 0 10px;min-height:51px}header img{width:135px}header h1{font-size:17px;margin:0}header .button{padding:9px 12px;font-size:11px}.toolbar{flex:none;margin:0 0 8px;gap:10px}.toolbar>input{padding:8px 10px;font-size:16px;max-width:360px}.table-wrap{flex:1;min-height:0;max-height:none;overflow:auto}th{position:sticky;top:0;padding:9px 8px}td{padding:6px 8px;height:43px}.qty-head{position:sticky;top:0;right:auto}.qty-cell{padding:3px 6px}.qty-cell input{min-height:36px;padding:5px}.code-col{width:135px}.stock-col{width:55px}.price-col{width:80px}.qty-col{width:95px}.product-name{overflow-wrap:anywhere;white-space:normal}.mobile-meta{display:none}footer{display:none}.orderbar{min-height:74px;padding-top:10px;padding-bottom:10px}.orderbar button{padding:12px 16px}.orderbar strong{font-size:16px}.orderbar span{margin-bottom:4px}
@media(max-width:650px){main{padding:8px;height:calc(100dvh - 76px)}header{flex-wrap:nowrap;gap:10px}header img{width:100px}header h1{font-size:13px}header .button{margin-left:auto;width:auto;font-size:10px;padding:9px}.toolbar{flex-wrap:nowrap}.toolbar>input{flex-basis:auto;width:100%;max-width:none;padding:8px}.toolbar .check,#result{display:none}.table-wrap{overflow-x:hidden;overflow-y:auto}table{width:100%;min-width:0}.code-col,.stock-col,.price-col{display:none}.name-col{width:auto}.qty-col{width:78px}th:first-child,td:first-child,th:nth-child(3),td:nth-child(3),th:nth-child(4),td:nth-child(4),th:nth-child(5),td:nth-child(5){display:none}th:nth-child(2){width:auto}.product-name{font-size:13px;line-height:1.35;padding:8px}.mobile-meta{display:block;font-size:11px;color:#5c6c79;margin-top:4px}.mobile-meta.code{font-size:10px;color:#85919b}.qty-cell{width:78px;padding:4px}.qty-cell input{width:100%;min-height:42px}.qty-head{font-size:10px;padding:8px 4px}dialog .details{margin:10px 0 18px}.orderbar{padding-left:12px;padding-right:12px}}

/* Quantity entry uses buttons, not text/password fields or the native keyboard. */
.qty-col{width:130px}.qty-cell{padding:5px}.qty-control{width:118px;margin:auto}.qty-stepper{display:grid;grid-template-columns:32px 1fr 32px;align-items:stretch;border:1px solid #d8c68f;background:#fffdf4;border-radius:5px;overflow:hidden}.qty-stepper button{margin:0;padding:0;height:36px;border-radius:0;background:transparent;color:#374c60;font-size:19px;min-width:0;touch-action:manipulation}.qty-stepper .qty-value{font-size:16px;font-weight:bold;border-left:1px solid #ece3c9;border-right:1px solid #ece3c9;font-variant-numeric:tabular-nums;overflow:hidden}.qty-stepper button:active{background:#ead6a2}.qty-all{width:100%;margin-top:3px!important;padding:5px 2px!important;font-size:10px!important;line-height:1.2;color:#72551e!important;background:#f0e1b7!important;border-radius:3px;min-height:25px;touch-action:manipulation}.qty-control button:disabled{opacity:.35;cursor:not-allowed}.orderline .qty-control{display:inline-block;margin:8px 12px 0 0;vertical-align:middle}.orderline .qty-stepper button{padding:0;color:#374c60;font-size:19px}.orderline .qty-stepper .qty-value{font-size:16px}.orderline>strong{white-space:nowrap}#keypad{width:360px;padding:18px;overflow:auto;max-height:calc(100dvh - 20px)}#keypad h2{font-size:18px;margin:0}#keypad-name{font-size:13px;line-height:1.4;margin:8px 0 12px;overflow-wrap:anywhere}.keypad-stock-row{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;color:#697b89}.keypad-stock-row button{font-size:11px;padding:8px}#keypad-value{display:block;border:1px solid #d4c18e;background:#fff9e7;font-size:32px;font-weight:bold;line-height:1.3;text-align:center;padding:8px;margin-top:12px;border-radius:5px;font-variant-numeric:tabular-nums}#keypad-note{height:16px;margin:5px 0;font-size:11px;color:#9c4432}#keypad-keys{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}#keypad-keys button{font-size:21px;min-height:45px;padding:7px;background:#eef2f5;color:#20374b;touch-action:manipulation}#keypad-keys button[data-key=clear]{font-size:12px}#keypad-done{width:100%;margin-top:12px;min-height:44px}button{touch-action:manipulation}dialog{overflow-anchor:none}#order{scrollbar-gutter:stable}
@media(max-width:650px){.qty-col,.qty-cell{width:112px}.qty-control{width:102px}.qty-stepper{grid-template-columns:30px 1fr 30px}.qty-stepper button{height:38px}.qty-head{width:112px}.product-name{padding:7px;font-size:13px}.qty-all{min-height:26px}.orderline .qty-control{width:118px}}
@media(max-height:600px){#keypad{padding:12px}#keypad-name{margin:5px 0}#keypad-keys button{min-height:34px;padding:3px}#keypad-value{font-size:25px;padding:4px}#keypad-done{margin-top:7px;min-height:36px}}

.dispatch-banner{display:flex;flex:none;align-items:center;background:#20374b;color:#fff3ce;border-radius:3px;margin:0 0 8px;min-width:0;height:30px;overflow:hidden}.dispatch-window{flex:1;min-width:0;overflow:hidden}.dispatch-track{display:flex;width:max-content;animation:dispatch-scroll 22s linear infinite;will-change:transform}.dispatch-track span{display:block;white-space:nowrap;padding:0 40px;font-size:12px;font-weight:600;line-height:30px;letter-spacing:.15px}.dispatch-banner button{flex:none;width:32px;height:30px;padding:0;border-radius:0;border-left:1px solid #ffffff30;color:#fff3ce;background:#20374b;font-size:12px}.dispatch-banner.paused .dispatch-track,.dispatch-banner:hover .dispatch-track,.dispatch-banner:focus-within .dispatch-track{animation-play-state:paused}@keyframes dispatch-scroll{to{transform:translateX(-50%)}}@media(prefers-reduced-motion:reduce){.dispatch-banner{height:auto;min-height:30px}.dispatch-track{animation:none;display:block;width:auto;will-change:auto}.dispatch-track span{white-space:normal;text-align:center;line-height:1.4;padding:6px 10px}.dispatch-track span+span{display:none}.dispatch-banner button{display:none}}
