:root{--bg:#f2f6f5;--surface:#fff;--text:#182826;--muted:#5b6f6c;--border:#d3dfdc;--accent:#0f766e;--accent-text:#fff;--danger:#c62828;--ok-bg:#e2f4ea;--ok-text:#13653d;--err-bg:#fdeaea;--err-text:#9b1c1c;--warn-bg:#fff3d6;--warn-text:#7a4f00;--info-bg:#e4eefb;--info-text:#1d4f91;--hover:#e6f0ee;--bar-bg:#0f5f5a;--bar-text:#e8f5f2;--bar-muted:#bcdcd6;--bar-hover:#ffffff1f;--bar-line:#ffffff38;--highlight:#f4b740;--highlight-text:#2b1d00;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;color:var(--text);background:var(--bg);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:15px}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;--bg:#0e1615;--surface:#15201e;--text:#e2ecea;--muted:#93a7a3;--border:#2a3b38;--accent:#2fb3a3;--accent-text:#04201c;--danger:#ef6b6b;--ok-bg:#12301f;--ok-text:#8fe0ad;--err-bg:#3a1a1a;--err-text:#f4a6a6;--warn-bg:#3a2c0b;--warn-text:#f6c768;--info-bg:#14263d;--info-text:#9cc3f5;--hover:#1e2c29;--bar-bg:#0a2a27;--bar-text:#d9eeea;--bar-muted:#8fb5ae;--bar-hover:#ffffff14;--bar-line:#ffffff24;--highlight:#f4b740;--highlight-text:#2b1d00}}*{box-sizing:border-box}body{margin:0}h1{margin:0 0 1rem;font-size:1.5rem}h2{margin:0 0 .75rem;font-size:1.15rem}input,select,button{font:inherit;color:inherit}input,select{background:var(--surface);border:1px solid var(--border);border-radius:6px;width:100%;padding:.45rem .6rem}input[type=checkbox],input[type=radio]{width:auto;accent-color:var(--accent);transform:scale(1.15)}input:focus,select:focus,button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}button,a.button{background:var(--surface);border:1px solid var(--border);cursor:pointer;border-radius:6px;padding:.45rem .9rem}a.button{color:var(--text);text-decoration:none;display:inline-block}button:hover:not(:disabled),a.button:hover{background:var(--hover)}button:disabled{opacity:.55;cursor:not-allowed}button.primary,a.button.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}button.primary:hover:not(:disabled),a.button.primary:hover{background:var(--accent);filter:brightness(1.08)}a.back{color:var(--accent);margin-bottom:.5rem;font-size:.9rem;text-decoration:none;display:inline-block}a.back:hover{text-decoration:underline}button.big{width:100%;padding:.75rem;font-size:1.05rem;font-weight:600}button.danger{color:var(--danger)}button.danger-solid{background:var(--danger);border-color:var(--danger);color:#fff}button.link{color:var(--accent);background:0 0;border:none;padding:.2rem .4rem}button.link.danger{color:var(--danger)}label{color:var(--muted);flex-direction:column;gap:.3rem;font-size:.9rem;display:flex}label>input,label>select{color:var(--text)}label.check{color:var(--text);flex-direction:row;align-self:flex-end;align-items:center;gap:.5rem;padding-bottom:.5rem}.muted{color:var(--muted)}.small{font-size:.82rem}.composite-qty{white-space:nowrap;font-variant-numeric:tabular-nums;margin-top:2px;font-size:.78rem}.grow{flex:1}.center{place-items:center;min-height:100vh;display:grid}.card{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:1.5rem}.login{flex-direction:column;gap:.9rem;width:min(360px,92vw);display:flex}.login h1{margin:0}.login p{margin:-.5rem 0 0}.error,.ok,.notice{border-radius:6px;margin:.5rem 0;padding:.55rem .75rem}.error{background:var(--err-bg);color:var(--err-text)}.ok{background:var(--ok-bg);color:var(--ok-text)}.notice{background:var(--hover);border:1px solid var(--border);align-self:end}.notice ul{margin:.35rem 0;padding-left:1.2rem}.topbar{background:var(--bar-bg);height:52px;color:var(--bar-text);border-bottom:3px solid var(--highlight);z-index:5;align-items:center;gap:1.5rem;padding:0 1.25rem;display:flex;position:sticky;top:0}.brand{letter-spacing:.04em;font-weight:700}.topbar nav{flex:1;gap:.25rem;display:flex;overflow-x:auto}.topbar a{color:var(--bar-text);white-space:nowrap;border-radius:6px;padding:.4rem .7rem;text-decoration:none}.topbar a:hover{background:var(--bar-hover)}.topbar a.active{background:var(--highlight);color:var(--highlight-text);font-weight:600}.topbar .badge{color:var(--bar-muted);border-color:var(--bar-line)}.topbar a.active .badge{color:var(--highlight-text);border-color:currentColor}.topbar button.link{color:var(--bar-text)}.topbar .lang-switch{border-color:var(--bar-line)}.topbar .lang-switch button{color:var(--bar-muted)}.topbar .lang-switch button.active{background:var(--highlight);color:var(--highlight-text)}.user{white-space:nowrap;align-items:center;gap:.5rem;display:flex}.badge{border:1px solid var(--border);color:var(--muted);border-radius:999px;padding:.05rem .45rem;font-size:.75rem}.badge.ok{background:var(--ok-bg);color:var(--ok-text);border-color:currentColor}.badge.draft{background:var(--warn-bg);color:var(--warn-text);border-style:dashed;border-color:currentColor}.badge.void{background:var(--err-bg);color:var(--err-text);border-color:currentColor;text-decoration:line-through}.badge.part{background:var(--info-bg);color:var(--info-text);border-color:currentColor}.badge.return{color:var(--accent);border-color:currentColor;font-weight:600}input.invalid,select.invalid{border-color:var(--danger)}.lot-rows{flex-direction:column;align-items:flex-start;gap:4px;margin-top:4px;display:flex}.lot-row{align-items:center;gap:6px;margin-bottom:0}.lot-row input,.lot-row select{flex:none;width:auto}.lot-row input.lot-id{width:9rem}.lot-row input[type=date]{width:10.5rem}.lot-row input.qty{width:5rem}.lot-pick{margin-top:4px}.lot-pick select{max-width:22rem}.lot-list{margin-top:2px}.small.neg,span.neg{color:var(--danger)}tr.lot-line td{border-top:none;padding-top:0}.receiving{margin-top:1.5rem}main{padding:1.5rem 1.25rem 3rem}.page{max-width:1150px;margin:0 auto}.page.narrow{max-width:820px}.page-head{justify-content:space-between;align-items:flex-start;display:flex}.row{flex-wrap:wrap;gap:.75rem;margin-bottom:.75rem;display:flex}.row>label{flex:1;min-width:160px}.grid2{grid-template-columns:1fr 1fr;gap:.75rem;display:grid}.search{max-width:420px;margin-bottom:.75rem}.muted a{color:var(--accent)}.page-head{gap:1rem}.page-head>.row{flex:1;margin-bottom:0}.page-head>.row>.search{flex:1}select.filter{align-self:flex-start;width:auto}.empty{text-align:center;padding:2rem 0}table{border-collapse:collapse;background:var(--surface);border:1px solid var(--border);border-radius:8px;width:100%;margin:.75rem 0;overflow:hidden}th,td{text-align:left;border-bottom:1px solid var(--border);vertical-align:middle;padding:.55rem .7rem}th{color:var(--muted);background:var(--bg);font-size:.82rem;font-weight:600}tbody tr:last-child td{border-bottom:none}.num{text-align:right;font-variant-numeric:tabular-nums}tr.clickable{cursor:pointer}tr.clickable:hover td{background:var(--hover)}td .qty,.adjust .qty{text-align:right;width:5rem}td .amount{text-align:right;width:8rem}td.pos{color:var(--ok-text)}td.neg{color:var(--danger)}.actions-cell{text-align:right;white-space:nowrap}.pager{justify-content:flex-end;align-items:center;gap:.75rem;display:flex}.tabs{border-bottom:1px solid var(--border);gap:.25rem;margin-bottom:1rem;display:flex}.tabs button,.tabs a{background:0 0;border:none;border-bottom:2px solid #0000;border-radius:0}.tabs a{color:var(--text);padding:.45rem .9rem;text-decoration:none}.tabs a:hover{background:var(--hover)}.tabs button.active,.tabs a.active{border-bottom-color:var(--accent);color:var(--accent);font-weight:600}.picker{position:relative}.picker-list{background:var(--surface);border:1px solid var(--border);z-index:10;border-radius:8px;max-height:320px;margin:0;padding:.25rem;list-style:none;position:absolute;top:calc(100% + 4px);left:0;right:0;overflow-y:auto;box-shadow:0 8px 24px #00000026}.picker-list li{cursor:pointer;border-radius:6px;padding:.45rem .6rem}.picker-list li.active{background:var(--hover)}.unit{font-size:.85em}.picker-message{color:var(--danger);margin:.3rem 0 0;font-size:.9em}.picker-row{justify-content:space-between;gap:1rem;display:flex}.chip{background:var(--hover);border-radius:999px;align-items:center;gap:.4rem;padding:.3rem .4rem .3rem .8rem;display:inline-flex}.supplier-select{min-width:18rem}.supplier-select .picker input{width:100%}.bill-who{gap:1.25rem;margin-bottom:.4rem}.bill-who>label.check{flex:none;min-width:0;padding-bottom:0}td label.check{justify-content:flex-end;padding-bottom:0}.checkout{flex-wrap:wrap;align-items:flex-start;gap:2rem;margin-top:1rem;display:flex}.checkout .fields{flex-direction:column;flex:1;gap:.9rem;min-width:280px;display:flex}.label{color:var(--muted);margin-bottom:.3rem;font-size:.9rem;display:block}.totals{background:var(--surface);border:1px solid var(--border);border-radius:10px;flex-direction:column;gap:.5rem;width:340px;padding:1rem;display:flex}.totals>div:not(.error):not(.muted){font-variant-numeric:tabular-nums;justify-content:space-between;display:flex}.totals .grand{font-size:1.35rem;font-weight:700}.modal-backdrop{z-index:20;background:#0006;place-items:center;padding:1rem;display:grid;position:fixed;inset:0}.modal{background:var(--surface);border-radius:12px;width:min(860px,100%);max-height:90vh;padding:1.25rem 1.5rem;overflow-y:auto}.confirm-backdrop{z-index:30}.modal.confirm{width:min(440px,100%)}.modal.confirm h2{margin:0 0 .5rem}.modal.confirm p{margin:0 0 .75rem}.modal-head{justify-content:space-between;align-items:center;margin-bottom:.75rem;display:flex}.modal-head h2{margin:0}.form{flex-direction:column;gap:.85rem;display:flex}.form .row{margin:0}.actions{justify-content:flex-end;gap:.5rem;margin-top:.5rem;display:flex}.adjust{gap:.5rem;margin-bottom:.5rem;display:flex}.big-num{font-size:1.4rem}.meta{grid-template-columns:max-content 1fr;gap:.35rem 1.25rem;margin:0 0 .5rem;display:grid}.meta dt{color:var(--muted)}.meta dd{margin:0}tfoot td{border-top:1px solid var(--border);border-bottom:none}@media (width<=720px){.topbar{flex-wrap:wrap;gap:.5rem;height:auto;padding:.5rem}.grid2{grid-template-columns:1fr}.totals{width:100%}table{display:block;overflow-x:auto}}fieldset.barcodes{border:1px solid var(--border);border-radius:8px;padding:.5rem .75rem}.barcode-list{border-collapse:collapse;width:100%;margin-bottom:.5rem}.barcode-list td{vertical-align:middle;padding:.25rem .5rem .25rem 0}.barcode-list select{width:auto}.barcode-add{flex-wrap:nowrap;align-items:center}.barcode-add input{flex:1;min-width:0}.barcode-add select,.barcode-add button{flex:none;width:auto}fieldset.tags{border:1px solid var(--border);border-radius:8px;flex-wrap:wrap;align-content:flex-start;align-items:center;gap:.25rem 1rem;padding:.5rem .75rem;display:flex}fieldset.tags label.check,.page-head label.check{align-self:center;padding-bottom:0}label.check.block{align-self:flex-start;align-items:flex-start;padding-bottom:0}label.check.block>input{margin-top:.15rem}.page-head>button,.page-head>.button{white-space:nowrap;flex-shrink:0}.page-head>p{flex:1;margin-top:0}td .badge+.badge{margin-left:.25rem}input.unregistered{width:100%;margin-top:.4rem}tr.promo-line td{background:var(--promo-bg,#2ea04312)}fieldset.contents{display:contents}fieldset.plain{border:0;min-width:0;margin:0;padding:0}.promo-scope{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));align-items:start;gap:1rem;margin-bottom:.75rem;display:grid}.chips{flex-wrap:wrap;gap:.35rem;margin-top:.4rem;display:flex}.tier{border:1px solid var(--border);border-radius:8px;margin-bottom:.75rem;padding:.75rem 1rem}.tier-head{justify-content:space-between;align-items:center;margin-bottom:.5rem;display:flex}.row.bonus{align-items:center;margin-bottom:.35rem}label.inline{flex-direction:row;align-items:center;gap:.35rem}.help-tip{vertical-align:middle;margin-left:.35rem;font-size:.8rem;font-weight:400;line-height:1;display:inline-flex;position:relative}.help-icon{border:1px solid var(--border);width:1.15rem;height:1.15rem;color:var(--muted);border-radius:50%;justify-content:center;align-items:center;font-size:.75rem;font-weight:600;text-decoration:none;display:inline-flex}.help-icon:hover,.help-icon:focus-visible{color:var(--text);border-color:var(--muted)}.help-bubble{z-index:50;border:1px solid var(--border);background:var(--surface);width:max-content;max-width:min(340px,80vw);color:var(--text);white-space:normal;text-align:left;border-radius:8px;padding:.55rem .7rem;font-size:.82rem;line-height:1.4;display:none;position:absolute;top:calc(100% + 6px);left:0;box-shadow:0 6px 20px #00000040}.help-tip.right .help-bubble{left:auto;right:0}.help-tip:hover .help-bubble,.help-tip:focus-within .help-bubble{display:block}.help-more{color:var(--muted);margin-top:.35rem;font-size:.75rem;display:block}.label-text{align-items:center;display:inline-flex}.page-head.end{justify-content:flex-end}.help-tabs{flex-wrap:wrap}.help-toc{flex-wrap:wrap;gap:.35rem 1.1rem;margin:-.25rem 0 1rem;font-size:.9rem;display:flex}.help-guide{border:1px solid var(--border);background:var(--surface);border-radius:10px;margin-bottom:1rem;padding:.9rem 1.1rem .6rem;scroll-margin-top:4.5rem}.help-guide.current{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent)}.help-guide-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:1rem;display:flex}.help-guide-head h2{margin:0}.help-guide h3{margin:1rem 0 .4rem;font-size:.95rem}.help-intro{margin:.6rem 0 0}.help-steps,.help-notes ul{margin:0;padding-left:1.4rem;line-height:1.6}.help-steps li+li,.help-notes li+li{margin-top:.3rem}.help-notes{background:var(--hover);border-radius:8px;margin-top:.4rem;padding:.1rem .9rem .7rem}.help-figure{margin:.9rem 0 .2rem}.help-figure img{border:1px solid var(--border);border-radius:8px;max-width:100%;display:block}.help-figure figcaption{color:var(--muted);margin-top:.35rem;font-size:.82rem}.status-diagram{width:100%;max-width:560px;display:block}.status-diagram rect{fill:var(--bg);stroke:var(--border);stroke-width:1.5px}.status-diagram .final rect{stroke:var(--accent)}.status-diagram path{fill:none;stroke:var(--muted);stroke-width:1.5px}.status-diagram marker path{fill:var(--muted);stroke:none}.status-diagram text{text-anchor:middle;fill:var(--text)}.status-diagram .t{font-size:16px;font-weight:600}.status-diagram .s,.status-diagram .e{fill:var(--muted);font-size:12px}.lang-switch{border:1px solid var(--border);border-radius:6px;display:inline-flex;overflow:hidden}.lang-switch button{color:var(--muted);background:0 0;border:none;border-radius:0;padding:.15rem .45rem;font-size:.75rem}.lang-switch button.active{background:var(--accent);color:var(--accent-text)}.login-head{justify-content:space-between;align-items:center;display:flex}.report{--series-level:#257de0;--series-in:#00b894;--series-out:#f47230;--series-unit:#257de0;--series-value:#00b894;--series-qty:#257de0;--series-amount:#00b894;--series-profit:#f47230}@media (prefers-color-scheme:dark){.report{--series-level:#338ced;--series-in:#00a888;--series-out:#e76624;--series-unit:#338ced;--series-value:#00a888;--series-qty:#338ced;--series-amount:#00a888;--series-profit:#e76624}}.report .filters{align-items:flex-end}.report-product{color:var(--muted);flex-direction:column;flex:2;gap:.3rem;min-width:260px;font-size:.9rem;display:flex}.report-product .picked{color:var(--text);align-items:baseline;gap:.5rem;padding:.45rem 0;font-size:1rem;display:flex}.report .row>label{flex:none;min-width:0}.presets{gap:.25rem;display:flex}.presets button.active{border-color:var(--accent);color:var(--accent);font-weight:600}.tiles{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.75rem;margin:.5rem 0 1rem;display:grid}.tile{background:var(--surface);border:1px solid var(--border);border-radius:8px;flex-direction:column;gap:.2rem;padding:.75rem 1rem;display:flex}.tile-label{color:var(--muted);font-size:.85rem}.tile-value{font-variant-numeric:tabular-nums;font-size:1.6rem;font-weight:600}.tile-value.money{white-space:nowrap;font-size:1.25rem}.tabs.small button{padding:.35rem .9rem}.key{vertical-align:baseline;border-radius:2px;width:10px;height:10px;display:inline-block}.key-in{background:var(--series-in)}.key-out{background:var(--series-out)}.key-unit{vertical-align:middle;background:var(--series-unit);border-radius:1px;width:12px;height:2px}.key-value{background:var(--series-value)}.key-qty{background:var(--series-qty)}.key-amount{background:var(--series-amount)}.key-profit{background:var(--series-profit)}.key-level{vertical-align:middle;background:var(--series-level);border-radius:1px;width:12px;height:2px}.chart{background:var(--surface);border:1px solid var(--border);-webkit-user-select:none;user-select:none;border-radius:8px;padding:.75rem 0;position:relative}.chart svg{display:block;overflow:visible}.chart-title{align-items:center;gap:1rem;padding:0 1rem;font-size:.9rem;font-weight:600;display:flex}.chart-title+svg{margin-bottom:.5rem}.legend{color:var(--muted);gap:1rem;font-weight:400;display:flex}.chart .grid{stroke:var(--border);stroke-width:1px}.chart .baseline{stroke:var(--muted);stroke-width:1px}.chart .axis,.chart .end-label{fill:var(--muted);font-variant-numeric:tabular-nums;font-size:12px}.chart .end-label{fill:var(--text);font-weight:600}.chart .series-level{--c:var(--series-level)}.chart .series-unit{--c:var(--series-unit)}.chart .series-value{--c:var(--series-value)}.chart .series-qty{--c:var(--series-qty)}.chart .series-amount{--c:var(--series-amount)}.chart .series-profit{--c:var(--series-profit)}.chart .bar{fill:var(--c)}.report-h2{margin-top:1.5rem}.chart .line{fill:none;stroke:var(--c);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round}.chart .area{fill:var(--c);opacity:.1}.chart .dot{fill:var(--c);stroke:var(--surface);stroke-width:2px}.chart .bar-in{fill:var(--series-in)}.chart .bar-out{fill:var(--series-out)}.chart .dim{opacity:.45}.chart .crosshair{stroke:var(--muted);stroke-width:1px}.chart-tip{background:var(--surface);border:1px solid var(--border);white-space:nowrap;pointer-events:none;border-radius:6px;flex-direction:column;gap:.2rem;padding:.5rem .75rem;font-size:.85rem;display:flex;position:absolute;top:2.5rem;transform:translate(12px);box-shadow:0 4px 14px #0000001f}.chart-tip.left{transform:translate(calc(-100% - 12px))}.chart .bar.forecast{fill-opacity:.4}.chart .line.forecast{stroke-dasharray:5 4}.key.forecast{opacity:.4}.key-level.forecast{opacity:1;background:repeating-linear-gradient(90deg, var(--series-level) 0 4px, transparent 4px 7px)}.key-range{background:var(--text);border-radius:0;width:2px;height:10px}.chart .range line{stroke:var(--text);stroke-width:1px;opacity:.55}.key-backtest{vertical-align:middle;background:var(--text);border-radius:1px;width:12px;height:2px}.chart .backtest{fill:none;stroke:var(--text);stroke-width:2px;stroke-linejoin:round;opacity:.85}.chart-note{font-size:.85rem;font-weight:400}.key-event{background:var(--event-shade,#8080802e);border:1px solid var(--border)}.chart .event-day{fill:#80808024}.forecast-events{margin-top:1.5rem}.key-reorder{border-top:2px dashed var(--muted);vertical-align:middle;width:12px;height:0}.chart .reorder-line{stroke:var(--muted);stroke-width:1.5px;stroke-dasharray:4 4}.chart .today{stroke:var(--text);stroke-width:1px;stroke-dasharray:2 3}.badge.warn{color:var(--danger);border-color:var(--danger)}.forecast-table .nowrap{white-space:nowrap}.lead-suggest{margin:0 0 12px}.forecast-setting input{width:7rem}.forecast-table tr.selected td{background:var(--surface)}.forecast-table .qty-input{text-align:right;width:5.5rem}.forecast-order{align-items:flex-end;margin-top:.75rem}.forecast-order label{flex:0 16rem}.forecast-detail{margin-bottom:1rem}.forecast-detail-head{justify-content:space-between;align-items:baseline}.access-table th.lvl,.access-table td.lvl{text-align:center;width:7rem}.access-table .section-row th{border-bottom:1px solid var(--border);padding-top:.9rem}.access-table td.indent{padding-left:1.25rem}.notice.read-only{align-self:stretch}fieldset:disabled input,fieldset:disabled select,fieldset:disabled textarea{opacity:.75;cursor:not-allowed}h1,h2,h3,th,dt,label,.label,.label-text,button,a.button,a.back,.topbar nav a,.tabs a,.badge{text-transform:capitalize}label input,label select,label textarea,label .muted,.help-bubble,.lang-switch button,.as-typed{text-transform:none}.topbar a.brand{color:var(--bar-text);padding:.4rem 0}.topbar a.brand:hover{color:var(--highlight);background:0 0}.home-actions{flex-wrap:wrap;gap:.5rem;margin:.75rem 0 1rem;display:flex}a.tile-link{color:var(--text);border-top:3px solid var(--accent);text-decoration:none;transition:border-color .15s,background .15s}a.tile-link:hover{background:var(--hover);border-top-color:var(--highlight)}.home-lists{grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:1rem;display:grid}.home-list h2 a{color:var(--text);text-decoration:none}.home-list h2 a:hover{color:var(--accent)}.home-list td a{color:var(--accent);text-decoration:none}
