:root{--green: #1a7a3c;--green-dark: #136030;--amber: #b45309;--amber-bg: #fef3c7;--red: #b91c1c;--red-bg: #fee2e2;--ink: #1f2937;--muted: #6b7280;--line: #e5e7eb;--bg: #f9fafb;--card: #ffffff;--radius: 12px}*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,sans-serif;background:var(--bg);color:var(--ink);font-size:16px;-webkit-tap-highlight-color:transparent}.app-header{background:var(--green);color:#fff;padding:.75rem 1rem;position:sticky;top:0;z-index:10}.app-header h1{margin:0;font-size:1.25rem}.logo-btn{background:none;border:none;padding:0;margin:0;cursor:pointer;text-align:left}.logo-btn h1{color:#fff}.app-header .sub{font-size:.8rem;opacity:.85}.nav{display:flex;gap:.5rem;padding:.75rem 1rem 0;max-width:1100px;margin:0 auto;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}.nav::-webkit-scrollbar{display:none}.nav button{flex:0 0 auto;min-width:118px;min-height:52px;font-size:1rem;font-weight:600;border:2px solid var(--line);background:var(--card);border-radius:var(--radius);cursor:pointer;color:var(--ink)}.nav button.active{background:var(--green);border-color:var(--green);color:#fff}.main{max-width:1100px;margin:0 auto;padding:1rem}.search-row{display:flex;gap:.5rem;margin-bottom:.75rem}.search-row input{flex:1;min-height:52px;font-size:1rem;padding:0 1rem;border:2px solid var(--line);border-radius:var(--radius)}.chips{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:.75rem}.chip{min-height:44px;padding:0 1rem;font-size:.95rem;font-weight:600;border:2px solid var(--line);background:var(--card);border-radius:999px;cursor:pointer;color:var(--ink)}.chip.active{border-color:var(--green);background:#e8f5ec;color:var(--green-dark)}.chip .count{display:inline-block;min-width:1.6em;margin-left:.4em;padding:.1em .4em;border-radius:999px;background:var(--green);color:#fff;font-size:.85em}.chip.warn.active{border-color:var(--amber);background:var(--amber-bg);color:var(--amber)}.chip.warn .count{background:var(--amber)}.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:1rem;margin-bottom:.75rem;width:100%;text-align:left;cursor:pointer;font-size:1rem;color:var(--ink)}.card:active{background:#f3f4f6}.card .sku{font-weight:700;font-size:1.05rem}.card .desc{color:var(--muted);margin:.25rem 0}.card .row{display:flex;justify-content:space-between;align-items:center;gap:.5rem}.card .qty{font-size:1.5rem;font-weight:800}.card .qty small{font-size:.8rem;font-weight:400;color:var(--muted)}.badge{display:inline-block;padding:.25em .7em;border-radius:999px;font-size:.8rem;font-weight:700;white-space:nowrap}.badge.review{background:var(--amber-bg);color:var(--amber)}.badge.low{background:var(--red-bg);color:var(--red)}.badge.ok{background:#e8f5ec;color:var(--green-dark)}.badge.status-new{background:#e0e7ff;color:#3730a3}.badge.status-picking{background:var(--amber-bg);color:var(--amber)}.badge.status-packed{background:#dbeafe;color:#1d4ed8}.badge.status-shipped{background:#e8f5ec;color:var(--green-dark)}.badge.status-delivered{background:var(--green);color:#fff}.badge.status-cancelled{background:#f3f4f6;color:var(--muted)}.badge.status-received{background:#e0e7ff;color:#3730a3}.badge.status-parsed{background:#dbeafe;color:#1d4ed8}.badge.status-mapped{background:var(--amber-bg);color:var(--amber)}.badge.status-sent{background:#e8f5ec;color:var(--green-dark)}.badge.status-acked{background:var(--green);color:#fff}.badge.status-error{background:var(--red-bg);color:var(--red)}.badge.status-setup{background:#f3f4f6;color:var(--muted)}.badge.status-testing{background:var(--amber-bg);color:var(--amber)}.badge.status-certified{background:var(--green);color:#fff}.btn{display:inline-block;min-height:52px;padding:.75rem 1.5rem;font-size:1.05rem;font-weight:700;border:none;border-radius:var(--radius);background:var(--green);color:#fff;cursor:pointer;width:100%}.btn:active{background:var(--green-dark)}.btn.secondary{background:#fff;color:var(--green-dark);border:2px solid var(--green)}.btn.danger{background:var(--red)}.btn:disabled{opacity:.5;cursor:default}.field{margin-bottom:1rem}.field label{display:block;font-weight:600;margin-bottom:.35rem}.field input,.field select,.field textarea{width:100%;min-height:52px;font-size:1rem;padding:.6rem .9rem;border:2px solid var(--line);border-radius:var(--radius);font-family:inherit}.field textarea{min-height:90px;resize:vertical}.field .hint{font-size:.85rem;color:var(--muted);margin-top:.25rem}.detail-head{margin-bottom:1rem}.detail-head .sku{font-size:1.4rem;font-weight:800}.detail-head .desc{color:var(--muted);margin:.25rem 0 .5rem}.big-qty{font-size:2.5rem;font-weight:800}.big-qty small{font-size:1rem;font-weight:400;color:var(--muted)}.section{margin:1.5rem 0}.section h2{font-size:1.1rem;margin:0 0 .75rem}table.plain{width:100%;border-collapse:collapse;font-size:.95rem}table.plain th,table.plain td{text-align:left;padding:.6rem .5rem;border-bottom:1px solid var(--line)}table.plain th{color:var(--muted);font-weight:600;font-size:.85rem}.movement{border-left:4px solid var(--line);padding:.5rem .75rem;margin-bottom:.5rem;background:var(--card);border-radius:0 var(--radius) var(--radius) 0}.movement.receive{border-color:var(--green)}.movement.adjust{border-color:var(--amber)}.movement.initial_count{border-color:#9ca3af}.movement .meta{font-size:.85rem;color:var(--muted)}.movement .delta{font-weight:800;font-size:1.1rem}.movement .delta.pos{color:var(--green-dark)}.movement .delta.neg{color:var(--red)}.alert{padding:1rem;border-radius:var(--radius);margin-bottom:1rem}.alert.error{background:var(--red-bg);color:var(--red);font-weight:600}.alert.ok{background:#e8f5ec;color:var(--green-dark);font-weight:600}.empty,.loading{text-align:center;color:var(--muted);padding:3rem 1rem}.search-results{position:absolute;left:1rem;right:1rem;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 8px 24px #0000001f;max-height:60vh;overflow-y:auto;z-index:20}.search-results .group{padding:.5rem 1rem .25rem;font-size:.8rem;font-weight:700;color:var(--muted);text-transform:uppercase}.search-results button{display:block;width:100%;text-align:left;padding:.75rem 1rem;border:none;background:none;font-size:1rem;cursor:pointer;min-height:52px;color:var(--ink)}.search-results button:active{background:#f3f4f6}.search-results .sub2{color:var(--muted);font-size:.85rem}.search-wrap{position:relative}.po-line{display:flex;gap:.75rem;align-items:center;padding:.75rem 0;border-bottom:1px solid var(--line)}.po-line .info{flex:1}.po-line .info .sku{font-weight:700}.po-line .info .desc{font-size:.85rem;color:var(--muted)}.po-line input{width:90px;min-height:52px;font-size:1.1rem;text-align:center;border:2px solid var(--line);border-radius:var(--radius)}.back-btn{background:none;border:none;color:var(--green-dark);font-size:1rem;font-weight:700;cursor:pointer;padding:.75rem 0;min-height:48px}.notes-box{background:#fffbeb;border:1px solid #fcd34d;border-radius:var(--radius);padding:.75rem 1rem;margin:.75rem 0;font-size:.95rem}@media (min-width: 700px){.btn{width:auto}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:1rem}}.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1rem;background:var(--bg, #f8fafc)}.login-card{width:100%;max-width:380px}.login-card h1{margin:0 0 .25rem}.login-card label{display:block;margin:.75rem 0;font-weight:600}.login-card input,.card label input,.card label select{display:block;width:100%;margin-top:.25rem;padding:.75rem;font-size:1rem;border:1px solid #cbd5e1;border-radius:var(--radius);min-height:48px;box-sizing:border-box}.card label{display:block;margin:.75rem 0;font-weight:600}button.big{width:100%;min-height:52px;font-size:1.1rem;margin-top:.5rem}.user-chip{display:flex;align-items:center;gap:.75rem;font-weight:600}.user-chip .signout{background:none;border:none;border-radius:var(--radius);padding:.5rem;min-height:44px;cursor:pointer;color:#ffffffb3;font-size:.8rem;font-weight:400;text-decoration:underline}.row{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.row.between{justify-content:space-between}.card-list .card{margin-bottom:.75rem}.sub2{color:var(--muted);font-size:.9rem}.pick-list{border:1px solid var(--line);border-radius:var(--radius);margin-top:.25rem;max-height:40vh;overflow-y:auto;background:var(--card)}.pick-row{display:block;width:100%;text-align:left;padding:.6rem .75rem;border:none;background:none;border-bottom:1px solid var(--line);font-size:.95rem;cursor:pointer;color:var(--ink);min-height:48px}.pick-row:last-child{border-bottom:none}.pick-row:active{background:#f3f4f6}.warn{color:var(--amber);font-weight:700}.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));gap:.75rem;margin-bottom:1rem}.stat-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:1rem}.stat-card .label{color:var(--muted);font-size:.85rem}.stat-card .value{font-size:1.6rem;font-weight:800;margin-top:.25rem}.stat-card .sub{color:var(--muted);font-size:.85rem;margin-top:.25rem}
