:root{--bg: #f5f6fa;--card: #ffffff;--text: #1f2430;--muted: #6b7280;--line: #e5e7ee;--accent: #4f46e5;--accent-d: #4338ca;--accent-l: #eef0ff;--good: #15803d;--bad: #b91c1c;--warn: #b45309;--warn-bg: #fff7e6;--radius: 14px;--nav-h: 64px;color-scheme:light;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Arial,sans-serif}*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--text);font-size:16px;-webkit-text-size-adjust:100%}body.modal-open{overflow:hidden}h1{font-size:1.5rem;margin:0}h2{font-size:1.1rem;margin:1.6rem 0 .5rem}button,input,select{font:inherit;color:inherit}input,select{width:100%;padding:.65rem .75rem;border:1px solid #cfd3de;border-radius:10px;background:#fff;min-height:44px}input:focus,select:focus,button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}@media(pointer:coarse),(hover:none){input,select,textarea{font-size:16px}}input[type=checkbox]{width:20px;height:20px;min-height:0;padding:0;accent-color:var(--accent)}code{background:#eef;padding:0 .3em;border-radius:4px}.muted{color:var(--muted)}.small{font-size:.85rem}.good{color:var(--good)}.bad{color:var(--bad)}.grow{flex:1}.stack{display:flex;flex-direction:column;gap:.75rem}.row{display:flex;gap:.75rem;align-items:flex-end}.row>label{min-width:0}.shell{display:grid;grid-template-columns:1fr;min-height:100vh}.main{padding:1rem 1rem calc(var(--nav-h) + 1.5rem + env(safe-area-inset-bottom));max-width:960px;width:100%;margin:0 auto}.nav{position:fixed;bottom:0;left:0;right:0;height:calc(var(--nav-h) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);display:flex;background:#fff;border-top:1px solid var(--line);z-index:20}.nav a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:var(--muted);text-decoration:none;font-size:.72rem}.nav a.active{color:var(--accent);font-weight:600}.brand,.nav-foot{display:none}@media(min-width:900px){.shell{grid-template-columns:230px 1fr}.nav{position:sticky;top:0;height:100vh;flex-direction:column;border-top:0;border-right:1px solid var(--line);padding:1rem .75rem;gap:.25rem}.nav a{flex:0;flex-direction:row;justify-content:flex-start;gap:.75rem;padding:.7rem .9rem;border-radius:10px;font-size:.95rem}.nav a.active{background:var(--accent-l)}.brand{display:flex;align-items:center;gap:.6rem;font-weight:700;padding:.25rem .5rem 1rem}.brand img{border-radius:8px}.nav-foot{display:block;margin-top:auto;padding:.5rem;font-size:.8rem}.main{padding:1.5rem 2rem 3rem;max-width:1100px}.page.wide{max-width:none}}.page-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:1rem}.splash{min-height:100vh;display:flex;flex-direction:column;gap:1rem;align-items:center;justify-content:center;color:var(--muted);padding:1rem;text-align:center}.empty{text-align:center;color:var(--muted);padding:1.5rem 1rem;border:1px dashed #cfd3de;border-radius:var(--radius);display:flex;flex-direction:column;gap:.75rem;align-items:center}.banner{padding:.65rem .9rem;border-radius:10px;margin-bottom:.9rem;font-size:.9rem}.banner.warn{background:var(--warn-bg);color:var(--warn);border:1px solid #f3d9a4}.banner.info{background:var(--accent-l);color:var(--accent-d);border:1px solid #d7dafc}.banner.update{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.banner.update span{flex:1;min-width:180px}.error{background:#fef2f2;color:var(--bad);border:1px solid #fecaca;padding:.6rem .8rem;border-radius:10px;font-size:.9rem}.note{font-size:.85rem;color:var(--muted);margin-top:.5rem}.note.warn{color:var(--warn)}.btn{min-height:44px;padding:.55rem 1rem;border-radius:10px;border:1px solid #cfd3de;background:#fff;cursor:pointer;font-weight:600;white-space:nowrap}.btn.sm{min-height:36px;padding:.3rem .8rem}.btn:disabled{opacity:.55;cursor:default}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.primary:hover:not(:disabled){background:var(--accent-d)}.btn.danger{color:var(--bad);border-color:#f2c4c4}.btn.ghost{border-color:transparent;background:transparent;color:var(--muted)}.btn.add{background:var(--accent-l);border-color:#d7dafc;color:var(--accent-d)}.icon-btn{border:0;background:transparent;font-size:1.2rem;width:44px;height:44px;cursor:pointer;border-radius:10px}.link{background:none;border:0;padding:0;color:var(--accent);cursor:pointer;text-decoration:underline;font-size:inherit}.back{margin-bottom:.75rem;text-decoration:none}.actions{display:flex;gap:.6rem;align-items:center;margin-top:.5rem;flex-wrap:wrap}.actions.left{justify-content:flex-start;margin:.75rem 0}.form{display:flex;flex-direction:column;gap:.85rem}label{display:flex;flex-direction:column;gap:.3rem;font-size:.85rem;color:var(--muted);font-weight:600}label.check{flex-direction:row;align-items:center;gap:.6rem;color:var(--text);font-weight:500;font-size:.95rem}label.inline{margin:.6rem 0}.seg{display:flex;border:1px solid #cfd3de;border-radius:10px;overflow:hidden;background:#fff}.seg button{flex:1;border:0;background:transparent;min-height:44px;padding:.4rem .6rem;cursor:pointer;font-weight:600;color:var(--muted)}.seg button.on{background:var(--accent);color:#fff}.seg.small button{min-height:38px;font-size:.85rem}.chips{display:flex;flex-wrap:wrap;gap:.4rem}.chip{border:1px solid #cfd3de;background:#fff;border-radius:999px;padding:.35rem .8rem;cursor:pointer;font-size:.85rem}.chip.on{background:var(--accent-l);border-color:var(--accent);color:var(--accent-d);font-weight:600}.calc{background:var(--accent-l);border-radius:10px;padding:.7rem .9rem;font-size:.95rem;min-height:3.2rem}fieldset.comp{border:1px solid var(--line);border-radius:12px;padding:.75rem;margin:0}fieldset.comp legend{font-weight:700;padding:0 .4rem}.comp-row{padding:.5rem 0;border-top:1px solid var(--line)}.comp-row:first-of-type{border-top:0}.photo-edit{display:flex;gap:1rem;align-items:center}.overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#11182780;z-index:50;display:flex;align-items:flex-end;justify-content:center}.modal{background:#fff;width:100%;max-height:94vh;border-radius:18px 18px 0 0;display:flex;flex-direction:column}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem .25rem 1.25rem}.modal-head h2{margin:0}.modal-body{padding:.5rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));overflow-y:auto}@media(min-width:700px){.overlay{align-items:center}.modal{max-width:560px;border-radius:18px}}.summary{margin-bottom:1rem}.summary-row{display:flex;gap:.6rem;align-items:baseline;flex-wrap:wrap;margin-bottom:.5rem}.summary-row strong{font-size:1.5rem}.toolbar{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center;margin-bottom:.9rem}.toolbar input[type=search]{flex:1;min-width:160px}.toolbar select{width:auto}.cards{display:flex;flex-direction:column;gap:.7rem}.cards.two{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:.8rem}.card.product{display:grid;grid-template-columns:72px 1fr;gap:.75rem;align-items:start;cursor:pointer;padding:.75rem}.card.product .btn.add{grid-column:1 / -1;width:100%}@media(min-width:560px){.card.product{grid-template-columns:72px 1fr auto;align-items:center}.card.product .btn.add{grid-column:auto;width:auto}}.card.product:hover{border-color:#c7cbf5}.product-name{font-weight:700;line-height:1.25}.product-status{font-size:.9rem;margin:.15rem 0 .35rem}.product-status.done{color:var(--good);font-weight:600}.product-status.over{color:var(--warn);font-weight:600}.product-status.unused{color:var(--muted)}.photo{border-radius:12px;object-fit:cover;background:#eef0f6;flex:none}.photo.ph{display:flex;align-items:center;justify-content:center;color:#9aa1b5;font-size:.75rem;text-align:center}.track{height:10px;background:#e8eaf2;border-radius:99px;overflow:hidden;margin:.25rem 0}.track.big{height:14px}.fill{height:100%;background:var(--accent);border-radius:99px;transition:width .25s}.fill.done{background:#16a34a}.fill.over{background:#f59e0b}.detail-head{display:flex;gap:1rem;align-items:center}.stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:.7rem;margin:1rem 0}.stat{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:.8rem .9rem}.stat-label{font-size:.78rem;color:var(--muted);font-weight:600}.stat-value{font-size:1.3rem;font-weight:700;margin-top:.2rem;overflow-wrap:anywhere}.stat-hint{font-size:.8rem;color:var(--muted);margin-top:.15rem}.stat.good .stat-value{color:var(--good)}.stat.bad .stat-value{color:var(--bad)}.list{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.list-row{display:flex;justify-content:space-between;align-items:center;gap:.75rem;text-align:left;background:transparent;border:0;border-bottom:1px solid var(--line);padding:.75rem 1rem;cursor:pointer;min-height:56px}.list-row:last-child{border-bottom:0}.list-row:hover{background:#fafaff}.table-wrap{overflow-x:auto;background:#fff;border:1px solid var(--line);border-radius:var(--radius)}.table{width:100%;border-collapse:collapse;font-size:.92rem}.table th,.table td{padding:.6rem .8rem;border-bottom:1px solid var(--line);text-align:left}.table tr:last-child td{border-bottom:0}.table th{background:#fafbff;font-size:.8rem;color:var(--muted)}.table .num,.grid .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.table tr.clickable{cursor:pointer}.table tr.clickable:hover{background:#fafaff}.kit-head{display:flex;justify-content:space-between;margin-bottom:.25rem}.kv{display:grid;grid-template-columns:1fr auto;gap:.3rem .75rem;margin:.5rem 0 0;font-size:.92rem}.kv dt{color:var(--muted)}.kv dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}.kit-row{display:flex;gap:.75rem;align-items:flex-end;flex-wrap:wrap}.grid-wrap{overflow:auto;max-height:68vh;background:#fff;border:1px solid var(--line);border-radius:var(--radius)}.grid{border-collapse:separate;border-spacing:0;width:100%;font-size:.88rem}.grid th,.grid td{padding:.45rem .65rem;border-bottom:1px solid var(--line);border-right:1px solid #f0f1f6;white-space:nowrap;background:#fff}.grid th{position:sticky;top:0;background:#1f4e78;color:#fff;cursor:pointer;-webkit-user-select:none;user-select:none;z-index:2;text-align:left;font-size:.8rem}.grid th.num{text-align:right}.grid tbody tr:hover td{background:#f7f8ff}.grid td.editable{background:#fffdf2;cursor:text}.grid td.editable.locked{background:#f3f3f3;cursor:not-allowed}.grid td.ctr{text-align:center}.grid tfoot td{position:sticky;bottom:0;background:#e7e6e6;font-weight:700;z-index:1}.grid .cell-input{padding:.2rem .4rem;min-height:30px;min-width:90px}.grid select{min-height:30px;padding:.1rem .3rem;width:auto}.login{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1rem}.login-card{width:100%;max-width:360px;display:flex;flex-direction:column;gap:.8rem;align-items:center;text-align:center;padding:1.5rem}.login-card img{border-radius:16px}.login-card .btn{width:100%}.toasts{position:fixed;left:0;right:0;bottom:calc(var(--nav-h) + 12px + env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;gap:.4rem;z-index:80;pointer-events:none;padding:0 1rem}.toast{background:#1f2430;color:#fff;padding:.6rem 1rem;border-radius:10px;font-size:.9rem;box-shadow:0 6px 20px #00000040;max-width:480px}.toast.err{background:#b91c1c}@media(min-width:900px){.toasts{bottom:24px}}
