:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#15243b;background:#f4f8fd;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:280px}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}.app{max-width:740px;margin:0 auto;min-height:100vh}.top{height:70px;display:flex;justify-content:space-between;align-items:center;padding:8px 20px;background:#fff;border-bottom:1px solid #e6eef7}.brand{display:flex;align-items:center;gap:10px}.brandmark{height:40px;width:40px;border-radius:12px;background:#edf6ff;color:#2485ce;font-weight:900;font-size:27px;display:grid;place-items:center;letter-spacing:-3px}.spark{color:#85c3ef}.brand strong{display:block;font-weight:800;font-size:18px;letter-spacing:.2px}.brand small{display:block;font-size:10px;font-weight:700;color:#748ca8;letter-spacing:1.8px;margin-top:1px}.circle{border:1px solid #dde8f3;background:#fff;border-radius:13px;height:40px;min-width:40px;font-size:25px;color:#627d99}main{padding:18px 18px 115px}.hero{border-radius:22px;background:linear-gradient(120deg,#e5f3ff,#f8fcff);padding:23px 23px 18px;display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;border:1px solid #d7eaf9}.hero h1{font-size:28px;margin:4px 0 4px;letter-spacing:-.5px}.hero p{color:#647f9b;margin:0;font-size:14px}.hero-symbol{font-size:64px;color:#abd5f6;line-height:1}.eyebrow{font-size:10px;letter-spacing:1.4px;color:#4599d4;font-weight:800}.summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:15px}.stat{padding:14px 12px;background:#fff;border:1px solid #e4edf5;border-radius:17px}.stat strong{font-size:25px;font-weight:800;display:block}.stat span{color:#7289a0;font-size:12px;display:block;margin-top:4px}.searchbox{display:flex;align-items:center;background:#fff;border:1px solid #dce9f6;border-radius:15px;padding:4px 6px 4px 14px;gap:8px;margin:0 0 10px;box-shadow:0 3px 12px #1f456306}.searchbox span{font-size:27px;color:#68a9d9}.searchbox input{width:100%;border:0;outline:0;font-size:16px;padding:12px 0;min-width:0;background:transparent}.scan{border:0;background:#e8f5ff;border-radius:10px;font-size:27px;color:#398dcc;width:44px;height:43px}.filters{display:flex;align-items:center;gap:9px;justify-content:space-between;margin-bottom:14px}select,input[type=number],.field input,.field textarea,.field select{border:1px solid #dbe6f1;background:#fff;border-radius:11px;padding:11px;color:#15243b;width:100%;outline-color:#5aabe7}select{width:auto;max-width:60%}.btn{display:inline-flex;align-items:center;justify-content:center;min-height:45px;border:0;padding:11px 16px;background:#258bd2;color:#fff;border-radius:12px;font-size:14px;font-weight:750;gap:6px}.btn.secondary{background:#e7f3fc;color:#1672ad}.btn.ghost{background:transparent;color:#517893}.btn.mini{min-height:40px;font-size:13px;padding:9px 12px}.btn.danger{background:#fce9e9;color:#b13e45}.btn.full{width:100%;margin-top:12px}.cards{display:grid;gap:10px}.thread-card,.order-card{background:#fff;border:1px solid #e2eaf3;border-radius:17px;padding:16px;box-shadow:0 4px 20px #2c577009}.card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.thread-code{font-size:26px;font-weight:840;letter-spacing:-.7px;line-height:1.1}.thread-name{font-size:14px;color:#56718a;margin-top:5px}.thread-place{color:#8498ab;font-size:12px;margin-top:7px}.chip{display:inline-block;padding:6px 9px;border-radius:8px;font-size:11px;white-space:nowrap;font-weight:750}.chip.available{background:#e8f6ee;color:#23704b}.chip.low{background:#fff2db;color:#996c1b}.chip.out{background:#fcebec;color:#b4474b}.chip.new{background:#fff2db;color:#996c1b}.chip.accepted{background:#e9edf9;color:#5068aa}.chip.ordered{background:#e6f1fc;color:#2372b2}.chip.received{background:#e8f6ee;color:#23704b}.chip.cancelled{background:#f0f2f5;color:#667}.card-actions{margin-top:14px;display:flex;align-items:center;justify-content:space-between;gap:8px}.card-actions .btn{min-height:37px;padding:8px 14px}.checkbox-line{display:flex;gap:7px;font-size:12px;color:#64809d;align-items:center;cursor:pointer}.checkbox-line input{accent-color:#258bd2;width:17px;height:17px}.empty{padding:26px;color:#7a91a8;text-align:center;background:#fff;border-radius:16px;border:1px dashed #cdddea;line-height:1.5}.panel{background:#fff;border:1px solid #e4edf5;padding:22px;border-radius:19px;margin-bottom:12px}.panel h1{font-size:28px}.panel h2{font-size:20px;margin:7px 0}.panel p{color:#6d849e;font-size:14px;line-height:1.5}.panel .btn{margin:5px 6px 5px 0}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.section-head h2{font-size:18px}.bottom{position:fixed;bottom:0;left:50%;transform:translateX(-50%);max-width:740px;width:100%;z-index:10;background:#fff;border-top:1px solid #e3ebf4;display:grid;grid-template-columns:repeat(4,1fr);padding:7px 8px calc(7px + env(safe-area-inset-bottom, 0px));box-shadow:0 -4px 22px #223d5611}.bottom button{border:0;background:transparent;color:#8da0b2;padding:5px 0;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:11px;font-weight:700}.bottom .nav-icon{font-size:24px}.bottom button.active{color:#258bd2}.hidden{display:none!important}.modal{position:fixed;inset:0;z-index:30;display:flex;align-items:end;justify-content:center}.backdrop{position:absolute;inset:0;background:#14233c8e}.sheet{position:relative;background:#fff;border-radius:22px 22px 0 0;padding:17px 18px calc(28px + env(safe-area-inset-bottom,0px));width:min(740px,100%);max-height:90vh;overflow:auto}.sheet-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.sheet-top strong{font-size:17px}.field{display:flex;flex-direction:column;gap:5px;margin:10px 0;font-size:13px;color:#637d95;font-weight:650}.field input,.field textarea,.field select{color:#1d334a;font-size:15px}.field textarea{min-height:65px;resize:vertical}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:9px}.grid2 .field{min-width:0}.detail-code{font-size:34px;font-weight:850;letter-spacing:-1px;margin:0}.detail-sub{color:#637e97;margin:5px 0 12px}.detail-row{padding:10px 0;border-bottom:1px solid #edf2f7;display:flex;justify-content:space-between;gap:12px;font-size:14px}.detail-row span{color:#8294a6}.detail-row b{text-align:right}.toast{position:fixed;left:50%;bottom:92px;transform:translateX(-50%);z-index:60;background:#213a54;color:white;padding:12px 20px;border-radius:12px;box-shadow:0 5px 30px #0015;max-width:90%;text-align:center;font-size:13px}.selected{font-size:13px;color:#6c8098;padding:9px}.muted{color:#8ba0b5!important}.admin-controls{margin-top:15px}.stock-panel{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f3f8fc;padding:12px;border-radius:12px}.qty-control{display:flex;align-items:center;gap:12px}.qty-control button{height:40px;width:42px;font-size:23px;border:1px solid #cce1f3;border-radius:11px;background:#fff;color:#247eb9}.qty-control strong{font-size:21px;min-width:20px;text-align:center}.danger-text{color:#bd4949}.notice{padding:13px;border-radius:12px;background:#f2f8ff;color:#416c91;font-size:13px;line-height:1.4;margin:12px 0}.order-id{color:#99aabc;font-size:11px;margin-top:7px}@media(min-width:640px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.panel{padding:26px}}@media(max-width:350px){main{padding:12px 10px 110px}.hero h1{font-size:24px}.thread-code{font-size:22px}}

/* Catalogue picker and direct label selection. Keep controls touch-friendly on phones. */
.filters{flex-wrap:wrap;justify-content:flex-start}.filters select{flex:1 1 132px;min-width:0;max-width:none}.filters #addThread{flex:0 0 auto}
#labelsView .field select,#labelsView .field input{width:100%;max-width:none}
.print-items{display:grid;gap:8px;margin:12px 0}.print-row{display:flex;align-items:center;gap:13px;padding:13px;border:1px solid #dfebf6;border-radius:12px;background:#f9fcff;cursor:pointer;min-height:62px}
.print-row input{width:21px;height:21px;flex-shrink:0;accent-color:#258bd2}.print-row span{min-width:0;display:flex;flex-direction:column;gap:2px}.print-row strong{font-size:18px;color:#162e47}.print-row small{font-size:13px;color:#6f879e;overflow-wrap:anywhere}
