:root{--bg:#f3f5f7;--surface:#fff;--text:#14202b;--muted:#5d6b78;--line:#d9dfe5;--brand:#12324a;--take:#b4530a;--take-bg:#fdf1e3;--give:#1b6b3f;--give-bg:#e6f4ec;--warn-bg:#fff4cc;--warn-text:#5c4400;--danger:#a32222;--radius:14px}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{background:var(--bg);color:var(--text);margin:0;font:17px/1.4 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}a{color:var(--brand)}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}.page{max-width:520px;margin:0 auto;padding:16px 16px 40px}.page.wide{max-width:1040px}.topbar{justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px;display:flex}.topbar .brand{color:var(--brand);font-weight:700;text-decoration:none}.linkbtn{color:var(--brand);background:0 0;border:0;padding:8px 0;text-decoration:underline}h1{margin:0 0 4px;font-size:1.35rem;line-height:1.25}h2{margin:28px 0 10px;font-size:1.05rem}.muted{color:var(--muted)}.small{font-size:.88rem}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px}.stack{gap:12px;display:grid}.list{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);margin:0;padding:0;list-style:none;overflow:hidden}.list>li+li{border-top:1px solid var(--line)}.list a,.list button.row,.list .row{text-align:left;width:100%;min-height:56px;color:var(--text);background:0 0;border:0;justify-content:space-between;align-items:center;gap:12px;padding:10px 16px;text-decoration:none;display:flex}.list .row .sub{color:var(--muted);font-size:.88rem;display:block}.qty-neg{color:var(--take);white-space:nowrap;font-weight:600}.qty-pos{color:var(--give);white-space:nowrap;font-weight:600}.stockline{justify-content:space-between;align-items:baseline;display:flex}.stockline strong{font-size:1.3rem}.segmented{grid-template-columns:1fr 1fr;gap:8px;display:grid}.segmented button{border-radius:var(--radius);border:2px solid var(--line);background:var(--surface);min-height:56px;font-weight:600}.segmented button[aria-pressed=true].take{border-color:var(--take);background:var(--take-bg);color:var(--take)}.segmented button[aria-pressed=true].give{border-color:var(--give);background:var(--give-bg);color:var(--give)}.targetbtn{text-align:left;background:var(--surface);border:2px solid var(--line);border-radius:var(--radius);justify-content:space-between;align-items:center;gap:12px;width:100%;min-height:64px;padding:10px 16px;display:flex}.targetbtn.empty{border-color:var(--brand);border-style:dashed;font-weight:600}.targetbtn .label{color:var(--muted);font-size:.8rem;display:block}.targetbtn .change{color:var(--brand);white-space:nowrap;text-decoration:underline}.qtyrow{grid-template-columns:72px 1fr 72px;gap:8px;display:grid}.qtyrow button,.chips button{border:2px solid var(--line);background:var(--surface);border-radius:var(--radius);font-weight:700}.qtyrow button{height:72px;font-size:2rem;line-height:1}.qtyrow input{border:2px solid var(--line);border-radius:var(--radius);background:var(--surface);text-align:center;width:100%;height:72px;font:inherit;color:var(--text);font-size:2rem;font-weight:700}.chips{grid-template-columns:repeat(4,1fr);gap:8px;display:grid}.chips button{min-height:48px}.confirm{border-radius:var(--radius);color:#fff;border:0;width:100%;min-height:72px;font-size:1.2rem;font-weight:700}.confirm.take{background:var(--take)}.confirm.give{background:var(--give)}.confirm:disabled{cursor:not-allowed;background:#a9b3bc}.secondary{border:2px solid var(--line);border-radius:var(--radius);background:var(--surface);width:100%;min-height:56px;color:var(--text);justify-content:center;align-items:center;font-weight:600;text-decoration:none;display:flex}.notice{background:var(--warn-bg);color:var(--warn-text);border-radius:var(--radius);padding:12px 16px}.error{color:var(--danger);border-radius:var(--radius);background:#fde8e8;padding:12px 16px}.done{text-align:center;padding:28px 16px}.done .check{color:#fff;background:var(--give);border-radius:50%;place-items:center;width:72px;height:72px;margin:0 auto 12px;font-size:2.2rem;display:grid}.done .big{font-size:1.5rem;font-weight:700}.sheet{z-index:10;background:var(--bg);flex-direction:column;display:flex;position:fixed;inset:0}.sheet header{background:var(--surface);border-bottom:1px solid var(--line);gap:8px;padding:12px 16px;display:flex}.sheet header input{min-width:0;height:52px;font:inherit;border:2px solid var(--line);border-radius:var(--radius);flex:1;padding:0 14px}.sheet header button{height:52px;color:var(--brand);background:0 0;border:0;padding:0 14px;text-decoration:underline}.sheet .body{flex:1;padding:0 16px 32px;overflow-y:auto}.badge{background:var(--take-bg);color:var(--take);white-space:nowrap;border-radius:999px;flex:none;padding:2px 8px;font-size:.8rem}.kpis{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;display:grid}.kpis .card strong{font-size:1.6rem;display:block}.tablewrap{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:.93rem}th,td{text-align:left;border-bottom:1px solid var(--line);vertical-align:top;padding:9px 12px}tr:last-child td{border-bottom:0}th{color:var(--muted);white-space:nowrap;font-size:.8rem;font-weight:600}td.num,th.num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}tr.closed td{color:var(--muted)}tfoot td{border-top:2px solid var(--line);font-weight:700}.tag{color:var(--muted);background:#e8edf2;border-radius:999px;padding:1px 8px;font-size:.78rem;display:inline-block}.tag.warn{background:var(--warn-bg);color:var(--warn-text)}.tag.high{color:var(--danger);background:#fde8e8}.labelgrid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px;display:grid}.labelcard{text-align:center;break-inside:avoid}.labelcard svg{width:150px;height:150px}.labelcard code{word-break:break-all;color:var(--muted);font-size:.72rem;display:block}@media print{.noprint{display:none}body{background:#fff}}.field{gap:6px;display:grid}.field input{height:52px;font:inherit;border:2px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--text);padding:0 14px}.confirm.brand{background:var(--brand)}
