:root{--red:#e1141c;--red-dark:#b40a12;--red-soft:#fdecec;--bg:#f3f4f6;--panel:#fff;--text:#1f2430;--muted:#6b7280;--line:#e5e7eb;--green:#15803d;--amber:#d97706;--radius:12px;--shadow:0 1px 2px #1018280f, 0 1px 3px #10182814;color:var(--text);background:var(--bg);-webkit-tap-highlight-color:transparent;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);overflow:hidden}button,input,select{font:inherit;color:inherit}button{cursor:pointer;background:0 0;border:0}button:disabled{cursor:not-allowed;opacity:.45}h1,h2,h3{margin:0}.red{color:var(--red)}.muted{color:var(--muted);font-size:13px}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px}.spacer{flex:1}.card{background:var(--panel);border-radius:var(--radius);box-shadow:var(--shadow)}.empty{color:var(--muted);text-align:center;grid-column:1/-1;margin:0;padding:28px 12px}.error{color:var(--red-dark);background:var(--red-soft);border-radius:8px;margin:0;padding:8px 12px;font-size:14px}.hint{color:var(--muted);margin:0;font-size:14px;line-height:1.45}.shell{grid-template:"top top"64px"side main"1fr"status status"42px/104px 1fr;height:100dvh;display:grid}.topbar{color:#fff;background:linear-gradient(90deg, var(--red-dark), var(--red) 55%, #ee3a40);z-index:2;grid-area:top;justify-content:space-between;align-items:center;padding:0 20px;display:flex;box-shadow:0 2px 6px #b40a1240}.logo{flex:none;width:auto;display:block}.brand{color:#fff;height:28px}.login-logo{color:#c1121f;align-self:center;height:44px;margin:4px 0 2px}.top-right{align-items:center;gap:22px;font-size:14px;display:flex}.top-info{white-space:nowrap;align-items:center;gap:6px;display:flex}.clock{border-left:1px solid #ffffff80;flex-direction:column;align-items:flex-end;padding-left:18px;line-height:1.1;display:flex}.clock small{opacity:.9;font-size:12px}.clock strong{font-size:22px;font-weight:700}.sidebar{background:var(--panel);border-right:1px solid var(--line);flex-direction:column;grid-area:side;gap:8px;padding:10px 8px;display:flex;overflow-y:auto}.nav-btn{border-radius:var(--radius);color:#4b5563;text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:6px;min-height:82px;font-size:12px;font-weight:600;line-height:1.15;transition:background .15s;display:flex;position:relative}.nav-btn:hover{background:var(--red-soft);color:var(--red-dark)}.nav-btn.active{background:var(--red);color:#fff;box-shadow:0 6px 14px #e1141c4d}.badge{background:var(--red);color:#fff;border:2px solid #fff;border-radius:10px;min-width:20px;height:20px;padding:0 6px;font-size:12px;line-height:20px;position:absolute;top:6px;right:8px}.nav-btn.active .badge{color:var(--red);border-color:var(--red);background:#fff}.main{grid-area:main;min-width:0;min-height:0;overflow:hidden}.statusbar{background:var(--panel);border-top:1px solid var(--line);white-space:nowrap;grid-area:status;align-items:center;gap:16px;padding:0 16px;font-size:13px;display:flex;overflow:hidden}.net{align-items:center;gap:6px;font-weight:600;display:flex}.dot{border-radius:50%;width:10px;height:10px;display:inline-block}.dot.on{background:#22c55e;box-shadow:0 0 0 3px #dcfce7}.dot.off{background:#f59e0b;box-shadow:0 0 0 3px #fef3c7}.sync-text,.attention,.print-btn{border-radius:8px;align-items:center;gap:6px;padding:4px 8px;display:flex}.sync-text{color:#374151;border-left:1px solid var(--line);border-radius:0;padding-left:16px}.sync-text.bad{color:var(--red-dark);font-weight:600}.attention{color:var(--red);font-weight:700;text-decoration:underline}.print-btn{border:1px solid var(--line);font-weight:600}.print-btn:not(:disabled):hover{border-color:var(--red);color:var(--red)}.spin{animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.btn{background:#fff;border:1px solid #d1d5db;border-radius:10px;justify-content:center;align-items:center;gap:6px;min-height:44px;padding:0 16px;font-weight:600;display:inline-flex}.btn:not(:disabled):hover{border-color:var(--red);color:var(--red)}.btn.primary{background:var(--red);border-color:var(--red);color:#fff}.btn.primary:not(:disabled):hover{background:var(--red-dark);color:#fff}.btn.block{width:100%}.btn.small{min-height:32px;padding:0 12px;font-size:13px}.icon-btn{color:var(--muted);border-radius:8px;padding:8px;display:inline-flex}.icon-btn:hover{background:var(--bg);color:var(--red)}.field{color:#374151;flex-direction:column;gap:6px;font-size:13px;font-weight:600;display:flex}.field input,.field select{background:#fff;border:1px solid #d1d5db;border-radius:10px;height:44px;padding:0 12px;font-size:16px;font-weight:400}input:focus,select:focus{outline:2px solid var(--red);outline-offset:-1px;border-color:#0000}.sales{grid-template-columns:1fr 400px;gap:12px;height:100%;min-height:0;padding:12px;display:grid}.catalog{flex-direction:column;gap:10px;min-width:0;min-height:0;display:flex}.searchbar{border:2px solid var(--red);border-radius:var(--radius);background:#fff;flex:none;align-items:center;gap:10px;height:54px;padding-left:14px;display:flex;overflow:hidden}.searchbar input{background:0 0;border:0;flex:1;min-width:0;height:100%;font-size:17px}.searchbar input:focus{outline:none}.searchbar.small{border-width:1px;border-color:#d1d5db;max-width:460px;height:44px;margin:12px 0}.search-btn{background:var(--red);color:#fff;align-self:stretch;place-items:center;width:58px;display:grid}.search-btn:hover{background:var(--red-dark)}.cats{flex:none;gap:8px;display:flex}.cat{min-width:86px;height:62px;box-shadow:var(--shadow);color:#4b5563;white-space:nowrap;background:#fff;border-radius:10px;flex-direction:column;justify-content:center;align-items:center;gap:3px;padding:0 10px;font-size:12px;font-weight:600;display:flex}.cat:hover{color:var(--red)}.cat.active{background:var(--red);color:#fff}.more-wrap{position:relative}.dropdown{z-index:5;background:#fff;border-radius:10px;min-width:180px;padding:6px;position:absolute;top:66px;left:0;box-shadow:0 10px 30px #0000002e}.dropdown button{text-align:left;border-radius:8px;align-items:center;gap:8px;width:100%;padding:10px;display:flex}.dropdown button:hover{background:var(--red-soft);color:var(--red-dark)}.grid{grid-template-columns:repeat(auto-fill,minmax(128px,1fr));grid-auto-rows:min-content;gap:10px;min-height:0;padding:2px 2px 8px;display:grid;overflow-y:auto}.tile{border-radius:var(--radius);box-shadow:var(--shadow);text-align:center;background:#fff;flex-direction:column;align-items:stretch;padding:8px 8px 10px;transition:transform 80ms,box-shadow .15s;display:flex}.tile:hover{box-shadow:0 0 0 2px var(--red)}.tile:active{transform:scale(.97)}.pic{color:#9ca3af;background:#f9fafb;border-radius:8px;place-items:center;height:78px;display:grid;overflow:hidden}.pic img{object-fit:cover;width:100%;height:100%}.emoji{font-size:50px;line-height:1}.emoji-sm{font-size:18px}.thumb{object-fit:cover;vertical-align:middle;border-radius:6px;width:28px;height:28px}.inv-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;display:flex}.inv-head p{margin:0}.tile-name{justify-content:center;align-items:center;min-height:2.4em;margin-top:8px;font-size:14px;font-weight:600;line-height:1.2;display:flex}.tile-price{color:var(--red);font-size:15px;font-weight:800}.cart{border-radius:var(--radius);box-shadow:var(--shadow);background:#fff;flex-direction:column;min-height:0;display:flex;overflow:hidden}.cart-head{background:var(--red);color:#fff;flex:none;align-items:center;gap:10px;height:50px;padding:0 16px;font-size:16px;font-weight:700;display:flex}.cart-cust{color:var(--muted);border:1px solid #d1d5db;border-radius:10px;flex:none;align-items:center;gap:8px;margin:10px 12px 4px;padding:0 10px;display:flex}.cart-cust input{background:0 0;border:0;flex:1;height:40px;font-size:15px}.cart-cust input:focus{outline:none}.lines{flex:1;min-height:60px;padding:0 12px;overflow-y:auto}.line{border-bottom:1px solid var(--line);grid-template-columns:1fr auto minmax(84px,auto);align-items:center;gap:10px;padding:10px 0;display:grid}.line-name{flex-direction:column;font-size:14px;font-weight:600;display:flex}.line-name small{color:var(--muted);font-weight:400}.stepper{align-items:center;gap:8px;display:flex}.stepper button{color:#4b5563;background:#eef0f3;border-radius:50%;place-items:center;width:30px;height:30px;display:grid}.stepper button:hover{background:var(--red-soft);color:var(--red)}.stepper span{text-align:center;min-width:20px;font-weight:700}.line-amt{text-align:right;white-space:nowrap;font-weight:700}.sums{border-top:1px solid var(--line);flex-direction:column;flex:none;gap:4px;padding:8px 16px 6px;font-size:14px;display:flex}.sums div{justify-content:space-between;display:flex}.green{color:var(--green);font-weight:600}.total-strip{background:var(--red-soft);color:var(--red);border-radius:10px;flex:none;justify-content:space-between;align-items:center;margin:4px 12px;padding:8px 14px;font-size:28px;font-weight:800;display:flex}.total-strip span:first-child{font-size:20px;font-weight:700}.cart-actions{flex:none;grid-template-columns:repeat(3,1fr);gap:8px;padding:6px 12px;display:grid}.pay-btn{border-radius:var(--radius);color:#fff;background:linear-gradient(90deg, var(--red), var(--red-dark));flex:none;justify-content:space-between;align-items:center;height:64px;margin:4px 12px 12px;padding:0 20px;display:flex;box-shadow:0 8px 18px #e1141c59}.pay-btn span{font-size:30px;font-weight:800}.pay-btn:not(:disabled):hover{filter:brightness(1.06)}.toast{z-index:50;color:#fff;text-align:left;cursor:pointer;background:#1f2430;border-radius:10px;align-items:center;gap:14px;max-width:calc(100vw - 32px);padding:12px 14px 12px 20px;font-weight:600;display:flex;position:fixed;bottom:64px;left:50%;transform:translate(-50%);box-shadow:0 10px 30px #0000004d}.toast svg{opacity:.7;flex:none}.toast:hover svg{opacity:1}.toast.sticky{border:2px solid #22c55e;padding:16px 16px 16px 24px;font-size:20px}.sw-toast{z-index:60;color:#fff;background:#1f2430;border-radius:10px;align-items:center;gap:10px;max-width:calc(100vw - 32px);padding:10px 12px 10px 18px;font-size:14px;display:flex;position:fixed;top:74px;left:50%;transform:translate(-50%);box-shadow:0 10px 30px #0000004d}.sw-toast button{color:#1f2430;background:#fff;border-radius:8px;padding:6px 12px;font-weight:600}.modal-back{z-index:40;background:#11182780;place-items:center;padding:16px;display:grid;position:fixed;inset:0}.modal{background:#fff;border-radius:16px;flex-direction:column;gap:14px;width:440px;max-width:100%;max-height:100%;padding:18px 20px 20px;display:flex;overflow-y:auto;box-shadow:0 20px 50px #0000004d}.modal-head{justify-content:space-between;align-items:center;display:flex}.modal-head h2{align-items:center;gap:8px;font-size:20px;display:flex}.due{background:var(--red-soft);color:var(--red);border-radius:10px;justify-content:space-between;align-items:center;padding:12px 16px;display:flex}.due strong{font-size:26px;font-weight:800}.due span{flex-direction:column;display:flex}.due-note{color:var(--muted);font-size:12px;font-weight:500}.methods{grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:8px;display:grid}.method{border:1px solid #d1d5db;border-radius:10px;justify-content:center;align-items:center;gap:8px;height:50px;font-weight:700;display:flex}.method.active{background:var(--red);border-color:var(--red);color:#fff}.big-input{text-align:right;border:1px solid #d1d5db;border-radius:10px;width:100%;height:58px;padding:0 14px;font-size:28px!important;font-weight:700!important}.quick{flex-wrap:wrap;gap:8px;display:flex}.quick .btn{flex:1;min-width:70px}.change{color:var(--green);text-align:right;margin:0;font-size:20px;font-weight:800}.short{color:var(--red);text-align:right;margin:0;font-size:20px;font-weight:800}.modal-actions{justify-content:flex-end;gap:10px;display:flex}.modal-actions .btn{flex:1}.page{height:100%;padding:20px 22px;overflow-y:auto}.page h1{align-items:center;gap:10px;margin-bottom:12px;font-size:22px;display:flex}.chips{flex-wrap:wrap;gap:8px;margin-bottom:12px;display:flex}.chip{background:#fff;border:1px solid #d1d5db;border-radius:20px;padding:8px 16px;font-size:14px;font-weight:600}.chip.active{background:var(--red);border-color:var(--red);color:#fff}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:14px}th{text-align:left;color:var(--muted);text-transform:uppercase;letter-spacing:.4px;border-bottom:1px solid var(--line);white-space:nowrap;padding:12px;font-size:12px}td{border-bottom:1px solid var(--line);padding:10px 12px}.num{text-align:right;white-space:nowrap}.pill{white-space:nowrap;border-radius:12px;padding:3px 10px;font-size:12px;font-weight:700;display:inline-block}.pill.pending{color:#92400e;background:#fef3c7}.pill.synced{color:#166534;background:#dcfce7}.pill.error{background:var(--red-soft);color:var(--red-dark)}.err-row td{color:#7f1d1d;background:#fff1f2;font-size:13px}.held-list{flex-direction:column;gap:10px;display:flex}.held{align-items:center;gap:14px;padding:14px 16px;display:flex}.held-main{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.held-main .muted{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.held>strong{font-size:18px}.settings-grid{grid-template-columns:1fr 1fr;align-items:start;gap:16px;margin-bottom:16px;display:grid}.deflist{grid-template-columns:max-content 1fr;gap:10px 20px;margin:0;padding:18px 20px;font-size:14px;display:grid}.deflist dt{color:var(--muted)}.deflist dd{margin:0;font-weight:600}.mapping{flex-direction:column;gap:12px;padding:18px 20px;display:flex}.walkin{color:var(--green);background:#f0fdf4;border-radius:10px;padding:10px 12px;font-weight:600}.walkin.missing{background:var(--red-soft);color:var(--red-dark)}.walkin-row{gap:8px;display:flex}.walkin-row input{flex:1;min-width:0}.field.sub{color:var(--muted);font-weight:500}.login-page{background:linear-gradient(135deg, var(--red-dark), var(--red) 60%, #f05056);place-items:center;height:100%;min-height:100%;padding:16px;display:grid;overflow-y:auto}.login-card{background:#fff;border-radius:18px;flex-direction:column;gap:14px;width:400px;max-width:100%;padding:28px 28px 30px;display:flex;box-shadow:0 25px 60px #0000004d}.login-card .hint{text-align:center}.login-card .btn{height:50px;margin-top:4px;font-size:17px}.pw{display:flex;position:relative}.pw input{flex:1;min-width:0;padding-right:46px!important}.pw-eye{width:38px;height:38px;color:var(--muted);border-radius:8px;place-items:center;display:grid;position:absolute;top:50%;right:4px;transform:translateY(-50%)}.pw-eye:hover{color:var(--red);background:var(--red-soft)}.check{color:#374151;cursor:pointer;align-items:flex-start;gap:10px;font-size:14px;font-weight:600;display:flex}.check input{width:18px;height:18px;accent-color:var(--red);flex:none;margin-top:1px}.check small{color:var(--muted);margin-top:2px;font-size:12px;font-weight:400;display:block}#receipt{display:none}@media print{@page{size:80mm auto;margin:4mm}html,body{background:#fff;height:auto;overflow:visible}body>:not(#receipt){display:none!important}#receipt{color:#000;width:72mm;font-family:ui-monospace,Menlo,Consolas,Courier New,monospace;font-size:12px;line-height:1.35;display:block}.r-center{text-align:center}.r-bold{font-weight:700}.r-big{font-size:14px}.r-small{font-size:10px}.r-row{justify-content:space-between;gap:8px;display:flex}.r-rule{border-top:1px dashed #000;margin:6px 0}}@media (width<=1100px){.sales{grid-template-columns:1fr 340px}.settings-grid{grid-template-columns:1fr}}@media (width<=820px){body{overflow:auto}.shell{grid-template:"top"56px"side""main"1fr"status"42px/1fr}.hide-portrait{display:none!important}.topbar{padding:0 12px}.brand{height:24px}.sidebar{border-right:0;border-bottom:1px solid var(--line);flex-direction:row;padding:6px;overflow:auto hidden}.sidebar .spacer{display:none}.nav-btn{flex:none;min-width:78px;min-height:58px;font-size:11px}.sales{grid-template-columns:1fr;height:100%;overflow-y:auto}.grid{max-height:46vh}.lines{flex:none;max-height:30vh}.cats{overflow-x:auto}.more-wrap{position:static}.page{padding:16px}.statusbar{gap:10px;padding:0 10px}}
