[hidden]{display:none!important}
:root{font-family:system-ui,-apple-system,"Noto Sans TC",sans-serif;color:#18212f;background:#f4f7fb}*{box-sizing:border-box}body{margin:0}.login-wrap{min-height:100dvh;display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,#e8f0ff,#f8fafc)}.card,dialog form{background:#fff;border:1px solid #e3e8ef;border-radius:18px;padding:18px;box-shadow:0 8px 30px #172b4d12}.login-card{width:min(420px,100%)}.brand{font-size:52px}h1{font-size:24px;margin:8px 0}h2{margin:0 0 14px}h3{margin-top:0}label{display:grid;gap:6px;margin:12px 0;font-size:14px;font-weight:650}.check{display:flex;align-items:center;gap:8px}input,select,textarea,button{font:inherit;border-radius:10px;border:1px solid #cfd8e3;padding:11px 12px}button{background:#1f6feb;color:#fff;border:0;font-weight:750;cursor:pointer}.ghost{background:#eef3f8;color:#27364a}.danger{background:#dc2626}.small{padding:8px 10px;font-size:13px}.error{color:#b91c1c;margin-top:10px}header{height:62px;background:#10233f;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 18px;position:sticky;top:0;z-index:3}header span{margin-left:12px;font-size:13px;opacity:.8}nav{display:flex;gap:8px;padding:10px;background:#fff;border-bottom:1px solid #e4e8ef;overflow:auto;position:sticky;top:62px;z-index:2}nav button{white-space:nowrap;background:#edf3fb;color:#20415f}nav button.active{background:#1f6feb;color:#fff}main{max-width:1100px;margin:auto;padding:18px}.title-row{display:flex;justify-content:space-between;align-items:center;gap:10px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:16px}.stat{background:#fff;border-radius:16px;padding:16px;border:1px solid #e3e8ef}.stat b{display:block;font-size:28px;margin-top:8px}.list{display:grid;gap:10px;margin-top:12px}.item{background:#fff;border:1px solid #e3e8ef;border-radius:15px;padding:14px;display:grid;grid-template-columns:72px 1fr auto;gap:12px;align-items:center}.item img{width:72px;height:72px;object-fit:cover;border-radius:12px;background:#edf2f7}.meta{font-size:13px;color:#64748b;line-height:1.7}.badge{display:inline-block;padding:3px 8px;border-radius:999px;background:#eaf2ff;color:#1d4ed8;font-size:12px}.badge.red{background:#fee2e2;color:#b91c1c}.badge.orange{background:#ffedd5;color:#c2410c}.row-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.filters{display:grid;grid-template-columns:180px 1fr auto;gap:8px}.inline{display:flex;gap:8px}.inline input{flex:1}.actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}dialog{border:0;background:transparent;width:min(520px,calc(100% - 24px));padding:0}dialog::backdrop{background:#08122299}dialog form{max-height:90dvh;overflow:auto}fieldset{border:1px solid #d9e0e8;border-radius:12px}#scanVideo{width:100%;border-radius:12px;background:#000;margin:8px 0}#positionList{display:flex;gap:8px;flex-wrap:wrap}.pos-chip{background:#eff4fa;border-radius:10px;padding:8px 10px;display:flex;gap:8px;align-items:center}@media(max-width:720px){.stats{grid-template-columns:1fr}.filters{grid-template-columns:1fr}.item{grid-template-columns:58px 1fr}.item img{width:58px;height:58px}.row-actions{grid-column:1/-1;justify-content:flex-start}.title-row{align-items:flex-start}.title-row h2{font-size:21px}main{padding:12px}header{padding:0 12px}.login-wrap{padding:14px}}
.mqc-start{display:flex;align-items:center;gap:18px;max-width:680px}.mqc-start h3{margin:0 0 6px}.mqc-start p{margin:0 0 16px;color:#64748b;line-height:1.6}.mqc-icon{font-size:56px;flex:0 0 auto}@media(max-width:720px){.mqc-start{align-items:flex-start}.mqc-icon{font-size:44px}}

.submit-overlay{position:fixed;inset:0;z-index:99999;background:rgba(8,18,34,.62);display:grid;place-items:center;padding:24px;cursor:wait;touch-action:none;user-select:none}.submit-box{min-width:min(320px,calc(100vw - 48px));background:#fff;border-radius:18px;padding:24px;box-shadow:0 18px 60px #0004;display:grid;justify-items:center;gap:10px;text-align:center}.submit-box b{font-size:20px}.submit-box span{font-size:14px;color:#64748b}.submit-spinner{width:42px;height:42px;border:4px solid #dbe7f7;border-top-color:#1f6feb;border-radius:50%;animation:submit-spin .8s linear infinite}@keyframes submit-spin{to{transform:rotate(360deg)}}html.is-submitting,html.is-submitting body{overflow:hidden}button:disabled,input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;opacity:.65}


/* V9 dashboard -> query navigation */
.stat-link{display:block;width:100%;text-align:left;color:#18212f;background:#fff;font-weight:400;border:1px solid #e3e8ef;transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease}.stat-link:hover,.stat-link:focus-visible{transform:translateY(-1px);box-shadow:0 8px 24px #172b4d14;border-color:#9bbcf3}.stat-link b{font-weight:750}.stat-link small{display:block;margin-top:4px;color:#64748b;font-size:12px}.dashboard-product{width:100%;text-align:left;color:#18212f;background:#fff;font-weight:400;cursor:pointer}.dashboard-product:hover,.dashboard-product:focus-visible{border-color:#9bbcf3;box-shadow:0 6px 20px #172b4d12}.open-hint{color:#1f6feb;font-weight:750;white-space:nowrap}.query-context{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;padding:11px 14px;border:1px solid #cfe0f8;background:#eef5ff;border-radius:12px;color:#24486b}@media(max-width:720px){.open-hint{grid-column:2;justify-self:end}.query-context{align-items:center}}


/* V10 notes + existing photo preview */
textarea{width:100%;resize:vertical;border-radius:10px;border:1px solid #cfd8e3;padding:11px 12px;line-height:1.5;background:#fff;color:inherit}.product-photo-preview{display:grid;gap:8px;margin:12px 0;padding:12px;border:1px solid #d9e3ef;border-radius:12px;background:#f8fbff}.product-photo-preview span{font-size:13px;font-weight:750;color:#475569}.product-photo-preview img{display:block;width:100%;max-height:260px;object-fit:contain;border-radius:10px;background:#eef3f8}.product-note{margin:6px 0 7px;padding:7px 9px;border-radius:9px;background:#f7f9fc;color:#475569;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}


/* V13 daily push notifications + expiry alert emphasis */
.header-actions{display:flex;align-items:center;gap:8px}.notify-btn{white-space:nowrap}.notify-btn.enabled{background:#dcfce7;color:#166534}.notify-btn.blocked{background:#fee2e2;color:#991b1b}.item.expiry-alert,.dashboard-product.expiry-alert{border:2px solid #dc2626;background:#fff1f2;box-shadow:0 0 0 3px rgba(220,38,38,.08),0 8px 24px rgba(127,29,29,.10)}.expiry-alert .alert-label{display:inline-block;margin:6px 6px 0 0;padding:4px 9px;border-radius:999px;background:#dc2626;color:#fff;font-size:12px;font-weight:800}.expiry-alert .meta{color:#7f1d1d}@media(max-width:720px){header{height:auto;min-height:62px;gap:8px}.header-actions{gap:6px}.notify-btn{padding:9px 10px;font-size:12px}header span{display:block;margin:2px 0 0}.item.expiry-alert,.dashboard-product.expiry-alert{border-width:2px}}

.mqc-content{flex:1;min-width:0}.mqc-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.mqc-actions .ghost{background:#eef3f8;color:#27364a}.mqc-start #mqcInstruction{white-space:pre-wrap}


/* V15 date display, product card fields, click-to-enlarge photos */
.product-fields{display:grid;gap:2px;margin-top:4px;font-size:13px;color:#64748b;line-height:1.55}.product-fields strong{color:#475569;font-weight:750}.product-thumb{cursor:zoom-in;transition:transform .12s ease,box-shadow .12s ease}.product-thumb:hover,.product-thumb:focus{transform:scale(1.03);box-shadow:0 4px 14px #172b4d2b}.photo-dialog{width:min(980px,calc(100% - 24px));max-width:none;background:transparent;border:0;padding:0}.photo-dialog::backdrop{background:rgba(2,8,23,.82)}.photo-viewer{position:relative;background:#0f172a;border-radius:18px;padding:48px 18px 18px;box-shadow:0 24px 80px #0008;display:grid;place-items:center;gap:12px;max-height:92dvh}.photo-viewer img{display:block;max-width:100%;max-height:75dvh;object-fit:contain;border-radius:12px;background:#fff}.photo-close{position:absolute;top:10px;right:10px;width:38px;height:38px;border-radius:999px;padding:0;background:#fff;color:#0f172a;font-size:28px;line-height:1}.photo-caption{color:#fff;font-size:14px;font-weight:700;text-align:center;overflow-wrap:anywhere}@media(max-width:720px){.product-fields{font-size:13px}.photo-viewer{padding:46px 10px 12px;border-radius:14px}.photo-viewer img{max-height:78dvh}}
