:root{--bg:#edf0f4;--surface:#edf0f4;--text:#17202a;--muted:#66727f;--accent:#17a673;--danger:#c84c58;--r:24px;--shadow1:8px 8px 18px #cbd0d7;--shadow2:-8px -8px 18px #fff;--inset:inset 5px 5px 11px #cbd0d7,inset -5px -5px 11px #fff}*{box-sizing:border-box}html,body,#root{background:var(--bg);width:100%;min-height:100%;color:var(--text);margin:0;font-family:Inter,ui-sans-serif,system-ui,sans-serif}body{-webkit-text-size-adjust:100%;padding-bottom:88px;overflow-x:hidden}button,input,select{font:inherit}button{cursor:pointer;border:0;min-height:44px}button,select,.card,.stat,.empty,.sheet{border-radius:var(--r)}main{width:100%;max-width:1100px;margin:auto}.page{width:100%;padding:18px 14px 110px}header{justify-content:space-between;align-items:flex-start;gap:10px;padding:8px 2px 18px;display:flex}.headerSettings{background:var(--surface);box-shadow:var(--shadow1),var(--shadow2);color:var(--text);border-radius:16px;flex:none}header small{letter-spacing:.18em;color:var(--accent);font-weight:800}h1{margin:5px 0;font-size:clamp(26px,7vw,30px);line-height:1.1}h2{margin:0}header p{color:var(--muted);margin:0}.stats{grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px;display:grid}.stats.three{grid-template-columns:repeat(3,1fr)}.stat{box-shadow:var(--shadow1),var(--shadow2);padding:17px}.stat span,.stat b{display:block}.stat span{color:var(--muted);font-size:12px}.stat b{margin-top:5px;font-size:19px}.actions{grid-template-columns:1fr 1fr;gap:12px;min-width:0;margin:14px 0;display:grid}.primary,.secondary,.chip{border-radius:18px;justify-content:center;align-items:center;gap:8px;padding:12px 15px;font-weight:750;display:inline-flex}.primary{background:var(--accent);color:#fff;box-shadow:4px 4px 10px #c6cbd1,-3px -3px 8px #fff}.secondary,.chip{background:var(--surface);color:var(--text);box-shadow:var(--shadow1),var(--shadow2)}.chip.active,.seg .active,.tabs .active{color:var(--accent)}.inset{box-shadow:var(--inset);background:var(--surface);border-radius:20px}.search{align-items:center;gap:10px;margin:14px 0;padding:5px 15px;display:flex}.search input{background:0 0;border:0;outline:0;width:100%;height:44px}.filters{gap:9px;padding:4px 2px 10px;display:flex;overflow:auto}.filters select,.period select,.field select,.field input,.settings input,.qty{background:var(--surface);box-shadow:var(--inset);border:0;border-radius:16px;outline:0;min-height:44px;padding:11px 13px}.letters{gap:4px;padding-bottom:12px;display:flex;overflow:auto}.letters button{min-width:34px;color:var(--muted);background:0 0}.list{gap:12px;display:grid}.card{min-width:0;box-shadow:var(--shadow1),var(--shadow2);align-items:center;gap:10px;padding:12px;display:flex}.thumb{width:58px;height:58px;box-shadow:var(--inset);border-radius:18px;flex:none;place-items:center;display:grid;overflow:hidden}.thumb img{object-fit:cover;width:100%;height:100%}.grow{flex:1;min-width:0;overflow:hidden}.grow>b,.grow>span{text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.grow>span{color:var(--muted);margin-top:3px;font-size:12px}.prices{align-items:baseline;gap:10px;margin-top:5px;display:flex}.prices small{color:var(--muted)}.stock{text-align:center;font-weight:800}.stock small{color:var(--muted);font-size:10px;font-weight:500;display:block}.stock.low{color:var(--danger)}.row{gap:4px;display:flex}.icon{color:var(--muted);background:0 0;min-width:44px;padding:6px}.danger{color:var(--danger)}.bottom{z-index:20;background:var(--surface);grid-template-columns:repeat(3,1fr);padding:8px;display:grid;position:fixed;bottom:0;left:0;right:0;box-shadow:0 -5px 18px #cbd0d7}.nav{color:var(--muted);background:0 0;place-items:center;gap:2px;font-size:11px;display:grid}.nav svg{width:21px}.nav.active{color:var(--accent);font-weight:800}.overlay{z-index:30;background:#18212a66;align-items:flex-end;display:flex;position:fixed;inset:0}.sheet{background:var(--surface);width:100%;max-height:92vh;padding:18px;overflow:auto;box-shadow:0 -10px 35px #0003}.sheetHead{justify-content:space-between;align-items:center;margin-bottom:15px;display:flex}.field{gap:6px;margin:10px 0;display:grid}.field>span,label{font-size:13px;font-weight:700}.grid2{grid-template-columns:1fr 1fr;gap:10px;display:grid}.wide{width:100%;margin-top:12px}.photoBtns{grid-template-columns:1fr 1fr;gap:8px;margin-top:8px;display:grid}.photoBtns button{cursor:pointer;width:100%}.photos{gap:8px;margin-top:10px;display:flex}.photos>div{position:relative}.photos img{object-fit:cover;border-radius:16px;width:72px;height:72px}.photos button{background:var(--danger);color:#fff;border-radius:50%;width:28px;min-height:28px;position:absolute;top:-6px;right:-4px}.seg,.tabs{background:var(--surface);box-shadow:var(--inset);border-radius:18px;gap:7px;margin:12px 0;padding:5px;display:flex}.seg button,.tabs button{background:0 0;border-radius:14px;flex:1;padding:9px}.totalBox,.debtTotal{box-shadow:var(--inset);border-radius:18px;justify-content:space-between;margin-top:12px;padding:16px;display:flex}.picker{gap:8px;max-height:280px;display:grid;overflow:auto}.pick{box-shadow:var(--shadow1),var(--shadow2);border-radius:16px;justify-content:space-between;align-items:center;padding:10px;display:flex}.pick span{color:var(--muted);font-size:12px;display:block}.qty{width:70px}.debtTotal{margin-bottom:12px}.debt strong{margin-left:auto}.settled{margin-top:16px}.settled summary{padding:14px;font-weight:800}.movement{box-shadow:var(--shadow1),var(--shadow2);border-radius:18px;padding:14px}.movement summary{align-items:center;gap:10px;list-style:none;display:flex}.movement summary::-webkit-details-marker{display:none}.movement summary>span:nth-child(2){flex:1}.movement small{color:var(--muted);font-size:11px;display:block}.movement .income{color:var(--accent);font-weight:800}.movement .expense{color:var(--danger);font-weight:800}.movement>div{color:var(--muted);padding:10px 5px;font-size:13px}.empty{text-align:center;box-shadow:var(--shadow1),var(--shadow2);padding:42px 20px}.empty svg{width:42px;height:42px;color:var(--accent)}.empty p{color:var(--muted)}.settings{gap:8px;display:grid}.installHint{color:var(--muted);margin:4px 2px;font-size:12px;line-height:1.5}.switch{justify-content:space-between;align-items:center;padding:13px 0;display:flex}.switch input{width:45px;height:24px}.period{justify-content:flex-end;margin-bottom:10px;display:flex}hr{border:0;border-top:1px solid #0001;margin:12px 0}@media (width>=800px){body{padding-bottom:0}.bottom{flex-direction:column;justify-content:center;gap:10px;width:210px;height:100vh;padding:18px;display:flex;position:fixed;inset:0 auto 0 0;box-shadow:5px 0 18px #cbd0d7}.nav{justify-content:flex-start;gap:12px;padding:14px;display:flex}main{margin-left:210px}.page{max-width:1100px;padding:40px}.sheet{border-radius:28px;max-width:620px;margin:0 auto 30px}.overlay{align-items:center;padding:20px}.actions,.stats{grid-template-columns:1fr 1fr}.card{padding:16px}}html[data-theme=dark]{--bg:#20262d;--surface:#20262d;--text:#f1f4f7;--muted:#aab3bc;--shadow1:8px 8px 18px #171b20;--shadow2:-8px -8px 18px #293139;--inset:inset 5px 5px 11px #171b20,inset -5px -5px 11px #293139}html[data-theme=dark] .bottom{box-shadow:0 -5px 18px #171b20}html[data-theme=dark] hr{border-color:#fff1}.cameraOverlay{z-index:9999;background:#000000b8;justify-content:center;align-items:flex-end;padding:0;display:flex;position:fixed;inset:0}.cameraSheet{background:var(--bg);border-radius:30px 30px 0 0;width:100%;max-width:600px;max-height:95dvh;padding:18px;overflow:auto;box-shadow:0 -10px 35px #00000040}.cameraHeader{justify-content:space-between;align-items:center;margin-bottom:14px;display:flex}.cameraHeader h2{margin:0;font-size:1.15rem}.cameraPreview{aspect-ratio:3/4;background:#111;border-radius:24px;width:100%;overflow:hidden}.cameraPreview video{object-fit:cover;width:100%;height:100%;display:block}.cameraCaptureButton{cursor:pointer;touch-action:manipulation;background:0 0;border:5px solid #fff;border-radius:50%;justify-content:center;align-items:center;width:76px;height:76px;margin:20px auto;display:flex}.cameraCaptureButton span{background:#fff;border-radius:50%;width:58px;height:58px;transition:transform .15s;display:block}.cameraCaptureButton:active:not(:disabled) span{transform:scale(.88)}.cameraCaptureButton:disabled{opacity:.45;cursor:not-allowed}.cameraError{text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:14px;min-height:280px;padding:25px;display:flex}.cameraError p{max-width:340px;line-height:1.5}@media (width>=700px){.cameraOverlay{align-items:center;padding:20px}.cameraSheet{border-radius:30px}}
