@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap";:root{--bg: #f5f6f8;--bg2: #eef0f3;--bg3: #e4e7ec;--surface: #ffffff;--surface2: #f9fafb;--border: #e1e4ea;--border2: #c8cdd8;--text: #1a1d23;--text2: #5a6072;--text3: #9099ad;--accent: #5b7fa6;--accent2: #4a6d93;--accent-bg: #eef3f8;--success: #4a8c6a;--success-bg:#eef6f1;--warn: #b07d2e;--warn-bg: #fdf4e3;--danger: #a63d3d;--danger-bg: #fdf0f0;--radius: 10px;--radius-sm: 7px;--shadow: 0 1px 4px rgba(0,0,0,.08), 0 2px 12px rgba(0,0,0,.05);--shadow-sm: 0 1px 3px rgba(0,0,0,.06);--header-h: 52px;--nav-h: 64px;font-size:14px}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;overflow:hidden}body{font-family:Inter,sans-serif;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}input,select,button,textarea{font-family:inherit;font-size:inherit}button{cursor:pointer;border:none;background:none;color:inherit}.app{display:flex;flex-direction:column;height:100dvh}.app-header{height:var(--header-h);display:flex;align-items:center;justify-content:space-between;padding:0 16px;background:var(--surface);border-bottom:1px solid var(--border);flex-shrink:0;box-shadow:var(--shadow-sm)}.header-brand{display:flex;align-items:center;gap:7px;font-weight:700;font-size:1rem;color:var(--accent)}.header-actions{display:flex;gap:4px}.icon-btn{width:32px;height:32px;border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;color:var(--text2);transition:background .15s}.icon-btn:hover{background:var(--bg3)}.app-main{flex:1;overflow-y:auto;overflow-x:hidden;padding:14px 14px calc(var(--nav-h) + 10px)}.bottom-nav{height:var(--nav-h);display:flex;background:var(--surface);border-top:1px solid var(--border);flex-shrink:0;padding-bottom:env(safe-area-inset-bottom,0)}.nav-btn{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--text3);font-size:.67rem;font-weight:500;padding:8px 0;transition:color .2s;position:relative}.nav-btn.active{color:var(--accent)}.nav-btn.active:after{content:"";position:absolute;top:0;left:25%;right:25%;height:2px;background:var(--accent);border-radius:0 0 3px 3px}.splash{height:100dvh;display:flex;align-items:center;justify-content:center;background:var(--bg)}.spinner{width:28px;height:28px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.auth-page{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--bg)}.auth-card{width:100%;max-width:360px;background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:32px 24px;box-shadow:var(--shadow)}.auth-logo{width:48px;height:48px;margin:0 auto 12px;display:flex;align-items:center;justify-content:center;background:var(--accent-bg);border-radius:12px;color:var(--accent)}.auth-title{font-size:1.5rem;font-weight:700;text-align:center;margin-bottom:4px}.auth-sub{text-align:center;color:var(--text2);font-size:.82rem;margin-bottom:22px}.auth-tabs{display:flex;border-radius:var(--radius-sm);overflow:hidden;background:var(--bg2);border:1px solid var(--border);margin-bottom:16px}.auth-tabs button{flex:1;padding:8px;font-size:.82rem;font-weight:500;color:var(--text2);transition:all .2s}.auth-tabs button.active{background:var(--surface);color:var(--accent);font-weight:600;border-radius:var(--radius-sm);box-shadow:var(--shadow-sm)}.auth-form{display:flex;flex-direction:column;gap:10px}.auth-error{color:var(--danger);font-size:.78rem;text-align:center;padding:6px;background:var(--danger-bg);border-radius:var(--radius-sm)}.auth-success{color:var(--success);font-size:.78rem;text-align:center;padding:6px;background:var(--success-bg);border-radius:var(--radius-sm)}.auth-btn{background:var(--accent);color:#fff;padding:11px;border-radius:var(--radius-sm);font-weight:600;font-size:.9rem;width:100%;transition:background .2s}.auth-btn:hover{background:var(--accent2)}.auth-btn:disabled{opacity:.5}input,select{background:var(--surface);border:1px solid var(--border);color:var(--text);border-radius:var(--radius-sm);padding:7px 10px;width:100%;outline:none;transition:border-color .15s,box-shadow .15s;height:36px}input:focus,select:focus{border-color:var(--accent);box-shadow:0 0 0 3px #5b7fa61a}input::placeholder{color:var(--text3)}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}label{display:flex;flex-direction:column;gap:4px;font-size:.76rem;font-weight:500;color:var(--text2)}.success-toast{background:var(--success-bg);color:var(--success);border:1px solid #b8dfc9;padding:8px 12px;border-radius:var(--radius-sm);font-size:.8rem;font-weight:500;margin-bottom:10px;animation:fadeUp .25s ease}@keyframes fadeUp{0%{opacity:0;transform:translateY(4px)}}.empty-state{display:flex;flex-direction:column;align-items:center;gap:10px;padding:48px 24px;color:var(--text3);text-align:center;font-size:.84rem;line-height:1.6}.empty-state svg{opacity:.25}.page-header{display:flex;align-items:center;gap:8px;margin-bottom:12px}.page-header h2{font-size:.95rem;font-weight:700;flex:1;letter-spacing:-.2px}.badge{background:var(--accent-bg);color:var(--accent);font-size:.68rem;font-weight:600;padding:2px 8px;border-radius:20px}.add-page{display:flex;flex-direction:column;gap:12px}.add-row-header{display:grid;grid-template-columns:1fr 100px 60px 74px 36px;gap:5px;padding:0 2px}.add-row-header span{font-size:.66rem;font-weight:600;color:var(--text3);text-transform:uppercase;letter-spacing:.4px}.add-row{display:grid;grid-template-columns:1fr 100px 60px 74px 36px;gap:5px;align-items:center}.add-row input,.add-row select{height:36px;font-size:.82rem}.plus-btn{width:36px;height:36px;border-radius:var(--radius-sm);background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .15s}.plus-btn:hover{background:var(--accent2)}.plus-btn:disabled{opacity:.4;cursor:not-allowed}.items-table{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow-sm)}.items-table-head{display:grid;grid-template-columns:1fr 100px 60px 74px 70px;gap:5px;padding:7px 10px;background:var(--bg2);border-bottom:1px solid var(--border)}.items-table-head span{font-size:.66rem;font-weight:600;color:var(--text3);text-transform:uppercase;letter-spacing:.4px}.items-table-row{display:grid;grid-template-columns:1fr 100px 60px 74px 70px;gap:5px;padding:5px 10px;align-items:center;border-bottom:1px solid var(--border)}.items-table-row:last-child{border-bottom:none}.items-table-row:hover{background:var(--surface2)}.items-table-row input,.items-table-row select{height:30px;font-size:.79rem;padding:3px 7px;background:transparent;border-color:transparent}.items-table-row input:focus,.items-table-row select:focus{background:var(--surface);border-color:var(--accent)}.row-actions{display:flex;gap:4px;justify-content:flex-end;align-items:center}.row-save{font-size:.7rem;font-weight:600;color:var(--success);padding:3px 7px;border-radius:5px;background:var(--success-bg);border:1px solid #b8dfc9}.row-del{color:var(--text3);padding:3px 5px;border-radius:5px}.row-del:hover{color:var(--danger);background:var(--danger-bg)}.entries-page{display:flex;flex-direction:column;gap:10px}.filter-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}.filter-grid input,.filter-grid select{height:34px;font-size:.79rem}.entries-count{font-size:.73rem;color:var(--text3)}.entries-table{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow-sm)}.entries-head{display:grid;grid-template-columns:1fr 88px 52px 60px 68px 28px;gap:4px;padding:7px 10px;background:var(--bg2);border-bottom:1px solid var(--border);cursor:pointer;-webkit-user-select:none;user-select:none}.entries-head span{font-size:.65rem;font-weight:600;color:var(--text3);text-transform:uppercase;letter-spacing:.4px;display:flex;align-items:center;gap:2px}.entries-head span:hover{color:var(--accent)}.entries-row{display:grid;grid-template-columns:1fr 88px 52px 60px 68px 28px;gap:4px;padding:8px 10px;align-items:center;border-bottom:1px solid var(--border);font-size:.8rem}.entries-row:last-child{border-bottom:none}.entries-row:hover{background:var(--surface2)}.e-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.e-cat{font-size:.7rem;color:var(--text3)}.e-date{font-size:.76rem;color:var(--text2)}.e-qty{font-size:.8rem}.e-store{font-size:.73rem;color:var(--text3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.e-del{color:var(--text3);padding:3px;border-radius:4px}.e-del:hover{color:var(--danger);background:var(--danger-bg)}.analyse-page{display:flex;flex-direction:column;gap:12px}.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:12px;box-shadow:var(--shadow-sm)}.stat-label{font-size:.7rem;color:var(--text3);font-weight:500;margin-bottom:3px}.stat-val{font-size:1.25rem;font-weight:700;color:var(--text);letter-spacing:-.4px}.stat-sub{font-size:.7rem;color:var(--text2);margin-top:2px}.a-section{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow-sm)}.a-section-hd{padding:9px 12px;background:var(--bg2);border-bottom:1px solid var(--border);font-size:.78rem;font-weight:600;display:flex;align-items:center;gap:6px}.a-row{display:flex;align-items:center;padding:8px 12px;border-bottom:1px solid var(--border);font-size:.8rem;gap:8px}.a-row:last-child{border-bottom:none}.a-row-name{font-weight:500;min-width:90px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.a-bar-wrap{flex:1;height:4px;background:var(--bg3);border-radius:4px;overflow:hidden}.a-bar-fill{height:100%;background:var(--accent);border-radius:4px}.a-row-val{font-weight:600;color:var(--accent);font-size:.78rem;min-width:36px;text-align:right}.a-row-meta{font-size:.72rem;color:var(--text3);min-width:52px;text-align:right}.predict-page{display:flex;flex-direction:column;gap:8px}.predict-legend{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:2px}.legend-item{display:flex;align-items:center;gap:5px;font-size:.72rem;color:var(--text2)}.legend-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.predict-card{background:var(--surface);border:1px solid var(--border);border-left:4px solid var(--border2);border-radius:var(--radius);padding:11px 13px;box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:7px}.predict-card.p-overdue{border-left-color:var(--danger);background:snow}.predict-card.p-today{border-left-color:var(--warn);background:#fffdf7}.predict-card.p-soon{border-left-color:var(--success);background:#f8fdf9}.predict-card.p-upcoming{border-left-color:var(--border2)}.predict-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.predict-name{font-weight:600;font-size:.88rem}.predict-cat{font-size:.7rem;color:var(--text3);margin-top:1px}.s-pill{font-size:.68rem;font-weight:700;padding:3px 9px;border-radius:20px;white-space:nowrap;flex-shrink:0}.s-pill.overdue{background:var(--danger-bg);color:var(--danger)}.s-pill.today{background:var(--warn-bg);color:var(--warn)}.s-pill.soon{background:var(--success-bg);color:var(--success)}.s-pill.upcoming{background:var(--bg3);color:var(--text2)}.predict-bar-wrap{display:flex;align-items:center;gap:7px}.predict-bar{flex:1;height:4px;background:var(--bg3);border-radius:4px;overflow:hidden}.p-overdue .predict-bar div{background:var(--danger)}.p-today .predict-bar div{background:var(--warn)}.p-soon .predict-bar div{background:var(--success)}.p-upcoming .predict-bar div{background:var(--accent)}.predict-pct{font-size:.68rem;color:var(--text3);width:30px;text-align:right}.predict-meta{display:flex;flex-wrap:wrap;gap:10px}.pm-item{display:flex;align-items:center;gap:4px;font-size:.72rem;color:var(--text2)}.predict-footer{display:flex;justify-content:space-between;align-items:center}.conf{font-size:.66rem;padding:2px 7px;border-radius:20px;font-weight:600}.conf-high{background:var(--success-bg);color:var(--success)}.conf-med{background:var(--warn-bg);color:var(--warn)}.conf-low{background:var(--bg3);color:var(--text3)}.p-count{font-size:.68rem;color:var(--text3)}::-webkit-scrollbar{width:4px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border2);border-radius:4px}
