:root{--cream:#f6efe5;--paper:#fffdfa;--ink:#2d2520;--muted:#786a61;--line:#e6d8ca;--orange:#a34b0b;--orange-dark:#753304;--green:#2d7550;--green-soft:#e5f2ea;--red:#a9433a;--red-soft:#f9e8e6;--amber:#a46b12;--amber-soft:#fff3d8;--shadow:0 14px 40px rgba(66,43,27,.10);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--cream)}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:linear-gradient(145deg,#fffaf3,var(--cream))}button,input,select{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid rgba(163,75,11,.23);outline-offset:2px}.hidden{display:none!important}.muted{color:var(--muted)}.eyebrow{margin:0 0 .45rem;text-transform:uppercase;letter-spacing:.13em;font-size:.7rem;font-weight:900;color:var(--orange)}.eyebrow.light{color:#ffe0bb}.login-shell{min-height:100vh;display:grid;grid-template-columns:minmax(420px,1.15fr) minmax(380px,.85fr)}.login-photo{display:grid;place-items:center;background:linear-gradient(#35221540,#35221594),url('/assets/inventory-hero.webp') center/cover}.login-brand{text-align:center;color:#fff;text-shadow:0 2px 10px #0008}.login-brand img{width:130px;height:130px;object-fit:contain}.login-brand p{font:700 1.45rem Georgia,serif}.login-panel{display:grid;place-items:center;padding:2rem}.login-card{width:min(430px,100%);padding:2.5rem;border:1px solid var(--line);border-radius:24px;background:#fffdfaf5;box-shadow:var(--shadow)}h1,h2{font-family:Georgia,serif}.login-card h1{font-size:2.3rem;line-height:1.02;margin:0 0 .7rem}.login-card>.muted{line-height:1.55;margin-bottom:1.6rem}label{display:grid;gap:.42rem;margin-bottom:1rem;font-size:.85rem;font-weight:800;color:#574b43}input,select{width:100%;min-height:48px;padding:.72rem .8rem;border:1px solid #d8c7b9;border-radius:11px;background:#fff;color:var(--ink)}input:focus,select:focus{border-color:var(--orange);box-shadow:0 0 0 3px rgba(163,75,11,.09);outline:0}.password-wrap{position:relative}.password-wrap input{padding-right:4rem}.text-button{position:absolute;right:.25rem;top:50%;transform:translateY(-50%);min-height:40px;padding:.5rem;border:0;border-radius:9px;background:transparent;color:var(--orange);font-weight:900}.remember{display:flex;grid-template-columns:auto 1fr;align-items:center;font-weight:500}.remember input{width:19px;min-height:19px;accent-color:var(--orange)}.button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:.72rem 1rem;border:1px solid transparent;border-radius:12px;font-weight:900;line-height:1}.button.primary{background:linear-gradient(180deg,#ad510d,var(--orange));color:#fff;box-shadow:0 6px 15px #79370429}.button.secondary{border-color:var(--line);background:#fff;color:var(--ink)}.full{width:100%}.app{height:100dvh;overflow:hidden}.topbar{height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 1.25rem;border-bottom:1px solid var(--line);background:#fffdfaf2;backdrop-filter:blur(12px)}.brand{display:flex;align-items:center;gap:.7rem;color:var(--ink);text-decoration:none}.brand img{width:50px;height:50px;object-fit:contain}.brand span{display:grid}.brand strong{font:700 1.08rem Georgia,serif}.brand small{color:var(--muted)}.top-actions{display:flex;align-items:center;gap:.5rem}.icon-button,.close-button{display:grid;place-items:center;width:46px;min-width:46px;height:46px;padding:0;border:1px solid var(--line);border-radius:13px;background:#fff;color:#5c4a40}.icon-button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.sync-status{display:flex;align-items:center;gap:.45rem;margin-right:.3rem;color:var(--muted);font-size:.78rem;font-weight:800}.sync-status i{width:8px;height:8px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px var(--green-soft)}.sync-status.loading i{background:var(--amber);box-shadow:0 0 0 4px var(--amber-soft)}.sync-status.error i{background:var(--red);box-shadow:0 0 0 4px var(--red-soft)}.shell{height:calc(100dvh - 72px);display:grid;grid-template-columns:220px minmax(0,1fr)}.sidebar{display:flex;flex-direction:column;gap:.4rem;padding:1.1rem .85rem;border-right:1px solid var(--line);background:#fffaf4;overflow:auto}.nav-item{display:flex;align-items:center;gap:.7rem;min-height:48px;padding:.7rem .8rem;border:0;border-radius:12px;background:transparent;color:#67584e;font-weight:800;text-align:left}.nav-item span{display:grid;place-items:center;width:24px;color:var(--orange);font-size:1.15rem}.nav-item.selected{background:#fff;border:1px solid var(--line);color:var(--ink);box-shadow:0 4px 12px #4d352013}.source-card{margin-top:auto;display:grid;gap:.35rem;padding:1rem;border-radius:14px;background:#f5e8d8;color:#664d3c}.source-card span{font-size:.75rem;line-height:1.45}.content{min-width:0;height:100%;overflow:auto;overscroll-behavior:contain;padding:1.2rem clamp(1rem,2.5vw,2.2rem) 2rem}.tab-panel{width:min(1480px,100%);margin:auto}.hero{position:relative;min-height:210px;display:flex;align-items:flex-end;overflow:hidden;margin-bottom:1rem;padding:1.7rem;border-radius:22px;background:linear-gradient(90deg,#3d2317dc 0%,#3d231778 46%,transparent 75%),url('/assets/inventory-hero.webp') center 53%/cover;color:#fff;box-shadow:var(--shadow)}.hero h1{margin:0 0 .4rem;font-size:clamp(2rem,4vw,3rem)}.hero p{max-width:570px;margin:.25rem 0;line-height:1.5}.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:1rem;margin:.4rem 0 1.3rem}.page-head h1{font-size:clamp(2rem,3vw,2.7rem);margin:0 0 .35rem}.page-head p{margin:.2rem 0}.summary{display:grid;min-width:105px;padding:.85rem 1rem;border:1px solid var(--line);border-radius:14px;background:var(--paper)}.summary strong{font-size:1.5rem}.summary span{font-size:.75rem;color:var(--muted)}.toolbar{display:flex;align-items:center;gap:.7rem;margin-bottom:1rem}.search{position:relative;flex:1;margin:0}.search span{position:absolute;left:.9rem;top:50%;transform:translateY(-50%);color:var(--muted);font-size:1.25rem}.search input{padding-left:2.6rem;background:var(--paper)}.filters{display:flex;gap:.4rem;max-width:60%;overflow:auto;padding:2px}.filter{min-height:44px;padding:.55rem .8rem;border:1px solid var(--line);border-radius:999px;background:var(--paper);color:var(--muted);font-size:.78rem;font-weight:900;white-space:nowrap}.filter.selected{border-color:var(--orange);background:#fff0e0;color:var(--orange)}.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:.8rem}.product-card{position:relative;display:grid;grid-template-rows:auto 1fr auto;min-height:230px;overflow:hidden;border:1px solid var(--line);border-radius:17px;background:var(--paper);box-shadow:0 5px 18px #4c33130b}.product-visual{height:86px;display:grid;place-items:center;background:var(--visual,#f3e7d9);font-size:3.3rem}.product-card.low{border-color:#e3a39d}.product-card.low .product-visual{background:var(--red-soft)}.product-content{padding:.85rem}.product-content h2{font:700 1.05rem Georgia,serif;margin:0 0 .25rem}.product-meta{font-size:.74rem;color:var(--muted)}.stock-number{display:flex;align-items:baseline;gap:.35rem;margin:.65rem 0 .2rem}.stock-number strong{font-size:1.7rem}.stock-number span{font-size:.76rem;color:var(--muted)}.stock-alert{display:inline-flex;padding:.23rem .5rem;border-radius:999px;background:var(--red-soft);color:var(--red);font-size:.68rem;font-weight:900}.product-actions{display:grid;grid-template-columns:1fr auto;gap:.5rem;padding:0 .85rem .85rem}.sell-button{min-height:46px;border:0;border-radius:11px;background:var(--orange);color:#fff;font-weight:900}.more-button{display:grid;place-items:center;width:46px;height:46px;border:1px solid var(--line);border-radius:11px;background:#fff;font-size:1.2rem}.glass-button{grid-column:1/-1;min-height:42px;border:1px solid #d9c3ab;border-radius:10px;background:#fff8ed;color:#7a4b22;font-weight:900}.stock-groups{display:grid;gap:1rem}.stock-group{overflow:hidden;border:1px solid var(--line);border-radius:18px;background:var(--paper)}.stock-group h2{margin:0;padding:1rem 1.1rem;border-bottom:1px solid var(--line);font-size:1.15rem}.stock-list{display:grid}.stock-row{display:grid;grid-template-columns:minmax(180px,1.3fr) minmax(110px,.6fr) minmax(170px,.9fr) auto;align-items:center;gap:.8rem;padding:.75rem 1rem;border-bottom:1px solid #eee4da}.stock-row:last-child{border:0}.stock-name{display:grid;gap:.18rem}.stock-name strong{font-size:.92rem}.stock-name span{font-size:.72rem;color:var(--muted)}.stock-qty strong{font-size:1.15rem}.stock-qty span{font-size:.75rem;color:var(--muted)}.stock-controls{display:flex;gap:.35rem}.quick-button{min-width:44px;height:44px;border:1px solid var(--line);border-radius:10px;background:#fff;font-weight:900}.quick-button.minus{color:var(--red)}.quick-button.plus{color:var(--green)}.settings-button{min-height:44px;padding:.5rem .7rem;border:1px solid var(--line);border-radius:10px;background:#fff;color:#68564b;font-size:.77rem;font-weight:900}.history-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:1rem}.panel{border:1px solid var(--line);border-radius:18px;background:var(--paper);overflow:hidden}.history-list{max-height:calc(100dvh - 220px);overflow:auto}.history-row{display:grid;grid-template-columns:45px minmax(160px,1fr) auto auto;align-items:center;gap:.75rem;padding:.8rem 1rem;border-bottom:1px solid #eee4da}.history-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:#f5e9dc}.history-info{display:grid}.history-info small,.history-date{font-size:.72rem;color:var(--muted)}.delta{font-weight:900}.delta.positive{color:var(--green)}.delta.negative{color:var(--red)}.snapshots{padding:1rem}.snapshots h2{margin:.1rem 0;font-size:1.15rem}.snapshot{display:flex;justify-content:space-between;gap:.6rem;padding:.65rem 0;border-top:1px solid var(--line);font-size:.75rem}.meeting-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:.8rem}.meeting-card{padding:1rem;border:1px solid var(--line);border-radius:17px;background:var(--paper)}.meeting-card h2{margin:.2rem 0 .65rem;font-size:1.15rem}.meeting-card p{font-size:.83rem;color:var(--muted);line-height:1.45}.meeting-card a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:.6rem .8rem;border-radius:10px;background:#fff0e0;color:var(--orange);font-weight:900;text-decoration:none}.badge{display:inline-flex;padding:.4rem .7rem;border-radius:999px;font-size:.74rem;font-weight:900}.badge.warning{background:var(--amber-soft);color:var(--amber)}dialog{width:min(540px,calc(100% - 1.25rem));max-height:calc(100dvh - 1.25rem);padding:0;border:0;border-radius:20px;background:var(--paper);box-shadow:0 26px 90px #24160e55}dialog::backdrop{background:#2b1c145e;backdrop-filter:blur(3px)}.dialog-card{max-height:calc(100dvh - 1.25rem);overflow:auto;padding:1.4rem}.dialog-head{display:flex;justify-content:space-between;gap:1rem;margin-bottom:1.1rem}.dialog-head h2{margin:0;font-size:1.55rem}.dialog-head p{margin:.25rem 0}.close-button{font-size:1.5rem;line-height:1}.two-cols{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}.dialog-actions{display:flex;justify-content:flex-end;gap:.6rem;margin-top:1.1rem}.hint{font-size:.78rem;line-height:1.45;color:var(--muted)}.toast{position:fixed;z-index:100;left:50%;bottom:1rem;max-width:calc(100% - 2rem);padding:.8rem 1rem;border-radius:11px;background:#29221e;color:#fff;box-shadow:var(--shadow);opacity:0;transform:translate(-50%,130%);transition:.2s;text-align:center}.toast.show{opacity:1;transform:translate(-50%,0)}.toast.error{background:#8e332d}.empty{padding:3rem 1rem;text-align:center;color:var(--muted)}
@media(hover:hover){.button:hover,.icon-button:hover,.nav-item:hover,.filter:hover,.quick-button:hover,.settings-button:hover,.more-button:hover{transform:translateY(-1px);box-shadow:0 6px 16px #54361618}.sell-button:hover{background:var(--orange-dark)}}
@media(max-width:850px){.login-shell{grid-template-columns:1fr}.login-photo{min-height:210px}.login-panel{margin-top:-42px;position:relative;padding:1rem}.login-card{padding:1.5rem}.shell{grid-template-columns:1fr}.sidebar{position:fixed;z-index:20;left:0;right:0;bottom:0;height:72px;display:grid;grid-template-columns:repeat(4,1fr);gap:.25rem;padding:.4rem max(.4rem,env(safe-area-inset-right)) max(.4rem,env(safe-area-inset-bottom)) max(.4rem,env(safe-area-inset-left));border:0;border-top:1px solid var(--line);background:#fffdfaf5;backdrop-filter:blur(12px);overflow:visible}.nav-item{display:grid;place-items:center;gap:.1rem;min-height:56px;padding:.25rem;font-size:.65rem;text-align:center}.nav-item span{width:auto;font-size:1rem}.source-card{display:none}.content{padding-bottom:88px}.history-layout{grid-template-columns:1fr}.history-list{max-height:none}.snapshots{order:2}.product-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}}
@media(max-width:590px){.topbar{height:66px;padding:0 .65rem}.shell{height:calc(100dvh - 66px)}.brand span,.sync-status span{display:none}.top-actions{gap:.35rem}.icon-button{width:44px;min-width:44px;height:44px}.content{padding:.75rem .65rem 86px}.hero{min-height:180px;padding:1.1rem;background:linear-gradient(90deg,#3d2317dc,#3d231778),url('/assets/inventory-hero.webp') center/cover}.hero h1{font-size:2rem}.toolbar{align-items:stretch;flex-direction:column}.filters{max-width:100%}.product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem}.product-card{min-height:220px}.product-visual{height:72px;font-size:2.7rem}.product-content{padding:.7rem}.product-actions{padding:0 .7rem .7rem}.stock-row{grid-template-columns:1fr auto;gap:.5rem}.stock-qty{text-align:right}.stock-controls{grid-column:1/2}.settings-button{grid-column:2;grid-row:2}.history-row{grid-template-columns:40px 1fr auto}.history-date{grid-column:2/4}.page-head{align-items:flex-start}.summary{min-width:82px}.two-cols{grid-template-columns:1fr}.dialog-actions{position:sticky;bottom:-1.4rem;margin-left:-1.4rem;margin-right:-1.4rem;padding:1rem 1.4rem max(1rem,env(safe-area-inset-bottom));background:var(--paper)}.dialog-actions .button{flex:1}input,select{font-size:16px}}
@media(max-width:360px){.product-grid{grid-template-columns:1fr}.brand img{width:44px;height:44px}.top-actions .icon-button{width:42px;min-width:42px;height:42px}.product-card{min-height:205px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
.product-visual{font-size:0;color:#49372c}
.product-visual.visual-alcohol{background:#f2ded8}
.product-visual.visual-soft{background:#e8f1dc}
.product-visual.visual-food{background:#fff0cf}
.product-visual.visual-misc{background:#e9e4db}
.product-icon{display:block;width:52px;height:52px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.stock-name strong{display:flex;align-items:center;gap:.45rem}
.stock-name .product-icon{width:28px;height:28px;flex:0 0 28px;stroke-width:3.5}
.form-field{margin-bottom:1rem}
.form-field>label{margin-bottom:.42rem}
