[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}}

/* V18 multi-branch / super administrator */
.branch-scope{min-width:150px;background:#fff;color:#10233f;border:1px solid #cbd5e1;padding:9px 10px;font-weight:700}.branch-tag,.super-tag{display:inline-block;margin-left:6px;padding:2px 7px;border-radius:999px;font-size:11px;font-weight:800;vertical-align:middle}.branch-tag{background:#e2e8f0;color:#475569}.super-tag{background:#fef3c7;color:#92400e}.subtle{margin:4px 0 0;color:#64748b;font-size:13px}.title-row>div>h2{margin-bottom:0}@media(max-width:720px){header{align-items:flex-start;flex-wrap:wrap;padding-top:10px;padding-bottom:10px}.header-actions{width:100%;display:flex;flex-wrap:wrap}.branch-scope{flex:1 1 150px;min-width:0}#notifyBtn,#logoutBtn{flex:0 0 auto}header>div:first-child{width:100%}}


/* V19 auth bootstrap + scalable query pagination */
.boot-splash{position:fixed;inset:0;z-index:100000;display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,#e8f0ff,#f8fafc)}.boot-card{width:min(360px,100%);background:#fff;border:1px solid #e3e8ef;border-radius:20px;padding:28px;box-shadow:0 12px 38px #172b4d18;display:grid;justify-items:center;gap:10px;text-align:center}.boot-card .brand{font-size:52px}.boot-card b{font-size:20px}.boot-card span{font-size:14px;color:#64748b}.boot-spinner{width:34px;height:34px;border:4px solid #dbe7f7;border-top-color:#1f6feb;border-radius:50%;animation:submit-spin .8s linear infinite}.pager{margin:14px 0 4px;padding:10px 12px;border:1px solid #e3e8ef;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:10px;color:#475569;font-size:13px}.pager>div{display:flex;gap:8px}@media(max-width:720px){.pager{align-items:stretch;flex-direction:column}.pager>div{display:grid;grid-template-columns:1fr 1fr}.pager button{width:100%}}

/* V20 superadmin-only image optimizer */
.optimizer-stats .stat small{display:block;margin-top:4px;color:#64748b;font-size:12px}.optimizer-card{margin-top:14px}.optimizer-form{display:grid;gap:10px}.optimizer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px}.optimizer-progress{margin-top:14px;padding:12px 14px;border-radius:12px;background:#eef5ff;border:1px solid #cfe0f8;color:#24486b;font-weight:700}@media(max-width:720px){.optimizer-grid{grid-template-columns:1fr}.optimizer-stats{grid-template-columns:1fr}}

/* V21 public information portal: keep the default entry clean, reveal public pages only from the floating info button */
.info-float{position:fixed;right:max(22px,env(safe-area-inset-right));bottom:max(22px,env(safe-area-inset-bottom));z-index:20;width:76px;height:76px;border-radius:999px;background:#10233f;color:#fff;box-shadow:0 14px 36px #10233f45;display:grid;place-items:center;align-content:center;gap:1px;padding:8px;border:3px solid #fff;transition:transform .15s ease,box-shadow .15s ease}.info-float:hover,.info-float:focus-visible{transform:translateY(-3px) scale(1.02);box-shadow:0 18px 44px #10233f55}.info-float span{display:grid;place-items:center;width:28px;height:28px;border-radius:999px;background:#fff;color:#1f6feb;font-family:Georgia,serif;font-size:22px;font-weight:900}.info-float small{font-size:11px;font-weight:800;line-height:1.1}.public-shell{min-height:100dvh;background:#f4f7fb;color:#18212f}.public-header{position:sticky;top:0;z-index:12;min-height:72px;height:auto;background:#10233f;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px max(20px,calc((100vw - 1100px)/2))}.public-brand{display:flex;align-items:center;gap:10px}.public-brand-icon{font-size:34px}.public-brand b{display:block;font-size:18px}.public-brand small{display:block;margin:2px 0 0;font-size:12px;opacity:.74}.public-login-btn{background:#fff;color:#10233f;white-space:nowrap}.public-nav{position:sticky;top:72px;z-index:11;display:flex;justify-content:center;gap:8px;padding:10px 14px;background:#fff;border-bottom:1px solid #e4e8ef;overflow-x:auto}.public-nav button{background:#edf3fb;color:#20415f;white-space:nowrap}.public-nav button.active{background:#1f6feb;color:#fff}.public-main{max-width:1100px;margin:0 auto;padding:28px 18px 48px}.public-page{animation:public-fade .18s ease}@keyframes public-fade{from{opacity:.45;transform:translateY(4px)}to{opacity:1;transform:none}}.public-hero{display:grid;grid-template-columns:1fr auto;gap:24px;align-items:center;background:linear-gradient(135deg,#10233f,#1f6feb);color:#fff;border-radius:24px;padding:38px;box-shadow:0 18px 50px #10233f1f;margin-bottom:22px}.public-hero h1{font-size:clamp(28px,5vw,44px);line-height:1.15;margin:10px 0 14px}.public-hero p{max-width:760px;margin:0;color:#e5efff;line-height:1.85;font-size:16px}.public-kicker{display:inline-block;padding:6px 10px;border-radius:999px;background:#ffffff20;border:1px solid #ffffff4d;font-size:13px;font-weight:800}.public-hero-icon{font-size:92px;filter:drop-shadow(0 10px 18px #0003)}.public-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.public-card{background:#fff;border:1px solid #e3e8ef;border-radius:18px;padding:20px;box-shadow:0 8px 26px #172b4d0e}.public-card>span{display:inline-block;font-size:28px;margin-bottom:8px}.public-card h3{margin:0 0 8px;font-size:17px}.public-card p{margin:0;color:#5c6b7e;line-height:1.75}.public-note{margin-top:18px;padding:18px 20px;border-radius:16px;background:#eef5ff;border:1px solid #cfe0f8;color:#24486b}.public-note b{font-size:16px}.public-note p{margin:7px 0 0;line-height:1.75}.public-section-head{display:flex;align-items:center;gap:16px;margin:4px 0 20px}.public-section-head>span{font-size:44px}.public-section-head h1{margin:0;font-size:32px}.public-section-head p{margin:5px 0 0;color:#64748b}.public-prose{padding:26px 28px}.public-prose h3{margin:24px 0 7px;color:#10233f}.public-prose h3:first-child{margin-top:0}.public-prose p{color:#526174;line-height:1.9}.public-prose b{color:#18212f}.public-updated{margin-top:28px!important;padding-top:16px;border-top:1px solid #e7ebf0;font-size:13px;color:#7b8797!important}.support-coming{margin-top:24px;padding:18px;border-radius:14px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;display:grid;gap:5px}.support-coming span{font-size:14px;line-height:1.65}.contact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.public-card a{color:#1f6feb;word-break:break-all}.contact-notice{background:#fff7ed;border-color:#fed7aa;color:#9a3412}.public-footer{display:flex;justify-content:center;gap:14px;flex-wrap:wrap;padding:22px;background:#10233f;color:#dbeafe;font-size:13px}.public-footer span+span:before{content:'·';margin-right:14px;opacity:.5}
@media(max-width:760px){.info-float{right:16px;bottom:16px;width:68px;height:68px}.public-header{min-height:68px;padding:10px 12px}.public-brand b{font-size:16px}.public-brand small{font-size:11px}.public-nav{top:68px;justify-content:flex-start;padding:9px 10px}.public-main{padding:18px 12px 36px}.public-hero{grid-template-columns:1fr;padding:24px 20px}.public-hero-icon{font-size:58px;order:-1}.public-grid,.contact-grid{grid-template-columns:1fr}.public-section-head{align-items:flex-start}.public-section-head>span{font-size:36px}.public-section-head h1{font-size:27px}.public-prose{padding:20px}.public-footer{display:grid;text-align:center;gap:5px}.public-footer span+span:before{content:none}}

/* V22 access application workflow */
.public-hero-actions{margin-top:20px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.public-hero-actions span{font-size:13px;color:#dbeafe}.public-apply-btn{background:#fff;color:#10233f;font-weight:850}.public-apply-info{margin-top:18px;display:grid;gap:10px}.public-apply-info h3{margin:0}.public-apply-info p{margin:0;color:#526174;line-height:1.8}.public-apply-info button{justify-self:start}.application-dialog{width:min(560px,calc(100% - 24px));max-width:none}.application-form{display:grid;gap:10px}.application-form h3{margin-bottom:0}.application-honeypot{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}.application-agree{margin-top:4px;align-items:flex-start}.form-message{min-height:20px;font-size:13px;color:#475569;line-height:1.55}.form-message.success{color:#166534;font-weight:750}.form-message.error{color:#b91c1c;font-weight:750}.application-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.application-filters{margin:12px 0}.application-item{align-items:flex-start}.application-item.pending{border-left:4px solid #f59e0b}.application-item.approved{border-left:4px solid #16a34a}.application-item.rejected{border-left:4px solid #dc2626}.application-icon{font-size:26px}.application-body{min-width:0;flex:1}.application-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.application-status{display:inline-block;padding:3px 8px;border-radius:999px;font-size:11px;font-weight:850}.application-status.pending{background:#fef3c7;color:#92400e}.application-status.approved{background:#dcfce7;color:#166534}.application-status.rejected{background:#fee2e2;color:#991b1b}.application-result,.application-note{margin-top:6px;padding:7px 9px;border-radius:9px;font-size:13px;line-height:1.6}.application-result{background:#ecfdf5;color:#166534}.application-note{background:#f8fafc;color:#475569}.application-body a{color:#1f6feb}.approval-summary{padding:12px 14px;border:1px solid #dbe4ee;border-radius:12px;background:#f8fafc;display:grid;gap:4px;color:#475569;font-size:13px}.approval-summary b{color:#10233f;font-size:15px}.approval-password-note{padding:10px 12px;border-radius:10px;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;font-size:12px;line-height:1.6}
@media(max-width:720px){.public-hero-actions{align-items:stretch}.public-hero-actions button{width:100%}.application-stats{grid-template-columns:1fr}.application-item{display:grid;grid-template-columns:auto 1fr}.application-item .row-actions{grid-column:1/-1;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.application-item .row-actions button{width:100%}.application-dialog{width:calc(100% - 16px)}}

/* V23 dashboard due-range cards */
#stats{grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:720px){#stats{grid-template-columns:1fr}}
