/* ===== workbench-ui.css ===== */
:root{font-family:system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;font-size:16px;color:#172b40;background:#fff;--costco-red:#e31837;--costco-blue:#005daa;--line:#e1e5ea;--muted:#596b7b;--soft:#f7f8fa}*{box-sizing:border-box}body{margin:0;background:#fff;-webkit-text-size-adjust:100%}button,input,textarea,select{font:inherit}button,a,input,select,summary{touch-action:manipulation}button{cursor:pointer}button:disabled{opacity:.5;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--costco-blue);outline-offset:3px}input:focus,textarea:focus,select:focus{outline:2px solid #005daa55;outline-offset:1px;border-color:var(--costco-blue)}
header{max-width:1080px;margin:auto;padding:14px 20px 10px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px}header h1{margin:0;line-height:1}.header-brand{display:flex;align-items:center;gap:10px;min-width:0;flex:0 1 auto}.brand-logo{display:block;position:relative;width:166px;height:50px;overflow:hidden;background:white}.brand-logo img{position:absolute;width:232px;height:232px;max-width:none;left:-34px;top:-88px}#offline-status{color:var(--muted);text-align:left;font-size:12px;max-width:88px;line-height:1.35;margin:0!important;flex:0 0 auto}.local-only-notice{flex:1 1 220px;max-width:420px;margin:0;min-width:0;align-self:flex-start}.local-only-notice>summary{list-style:none;cursor:pointer;font-size:13px;font-weight:600;color:var(--costco-red);line-height:1.4;min-height:28px;display:flex;align-items:center;gap:4px;user-select:none}.local-only-notice>summary::-webkit-details-marker{display:none}.local-only-notice>summary .local-only-toggle::before{content:"▶";display:inline-block;width:1em;color:var(--costco-red);font-size:11px}.local-only-notice[open]>summary .local-only-toggle::before{content:"▼"}.local-only-notice>p{margin:6px 0 0;font-size:12px;line-height:1.55;color:var(--muted);overflow-wrap:anywhere}
main{max-width:1080px;margin:14px auto;padding:0 20px max(24px,env(safe-area-inset-bottom))}.tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin-bottom:14px}.tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:48px;border:1px solid var(--line);border-radius:9px;background:white;color:#274860;padding:7px 3px;font-size:14px;line-height:1.25}.tabs button small{font-size:11px;color:inherit}.tabs button.active{background:var(--costco-red);border-color:var(--costco-red);color:white}.panel{border:1px solid var(--line);border-radius:12px;padding:16px;min-width:0}h2{margin:0 0 12px;font-size:17px;line-height:1.4}h2 small{font-size:12px;font-weight:400;color:var(--muted);margin-left:5px}h3{font-size:14px}small,.muted{color:var(--muted)}
input,textarea,select{font-size:16px;max-width:100%;min-width:0;border:1px solid #c5ced7;border-radius:8px;padding:10px;background:#fff;color:inherit;min-height:44px}textarea{width:100%;resize:vertical;min-height:80px}input[type=checkbox]{min-height:0;accent-color:var(--costco-red)}input[type=date]{appearance:auto}input[type=search]{appearance:auto;width:100%}.primary,.secondary{min-height:44px;border-radius:8px;padding:9px 13px;font-size:14px;font-weight:600;border:1px solid transparent}.primary{background:var(--costco-red);color:white}.secondary{background:var(--soft);color:var(--costco-blue);border-color:var(--line)}.danger{color:#a12535}.row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0}.row input[name=sku]{flex:1 1 190px;width:0}.row select{flex:0 1 116px}.row input[name=day]{flex:0 0 145px;width:145px}.row input[name=note]{flex:1 1 200px}.row .primary{flex:0 0 auto}.row label{display:flex;gap:6px;align-items:center}
.upload-box{min-width:0}.upload-box>label,.file-search>label{display:block;font-size:14px;line-height:1.5}.upload-box>label:first-child{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.file-picker{position:relative;display:inline-flex;align-items:center;justify-content:center;background:var(--soft);border:1px solid var(--line);border-radius:8px;padding:7px 12px;min-height:44px;font-size:14px;color:var(--costco-blue);font-weight:600;overflow:hidden;cursor:pointer;flex-shrink:0}.file-picker input{position:absolute;inset:0;opacity:0;width:100%;height:100%;padding:0;min-width:0;cursor:pointer}.file-picker:focus-within{outline:2px solid var(--costco-blue);outline-offset:2px}[data-file-search]{display:block;margin-top:5px;font-size:16px;width:100%;min-height:44px}.upload-state{white-space:pre-line;overflow-wrap:anywhere;color:var(--muted);font-size:12px;line-height:1.5;margin:6px 0 10px}.upload-state.error,.data-warning{color:#a12535}.import-info{margin:5px 0 12px;border-bottom:1px solid var(--line);padding-bottom:6px}.import-info summary{font-size:13px;color:var(--muted);min-height:36px;display:list-item;align-content:center;cursor:pointer}.upload-state:empty{display:none}
.lookup-meta{font-size:12px;color:var(--muted);margin:10px 0 7px;line-height:1.5}.lookup-empty,.empty{font-size:14px;color:var(--muted);padding:14px 0;margin:0;line-height:1.6}.lookup-card{border:1px solid var(--line);border-radius:10px;padding:12px;margin:8px 0;min-width:0;overflow-wrap:anywhere}.lookup-card>strong{display:block;font-size:15px;line-height:1.5}.lookup-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px 12px;margin-top:9px;font-size:13px;line-height:1.5}.lookup-grid b{font-variant-numeric:tabular-nums}.lookup-card p{font-size:13px;line-height:1.5;margin:8px 0 0}.stock-value{color:var(--costco-red)}.sales-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:10px 0 0;border-radius:7px;background:var(--soft);padding:8px}.sales-preview span{font-size:12px;color:var(--muted);min-width:0;line-height:1.4}.sales-preview b{display:block;color:#172b40;font-size:15px;font-variant-numeric:tabular-nums;margin-top:2px;overflow-wrap:anywhere}.sales-detail{margin-top:8px;border-top:1px solid var(--line);padding-top:3px}.sales-detail summary,.request-details summary{font-size:13px;color:var(--costco-blue);cursor:pointer;min-height:40px;align-content:center}.sales-metrics{font-size:13px;line-height:1.5;margin:4px 0 8px}.query-metrics{width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px;min-width:0}.query-metrics th,.query-metrics td{padding:7px 4px;border-bottom:1px solid var(--line);line-height:1.45;overflow-wrap:anywhere}.query-metrics th{background:var(--soft);color:var(--muted);font-weight:500}.query-metrics th:first-child{width:36%}.query-metrics td:not(:first-child){font-weight:600;font-variant-numeric:tabular-nums}.query-metrics th:not(:first-child),.query-metrics td:not(:first-child){text-align:right}.source-summary{border-top:1px solid var(--line);margin-top:10px;padding-top:8px;color:var(--muted);font-size:12px;line-height:1.5;overflow-wrap:anywhere}.source-dates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:6px}.source-dates b{display:block;font-weight:500}.new-product{display:inline-block;font-size:12px;border:1px solid #dbe6e1;border-radius:5px;padding:3px 6px;color:#256347}.order-lines{white-space:pre-line}.search-more{display:block;width:100%;min-height:44px;margin-top:10px}
.shortage-match{border:1px solid var(--line);border-radius:8px;padding:10px;background:var(--soft);margin:9px 0;font-size:14px;line-height:1.5;overflow-wrap:anywhere}.shortage-match p{font-size:13px;margin:6px 0}.shortage-match .lookup-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:6px}.shortage-wide{display:none}.shortage-compact{display:block}.shortage-entry{padding:10px 0;border-bottom:1px solid var(--line);min-width:0;overflow-wrap:anywhere;font-size:13px;line-height:1.5}.shortage-entry:last-child{border-bottom:0}.shortage-top{display:flex;align-items:center;gap:6px 10px;flex-wrap:wrap;font-size:12px;color:var(--muted)}.shortage-top strong{font-size:14px;color:var(--costco-blue)}.shortage-name{font-size:14px;font-weight:600;margin:4px 0}.shortage-metrics{display:flex;flex-wrap:wrap;gap:5px 16px;font-size:13px}.shortage-product-status,.shortage-note{font-size:12px;line-height:1.5;margin-top:5px}.shortage-note{color:#3f5365}.shortage-actions{display:flex;gap:8px;justify-content:space-between;align-items:center;margin-top:8px}.shortage-actions select{flex:1;max-width:170px}.shortage-delete{min-width:60px}.shortage-history{border-top:1px solid var(--line);margin-top:10px;padding-top:5px}.shortage-history>summary{font-size:13px;color:var(--costco-blue);min-height:40px;align-content:center;cursor:pointer}.shortage-history .shortage-entry{background:var(--soft);padding:10px;border-radius:8px;margin-top:6px}.shortage-count{font-size:12px;color:var(--muted)}.shortage-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:16px 0 8px}.shortage-toolbar label{display:flex;align-items:center;gap:6px;font-size:14px;flex:1}.shortage-toolbar select{flex:1}.shortage-feedback{font-size:13px;color:var(--muted);margin:5px 0 12px}.shortage-feedback:empty{display:none}.request-details{margin-top:8px;border-top:1px solid var(--line);padding-top:3px}
table{width:100%;border-collapse:collapse}.scroll{overflow:auto}.scroll table{min-width:650px;font-size:14px}.scroll th,.scroll td{padding:10px;border-bottom:1px solid var(--line);text-align:left}.scroll th{background:var(--soft)}
@media(min-width:900px){[data-search-results],[data-request-results],[data-batch-results]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}[data-search-results]>.lookup-meta,[data-search-results]>.lookup-empty,[data-search-results]>.search-more,[data-request-results]>.search-more{grid-column:1/-1}.lookup-card,.batch-result{margin:0}}
@media(max-width:700px){header{padding:calc(env(safe-area-inset-top,0px) + 9px) max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));gap:8px;flex-wrap:nowrap}.header-brand{gap:6px;flex:0 0 auto}.brand-logo{width:112px;height:41px}.brand-logo img{width:210px;height:210px;left:-30px;top:-79px}#offline-status{font-size:11px;max-width:56px}.local-only-notice{flex:1 1 auto;max-width:none;min-width:0}.local-only-notice>summary{font-size:12px;justify-content:flex-end}.local-only-notice>p{font-size:11px;text-align:left}main{margin:10px auto 0;padding:0 max(10px,env(safe-area-inset-left)) max(18px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-right))}.tabs{gap:4px;margin-bottom:10px}.tabs button{font-size:13px}.tabs button small{font-size:10px}.panel{padding:11px;border-radius:10px}h2{font-size:16px;margin-bottom:10px}.lookup-card{padding:10px}.lookup-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px}.lookup-card>strong{font-size:14px}.row input[name=sku]{flex:1 1 0}.row select{flex:0 0 112px}.row input[name=note]{flex:1 1 calc(100% - 155px);width:0}.row .primary{width:100%;flex:1 1 100%}.source-dates{font-size:11px}.query-metrics{font-size:12px}.shortage-toolbar{gap:7px}.shortage-toolbar label{min-width:140px}.shortage-toolbar button{flex:0 0 auto}.shortage-department{margin-top:10px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
/* Denser mobile view: reserve height for the result instead of repeated headings. */
.upload-tools{margin:0 0 5px}.upload-tools>summary{min-height:36px;align-content:center;cursor:pointer;font-size:13px;color:var(--costco-blue)}.upload-tools>label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px;margin:6px 0}.source-summary>summary{cursor:pointer;min-height:28px;align-content:center;color:var(--muted);font-size:12px}.source-summary>div{margin-top:5px}
@media(max-width:700px){
.panel>h2{display:none}.panel{padding:12px}main{margin-top:10px}.tabs{margin-bottom:10px}.tabs button{min-height:46px}
.lookup-card{padding:12px;margin:9px 0;border-radius:10px}.lookup-card>strong{font-size:14px;line-height:1.55}.lookup-grid{gap:9px 14px;margin-top:12px;font-size:13px;line-height:1.55}.lookup-card p{font-size:13px;line-height:1.55;margin-top:10px}.lookup-card .future-order{margin:10px 0 12px}
.sales-detail{margin-top:12px;padding-top:4px}.sales-detail summary,.request-details summary{min-height:42px;font-size:13px}.query-metrics{font-size:13px}.query-metrics th,.query-metrics td{padding:8px 4px;line-height:1.5}.query-metrics th:first-child{width:39%}.source-summary{margin-top:12px;padding-top:8px;line-height:1.5}.source-summary>summary{min-height:36px}
.shortage-entry{padding:11px 0}.shortage-match{padding:11px;line-height:1.5}.shortage-metrics{gap:7px 14px}.shortage-actions{margin-top:10px}
}
.sales-open .sales-preview{display:none}


.future-order{min-width:0;white-space:pre-line;overflow-wrap:anywhere}.future-order b{font-weight:600;color:var(--costco-red)}.today-order b{font-weight:600}.today-order .order-source-note{display:block;margin-top:2px;font-size:11.5px;color:var(--muted,#6b7280);font-weight:400}

[data-file-search]{min-height:40px;padding:7px 9px;margin-top:4px;font-size:16px}

/* Align the Daily Sales picker with its source heading. */
.upload-tools-row{position:relative;min-width:0;margin-bottom:5px}.upload-tools-row>.upload-tools{margin:0}.upload-tools-row>.upload-tools>summary{min-height:44px;padding-right:94px;line-height:1.4}.upload-tools-row>.file-picker{position:absolute;right:0;top:0;margin:0;min-height:44px;padding:7px 10px}.upload-tools-row .import-info{margin-top:5px}

/* A lighter picker beside the upload heading, with a full touch target. */
.upload-tools-row>.file-picker{min-height:44px;padding:0 0 0 8px;border:0;border-radius:6px;background:transparent;font-size:13px;font-weight:500;overflow:visible}
.upload-tools-row>.file-picker>span{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:3px 6px;line-height:1.4;border:1px solid #e5eaf0;border-radius:5px;background:#f8fafc;color:var(--costco-blue)}
.upload-tools-row>.file-picker:active>span{background:#edf3f8;border-color:#cbd9e6}
.upload-tools-row>.upload-tools>summary{padding-right:80px}

.replenishment-preview{margin-top:10px;font-size:13px;line-height:1.5}.replenishment-preview>div{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-top:5px}.replenishment-preview b{color:var(--costco-blue);text-align:right;font-variant-numeric:tabular-nums}.lookup-card .replenishment-preview p{font-size:12px;color:var(--muted);margin-top:5px}

.coverage-basis{color:var(--muted);font-size:12px;margin-top:4px}.coverage-basis>summary{cursor:pointer;min-height:28px;align-content:center}

@supports (content-visibility:auto){.lookup-card,.request-card,.batch-result{content-visibility:auto;contain-intrinsic-size:auto 320px}}

/* Reduce the upload header and adjacent collapsed detail spacing. */
.upload-tools-row{margin-bottom:3px}
.upload-tools-row>.upload-tools>summary{min-height:32px}
.upload-tools-row>.file-picker{min-height:32px;height:32px}
.lookup-card .sales-detail{margin-top:4px;padding-top:0}
.lookup-card .sales-detail>summary{min-height:32px}
.coverage-basis{margin-top:2px}
@media(max-width:700px){.panel:has(>.upload-box){padding-top:7px}.lookup-card .coverage-basis>summary{min-height:26px}}

.lookup-grid .order-value-highlight{color:var(--costco-red)}

.lookup-grid .department-value{color:var(--costco-red)}

.quick-shortage{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;margin-top:8px;padding-top:8px;border-top:1px solid var(--border,#e2e5e9)}
.quick-shortage-button{min-height:36px;padding:7px 12px;color:var(--costco-blue,#005da8);font-weight:700;font-size:13px;touch-action:manipulation}
.quick-shortage-button:disabled{color:#257b42;background:#f0f8f2;opacity:1;cursor:default}
.quick-shortage-feedback{color:var(--muted,#64748b);font-size:12px}

/* ===== workbench-features.css ===== */
.tabs button{min-width:0}.batch-box,.rule-settings{border-top:1px solid #dde6ee;margin-top:12px;padding-top:10px;font-size:14px;line-height:1.5}.batch-box summary,.rule-settings summary{cursor:pointer;color:#005daa;font-weight:600;min-height:36px}.batch-box label,.rule-settings>label{display:block;margin:8px 0}.batch-box textarea,.rule-settings textarea{font-size:16px;min-height:76px;padding:8px}.feature-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0;font-size:14px}.feature-actions button,.feature-actions select{min-height:40px;font-size:14px}.feature-note,[data-request-status],[data-batch-status]{font-size:13px;line-height:1.5;margin:8px 0;white-space:pre-line}.data-warning{color:#a13c24;font-size:13px}.department-checks{display:flex;flex-wrap:wrap;gap:8px}.department-checks label{display:flex;align-items:center;gap:4px;min-height:36px;font-size:14px}.department-checks input{width:18px;height:18px}.rule-settings fieldset{border:1px solid #dde6ee;border-radius:8px;padding:8px}.rule-settings input[type=number]{display:block;font-size:16px;width:120px;margin-top:4px}.batch-result{border:1px solid #dde6ee;border-radius:9px;padding:10px;margin:8px 0;font-size:14px;line-height:1.45;overflow-wrap:anywhere}.batch-result strong{display:block;font-size:14px}.batch-result p{margin:6px 0}.batch-result small{font-size:12px}.compact-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 12px;margin-top:8px;font-size:13px}.order-lines{white-space:pre-line}.replenish-quantity{color:#005daa;font-weight:700}button:disabled{opacity:.55;cursor:default}@media(max-width:700px){.compact-values{grid-template-columns:repeat(2,minmax(0,1fr))}.tabs{gap:4px}.tabs button{font-size:13px}.tabs button small{font-size:10px}.batch-box{flex:0 0 auto}.rule-settings{margin-top:6px}.feature-note{font-size:12px}.feature-actions{margin:8px 0}.batch-result{margin:6px 0}} 

.request-search-label{display:block;font-size:14px;line-height:1.5;margin:4px 0 8px}.request-search-label input{display:block;width:100%;min-height:40px;font-size:16px;margin-top:4px;padding:8px 10px}[data-request-match]{font-size:12px;color:#627789;overflow-wrap:anywhere}

.status-upload{flex:0 0 auto!important;padding:10px;border:1px solid #dde6ee;margin-bottom:8px}.status-upload>label{display:flex;align-items:center;justify-content:space-between;gap:8px}.status-upload .file-picker{margin:0}.status-upload .upload-state{font-size:12px;line-height:1.4}.status-upload .error{color:#a13c24}

.shortage-choice{display:block;width:100%;text-align:left;min-height:44px;padding:9px 10px;margin:6px 0;white-space:normal;overflow-wrap:anywhere}.shortage-choice strong{display:block;font-size:13px;line-height:1.4}.shortage-choice span{display:block;font-size:12px;line-height:1.4;margin-top:3px}

.shortage-department{margin-top:14px;border:1px solid #dce6ed;border-radius:10px;overflow:hidden}.shortage-department-heading{display:flex;justify-content:space-between;align-items:center;margin:0;padding:9px 10px;background:#f1f6fb;border-bottom:1px solid #dce6ed;color:#005daa;font-size:14px;line-height:1.4}.shortage-department-heading span:last-child{color:#627789;font-size:12px;font-weight:400}.shortage-department .shortage-compact{padding:0 10px}.shortage-department .shortage-entry:first-child{border-top:0}

.request-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.request-filters label{display:flex;align-items:center;gap:6px;min-width:0}.request-filters select{flex:1;min-width:0;width:100%;font-size:16px;padding:6px}
/* Phase two: compact working surfaces with readable controls. */
.batch-box,.rule-settings{font-size:14px;margin-top:12px;padding-top:10px;border-color:var(--line)}.batch-box summary,.rule-settings summary,.import-settings>summary,.source-summary>summary{min-height:40px;align-content:center;cursor:pointer;color:var(--costco-blue);font-size:13px}.feature-actions button,.feature-actions select{min-height:44px}.feature-actions{gap:8px}.feature-note{font-size:13px;line-height:1.6}.status-upload{border:0;padding:8px 0;margin:0}.status-upload .upload-state{font-size:12px}.import-settings{border-bottom:1px solid var(--line);padding-bottom:5px;margin-bottom:8px}.import-settings>summary{font-weight:600}.department-checks label{min-height:44px}.rule-settings fieldset{border-color:var(--line)}.request-filters{margin-top:12px}.request-filters label{display:block;font-size:13px;color:var(--muted)}.request-filters select{display:block;margin-top:4px;width:100%;min-height:44px;padding:8px}.request-search-label input{min-height:44px}.compact-values{font-size:13px;line-height:1.5;gap:6px 10px}.batch-result{border-color:var(--line);padding:11px;min-width:0}.batch-result strong{font-size:14px;line-height:1.5}.request-card-top{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px}.request-quantity{white-space:nowrap;font-size:15px;font-weight:700;color:var(--costco-red);background:#fff2f4;border-radius:6px;padding:5px 8px}.request-kind-review .request-quantity{color:#7b571d;background:#faf5e9;font-size:13px}.request-kind-excluded .request-quantity{color:var(--muted);background:var(--soft);font-size:13px}.request-essential{display:flex;flex-wrap:wrap;gap:5px 14px;font-size:13px;line-height:1.5;margin-top:8px}.request-essential b{font-variant-numeric:tabular-nums}.request-reason{font-size:13px;color:var(--muted)}.request-kind-candidate{border-left:3px solid var(--costco-red)}.request-kind-review{border-left:3px solid #c7a264}.request-details .compact-values{margin:4px 0 8px}.shortage-department-heading{background:var(--soft);color:#334b62;border-color:var(--line);padding:10px;font-size:14px}.shortage-department{border-color:var(--line)}.shortage-product{border-bottom:1px solid var(--line);padding:2px 0 10px;margin-bottom:5px}.shortage-product:last-child{border-bottom:0;margin-bottom:0}.shortage-choice{min-height:48px}.shortage-choice strong{font-size:14px}.source-summary>div{margin-top:5px}
@media(max-width:700px){.batch-result{margin:7px 0;padding:10px}.request-card-top{gap:8px}.request-essential{gap:5px 10px}.feature-note{font-size:13px}.request-quantity{font-size:14px}.shortage-department-heading span:last-child{font-size:12px}.feature-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.feature-actions button{width:100%}.request-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.shortage-product-status{font-size:12px}.department-checks{gap:4px 10px}}
@media(max-width:700px){.batch-box,.rule-settings{margin-top:6px;padding-top:5px}.batch-box summary,.rule-settings summary,.import-settings>summary{min-height:30px;font-size:12px}.import-settings{padding-bottom:2px;margin-bottom:4px}.feature-actions{gap:6px;margin:6px 0}.feature-actions button{min-height:42px;padding:8px}.request-filters{margin-top:6px}.request-filters label{font-size:12px}.request-filters select{min-height:42px;margin-top:2px;padding:7px}.request-search-label{font-size:12px;line-height:1.3;margin:3px 0 5px}.request-search-label input{min-height:42px;margin-top:3px}.feature-note,[data-request-status],[data-batch-status]{font-size:12px;line-height:1.35;margin:5px 0}.batch-result{padding:8px;margin:5px 0;font-size:13px;line-height:1.35}.batch-result strong{font-size:13px;line-height:1.35}.batch-result p{margin:4px 0}.request-essential{font-size:12px;gap:3px 9px;margin-top:5px;line-height:1.35}.request-quantity{font-size:13px;padding:4px 6px}.request-reason{font-size:12px}.compact-values{font-size:12px;gap:4px 8px;line-height:1.35;margin-top:5px}.request-details{margin-top:5px;padding-top:1px}.shortage-department{margin-top:7px}.shortage-department-heading{padding:7px 9px;font-size:13px}.shortage-department .shortage-compact{padding:0 8px}.shortage-product{padding-bottom:6px;margin-bottom:3px}}

/* Smaller controls and fewer stacked rows; product text keeps its reading space. */
@media(max-width:700px){
header{padding-top:calc(env(safe-area-inset-top,0px) + 6px);padding-bottom:6px}.brand-logo{width:142px;height:43px}.brand-logo img{width:199px;height:199px;left:-28px;top:-75px}
main{margin-top:8px;padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}.tabs{margin-bottom:8px}.tabs button{min-height:40px;padding:4px 2px;gap:2px}.panel{padding:10px}
input:not([type=checkbox]):not([type=file]),select,[data-file-search],.request-search-label input{min-height:36px;padding:5px 8px;border-radius:6px;font-size:16px}
.primary,.secondary,.file-picker,.feature-actions button,.row input,.row select,.shortage-actions select,.shortage-actions button,.shortage-toolbar select{min-height:36px;padding:5px 9px;border-radius:6px}
.row{margin:5px 0;gap:6px}.row select{flex-basis:100px}.row input[name=sku]{flex:1 1 0}
#shortagesForm .shortage-save-row{display:grid;grid-template-columns:minmax(0,1fr) 82px;gap:6px;align-items:center}
#shortagesForm .shortage-save-row input,#shortagesForm .shortage-save-row button{width:100%;min-width:0;max-width:100%;margin:0}
#shortagesForm .shortage-save-row input[name=day]{grid-column:1;grid-row:1;height:36px;min-height:36px;overflow:hidden;line-height:24px;-webkit-appearance:none;appearance:none;text-align:left}
#shortagesForm .shortage-save-row input[name=day]::-webkit-date-and-time-value{text-align:left;min-width:0;margin:0}
#shortagesForm .shortage-save-row input[name=note]{grid-column:1/-1;grid-row:2;height:36px}
#shortagesForm .shortage-save-row .primary{grid-column:2;grid-row:1;height:36px;font-size:12px;padding:5px 3px}
.shortage-match.is-hint{border:0;background:transparent;padding:2px 0;margin:4px 0;color:var(--muted);font-size:12px;line-height:1.4}
.shortage-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:6px;margin:8px 0 6px;align-items:center}
.shortage-toolbar label{min-width:0;gap:4px;font-size:12px}.shortage-toolbar select{min-width:0;width:100%;font-size:14px;padding:5px 4px}
.shortage-toolbar button{white-space:nowrap;font-size:12px;padding:5px 7px}
.request-search-label{margin:5px 0;font-size:12px}.request-search-label input{margin-top:3px}
.shortage-actions select{max-width:130px}.shortage-delete{min-width:48px;font-size:13px}.shortage-actions{margin-top:7px}
.file-picker{font-size:13px}.request-filters select{min-height:36px;padding:5px 8px}.upload-tools>summary{min-height:32px}
}
@media(max-width:350px){#shortagesForm .shortage-save-row{grid-template-columns:minmax(0,1fr) 76px}.shortage-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}.shortage-toolbar button{justify-self:start}}

.shortage-department>summary{list-style:none;cursor:pointer;min-height:38px;border-bottom:0;gap:6px}.shortage-department>summary::-webkit-details-marker{display:none}.shortage-department>summary::before{content:'▶';color:var(--costco-blue);font-size:11px;flex:0 0 auto}.shortage-department[open]>summary::before{content:'▼'}.shortage-department>summary span:first-of-type{margin-right:auto}.shortage-department[open]>summary{border-bottom:1px solid var(--line)}

/* Place each record's controls in its metadata row. */
.shortage-top{gap:4px 8px}.shortage-top .shortage-actions{display:flex;margin:0 0 0 auto;gap:5px;flex:0 0 auto}.shortage-top .shortage-actions select{width:90px;max-width:90px;flex:none;min-height:30px;height:30px;font-size:14px;padding:3px 5px;border-radius:5px}.shortage-top .shortage-delete{min-width:36px;min-height:30px;height:30px;padding:3px 6px;font-size:12px;border-radius:5px}
@media(max-width:700px){.shortage-entry{padding:8px 0;line-height:1.45}.shortage-name{margin:5px 0;font-size:13px;line-height:1.45}.shortage-top{font-size:11px;gap:4px 6px}.shortage-top strong{font-size:13px}.shortage-metrics{gap:4px 10px;font-size:12px;line-height:1.45}.shortage-product-status,.shortage-note{margin-top:4px;line-height:1.45}.shortage-product{padding-bottom:3px;margin-bottom:2px}}

.status-upload.upload-tools-row{padding:0;margin:0 0 8px;border:0}

/* Consistent reading rhythm and touch controls for the mobile workbench. */
.lookup-card>strong,.batch-result strong{letter-spacing:.01em}
.lookup-grid>span,.compact-values>span{min-width:0;overflow-wrap:anywhere}
.sales-preview b,.request-quantity,.request-essential b{font-variant-numeric:tabular-nums}
.replenishment-preview{border-top:1px solid var(--line);padding-top:9px;margin-top:12px}
.replenishment-preview>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:baseline}
.replenishment-preview b{min-width:0;overflow-wrap:anywhere}
@media(min-width:900px){
  .batch-result{margin:0}
  [data-batch-results]>.search-more{grid-column:1/-1}
}
@media(max-width:700px){
  .tabs button{min-height:44px}
  .upload-tools-row{margin-bottom:8px}
  .upload-tools-row>.upload-tools>summary{font-weight:600}
  input:not([type=checkbox]):not([type=file]),select,[data-file-search],.request-search-label input{min-height:44px;padding:8px 10px;border-radius:8px}
  .primary,.secondary,.feature-actions button,.row input,.row select,.shortage-actions select,.shortage-actions button,.shortage-toolbar select{min-height:44px;padding:8px 10px;border-radius:8px}
  .upload-box>label,.file-search>label,.request-search-label{font-size:13px;line-height:1.5}
  .lookup-card,.batch-result{padding:12px;margin:8px 0;border-radius:10px}
  .lookup-card>strong,.batch-result strong{font-size:14px;line-height:1.5}
  .lookup-grid{gap:8px 12px;margin-top:10px}
  .sales-preview{padding:9px;gap:8px;border-radius:8px}
  .sales-preview b{font-size:16px}
  .compact-values{font-size:13px;line-height:1.5;gap:6px 10px}
  .request-essential{font-size:13px;line-height:1.5;gap:5px 12px;margin-top:8px}
  .request-reason,.feature-note{font-size:13px;line-height:1.5}
  .batch-box>summary,.rule-settings>summary,.sales-detail>summary,.request-details>summary{min-height:44px;align-content:center;font-size:13px}
  .coverage-basis>summary,.shortage-department>summary{min-height:44px;align-content:center}
  #shortagesForm .shortage-save-row input[name=day],#shortagesForm .shortage-save-row input[name=note],#shortagesForm .shortage-save-row .primary{height:44px;min-height:44px}
  #shortagesForm .shortage-save-row input[name=day]{line-height:24px}
  .shortage-top .shortage-actions select,.shortage-top .shortage-delete{height:44px;min-height:44px}
  .shortage-top .shortage-delete{min-width:44px}
  .shortage-toolbar select{font-size:14px;padding:8px 4px}
  .shortage-toolbar button{font-size:12px;padding:8px 7px}
  .request-filters select{min-height:44px;padding:8px 10px}
  .department-checks label:focus-within{outline:2px solid var(--costco-blue);outline-offset:2px;border-radius:4px}
}

@media(max-width:700px){.upload-tools-row{margin-bottom:3px}.lookup-card .sales-detail{margin-top:4px;padding-top:0}.lookup-card .sales-detail>summary{min-height:32px}.lookup-card .coverage-basis>summary{min-height:26px}}

/* Compact expandable explanation in inventory lookup cards. */
.replenishment-explanation{margin-top:5px;color:var(--muted);font-size:12px}
.replenishment-explanation>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:32px;cursor:pointer;list-style:none;color:var(--costco-blue);font-weight:600}
.replenishment-explanation>summary::-webkit-details-marker{display:none}
.replenishment-explanation>summary::marker{content:''}
.replenishment-explanation>summary:focus-visible{outline:2px solid var(--costco-blue);outline-offset:2px;border-radius:4px}
.explanation-arrow{flex:0 0 16px}
.replenishment-explanation[open]>summary .explanation-arrow{transform:rotate(180deg)}

.product-status-red{color:#c8102e}

.product-status-green{color:#15803d}

.arrival-status{font-size:12px;line-height:1.5;margin-top:8px}.arrival-warning{color:#b42318}.arrival-safe{color:#15803d}.calculation-basis,.arrival-details{margin-top:6px;border-top:1px solid var(--line);padding-top:3px;font-size:12px;line-height:1.5}.calculation-basis summary,.arrival-details summary{cursor:pointer;color:var(--costco-blue);min-height:34px;align-content:center}.calculation-basis p,.arrival-details p{margin:6px 0;overflow-wrap:anywhere}.replenishment-preview>.arrival-status,.replenishment-preview>.calculation-basis,.replenishment-preview>.arrival-details{grid-column:1/-1}

.replenishment-preview>.arrival-status{display:block}

/* Sales · Watch · Shortage — three equal actions above replenishment. */
.lookup-card .sales-action-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:start;column-gap:8px;border-top:1px solid var(--line);margin-top:8px;padding-top:4px}
.lookup-card .sales-action-row>.sales-detail{grid-area:1/1/2/4;margin:0;padding:0;border:0;min-width:0}
.lookup-card .sales-action-row>.sales-detail>summary{padding-right:220px;min-height:36px;align-content:center}
.sales-action-row>.quick-watch,.sales-action-row>.quick-shortage{display:contents}
.sales-action-row .quick-watch-button{grid-area:1/2/2/3;align-self:start;z-index:1;margin:0;min-height:36px;padding:6px 9px;font-size:12px;white-space:nowrap;color:var(--costco-blue,#005da8);font-weight:700;touch-action:manipulation}
.sales-action-row .quick-shortage-button{grid-area:1/3/2/4;align-self:start;z-index:1;margin:0;min-height:36px;padding:6px 9px;font-size:12px;white-space:nowrap}
.sales-action-row .quick-watch-feedback,.sales-action-row .quick-shortage-feedback{grid-column:1/-1;margin-top:4px;color:var(--muted,#64748b);font-size:12px}
.sales-action-row .quick-watch-feedback:empty,.sales-action-row .quick-shortage-feedback:empty{display:none}

.data-date-bar{margin:5px 0 9px;font-size:11px;color:#475569}.data-date-bar summary{display:flex;align-items:center;gap:3px;flex-wrap:wrap;cursor:pointer;font-weight:500}.data-date-bar summary span{white-space:nowrap}.data-date-bar summary i{font-style:normal;color:#cbd5e1}.data-date-bar summary::after{content:'⌄';margin-left:auto}.data-date-bar[open] summary::after{content:'⌃'}.date-stale{color:#b45309}.delivery-countdown{display:block;font-size:11px;margin-top:2px;color:#b91c1c}.past-orders{margin-top:10px}.past-orders>summary{font-weight:600;color:#b45309;cursor:pointer;padding:7px 0}

.followup-age{font-size:11px;color:#b45309;margin:3px 0;font-weight:600}@supports(content-visibility:auto){.shortage-product{content-visibility:auto;contain-intrinsic-size:auto 170px}}

.upload-tools-row>.file-picker{min-height:36px;height:36px;font-size:14px}.upload-tools-row>.file-picker>span{min-height:32px;padding:4px 8px}.upload-tools-row>.upload-tools>summary{padding-right:104px}

/* Keep every mobile panel within the usable screen, including safe areas. */
@media(max-width:700px){
  html,body{width:100%;min-width:0}
  header,main,.panel{width:100%;min-width:0;max-width:100%}
  .panel :where(div,article,details,summary,form,fieldset,label,p,strong,span){min-width:0}
  .panel :where(article,details,form,fieldset),.scroll{max-width:100%}
  .panel :where(p,strong,summary,label),.request-essential,.shortage-metrics,.feature-note{overflow-wrap:anywhere}
  .tabs button,.tabs button small,.panel button{white-space:normal;overflow-wrap:anywhere;max-width:100%}
  .lookup-grid>span,.compact-values>span,.sales-preview>span{min-width:0;overflow-wrap:anywhere}
  .data-date-bar summary span{white-space:normal;overflow-wrap:anywhere;max-width:100%}
  .data-date-bar summary::after{flex:0 0 auto}
  .future-order,.order-lines{max-width:100%;overflow-wrap:anywhere}
  .request-card-top{grid-template-columns:minmax(0,1fr) minmax(0,auto)}
  .request-quantity{max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:right}
  .feature-actions>*{min-width:0;max-width:100%}
  .rule-settings fieldset{min-inline-size:0;margin-inline:0}
  .row label{flex-wrap:wrap;max-width:100%}
  .row input[name=sku]{width:100%;flex:1 1 140px}
  .row select{max-width:100%;flex:0 1 112px}
  .shortage-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}
  .shortage-toolbar button{grid-column:1/-1;justify-self:start;white-space:normal}
  .shortage-actions{flex-wrap:wrap;max-width:100%}
  .shortage-top .shortage-actions{flex:0 1 auto;max-width:100%;flex-wrap:wrap}
  .lookup-card .sales-action-row{grid-template-columns:minmax(0,1fr) minmax(0,88px) minmax(0,88px)}
  .lookup-card .sales-action-row>.sales-detail>summary{padding-right:184px}
  .sales-action-row .quick-watch-button,.sales-action-row .quick-shortage-button{width:100%;white-space:normal;overflow-wrap:anywhere}
  .upload-tools-row>.upload-tools>summary{padding-right:100px;overflow-wrap:anywhere}
  .upload-tools-row>.file-picker{max-width:96px}
  .scroll table{min-width:0;table-layout:fixed;font-size:12px}
  .scroll th,.scroll td{padding:6px 3px;overflow-wrap:anywhere}
}
@media(max-width:360px){
  .lookup-grid,.compact-values{column-gap:8px}
  .request-card-top{grid-template-columns:minmax(0,1fr)}
  .request-quantity{justify-self:start;text-align:left}
  .lookup-card,.batch-result{padding:10px}
}

.stock-export-preview{width:min(720px,calc(100% - 20px));max-width:calc(100% - 20px);max-height:calc(100dvh - 24px);padding:14px;border:1px solid var(--line);border-radius:12px;color:#172b40;background:#fff;overflow:auto;overscroll-behavior:contain}
.stock-export-preview::backdrop{background:#172b4070}.export-preview-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.export-preview-head h2{margin:0}.export-preview-scope,.export-preview-warning{font-size:12px;line-height:1.5;overflow-wrap:anywhere}.export-preview-warning:empty{display:none}.export-preview-warning{color:#b45309}.export-preview-item{min-width:0;border-top:1px solid var(--line);padding:10px 0;overflow-wrap:anywhere;font-size:13px;line-height:1.5}.export-preview-item>strong{display:block}.export-preview-item p{margin:6px 0}.export-preview-item summary{min-height:32px;align-content:center;color:var(--costco-blue);cursor:pointer}.export-preview-footer{position:sticky;bottom:-14px;background:#fff;border-top:1px solid var(--line);display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;padding:10px 0}.export-preview-footer button{white-space:normal}.export-preview-footer [hidden]{display:none}

/* Scale the complete mobile workbench consistently, including controls. */
@media(max-width:700px){

 header{padding-top:calc(env(safe-area-inset-top,0px) + 5px);padding-bottom:5px}
 main{margin-top:7px}
 .tabs{margin-bottom:7px}
 .tabs button{min-height:40px;padding:4px 3px}
 .panel,.panel:has(>.upload-box){padding:9px}
 .data-date-bar{margin:0 0 5px}
 .data-date-bar summary{min-height:28px}
 input:not([type=checkbox]):not([type=file]),select,[data-file-search],.request-search-label input{font-size:16px;min-height:36px;padding:5px 8px;line-height:24px}
 [data-file-search],.request-search-label input{height:36px}
 .lookup-meta{margin:6px 0 4px}
 .lookup-card,.batch-result{padding:10px;margin:6px 0}
 .lookup-grid{gap:6px 10px;margin-top:8px}
 .lookup-card p{margin-top:7px}
 .lookup-card .future-order{margin:7px 0}
 .sales-preview{padding:7px;margin-top:7px}
 .lookup-card .sales-action-row{margin-top:6px}
 .lookup-card .sales-action-row>.sales-detail>summary{min-height:36px}
 .sales-action-row .quick-watch-button,.sales-action-row .quick-shortage-button{min-height:36px;padding:5px 8px}
 .replenishment-preview{margin-top:8px;padding-top:6px}
 .coverage-basis>summary,.calculation-basis>summary,.arrival-details>summary,.batch-box>summary,.rule-settings>summary{min-height:32px}
 .batch-box,.rule-settings{margin-top:7px;padding-top:5px}
}

/* Remove inherited source-footer spacing from the date header. */
.source-summary.data-date-bar{border-top:0;padding-top:0;margin:0 0 2px;line-height:1.35}
.source-summary.data-date-bar>summary{min-height:24px;padding:0;line-height:1.35}
.source-summary.data-date-bar[open]>div{margin:3px 0 6px}
.source-summary.data-date-bar+.upload-box>.upload-tools-row{margin-top:0}
@media(max-width:700px){
 .source-summary.data-date-bar{padding-top:0;margin:0 0 2px}
 .source-summary.data-date-bar>summary{min-height:24px}
}

/* Tighter date-to-upload header spacing. */
.source-summary.data-date-bar{margin-bottom:0}
.source-summary.data-date-bar>summary{min-height:20px;line-height:1.2}
.source-summary.data-date-bar+.upload-box>.upload-tools-row{margin-top:0;margin-bottom:2px}
.source-summary.data-date-bar+.upload-box>.upload-tools-row>.upload-tools>summary{min-height:30px;line-height:1.25;padding-top:0;padding-bottom:0}
.source-summary.data-date-bar+.upload-box>.upload-tools-row>.file-picker{min-height:30px;height:30px}
.source-summary.data-date-bar+.upload-box>.upload-tools-row>.file-picker>span{min-height:26px;padding:2px 7px}
@media(max-width:700px){
 .source-summary.data-date-bar{margin-bottom:0}
 .source-summary.data-date-bar>summary{min-height:20px}
}

/* Short lookup field and closely grouped sales actions. */
@media(max-width:700px){
 .upload-box>label>[data-file-search]{width:72%;max-width:280px;min-height:32px;height:32px;padding:3px 7px;line-height:24px;margin-top:2px}
 .lookup-meta{margin:4px 0 3px;line-height:1.3}
 .lookup-card .sales-action-row{grid-template-columns:repeat(3,minmax(0,1fr));column-gap:7px;margin-top:4px;padding-top:2px;align-items:start}
 .lookup-card .sales-action-row>.sales-detail{grid-area:1/1/2/4}
 .lookup-card .sales-action-row>.sales-detail>summary{width:calc((100% - 14px) / 3);max-width:none;min-height:30px;padding:0;font-size:12px;line-height:1.3}
 .sales-action-row .quick-watch-button{grid-area:1/2/2/3;width:100%;max-width:100%;justify-self:stretch;min-height:30px;padding:3px 6px;font-size:12px;border-radius:6px;line-height:1.3}
 .sales-action-row .quick-shortage-button{grid-area:1/3/2/4;width:100%;max-width:100%;justify-self:stretch;min-height:30px;padding:3px 6px;font-size:12px;border-radius:6px;line-height:1.3}
 .replenishment-preview{margin-top:5px;padding-top:5px}
}

/* Matched, shallow sales controls and a smaller lookup field. */
@media(max-width:700px){
 .upload-box>label>[data-file-search]{width:60%;max-width:220px;height:28px;min-height:28px;line-height:20px;padding:3px 6px;border-radius:6px;margin-top:2px}
 .lookup-card .sales-action-row{grid-template-columns:repeat(3,minmax(0,1fr));column-gap:6px;align-items:start;margin-top:4px;padding-top:3px}
 .lookup-card .sales-action-row>.sales-detail{grid-area:1/1/2/4;margin:0;padding:0;border:0}
 .lookup-card .sales-action-row>.sales-detail>summary{display:flex;align-items:center;justify-content:center;gap:4px;width:calc((100% - 12px) / 3);max-width:none;height:28px;min-height:28px;padding:3px 4px;border:1px solid var(--line);border-radius:6px;background:var(--soft);font-size:12px;font-weight:700;line-height:1.25;list-style:none}
 .lookup-card .sales-action-row>.sales-detail>summary::-webkit-details-marker{display:none}
 .lookup-card .sales-action-row>.sales-detail>summary::marker{content:''}
 .lookup-card .sales-action-row>.sales-detail>summary::before{content:'▶';font-size:9px}
 .lookup-card .sales-action-row>.sales-detail[open]>summary::before{content:'▼'}
 .sales-action-row .quick-watch-button,.sales-action-row .quick-shortage-button{width:100%;max-width:100%;height:28px;min-height:28px;padding:3px 4px;justify-self:stretch;border-radius:6px;font-size:12px;line-height:1.25}
 .sales-action-row .quick-watch-button{grid-area:1/2/2/3}
 .sales-action-row .quick-shortage-button{grid-area:1/3/2/4}
 .lookup-card .sales-action-row>.sales-detail[open] .sales-metrics{margin-top:5px}
 .replenishment-preview{margin-top:4px;padding-top:4px}
}

/* Phone-native sizing: no zoomed or oversized page canvas. */
@media(max-width:700px){
 html{width:100%;min-width:0;overflow-x:clip}
 body{width:100%;max-width:100%;min-width:0;margin:0;zoom:1;overflow-x:clip}
 :root{font-size:13px}
 header,main{width:100%;max-width:100%;min-width:0}
 header{padding:calc(env(safe-area-inset-top,0px) + 4px) max(8px,env(safe-area-inset-right)) 4px max(8px,env(safe-area-inset-left));gap:6px}
 .brand-logo{width:120px;height:36px}
 .brand-logo img{width:168px;height:168px;left:-24px;top:-63px}
 #offline-status{font-size:10px;max-width:100px}
 main{margin-top:5px;padding-left:max(6px,env(safe-area-inset-left));padding-right:max(6px,env(safe-area-inset-right));padding-bottom:max(8px,env(safe-area-inset-bottom))}
 .tabs{width:100%;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;margin-bottom:5px}
 .tabs button{width:100%;min-width:0;min-height:36px;padding:3px 1px;font-size:11px;gap:1px}
 .tabs button small{font-size:9px;line-height:1.2}
 .panel,.panel:has(>.upload-box){padding:7px;min-width:0;width:100%;max-width:100%}
 .panel>h2{display:none}
 .upload-tools-row>.upload-tools>summary{font-size:12px}
 .upload-box>label,.file-search>label,.request-search-label{font-size:11px;line-height:1.3}
 input:not([type=checkbox]):not([type=file]),textarea,select{font-size:16px}
 .upload-box>label>[data-file-search]{font-size:16px}
 .lookup-meta{font-size:10px;margin:4px 0 3px}
 .lookup-card,.batch-result{padding:8px;margin:5px 0}
 .lookup-card>strong,.batch-result strong{font-size:12px;line-height:1.35}
 .lookup-grid,.compact-values{font-size:11px;line-height:1.35;gap:4px 7px;margin-top:6px}
 .lookup-card p,.batch-result p{font-size:11px;line-height:1.35;margin-top:5px}
 .lookup-card .future-order{margin:5px 0}
 .sales-preview{padding:5px 6px;margin-top:5px;gap:4px}
 .sales-preview span{font-size:10px;line-height:1.3}
 .sales-preview b{font-size:13px;margin-top:1px}
 .replenishment-preview{font-size:11px;line-height:1.35}
 .replenishment-preview>div{gap:5px;margin-top:2px}
 .lookup-card .replenishment-preview p,.coverage-basis,.arrival-status,.calculation-basis,.arrival-details{font-size:10px;line-height:1.35}
 .coverage-basis>summary,.calculation-basis>summary,.arrival-details>summary,.replenishment-explanation>summary,.batch-box>summary{min-height:26px;font-size:11px}
 .replenishment-explanation{font-size:11px;margin-top:3px}
 .batch-box{margin-top:5px;padding-top:3px;font-size:12px}
 .feature-note,.request-essential,.request-reason{font-size:11px;line-height:1.35}
 .query-metrics{font-size:11px}
 .query-metrics th,.query-metrics td{padding:4px 3px}
 .row,.feature-actions,.shortage-actions{max-width:100%;min-width:0}
 .scroll{width:100%;max-width:100%;overflow-x:clip}
 .scroll table{width:100%;min-width:0;table-layout:fixed}
}

/* Match the shortage note field to its search field. */
@media(max-width:700px){
 #shortagesForm .shortage-save-row input[name=note],.request-search-label input[data-shortage-search]{width:100%;max-width:100%;height:36px;min-height:36px;padding:5px 8px;font-size:16px;line-height:24px;border-radius:6px}
}

/* Match date and save controls to the compact shortage search. */
@media(max-width:700px){
 #shortagesForm .shortage-save-row{gap:5px;margin:5px 0;grid-template-columns:minmax(0,1fr) 78px}
 #shortagesForm .shortage-save-row input[name=day]{height:36px;min-height:36px;padding:5px 8px;font-size:16px;line-height:24px;border-radius:6px}
 #shortagesForm .shortage-save-row .primary{height:36px;min-height:36px;padding:5px 4px;font-size:12px;line-height:24px;border-radius:6px;white-space:nowrap}
}

/* Compact matched replenishment actions. */
@media(max-width:700px){
 .feature-actions:has(>[data-request-run]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin:5px 0}
 .feature-actions>[data-request-run],.feature-actions>[data-request-export]{width:100%;height:36px;min-height:36px;padding:5px 7px;font-size:12px;line-height:24px;border-radius:6px;white-space:nowrap}
}

/* One mobile control size across all four workbench pages. */
@media(max-width:700px){
 :root{--mobile-control-height:36px}
 .panel input:not([type=checkbox]):not([type=radio]):not([type=file]),.panel select,.panel button:not(.watch-row-main):not(.watch-row-remove),.stock-export-preview button{
  height:var(--mobile-control-height)!important;min-height:var(--mobile-control-height)!important;
  padding:5px 8px!important;border-radius:6px!important;line-height:24px!important;
 }
 .panel input:not([type=checkbox]):not([type=radio]):not([type=file]),.panel select{font-size:16px!important}
 .panel button:not(.watch-row-main):not(.watch-row-remove),.stock-export-preview button{font-size:12px!important}
 .upload-box>label>[data-file-search]{width:100%;max-width:100%}
 .upload-tools-row>.file-picker{height:var(--mobile-control-height)!important;min-height:var(--mobile-control-height)!important;padding:0!important;font-size:12px}
 .upload-tools-row>.file-picker>span{height:var(--mobile-control-height);min-height:var(--mobile-control-height);padding:5px 8px;border-radius:6px;line-height:24px}
 .upload-tools-row>.upload-tools>summary{min-height:var(--mobile-control-height)!important;line-height:1.35}
 .lookup-card .sales-action-row>.sales-detail>summary{height:var(--mobile-control-height)!important;min-height:var(--mobile-control-height)!important;padding:5px 8px!important;line-height:24px!important}
 .shortage-top .shortage-delete{min-width:48px}
}

/* Larger phone navigation, always four equal columns. */
@media(max-width:700px){
 .tabs{width:100%;max-width:100%;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
 .tabs button{width:100%;max-width:100%;min-width:0;height:44px;min-height:44px;padding:5px 2px;gap:2px;font-size:13px;line-height:1.2;border-radius:9px}
 .tabs button small{font-size:10px;line-height:1.2;max-width:100%}
}

/* Slightly larger product text with a more relaxed reading rhythm. */
@media(max-width:700px){
 .lookup-card{padding:10px;margin:7px 0}
 .lookup-card>strong{font-size:14px;line-height:1.45}
 .lookup-card .lookup-grid{font-size:13px;line-height:1.45;gap:7px 10px;margin-top:9px}
 .lookup-card p{font-size:13px;line-height:1.45;margin-top:7px}
 .lookup-card .future-order{margin:8px 0}
 .lookup-card .sales-preview{padding:8px;margin-top:8px;gap:6px}
 .lookup-card .sales-preview span{font-size:12px;line-height:1.4}
 .lookup-card .sales-preview b{font-size:15px;margin-top:2px}
 .lookup-card .sales-action-row{margin-top:8px;padding-top:4px}
 .lookup-card .sales-action-row>.sales-detail>summary{font-size:13px}
 .lookup-card .sales-action-row .quick-watch-button,.lookup-card .sales-action-row .quick-shortage-button{font-size:13px!important}
 .lookup-card .replenishment-preview{font-size:13px;line-height:1.45;margin-top:8px;padding-top:7px}
 .lookup-card .replenishment-preview>div{gap:8px;margin-top:4px}
 .lookup-card .replenishment-preview p,.lookup-card .arrival-status,.lookup-card .coverage-basis,.lookup-card .calculation-basis,.lookup-card .arrival-details{font-size:12px;line-height:1.45}
 .lookup-card .coverage-basis>summary,.lookup-card .calculation-basis>summary,.lookup-card .arrival-details>summary,.lookup-card .replenishment-explanation>summary{min-height:30px;font-size:13px}
 .lookup-card .replenishment-explanation{margin-top:6px;font-size:12px}
 .lookup-card .query-metrics{font-size:12px}
 .lookup-card .query-metrics th,.lookup-card .query-metrics td{padding:6px 4px;line-height:1.4}
 .batch-box{margin-top:8px;padding-top:5px}
 .batch-box>summary{font-size:13px;min-height:30px}
}

/* Consistent hierarchy and spacing across the mobile workbench. */
@media(max-width:700px){
 :root{--line:#e0e5eb;--soft:#f7f9fb}
 .panel{border-radius:10px;padding:9px}
 .panel:has(>.upload-box){padding:9px}
 .lookup-card,.batch-result,.shortage-department{border-color:var(--line);border-radius:8px;background:#fff}
 .upload-box>label,.file-search>label,.request-search-label,.request-filters label{font-size:12px;line-height:1.4}
 .lookup-meta,.shortage-count,[data-request-match]{font-size:11px;line-height:1.4;color:var(--muted)}
 .batch-result{padding:10px;margin:7px 0;font-size:12px;line-height:1.45}
 .batch-result strong,.shortage-name{font-size:13px;line-height:1.45}
 .batch-result .compact-values,.request-essential,.request-reason,.feature-note{font-size:12px;line-height:1.45}
 .batch-result .compact-values{gap:6px 10px;margin-top:7px}
 .shortage-entry{padding:9px 0;line-height:1.45}
 .shortage-metrics{font-size:12px;line-height:1.45;gap:6px 10px}
 .shortage-name{margin:6px 0}
 .shortage-department>summary{font-size:12px;padding:7px 9px}
 .shortage-note,.shortage-product-status{font-size:12px;line-height:1.45}
 .feature-actions,.shortage-toolbar{gap:6px;margin-top:7px;margin-bottom:7px}
 .rule-settings,.batch-box{border-top-color:var(--line)}
 .lookup-card .sales-action-row{column-gap:6px}
 .stock-export-preview{border-radius:10px}
 .stock-export-preview .export-preview-item{font-size:12px;line-height:1.45;padding:9px 0}
}

/* Department images stay readable and fit the phone preview. */
.shortage-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}
.shortage-toolbar [data-shortage-export],.shortage-toolbar [data-shortage-image-export]{grid-column:auto;justify-self:stretch}
.shortage-image-preview{width:min(430px,calc(100% - 20px));box-sizing:border-box}
.image-department{display:flex;align-items:center;gap:8px;font-size:13px}
.image-department select{flex:1;min-width:0;min-height:36px;font-size:16px}
.department-export-image{display:block;width:100%;height:auto;border:1px solid #ddd;box-sizing:border-box}
.department-export-image[hidden]{display:none}
.shortage-image-preview [data-image-status]{font-size:12px;line-height:1.5}
.shortage-image-preview .export-preview-footer{justify-content:stretch}
.shortage-image-preview .export-preview-footer button{flex:1}
.department-image-scroll{max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch;margin-top:8px}
.department-image-scroll.is-zoomed .department-export-image{width:2400px;max-width:none}
.shortage-image-preview [data-image-zoom]{font-size:12px;min-height:32px}
.manual-pallet-field{display:flex;align-items:center;gap:6px;margin:8px 0;font-size:13px}
.manual-pallet-field input{width:100px;min-width:0;font-size:16px!important;min-height:36px;box-sizing:border-box}
.manual-pallet-field input[aria-invalid=true]{border-color:#e31837}
.manual-pallet-editor{margin:10px 0;border-top:1px solid var(--line);padding-top:8px}
.manual-pallet-editor>summary{font-size:13px;cursor:pointer}
.manual-pallet-editor>p{font-size:12px;color:var(--muted)}
.manual-pallet-row{padding:6px 0;border-bottom:1px solid var(--line)}
.manual-pallet-row>strong{font-size:12px;line-height:1.5;overflow-wrap:anywhere;display:block}
.manual-remark-field{display:block;font-size:12px;margin:6px 0 8px}
.manual-remark-field>span{display:block;margin-bottom:4px}
.manual-remark-field textarea{display:block;box-sizing:border-box;width:100%;min-width:0;resize:vertical;font-size:16px!important;line-height:1.4;padding:6px 8px;border:1px solid var(--line);border-radius:6px}
.manual-order-info{font-size:12px;line-height:1.5;margin:5px 0 7px}
.manual-order-info>span{font-weight:600}
.manual-order-info>p{white-space:pre-line;overflow-wrap:anywhere;margin:2px 0;color:var(--text,#172b40)}
@media(prefers-color-scheme:dark){.manual-order-info>p{color:#e5e7eb}}


.orders-department{margin:10px 0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface,transparent)}
.orders-department>summary{display:flex;align-items:center;gap:10px;min-height:54px;padding:10px 12px;list-style:none;cursor:pointer}
.orders-department>summary::-webkit-details-marker{display:none}
.orders-department>summary::before{content:'▶';color:var(--costco-blue);font-size:11px}
.orders-department[open]>summary::before{content:'▼'}
.orders-department>summary strong{font-size:18px;margin-right:auto}
.orders-department>summary>span{font-size:13px;color:var(--muted);font-weight:600;white-space:nowrap}
.orders-department[open]>summary{border-bottom:1px solid var(--line)}
.orders-department>[data-orders-body]{padding:0 10px}
.order-today-card{margin:8px 0;padding:10px;box-shadow:none}
.order-today-card>strong{font-size:14px;overflow-wrap:anywhere}

.file-search {margin-bottom:8px}
.file-search-field {position:relative;display:flow-root}
.file-search-field>[data-file-search] {appearance:none;-webkit-appearance:none}
/* Reserve space for clear even with the shared mobile control padding. */
.panel .upload-box .file-search-field>input[data-file-search][type=search] {padding-inline-end:44px!important}
.file-search-field>[data-file-search]::-webkit-search-cancel-button {-webkit-appearance:none}
.file-search-clear {
 position:absolute;inset-inline-end:1px;bottom:0;
 display:grid;place-items:center;width:42px;height:calc(100% - 4px);
 padding:0;border:0;background:transparent;color:var(--muted);
}
.file-search-clear>span {
 display:grid;place-items:center;width:23px;height:23px;
 border-radius:50%;background:var(--line);font:600 21px/1 system-ui,sans-serif;
}
.file-search-clear:hover,.file-search-clear:active {color:var(--costco-blue)}
.file-search-field>[data-file-search]:placeholder-shown+.file-search-clear {visibility:hidden}

/* ===== watch-sales.css ===== */
/* 关注商品 — 紧凑列表，点行展开销售数据（数据来自本机 Daily） */
.watch-note{
  margin:4px 0 10px;
  font-size:13px;
  color:var(--muted);
  line-height:1.45;
}
.watch-form{
  margin-bottom:8px;
}
.watch-form .row{
  margin:6px 0;
  gap:6px;
}
.watch-match{
  margin:4px 0 6px;
  padding:6px 8px;
  border:1px solid var(--line);
  border-radius:6px;
  font-size:12px;
  line-height:1.35;
  background:var(--soft);
}
.watch-match.is-hint{color:var(--muted)}
.watch-match-meta{
  display:block;
  margin-top:2px;
  font-size:12px;
  color:var(--muted);
}
.watch-feedback{
  min-height:1.2em;
  margin:4px 0 6px;
  font-size:13px;
  color:var(--muted);
}
.watch-feedback.is-error{color:var(--costco-red,#c41e3a);font-weight:600}
.watch-feedback.is-ok{color:var(--costco-blue,#005dab)}
.watch-warn{color:var(--costco-red,#c41e3a)!important;font-weight:600}

/* 标题行：关注 · N 个 */
.watch-head{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  margin:4px 0 8px;
  padding:0;
  border-top:0;
}
.watch-list-title{
  margin:0;
  font-size:14px;
  font-weight:700;
  line-height:1.3;
}

/* 列表卡片容器 */
.watch-list{
  display:flex;
  flex-direction:column;
  margin:0;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  overflow:hidden;
}
@media(prefers-color-scheme:dark){
  .watch-list{background:#000}
}

/* 行：货号+品名 | 删除；预览条在下一行全宽，不绝对定位、不叠层 */
.watch-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:6px 12px;
  align-items:start;
  padding:8px 10px;
  border-bottom:1px solid var(--line);
  position:relative;
  overflow:visible;
}
.watch-row:last-child{border-bottom:0}
.watch-row-main{
  display:block;
  margin:0;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  text-align:left;
  cursor:pointer;
  color:inherit;
  font:inherit;
  min-width:0;
  width:100%;
  /* 覆盖 .panel button 手机端固定 36px，否则预览溢出叠到下一行 */
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  line-height:inherit !important;
  white-space:normal !important;
  overflow:visible !important;
}
.watch-row-main:hover .watch-row-sku,
.watch-row-main:focus-visible .watch-row-sku{
  color:var(--costco-blue,#005dab);
}
.watch-row-sku{
  font-size:14px;
  font-weight:700;
  letter-spacing:.02em;
  font-variant-numeric:tabular-nums;
  color:var(--costco-blue,#005dab);
  line-height:1.3;
}
.watch-row-name{
  font-size:12px;
  font-weight:600;
  line-height:1.35;
  color:inherit;
  overflow-wrap:anywhere;
}
.watch-row-dept{
  font-weight:500;
  color:var(--muted);
  font-size:11px;
}

/* 折叠行：货号品名；昨日销量/业绩预览（预览与主按钮分离，占满整行） */
.watch-row-identity{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:1px;
  min-width:0;
  width:100%;
}
.watch-row-preview{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:4px 8px;
  margin:0;
  padding:5px 7px;
  width:100%;
  box-sizing:border-box;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--soft,#f7f8fa);
  position:static;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.watch-row-preview-item{
  display:flex;
  flex-direction:column;
  gap:1px;
  min-width:0;
}
.watch-row-preview-label{
  font-size:10px;
  color:var(--muted);
  line-height:1.25;
}
.watch-row-preview-value{
  font-size:14px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  line-height:1.25;
  color:inherit;
}
@media(prefers-color-scheme:dark){
  .watch-row-preview{background:#111}
}

/* 删除：文字链样式；同样解除手机端固定高度 */
.watch-row-remove{
  margin:0;
  padding:2px 4px !important;
  flex:0 0 auto;
  align-self:start;
  min-width:0;
  min-height:24px !important;
  height:auto !important;
  max-height:none !important;
  border:0 !important;
  border-radius:4px !important;
  background:transparent !important;
  box-shadow:none !important;
  color:#a12535 !important;
  font-size:12px !important;
  font-weight:600;
  line-height:1.3 !important;
  cursor:pointer;
  white-space:nowrap;
  overflow:visible !important;
}
.watch-row-remove:hover,
.watch-row-remove:focus-visible{
  background:rgba(161,37,53,.08) !important;
  text-decoration:underline;
}
@media(prefers-color-scheme:dark){
  .watch-row-remove:hover,
  .watch-row-remove:focus-visible{
    background:rgba(196,30,58,.18) !important;
  }
}

/* 手机端再钉死一遍，压过 .panel button 的 !important */
@media(max-width:700px){
  .panel .watch-row-main,
  .panel .watch-row-remove{
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    line-height:inherit !important;
    padding-top:0 !important;
    padding-bottom:0 !important;
  }
  .panel .watch-row-remove{
    min-height:24px !important;
    padding:2px 4px !important;
    line-height:1.3 !important;
  }
}

.watch-row-detail{
  grid-column:1 / -1;
  margin-top:6px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--soft);
}
.watch-row.is-expanded .watch-row-main{
  margin-bottom:0;
}

.watch-metrics{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px;
}
.watch-metric{
  border:1px solid var(--line);
  border-radius:6px;
  padding:5px 7px;
  background:#fff;
}
@media(prefers-color-scheme:dark){
  .watch-metric{background:#000}
}
.watch-metric-label{
  display:block;
  font-size:10px;
  color:var(--muted);
  margin-bottom:1px;
  line-height:1.3;
}
.watch-metric-value{
  font-size:15px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  line-height:1.25;
}
.watch-compare-metrics{
  margin-top:5px;
  padding-top:5px;
  border-top:1px dashed var(--line);
}
.watch-metric-value .watch-delta{
  font-size:inherit;
  font-weight:inherit;
}
.watch-delta{
  font-weight:700;
  font-variant-numeric:tabular-nums;
}
.watch-delta.up{color:#0a7a3e}
.watch-delta.down{color:var(--costco-red,#c41e3a)}
.watch-delta.flat{color:var(--muted)}
.watch-empty{
  padding:12px 10px;
  text-align:center;
  color:var(--muted);
  border:1px dashed var(--line);
  border-radius:10px;
  font-size:13px;
  line-height:1.45;
}
.watch-list-section[hidden]{
  display:none!important;
}

@media(max-width:639px){
  .watch-metric-value{font-size:14px}
  .watch-row{padding:7px 9px}
  .watch-row-sku{font-size:13px}
  .watch-row-name{font-size:12px}
  .watch-row-preview{padding:4px 6px;gap:4px 6px}
  .watch-row-preview-value{font-size:13px}
}

/* 加入关注 + 从 Daily 刷新 同一排各一半 */
.watch-btn-row{
  display:flex;
  gap:8px;
  margin:8px 0 4px;
  align-items:stretch;
}
.watch-btn-row > button{
  flex:1 1 0;
  width:50%;
  min-width:0;
}


.watch-departments{display:grid;gap:10px}
.watch-department{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--panel,#fff)}
.watch-department-toggle{display:flex!important;align-items:center;gap:10px;width:100%;height:auto!important;min-height:60px;padding:14px 16px!important;margin:0;border:0!important;border-radius:0!important;background:transparent!important;color:var(--text);text-align:left;box-shadow:none!important}
.watch-department-toggle strong{font-size:18px}
.watch-department-arrow{color:var(--costco-blue,#005dab);font-size:19px}
.watch-department-count{margin-left:auto;color:var(--muted);font-size:13px;font-weight:600}
.watch-department-body{border-top:1px solid var(--line)}
.watch-department-body .watch-list{border:0;border-radius:0}
.watch-department-sales{padding:12px;margin-top:10px;border:1px solid var(--line);border-radius:10px}
.watch-department-body .watch-department-sales{margin:0;border:0;border-top:1px solid var(--line);border-radius:0}
.watch-department-sales h4{font-size:14px;margin:0 0 10px}
.watch-summary-missing{color:var(--muted);font-size:11px}
@media(prefers-color-scheme:dark){.watch-department{background:#000}}

.watch-photo{margin:8px 0}
.watch-photo-actions{display:flex;flex-wrap:wrap;gap:6px}
.watch-photo-actions button[hidden],.watch-photo-toggle[hidden]{display:none}
.watch-photo-toggle{margin-bottom:5px}
.watch-photo-status{margin:5px 0;font-size:12px;color:var(--muted)}
.watch-photo-status:empty{display:none}
.watch-photo-choices:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr);gap:5px;max-height:min(45vh,400px);overflow-y:auto;overscroll-behavior:contain}
.panel .watch-photo-choices button{height:auto!important;min-height:36px;white-space:normal;text-align:left}

/* ===== workbench-theme.css ===== */
/* 数据状态行：默认整行灰字，只有「较旧」用警示色，避免三个标签都像蓝色链接。 */
main .data-date-bar summary{color:inherit}
/* Native system appearance updates immediately, including offline use. */
:root{color-scheme:light dark}
@media(prefers-color-scheme:dark){
 :root{color-scheme:dark;color:#e6edf5;background:#000000;--costco-red:#ff6b82;--costco-blue:#d6dce3;--line:#333333;--muted:#acbac9;--soft:#000000}
 body{background:#000000;color:#e6edf5}
 .panel,.lookup-card,.batch-result,.shortage-department,.stock-export-preview{background:#000000;color:#e6edf5}
 .tabs button{background:#000000;color:#c5d9ec}
 .tabs button.active,.primary{background:#e31837;border-color:#e31837;color:#fff}
 input,textarea,select{background:#000000;border-color:#444444;color:#e6edf5}
 input::placeholder,textarea::placeholder{color:#98a9ba;opacity:1}
 input:focus,textarea:focus,select:focus{outline-color:#80bfff66}
 .sales-preview b{color:#e6edf5}
 .shortage-note,.data-date-bar{color:#b8c8d9}
 .shortage-department-heading{background:var(--soft);color:#c5d9ec;border-color:var(--line)}
 .shortage-department-heading span:last-child,[data-request-match]{color:var(--muted)}
 .rule-settings fieldset,.batch-result,.status-upload,.shortage-department{border-color:var(--line)}
 .batch-box summary,.rule-settings summary,.replenish-quantity{color:var(--costco-blue)}
 .upload-tools-row>.file-picker>span{background:var(--soft);border-color:var(--line)}
 .upload-tools-row>.file-picker:active>span{background:#171717;border-color:#666666}
 .request-quantity{background:#3b2029}
 .request-kind-review .request-quantity{color:#f4c97e;background:#352d20}
 .new-product{color:#83dfac;border-color:#3a6650}
 .quick-shortage-button:disabled{color:#83dfac;background:#1b3227}
 .product-status-green,.arrival-safe{color:#83dfac}
 .danger,.upload-state.error,.data-warning,.status-upload .error,.product-status-red,.arrival-warning,.delivery-countdown{color:#ff8a9c}
 .date-stale,.past-orders>summary,.followup-age,.export-preview-warning{color:#f4c97e}
 .data-date-bar summary i{color:#718398}
 .stock-export-preview::backdrop{background:#0009}
 .export-preview-footer{background:#000000}
}

/* Full original artwork, with transparent paper and balanced header alignment. */
header{align-items:flex-start}
.brand-heading{flex:0 0 auto}
.header-brand{align-items:center}
.brand-logo{display:flex;align-items:center;width:140px;height:51px;background:transparent;overflow:visible}
.brand-logo img{position:static;display:block;width:100%;height:auto;max-width:100%;left:auto;top:auto}
#offline-status{align-self:center}
.local-only-notice>summary{color:var(--costco-red)}
@media(prefers-color-scheme:dark){
 #offline-status{color:#e6edf5}
 .local-only-notice>summary{color:#ff6b82}
 .local-only-notice>p{color:#e6edf5}
 .local-only-toggle::before{color:#ff6b82}
}
@media(max-width:700px){
 .brand-logo{width:112px;height:41px}
 .brand-logo img{position:static;width:100%;height:auto;left:auto;top:auto}
 #offline-status{max-width:64px;font-size:11px;letter-spacing:0}
}
.brand-heading{font-size:20px;font-weight:700;color:var(--costco-red);white-space:nowrap;line-height:28px!important}header{align-items:center!important}@media(max-width:700px){.brand-heading{font-size:17px}}
header>.header-brand{align-self:flex-start!important;min-height:28px}header #offline-status{white-space:nowrap;max-width:none!important;line-height:1.4!important}
/* no-red-line-v199 */
html body>header{padding-top:max(8px,calc(env(safe-area-inset-top,0px) + 4px))!important;padding-left:max(12px,env(safe-area-inset-left))!important;padding-right:max(12px,env(safe-area-inset-right))!important}
@media(display-mode:standalone){html body>header{padding-top:calc(env(safe-area-inset-top,0px) + 22px)!important}}

/* ===== ui-refresh.css ===== */
/* ===== UI 精修（预览）：2×3 导航 + 关注页紧凑 =====
   最后加载；只用类选择器与少量 !important 压过旧层叠。
   注意：不对 .panel button 设固定高度，避免重蹈 36px 叠层问题。 */

/* ---------- 导航：分段式卡片 ---------- */
main>.tabs{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:4px;
  width:100%;max-width:100%;
  margin:0 0 8px;
  padding:4px;
  border:1px solid var(--line,#e2e6eb);
  border-radius:14px;
  background:var(--soft,#f5f7fa);
  box-sizing:border-box;
}
main>.tabs button{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:1px;
  width:100%;min-width:0;max-width:100%;
  height:auto;min-height:46px;
  margin:0;padding:5px 4px;
  border:0;border-radius:10px;
  background:transparent;
  color:#274860;
  font-size:14px;font-weight:600;line-height:1.2;
  white-space:nowrap;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
  transition:background-color .15s ease,color .15s ease,box-shadow .15s ease;
}
main>.tabs button small{
  font-size:10px;font-weight:500;line-height:1.15;letter-spacing:.01em;
  color:inherit;opacity:.62;
}
main>.tabs button:not(.active):hover{background:rgba(0,93,171,.06)}
main>.tabs button:focus-visible{outline:2px solid var(--costco-blue,#005dab);outline-offset:1px}
main>.tabs button.active{
  background:var(--costco-red,#e31837);
  color:#fff;
  box-shadow:0 1px 2px rgba(227,24,55,.25),0 2px 8px rgba(227,24,55,.18);
}
main>.tabs button.active small{opacity:.9}

/* 手机：两排三列 */
@media(max-width:700px){
  main>.tabs{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:4px;
    margin-bottom:8px;
  }
  main>.tabs button{min-height:48px;height:48px;padding:4px 2px;font-size:14px}
  main>.tabs button small{font-size:10px}
}
@media(max-width:350px){
  main>.tabs button{font-size:13px}
  main>.tabs button small{font-size:9px}
}

/* 深色：压过 index.html 内联的 .tabs button{background:#000!important} */
@media(prefers-color-scheme:dark){
  main>.tabs{background:#0e0e0e;border-color:#2a2a2a}
  main>.tabs button:not(.active){background-color:transparent!important;color:#c5d9ec}
  main>.tabs button:not(.active):hover{background-color:#1a1a1a!important}
  main>.tabs button.active{background:#e31837;color:#fff;box-shadow:0 0 0 1px #e31837,0 2px 10px rgba(227,24,55,.35)}
}

/* ---------- 关注页：整体约 80% 紧凑 ---------- */
.panel:has(>#watchForm){padding:8px}
@media(max-width:700px){.panel:has(>#watchForm){padding:8px}}

.watch-form{margin:0 0 4px}
.watch-form .row{margin:0 0 4px;gap:6px}
.watch-match{margin:0 0 6px;padding:5px 8px;font-size:12px;line-height:1.35;border-radius:6px}
.watch-btn-row{gap:6px;margin:0}
.watch-feedback{min-height:0;margin:4px 0 0;font-size:12px}
.watch-feedback:empty{display:none}

.watch-head,.watch-list-head{margin:10px 2px 6px}
.watch-list-title{font-size:13px;font-weight:700;letter-spacing:.02em;color:var(--muted,#5b6b7c)}

.watch-list{border-radius:10px}
.watch-row{gap:4px 10px;padding:7px 9px}
@media(max-width:639px){.watch-row{padding:7px 9px}}
.watch-row-identity{gap:0}
.watch-row-sku{font-size:13px;line-height:1.3}
.watch-row-name{font-size:12px;line-height:1.35}
.watch-row-dept{font-size:11px}

/* 折叠预览：标签与数值同一行，省一行高度 */
.watch-row-preview{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 8px;
  padding:4px 8px;
  border-radius:6px;
}
@media(max-width:639px){.watch-row-preview{padding:4px 8px;gap:0 8px}}
.watch-row-preview-item{flex-direction:row;align-items:baseline;justify-content:space-between;gap:6px}
.watch-row-preview-label{font-size:11px;line-height:1.4}
.watch-row-preview-value{font-size:13px;line-height:1.4}
@media(max-width:639px){.watch-row-preview-value{font-size:13px}}

/* 删除：右上角小文字 */
.panel .watch-row-remove{font-size:12px!important;padding:1px 4px!important;min-height:22px!important}

/* 展开详情：去掉内框层级，改成浅底小格 */
.watch-row-detail{margin-top:2px;padding:6px;border-radius:8px}
.watch-metrics{gap:4px}
.watch-metric{padding:4px 7px;border-radius:5px}
.watch-metric-label{font-size:10px;margin-bottom:0;line-height:1.3}
.watch-metric-value{font-size:14px;line-height:1.25}
@media(max-width:639px){.watch-metric-value{font-size:14px}}
.watch-compare-metrics{margin-top:4px;padding-top:4px}
.watch-empty{padding:10px;font-size:12px}

/* --- 第二轮细调 --- */
@media(max-width:700px){main>.tabs button{min-height:44px;height:44px}}
.watch-row-preview-item+.watch-row-preview-item{border-left:1px solid var(--line,#e2e6eb);padding-left:8px}
.watch-row.is-expanded{background:rgba(0,93,171,.035);box-shadow:inset 3px 0 0 var(--costco-blue,#005dab)}
.watch-metric{border:0;background:#fff}
@media(prefers-color-scheme:dark){
  .watch-row.is-expanded{background:#070b10;box-shadow:inset 3px 0 0 #4d8fd6}
  .watch-metric{background:#111!important}
  .watch-row-preview-item+.watch-row-preview-item{border-left-color:#333}
}

/* =====================================================================
   第二批（预览）：顶部留白、关注简洁卡片、撤销提示、导入确认、数据状态
   注意：不给 .panel button 设固定高度（沿用全局 36px 规则），新卡片按钮用
   .watch-row-main（已被全局高度规则排除）；撤销条挂在 body 上，不在 .panel 内。
   ===================================================================== */

/* ---------- 6. 顶部留白 ---------- */
@media(max-width:700px){
  header{padding:calc(env(safe-area-inset-top,0px) + 2px) max(10px,env(safe-area-inset-right)) 2px max(10px,env(safe-area-inset-left))!important;align-items:center!important}
  #offline-status{font-size:11px;line-height:1.25;max-width:none}
  .local-only-notice>summary{min-height:26px;font-size:12px}
  main{margin-top:2px!important}
  main>.tabs{margin-bottom:6px}
}

/* ---------- 7. 关注：简洁卡片 ---------- */
.watch-row{display:block;padding:0!important}
.panel .watch-row-main{
  display:grid!important;gap:3px;width:100%;
  padding:8px 10px!important;
  text-align:left;
}
.watch-row-top{display:flex;align-items:center;gap:6px;min-width:0}
.watch-row-sku{font-size:14px;font-weight:700}
.watch-row-dept{font-size:11px;font-weight:600;color:var(--muted);padding:1px 6px;border:1px solid var(--line);border-radius:999px;line-height:1.35;white-space:nowrap}
.watch-row-flag{font-size:11px;font-weight:600;color:#9a5b00;background:#fff4dc;border-radius:999px;padding:1px 6px;line-height:1.35;white-space:nowrap}
.watch-chevron{margin-left:auto;flex:0 0 auto;width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg) translate(-2px,-2px);transition:transform .15s ease}
.watch-row.is-expanded .watch-chevron{transform:rotate(-135deg) translate(-2px,-2px)}
.watch-row-name{display:block;font-size:13px;font-weight:600;line-height:1.38;overflow-wrap:anywhere;word-break:break-word;white-space:normal}
.watch-row-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin-top:3px;padding:4px 0;border-radius:6px;background:var(--soft,#f7f8fa)}
.watch-stat{display:flex;align-items:baseline;justify-content:center;gap:5px;min-width:0;padding:0 4px}
.watch-stat+.watch-stat{border-left:1px solid var(--line)}
.watch-stat-label{font-size:11px;color:var(--muted);white-space:nowrap}
.watch-stat b{font-size:14px;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.watch-row-detail{margin:0 10px 10px!important}
.watch-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
.watch-detail-actions{display:flex;justify-content:flex-end;margin-top:8px}
.panel .watch-unwatch{width:auto;min-width:96px;color:#a12535;background:transparent;border:1px solid #e8c2c8}
.watch-list-head{display:flex;align-items:baseline;justify-content:space-between}
.watch-list-date{font-size:11px;color:var(--muted)}
@media(prefers-color-scheme:dark){
  .watch-row-flag{color:#f4c97e;background:#2a2008}
  .watch-row-stats{background:#111}
    .panel .watch-unwatch{color:#ff8a9c;border-color:#5a2a33}
}

/* ---------- 8. 撤销提示条 ---------- */
.watch-undo-bar{position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:60;max-width:440px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 6px 6px 14px;border-radius:12px;background:#1f2a36;color:#fff;font-size:14px;box-shadow:0 6px 24px rgba(0,0,0,.25)}
.watch-undo-bar[hidden]{display:none}
.watch-undo-button{flex:0 0 auto;min-height:40px;padding:6px 16px;border:1px solid rgba(255,255,255,.35);border-radius:9px;background:transparent;color:#8fd0ff;font:inherit;font-weight:700;cursor:pointer}
@media(prefers-color-scheme:dark){.watch-undo-bar{background:#1a1a1a;border:1px solid #3a3a3a}}

/* ---------- 10. 导入确认摘要 ---------- */
.import-confirm{margin:8px 0;padding:10px;border:1px solid var(--costco-blue,#005daa);border-radius:10px;background:var(--soft,#f7f8fa)}
.import-confirm h3{margin:0 0 6px;font-size:14px}
.import-confirm dl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:3px 10px;margin:0;font-size:13px}
.import-confirm dl>div{display:contents}
.import-confirm dt{color:var(--muted);white-space:nowrap}
.import-confirm dd{margin:0;font-weight:600;overflow-wrap:anywhere}
.import-confirm .import-confirm-info dd{grid-column:1/-1;font-weight:400;color:var(--muted);font-size:12px}
.import-confirm-warn{margin:8px 0 0;padding:6px 8px 6px 24px;border-radius:6px;background:#fff4dc;color:#7a4a00;font-size:12px;line-height:1.5}
.import-confirm-ok{margin:8px 0 0;font-size:12px;color:#0a7a3e}
.import-confirm-note{margin:6px 0 0;font-size:12px;color:var(--muted);line-height:1.45}
.import-confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:8px}
@media(prefers-color-scheme:dark){.import-confirm{background:#0b0b0b;border-color:#4d8fd6}.import-confirm-warn{background:#2a2008;color:#f4c97e}.import-confirm-ok{color:#83dfac}}

/* ---------- 11. 数据状态：尚未导入 / 没有匹配 ---------- */
.watch-state-banner,.lookup-state-none{margin:0 0 8px;padding:7px 10px;border-left:3px solid #e0a100;border-radius:6px;background:#fff8e6;color:#5f4300;font-size:12px;line-height:1.5}
.watch-state-banner b,.lookup-state-none b,.lookup-empty[data-lookup-state] b{display:block;font-size:13px}
.lookup-empty[data-lookup-state=no-match]{color:var(--muted)}
@media(prefers-color-scheme:dark){.watch-state-banner,.lookup-state-none{background:#1a1405;color:#f4c97e;border-left-color:#b88400}}

/* ---------- 12. 手机不横向溢出、长品名换行 ---------- */
.lookup-card>strong,.lookup-card .lookup-grid span,.shortage-name,.watch-match strong{overflow-wrap:anywhere;word-break:break-word}
#view,.panel{max-width:100%;min-width:0}
/* 6. 顶部留白（再收紧一档） */
@media(max-width:700px){
  header{padding-top:calc(env(safe-area-inset-top,0px) + 0px)!important;padding-bottom:0!important;min-height:0!important}
  .local-only-notice>summary{min-height:28px;line-height:1.2}
  main{margin-top:0!important}
  main>.tabs{padding:3px;gap:3px;margin-bottom:6px}
  main>.tabs button{min-height:42px;height:42px}
}
/* 覆盖 workbench-theme.css 的 header 顶部留白（浏览器 max(8px,…) / 主屏 App +22px） */
@media(max-width:700px){html body>header{padding-top:max(4px,calc(env(safe-area-inset-top,0px) + 2px))!important;padding-bottom:0!important}}
@media(max-width:700px) and (display-mode:standalone){html body>header{padding-top:calc(env(safe-area-inset-top,0px) + 10px)!important}}

/* 关注展开区：订单信息（替代备注） */
.watch-orders{margin-top:8px;padding:7px 8px;border:1px solid var(--line);border-radius:8px;background:#fff}
.watch-orders-title{font-size:12px;font-weight:700;color:var(--muted);margin:0 0 4px}
.watch-orders-empty{margin:0;font-size:12px;color:var(--muted);line-height:1.45}
.watch-order-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.watch-order-line{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:13px;line-height:1.4;padding:3px 0;border-top:1px dashed var(--line)}
.watch-order-line:first-child{border-top:0;padding-top:0}
.watch-order-when{min-width:0;overflow-wrap:anywhere;color:inherit}
.watch-order-qty{font-variant-numeric:tabular-nums;white-space:nowrap}
.watch-order-issue{display:block;width:100%;font-size:11px;color:#9a5b00}
@media(prefers-color-scheme:dark){
  .watch-orders{background:#111;border-color:#333}
  .watch-order-issue{color:#f4c97e}
}

/* 关注卡片：货号行右侧 ★（已关注，点击取消），箭头保留最右 */
.watch-row{position:relative}
.watch-star-slot{flex:0 0 36px;margin-left:auto;height:1px}
.watch-star-slot+.watch-chevron{margin-left:6px}
.panel .watch-row button.watch-star.watch-star{
  position:absolute;top:-5px;right:20px;z-index:1;
  display:flex;align-items:center;justify-content:center;
  width:44px;height:44px!important;min-height:44px!important;max-height:44px!important;
  margin:0;padding:0!important;border:0!important;border-radius:50%!important;
  background:transparent!important;box-shadow:none!important;
  color:#e0a100;font-size:18px!important;line-height:1!important;
  cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;
}
.watch-star-icon{display:block;font-size:18px;line-height:1;text-shadow:0 0 1px rgba(160,110,0,.35)}
.panel .watch-row button.watch-star.watch-star:active .watch-star-icon{transform:scale(.88)}
.panel .watch-row button.watch-star.watch-star:focus-visible{outline:2px solid var(--costco-blue,#005daa);outline-offset:-6px}
@media(prefers-color-scheme:dark){.panel .watch-row button.watch-star.watch-star{color:#ffcc33}.watch-star-icon{text-shadow:none}}
/* 展开区不再有底部按钮，收掉留白 */
.watch-detail-actions{display:none}
.watch-row-detail .watch-orders{margin-bottom:0}

/* =====================================================================
   导航吸顶（sticky）：滚动时 6 个入口始终可见；切 tab 不挡内容
   ===================================================================== */
main>.tabs{
  position:sticky;
  top:0;
  z-index:40;
  /* 不透明底，避免列表透出 */
  background:#f5f7fa;
  /* 与内容区分：细底边 + 轻阴影 */
  box-shadow:0 1px 0 rgba(15,23,42,.06),0 6px 16px rgba(15,23,42,.07);
}
@media(prefers-color-scheme:dark){
  main>.tabs{
    background:#000;
    border-color:#2a2a2a;
    box-shadow:0 1px 0 #2a2a2a,0 8px 18px rgba(0,0,0,.45);
  }
}
/* 安全区（viewport-fit=cover / PWA）：贴在刘海下方，伪元素填满空隙防透出 */
main>.tabs{
  top:env(safe-area-inset-top,0px);
}
main>.tabs::before{
  content:"";
  position:absolute;
  left:-4px;right:-4px;
  bottom:100%;
  height:env(safe-area-inset-top,0px);
  background:inherit;
  pointer-events:none;
}

/* =====================================================================
   导航恢复格子样式（7 项）：手机 4+3 两排，两排都铺满整宽；电脑单排 7 格。
   保留上方吸顶；选中仍为红底白字。
   ===================================================================== */
main>.tabs{grid-template-columns:repeat(7,minmax(0,1fr))}
main>.tabs button[data-tab]{min-width:0!important;padding-left:2px;padding-right:2px}
@media(max-width:700px){
  main>.tabs{grid-template-columns:repeat(12,minmax(0,1fr))}
  main>.tabs button[data-tab]{grid-column:span 3}
  /* 第二排 3 格：关注、库存、订单 */
  main>.tabs button[data-tab="watch"],
  main>.tabs button[data-tab="inventory"],
  main>.tabs button[data-tab="orders"]{grid-column:span 4}
}

/* ===== expiry.css ===== */
/* 效期管理紧凑首屏：逻辑不变，少占竖向空间，多露商品卡 */
.expiry-heading,.expiry-meta,.expiry-imports,.expiry-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.expiry-heading{justify-content:space-between;margin:0 0 2px}
.expiry-heading strong{font-size:15px;line-height:1.3}
.expiry-tag{font-size:11px;color:var(--muted)}
.expiry-intro{margin:0 0 4px;font-size:12px;color:var(--muted)}
.expiry-intro>summary{cursor:pointer;list-style:none;line-height:1.35;padding:2px 0;color:var(--muted)}
.expiry-intro>summary::-webkit-details-marker{display:none}
.expiry-intro>summary::before{content:"▸ ";color:var(--costco-blue)}
.expiry-intro[open]>summary::before{content:"▾ "}
.expiry-intro .feature-note{margin:4px 0 0;font-size:12px;line-height:1.4}
.expiry-imports{margin:4px 0;gap:6px}
.expiry-imports .file-picker{flex:1;min-width:0;min-height:32px;padding:0;font-size:12px}
.expiry-imports .file-picker span{display:block;text-align:center;padding:6px 6px;line-height:1.25;min-height:32px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}
.expiry-settings,.expiry-preview{border:1px solid var(--line);border-radius:8px;padding:8px;margin:6px 0}
.expiry-settings summary,.expiry-preview summary,.expiry-inline summary{cursor:pointer;font-size:12px;line-height:1.35;min-height:0;padding:2px 0}
.expiry-settings .feature-note{margin:4px 0;font-size:12px;line-height:1.4}
.expiry-check{display:flex;align-items:flex-start;gap:8px;font-size:12px;line-height:1.5;margin:8px 0}
.expiry-check input{width:auto;flex:0 0 auto;margin-top:3px}
.expiry-message{font-size:12px;line-height:1.4;padding:2px 0;margin:0;overflow-wrap:anywhere}
.expiry-message:empty{display:none;padding:0}
.expiry-preview-file{border-bottom:1px solid var(--line);padding:6px 0}
.expiry-preview-file p{margin:4px 0;overflow-wrap:anywhere}
.expiry-preview-file input{max-width:180px}
[data-expiry-root]>[data-expiry-source],
[data-expiry-root]>.feature-note[data-expiry-source]{margin:2px 0;font-size:11px;line-height:1.35;color:var(--muted)}
.expiry-toolbar{display:flex;gap:6px;margin:4px 0 2px}
.expiry-toolbar button{flex:1;font-size:12px;padding:5px 8px;min-height:32px}
.expiry-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;margin:2px 0 4px}
.expiry-filters input{grid-column:1/-1;min-height:34px;padding:5px 8px;font-size:14px}
.expiry-filters select{min-width:0;width:100%;min-height:34px;padding:4px 6px;font-size:13px}
.expiry-meta{font-size:12px;color:var(--muted);margin:4px 0;justify-content:space-between;gap:4px}
.expiry-inline{margin:6px 0}
.expiry-card{margin:6px 0;padding:10px}
.expiry-card strong{overflow-wrap:anywhere;font-size:14px;line-height:1.35}
.expiry-card .feature-note{margin:4px 0;font-size:12px;line-height:1.35}
.expiry-actions{gap:6px;margin:6px 0 0}
.expiry-actions button{font-size:12px;min-height:32px;padding:5px 8px}
.expiry-card .data-warning{font-size:12px;margin:4px 0}
[data-expiry-results]>.lookup-meta{margin:4px 0 2px;font-size:11px}
/* 效期页 panel 内首屏再收一点竖向空白（不影响导航格子） */
.panel:has([data-expiry-root]){padding-top:8px;padding-bottom:8px}
@media(max-width:700px){
  .expiry-imports .file-picker span{padding:5px 4px;font-size:12px}
  .expiry-toolbar button{padding:4px 6px}
  .expiry-card{padding:8px;margin:5px 0}
}

  .expiry-intro>summary::before{color:#7eb6ff}
}

/* 导出并入 Daily 行，去掉整行大按钮 */
.expiry-source-row{display:flex;align-items:center;gap:8px;margin:2px 0 4px;min-width:0}
.expiry-source-row>[data-expiry-source]{flex:1;min-width:0;margin:0!important;font-size:11px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.expiry-source-row .expiry-export-link{flex:0 0 auto;min-height:28px!important;height:28px;padding:0 8px!important;font-size:12px;font-weight:600;border-radius:6px}
.expiry-settings{padding:4px 8px;margin:4px 0}
.expiry-settings>summary{min-height:28px;align-content:center;font-size:12px}
.expiry-imports{margin:2px 0 4px}
[data-expiry-root] .expiry-imports .file-picker{min-height:30px!important;height:auto;padding:0!important}
[data-expiry-root] .expiry-imports .file-picker>span{min-height:30px;padding:4px 4px;font-size:12px;font-weight:600}
.expiry-message{font-size:11px;line-height:1.35;padding:0;margin:0 0 2px}
.expiry-filters{gap:5px;margin:0 0 2px}
.expiry-filters input{min-height:32px!important;padding:4px 8px;font-size:14px}
.expiry-filters select{min-height:32px!important;padding:3px 4px;font-size:12px}
.expiry-intro{margin:0 0 2px}
.expiry-heading{margin:0}
.panel:has([data-expiry-root]){padding:8px}
.expiry-toolbar{display:none} /* legacy */
@media(prefers-color-scheme:dark){
  .expiry-intro>summary::before{color:#7eb6ff}
}
/* 批次行：照参考站 w.zlorne.chatgpt.site（单行紧凑、数量+单位同行、标红只变色不加粗） */
.expiry-batch{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(55px,.65fr);gap:5px;align-items:center;padding:5px 0;border-top:1px solid var(--line);font-size:12px;line-height:1.35}
.expiry-batch>*{min-width:0;font-weight:400}
.expiry-batch>:last-child{text-align:right}
.expiry-batch>span:first-child{white-space:nowrap}
.expiry-batch small{display:block;font-size:10px}
.expiry-batch>b{white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:700}
.expiry-batch>b small{display:inline;font-size:10px;line-height:inherit;margin-left:2px;color:var(--muted);font-weight:600}
.expiry-batch-head{color:var(--muted);font-size:11px}
.expiry-batch:last-child{padding-bottom:3px}
.expiry-batch.is-expired,.expiry-batch.is-near{color:#cf2834}
.expiry-batch.is-expired>*,.expiry-batch.is-near>*{color:inherit}
.expiry-batch.is-expired>b small,.expiry-batch.is-near>b small{color:var(--muted)}
.lookup-card.expiry-card{padding:8px 10px}
@media(prefers-color-scheme:dark){.expiry-batch.is-expired,.expiry-batch.is-near{color:#ff6d78}}

/* 收起/展开视图 */
.expiry-list-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:2px 0}
.expiry-list-head .lookup-meta{margin:0;flex:1;min-width:0}
[data-expiry-root] .expiry-view-toggle{flex:0 0 auto;min-width:88px;min-height:44px;height:44px;padding:0 12px;border:1px solid var(--line);border-radius:8px;background:var(--soft);color:var(--costco-blue,#005daa);font-size:13px;font-weight:700}
[data-expiry-root] .expiry-row{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:52px;height:auto;margin:5px 0;padding:7px 10px;text-align:left;background:inherit;color:inherit;font:inherit;font-weight:400;cursor:pointer;border:1px solid var(--line);border-radius:10px;box-sizing:border-box}
.expiry-row-main{display:flex;flex-direction:column;min-width:0;flex:1}
.expiry-row-main strong{font-size:13px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.expiry-row-main small{font-size:11px;color:var(--muted);line-height:1.35}
.expiry-row-main em{font-style:normal;color:#a12535}
.expiry-row-when{display:flex;flex-direction:column;align-items:flex-end;flex:0 0 auto;text-align:right;line-height:1.3;font-size:12px}
.expiry-row-when b{font-weight:600;font-variant-numeric:tabular-nums}
.expiry-row-when small{font-size:11px;color:var(--muted)}
.expiry-row-when.is-expired,.expiry-row-when.is-near,.expiry-row-when.is-expired small,.expiry-row-when.is-near small{color:#cf2834}
.expiry-row-none{font-size:11px;color:var(--muted)}
[data-expiry-root] .expiry-card-close{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:44px;height:auto;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.expiry-card-close strong{min-width:0}
.expiry-card-close span{flex:0 0 auto;font-size:12px;color:var(--costco-blue,#005daa);font-weight:700}
@media(prefers-color-scheme:dark){.expiry-row-when.is-expired,.expiry-row-when.is-near,.expiry-row-when.is-expired small,.expiry-row-when.is-near small{color:#ff6d78}[data-expiry-root] .expiry-view-toggle{background:#111!important;color:#8fc3ff;border-color:#333}[data-expiry-root] .expiry-row{background:#000!important;color:#e6edf3}.expiry-card-close span,.expiry-row-main em{color:#8fc3ff}.expiry-row-main em{color:#ff8a9c}}

/* beat mobile `.panel button{height:var(--mobile-control-height)!important}` */
.panel [data-expiry-root] button.expiry-view-toggle.expiry-view-toggle{min-height:44px!important;height:44px!important;padding:0 12px!important;border-radius:8px!important}
.panel [data-expiry-root] button.expiry-row.expiry-row{min-height:52px!important;height:auto!important;padding:8px 10px!important;border-radius:10px!important}
.panel [data-expiry-root] button.expiry-card-close.expiry-card-close{min-height:44px!important;height:auto!important}

/* 操作区收起：数据库式查找，只留搜索+部门 */
[data-expiry-root].is-ops-collapsed [data-expiry-ops]{display:none}
.expiry-lookup-bar{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(88px,.85fr);gap:6px;margin:0 0 4px;align-items:center}
.expiry-lookup-bar input[type=search],.expiry-lookup-bar select{min-width:0;width:100%;min-height:36px;padding:5px 8px;font-size:14px;border-radius:6px;box-sizing:border-box}
.expiry-ops-filter{margin:4px 0 2px}
.expiry-ops-filter select{width:100%;min-height:32px;padding:4px 6px;font-size:13px}
.panel [data-expiry-root] button.expiry-view-toggle.expiry-view-toggle{min-width:104px}

/* 仅箭头：整段商品列表显隐（对齐展示品 hidden） */
[data-expiry-root] .expiry-list-arrow{flex:0 0 auto;min-width:44px;width:44px;min-height:44px;height:44px;padding:0;font-size:16px;font-weight:700;line-height:1;border-radius:8px}
.panel [data-expiry-root] button.expiry-list-arrow.expiry-list-arrow{min-height:44px!important;height:44px!important;width:44px!important;padding:0!important}
.expiry-list-section[hidden]{display:none!important}

/* 按部门分组（对齐截图：▶ 部门 + 右侧统计） */
[data-expiry-root] .expiry-dept-row{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:48px;margin:6px 0;padding:10px 12px;text-align:left;background:#fff;color:inherit;font:inherit;font-weight:400;cursor:pointer;border:1px solid var(--line,#d7dde5);border-radius:10px;box-sizing:border-box}
[data-expiry-root] .expiry-dept-main{display:flex;align-items:center;gap:8px;min-width:0}
[data-expiry-root] .expiry-dept-arrow{flex:0 0 auto;color:var(--costco-blue,#005daa);font-size:12px;line-height:1;width:1em}
[data-expiry-root] .expiry-dept-row strong{font-size:15px;font-weight:700;color:var(--text,#1a2b3c)}
[data-expiry-root] .expiry-dept-meta{flex:0 0 auto;font-size:12px;color:var(--muted,#6b7c8f);white-space:nowrap}
[data-expiry-root] .expiry-dept-body{padding:0 0 4px 4px;margin:0 0 8px}
[data-expiry-root] .expiry-dept-body .expiry-row,[data-expiry-root] .expiry-dept-body .expiry-card{margin-left:2px}
.panel [data-expiry-root] button.expiry-dept-row.expiry-dept-row{min-height:48px!important;height:auto!important;padding:10px 12px!important;border-radius:10px!important}
@media(prefers-color-scheme:dark){
 [data-expiry-root] .expiry-dept-row{background:#111;border-color:#333}
 [data-expiry-root] .expiry-dept-row strong{color:#e8eef5}
 [data-expiry-root] .expiry-dept-arrow{color:#8fc3ff}
 [data-expiry-root] .expiry-dept-meta{color:#9aabbc}
}

/* Daily 文件名行已移除：仅保留导出按钮（未导入时仍显示提示） */
[data-expiry-root] [data-expiry-source][hidden]{display:none!important}
.expiry-source-row.is-no-source{justify-content:flex-start}

/* ===== navigation.css ===== */
/* 导航：9 个栏目做成卡片网格，图标为 3D PNG。
   外层吸顶由 ui-refresh.css 负责，这里只接管列数、卡片外观、选中态。
   红色退场（留给缺货/错误/删除），选中改用青色描边。 */

main>.tabs{
  display:grid!important;
  grid-template-columns:repeat(9,minmax(0,90px))!important;
  justify-content:center;
  align-content:center;
  gap:10px;
  padding:9px 8px;
  background:var(--soft,#f5f7fa);
  border:0;
  border-radius:0;
  box-shadow:none;
}

main>.tabs button[data-tab]{
  width:auto;
  grid-column:auto!important;
  height:auto!important;
  min-height:78px!important;
  gap:5px!important;
  padding:9px 4px 7px!important;
  background:#fff!important;
  border:1px solid #e2e7ee!important;
  border-radius:14px!important;
  color:#233246!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
  transition:background-color .16s ease,border-color .16s ease,transform .16s ease;
}

main>.tabs button[data-tab] span{
  font-size:13.5px;
  font-weight:600;
  line-height:1.15;
  letter-spacing:.2px;
}

/* 图里只有中文，英文副标题隐藏（保留 DOM，方便以后恢复）。 */
main>.tabs button[data-tab] small{display:none!important}

main>.tabs button[data-tab] img.tab-icon{
  display:block;
  width:40px;height:40px;
  object-fit:contain;
  margin:0;
  padding:0;
  border:0;
  background:none!important;
  transition:transform .18s ease;
}

main>.tabs button[data-tab]:not(.active):hover{
  background:#fbfdff!important;
  border-color:#c8d6e5!important;
  color:#0f2b44!important;
}
main>.tabs button[data-tab]:not(.active):hover img.tab-icon{transform:translateY(-1px) scale(1.04)}

main>.tabs button[data-tab].active{
  background:#f0fffd!important;
  border-color:#18c4d4!important;
  box-shadow:inset 0 0 0 1px #18c4d4!important;
  color:#0d3b44!important;
}
main>.tabs button[data-tab].active img.tab-icon{transform:translateY(-1px)}

main>.tabs button:focus-visible{outline:2px solid #18c4d4;outline-offset:2px}

/* 手机：5 列 × 2 行，整块压到视口 20% 左右。
   9 个栏目按 5+4 排；下排两端的「缺货 / 关注」保持上排列宽，
   中间的「库存 / 订单」吃掉剩余空间，整行铺满。 */
@media(max-width:700px){
  main>.tabs{
    display:flex!important;
    flex-wrap:wrap;
    justify-content:center;
    align-content:center;
    gap:8px;
    padding:7px 12px;
  }
  main>.tabs button[data-tab]{
    flex:0 0 calc((100% - 32px)/5);
    width:auto;
    grid-column:auto!important;
    height:auto!important;
    min-height:64px!important;
    gap:4px!important;
    padding:6px 1px 4px!important;
    border-radius:13px!important;
  }
  main>.tabs button[data-tab] span{font-size:12px;line-height:1.12;letter-spacing:0}
  main>.tabs button[data-tab] img.tab-icon{width:31px;height:31px;margin:0}
  /* 下排 4 个等宽铺满：不再单独加宽「库存 / 订单」，
     四张卡平均分配整行，视觉重量一致。 */
  main>.tabs button[data-tab]:nth-child(n+6){
    flex:0 0 calc((100% - 24px)/4);
    min-width:0;
  }
}

/* 窄屏（360 / 375）再退半档，避免四字栏目顶到卡片边。 */
@media(max-width:380px){
  main>.tabs{gap:6px;padding:6px 8px}
  main>.tabs button[data-tab]{
    flex:0 0 calc((100% - 24px)/5);
    min-height:60px!important;
    padding:5px 1px 4px!important;
  }
  main>.tabs button[data-tab]:nth-child(n+6){flex:0 0 calc((100% - 18px)/4)}
  main>.tabs button[data-tab] img.tab-icon{width:29px;height:29px}
  main>.tabs button[data-tab] span{font-size:11.5px}
}

@media(prefers-color-scheme:dark){
  main>.tabs{background:#000;border:0;box-shadow:none}
  main>.tabs button[data-tab]{
    background:#171a1f!important;
    border-color:#2a2f37!important;
    color:#eef3f8!important;
    box-shadow:none!important;
  }
  main>.tabs button[data-tab]:not(.active):hover{
    background:#1e232a!important;
    border-color:#3a424d!important;
    color:#fff!important;
  }
  main>.tabs button[data-tab].active{
    background:#0f1d1f!important;
    border-color:#26d8ea!important;
    box-shadow:inset 0 0 0 1px #26d8ea!important;
    color:#fff!important;
  }
}

/* ===== product-modules.css ===== */
/* 库存商品详情：一张总卡（分区用细线，不再多张嵌套卡） */
.product-card.product-card-one,
.lookup-card.product-card.product-card-one{
  box-sizing:border-box;min-width:0;width:100%;
  padding:12px 12px 10px!important;
  border:1px solid #dce7f0;border-radius:12px;background:#fff;
  overflow:hidden;
}
.product-card-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:0 0 6px;min-width:0}
.product-card-hero-main{flex:1;min-width:0}
.product-card-hero .module-product-title{display:block;margin:0;font-size:16px;line-height:1.35;font-weight:750;overflow-wrap:anywhere}
.product-card-hero-meta{display:block;margin-top:3px;font-size:12px;line-height:1.3;color:var(--muted,#64748b);font-variant-numeric:tabular-nums}
.product-card-hero-oh{flex:0 0 auto;text-align:right;padding-top:1px;min-width:52px}
.product-card-hero-oh>span{display:block;font-size:11px;line-height:1.2;color:var(--muted,#64748b)}
.product-card-hero-oh>b,
.product-card-hero-oh .stock-value{display:block;font-size:28px;line-height:1.1;color:#cf2834;font-variant-numeric:tabular-nums;font-weight:800}

/* 分区：细分割线 + 小标题，无独立边框卡 */
.product-card-one>.product-module{
  box-sizing:border-box;min-width:0;
  margin:0;padding:7px 0 5px;
  border:0;border-top:1px solid #dce7f0;border-radius:0;background:transparent;
}
.product-card-one>.product-module+.product-module{margin-top:0}
.module-label{margin:0 0 4px;font-size:12px;line-height:1.3;font-weight:700;color:#005daa;letter-spacing:.02em}
.module-product-title{display:block;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.product-card .lookup-grid{margin-top:0;gap:3px 10px}
.product-card .module-stock-line{display:flex;align-items:baseline;gap:10px;font-size:13px}
.product-card .module-stock-line>b{font-size:20px;font-variant-numeric:tabular-nums;color:#cf2834}
.product-card-one .module-stock .module-stock-line{display:none} /* OH 已在顶栏 */
.product-card .sales-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 8px;padding:8px;background:#f3f6f9;border-radius:8px}
.product-card .sales-preview>span{display:flex;flex-direction:column;gap:2px;align-items:center;text-align:center;font-size:11px;color:var(--muted,#64748b);min-width:0}
.product-card .sales-preview>span>b{font-size:15px;color:var(--text,#1a2b3c);font-variant-numeric:tabular-nums}
.product-card .sales-preview>span:first-child>b{color:#cf2834}
.product-card .sales-preview .sales-amount{font-size:11px;line-height:1.4;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.product-card .sales-preview>span:first-child>.sales-amount{color:#cf2834}
.product-card .sales-detail{margin-top:0;padding-top:0}
.product-card .module-orders p{margin:0 0 6px;line-height:1.5}
.product-card .module-orders .future-order{margin:0}
.product-card .module-orders p:last-child{margin-bottom:0}

/* 操作按钮等宽 */
.module-action-buttons{display:flex;flex-wrap:nowrap;align-items:stretch;gap:8px;min-width:0;width:100%;box-sizing:border-box;margin:0 0 8px}
.module-action-buttons>.quick-watch,
.module-action-buttons>.quick-shortage{flex:1 1 0;min-width:0;margin:0!important;padding:0!important;border:0!important;border-top:0!important;display:block;background:transparent}
.panel .module-action-buttons>.quick-watch>button,
.panel .module-action-buttons>.quick-shortage>button,
.panel .module-action-buttons>button{width:100%;min-width:0;min-height:40px!important;height:auto!important;padding:9px 8px!important;font-size:13px!important;box-sizing:border-box;white-space:normal}
.module-action-buttons .quick-watch-feedback,
.module-action-buttons .quick-shortage-feedback{display:block;margin-top:4px;font-size:12px}
.module-action-buttons .quick-watch-feedback:empty,
.module-action-buttons .quick-shortage-feedback:empty{display:none}

/* 品名搜索展开时：外层 summary 已有品名+OH，隐藏内卡顶栏避免重复 */
.product-card-one .module-basic .lookup-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.product-card-one .module-stock .sales-preview{padding:6px 8px;margin-bottom:0}
.product-card-one .module-orders p{margin:0 0 3px}
.product-card-one .module-orders .replenishment-preview{border:0;margin:5px 0 0;padding:0;font-size:13px;line-height:1.45}
.product-card-one .module-orders .replenishment-preview>div{margin-top:2px;gap:8px}
.product-card-one .module-orders .replenishment-preview>div>b{text-align:right}
.product-card-one .module-action-buttons{margin:0 0 4px}
.panel .product-card-one .module-action-buttons button{min-height:36px!important;padding:6px 8px!important}
.product-card-one .module-actions>p{margin:4px 0 0}
.product-card-one>.module-details{padding:2px 0 0}
.product-card-one .module-details>details{border:0;margin:0;padding:0}
.product-card-one .module-details>details>summary{min-height:32px;font-size:13px;cursor:pointer;align-content:center}
.product-card-one .module-details .sales-detail>summary{color:inherit}

.name-search-item .product-card-hero{display:none}
.name-search-item .product-card.product-card-one{border:0;border-radius:0;padding:0!important;background:transparent;box-shadow:none}
.name-search-item .product-card-one>.product-module:first-of-type{border-top:0;padding-top:4px}

/* 关注页等仍可能用独立 product-module */
.product-module{box-sizing:border-box;min-width:0;padding:10px;border:1px solid #dce7f0;border-radius:9px;background:#fff}
.product-module+.product-module{margin-top:8px}
.watch-row .watch-star-slot{flex-basis:80px}
.panel .watch-row button.watch-pin{position:absolute;top:-5px;right:64px;z-index:1;display:flex;align-items:center;justify-content:center;width:44px;height:44px!important;min-height:44px!important;max-height:44px!important;margin:0;padding:0!important;border:0!important;border-radius:8px;background:transparent!important;color:#005daa;font-size:11px!important;font-weight:650;line-height:1;touch-action:manipulation}
.panel .watch-row button.watch-pin[aria-pressed="true"]{color:#e31837}
.panel .watch-row button.watch-pin:focus-visible{outline:2px solid #005daa;outline-offset:-3px}
.watch-row.is-pinned{border-left:3px solid #005daa}
.watch-row-name .watch-row-flag{display:inline-block;margin-left:5px;font-weight:500}
.watch-row-detail .product-module{padding:8px;margin-bottom:8px}
.watch-row-detail .watch-metrics{border:0;padding:0}

@media(prefers-color-scheme:dark){
  .product-card.product-card-one,
  .lookup-card.product-card.product-card-one{background:#111;border-color:#293846}
  .product-card-hero-oh>b,
  .product-card-hero-oh .stock-value{color:#ff6d78}
  .product-card-one>.product-module{border-top-color:#293846}
  .product-card .sales-preview{background:#0a1620}
  .product-card .sales-preview>span>b{color:#e6edf5}
  .product-card .sales-preview>span:first-child>b,
  .product-card .sales-preview>span:first-child>.sales-amount{color:#ff6d78}
  .module-label,.panel .watch-row button.watch-pin{color:#9dcfff}
  .panel .watch-row button.watch-pin[aria-pressed="true"]{color:#ff7188}
  .watch-row.is-pinned{border-left-color:#65aeec}
  .product-module{background:#000;border-color:#293846}
  .name-search-item .product-card.product-card-one{background:transparent}
}


/* Keep expandable sales details directly below the sales summary. */
.product-card-one .module-stock>.sales-detail{border:0;margin:4px 0 0;padding:0}
.product-card-one .module-stock>.sales-detail>summary{min-height:32px;font-size:13px;cursor:pointer;align-content:center;color:inherit}

/* Emphasize SKU while retaining the department label. */
.product-card-hero-meta .product-sku-highlight,
.name-result-meta .product-sku-highlight{font-size:16px;line-height:1.4;font-weight:800;color:#005daa;letter-spacing:.02em;font-variant-numeric:tabular-nums}
@media(prefers-color-scheme:dark){.product-card-hero-meta .product-sku-highlight,.name-result-meta .product-sku-highlight{color:#9dcfff}}

/* ===== name-search.css ===== */
/* Name searches scan compactly; article-number searches retain the detailed layout. */
.panel .name-search-item{padding:0!important;margin:7px 0;border-radius:9px;overflow:hidden}
.name-search-item>summary.name-result-summary{display:flex;align-items:center;gap:10px;min-height:66px;box-sizing:border-box;padding:10px 11px;cursor:pointer;list-style:none;touch-action:manipulation;color:inherit}
.name-result-summary::-webkit-details-marker{display:none}
.name-result-summary::marker{content:""}
.name-result-text{flex:1;min-width:0}
.name-result-text>strong{display:block;font-size:14px;line-height:1.45;font-weight:650;overflow-wrap:anywhere}
.name-result-meta{display:block;margin-top:4px;font-size:11px;line-height:1.3;color:var(--muted,#596979);font-variant-numeric:tabular-nums}
.name-result-quantity{flex:0 0 auto;min-width:48px;max-width:85px;text-align:right}
.name-result-quantity>small{display:block;font-size:10px;line-height:1.4;color:var(--muted,#596979)}
.name-result-quantity>b{display:block;font-size:16px;line-height:1.4;color:#005daa;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.name-result-chevron{flex:0 0 7px;width:7px;height:7px;margin:0 2px 3px;border-right:1.8px solid #70849a;border-bottom:1.8px solid #70849a;transform:rotate(45deg)}
.name-search-item[open]>.name-result-summary .name-result-chevron{transform:rotate(225deg);margin-bottom:0}
.name-search-item[open]>.name-result-summary{background:#eff6fd;border-bottom:1px solid #dce7f0}
.name-search-item>.name-order-detail,.name-search-item>[data-name-detail]{padding:0 7px}
.name-search-item>[data-name-detail]:not(:empty){padding:7px;font-size:13px;line-height:1.5}
.name-search-item .product-card{border:0;margin:0;padding:0!important;box-shadow:none}
.name-result-summary:focus-visible{outline:2px solid #005daa;outline-offset:-3px}
@media(prefers-color-scheme:dark){
 .name-result-quantity>b{color:#9dcfff}
 .name-search-item[open]>.name-result-summary{background:#071b2b;border-bottom-color:#293846}
 .name-result-summary:focus-visible{outline-color:#9dcfff}
}

/* ===== product-compare.css ===== */
.product-pk{margin:12px 0;border:1px solid var(--line,#ccd2da);border-radius:12px;min-width:0;color:inherit;background:var(--soft,#f7f8fa)}
.product-pk>summary{cursor:pointer;padding:12px;font-weight:800;font-size:1rem;list-style-position:inside;color:inherit}
.pk-body{padding:0 12px 12px;min-width:0}.pk-inputs,.pk-products{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.pk-inputs label{display:block;font-size:.85rem;font-weight:700;min-width:0}.pk-inputs input{display:block;width:100%;min-width:0;box-sizing:border-box;margin-top:5px;font-size:1rem;padding:10px;border-radius:9px}
.pk-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0 14px}.pk-controls label{display:flex;align-items:center;gap:7px;font-size:.8rem}.pk-controls select{min-width:0;max-width:160px;width:auto;padding:7px;font-size:.85rem}.pk-controls button{padding:8px 10px;font-size:.8rem;min-height:36px}
.pk-product{min-width:0;padding:8px 0}.pk-tag{font-size:.75rem;font-weight:800;color:inherit}.pk-product strong,.pk-product small{display:block;overflow-wrap:anywhere;margin-top:4px}.pk-product strong{font-size:.88rem;line-height:1.5}.pk-product small{font-size:.75rem;opacity:.75}
.pk-period-date{font-size:.75rem;line-height:1.5;margin:10px 0}.pk-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:.85rem}.pk-table th,.pk-table td{padding:10px 4px;border-bottom:1px solid var(--line,#ccd2da);text-align:right;overflow-wrap:anywhere;vertical-align:middle}.pk-table th:first-child{width:26%;text-align:left;font-weight:600}.pk-table thead{font-size:.75rem}.pk-table .pk-higher{color:#b91c3a;font-weight:800}
.pk-note,.pk-source{font-size:.74rem;line-height:1.6;opacity:.75;margin:10px 0;overflow-wrap:anywhere}
@media(prefers-color-scheme:dark){.product-pk{background:#000;border-color:#333}.pk-table .pk-higher{color:#ff8099}}


.product-pk.pk-inline{margin:8px 0;border:0;border-top:1px solid var(--line,#ccd2da);border-radius:0;background:transparent}.pk-inline .pk-body{padding:10px 0 0}.pk-inline-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,.7fr);gap:10px;align-items:end;margin-bottom:12px}.pk-inline-controls label{min-width:0;font-size:.8rem;font-weight:700}.pk-inline-controls input,.pk-inline-controls select{display:block;width:100%;min-width:0;box-sizing:border-box;margin:5px 0 0;padding:8px;font-size:.9rem;border-radius:9px}.module-action-buttons>[data-pk-open]{flex:1 1 0}.pk-inline [data-pk-results]:empty{display:none}

.pk-share-row td{padding:0 4px 10px}.pk-share{display:flex;height:10px;width:100%;overflow:hidden;border-radius:5px;background:var(--line,#ccd2da)}.pk-share-segment{display:block;background:#1767b6;min-width:0}.pk-share-segment+.pk-share-segment{box-shadow:inset 1px 0 0 rgba(255,255,255,.65)}.pk-share-segment.pk-share-leading{background:#b91c3a}.pk-share-labels{display:flex;justify-content:space-between;gap:8px;margin-top:5px;font-size:.73rem}.pk-share-state{font-size:.75rem;text-align:center;margin:3px 0;opacity:.75}@media(prefers-color-scheme:dark){.pk-share-segment{background:#8bbfff}.pk-share-segment.pk-share-leading{background:#ff8099}}

/* ===== file-center.css ===== */
.file-center{border:1px solid var(--line);border-radius:10px;padding:10px;margin-bottom:10px;min-width:0;background:var(--soft)}
.file-center-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.file-center-heading h2{font-size:14px;margin:0}.file-center .file-picker{min-height:34px;font-size:12px;padding:5px 10px;background:var(--costco-blue);color:#fff;border:0}
.file-center-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.file-card{position:relative;display:flex;flex-direction:column;gap:4px;min-width:0;padding:8px;border:1px solid var(--line);border-radius:8px;cursor:pointer;background:var(--panel,#fff)}
.file-card strong{font-size:12px}.file-card [data-file-name]{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--muted)}
.file-card [data-file-date]{font-size:10px;color:var(--muted)}.file-card[data-file-present=true] strong{color:var(--costco-blue)}
.file-card input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.file-card:focus-within{outline:2px solid var(--costco-blue);outline-offset:2px}
.file-center-progress{font-size:12px;color:var(--muted);margin-top:7px;white-space:pre-line;overflow-wrap:anywhere}.file-center-progress:empty{display:none}.file-center-progress.error{color:#c62828}
.file-center-progress[data-percent]{padding-top:9px;background:linear-gradient(to right,var(--costco-blue,#e31837) 0,var(--costco-blue,#e31837) var(--progress,0%),var(--line,#e6e9ee) var(--progress,0%),var(--line,#e6e9ee) 100%) no-repeat top left/100% 3px;transition:background-size .2s ease}
.file-center-progress[data-percent]::after{content:attr(data-percent) '%';float:right;font-variant-numeric:tabular-nums;color:var(--muted);margin-left:8px}
.drop-overlay{position:fixed;inset:0;z-index:9999;display:none;align-items:center;justify-content:center;padding:24px;background:rgba(12,30,52,.55);backdrop-filter:blur(2px);pointer-events:none}
.drop-overlay.is-active{display:flex}
.drop-overlay>div{max-width:min(90vw,420px);padding:26px 30px;border:2px dashed rgba(255,255,255,.75);border-radius:16px;background:rgba(255,255,255,.96);color:#172b40;text-align:center;box-shadow:0 18px 48px rgba(0,0,0,.25)}
.drop-overlay strong{display:block;font-size:18px;margin-bottom:6px}
.drop-overlay span{font-size:13px;color:#5b6b7d}
@media(prefers-color-scheme:dark){.drop-overlay>div{background:#111;color:#eee;border-color:rgba(255,255,255,.45)}.drop-overlay span{color:#9fb0c0}}
.file-center .import-confirm{margin-top:8px}.file-type-dialog{max-width:min(92vw,380px);padding:18px;border:1px solid var(--line);border-radius:12px}.file-type-dialog button{display:block;width:100%;margin-top:8px}
@media(prefers-color-scheme:dark){.file-center,.file-card,.file-type-dialog{background:#000;color:#eee}.file-card[data-file-present=true] strong{color:#75baff}}

.panel .upload-box>label:first-child{display:block}


.file-center-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}
.file-center .file-center-toggle{display:inline-flex;align-items:center;justify-content:center;gap:3px;min-width:52px;min-height:36px;padding:4px 6px;border:1px solid var(--line);border-radius:7px;background:transparent;color:var(--costco-blue);font-size:12px;cursor:pointer}
.file-center-toggle svg{flex-shrink:0}.file-center-toggle[aria-expanded=false] svg{transform:rotate(180deg)}
[data-file-center-body][hidden]{display:none!important}
@media(prefers-color-scheme:dark){.file-center .file-center-toggle{color:#75baff}}


/* Keep the collapsed file center to a single compact toolbar. */
.file-center{padding:6px 8px;margin-bottom:8px;border-radius:8px}
.file-center-heading{min-height:30px;gap:6px;margin-bottom:6px}
.file-center.is-collapsed .file-center-heading{margin-bottom:0}
.file-center-heading h2{font-size:13px;line-height:1.2}
.file-center-actions{gap:4px}
.file-center .file-picker{height:30px;min-height:30px;margin:0;padding:4px 8px;font-size:12px;line-height:1.2;border-radius:6px}
.file-center .file-center-toggle{height:30px;min-height:30px;min-width:46px;padding:4px 5px;gap:2px;font-size:12px;line-height:1.2;border-radius:6px}
.file-center-toggle svg{width:14px;height:14px}


/* Keep sync controls inside the expandable file area. */
body>header{display:none!important}
body>main{margin-top:6px;padding-top:env(safe-area-inset-top,0px)}
.file-center .private-cloud-entry{display:inline-flex;align-items:center;min-height:28px;max-width:100%;margin-top:4px;padding:3px 0;border:0;border-radius:0;background:transparent;color:var(--muted);font-size:11px;font-weight:400;line-height:1.2}

.file-card [data-file-summary]{font-size:10px;line-height:1.4;color:var(--muted);overflow-wrap:anywhere}

/* 收起时标题与按钮之间会留下一段空白，用一句状态摘要把这一行填实：
   桌面显示「缺哪几个文件」，手机上宽度不够就不显示。 */
.file-center-brief{flex:1 1 auto;min-width:0;margin-left:10px;font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file-center-brief:empty{display:none}
.file-center:not(.is-collapsed) .file-center-brief{display:none}
@media(max-width:700px){.file-center-brief{display:none!important}}

/* ===== display-locations.css ===== */
/* 陈列（端架 / QUAD）页面。导航：手机两排 5+4，电脑单排 9 格。 */
main>nav.tabs{grid-template-columns:repeat(9,minmax(0,1fr))}
@media(max-width:700px){
 main>nav.tabs{grid-template-columns:repeat(20,minmax(0,1fr))}
 main>nav.tabs button[data-tab]{grid-column:span 5}
 main>nav.tabs button[data-tab="departmentSales"],main>nav.tabs button[data-tab="expiry"],main>nav.tabs button[data-tab="replenishment"],main>nav.tabs button[data-tab="display"],main>nav.tabs button[data-tab="displayLocations"]{grid-column:span 4}
}
.dl-page{--dl-card:#fff;--dl-up:#d1203a;--dl-down:#1f8a4c}
.dl-stamp{font-size:12px;color:var(--muted);margin:4px 0 8px;line-height:1.5}
.dl-feedback{font-size:13px;color:var(--costco-blue);margin:0 0 6px;min-height:0}
.dl-feedback:empty{display:none}
.dl-list{display:grid;gap:8px;margin:8px 0}
@media(min-width:701px){.dl-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
.dl-card{display:flex;flex-direction:column;align-items:stretch;gap:6px;width:100%;text-align:left;border:1px solid var(--line);border-radius:12px;padding:12px;background:var(--dl-card);color:inherit;font:inherit;cursor:pointer;min-height:0;height:auto}
.dl-card:active{transform:scale(.995)}
.dl-card-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.dl-card-head strong{font-size:17px;line-height:1.3;overflow-wrap:anywhere}
.dl-chevron{font-size:22px;color:var(--muted);line-height:1}
.dl-card-meta{font-size:13px;color:var(--muted);margin:0;line-height:1.5}
.dl-badge{display:inline-block;font-size:12px;font-weight:700;padding:2px 8px;border-radius:999px;background:#e8f1fb;color:#005daa;white-space:nowrap;margin-right:4px}
.dl-badge.quad{background:#fdecef;color:#c4122f}
.dl-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.dl-metrics-2{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:6px}
.dl-metric{display:flex;flex-direction:column;gap:1px;background:var(--soft);border:1px solid var(--line);border-radius:9px;padding:7px 8px;min-width:0}
.dl-metric span{font-size:12px;color:var(--muted)}
.dl-metric b{font-size:15px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.dl-metric small{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.dl-metric .dl-trend{font-size:11px;font-weight:700;color:var(--muted)}
.dl-metric .dl-trend.up{color:var(--dl-up)}
.dl-metric .dl-trend.down{color:var(--dl-down)}
.dl-wide{width:100%;margin:6px 0}
.dl-row{display:flex;gap:8px;align-items:stretch}
.dl-row>*{flex:1 1 0;min-width:0}
.dl-bar{display:flex;align-items:center;gap:8px;margin:2px 0 6px;flex-wrap:wrap}
.dl-bar .dl-back{min-height:38px;padding:6px 10px}
.dl-title{font-size:18px;flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.dl-bar-actions{display:flex;gap:6px}
.dl-bar-actions button{min-height:38px;padding:6px 10px}
.dl-summary{border:1px solid var(--line);border-radius:12px;padding:10px;margin:6px 0 10px;background:var(--dl-card)}
.dl-summary .dl-card-meta{margin-bottom:6px}
.dl-segment{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:3px;border:1px solid var(--line);border-radius:10px;background:var(--soft);margin:8px 0}
.dl-segment button{min-height:36px;border:0;border-radius:8px;background:transparent;color:var(--costco-blue);font-weight:600;font-size:14px}
.dl-segment button.active{background:var(--costco-red);color:#fff}
.dl-search{width:100%;box-sizing:border-box}
.dl-board{border:1px solid var(--line);border-radius:12px;padding:10px;margin:10px 0;background:var(--dl-card)}
.dl-board h3{margin:0 0 6px;font-size:16px}
.dl-board h3 small{font-size:12px;color:var(--muted);font-weight:500;margin-left:4px}
.dl-sku{border-top:1px solid var(--line);padding:8px 0}
.dl-sku:first-of-type{border-top:0}
.dl-sku-head{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}
.dl-sku-name{font-weight:600;font-size:14px;overflow-wrap:anywhere}
.dl-sku-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px 8px;font-size:13px;color:var(--muted);margin-top:4px}
.dl-sku-grid b{color:#172b40;font-weight:700;font-variant-numeric:tabular-nums}
.dl-sku-order{grid-column:1/-1}
.dl-out{color:var(--costco-red)!important}
.dl-out-badge{display:inline-block;margin-left:4px;font-size:11px;font-weight:700;color:#fff;background:var(--costco-red);border-radius:6px;padding:0 5px}
.dl-sku-actions{display:flex;gap:6px;justify-content:flex-end;margin-top:6px}
.dl-sku-actions select{min-height:36px;width:auto;flex:0 0 auto}
.dl-sku-actions button{min-height:36px;padding:5px 12px}
.dl-add{margin-top:8px}
.dl-add input{min-width:0}
.dl-add button{flex:0 0 auto}
.dl-hint{font-size:12px;color:var(--costco-blue);margin:4px 0 0;min-height:0}
.dl-hint.error{color:var(--costco-red)}
.dl-hint:empty{display:none}
.dl-form{display:grid;gap:10px;border:1px solid var(--line);border-radius:12px;padding:12px;background:var(--dl-card)}
.dl-form label{display:grid;gap:4px;font-size:14px;font-weight:600}
.dl-form label[hidden]{display:none}
.dl-form input,.dl-form select,.dl-form textarea{width:100%;box-sizing:border-box;font:inherit;font-weight:400}
.dl-type{border:0;padding:0;margin:0;display:flex;gap:16px;align-items:center}
.dl-type legend{font-size:14px;font-weight:600;padding:0;margin-bottom:4px;float:left;margin-right:12px}
.dl-type label{display:flex;align-items:center;gap:6px;font-weight:500}
.dl-type input{width:auto}
.dl-backup{margin:14px 0 4px;font-size:14px}
.dl-backup summary{cursor:pointer;color:var(--costco-blue);font-weight:600;min-height:36px;display:flex;align-items:center}
.dl-file{display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;cursor:pointer;text-align:center}
.dl-file input{position:absolute;inset:0;opacity:0;cursor:pointer}
@media(prefers-color-scheme:dark){
 .dl-page{--dl-card:#000;--dl-up:#ff6b82;--dl-down:#4cc38a}
 .dl-card,.dl-summary,.dl-board,.dl-form{background:#000;border-color:#333}
 .dl-metric{background:#0d0f12;border-color:#2a2f36}
 .dl-sku-grid b{color:#e6edf5}
 .dl-badge{background:#11263b;color:#9dcfff}
 .dl-badge.quad{background:#3a1520;color:#ff9aab}
 .dl-segment{background:#0e0e0e;border-color:#2a2a2a}
 .dl-segment button{color:#c5d9ec}
 .dl-segment button.active{background:#632432;color:#fff}
}
/* beat mobile `.panel button{height:var(--mobile-control-height)!important}` for card buttons */
.panel [data-dl-page] button.dl-card.dl-card{height:auto!important;min-height:64px!important;padding:12px!important;border-radius:12px!important;white-space:normal!important}
.panel [data-dl-page] button.dl-wide.dl-wide{height:44px!important;min-height:44px!important}
/* 从 Daily 查商品 */
.dl-sub{font-size:14px;margin:12px 0 6px;color:var(--muted);font-weight:700}
.dl-nodata{margin:8px 0;padding:10px 12px;border-radius:10px;background:#fff7e0;color:#7a5200;font-size:14px;border:1px solid #f1d58a}
.dl-product{border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin:8px 0;background:var(--dl-card)}
.dl-product .dl-card-meta{margin:4px 0}
.dl-product .dl-card-meta b{color:#172b40}
.dl-ptable{width:100%;border-collapse:collapse;font-size:13px;margin:6px 0;font-variant-numeric:tabular-nums;table-layout:fixed}
.dl-ptable th,.dl-ptable td{padding:4px 3px;text-align:right;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.dl-ptable th:first-child{text-align:left;color:var(--muted);font-weight:600;width:3.2em}
.dl-ptable thead th{color:var(--muted);font-weight:600}
.dl-placed{font-size:13px;margin:6px 0;color:var(--muted)}
.dl-placed.yes{color:var(--costco-blue);font-weight:700}
.dl-product-actions{display:flex;justify-content:flex-end}
.dl-picker{display:grid;gap:8px;margin-top:8px;padding:10px;border-radius:10px;background:var(--soft);border:1px solid var(--line)}
.dl-picker label{display:grid;gap:4px;font-size:13px;font-weight:600}
.dl-picker label[hidden]{display:none}
.dl-pick-new{display:grid;gap:8px}
.dl-pick-new[hidden]{display:none}
.dl-pick-new input{width:100%;box-sizing:border-box}
.dl-picker select{width:100%}
.dl-find{margin:10px 0}
.dl-suggest-box{display:grid;gap:4px;margin-top:6px}
.dl-suggest-box:empty{display:none}
.panel [data-dl-page] button.dl-suggest.dl-suggest{height:auto!important;min-height:40px!important;text-align:left;white-space:normal!important;display:flex;gap:6px;align-items:baseline;flex-wrap:wrap;padding:6px 10px!important}
.dl-suggest small{color:var(--muted);margin-left:auto}
@media(prefers-color-scheme:dark){
 .dl-product{background:#000;border-color:#333}
 .dl-product .dl-card-meta b{color:#e6edf5}
 .dl-nodata{background:#2a2108;color:#f3d38a;border-color:#5a4714}
 .dl-picker{background:#0d0f12;border-color:#2a2f36}
}
/* display-isi：撤销、匹配数、覆盖周数、备注、付费、导入预览、对话框 */
.dl-feedback{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.dl-feedback:empty{display:none}
.dl-feedback.error{color:var(--costco-red)}
.panel [data-dl-page] button.dl-undo.dl-undo{height:32px!important;min-height:32px!important;padding:2px 10px!important;font-size:13px}
details.dl-stamp summary{cursor:pointer;color:var(--muted);font-size:12px}
details.dl-stamp p{margin:4px 0 0;font-size:12px;color:var(--muted)}
.dl-metrics.dl-metrics-4{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.dl-metrics-4 .dl-metric{padding:6px}
.dl-metrics-4 .dl-metric b{font-size:14px}
.dl-metric small.dl-match{font-size:11px}
.dl-metric small.dl-match.partial{color:#a15c00}
.dl-rates{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--muted);margin:5px 0 0}
.dl-rates b{color:inherit}
.dl-rates b.up{color:var(--dl-up)}
.dl-rates b.down{color:var(--dl-down)}
.dl-warn-text,.dl-low{color:var(--costco-red);font-weight:700}
.dl-low-note{font-size:13px;color:var(--costco-red);margin:6px 0 0}
.dl-sku-head .dl-sku-dept{margin-left:auto;font-size:12px;color:var(--muted)}
.dl-paid{display:inline-block;font-size:11px;font-weight:700;color:var(--costco-red);border:1px solid var(--costco-red);border-radius:6px;padding:0 5px}
p.dl-sku-name{margin:2px 0 0;font-size:14px}
.dl-unmatched{color:var(--muted);font-weight:400}
.dl-sku-order{font-size:13px;color:var(--muted);margin:4px 0 0}
.dl-sku-order b{color:var(--costco-blue)}
.dl-note{margin:6px 0 0;padding:6px 8px;border-left:3px solid var(--costco-blue);background:var(--soft);font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}
.dl-details{margin:6px 0 0;font-size:13px}
.dl-details summary{cursor:pointer;color:var(--costco-blue);font-weight:600;min-height:32px;display:flex;align-items:center}
.dl-order-row{margin:2px 0;font-size:13px}
.dl-sku-actions{flex-wrap:wrap}
.dl-sku-actions .quick-watch,.dl-sku-actions .quick-shortage,.dl-product-actions .quick-watch,.dl-product-actions .quick-shortage{display:flex;align-items:center;gap:4px}
.dl-product-actions{gap:6px;flex-wrap:wrap}
.dl-loc-tools{margin:0 0 6px}
.dl-loc-tools button{min-height:36px}
.dl-wrap{flex-wrap:wrap;margin:6px 0}
.dl-threshold{display:flex;align-items:center;gap:6px;font-size:14px;margin:8px 0 2px}
.dl-threshold input{width:5em}
.dl-batch{margin-top:6px;font-size:13px}
.dl-batch summary{cursor:pointer;color:var(--costco-blue);font-weight:600}
.dl-batch textarea{width:100%;box-sizing:border-box;margin:6px 0;font:inherit}
.panel [data-dl-page] button.dl-suggest.dl-suggest{justify-content:space-between;align-items:center;flex-wrap:nowrap}
.dl-suggest span{display:flex;flex-direction:column;min-width:0;text-align:left}
.dl-suggest span small{margin-left:0;overflow-wrap:anywhere}
.dl-suggest em{font-style:normal;font-size:12px;text-align:right;color:var(--costco-blue);font-weight:700;flex:0 0 auto}
.dl-suggest[disabled] em{color:var(--muted)}
.dl-preview{border:2px solid var(--costco-blue);border-radius:12px;padding:10px 12px;margin:8px 0;background:var(--dl-card)}
.dl-preview h3{margin:0 0 6px;font-size:16px}
.dl-preview-groups{display:grid;gap:6px;margin:8px 0}
.dl-preview-groups label{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}
.dl-preview-groups select{max-width:55%}
.dl-check{display:flex!important;align-items:flex-start;gap:6px;font-size:13px;margin:6px 0;font-weight:500!important}
.dl-check input{width:auto;margin-top:3px}
.dl-dialog{border:1px solid var(--line);border-radius:14px;padding:14px;width:min(92vw,420px);box-sizing:border-box}
.dl-dialog::backdrop{background:rgba(0,0,0,.4)}
.dl-dialog h3{margin:0 0 8px;font-size:17px}
.dl-dialog form{display:grid;gap:8px}
.dl-dialog label{display:grid;gap:4px;font-size:14px;font-weight:600}
.dl-dialog label[hidden]{display:none}
.dl-dialog select,.dl-dialog textarea{width:100%;box-sizing:border-box;font:inherit;font-weight:400}
@media(prefers-color-scheme:dark){
 .dl-preview,.dl-dialog{background:#000;color:#e6edf5;border-color:#333}
 .dl-metric small.dl-match.partial{color:#f3b35a}
}
/* display-gptlook：视觉对齐 w.zlorne.chatgpt.site「陈列 ISI」（只改样式） */
.dl-page{--g-blue:var(--costco-blue,#005daa);--g-red:var(--costco-red,#e31837);--g-muted:var(--muted,#5b6b7b);--g-ink:#152a3b;--g-soft:var(--soft,#f4f7fa);--g-card:#fff;--g-up:#cf1434;--g-down:#17824f;min-width:0;overflow-wrap:anywhere}
#view>h2:has(+.dl-page){font-size:18px;margin:0 0 4px}
#view>h2:has(+.dl-page)::before{content:'W5564 · MERCHANDISING';display:block;font-size:10px;font-weight:700;letter-spacing:1.3px;color:var(--costco-blue,#005daa);margin:0 0 3px}
.dl-page p{line-height:1.6}
/* 数据截至 / 提示 */
.dl-page details.dl-stamp{font-size:11px;margin:5px 0;color:var(--g-muted)}
.dl-page details.dl-stamp>summary{font-size:11px;min-height:32px;display:flex;align-items:center;cursor:pointer;color:var(--g-muted)}
.dl-page details.dl-stamp p{font-size:11px;margin:4px 0}
.dl-page .dl-feedback{font-size:12px;border-left:3px solid #dfab2e;background:#fff9e9;color:var(--g-ink);padding:8px 10px;border-radius:4px;margin:9px 0}
.dl-page .dl-feedback:empty{display:none}
.dl-page .dl-feedback.error{border-color:var(--g-red);color:#b81935;background:#fff1f3}
/* 汇总：一个外框 2×2，蓝色金额 */
.dl-page .dl-summary{border:0;padding:0;margin:10px 0;background:transparent}
.dl-page .dl-summary>.dl-card-meta{font-size:11px;color:var(--g-muted);margin:0 0 6px}
.dl-page .dl-summary>.dl-card-meta b{font-size:14px;color:inherit;font-weight:700}
.dl-page .dl-metrics.dl-metrics-4{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border:1px solid var(--line);border-radius:10px;overflow:hidden;margin:6px 0 0;background:transparent}
.dl-page .dl-metrics-4 .dl-metric{background:transparent;border:0;border-radius:0;border-bottom:1px solid var(--line);padding:9px 10px;gap:0;min-width:0}
.dl-page .dl-metrics-4 .dl-metric:nth-child(odd){border-right:1px solid var(--line)}
.dl-page .dl-metrics-4 .dl-metric:nth-last-child(-n+2){border-bottom:0}
.dl-page .dl-metric>span{display:block;color:var(--g-muted);font-size:11px;font-weight:400}
.dl-page .dl-metric>b{display:block;font-size:18px;line-height:1.5;letter-spacing:-.4px;font-variant-numeric:tabular-nums;color:var(--g-blue);font-weight:700}
.dl-page .dl-metric>small{display:block;font-size:10px;line-height:1.5;color:var(--g-muted)}
.dl-page .dl-metric>small.dl-match.partial{color:#a15c00}
.dl-page .dl-metrics-2{gap:6px;margin-top:8px}
.dl-page .dl-metrics-2 .dl-metric{background:var(--g-soft);border:0;border-radius:7px;padding:8px}
.dl-page .dl-rates{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:var(--g-muted);margin:8px 0 2px}
.dl-page .dl-rates b{font-weight:700;color:inherit}
.dl-page .dl-rates b.up{color:var(--g-up)}
.dl-page .dl-rates b.down{color:var(--g-down)}
/* 部门 / 位置行：大号名称 */
.dl-page .dl-list{gap:8px;margin:10px 0}
.panel [data-dl-page] button.dl-card.dl-card{border:1px solid var(--line)!important;border-radius:10px!important;background:var(--g-card)!important;padding:11px 10px!important;min-height:47px!important;gap:4px;box-shadow:none}
.dl-page .dl-card .dl-card-head strong{font-size:22px;font-weight:800;line-height:1.25;font-variant-numeric:tabular-nums;color:var(--g-ink)}
.dl-page .dl-card .dl-chevron{color:var(--g-blue);font-size:22px}
.dl-page .dl-card>.dl-card-meta{font-size:10px;color:var(--g-muted);margin:0}
.dl-page .dl-card .dl-metrics-4{margin-top:6px}
.dl-page .dl-badge{font-size:10px;font-weight:600;padding:1px 6px;border-radius:4px;background:transparent;border:1px solid currentColor;color:var(--g-blue)}
.dl-page .dl-badge.quad{background:transparent;color:var(--g-red)}
.dl-page .dl-warn-text,.dl-page .dl-low{color:var(--g-red)}
/* 顶栏、按钮、筛选 */
.dl-page .dl-bar{margin:4px 0 8px}
.dl-page .dl-title{font-size:22px;font-weight:800;line-height:1.25;color:var(--g-ink)}
.panel [data-dl-page] .dl-bar button,.panel [data-dl-page] .dl-loc-tools button,.panel [data-dl-page] .dl-sku-actions button,.panel [data-dl-page] .dl-product-actions button,.panel [data-dl-page] .dl-row>button,.panel [data-dl-page] .dl-file{height:auto!important;min-height:36px!important;font-size:12px!important;padding:6px 9px!important;line-height:1.35!important;border-radius:7px!important}
.panel [data-dl-page] .dl-sku-actions button,.panel [data-dl-page] .dl-product-actions button{min-height:33px!important;padding:5px 8px!important;font-weight:600}
.panel [data-dl-page] button.dl-wide.dl-wide{height:auto!important;min-height:40px!important;font-size:13px!important;border-radius:9px!important}
.dl-page .danger{color:var(--g-red)}
.dl-page .dl-segment{border-radius:9px}
.dl-page .dl-search{min-height:40px;font-size:16px;border-radius:6px}
.dl-page .dl-sub{font-size:14px;color:var(--g-ink);margin:12px 0 6px}
/* 板 / 商品卡 */
.dl-page .dl-board{border:1px solid var(--line);border-radius:10px;background:var(--g-card);padding:0 9px 9px;margin:8px 0}
.dl-page .dl-board>h3{font-size:22px;font-weight:800;line-height:1.25;margin:0;padding:11px 1px 7px;color:var(--g-ink)}
.dl-page .dl-board>h3 small{display:block;font-size:10px;font-weight:400;color:var(--g-muted);margin-top:2px}
.dl-page .dl-sku{border-top:1px solid var(--line);padding:11px 0 5px}
.dl-page .dl-sku-head{display:flex;align-items:center;gap:6px}
.dl-page .dl-sku-head .product-sku-highlight{font-size:18px;font-weight:700;color:var(--g-blue);background:transparent;padding:0;font-variant-numeric:tabular-nums}
.dl-page .dl-sku-head .dl-sku-dept{margin-left:auto;font-size:10px;color:var(--g-muted)}
.dl-page .dl-paid{order:2;margin-left:auto;font-size:10px;font-weight:400;color:var(--g-red);border:1px solid currentColor;border-radius:4px;padding:1px 4px}
.dl-page .dl-paid~.dl-sku-dept{order:3;margin-left:0}
.dl-page p.dl-sku-name{font-size:13px;font-weight:400;line-height:1.55;margin:4px 0 8px}
.dl-page .dl-sku-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;background:var(--g-soft);border-radius:7px;padding:8px;margin:0;font-size:10px;color:var(--g-muted)}
.dl-page .dl-sku-grid>span{display:block;font-size:10px;color:var(--g-muted)}
.dl-page .dl-sku-grid b{display:block;font-size:14px;margin-top:2px;color:var(--g-ink);font-variant-numeric:tabular-nums}
.dl-page .dl-sku-order{font-size:11px;margin:7px 0;color:var(--g-muted)}
.dl-page .dl-sku-order b{color:var(--g-red)}
.dl-page .dl-note{font-size:12px;border-left:2px solid var(--g-blue);padding:5px 8px;background:var(--g-soft);margin:7px 0}
.dl-page .dl-details{margin:5px 0}
.dl-page .dl-details>summary{font-size:12px;font-weight:400;color:var(--g-blue);min-height:36px}
.dl-page .dl-ptable{font-size:12px}
.dl-page .dl-ptable th,.dl-page .dl-ptable td{padding:7px 3px}
.dl-page .dl-ptable thead th{font-weight:500;color:var(--g-muted)}
.dl-page .dl-sku-actions{justify-content:flex-start;gap:6px;margin:7px 0 0}
.dl-page .dl-sku-actions .quick-watch,.dl-page .dl-sku-actions .quick-shortage,.dl-page .dl-product-actions .quick-watch,.dl-page .dl-product-actions .quick-shortage{display:contents}
.dl-page .quick-watch-feedback:empty,.dl-page .quick-shortage-feedback:empty{display:none}
.dl-page .dl-sku-actions select{min-height:33px;font-size:12px;padding:4px 6px}
/* 添加面板 / 结果 */
.dl-page .dl-add{border:1px solid var(--g-blue);border-radius:9px;padding:11px;margin:10px 0 0;background:var(--g-soft)}
.dl-page .dl-add input{min-height:40px;font-size:16px}
.dl-page .dl-hint{font-size:11px}
.dl-page .dl-suggest-box{gap:0;margin:7px 0}
.panel [data-dl-page] button.dl-suggest.dl-suggest{width:100%;border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;background:transparent!important;color:inherit;padding:10px 2px!important;min-height:51px!important;gap:10px}
.dl-page .dl-suggest span{font-size:12px}
.dl-page .dl-suggest span b{color:var(--g-blue)}
.dl-page .dl-suggest span small{display:block;font-size:11px;line-height:1.5;margin-top:3px;color:var(--g-muted)}
.dl-page .dl-suggest em{font-size:12px;color:var(--g-blue)}
.dl-page .dl-batch{margin-top:10px;font-size:12px}
.dl-page .dl-batch>summary{min-height:36px;display:flex;align-items:center;font-weight:400;color:var(--g-blue)}
/* Daily 商品卡 / 加入陈列 */
.dl-page .dl-product{border-radius:10px;padding:11px 10px}
.dl-page .dl-product .dl-sku-head .product-sku-highlight{font-size:18px}
.dl-page .dl-picker{border:1px solid var(--g-blue);border-radius:9px;background:var(--g-soft)}
/* 管理 / 预览 / 对话框 */
.dl-page .dl-backup{border-top:1px solid var(--line);margin-top:15px;padding-top:5px;font-size:12px}
.dl-page .dl-backup>summary{font-size:13px;font-weight:400;color:var(--g-blue);min-height:40px}
.dl-page .dl-backup .feature-note{font-size:11px;color:var(--g-muted)}
.dl-page .dl-threshold{font-size:12px;gap:8px;flex-wrap:wrap;margin:10px 0}
.dl-page .dl-threshold input{width:80px;font-size:16px}
.dl-page .dl-file{border:1px solid var(--line);border-radius:7px;color:var(--g-blue);background:var(--g-card)}
.dl-page .dl-preview{border:1px solid var(--g-blue);border-radius:9px;padding:12px;margin:12px 0;background:var(--g-soft)}
.dl-page .dl-preview h3{margin:0 0 7px;font-size:16px}
.dl-page .dl-preview p,.dl-page .dl-preview label{font-size:12px}
.dl-dialog{width:min(92vw,440px);max-height:85dvh;overflow:auto;border:1px solid var(--line);border-radius:14px;color:#152a3b;background:#fff;padding:19px}
.dl-dialog::backdrop{background:#10203366}
.dl-dialog label{font-size:13px;font-weight:400;line-height:1.6}
.dl-page .dl-form{border-radius:10px}
.dl-page .dl-find{margin:10px 0}
.dl-page .dl-low-note{font-size:11px}
@media(min-width:760px){
 .dl-page .dl-metrics.dl-metrics-4{grid-template-columns:repeat(4,minmax(0,1fr))}
 .dl-page .dl-metrics-4 .dl-metric{border-bottom:0!important;border-right:1px solid var(--line)}
 .dl-page .dl-metrics-4 .dl-metric:last-child{border-right:0}
}
@media(max-width:390px){.dl-page .dl-sku-grid{padding:7px 6px;gap:4px}.dl-page .dl-sku-grid b{font-size:13px}}
@media(prefers-color-scheme:dark){
 .dl-page{--g-blue:#85bcf1;--g-red:#ff8294;--g-muted:#acbac9;--g-ink:#e8edf2;--g-soft:#0a0e12;--g-card:#000;--g-up:#ff8294;--g-down:#6fd9a7}
 #view>h2:has(+.dl-page)::before{color:#85bcf1}
 .dl-page .dl-feedback{background:#211b0c;color:#ead8a3}
 .dl-page .dl-feedback.error{background:#260d14;color:#ffb3bd}
 .dl-page .dl-metrics-4 .dl-metric{background:transparent}
 .dl-page .dl-metric>small.dl-match.partial{color:#f3b35a}
 .dl-page .dl-badge,.dl-page .dl-badge.quad{background:transparent}
 .dl-page .dl-board,.dl-page .dl-product{background:#000;border-color:#333}
 .dl-page .dl-sku-grid b{color:#e8edf2}
 .dl-page .dl-add,.dl-page .dl-picker,.dl-page .dl-preview{background:#0a0e12}
 .dl-page .dl-file{background:#000}
 .dl-dialog{background:#000;color:#e8edf2;border-color:#44515d}
}
.dl-page .dl-sku>.dl-sku-actions{display:inline-flex;vertical-align:top;margin-right:6px;flex-wrap:wrap}
.panel [data-dl-page] .dl-sku-actions select{height:33px!important;min-height:33px!important;font-size:12px!important;padding:4px 22px 4px 8px!important;width:auto!important;border-radius:6px!important}
.dl-page .dl-details>summary,.dl-page .dl-batch>summary,.dl-page .dl-backup>summary,.dl-page details.dl-stamp>summary{display:list-item;padding-top:9px}

