:root {
  /* PETCIRCLE 全局界面设计变量：新模块只使用 --ui-*，不得另起字体和正文颜色。 */
  --ui-color-title: #223047;
  --ui-color-text: #223047;
  --ui-color-muted: #6b7890;
  --ui-color-placeholder: #8793a5;
  --ui-color-border: #e4e8f5;
  --ui-color-control-border: #ccd7e2;
  --ui-color-primary: #3c7dff;
  --ui-color-primary-strong: #315fcb;
  --ui-color-primary-soft: #f2f6ff;
  --ui-color-success: #1fa971;
  --ui-color-warning: #f59e0b;
  --ui-color-danger: #ef476f;
  --ui-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  --ui-font-size-page-title: 22px;
  --ui-font-size-section-title: 16px;
  --ui-font-size-body: 14px;
  --ui-font-size-note: 13px;
  --ui-font-size-caption: 12px;
  --ui-font-weight-regular: 400;
  --ui-font-weight-medium: 500;
  --ui-font-weight-semibold: 600;
  --ui-font-weight-bold: 700;
  --ui-line-height: 1.45;
  --bg: #f7f8ff;
  --panel: rgba(255, 255, 255, .88);
  --panel-solid: #ffffff;
  --line: var(--ui-color-border);
  --line-soft: #f0f3fb;
  --text: var(--ui-color-text);
  --muted: var(--ui-color-muted);
  --pink: #ff7eb6;
  --violet: #9b7bff;
  --cyan: #35c9df;
  --mint: #45d6a3;
  --yellow: #ffd66b;
  --blue: var(--ui-color-primary);
  --green: var(--ui-color-success);
  --orange: var(--ui-color-warning);
  --red: var(--ui-color-danger);
  --shadow: 0 18px 45px rgba(73, 86, 135, .12);
  --font-sans: var(--ui-font-family);
  --font-size-body: var(--ui-font-size-body);
  --font-size-note: var(--ui-font-size-note);
  --font-weight-regular: var(--ui-font-weight-regular);
  --font-weight-medium: var(--ui-font-weight-medium);
  --font-weight-bold: var(--ui-font-weight-bold);
}

.ui-page-title {
  color: var(--ui-color-title);
  font-family: var(--ui-font-family);
  font-size: var(--ui-font-size-page-title);
  font-weight: var(--ui-font-weight-bold);
  line-height: 1.3;
}

.ui-section-title {
  color: var(--ui-color-title);
  font-family: var(--ui-font-family);
  font-size: var(--ui-font-size-section-title);
  font-weight: var(--ui-font-weight-semibold);
  line-height: 1.35;
}

.ui-body-text {
  color: var(--ui-color-text);
  font-family: var(--ui-font-family);
  font-size: var(--ui-font-size-body);
  font-weight: var(--ui-font-weight-regular);
  line-height: var(--ui-line-height);
}

.ui-note-text {
  color: var(--ui-color-muted);
  font-family: var(--ui-font-family);
  font-size: var(--ui-font-size-note);
  font-weight: var(--ui-font-weight-regular);
  line-height: var(--ui-line-height);
}
.quotation-layout { --quotation-list-height:clamp(360px,calc(100dvh - 345px),680px); display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.quotation-layout .span-3 { grid-column:1 / -1; }
.quotation-commandbar { display:flex; min-height:0; flex-direction:column; align-items:stretch; gap:4px; padding:5px 12px 6px; border-bottom:1px solid var(--line); background:rgba(255,255,255,.92); }
.quotation-command-primary { display:flex; min-width:0; min-height:34px; align-items:center; justify-content:space-between; gap:12px; }
.quotation-command-title,.quotation-command-actions,.quotation-zone-head,.quotation-result-toolbar,.quotation-rail-actions,.quotation-option-head { display:flex; align-items:center; gap:10px; }
.quotation-command-title { min-width:0; flex:1; }
.quotation-command-title h2 { flex:0 0 auto; margin:0; color:#17243a; font-size:22px; white-space:nowrap; }
.quotation-command-actions { flex:0 0 auto; flex-wrap:nowrap; justify-content:flex-end; gap:6px; }
.quotation-command-actions > button { min-height:34px; padding-top:6px; padding-bottom:6px; white-space:nowrap; }
.quotation-command-actions #quotationDataBtn { max-width:240px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.quotation-output-actions { display:flex; min-height:36px; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:nowrap; padding:2px 5px 2px 8px; border:1px solid #dce4f1; border-radius:9px; background:#f8faff; }
.quotation-output-actions > label { display:flex; align-items:center; gap:5px; color:#53627a; font-size:13px; white-space:nowrap; }
.quotation-output-actions input[type="checkbox"] { width:14px; height:14px; margin:0; accent-color:#315fcb; }
.quotation-output-actions .quotation-company-option { gap:6px; }
.quotation-output-actions .quotation-company-option select { width:180px; min-height:32px; padding:5px 8px; border:1px solid var(--ui-color-control-border); border-radius:7px; background:#fff; color:var(--ui-color-text); font-size:13px; }
.quotation-output-actions .quotation-company-option select:focus { border-color:var(--ui-color-primary); outline:2px solid rgba(49,95,203,.12); }
.quotation-output-actions .quotation-option-head { gap:3px; margin-right:auto; color:#34465d; font-size:13px; white-space:nowrap; }
.quotation-output-actions .quotation-generate-side { width:auto; min-height:32px; margin:0; padding:6px 10px; white-space:nowrap; }
.quotation-sync-status { padding:5px 9px; border-radius:999px; font-size:12px; font-weight: 600; background:#eef5fb; color:#17324d; white-space:nowrap; }
.quotation-sync-status.is-ok { background:#e8f7ef; color:#17633a; }
.quotation-sync-status.is-blocked { background:#fff0f0; color:#a12a2a; }
.keyword-help,
.quotation-help,
.info-dot {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid rgba(107, 120, 144, .45);
  border-radius: 50%;
  background: transparent;
  color: rgba(107, 120, 144, .72);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  vertical-align: 1px;
  cursor: help;
  opacity: .68;
}
.keyword-help:hover,
.keyword-help:focus-visible,
.quotation-help:hover,
.quotation-help:focus-visible,
.info-dot:hover,
.info-dot:focus-visible {
  border-color: rgba(85, 112, 217, .55);
  color: rgba(85, 112, 217, .85);
  opacity: 1;
  outline: none;
}
.keyword-help::after,
.quotation-help::after,
.info-dot::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 999;
  left: 0;
  top: calc(100% + 8px);
  width: max-content;
  max-width: min(320px, calc(100vw - 40px));
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(23, 36, 58, .96);
  color: rgba(255, 255, 255, .88);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  box-shadow: 0 8px 24px rgba(23, 36, 58, .16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: .14s ease;
  white-space: normal;
}
.keyword-help:hover::after,
.keyword-help:focus-visible::after,
.quotation-help:hover::after,
.quotation-help:focus-visible::after,
.info-dot:hover::after,
.info-dot:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
.quotation-zone-head .quotation-help::after,
.quotation-option-head .quotation-help::after { right:0; left:auto; }
.quotation-workbench { display:grid; grid-template-columns:minmax(0,1fr); min-height:0; align-items:stretch; border:1px solid var(--line); border-radius:14px; background:#fff; overflow:hidden; box-shadow:0 14px 36px rgba(73,86,135,.1); }
.quotation-category-rail,.quotation-selection-rail { min-width:0; padding:16px 14px; background:#fbfcff; }
.quotation-category-rail { display:flex; flex-direction:column; border-right:1px solid var(--line); }
.quotation-selection-rail { display:flex; height:100%; min-height:0; flex-direction:column; border-left:1px solid var(--line); }
.quotation-zone-head { justify-content:space-between; min-height:32px; }
.quotation-zone-head strong { font-size:16px; color:#17243a; }
.quotation-category-search,.quotation-keyword-filter input,.quotation-preset-filter select,.quotation-broken-filter select,.quotation-minimum-control input[type="number"] { width:100%; min-height:40px; border:1px solid #ccd7e2; border-radius:8px; padding:8px 10px; background:#fff; }
.quotation-rail-actions { justify-content:space-between; margin:8px 0; }
.quotation-preset-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; align-items:end; padding:10px 0; border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft); }
.quotation-preset-row label { display:flex; flex-direction:column; gap:4px; color:var(--muted); font-size:12px; }
.quotation-preset-row select { min-height:34px; padding:5px 8px; }
.quotation-categories { display:flex; flex-direction:column; gap:1px; max-height:280px; overflow:auto; margin-top:8px; padding:0 4px 0 0; }
.quotation-categories label { position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto 16px; gap:8px; align-items:center; min-height:36px; padding:6px 8px; border-radius:7px; cursor:pointer; }
.quotation-categories label:hover { background:#f2f6ff; }
.quotation-categories label.is-selected { background:#eaf1ff; color:#244da8; font-weight:600; }
.quotation-categories label.is-disabled { opacity:.55; cursor:not-allowed; }
.quotation-categories label::after { content:"✓"; visibility:hidden; color:#315fcb; font-size:14px; font-weight:700; }
.quotation-categories label.is-selected::after { visibility:visible; }
.quotation-categories label:has(input:focus-visible) { outline:2px solid #5b7ee5; outline-offset:-2px; }
.quotation-categories input[type="checkbox"] { position:absolute; width:1px; height:1px; overflow:hidden; opacity:0; pointer-events:none; }
.quotation-categories label span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.quotation-categories label em { color:#718096; font-size: 12px; font-style:normal; white-space:nowrap; }
.quotation-category-total { padding-top:10px; border-top:1px solid var(--line); color:#315fcb; font-weight: 600; }
.quotation-product-zone { display:flex; min-width:0; flex-direction:column; background:#fff; }
.quotation-search-line { display:grid; gap:0; padding:4px 14px; }
.quotation-search-scope,.quotation-search-refine { display:grid; min-height:44px; grid-template-columns:96px minmax(0,1fr); gap:12px; align-items:center; padding:4px 0; }
.quotation-search-scope { border-bottom:1px solid var(--line-soft); }
.quotation-filter-section-title { align-self:center; color:#26364e; font-size:13px; white-space:nowrap; }
.quotation-search-primary { display:grid; grid-template-columns:minmax(210px,250px) minmax(300px,1fr) 64px; gap:10px; align-items:center; }
.quotation-search-options { display:grid; grid-template-columns:minmax(280px,1.2fr) minmax(230px,.85fr) minmax(160px,.5fr) 112px; gap:10px; align-items:center; }
.quotation-category-filter,.quotation-keyword-filter,.quotation-preset-filter,.quotation-broken-filter,.quotation-minimum-filter { position:relative; display:grid; min-width:0; grid-template-columns:auto minmax(0,1fr); gap:6px; align-items:center; color:#34465d; font-size:13px; font-weight:600; }
.quotation-keyword-filter > span,.quotation-broken-filter > span,.quotation-minimum-filter > span,.quotation-category-filter > span { display:flex; min-height:18px; align-items:center; gap:4px; white-space:nowrap; }
.quotation-category-toggle { width:100%; min-height:36px; overflow:hidden; border:1px solid #ccd7e2; border-radius:8px; padding:6px 26px 6px 8px; background:#fff; color:#34465d; font-size:13px; font-weight:700; text-align:left; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
.quotation-category-toggle::after { content:"▾"; position:absolute; right:9px; bottom:10px; color:#718096; }
.quotation-category-dropdown { position:absolute; z-index:220; top:calc(100% + 6px); left:0; width:320px; padding:12px; border:1px solid #ccd7e2; border-radius:10px; background:#fff; box-shadow:0 16px 38px rgba(23,36,58,.2); }
.multi-filter-source { display:none !important; }
.multi-filter { position:relative; display:inline-block; min-width:132px; vertical-align:middle; }
.multi-filter-toggle { position:relative; width:100%; min-height:36px; overflow:hidden; border:1px solid #ccd7e2; border-radius:8px; padding:6px 28px 6px 9px; background:#fff; color:#34465d; font:inherit; text-align:left; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
.multi-filter-toggle::after { content:"▾"; position:absolute; right:9px; top:50%; color:#718096; transform:translateY(-50%); }
.multi-filter-toggle[aria-expanded="true"] { border-color:#5b7ee5; box-shadow:0 0 0 3px rgba(91,126,229,.12); }
.multi-filter-dropdown { position:absolute; z-index:260; top:calc(100% + 5px); left:0; width:max(220px,100%); max-width:min(360px,calc(100vw - 40px)); overflow:hidden; border:1px solid #ccd7e2; border-radius:10px; background:#fff; box-shadow:0 16px 38px rgba(23,36,58,.2); }
.multi-filter-actions { display:flex; justify-content:space-between; gap:8px; padding:8px 10px; border-bottom:1px solid #e8edf4; background:#f8faff; }
.multi-filter-actions button { border:0; padding:3px 5px; background:transparent; color:#315fcb; font-size:12px; font-weight: 600; cursor:pointer; }
.multi-filter-list { max-height:280px; overflow:auto; padding:5px; }
.multi-filter-option { display:flex !important; min-height:34px; align-items:center; gap:8px; padding:6px 8px; border-radius:7px; color:#34465d; font-size:13px; font-weight:600; cursor:pointer; }
.multi-filter-option:hover { background:#f2f6ff; }
.multi-filter .multi-filter-option input[type="checkbox"] {
  width:14px !important;
  min-width:14px !important;
  max-width:14px !important;
  height:14px !important;
  min-height:14px !important;
  max-height:14px !important;
  flex:0 0 14px;
  margin:0;
  padding:0 !important;
  box-sizing:border-box;
  accent-color:#315fcb;
}
.multi-filter-empty { padding:16px 10px; color:#8793a5; font-size:12px; text-align:center; }
.category-multi-filter { width:104px; }
.category-multi-filter .multi-filter-dropdown { width:248px; max-width:calc(100vw - 32px); }
.category-multi-toolbar { display:flex; gap:6px; padding:7px; border-bottom:1px solid #e8edf4; background:#f8faff; }
.category-multi-toolbar .category-multi-search { width:auto; min-width:0; height:30px; flex:1 1 auto; padding:0 8px; border:1px solid #ccd7e2; border-radius:7px; background:#fff; color:#34465d; font-size:13px; }
.category-multi-toolbar button { min-width:40px; border:0; padding:3px 5px; background:transparent; color:#315fcb; font-size:12px; font-weight:600; cursor:pointer; }
.category-multi-filter .multi-filter-list { max-height:224px; padding:4px; }
.category-multi-option { display:flex; width:100%; min-height:32px; align-items:center; justify-content:space-between; gap:8px; border:0; border-radius:7px; padding:5px 9px; background:transparent; color:#34465d; font-size:13px; font-weight:500; text-align:left; cursor:pointer; }
.category-multi-option:hover,.category-multi-option:focus-visible { background:#f2f6ff; outline:none; }
.category-multi-option.is-selected { background:#eaf1ff; color:#244da8; font-weight:600; }
.category-multi-check { visibility:hidden; color:#315fcb; font-size:14px; font-weight:700; }
.category-multi-option.is-selected .category-multi-check { visibility:visible; }
.quotation-category-actions { display:flex; justify-content:space-between; gap:8px; margin:8px 0; }
.quotation-search-line select,.quotation-search-line input:not([type="checkbox"]) { min-height:36px; padding:6px 8px; font-size:13px; }
.quotation-save-preset,.quotation-search-button { min-height:36px; padding-right:8px; padding-left:8px; white-space:nowrap; }
.quotation-search-line label { font-size:13px; }
.quotation-search-line label > span { white-space:nowrap; }
.quotation-minimum-control { display:grid !important; grid-template-columns:auto minmax(0,1fr); gap:5px; align-items:center; min-height:36px !important; }
.quotation-minimum-control input[type="checkbox"] { width:14px; height:14px; margin:0; }
.quotation-minimum-control input[type="number"]:disabled { background:#f2f4f7; color:#8a96a7; }
.quotation-result-toolbar { justify-content:space-between; gap:12px; padding:12px 16px; }
.quotation-result-toolbar > div:first-child { display:flex; align-items:baseline; gap:10px; min-width:0; }
.quotation-result-toolbar strong { color:#17243a; font-size:16px; white-space:nowrap; }
.quotation-result-toolbar span { min-width:0; color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.quotation-products-table-wrap { flex:none; width:100%; height:var(--quotation-list-height); min-height:0; max-height:none; overflow:auto; border-top:1px solid var(--line-soft); }
.quotation-products-table-wrap > .table-preference-controls { display:flex; }
.quotation-products-table { min-width:720px; }
.quotation-products-table th { position:sticky; top:0; z-index:3; background:#f7f9fd; }
.quotation-products-table th,.quotation-products-table td { padding:8px 9px; vertical-align:middle; }
.quotation-products-table tbody tr { cursor:pointer; }
.quotation-products-table tbody tr:hover { background:#f7faff; }
.quotation-products-table tbody tr.is-selected { background:#f1f6ff; }
.quotation-products-table tbody tr.is-unavailable { cursor:default; background:var(--ui-color-primary-soft); color:var(--ui-color-muted); }
.quotation-products-table tbody tr.is-unavailable:hover { background:var(--ui-color-primary-soft); }
.quotation-pagination { display:flex; min-height:48px; align-items:center; justify-content:flex-end; gap:8px; padding:8px 16px; border-top:1px solid var(--line-soft); background:#fbfcff; color:#63728a; font-size:12px; }
.quotation-pagination > span { margin-right:auto; font-weight:700; }
.quotation-pagination label { display:flex; align-items:center; gap:5px; white-space:nowrap; }
.quotation-pagination select,.quotation-pagination input { min-height:32px; border:1px solid #ccd7e2; border-radius:7px; background:#fff; color:#34465d; font:inherit; }
.quotation-pagination select { padding:4px 24px 4px 8px; }
.quotation-pagination input { width:58px; padding:4px 7px; text-align:center; }
.quotation-pagination button:disabled { cursor:not-allowed; opacity:.45; }
.quotation-product-image { width:46px; height:46px; border-radius:8px; object-fit:cover; background:#eef2f7; }
.quotation-image-empty { display:grid; width:46px; height:46px; place-items:center; border-radius:8px; background:#f2f4f7; color:#9aa6b5; font-size: 12px; }
.quotation-product-code { color:#61708a; font-size:12px; font-variant-numeric:tabular-nums; }
.quotation-size-list { display:flex; gap:4px; flex-wrap:wrap; }
.quotation-size-list span { min-width:23px; padding:3px 4px; border:1px solid #dce4ef; border-radius:5px; text-align:center; color:#53627a; font-size: 12px; background:#fff; }
.quotation-stock-total { font-weight: 600; color:#34465d; font-variant-numeric:tabular-nums; }
.quotation-supply-breakdown { display:block; margin-top:3px; color:#718096; font-size:12px; white-space:nowrap; }
.quotation-big-hit-tag { display:inline-flex; margin:0 6px 3px 0; padding:3px 7px; border-radius:999px; background:#fff0e7; color:#c24d18; font-size:12px; font-weight:700; white-space:nowrap; }
.quotation-ready-status,.quotation-status-pass { color:#1a9a64; font-weight: 600; white-space:nowrap; }
.quotation-status-blocked { color:var(--ui-color-danger); font-weight:var(--ui-font-weight-semibold); }
.quotation-selection-rail .quotation-zone-head { padding-bottom:10px; border-bottom:1px solid var(--line); }
.quotation-selected-list { width:100%; min-height:var(--quotation-list-height); flex:1; overflow:auto; }
.quotation-selected-limit-note { margin:10px 0; padding:8px 10px; border-radius:7px; background:#f2f6ff; color:#53627a; font-size: 12px; line-height:1.5; }
.quotation-selected-row,.quotation-selected-item { position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 8px; padding:9px 25px 9px 0; border-bottom:1px solid #e9edf4; }
.quotation-selected-row strong,.quotation-selected-row small,.quotation-selected-row span,.quotation-selected-item strong,.quotation-selected-item small,.quotation-selected-item span { display:block; grid-column:1; }
.quotation-selected-row strong,.quotation-selected-item strong { margin:1px 0 3px; font-size:12px; color:#26364e; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.quotation-selected-row small,.quotation-selected-item small { color:#8090a7; font-size: 12px; }
.quotation-selected-row span,.quotation-selected-item span { color:#63728a; font-size: 12px; line-height:1.4; }
.quotation-selected-item > div { display:flex; grid-column:1; gap:4px; flex-wrap:wrap; margin-top:4px; }
.quotation-selected-item em { min-width:22px; padding:2px 4px; border:1px solid #dce4ef; border-radius:5px; color:#53627a; background:#fff; font-size: 12px; font-style:normal; text-align:center; }
.quotation-selected-remove { position:absolute; top:7px; right:0; border:0; background:transparent; color:#75849b; font-size:16px; cursor:pointer; }
.quotation-selection-settings { display:grid; gap:9px; margin-top:auto; padding:12px 0 4px; border-top:1px solid var(--line); }
.quotation-selection-settings > label:not(.quotation-side-select) { display:flex; align-items:center; gap:7px; font-size:12px; }
.quotation-option-head { justify-content:space-between; font-weight: 600; color:#34465d; }
.quotation-side-select { display:flex; flex-direction:column; gap:6px; padding-top:5px; border-top:1px solid var(--line-soft); }
.quotation-side-select > span { display:flex; align-items:center; justify-content:space-between; font-weight: 600; color:#34465d; }
.quotation-generate-side { width:100%; min-height:44px; margin-top:4px; }
.quotation-form-grid { display:grid; grid-template-columns:repeat(3,minmax(180px,1fr)); gap:12px; }
.quotation-order-dialog { width:min(960px,100%); max-height:min(88vh,820px); }
.quotation-order-form { display:grid; grid-template-columns:repeat(2,minmax(260px,1fr)); gap:14px; margin-top:16px; }
.quotation-order-form > label { display:flex; min-width:0; flex-direction:column; gap:7px; color:var(--ui-color-text-secondary); font-size:13px; font-weight:var(--ui-font-weight-semibold); }
.quotation-order-form input,.quotation-order-form select { width:100%; min-height:40px; border:1px solid var(--ui-color-border); border-radius:var(--ui-radius-sm); padding:7px 10px; background:#fff; color:var(--ui-color-text); font:inherit; }
.quotation-order-charges { display:grid; gap:10px; margin-top:12px; padding:12px; border:1px solid var(--ui-color-border); border-radius:var(--ui-radius-sm); background:var(--ui-color-primary-soft); }
.quotation-order-charges-head { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; }
.quotation-order-charges-head > div:first-child { display:grid; gap:3px; }
.quotation-order-charges-head strong { color:var(--ui-color-title); font-size:14px; font-weight:var(--ui-font-weight-semibold); }
.quotation-order-charges-head span { color:var(--ui-color-muted); font-size:13px; }
.quotation-order-charge-add { display:flex; flex:0 0 auto; gap:7px; }
.quotation-order-charge-add select { min-width:180px; min-height:34px; border:1px solid var(--ui-color-control-border); border-radius:7px; padding:5px 8px; background:#fff; color:var(--ui-color-text); font:inherit; }
.quotation-order-charge-list { display:grid; gap:7px; }
.quotation-order-charge-row { display:grid; grid-template-columns:minmax(160px,1fr) minmax(160px,1fr) 140px auto; gap:7px; align-items:center; }
.quotation-order-charge-row.is-preset { grid-template-columns:minmax(240px,1fr) 140px auto; }
.quotation-order-charge-name { display:grid; gap:2px; color:var(--ui-color-text); font-size:13px; }
.quotation-order-charge-name small { color:var(--ui-color-muted); font-size:12px; }
.quotation-order-charge-row input { width:100%; min-height:36px; border:1px solid var(--ui-color-control-border); border-radius:7px; padding:6px 8px; background:#fff; color:var(--ui-color-text); font-family:var(--ui-font-family); font-size:14px; }
.quotation-order-charge-row.is-discount input { color:var(--ui-color-danger); }
.quotation-order-charge-row .tool-button { min-height:34px; }
.quotation-order-inline { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.quotation-order-pi-summary { display:flex; min-height:48px; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; padding:7px 10px 7px 12px; border:1px solid var(--ui-color-border); border-radius:var(--ui-radius-sm); background:#fff; }
.quotation-order-pi-summary > div { display:flex; min-width:0; align-items:center; gap:10px; }
.quotation-order-pi-summary strong { flex:0 0 auto; color:var(--ui-color-title); font-size:14px; font-weight:var(--ui-font-weight-semibold); }
.quotation-order-pi-summary span { min-width:0; overflow:hidden; color:var(--ui-color-muted); font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.quotation-order-pi-summary.is-confirmed span { color:var(--ui-color-success); font-weight:var(--ui-font-weight-medium); }
.quotation-order-pi-summary .tool-button { flex:0 0 auto; min-height:32px; padding:5px 10px; }
.quotation-order-pi-backdrop { z-index:50; }
.quotation-order-pi-dialog { display:flex; width:min(920px,100%); max-height:min(88vh,780px); flex-direction:column; overflow:hidden; }
.quotation-order-pi-grid { display:grid; min-height:0; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 10px; overflow:auto; margin-top:12px; padding:2px 4px 12px; }
.quotation-order-pi-grid label { display:flex; min-width:0; flex-direction:column; gap:4px; color:var(--ui-color-text); font-size:13px; font-weight:var(--ui-font-weight-medium); }
.quotation-order-pi-grid input,.quotation-order-pi-grid textarea { width:100%; min-height:36px; border:1px solid var(--ui-color-control-border); border-radius:7px; padding:6px 8px; background:#fff; color:var(--ui-color-text); font-family:var(--ui-font-family); font-size:14px; }
.quotation-order-pi-grid textarea { min-height:58px; resize:vertical; }
.quotation-order-pi-grid .span-2 { grid-column:1 / -1; }
.quotation-order-pi-actions { flex:0 0 auto; margin-top:0; padding-top:12px; border-top:1px solid var(--ui-color-border); }
.quotation-order-selection-status { margin-top:14px; padding:10px 12px; border-radius:var(--ui-radius-sm); background:var(--ui-color-primary-soft); color:var(--ui-color-text-secondary); font-size:13px; }
.quotation-order-selection-status.is-processing { color:var(--ui-color-primary); font-weight:var(--ui-font-weight-semibold); }
.quotation-order-selection-status.is-ready { background:color-mix(in srgb,var(--ui-color-success) 9%,#fff); color:var(--ui-color-success); font-weight:var(--ui-font-weight-semibold); }
.quotation-order-selection-status.is-error { background:color-mix(in srgb,var(--ui-color-danger) 9%,#fff); color:var(--ui-color-danger); font-weight:var(--ui-font-weight-semibold); }
.quotation-order-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:18px; padding-top:14px; border-top:1px solid var(--ui-color-border); }
.quotation-order-result { margin-top:14px; padding:14px; border:1px solid var(--ui-color-border); border-radius:var(--ui-radius-md); background:var(--ui-color-primary-soft); color:var(--ui-color-text); font-size:13px; line-height:1.7; }
.quotation-order-result strong { color:var(--ui-color-title); }
.quotation-form-grid label { display:flex; flex-direction:column; gap:6px; font-size:13px; color:#526170; }
.quotation-form-grid input,.quotation-form-grid select,.quotation-history-filters input { min-height:38px; border:1px solid #ccd7e2; border-radius:8px; padding:8px 10px; background:#fff; }
.quotation-job { display:grid; gap:10px; margin-top:14px; padding:14px; border-radius:10px; background:#eef5fb; }
.quotation-job progress { width:100%; height:14px; }
#quotationDownloads { display:flex; gap:10px; flex-wrap:wrap; }
.quotation-list-dialog { width:min(1180px,100%); max-height:min(86vh,900px); }
.quotation-list-dialog .report-table-wrap { max-height:65vh; }
.quotation-history-filters { display:flex; gap:10px; align-items:center; margin-bottom:12px; flex-wrap:wrap; }
.quotation-history-latest { background:#eef7ff; }
.quotation-history-latest td:first-child { color:#245fca; font-weight: 600; }
.quotation-order-history-dialog { width:min(1120px,100%); }
.quotation-order-history-toolbar { display:flex; gap:8px; align-items:center; margin-bottom:10px; }
.quotation-order-history-toolbar input { flex:1; min-width:220px; min-height:38px; border:1px solid var(--ui-color-border); border-radius:8px; padding:8px 10px; background:#fff; color:var(--ui-color-text); font:inherit; }
.quotation-order-history-table th,.quotation-order-history-table td { padding:9px 10px; vertical-align:middle; }
.quotation-order-history-table td:first-child { white-space:nowrap; }
.quotation-order-history-sub { color:var(--ui-color-muted); font-size:var(--ui-font-size-note); }
.quotation-order-history-actions { display:flex; flex-wrap:wrap; gap:6px; }
.quotation-order-history-empty { color:var(--ui-color-muted); text-align:center; padding:28px 12px !important; }
.quotation-order-file-missing { display:inline-flex; align-items:center; min-height:32px; color:var(--ui-color-danger); font-size:var(--ui-font-size-note); font-weight:600; }
.quotation-order-history-pager { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:10px; color:var(--ui-color-muted); font-size:var(--ui-font-size-note); }
.quotation-order-history-pager > div { display:flex; align-items:center; gap:8px; }
#quotationDataDialog.dialog-backdrop { padding:8px; }
.task-dialog.quotation-data-dialog { display:flex; width:calc(100vw - 16px); max-width:none; height:calc(100vh - 16px); max-height:none; flex-direction:column; overflow:hidden; padding:12px; }
.quotation-data-dialog .dialog-head { flex:0 0 auto; align-items:center; }
.quotation-data-dialog .dialog-head h2 { margin:4px 0 0; font-size:22px; }
.quotation-data-tabs { display:flex; flex:0 0 auto; width:max-content; margin:8px 0 10px; overflow:hidden; border:1px solid var(--ui-color-border); border-radius:8px; background:#f7f9fc; }
.quotation-data-tabs button { min-height:36px; border:0; border-right:1px solid var(--ui-color-border); padding:7px 18px; background:transparent; color:var(--ui-color-text); font-size:14px; font-weight:500; }
.quotation-data-tabs button:last-child { border-right:0; }
.quotation-data-tabs button.is-active { background:#fff; color:var(--ui-color-primary); box-shadow:inset 0 -2px 0 var(--ui-color-primary); font-weight:600; }
.quotation-data-panel { min-height:0; flex:1; }
.quotation-data-panel.is-active { display:flex; flex-direction:column; }
.quotation-data-scroll { min-height:0; overflow:auto; padding-right:4px; }
.quotation-data-toolbar { display:grid; grid-template-columns:minmax(260px,1fr) auto auto; gap:7px; flex:0 0 auto; padding:0 0 8px; }
.quotation-data-toolbar input { min-height:34px; border:1px solid var(--ui-color-control-border); border-radius:8px; padding:6px 9px; color:var(--ui-color-text); font-size:14px; }
.quotation-master-detail { display:grid; grid-template-columns:minmax(0,1fr) clamp(360px,34vw,520px); min-height:0; flex:1; overflow:hidden; border:1px solid var(--ui-color-border); border-radius:10px; }
.quotation-company-detail { grid-template-columns:minmax(0,1fr) clamp(320px,30vw,410px); }
.quotation-directory-wrap { min-width:0; overflow:auto; border-right:1px solid var(--ui-color-border); }
.quotation-directory-table { width:100%; min-width:560px; table-layout:fixed; }
.quotation-directory-table th,.quotation-directory-table td { height:38px; padding:6px 7px; overflow-wrap:anywhere; white-space:normal; vertical-align:top; font-size:13px; }
.quotation-directory-table th:last-child,.quotation-directory-table td:last-child { position:sticky; right:0; z-index:2; width:72px; background:#fff; box-shadow:-1px 0 0 var(--ui-color-border); text-align:center; }
.quotation-directory-table thead th:last-child { z-index:4; background:#f7f9fd; }
.quotation-directory-table tbody tr.is-selected td:last-child { background:var(--ui-color-primary-soft); }
.quotation-directory-table tbody tr.is-selected { background:var(--ui-color-primary-soft); }
.quotation-directory-table tbody tr[data-quotation-customer-row][draggable="true"] { cursor:grab; touch-action:none; user-select:none; }
.quotation-directory-table tbody tr[data-quotation-customer-row][draggable="true"]:active { cursor:grabbing; }
.quotation-directory-table tbody tr.is-dragging { opacity:.55; outline:2px solid var(--ui-color-primary); outline-offset:-2px; }
.quotation-directory-table .quotation-directory-name { color:var(--ui-color-primary); font-weight:600; }
.quotation-directory-table .tool-button { min-height:30px; padding:4px 9px; font-size:13px; }
.quotation-editor { display:flex; min-width:0; flex-direction:column; padding:10px 12px; overflow:auto; background:#fff; }
.quotation-editor h3 { margin:0 0 8px; color:var(--ui-color-title); font-size:16px; font-weight:600; }
.quotation-editor-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px 8px; }
.quotation-editor-grid label { display:flex; min-width:0; flex-direction:column; gap:3px; color:var(--ui-color-text); font-size:14px; font-weight:500; }
.quotation-editor-grid label > span { color:var(--ui-color-primary); font-size:13px; font-weight:500; }
.quotation-editor-grid input,.quotation-editor-grid select,.quotation-editor-grid textarea { width:100%; min-height:34px; border:1px solid var(--ui-color-control-border); border-radius:7px; padding:5px 7px; background:#fff; color:var(--ui-color-text); font-family:var(--ui-font-family); font-size:14px; }
.quotation-editor-grid textarea { min-height:64px; resize:vertical; }
.quotation-editor-grid .span-2,.quotation-editor-grid .quotation-primary-name,.quotation-editor-grid .quotation-default-company { grid-column:1 / -1; }
.quotation-customer-card-section { margin-top:10px; padding-top:10px; border-top:1px solid var(--ui-color-border); }
.quotation-customer-card-section > strong { display:block; margin-bottom:7px; color:var(--ui-color-title); font-size:14px; font-weight:600; }
.quotation-customer-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; color:var(--ui-color-muted); font-size:13px; }
.quotation-customer-cards a { display:block; overflow:hidden; border:1px solid var(--ui-color-border); border-radius:8px; background:var(--ui-color-primary-soft); }
.quotation-customer-cards img { display:block; width:100%; height:112px; object-fit:contain; background:var(--panel-solid); }
.quotation-editor-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:auto; padding-top:10px; }
.quotation-editor-actions > button { min-width:96px; }
.quotation-settings-section { margin-top:0; border:1px solid #dce5ed; border-radius:10px; padding:14px; background:#fbfcfe; }
.quotation-settings-section + .quotation-settings-section { margin-top:12px; }
.quotation-settings-cn { border-left:5px solid #dc3b61; }
.quotation-settings-en { border-left:5px solid #1680b9; }
.quotation-settings-section-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:10px; padding-bottom:8px; border-bottom:1px solid #dce5ed; }
.quotation-settings-section-head strong { font-size:16px; color:#17324d; }
.quotation-settings-section-head span { color:#718096; font-size:13px; text-align:right; }
.quotation-settings-subsection { margin:14px 0 10px; padding-top:12px; border-top:1px solid #dce5ed; }
.quotation-data-dialog input:disabled { background:#f2f4f7; color:#445268; cursor:not-allowed; }
.quotation-data-panel > .dialog-actions { flex:0 0 auto; margin-top:10px; padding-top:10px; border-top:1px solid var(--ui-color-border); }
@media (max-width:1280px) { .quotation-workbench { grid-template-columns:minmax(0,1fr); } .quotation-selection-rail { grid-column:1 / -1; border-top:1px solid var(--line); border-left:0; } }
@media (max-width:820px) { .quotation-layout { --quotation-list-height:clamp(360px,calc(100dvh - 310px),560px); } .quotation-command-primary { width:100%; align-items:flex-start; flex-direction:column; gap:4px; } .quotation-command-actions { width:100%; justify-content:flex-start; } .quotation-output-actions { justify-content:flex-start; flex-wrap:wrap; } .quotation-workbench { grid-template-columns:1fr; overflow:visible; } .quotation-category-rail,.quotation-selection-rail { border:0; border-bottom:1px solid var(--line); } .quotation-categories { max-height:280px; } .quotation-order-form { grid-template-columns:1fr; } .quotation-order-charges-head { align-items:stretch; flex-direction:column; } .quotation-order-charge-add { width:100%; } .quotation-order-charge-add select { flex:1; min-width:0; } .quotation-order-charge-row,.quotation-order-charge-row.is-preset { grid-template-columns:1fr 120px auto; } .quotation-order-charge-row:not(.is-preset) .quotation-order-charge-name-cn,.quotation-order-charge-row:not(.is-preset) .quotation-order-charge-name-en { grid-column:1 / -1; } }
@media (max-width:820px) { #quotationDataDialog.dialog-backdrop { padding:4px; } .task-dialog.quotation-data-dialog { width:calc(100vw - 8px); height:calc(100vh - 8px); padding:10px; } .quotation-data-tabs { width:100%; } .quotation-data-tabs button { flex:1; padding-right:8px; padding-left:8px; } .quotation-master-detail,.quotation-company-detail { grid-template-columns:1fr; overflow:auto; } .quotation-directory-wrap { min-height:300px; border-right:0; border-bottom:1px solid var(--ui-color-border); } .quotation-editor { min-height:360px; } }
@media (max-width:1100px) { .quotation-search-options { grid-template-columns:minmax(240px,1fr) minmax(180px,220px) 128px; } .quotation-search-button { grid-column:2 / -1; justify-self:end; width:112px; } }
@media (max-width:640px) { .quotation-form-grid,.quotation-editor-grid,.quotation-order-pi-grid { grid-template-columns:1fr; } .quotation-search-scope,.quotation-search-refine { grid-template-columns:1fr; gap:7px; } .quotation-search-primary,.quotation-search-options { grid-template-columns:1fr; } .quotation-category-filter,.quotation-keyword-filter,.quotation-preset-filter,.quotation-broken-filter,.quotation-minimum-filter { grid-template-columns:1fr; gap:4px; } .quotation-search-button { grid-column:auto; justify-self:stretch; width:auto; } .quotation-category-dropdown { width:min(320px,calc(100vw - 48px)); } .quotation-result-toolbar { align-items:flex-start; flex-direction:column; } .quotation-command-actions > .ghost-button { flex:1; } .quotation-output-actions { width:100%; } .quotation-output-actions .quotation-company-option,.quotation-output-actions .quotation-company-option select { width:100%; } .quotation-output-actions .quotation-generate-side { flex-basis:100%; } .quotation-settings-section-head { align-items:flex-start; flex-direction:column; } .quotation-settings-section-head span { text-align:left; } .quotation-data-toolbar { grid-template-columns:1fr; } .quotation-editor-grid .span-2,.quotation-editor-grid .quotation-primary-name,.quotation-editor-grid .quotation-default-company,.quotation-order-pi-grid .span-2 { grid-column:auto; } }

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 126, 182, .18) 0 18%, transparent 18% 100%),
    linear-gradient(155deg, transparent 0 58%, rgba(53, 201, 223, .18) 58% 78%, transparent 78% 100%),
    linear-gradient(180deg, #fffafe 0%, #f4fbff 46%, #f7f8ff 100%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  font-synthesis: none;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: auto;
}

button, input, select, textarea {
  font: inherit;
  font-family: var(--font-sans);
  font-synthesis: none;
}
button { cursor: pointer; }
button:active,
.primary-button:active,
.ghost-button:active,
.tool-button:active,
.icon-action:active {
  transform: translateY(1px) scale(.985);
}
button:disabled,
.primary-button:disabled,
.ghost-button:disabled,
.tool-button:disabled {
  cursor: wait;
  opacity: .72;
}
.ghost-button.is-loading,
.primary-button.is-loading,
.tool-button.is-loading {
  border-color: rgba(60, 125, 255, .62);
  background: #eef5ff;
  color: #245dcc;
  box-shadow: inset 0 2px 5px rgba(60, 125, 255, .12);
}
.hidden { display: none !important; }

.login-locked {
  overflow-x: hidden;
  overflow-y: auto;
}

.login-locked .app-shell {
  display: none;
}

.session-restore-pending body.login-locked .login-gate {
  display: none;
}

.session-restore-pending body.login-locked .app-shell {
  display: none;
}

body:not(.login-locked) .login-gate {
  display: none;
}

.login-gate {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(360px, .95fr);
  align-items: center;
  gap: clamp(32px, 6vw, 92px);
  padding: clamp(32px, 6vw, 88px);
  background:
    linear-gradient(135deg, rgba(255, 126, 182, .22) 0 24%, transparent 24% 100%),
    linear-gradient(155deg, transparent 0 60%, rgba(53, 201, 223, .20) 60% 78%, transparent 78% 100%),
    linear-gradient(115deg, transparent 0 42%, rgba(155, 123, 255, .14) 42% 58%, transparent 58% 100%),
    linear-gradient(135deg, #fff8fc 0%, #f7fbff 48%, #ffffff 100%);
}

.login-brand-panel {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.login-mascot-wrap {
  width: min(420px, 46vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 38px;
  background:
    linear-gradient(140deg, rgba(255,255,255,.44), rgba(255,255,255,.08)),
    linear-gradient(135deg, rgba(255, 126, 182, .16), transparent 46%),
    linear-gradient(315deg, rgba(53, 201, 223, .18), transparent 48%);
}

.login-mascot {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 28px 42px rgba(66, 78, 116, .18));
}

.login-brand-panel h1 {
  margin: 0;
  color: #121a3f;
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 700;
  white-space: nowrap;
}

.login-brand-mark {
  width: 64px;
  height: 5px;
  border-radius: 99px;
  margin: 20px 0 22px;
  background: linear-gradient(90deg, var(--yellow), var(--pink), var(--violet), var(--cyan), var(--mint));
}

.login-access-note {
  margin: 0;
  color: #66738b;
  font-size: 20px;
  font-weight: 600;
}

.login-panel {
  width: min(100%, 520px);
  justify-self: start;
  padding: 34px;
  border: 1px solid rgba(223, 229, 244, .86);
  border-radius: 28px;
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 30px 80px rgba(77, 91, 130, .16);
  backdrop-filter: blur(22px);
}

.login-panel-head {
  margin-bottom: 26px;
}

.login-panel-head p {
  margin: 0 0 8px;
  color: #6d7890;
  font-size: 15px;
  font-weight: 600;
}

.login-panel-head h2 {
  margin: 0;
  color: #141d3e;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 0;
}

.login-field {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  color: #1d2842;
  font-weight: 700;
}

.login-field input,
.login-field select {
  width: 100%;
  height: 58px;
  border: 1px solid #dbe2f1;
  border-radius: 16px;
  background: rgba(255,255,255,.88);
  color: var(--text);
  padding: 0 16px;
  outline: none;
  box-shadow: 0 12px 26px rgba(83, 96, 132, .06);
}

.login-field input:focus,
.login-field select:focus {
  border-color: rgba(155, 123, 255, .78);
  box-shadow: 0 0 0 4px rgba(155, 123, 255, .14), 0 12px 26px rgba(83, 96, 132, .08);
}

.login-submit {
  width: 100%;
  height: 62px;
  margin-top: 28px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  background: linear-gradient(135deg, #d25cff 0%, #3c7dff 52%, #25d2c8 100%);
  box-shadow: 0 18px 36px rgba(60, 125, 255, .28);
}

.login-submit:disabled {
  cursor: wait;
  opacity: .68;
}

.login-message {
  min-height: 22px;
  margin: 18px 0 0;
  color: #6b7890;
  text-align: center;
  font-weight: 600;
}

.login-message[data-state="error"] {
  color: var(--red);
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 72px 14px 18px;
  background: rgba(255, 255, 255, .68);
  border-right: 1px solid rgba(255, 255, 255, .9);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  margin-bottom: 22px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(92, 103, 154, .2);
}
.brand-logo.asset-fallback,
.hero-mascot.asset-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--pink), var(--mint) 52%, var(--cyan));
  color: #fff;
  font-weight: 700;
  text-align: center;
}
.brand-logo.asset-fallback {
  font-size: 12px;
  line-height: 1;
}

.brand-title { font-size: 17px; font-weight: 600; line-height: 1.1; }
.brand-subtitle { margin-top: 4px; color: var(--muted); font-size: 12px; }
.nav-list { display: grid; gap: 7px; }

.nav-item {
  display: block;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 11px 12px;
  text-decoration: none;
  box-sizing: border-box;
}

.nav-item span { display: block; font-weight: 600; }
.nav-item em { display: block; margin-top: 4px; font-style: normal; color: var(--muted); font-size: 12px; }
.nav-item:hover { background: rgba(255, 255, 255, .72); border-color: rgba(255,255,255,.9); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, #ff7eb6 0%, #9b7bff 48%, #35c9df 100%);
  box-shadow: 0 12px 26px rgba(155, 123, 255, .28);
}
.nav-item.active em { color: rgba(255,255,255,.78); }

.operator {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 8px 0;
  border-top: 1px solid var(--line);
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--yellow), var(--pink));
  color: #fff;
  font-weight: 600;
}
.operator-name { font-weight: 600; }
.operator-role { color: var(--muted); font-size: 12px; margin-top: 3px; }

.workspace {
  min-width: 0;
  padding: 78px 22px 24px;
}
.titlebar {
  position: fixed;
  top: 0;
  left: 248px;
  right: 0;
  z-index: 20;
  height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  -webkit-app-region: drag;
  padding: 0 22px;
  background:
    linear-gradient(135deg, rgba(255, 126, 182, .18) 0 18%, transparent 18% 100%),
    rgba(255, 250, 254, .82);
  backdrop-filter: blur(16px);
}
.titlebar h1 { margin: 2px 0 0; font-size: 22px; letter-spacing: 0; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 700; }
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  -webkit-app-region: no-drag;
}
.global-operator {
  display: grid;
  grid-template-columns: 96px minmax(110px, 150px) auto minmax(120px, auto);
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 6px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 8px 22px rgba(77, 91, 130, .06);
}
.global-operator select,
.global-operator input {
  height: 36px;
  padding: 7px 9px;
  border-radius: 10px;
}
.global-operator input.field-error,
.global-operator select.field-error {
  border-color: rgba(239, 71, 111, .82);
  background: #fff5f8;
  box-shadow: 0 0 0 3px rgba(239, 71, 111, .12);
}
.global-operator button {
  height: 36px;
  padding: 7px 10px;
  border-radius: 10px;
}
.global-operator span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.logout-button {
  color: #9f1239;
  border-color: rgba(159, 18, 57, .22);
  background: #fff7f9;
}

.page { display: none; }
.page-active { display: block; }

.hero-strip,
.workflow-panel,
.rhythm-panel,
.page-intro,
.today-card,
.simple-panel,
.panel {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.workflow-panel {
  margin-top: 14px;
  padding: 18px;
}
.workflow-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.workflow-head h2 {
  margin: 9px 0 0;
  font-size: 22px;
  letter-spacing: 0;
}
.workflow-head p {
  max-width: 520px;
  text-align: right;
}
.workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.workflow-step {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  min-height: 104px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}
.workflow-step-number {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink), var(--cyan));
}
.workflow-step strong {
  display: block;
  font-size: 14px;
}
.workflow-step span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.workflow-step button {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
}

.rhythm-panel {
  margin-top: 14px;
  padding: 18px;
}
.rhythm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.rhythm-head h2 {
  margin: 9px 0 0;
  font-size: 22px;
  letter-spacing: 0;
}
.rhythm-head p {
  max-width: 520px;
  text-align: right;
}
.rhythm-lanes {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 12px;
}
.rhythm-lane {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.rhythm-lane.daily {
  background: linear-gradient(180deg, #f1fffb, #fff);
}
.rhythm-lane.weekly {
  background: linear-gradient(180deg, #fff7fd, #fff);
}
.rhythm-lane-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.rhythm-lane-title strong {
  font-size: 16px;
}
.rhythm-lane-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.rhythm-actions {
  display: grid;
  gap: 8px;
}
.rhythm-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255,255,255,.84);
}
.rhythm-action strong,
.rhythm-action span {
  display: block;
}
.rhythm-action span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.rhythm-action button {
  min-width: 76px;
  white-space: nowrap;
}

.hero-strip {
  min-height: 214px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: center;
  padding: 26px 30px;
  overflow: hidden;
  position: relative;
}
.hero-strip::after {
  content: "";
  position: absolute;
  inset: auto -40px 0 42%;
  height: 88px;
  background: linear-gradient(135deg, rgba(69, 214, 163, .22), rgba(53, 201, 223, .2));
  transform: skewX(-18deg);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; max-width: 720px; }
.hero-copy h2 {
  margin: 12px 0 8px;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0;
}
.hero-copy p { max-width: 620px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.hero-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero-mascot {
  position: relative;
  z-index: 1;
  width: 226px;
  height: 176px;
  object-fit: cover;
  object-position: 50% 48%;
  border-radius: 28px;
  box-shadow: 0 18px 38px rgba(91, 101, 142, .2);
}
.hero-mascot.asset-fallback {
  padding: 18px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,126,182,.16), rgba(53,201,223,.18));
  color: #7651e8;
  font-size: 12px;
  font-weight: 600;
}

.today-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.daily-data-alert {
  display: grid;
  grid-template-columns: auto minmax(220px, .85fr) minmax(320px, 1.35fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 18px;
  border: 1px solid color-mix(in srgb, var(--ui-color-warning) 48%, var(--ui-color-border));
  border-left: 5px solid var(--ui-color-warning);
  border-radius: 14px;
  background: color-mix(in srgb, var(--ui-color-warning) 7%, #fff);
  color: var(--ui-color-text);
}
.daily-data-alert.hidden { display: none; }
.daily-data-alert.is-danger {
  border-color: color-mix(in srgb, var(--ui-color-danger) 48%, var(--ui-color-border));
  border-left-color: var(--ui-color-danger);
  background: color-mix(in srgb, var(--ui-color-danger) 6%, #fff);
}
.daily-data-alert-icon {
  width: 24px;
  height: 24px;
  color: var(--ui-color-warning);
}
.daily-data-alert.is-danger .daily-data-alert-icon { color: var(--ui-color-danger); }
.daily-data-alert-copy { min-width: 0; }
.daily-data-alert-copy strong,
.daily-data-alert-copy span { display: block; }
.daily-data-alert-copy strong {
  color: var(--ui-color-title);
  font-size: var(--ui-font-size-section-title);
  font-weight: var(--ui-font-weight-semibold);
}
.daily-data-alert-copy span {
  margin-top: 4px;
  color: var(--ui-color-muted);
  font-size: var(--ui-font-size-note);
  font-weight: var(--ui-font-weight-regular);
}
.daily-data-alert-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.daily-data-alert-source {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--ui-color-warning) 48%, var(--ui-color-border));
  border-radius: 9px;
  color: var(--ui-color-text);
  background: #fff;
  font-size: var(--ui-font-size-note);
  font-weight: var(--ui-font-weight-medium);
}
.daily-data-alert-action {
  border: 0;
  padding: 8px;
  color: var(--ui-color-primary-strong);
  background: transparent;
  font-size: var(--ui-font-size-body);
  font-weight: var(--ui-font-weight-medium);
  cursor: pointer;
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .daily-data-alert { grid-template-columns: auto 1fr auto; }
  .daily-data-alert-sources { grid-column: 2 / -1; }
}
.daily-operation-panel {
  padding: 18px;
}
.daily-operation-panel .workflow-head {
  align-items: flex-end;
  margin-bottom: 12px;
}
.daily-operation-panel .workflow-head p {
  max-width: 460px;
}
.daily-operation-steps {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.daily-operation-steps .workflow-step {
  min-height: 120px;
  align-content: start;
}
.home-business-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.home-business-card {
  min-height: 126px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.home-business-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.home-business-card strong {
  display: block;
  margin: 8px 0;
  font-size: 25px;
  line-height: 1.1;
}
.home-business-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.home-business-card.hot-card {
  background: linear-gradient(180deg, #fff8e7, #fff);
}
.home-business-card.filter-card {
  cursor: pointer;
}
.home-business-card.filter-card:hover {
  border-color: #8fb3ff;
  box-shadow: 0 10px 24px rgba(39, 91, 216, .12);
}
.home-business-card.active,
.home-business-card.filter-card.active {
  border-color: #5b82e8;
  box-shadow: inset 0 0 0 1px #5b82e8, 0 7px 18px rgba(39, 91, 216, .10);
}
.compact-head { margin-bottom: 10px; }
.compact-workflow {
  grid-template-columns: 1fr;
  gap: 8px;
}
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }
.today-card,
.simple-panel,
.panel {
  min-width: 0;
  padding: 18px;
}
.today-card h2,
.simple-panel h2,
.panel h2 { margin: 0; font-size: 17px; letter-spacing: 0; }
p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
#masterImportStatus:empty,
#fieldRulesSaveStatus:empty,
#thresholdRulesSaveStatus:empty,
#backupStatus:empty,
#assetArchiveStatus:empty {
  display: none;
}
.backup-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.backup-health-grid article {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}
.backup-health-grid span,
.backup-health-grid strong {
  display: block;
}
.backup-health-grid span {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}
.backup-health-grid strong {
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.backup-health-note {
  margin-top: 10px;
}
@media (max-width: 900px) {
  .backup-health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.compact-metrics { margin: 12px 0; }
.metric-card {
  min-height: 102px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.metric-card span { color: var(--muted); font-size: 12px; font-weight: 700; }
.metric-card strong { display: block; margin-top: 8px; font-size: 26px; line-height: 1.1; }
.metric-card small { display: block; margin-top: 8px; color: var(--muted); }
.metric-card.ok { background: linear-gradient(180deg, #f0fff7, #fff); }
.metric-card.warn { background: linear-gradient(180deg, #fff8e2, #fff); }
.metric-card.danger { background: linear-gradient(180deg, #fff0f5, #fff); }
.guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.guide-step {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  min-height: 128px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}
.guide-step strong { font-size: 14px; }
.guide-step span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.guide-step button { width: 100%; }
.guide-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  background: #f2f5fb;
  color: var(--muted);
}
.guide-step.done { background: linear-gradient(180deg, #f0fff7, #fff); }
.guide-step.warn { background: linear-gradient(180deg, #fff8e2, #fff); }
.guide-step.danger { background: linear-gradient(180deg, #fff0f5, #fff); }
.guide-step.done .guide-status { background: #dff8ea; color: var(--green); }
.guide-step.warn .guide-status { background: #fff0bf; color: #a46a00; }
.guide-step.danger .guide-status { background: #ffe2ec; color: var(--red); }
.platform-sales-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.platform-sales-row {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) repeat(4, minmax(72px, auto));
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  padding: 10px 12px;
  background: #fff;
  font-size: 12px;
}
.platform-sales-row strong { font-size: 14px; }
.platform-sales-row span { color: var(--muted); font-weight: 600; }
.platform-sales-row .ok { color: var(--green); }
.platform-sales-row .warn { color: #a46a00; }
.platform-sales-row .danger { color: var(--red); }

.action-list,
.stack-list,
.snapshot-list,
.flow-list,
.sales-entry-list { display: grid; gap: 9px; margin-top: 12px; }
.action-list > div,
.stack-list > div,
.snapshot-list > div,
.flow-list > div,
.sales-entry {
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: #fff;
  padding: 12px;
}
.action-route {
  display: grid;
  grid-template-rows: minmax(58px, auto) auto;
  align-items: center;
  gap: 12px;
  min-height: 136px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
}
.action-route strong { display: block; }
.action-route span { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 4px; }
.action-route button {
  white-space: nowrap;
  width: 100%;
  min-width: 0;
}
.stack-list#todayActionList {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.snapshot-list span,
.flow-list span { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; line-height: 1.45; }
.snapshot-list strong,
.flow-list strong { display: block; font-size: 14px; }

.sales-day-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}
.sales-day-summary strong { color: var(--text); }
.sales-day-wrap { max-height: 58vh; overflow: auto; }
.sales-day-table { min-width: 760px; }
.sales-day-table th,
.sales-day-table td {
  padding: 7px 8px;
  line-height: 1.25;
}
.sales-day-table th {
  white-space: normal;
  word-break: keep-all;
}
.sales-day-table td {
  white-space: nowrap;
}
.sales-day-table input {
  height: 34px;
  border-radius: 9px;
  width: 64px;
  padding: 0 6px;
  text-align: right;
}
.sales-day-table input:disabled {
  color: var(--text);
  background: transparent;
  border-color: transparent;
  opacity: 1;
}
.compact-button {
  min-height: 32px;
  padding: 0 14px;
}

.daily-followup-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}
.daily-followup-row {
  display: grid;
  grid-template-columns: minmax(118px, .65fr) minmax(260px, 1.5fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 11px 12px;
  background: #fff;
}
.daily-followup-owner strong,
.daily-followup-owner span {
  display: block;
}
.daily-followup-owner span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.daily-followup-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.daily-followup-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f5f7fc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.daily-followup-metrics span.ok { background: #effcf5; color: var(--green); }
.daily-followup-metrics span.warn { background: #fff7e0; color: #a46a00; }
.daily-followup-metrics span.danger { background: #fff0f5; color: var(--red); }
.daily-followup-empty { margin-top: 12px; }

.page-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  margin-bottom: 14px;
}
.page-intro h2 { margin: 10px 0 4px; font-size: 26px; }
.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.master-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.management-section-title {
  margin: 22px 0 10px;
  color: var(--ui-color-title);
  font-size: 16px;
  font-weight: 600;
}
#masterDataPage > .management-section-title:first-child { margin-top: 0; }
.management-ledger-card { grid-column: span 2; }
.ledger-export-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ledger-export-list span {
  border: 1px solid var(--ui-color-border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ui-color-text);
  background: var(--ui-color-primary-soft);
  font-size: 14px;
  font-weight: 500;
}
.master-module-card {
  min-height: 116px;
  display: grid;
  align-content: start;
  gap: 10px;
  text-align: left;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(73, 86, 135, .08);
  color: var(--text);
  padding: 18px;
}
.master-module-card:hover {
  transform: translateY(-1px);
  border-color: #cbd8ff;
  box-shadow: 0 16px 34px rgba(73, 86, 135, .13);
}
.master-module-card strong { font-size: 17px; }
.master-module-card span {
  color: var(--muted);
  line-height: 1.55;
}
.master-module-dialog { width: min(980px, 100%); }
.master-module-body {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}
.master-module-panel {
  display: grid;
  gap: 12px;
}
.master-module-panel h2 { margin: 0; font-size: 18px; }
.master-module-panel p { color: var(--muted); line-height: 1.55; }
.operator-create-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) 120px auto;
  gap: 10px;
}
.operator-account-row {
  align-items: flex-start;
}
.operator-account-main {
  display: grid;
  gap: 6px;
  min-width: 0;
  width: 100%;
}
.operator-account-main > span {
  color: var(--muted);
  font-size: 12px;
}
.operator-account-edit {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 120px 90px;
  gap: 8px;
  align-items: center;
}
.compact-empty {
  padding: 8px 10px;
}
.report-layout { display: grid; gap: 14px; }
.business-report-shell {
  display: grid;
  gap: 12px;
}
.business-module-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
#businessSalesModule,
.temu-quality-module {
  display: grid;
  gap: 12px;
}
#businessSalesModule.hidden,
.temu-quality-module.hidden {
  display: none;
}
.temu-quality-toolbar {
  display: grid;
  grid-template-columns: auto 150px minmax(180px, 260px) auto auto;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.temu-quality-toolbar input,
.temu-quality-toolbar select {
  width: 100%;
  height: 40px;
  border-radius: 10px;
}
.temu-quality-kpis .business-kpi.low strong,
.quality-score.low,
.quality-status.new-low,
.quality-status.persistent-low {
  color: var(--red);
}
.temu-quality-kpis .business-kpi.warning strong,
.quality-score.warning,
.quality-status.warning {
  color: #b45309;
}
.temu-quality-kpis .business-kpi.recovered strong,
.quality-status.recovered {
  color: var(--green);
}
.quality-status.off-shelf {
  color: #64748b;
}
.quality-completion-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 6px 10px;
  overflow-x: auto;
}
.quality-completion-card {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #fff;
}
.quality-completion-card.pending {
  border-color: rgba(239, 71, 111, .28);
  background: #fff6f8;
}
.quality-completion-card strong {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
}
.quality-completion-card span,
.quality-completion-card small {
  color: var(--muted);
  white-space: nowrap;
}
.quality-completion-card small {
  margin: 0;
}
.temu-quality-entry-grid {
  display: grid;
  gap: 12px;
  padding: 12px;
}
.temu-quality-entry-grid > div:first-child {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 180px;
  gap: 10px;
}
.temu-quality-entry-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
}
.temu-quality-entry-grid input,
.temu-quality-entry-grid select,
.temu-quality-entry-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.temu-quality-entry-grid input,
.temu-quality-entry-grid select {
  height: 40px;
}
.temu-quality-entry-grid textarea {
  min-height: 210px;
  padding: 10px;
  resize: vertical;
  font: inherit;
  line-height: 1.55;
}
.temu-quality-entry-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.quality-preview-list {
  display: grid;
  gap: 6px;
}
.quality-preview-row {
  display: grid;
  grid-template-columns: 130px minmax(170px, 1fr) minmax(200px, 1.4fr) 110px;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #f8fafc;
}
.quality-preview-row.pending {
  background: #fff5f5;
}
.quality-preview-row span,
.quality-preview-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.temu-quality-table-wrap {
  max-height: 620px;
}
.temu-quality-table td {
  vertical-align: top;
}
.quality-product-cell {
  min-width: 210px;
}
.quality-image-cell {
  width: 74px;
  min-width: 74px;
}
.quality-product-cell strong,
.quality-product-cell small {
  display: block;
}
.quality-product-cell small {
  margin-top: 4px;
  color: var(--muted);
}
.quality-skc-cell {
  min-width: 180px;
}
.quality-skc-cell details summary {
  cursor: pointer;
  color: var(--blue);
}
.quality-status {
  font-weight: 700;
}
.quality-home-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.quality-home-card {
  cursor: pointer;
}
@media (max-width: 980px) {
  .temu-quality-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quality-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quality-preview-row {
    grid-template-columns: 110px minmax(0, 1fr);
  }
}
.business-filter-panel,
.business-table-card {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(73, 86, 135, .08);
  backdrop-filter: blur(18px);
}
.business-filter-panel {
  padding: 12px;
}
.business-filters {
  display: grid;
  grid-template-columns: 150px 150px 110px 150px minmax(120px, 1fr) 120px;
  gap: 8px;
  margin-top: 10px;
}
.business-filters input,
.business-filters select {
  width: 100%;
  height: 40px;
  border-radius: 10px;
}
.business-alert-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid #d8eadf;
  border-radius: 12px;
  background: #f3fbf6;
}
.business-alert-strip strong { color: var(--green); }
.business-alert-strip span {
  min-width: 0;
  color: var(--muted);
  font-weight: 600;
}
.business-alert-strip.danger {
  border-color: rgba(239, 71, 111, .24);
  background: #fff4f7;
}
.business-alert-strip.danger strong { color: var(--red); }
.business-alert-list {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
}
.business-alert-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 100px;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #fbfcff;
}
.business-alert-row strong { color: var(--red); }
.business-alert-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.business-alert-row em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}
.business-alert-row.muted-row strong { color: var(--green); }
.business-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.business-kpi {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(77, 91, 130, .06);
}
.business-kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.business-kpi strong {
  display: block;
  margin-top: 8px;
  font-size: 25px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.business-kpi small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 600;
}
.business-kpi.up strong,
.business-kpi.up small { color: var(--green); }
.business-kpi.down strong,
.business-kpi.down small { color: var(--red); }
.business-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.business-first-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.business-action-card {
  min-height: 260px;
}
.business-action-list {
  display: grid;
  gap: 8px;
}
.business-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbfcff;
}
.business-action-row.danger {
  border-color: rgba(239, 71, 111, .28);
  background: #fff6f8;
}
.business-action-row.warn {
  border-color: rgba(245, 158, 11, .3);
  background: #fffaf0;
}
.business-action-row strong,
.business-action-row span,
.business-action-row small {
  display: block;
}
.business-action-row span {
  margin-top: 3px;
  color: var(--text);
  line-height: 1.35;
}
.business-action-row small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
}
.business-mover-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.business-mover-note {
  grid-column: 1 / -1;
  padding: 9px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.business-mover-column {
  display: grid;
  gap: 7px;
  align-content: start;
}
.business-mover-column h3 {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.business-mover-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 8px 9px;
  border-radius: 10px;
  background: #fbfcff;
  border: 1px solid var(--line-soft);
}
.business-mover-row strong,
.business-mover-row span,
.business-mover-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.business-mover-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.business-mover-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.business-mover-row em {
  font-style: normal;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.business-mover-row.down em {
  color: var(--red);
}
.business-mover-row.up em {
  color: var(--green);
}
.business-table-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.business-table-card {
  min-width: 0;
  padding: 12px;
}
.business-table-card .panel-head {
  margin-bottom: 10px;
}
.business-table-card .panel-head h2 {
  margin: 0;
  font-size: 16px;
}
.business-table-card .panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.business-table .up { color: var(--green); font-weight: 700; }
.business-table .down { color: var(--red); font-weight: 700; }
.product-sales-panel {
  display: grid;
  gap: 10px;
}
.sales-alert-panel {
  display: grid;
  gap: 12px;
}
.sales-alert-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.sales-alert-card {
  position: relative;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.sales-alert-card:hover,
.sales-alert-card.active {
  transform: translateY(-1px);
  border-color: #93b4ff;
  box-shadow: 0 10px 24px rgba(39, 91, 216, .12);
}
.sales-alert-card.old-revived {
  background: linear-gradient(145deg, #fff1f2, #fff);
  border-color: rgba(220, 38, 38, .32);
}
.sales-alert-card.platform-stock { background: linear-gradient(145deg, #fff8e8, #fff); }
.sales-alert-card.erp-stock { background: linear-gradient(145deg, #f5f3ff, #fff); }
.sales-alert-card.new-product { background: linear-gradient(145deg, #eff6ff, #fff); }
.sales-alert-card > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}
.sales-alert-card strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1;
}
.sales-alert-card small {
  color: var(--muted);
  font-size: 12px;
}
.sales-alert-card em {
  display: block;
  margin-top: 8px;
  color: #1d4ed8;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}
.sales-alert-card.old-revived em { color: #b91c1c; }
.sales-alert-unread {
  padding: 3px 7px;
  border-radius: 999px;
  background: #b91c1c;
  color: #fff;
  font-size: 12px;
}
.sales-alert-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.sales-alert-view-tabs,
.sales-alert-trend-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.sales-alert-trend-wrap {
  min-height: 250px;
  padding: 10px 12px 4px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbfcff;
}
.sales-alert-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}
.sales-alert-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sales-alert-legend i { width: 9px; height: 9px; border-radius: 50%; }
.sales-alert-trend-chart { width: 100%; height: 220px; overflow: visible; }
.sales-alert-trend-chart text { fill: #64748b; font-size: 12px; }
.sales-alert-grid-line { stroke: #dce4f1; stroke-width: 1; }
.sales-alert-table-wrap { max-height: 560px; min-height: 260px; }
.sales-alert-badges { display: flex; gap: 4px; flex-wrap: wrap; min-width: 150px; }
.sales-alert-badge {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.sales-alert-badge.new-product { background: #dbeafe; color: #1d4ed8; }
.sales-alert-badge.old-revived { background: #fee2e2; color: #b91c1c; }
.sales-alert-badge.platform-stock { background: #fef3c7; color: #b45309; }
.sales-alert-badge.erp-stock { background: #ede9fe; color: #6d28d9; }
.sales-alert-badge.data-issue { background: #e2e8f0; color: #475569; }
.sales-alert-badge.is-new { box-shadow: inset 0 0 0 1px currentColor; }
.sales-alert-revival-row { background: #fff7f7; }
.sales-alert-reason { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-missing { color: #64748b; font-size: 12px; font-weight: 600; }
.product-sales-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  align-items: center;
}
.product-sales-filters #productSalesQuery {
  grid-column: span 2;
  min-width: 0;
}
.product-sales-filters input,
.product-sales-filters select {
  width: 100%;
  height: 40px;
  border-radius: 10px;
}
.product-sales-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.product-sales-chip {
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfcff;
}
.product-sales-chip span,
.product-sales-chip strong {
  display: block;
}
.product-sales-chip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.product-sales-chip strong {
  margin-top: 5px;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}
.product-sales-table-wrap {
  max-height: calc(100vh - 295px);
  min-height: 560px;
}
.product-sales-pagebar {
  position: sticky;
  top: 0;
  z-index: 6;
  margin: 0 0 8px;
  padding: 6px 0;
  background: #fff;
}
.product-sales-updated {
  margin: 8px 0;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}
.overview-compact-panel {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-color: rgba(255, 213, 128, .42);
  background:
    linear-gradient(135deg, rgba(255, 245, 231, .92) 0%, rgba(255, 255, 255, .96) 46%, rgba(239, 250, 255, .9) 100%),
    linear-gradient(90deg, rgba(255, 126, 182, .08), rgba(255, 214, 107, .10), rgba(53, 201, 223, .08));
  font-family: var(--font-sans);
  -webkit-font-smoothing: auto;
  text-rendering: optimizeLegibility;
}
.overview-compact-panel .panel-head {
  align-items: center;
  gap: 14px;
  padding-bottom: 2px;
}
.overview-compact-panel .panel-head h2 {
  font-size: 20px;
  font-weight: 700;
}
.overview-compact-panel .panel-head p {
  font-size: 14px;
  line-height: 1.5;
}
.overview-head-actions { display: flex; gap: 8px; align-items: center; }
.overview-card-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.overview-card-group {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}
.overview-card-group.sales-group { grid-column: auto; }
.overview-card-group.hot-group {
  grid-column: auto;
  border-color: rgba(245, 158, 11, .36);
  background: linear-gradient(180deg, rgba(255, 249, 231, .96), rgba(255, 252, 243, .98));
}
.overview-card-group.alert-group {
  grid-column: auto;
  border-color: rgba(124, 58, 237, .20);
  background: linear-gradient(180deg, rgba(250, 247, 255, .98), rgba(255, 255, 255, .98));
}
.overview-group-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.overview-group-title strong {
  color: #1f2a3d;
  font-size: 15px;
  font-weight: 700;
}
.overview-group-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: right;
}
.overview-card-group .home-business-grid,
.overview-card-group .sales-alert-cards {
  gap: 8px;
}
.overview-card-group.sales-group .home-business-grid { grid-template-columns: minmax(0, 1fr); }
.overview-card-group.hot-group .home-business-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.overview-card-group.alert-group .sales-alert-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.overview-card-group.hot-group .home-business-grid,
.overview-card-group.alert-group .sales-alert-cards { grid-template-rows: repeat(2, minmax(0, 1fr)); }
.overview-card-group .home-business-card,
.overview-card-group .sales-alert-card {
  min-height: 76px;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}
.overview-card-group.hot-group .home-business-card,
.overview-card-group.alert-group .sales-alert-card { min-height: 120px; }
.overview-card-group.sales-group .home-business-card { min-height: 78px; }
button.home-business-card { width: 100%; color: var(--ink); font-family: inherit; text-align: left; cursor: pointer; }
.overview-card-group .home-business-card:hover,
.overview-card-group .sales-alert-card:hover,
.overview-card-group .home-business-card.active,
.overview-card-group .sales-alert-card.active {
  transform: none;
  border-color: #7aa2f7;
  box-shadow: inset 0 0 0 1px rgba(92, 132, 232, .32);
}
.overview-card-group .home-business-card.hot-card,
.overview-card-group .sales-alert-card.old-revived,
.overview-card-group .sales-alert-card.platform-stock,
.overview-card-group .sales-alert-card.erp-stock,
.overview-card-group .sales-alert-card.new-product {
  background: #fff;
}
.overview-card-group.hot-group .overview-group-title strong {
  color: #9a3412;
}
.overview-card-group.hot-group .overview-group-title span {
  color: #b45309;
}
.overview-card-group.hot-group .home-business-card.hot-card {
  border-color: rgba(245, 158, 11, .28);
  background: linear-gradient(180deg, #fff7df 0%, #fffdf4 100%);
}
.overview-card-group.hot-group .home-business-card.hot-card:hover,
.overview-card-group.hot-group .home-business-card.hot-card.active {
  border-color: #f59e0b;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .35), 0 8px 18px rgba(180, 83, 9, .10);
}
.overview-card-group.hot-group .overview-card-label {
  color: #7c2d12;
}
.overview-card-group.hot-group .overview-number {
  color: #b42318;
}
.overview-card-group.hot-group .overview-unit {
  color: #b45309;
}
.overview-card-group.sales-group {
  background: linear-gradient(180deg, rgba(248, 251, 255, .98), rgba(255, 255, 255, .98));
}
.overview-card-group.sales-group .overview-card-label,
.overview-card-group.alert-group .overview-card-label {
  color: #344258;
}
.overview-card-group.sales-group .overview-number,
.overview-card-group.alert-group .overview-number {
  color: #1e2b42;
}
.overview-card-group .sales-alert-card.new-product {
  border-color: rgba(37, 99, 235, .20);
  background: linear-gradient(180deg, #f8fbff, #fff);
}
.overview-card-group .sales-alert-card.old-revived {
  border-color: rgba(220, 38, 38, .34);
  background: linear-gradient(180deg, #fff7f7, #fff);
}
.overview-card-group .sales-alert-card.platform-stock {
  border-color: rgba(217, 119, 6, .26);
  background: linear-gradient(180deg, #fff9eb, #fff);
}
.overview-card-group .sales-alert-card.erp-stock {
  border-color: rgba(124, 58, 237, .22);
  background: linear-gradient(180deg, #faf7ff, #fff);
}
.overview-card-group .sales-alert-card.new-active-shein,
.overview-card-group .sales-alert-card.new-active-temu {
  border-color: rgba(14, 165, 233, .24);
  background: linear-gradient(180deg, #f2fbff, #fff);
}
.overview-card-group .sales-alert-card.new-product .overview-card-label { color: #1d4ed8; }
.overview-card-group .sales-alert-card.old-revived .overview-card-label { color: #b91c1c; }
.overview-card-group .sales-alert-card.platform-stock .overview-card-label { color: #b45309; }
.overview-card-group .sales-alert-card.erp-stock .overview-card-label { color: #6d28d9; }
.overview-card-group .sales-alert-card.new-active-shein .overview-card-label,
.overview-card-group .sales-alert-card.new-active-temu .overview-card-label { color: #0369a1; }
.overview-card-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  color: #526078;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.overview-card-group .home-business-card > .overview-card-label,
.overview-card-group .sales-alert-card > .overview-card-label {
  position: relative;
  display: block;
  padding-right: 18px;
  color: #526078;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.overview-card-group .overview-card-label .info-dot {
  position: absolute;
  top: 0;
  right: 0;
}
.overview-card-group.alert-group .overview-card-label {
  font-size: 13px;
}
.overview-metric-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 7px 0 4px;
  color: #1f2a3d;
  font-variant-numeric: tabular-nums;
  line-height: 1.08;
}
.overview-card-group .home-business-card > .overview-metric-value,
.overview-card-group .sales-alert-card > .overview-metric-value {
  margin: 7px 0 4px;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.08;
}
.overview-number {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.overview-card-group .home-business-card .overview-number,
.overview-card-group .sales-alert-card .overview-number {
  font-size: 24px;
  font-weight: 600;
}
.overview-card-group .overview-number.medium { font-size: 22px; }
.overview-card-group .overview-number.long { font-size: 20px; }
.overview-unit {
  color: #334155;
  font-size: 18px;
  font-weight: 600;
}
.overview-card-group .home-business-card .overview-unit,
.overview-card-group .sales-alert-card .overview-unit {
  font-size: 15px;
  font-weight: 600;
}
.overview-card-meta,
.overview-card-group .home-business-card small,
.overview-card-group .sales-alert-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}
.overview-alert-meta {
  display: block;
  margin-top: 2px;
}
.overview-card-group .overview-alert-meta small,
.overview-card-group .overview-alert-meta em {
  display: block;
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
}
.overview-card-group .sales-alert-card.new-active-shein .overview-alert-meta small,
.overview-card-group .sales-alert-card.new-active-temu .overview-alert-meta small {
  overflow-wrap: anywhere;
  white-space: normal;
}
.overview-card-group .sales-alert-card em {
  display: inline-flex;
  margin-top: 0;
  color: #1d4ed8;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
}
.overview-card-group .sales-alert-card.old-revived em { color: #b91c1c; }
.sales-alert-unread { padding: 4px 8px; font-size: 12px; line-height: 1.2; font-weight: 700; }
.sales-alert-badge { padding: 5px 9px; font-size: 12px; line-height: 1.25; font-weight: 700; }
.overview-detail-filters {
  grid-template-columns:
    minmax(88px, .7fr)
    minmax(108px, .85fr)
    minmax(142px, 1fr)
    minmax(168px, 1.25fr)
    minmax(180px, 1.7fr)
    88px
    max-content;
}
.overview-detail-filters #productSalesQuery {
  grid-column: auto;
  min-width: 0;
}
.overview-detail-filters #productSalesCategory {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.overview-detail-filters #loadOverviewDetailBtn,
.overview-detail-filters #salesAlertDataIssueBtn {
  min-height: 40px;
}
.overview-detail-filters #salesAlertDataIssueBtn {
  min-width: max-content;
  white-space: nowrap;
}
@media (max-width: 1260px) {
  .overview-detail-filters {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }
  .overview-detail-filters #productSalesQuery {
    grid-column: span 2;
  }
}
.overview-detail-table-wrap { min-height: 420px; max-height: calc(100vh - 310px); }
.overview-detail-table { width: 100%; table-layout: auto; }
.overview-detail-table th,
.overview-detail-table td { max-width: 260px; vertical-align: middle; }
.overview-detail-table td { white-space: normal; }
.detail-main { color: var(--ink); font-weight: 700; line-height: 1.35; }
.detail-sub { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.detail-wrap { white-space: normal; overflow-wrap: anywhere; }
.detail-metrics { display: flex; gap: 10px; flex-wrap: wrap; white-space: nowrap; }
.detail-metrics span { color: var(--muted); font-size: 12px; }
.detail-metrics strong { margin-left: 3px; color: var(--ink); font-size: 14px; }
.detail-reason { margin-top: 4px; max-width: 300px; color: #475569; font-size: 12px; line-height: 1.35; white-space: normal; }
.overview-detail-table .sales-alert-badges { min-width: 132px; }

/* 销售总览按“跨境销售 → 三平台爆款矩阵 → 增长发现”纵向展开。 */
.overview-card-groups {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.overview-card-group.sales-group,
.overview-card-group.hot-group,
.overview-card-group.alert-group {
  grid-column: 1 / -1;
}
.overview-card-group.sales-group {
  padding: 10px 14px;
}
.overview-card-group.sales-group .overview-group-title {
  margin-bottom: 6px;
}
.overview-card-group.sales-group .home-business-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line-soft);
}
.overview-card-group.sales-group .home-business-card {
  min-height: 66px;
  padding: 10px 14px;
  border: 0;
  border-radius: 0;
  border-right: 1px solid var(--line-soft);
}
.overview-card-group.sales-group .home-business-card:last-child {
  border-right: 0;
}
.overview-card-group.sales-group .overview-metric-value {
  margin: 4px 0 2px;
}
.overview-card-group.sales-group .overview-number {
  font-size: 22px;
}
.overview-card-group.hot-group {
  padding: 14px;
  background: rgba(255, 255, 255, .92);
}
.overview-card-group.hot-group .home-business-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: none;
  gap: 0;
}
.hot-matrix-head,
.hot-matrix-row {
  display: grid;
  grid-template-columns: minmax(150px, .85fr) repeat(3, minmax(150px, 1fr));
  align-items: stretch;
}
.hot-matrix-head {
  min-height: 44px;
  align-items: center;
  color: #64748b;
  border: 1px solid var(--line-soft);
  border-radius: 10px 10px 0 0;
  background: #f8fafc;
}
.hot-matrix-head > * {
  min-height: 44px;
  padding: 0 14px;
}
.hot-matrix-head strong {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  font-size: 13px;
}
.hot-grade-head img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.hot-grade-head.grade-ready {
  color: #1d4ed8;
  background: #eef5ff;
}
.hot-grade-head.grade-hot {
  color: #c2410c;
  background: #fff4e7;
}
.hot-grade-head.grade-strong {
  color: #dc2626;
  background: #fff0f2;
}
.hot-matrix-row {
  border: 1px solid var(--line-soft);
  border-top: 0;
  background: #fff;
}
.hot-matrix-row:last-child {
  border-radius: 0 0 10px 10px;
}
.hot-platform-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--line-soft);
}
.hot-platform-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.hot-platform-copy strong {
  color: #1e293b;
  font-size: 14px;
  line-height: 1.2;
}
.hot-platform-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}
.hot-platform-logo {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .12);
}
.hot-platform-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hot-platform-logo.internal {
  background: linear-gradient(145deg, #fb5f9b, #e83e8c);
}
.hot-platform-logo.internal img {
  width: 23px;
  height: 23px;
  object-fit: contain;
}
.overview-card-group.hot-group .home-business-card.hot-card {
  min-height: 86px;
  margin: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: none;
}
.overview-card-group.hot-group .hot-card.grade-ready {
  border-color: rgba(37, 99, 235, .30);
  background: linear-gradient(180deg, #edf5ff 0%, #f8fbff 100%);
}
.overview-card-group.hot-group .hot-card.grade-hot {
  border-color: rgba(217, 119, 6, .32);
  background: linear-gradient(180deg, #fff1df 0%, #fffaf2 100%);
}
.overview-card-group.hot-group .hot-card.grade-strong {
  border-color: rgba(220, 38, 38, .30);
  background: linear-gradient(180deg, #ffecef 0%, #fff8f8 100%);
}
.overview-card-group.hot-group .hot-card.grade-ready .overview-number { color: #1d4ed8; }
.overview-card-group.hot-group .hot-card.grade-hot .overview-number { color: #c2410c; }
.overview-card-group.hot-group .hot-card.grade-strong .overview-number { color: #dc2626; }
.overview-card-group.hot-group .hot-card.grade-ready:hover,
.overview-card-group.hot-group .hot-card.grade-ready.active {
  border-color: #3b82f6;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .45), 0 8px 18px rgba(37, 99, 235, .14);
}
.overview-card-group.hot-group .hot-card.grade-hot:hover,
.overview-card-group.hot-group .hot-card.grade-hot.active {
  border-color: #f59e0b;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .45), 0 8px 18px rgba(217, 119, 6, .14);
}
.overview-card-group.hot-group .hot-card.grade-strong:hover,
.overview-card-group.hot-group .hot-card.grade-strong.active {
  border-color: #ef4444;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .42), 0 8px 18px rgba(220, 38, 38, .14);
}
.overview-card-group.alert-group {
  padding: 12px 14px;
}
.overview-card-group.alert-group .sales-alert-cards {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
}
.overview-card-group.alert-group .sales-alert-card {
  min-height: 92px;
}
.overview-card-group .sales-alert-card.temu-quality-alert {
  border-color: rgba(245, 158, 11, .28);
  background: #fffaf0;
}
.overview-card-group .sales-alert-card.temu-quality-alert .overview-card-label {
  color: #a16207;
}
.overview-card-group .sales-alert-card.temu-quality-alert em {
  color: #dc2626;
}
.overview-card-group .sales-alert-card.quality-dual-entry {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 0;
  overflow: hidden;
}
.quality-dual-entry button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.quality-risk-entry {
  display: grid;
  gap: 3px;
  padding: 10px 12px 7px;
}
.quality-confirm-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  padding: 5px 10px;
  border-top: 1px solid rgba(245, 158, 11, .22) !important;
  color: #6b7280 !important;
  font-size: 13px !important;
}
.quality-confirm-entry.pending {
  color: #b45309 !important;
  background: #fff4d6;
}
.quality-confirm-entry strong {
  color: #9a3412;
  font-size: 13px;
}
.quality-dual-entry button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: -3px;
}

.overview-quality-detail-panel {
  display: grid;
  gap: 12px;
}
.overview-quality-detail-panel.hidden {
  display: none;
}
.overview-quality-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.overview-quality-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(260px, 1fr) auto auto;
  gap: 8px;
}
.overview-quality-toolbar input,
.overview-quality-toolbar select {
  width: 100%;
  height: 40px;
  border-radius: 10px;
}
.overview-quality-toolbar.confirmation-toolbar {
  grid-template-columns: minmax(180px, 240px) minmax(160px, 220px);
  justify-content: start;
  margin-bottom: 10px;
}
.quality-confirm-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.quality-confirm-status.pending {
  background: #fff4d6;
  color: #b45309;
}
.quality-confirm-status.done {
  background: #e8f7ee;
  color: #15803d;
}
.overview-quality-summary,
.sales-temu-quality-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
}
.overview-quality-summary > .quality-filter-card,
.sales-temu-quality-summary > .quality-filter-card {
  display: grid;
  appearance: none;
  border: 0;
  gap: 4px;
  min-height: 72px;
  padding: 11px 14px;
  border-right: 1px solid var(--line-soft);
  border-radius: 0;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.overview-quality-summary > .quality-filter-card:last-child,
.sales-temu-quality-summary > .quality-filter-card:last-child {
  border-right: 0;
}
.overview-quality-summary strong,
.sales-temu-quality-summary strong {
  color: var(--ink);
  font-size: 22px;
}
.overview-quality-summary .low strong,
.sales-temu-quality-summary .low strong {
  color: var(--red);
}
.overview-quality-summary .warning strong,
.sales-temu-quality-summary .warning strong {
  color: #c26708;
}
.overview-quality-summary .recovered strong,
.sales-temu-quality-summary .recovered strong {
  color: var(--green);
}
.quality-filter-card:hover {
  background: var(--ui-color-primary-soft);
}
.quality-filter-card.active {
  border-color: var(--blue);
  background: var(--ui-color-primary-soft);
  box-shadow: inset 0 0 0 2px var(--blue);
}
.quality-filter-card:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: -3px;
}
.quality-active-filter {
  min-height: 20px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}
.quality-active-filter:empty {
  display: none;
}
.business-kpi.quality-filter-card {
  width: 100%;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.overview-card-group .home-business-card,
.overview-card-group .sales-alert-card {
  position: relative;
}
.overview-card-group .home-business-card:active,
.overview-card-group .sales-alert-card:active {
  transform: translateY(1px) scale(.99);
}
.overview-card-group .home-business-card:focus-visible,
.overview-card-group .sales-alert-card:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: 2px;
}
.overview-card-group .home-business-card.is-loading,
.overview-card-group .sales-alert-card.is-loading {
  border-color: #2563eb;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .24), 0 8px 18px rgba(37, 99, 235, .16);
  cursor: progress;
}
.overview-card-group .sales-alert-card.is-loading:disabled {
  opacity: 1;
}
.overview-card-action-state {
  position: absolute;
  right: 8px;
  bottom: 7px;
  padding: 3px 7px;
  border: 1px solid rgba(37, 99, 235, .28);
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.overview-detail-loading-state {
  display: none;
  margin: 0 0 10px;
  padding: 9px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}
.overview-detail-panel.is-loading .overview-detail-loading-state {
  display: block;
}
.overview-detail-panel.is-loading .overview-detail-table-wrap {
  opacity: .68;
  transition: opacity .12s ease;
}

/* 详情区使用页面滚动，不再把表格锁在矮小的内层滚动框。 */
.overview-detail-panel {
  align-content: start;
  min-height: calc(100vh - 92px);
  scroll-margin-top: 78px;
}
.overview-detail-table-wrap {
  min-height: calc(100vh - 235px);
  max-height: none;
  overflow: visible;
}
.overview-detail-table th {
  top: 68px;
}
.overview-detail-table th,
.overview-detail-table td {
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: 12px;
}
.overview-detail-table .detail-main {
  font-size: 12px;
  line-height: 1.25;
}
.internal-reference-detail {
  margin-top: 4px;
  color: #475569;
  font-size: 12px;
}
.internal-reference-detail summary {
  color: #2563eb;
  cursor: pointer;
  font-weight: 700;
}
.internal-reference-grid {
  display: grid;
  gap: 3px;
  margin-top: 6px;
  padding: 7px;
  border-radius: 6px;
  background: #f8fafc;
  white-space: normal;
}
.stock-warning-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.stock-warning-pill.low { background: #f5f3ff; color: #6d28d9; }
.stock-warning-pill.soon { background: #fff7ed; color: #c2410c; }
.stock-warning-pill.out { background: #fff1f2; color: #be123c; }
.product-sales-grade {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.product-sales-grade.strong {
  background: linear-gradient(135deg, #fff1f5 0%, #ffe4ef 100%);
  color: #be185d;
  border: 1px solid rgba(236, 72, 153, .36);
  box-shadow: 0 4px 12px rgba(236, 72, 153, .12);
}
.product-sales-grade.hot {
  background: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 100%);
  color: #3157c9;
  border: 1px solid rgba(99, 102, 241, .24);
}
.product-sales-grade.ready {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  color: #c2410c;
  border: 1px solid rgba(251, 146, 60, .34);
  box-shadow: 0 4px 12px rgba(251, 146, 60, .10);
}
.product-sales-grade.normal {
  background: #f1f5f9;
  color: #64748b;
}
.product-sales-name,
.product-sales-basis {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.table-sort-button span {
  color: #2563eb;
  font-size: 12px;
  line-height: 1;
}
.table-sort-button.active {
  color: #173ea5;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #eef7f1;
  color: var(--green);
}
.status-pill.danger {
  background: #fff0f4;
  color: var(--red);
}
.status-pill.ok {
  background: #eef7f1;
  color: var(--green);
}

button, .primary-button, .primary-wide, .ghost-button, .icon-action {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px 13px;
  font-weight: 600;
}
.primary-button, .primary-wide {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--violet) 48%, var(--cyan));
  box-shadow: 0 10px 22px rgba(155, 123, 255, .22);
}
.primary-wide { width: 100%; }
.ghost-button, .icon-action {
  background: rgba(255,255,255,.78);
  color: var(--text);
}
.ghost-button:hover, .icon-action:hover { border-color: #cad3e8; background: #fff; }
.danger-action { color: var(--red); border-color: #ffd2dd; background: #fff5f8; }

input, select, textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 9px 11px;
}
textarea { resize: vertical; }
label { color: var(--muted); font-size: 12px; }

.sales-entry {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(96px, 150px) minmax(160px, 1.2fr) auto;
  align-items: center;
  gap: 10px;
}
.sales-entry span { font-weight: 600; }
.sales-entry small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.sales-entry-done { background: #f6fff9; }
.sales-entry-pending {
  background: #fff9ed;
  border-color: #ffd99b;
}
.sales-focus-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dce5f6;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(240,252,255,.9));
}
.sales-focus-bar strong { display: block; font-size: 15px; }
.sales-focus-bar span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.sales-focus-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.sales-focus-tabs .segment {
  min-width: 54px;
  height: 32px;
  padding: 0 10px;
}
.sales-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.sales-history-query {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.sales-history-query h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.locked-note {
  display: inline-block;
  max-width: 150px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}
.sales-overview-wrap {
  max-height: calc(100vh - 360px);
  overflow-x: scroll !important;
  overflow-y: auto;
  scrollbar-width: auto;
  scrollbar-color: #aeb4bd #eceef1;
}
.viewport-detail-wrap.sales-overview-wrap {
  overflow-x: scroll !important;
}
.sales-overview-wrap::-webkit-scrollbar {
  width: 13px;
  height: 13px;
}
.sales-overview-wrap::-webkit-scrollbar-track {
  background: #eceef1;
  border-radius: 0 0 7px 7px;
}
.sales-overview-wrap::-webkit-scrollbar-thumb {
  min-width: 72px;
  border: 2px solid #eceef1;
  border-radius: 8px;
  background: #aeb4bd;
}
.sales-overview-wrap::-webkit-scrollbar-thumb:hover {
  background: #8f969f;
}
.sales-overview-wrap::-webkit-scrollbar-corner {
  background: #eceef1;
}
.sales-overview-table {
  min-width: 980px;
}
.sales-overview-table th,
.sales-overview-table td {
  height: 42px;
  min-width: 64px;
  max-width: 128px;
  padding: 7px 8px;
  line-height: 1.25;
}
.sales-overview-table th {
  white-space: normal;
  word-break: keep-all;
}
.sales-overview-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sales-overview-table tfoot td {
  position: static;
  background: #fff8e6;
  border-top: 2px solid #f2c66d;
  font-weight: 700;
}
.sales-overview-table tfoot .sticky-col {
  position: static;
  background: #fff3cf;
}
html:not(.os-windows) .sales-overview-table tfoot {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #fff8e6;
}
html:not(.os-windows) .sales-overview-table tfoot .sticky-col {
  position: sticky;
  z-index: 4;
}
.sales-report-total-row td {
  color: var(--text);
}
.sales-report-total-row .global-row-number-total {
  background: #fff8e6;
}
.sales-grid-cell {
  min-width: 86px;
}
.sales-grid-input {
  width: 76px;
  height: 30px;
  text-align: right;
  border-radius: 8px;
  padding: 0 8px;
}
.sales-grid-input.input-error {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(255, 94, 94, .14);
}
#salesReportFootnote {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.sales-dual-shell {
  display: grid;
  gap: 12px;
}
.sales-dual-shell > .panel-head h2 {
  font-weight: 600;
  letter-spacing: 0;
}
.sales-dual-shell > .panel-head p {
  font-weight: 400;
}
.sales-dual-shell button,
.sales-dual-shell .primary-button,
.sales-dual-shell .ghost-button,
.sales-dual-shell .range-shortcuts .segment {
  font-weight: 500;
}
.sales-dual-shell input,
.sales-dual-shell select {
  font-weight: 400;
}
.sales-custom-range {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.sales-custom-range input {
  width: 138px;
  height: 34px;
}
.sales-date-query-button {
  height: 34px;
  padding: 0 14px;
  white-space: nowrap;
}
.sales-range-status {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.sales-scope-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #f0d9a3;
  border-radius: 10px;
  padding: 9px 12px;
  background: #fffaf0;
  color: #9b6918;
  font-size: 12px;
  line-height: 1.45;
}
.sales-scope-notice strong {
  flex: 0 0 auto;
  color: #b1700a;
  font-weight: 600;
}
.sales-overview-band {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.sales-overview-band.cross-border-band {
  border-color: #cbd2ff;
}
.sales-overview-band.internal-sales-band {
  border-color: var(--ui-color-control-border);
}
.sales-overview-band.outbound-band {
  border-color: #b9e7d7;
}
.sales-band-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  padding: 8px 14px;
  color: #fff;
}
.cross-border-band .sales-band-title {
  background: #6574e9;
}
.internal-sales-band .sales-band-title {
  background: var(--ui-color-primary-strong);
}
.outbound-band .sales-band-title {
  background: #28b78b;
}
.sales-band-title > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.sales-band-title strong {
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
}
.sales-band-title span,
.sales-band-title small {
  font-size: 12px;
  font-weight: 500;
}
.sales-band-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: .94;
}
.sales-band-title small {
  flex: 0 0 auto;
  opacity: .9;
}
.sales-band-body {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(320px, .9fr);
  gap: 20px;
  align-items: center;
  min-height: 116px;
  padding: 14px 18px;
}
.sales-band-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: stretch;
}
.sales-band-metrics.outbound-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.internal-sales-body {
  display: block;
  min-height: 0;
}
.sales-band-metrics.internal-sales-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.internal-sales-metrics > div {
  border-bottom: 1px solid var(--ui-color-border);
}
.internal-sales-metrics > div:nth-child(4n) {
  border-right: 0;
}
.internal-sales-metrics > div:nth-last-child(-n + 4) {
  border-bottom: 0;
}
.internal-sales-metrics .internal-selected-metric {
  padding-left: 16px;
  background: var(--ui-color-primary-soft);
}
.internal-selected-metric small {
  display: block;
  margin: 5px 0 0;
  color: var(--ui-color-primary-strong);
  font-size: var(--ui-font-size-caption);
  font-weight: var(--ui-font-weight-semibold);
}
.internal-sales-status {
  margin: 10px 0 0;
  color: var(--ui-color-muted);
  font-size: var(--ui-font-size-note);
  font-weight: var(--ui-font-weight-regular);
}
.sales-band-metrics > div {
  position: relative;
  min-width: 0;
  padding: 7px 16px;
  border-right: 1px solid var(--line);
}
.sales-band-metrics > div:first-child {
  padding-left: 0;
}
.sales-band-metrics > div:last-child {
  border-right: 0;
}
.sales-band-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 7px;
}
.sales-band-metrics strong {
  color: var(--text);
  font-size: 27px;
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: 0;
}
.sales-band-metrics small {
  margin-left: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.sales-platform-composition {
  display: grid;
  gap: 7px;
}
.sales-platform-row {
  display: grid;
  grid-template-columns: 72px 1fr 76px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
}
.sales-platform-row > span:last-child {
  text-align: right;
  color: var(--muted);
}
.sales-platform-track {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #eef1f8;
}
.sales-platform-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #6574e9;
}
.sales-no-merge {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e87746;
  font-size: 12px;
  font-weight: 600;
}
.sales-no-merge::before,
.sales-no-merge::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #f0c5b2;
}
.outbound-trend {
  display: grid;
  grid-template-columns: repeat(7, minmax(26px, 1fr));
  align-items: end;
  gap: 8px;
  min-height: 82px;
}
.outbound-trend-item {
  display: grid;
  grid-template-rows: 18px 42px 16px;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.outbound-trend-item strong {
  color: #278d76;
  font-size: 12px;
  font-weight: 600;
}
.outbound-trend-bar {
  align-self: end;
  width: 10px;
  min-height: 4px;
  border-radius: 6px 6px 2px 2px;
  background: #37b99b;
}
.sales-detail-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.sales-detail-tabs {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 10px 14px 0;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}
.sales-detail-tab {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}
.sales-detail-tab.active[data-sales-detail-mode="manual"] {
  border-color: #cbd2ff;
  background: #f1f3ff;
  color: #5264d8;
}
.sales-detail-tab.active[data-sales-detail-mode="outbound"] {
  border-color: #b9e7d7;
  background: #eafaf5;
  color: #168267;
}
#manualSalesDetail,
#erpOutboundDetail {
  padding: 14px;
}
.sales-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.sales-detail-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
}
.sales-detail-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.sales-detail-panel .report-summary-strip span {
  font-weight: 500;
}
.sales-detail-panel .report-summary-strip strong {
  font-weight: 500;
}
.sales-detail-panel .report-data-table th {
  font-weight: 600;
}
.sales-detail-panel .report-data-table td strong {
  font-weight: 500;
}
.sales-detail-panel .report-data-table .strong {
  font-weight: 500;
}
.erp-outbound-filters {
  grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 1fr) minmax(130px, .9fr) minmax(150px, 1fr) 110px auto;
}
.erp-outbound-scope-line {
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.erp-outbound-table-wrap {
  max-height: 640px;
  min-height: 360px;
}
.erp-outbound-table {
  min-width: 1120px;
}
.erp-outbound-table th,
.erp-outbound-table td {
  vertical-align: middle;
}
.erp-outbound-table th {
  font-weight: 600;
}
.erp-outbound-table td strong {
  font-weight: 500;
}
.erp-outbound-table td.strong,
.erp-outbound-table td.num.strong {
  font-weight: 500;
}
.erp-outbound-table td.product-image-cell {
  width: 64px;
  min-width: 64px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.erp-outbound-thumb,
.erp-outbound-image-empty {
  display: block;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8fb;
}
.erp-outbound-thumb {
  object-fit: cover;
}
.overview-detail-table td.product-image-cell {
  width: 64px;
  min-width: 64px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.erp-outbound-image-empty {
  display: grid;
  place-items: center;
  color: #9aa4b8;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
}
.production-size-badges {
  display: flex;
  min-width: 360px;
  flex-wrap: wrap;
  gap: 6px;
}
.production-size-badges .stock-warning,
#productionCoordinationTable td > .stock-warning {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.production-size-badges .stock-warning.warning,
#productionCoordinationTable td > .stock-warning.warning {
  background: #fff7ed;
  color: #c2410c;
}
.production-size-badges .stock-warning.danger,
#productionCoordinationTable td > .stock-warning.danger {
  background: #fff1f2;
  color: #be123c;
}
#productionCoordinationTable td > .stock-warning.factory-very-urgent {
  background: #fdf4ff;
  color: #a21caf;
}
#productionCoordinationTable td > .stock-warning.factory-urgent {
  background: #fef2f2;
  color: #dc2626;
}
#productionCoordinationTable td > .stock-warning.factory-soon {
  background: #fefce8;
  color: #a16207;
}
#productionCoordinationTable td.product-image-cell {
  width: 78px;
  min-width: 78px;
}
.production-product-label-cell {
  width: 88px;
  min-width: 88px;
  white-space: normal !important;
}
.production-product-label-stack {
  display: grid;
  justify-items: start;
  gap: 4px;
}
.sales-overview-label-cell {
  vertical-align: middle;
  white-space: normal !important;
}
.sales-overview-label-cell .production-product-label-stack {
  display: flex;
  align-content: center;
  flex-wrap: nowrap;
  overflow: hidden;
}
.production-product-label {
  display: inline-flex;
  box-sizing: border-box;
  min-height: 24px;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border: 1px solid var(--ui-color-border);
  border-radius: 5px;
  background: #f8fafc;
  color: var(--ui-color-text);
  font-family: var(--ui-font-family);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
button.production-product-label {
  cursor: pointer;
}
.production-product-label.is-big {
  border-color: #b42318;
  background: #b42318;
  color: #fff;
}
.production-product-label.is-hot {
  border-color: #e44722;
  background: #e44722;
  color: #fff;
}
.production-product-label.is-ready {
  border-color: #d99000;
  background: #d99000;
  color: #fff;
}
.production-product-label.is-holiday {
  border-color: #f0b429;
  background: #fff8df;
  color: #8a4b08;
}
.production-product-label.is-store {
  border-color: #f97316;
  background: #f97316;
  color: #fff;
}
.production-product-label.is-order-chase {
  border-color: color-mix(in srgb, var(--ui-color-danger) 76%, white);
  background: var(--ui-color-danger);
  color: #fff;
}
.production-product-label.is-store.has-countdown {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
  min-width: 88px;
  white-space: normal;
}
.production-store-label-name,
.production-store-label-countdown {
  display: block;
  white-space: nowrap;
}
.production-store-label-name {
  font-weight: 700;
}
.production-store-label-countdown {
  font-weight: 600;
}
.production-product-label.is-new {
  border-color: var(--ui-color-primary);
  background: var(--ui-color-primary-soft);
  color: var(--ui-color-primary);
}
.production-product-label.is-business-new {
  min-width: 24px;
  justify-content: center;
  border-color: #fecdd3;
  background: #fff1f2;
  color: #e11d48;
}
.production-product-label.is-stale::after {
  width: 6px;
  height: 6px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: #64748b;
  content: "";
}
.production-product-label:focus-visible {
  outline: 2px solid var(--ui-color-primary);
  outline-offset: 2px;
}
.production-product-label-empty {
  color: var(--ui-color-muted);
}
.production-product-image-shell {
  position: relative;
  display: block;
  width: 68px;
  min-height: 48px;
  overflow: visible;
}
.production-product-image-shell:has(.production-holiday-icons.has-grade) {
  min-height: 64px;
}
.production-product-image-frame,
.production-product-image-frame > a {
  display: block;
  width: 48px;
  height: 48px;
}
.production-grade-seal {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 0;
  display: grid;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  padding: 0;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px currentColor, inset 0 0 0 1px rgba(255, 255, 255, .78);
  color: #fff;
  font-family: var(--ui-font-family);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.production-grade-seal.is-big {
  background: #b42318;
  color: #fff;
  box-shadow: 0 0 0 1.5px #b42318, inset 0 0 0 1px rgba(255, 255, 255, .78);
}
.production-grade-seal.is-hot {
  background: #e44722;
  color: #fff;
  box-shadow: 0 0 0 1.5px #e44722, inset 0 0 0 1px rgba(255, 255, 255, .78);
}
.production-grade-seal.is-ready {
  background: #d99000;
  color: #fff;
  box-shadow: 0 0 0 1.5px #d99000, inset 0 0 0 1px rgba(255, 255, 255, .78);
}
.production-grade-seal:focus-visible,
.production-holiday-icon:focus-visible,
.production-grade-stale-dot:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.production-grade-stale-dot {
  position: absolute;
  z-index: 3;
  top: 9px;
  right: -1px;
  width: 7px;
  height: 7px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #64748b;
  cursor: pointer;
}
.production-holiday-icons {
  position: absolute;
  top: 11px;
  right: -2px;
  display: grid;
  width: 22px;
  grid-template-columns: repeat(2, 11px);
  align-items: center;
  justify-items: center;
  gap: 0;
}
.production-holiday-icons.has-grade {
  top: 36px;
}
.production-holiday-icon {
  width: 14px;
  height: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  line-height: 14px;
  text-align: center;
  cursor: pointer;
}
.production-page-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.production-page-tools .tool-button {
  height: 30px;
  padding: 0 9px;
  color: #64748b;
  font-size: 12px;
}
.production-factory-confirm-button.has-pending {
  border-color: #f04438;
  background: #fff1f0;
  color: #b42318;
  font-weight: 600;
}
.production-selection-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  margin-top: 7px;
  padding: 6px 8px 6px 12px;
  border: 1px solid #dbe5f3;
  border-radius: 10px;
  background: #f8faff;
}
.production-selection-actions > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.production-selection-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.production-selection-buttons button {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
}
.production-selection-buttons button:disabled {
  cursor: not-allowed;
  opacity: .45;
  box-shadow: none;
}
.production-owner-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0 10px;
  padding: 14px 16px;
  border: 1px solid #bfd3f3;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5f9ff 0%, #eef5ff 100%);
}
.production-owner-summary-bar > div:first-child {
  display: grid;
  gap: 4px;
}
.production-owner-summary-bar strong {
  color: #173f73;
  font-size: 15px;
}
.production-owner-summary-bar span {
  color: #64748b;
  font-size: 12px;
}
.production-owner-summary-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.production-owner-summary-actions select {
  min-width: 150px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 0 10px;
}
.production-module-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.production-module-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.production-module-card > .production-module-heading {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
}
.production-module-card .production-module-label {
  font-size: 14px;
  font-weight: 600;
}
.production-module-card .production-module-help {
  flex: 0 0 15px;
  margin-left: 1px;
}
.production-module-card strong {
  align-self: center;
  color: #64748b;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.production-module-card strong.data-pending {
  color: #b45309;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.production-module-card.source-pending {
  border-color: #f3c47c;
  background: #fffaf0;
}
.production-owner-factory-card {
  display: grid;
}
.production-owner-factory-card .production-module-label {
  white-space: nowrap;
}
.production-module-card small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.45;
}
.production-module-card:hover,
.production-module-card.active {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
}

.production-arrival-entry {
  width: 100%;
  margin: 14px 0 4px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  border: 1px solid #f0a2ad;
  border-radius: 12px;
  background: #fff7f8;
  color: #3f3034;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(178, 55, 76, .08);
}

.production-arrival-entry > span:first-child { display: grid; gap: 4px; }
.production-arrival-entry strong { font-size: 17px; color: #9f2f45; }
.production-arrival-entry small { color: #76676a; font-size: 13px; }
.production-arrival-entry-counts { display: flex; align-items: center; gap: 8px; }
.production-arrival-entry-counts b {
  padding: 6px 9px;
  border-radius: 7px;
  background: #fff;
  color: #b53b50;
  font-size: 13px;
  font-weight: 700;
}
.production-arrival-entry-counts b:nth-child(2) { color: #b65a14; }
.production-arrival-entry-counts b:nth-child(3) { color: #53637a; }
.production-arrival-entry-action { color: #b12f49; font-weight: 700; white-space: nowrap; }
.production-arrival-entry:hover { border-color: #df6e81; background: #fff1f3; }

.production-material-workflow {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.material-arrival-board {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #eadfe1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(96, 64, 72, .06);
}
.material-arrival-board.material-purchase-priority {
  border: 2px solid #e5484d;
  background: linear-gradient(135deg, #fff3f3 0%, #fffaf5 100%);
  box-shadow: 0 12px 30px rgba(202, 44, 55, .16);
}
.material-purchase-priority .material-arrival-board-heading strong,
.material-purchase-priority .material-arrival-board-heading > b {
  color: #b4232d;
  font-weight: 700;
}
.material-purchase-priority .material-arrival-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.material-purchase-priority .material-arrival-board-heading > b {
  padding: 7px 11px;
  border-radius: 999px;
  background: #b4232d;
  color: #fff;
}

.material-arrival-board-heading,
.material-arrival-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.material-arrival-board-heading > div { display: grid; gap: 4px; }
.material-arrival-board-heading strong { color: #2e2930; font-size: 20px; }
.material-arrival-board-heading span { color: #756d76; font-size: 13px; }
.material-arrival-board-heading > b { color: #ae354c; font-size: 15px; }

.material-arrival-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.material-arrival-summary > div {
  min-height: 84px;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 10px;
  border: 1px solid #eadfe1;
  border-radius: 11px;
  background: #fffafb;
}
.material-arrival-summary span { color: #6f6266; font-size: 14px; font-weight: 700; }
.material-arrival-summary strong { grid-row: 1 / 3; grid-column: 2; color: #bb344e; font-size: 30px; }
.material-arrival-summary small { color: #8c7d81; font-size: 12px; }
.material-arrival-summary .today { border-color: #f1c38d; background: #fffaf1; }
.material-arrival-summary .today strong { color: #c56619; }
.material-arrival-summary .upcoming { border-color: #cfdaec; background: #f8fbff; }
.material-arrival-summary .upcoming strong { color: #4e71a7; }

.material-today-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.material-today-card {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 13px 14px;
  border: 1px solid var(--ui-color-border);
  border-left: 4px solid var(--ui-color-warning);
  border-radius: 10px;
  background: var(--panel-solid);
  color: var(--ui-color-text);
}
.material-today-card.purchase-priority {
  border-color: #ef7a73;
  border-left: 6px solid #d92d38;
  background: #fff8f5;
  box-shadow: 0 7px 18px rgba(185, 40, 52, .10);
}
.material-today-card.purchase-priority > div b { color: #b4232d; }
.material-today-card > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.material-today-card > div b { color: var(--ui-color-warning); font-size: var(--ui-font-size-note); }
.material-today-card > strong { font-size: var(--ui-font-size-section-title); }
.material-today-card > span,
.material-today-card > small { color: var(--ui-color-muted); font-size: var(--ui-font-size-note); }
.material-today-card.assigned { border-left-color: var(--ui-color-danger); background: #fff7f9; }
.material-today-card.assigned-to-me {
  border-color: var(--ui-color-danger);
  border-left-width: 6px;
  background: #fff0f4;
  box-shadow: 0 8px 20px rgba(239, 71, 111, .14);
}
.material-today-card.assigned-to-me > div b { color: var(--ui-color-danger); }

.material-arrival-section {
  overflow: hidden;
  border: 1px solid #e3e7ee;
  border-radius: 11px;
}
.material-arrival-section-title { padding: 11px 14px; background: #fbfcfe; }
.material-arrival-section-title strong { color: #38445a; font-size: 15px; }
.material-arrival-section-title span { color: #758198; font-size: 12px; }
.material-arrival-table-head,
.material-arrival-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(130px, .9fr) minmax(150px, 1fr) minmax(118px, .78fr) minmax(84px, .5fr) minmax(110px, .7fr) minmax(110px, .7fr) 78px;
  gap: 10px;
  align-items: center;
}
.material-arrival-table-head {
  min-height: 40px;
  padding: 0 14px;
  border-top: 1px solid #e7eaf0;
  border-bottom: 1px solid #e7eaf0;
  background: #f6f8fb;
  color: #6b778d;
  font-size: 12px;
  font-weight: 700;
}
.material-arrival-batch + .material-arrival-batch { border-top: 1px solid #e7eaf0; }
.material-arrival-row {
  width: 100%;
  min-height: 72px;
  padding: 10px 14px;
  border: 0;
  background: #fff;
  color: #384357;
  text-align: left;
  cursor: pointer;
}
.material-arrival-row:hover,
.material-arrival-batch.expanded .material-arrival-row { background: #fff9fa; }
.material-arrival-batch.overdue .material-arrival-row { box-shadow: inset 4px 0 #d8485f; }
.material-arrival-batch.today .material-arrival-row { box-shadow: inset 4px 0 #e78a34; }
.material-arrival-row > span { min-width: 0; display: grid; gap: 3px; }
.material-arrival-row strong,
.material-arrival-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.material-arrival-row small { overflow: hidden; color: #758096; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.material-arrival-remaining strong { color: #c4314b; font-size: 18px; }
.material-arrival-status { width: fit-content; color: #bd344c; }
.material-arrival-batch.today .material-arrival-status { color: #bd641a; }
.material-arrival-batch.upcoming .material-arrival-status { color: #5273a6; }
.material-arrival-action { color: #b12f49; font-weight: 700; text-align: center; }

.material-arrival-expansion {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
  border-top: 1px solid #eadfe1;
  background: #fffafb;
}
.material-arrival-allocation-list,
.material-arrival-operations { padding: 16px; display: grid; align-content: start; gap: 11px; }
.material-arrival-allocation-list { border-right: 1px solid #eadfe1; }
.material-arrival-allocation-list > strong,
.material-arrival-operations strong { color: #43383c; font-size: 14px; }
.material-arrival-allocation-list label {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #eee6e8;
  color: #493f43;
  font-size: 13px;
}
.material-arrival-allocation-list label > span { display: grid; gap: 4px; }
.material-arrival-allocation-list small { color: #7e7276; }
.material-arrival-allocation-list input,
.material-arrival-receive-form input,
.material-arrival-reschedule-form input {
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px solid #d9cfd2;
  border-radius: 7px;
  background: #fff;
  color: #3d3437;
  font: inherit;
}
.material-arrival-receive-form,
.material-arrival-reschedule-form {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #eadfe1;
  border-radius: 9px;
  background: #fff;
}
.material-arrival-receive-form label,
.material-arrival-reschedule-form label { display: grid; gap: 5px; color: #65575c; font-size: 13px; }
.material-arrival-form-hint,
.material-arrival-role-note { margin: 0; color: #786a6f; font-size: 12px; line-height: 1.45; }
.material-arrival-role-note { padding: 10px; border-radius: 8px; background: #f5f1f2; }
.material-arrival-history { display: grid; gap: 7px; padding-top: 4px; }
.material-arrival-history p { margin: 0; display: flex; justify-content: space-between; gap: 10px; color: #62565a; font-size: 12px; }
.material-arrival-history small { color: #8c7e83; }
.material-arrival-empty { min-height: 90px; display: grid; place-items: center; align-content: center; gap: 5px; border: 1px dashed #dfd4d7; border-radius: 10px; background: #fffafb; color: #817479; }
.material-arrival-empty strong { color: #4a3f43; }

.material-stage-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 6px;
  overflow-x: auto;
}

.material-stage-card {
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid #e4ddd1;
  border-radius: 12px;
  background: #fffdf9;
  color: #534a3f;
  text-align: left;
  cursor: pointer;
}

.material-stage-card span,
.material-stage-card strong {
  display: block;
}

.material-stage-card span { font-size: 13px; }
.material-stage-card strong { margin-top: 3px; font-size: 19px; color: #2c241c; }
.material-stage-card:hover,
.material-stage-card.active { border-color: #c9653d; background: #fff4ec; box-shadow: 0 6px 16px rgba(122, 66, 37, .08); }

.material-workflow-heading,
.material-panel-title,
.material-order-header,
.material-form-actions,
.material-inline-actions,
.material-handler-control {
  display: flex;
  align-items: center;
}

.material-workflow-heading { justify-content: space-between; gap: 16px; }
.material-workflow-heading-with-back { justify-content: flex-start; }
.material-workflow-heading > div { display: grid; gap: 3px; }
.material-workflow-heading strong { font-size: 17px; color: #2f2922; }
.material-workflow-heading span { color: #7a7065; font-size: 13px; }
.material-heading-actions { display: flex; gap: 8px; align-items: center; }

.material-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--ui-color-primary);
  border-radius: 12px;
  background: var(--ui-color-primary-soft);
  color: var(--ui-color-primary-strong);
  font-size: var(--ui-font-size-body);
  font-weight: 600;
  cursor: pointer;
}
.material-back-button span { color: inherit; font-size: inherit; }
.material-back-button:hover,
.material-back-button:focus-visible {
  border-color: var(--ui-color-primary-strong);
  background: var(--panel-solid);
}
.material-back-button:disabled { cursor: wait; opacity: .72; }

.material-view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.material-view-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #dfe4ed;
  border-radius: 10px;
  background: #f8fafc;
}

.material-view-tabs button {
  min-height: 34px;
  padding: 6px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #5e6b7f;
  cursor: pointer;
}

.material-view-tabs button.active { background: #fff; color: #285fab; box-shadow: 0 1px 5px rgba(42, 73, 117, .12); }
.material-view-tabs b { margin-left: 4px; }
.material-view-tabs > span,
.material-view-tabs > small,
.material-view-tabs > b { align-self: center; padding: 4px 7px; color: var(--ui-color-muted); font-size: var(--ui-font-size-note); }
.material-view-tabs > b { color: var(--ui-color-primary-strong); }
.material-notify-actions { display: flex; align-items: center; gap: 10px; color: #657187; font-size: 12px; }

.material-order-list {
  overflow: hidden;
  border: 1px solid #dfe4ed;
  border-radius: 12px;
  background: #fff;
}

.material-order-list-head,
.material-order-row {
  display: grid;
  grid-template-columns: 48px minmax(220px, 1.5fr) minmax(140px, .88fr) minmax(88px, .52fr) minmax(112px, .7fr) 76px minmax(100px, .6fr) minmax(128px, .78fr) 88px;
  gap: 12px;
  align-items: center;
}

.material-order-list-head {
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid #dfe4ed;
  background: #f8fafc;
  color: #69758a;
  font-size: 14px;
  font-weight: 700;
}

.material-order-list-item + .material-order-list-item {
  border-top: 1px solid #e7ebf2;
}

.material-order-row {
  width: 100%;
  min-height: 88px;
  padding: 12px 14px;
  border: 0;
  background: #fff;
  color: #314056;
  text-align: left;
  cursor: pointer;
}

.material-order-row:hover { background: #f8fbff; }
.material-order-list-item.expanded > .material-order-row {
  background: #f0f7ff;
  box-shadow: inset 4px 0 #5b8def;
}
.material-order-list-item.assigned > .material-order-row { box-shadow: inset 4px 0 var(--ui-color-warning); }
.material-order-list-item.assigned-to-me > .material-order-row {
  background: #fff0f4;
  box-shadow: inset 5px 0 var(--ui-color-danger);
}

.material-order-row > span:not(.material-order-row-product) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.material-order-row strong {
  overflow: hidden;
  color: #2f3b4f;
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-order-row small { color: #66738a; font-size: 13px; line-height: 1.35; }
.material-order-index { color: #718096; text-align: center; font-weight: 700; display: flex !important; align-items: center; justify-content: center; gap: 5px; }
.material-order-index input { width: 15px; height: 15px; margin: 0; accent-color: #3977d5; }
.material-my-task strong { color: #b94f27; }
.material-my-task small { color: #8d451f; font-weight: 700; }
.material-order-row-product { min-width: 0; display: flex; align-items: center; gap: 10px; }
.material-order-row-product > span:last-child { min-width: 0; display: grid; gap: 4px; }
.material-order-toggle { color: #356fce; font-size: 14px; font-weight: 700; text-align: center; }

.material-order-expansion {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(340px, 1fr);
  border-top: 1px solid #cfd9e8;
  background: #fff;
  box-shadow: inset 4px 0 #5b8def;
}

.material-product-image {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e7dfd5;
  border-radius: 10px;
  background: #f5f1ec;
  color: #8c8278;
  font-size: 12px;
}

.material-product-image img { width: 100%; height: 100%; object-fit: cover; }
.material-product-image.compact { width: 48px; height: 48px; flex-basis: 48px; border-radius: 8px; }

.material-line-panel { padding: 18px; border-right: 1px solid #eee7df; }
.material-detail-panel { padding: 18px; background: #fcfaf7; }
.material-panel-title { justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.material-panel-title strong { color: #332c25; font-size: 16px; }
.material-panel-title span { color: #756b62; font-size: 14px; }

.material-line-head,
.material-line-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.45fr) minmax(130px, .9fr) minmax(105px, .7fr) minmax(125px, .8fr);
  gap: 10px;
  align-items: center;
}

.material-line-head { padding: 9px 12px; color: #756b62; font-size: 14px; font-weight: 700; }
.material-line-row {
  width: 100%;
  margin-top: 6px;
  padding: 14px 12px;
  border: 1px solid #ebe4db;
  border-radius: 10px;
  background: #fff;
  color: #3f3831;
  text-align: left;
  cursor: pointer;
}

.material-line-row:hover,
.material-line-row.active { border-color: #cf7755; background: #fff9f5; box-shadow: 0 5px 14px rgba(106, 68, 43, .07); }
.material-line-row.readonly { background: var(--ui-color-primary-soft); color: var(--ui-color-muted); }
.material-line-row.special { border-left: 4px solid var(--ui-color-primary); }
.material-line-row > span { min-width: 0; display: grid; gap: 4px; }
.material-line-row .material-line-identity { display: flex; align-items: center; gap: 10px; }
.material-line-identity > span { min-width: 0; display: grid; gap: 4px; }
.material-line-identity img,
.material-line-identity > i {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 8px;
  border: 1px solid #e5ddd4;
  background: #f5f1ec;
  object-fit: cover;
}
.material-line-identity > i { display: grid; place-items: center; color: #8c8278; font-size: 12px; font-style: normal; }
.material-line-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.material-line-row small { color: #756b62; font-size: 13px; line-height: 1.35; }
.material-status-pill { width: fit-content; padding: 5px 9px; border-radius: 999px; background: #fff0e6; color: #9d4929; font-size: 13px; }

.material-readonly-summary { display: grid; gap: 2px; }
.material-readonly-summary p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--ui-color-border);
  color: var(--ui-color-muted);
  font-size: var(--ui-font-size-note);
}
.material-readonly-summary strong { color: var(--ui-color-text); text-align: right; }
.material-stage-assignment {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--ui-color-control-border);
  border-radius: 9px;
  background: var(--panel-solid);
}
.material-stage-assignment > strong { color: var(--ui-color-title); font-size: var(--ui-font-size-body); }
.material-stage-assignment small,
.material-erp-only-note { color: var(--ui-color-muted); font-size: var(--ui-font-size-note); line-height: var(--ui-line-height); }
.material-erp-only-note { margin: 14px 0 0; padding: 10px; border-radius: 8px; background: var(--ui-color-primary-soft); }

.material-task-form { display: grid; gap: 12px; }
.material-task-form label { display: grid; gap: 6px; color: #574f47; font-size: 14px; }
.material-task-form input,
.material-task-form select,
.material-task-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd4c9;
  border-radius: 8px;
  background: #fff;
  color: #342e28;
  font: inherit;
}
.material-task-form input,
.material-task-form select { min-height: 42px; padding: 8px 10px; }
.material-task-form textarea { resize: vertical; padding: 9px; }
.material-task-form :disabled { background: #f3f0ec; color: #867d74; }
.material-handler-control { gap: 8px; align-items: stretch; }
.material-handler-control select { flex: 1; }
.material-inline-actions,
.material-form-actions { gap: 8px; flex-wrap: wrap; }
.material-form-actions { justify-content: flex-end; }
.material-form-actions > span { margin-right: auto; color: #756b62; font-size: 13px; }
.material-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.material-purchase-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.material-blocker { margin: 0; padding: 10px 11px; border-radius: 8px; background: #fff1dc; color: #8b4a0f; font-size: 13px; line-height: 1.45; }
.material-history { margin-top: 18px; padding-top: 14px; border-top: 1px solid #e7dfd6; }
.material-history > strong { color: #51483f; font-size: 14px; }
.material-history p { display: flex; justify-content: space-between; gap: 10px; margin: 9px 0 0; color: #655c53; font-size: 13px; }
.material-history b { color: #4c433b; }
.material-empty-state { display: grid; gap: 6px; place-items: center; min-height: 260px; border: 1px dashed #d8cfc3; border-radius: 14px; background: #fffdf9; color: #7d7369; }
.material-empty-state strong { color: #443c34; }

.material-page-heading,
.material-section-heading,
.material-push-summary,
.material-push-last {
  display: flex;
  align-items: center;
}
.material-page-heading { justify-content: flex-start; gap: 12px; }
.material-page-heading > div { display: grid; gap: 4px; }
.material-page-heading > div > .production-title-line > strong {
  color: var(--ui-color-title);
  font-size: var(--ui-font-size-page-title);
  font-weight: 700;
}
.material-section-heading { justify-content: space-between; gap: 12px; }
.material-section-heading strong {
  color: var(--ui-color-title);
  font-size: var(--ui-font-size-section-title);
  font-weight: 600;
}
.material-section-heading span,
.material-record-count {
  color: var(--ui-color-muted);
  font-size: var(--ui-font-size-note);
}
.material-attention-quiet,
.material-attention-board,
.material-all-records,
.material-push-summary {
  border: 1px solid var(--ui-color-border);
  border-radius: 12px;
  background: var(--panel-solid);
}
.material-attention-quiet {
  min-height: 52px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.material-attention-quiet strong { color: var(--ui-color-success); font-size: var(--ui-font-size-body); }
.material-attention-quiet span { color: var(--ui-color-muted); font-size: var(--ui-font-size-note); }
.material-attention-board,
.material-all-records { display: grid; gap: 12px; padding: 14px; }
.material-attention-board { border-top: 3px solid var(--ui-color-danger); }
.material-attention-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.material-attention-counts > div {
  min-height: 54px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--ui-color-border);
  border-radius: 9px;
  background: var(--ui-color-primary-soft);
}
.material-attention-counts span { color: var(--ui-color-text); font-size: var(--ui-font-size-body); font-weight: 500; }
.material-attention-counts strong { color: var(--ui-color-title); font-size: 20px; font-weight: 700; }
.material-attention-counts > .danger { border-color: var(--ui-color-danger); background: color-mix(in srgb, var(--ui-color-danger) 7%, var(--panel-solid)); }
.material-attention-counts > .danger strong { color: var(--ui-color-danger); }
.material-attention-counts > .pending { border-color: var(--ui-color-warning); background: color-mix(in srgb, var(--ui-color-warning) 8%, var(--panel-solid)); }
.material-attention-counts > .pending strong { color: var(--ui-color-warning); }
.material-push-summary {
  padding: 12px 14px;
  justify-content: space-between;
  gap: 16px;
}
.material-push-summary > div:first-child { display: grid; gap: 3px; }
.material-push-summary > div:first-child strong { color: var(--ui-color-title); font-size: var(--ui-font-size-body); }
.material-push-summary > div:first-child span,
.material-push-last span,
.material-push-last small { color: var(--ui-color-muted); font-size: var(--ui-font-size-note); }
.material-push-last { gap: 8px; margin-left: auto; }
.material-push-summary details { position: relative; }
.material-push-summary summary {
  color: var(--ui-color-primary-strong);
  font-size: var(--ui-font-size-body);
  font-weight: 500;
  cursor: pointer;
}
.material-push-history-list {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  width: min(480px, calc(100vw - 80px));
  max-height: 360px;
  overflow: auto;
  padding: 10px 14px;
  border: 1px solid var(--ui-color-border);
  border-radius: 10px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}
.material-push-history-list p,
.material-tracking-timeline p {
  margin: 0;
  padding: 9px 0;
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--ui-color-border);
}
.material-push-history-list p:last-child,
.material-tracking-timeline p:last-child { border-bottom: 0; }
.material-push-history-list time,
.material-tracking-timeline time { color: var(--ui-color-muted); font-size: var(--ui-font-size-note); }
.material-push-history-list p > span,
.material-tracking-timeline p > span { display: grid; gap: 3px; }
.material-push-history-list strong,
.material-tracking-timeline strong { color: var(--ui-color-text); font-size: var(--ui-font-size-body); }
.material-push-history-list small,
.material-tracking-timeline small { color: var(--ui-color-muted); font-size: var(--ui-font-size-note); line-height: var(--ui-line-height); }
.material-tracking-filters {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(160px, .65fr) auto auto auto auto auto;
  gap: 8px;
  align-items: end;
}
.material-tracking-filters input,
.material-tracking-filters select {
  min-height: 38px;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid var(--ui-color-control-border);
  border-radius: 8px;
  background: var(--panel-solid);
  color: var(--ui-color-text);
  font: inherit;
}
.material-tracking-filters > label { display: grid; gap: 3px; }
.material-tracking-filters > label > span { color: var(--ui-color-muted); font-size: var(--ui-font-size-note); }
.material-tracking-filters > .production-export-menu { align-self: end; }
.material-tracking-filters > .production-export-menu > summary,
.production-filter-strip > .production-export-menu > summary {
  min-height: 38px;
  box-sizing: border-box;
  justify-content: center;
  padding: 0 14px;
  font-weight: 600;
}
.production-filter-strip > .production-export-menu > summary { height: 40px; }
.material-tracking-table {
  overflow: hidden;
  border: 1px solid var(--ui-color-border);
  border-radius: 10px;
  background: var(--panel-solid);
}
.material-tracking-table-head,
.material-tracking-row {
  display: grid;
  grid-template-columns: 34px 102px minmax(225px, 1.35fr) 132px minmax(205px, 1.2fr) 82px 82px 88px minmax(145px, .9fr) 122px 48px;
  gap: 10px;
  align-items: center;
}
.material-tracking-table-head {
  min-height: 42px;
  padding: 0 12px;
  background: var(--ui-color-primary-soft);
  color: var(--ui-color-title);
  font-size: var(--ui-font-size-body);
  font-weight: 600;
}
.material-tracking-item + .material-tracking-item { border-top: 1px solid var(--ui-color-border); }
.material-tracking-row {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border: 0;
  background: var(--panel-solid);
  color: var(--ui-color-text);
  text-align: left;
  cursor: pointer;
}
.material-tracking-row:hover,
.material-tracking-item.expanded > .material-tracking-row { background: var(--ui-color-primary-soft); }
.material-tracking-row > span { min-width: 0; display: grid; gap: 3px; }
.material-tracking-select { place-items: center; }
.material-tracking-select input { width: 16px; height: 16px; margin: 0; accent-color: var(--ui-color-primary); }
.material-tracking-identity {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
}
.material-tracking-identity > span:last-child { min-width: 0; display: grid; gap: 3px; }
.material-tracking-image {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--ui-color-border);
  border-radius: 8px;
  background: var(--ui-color-primary-soft);
}
.material-tracking-image-shell {
  width: 68px;
  flex: 0 0 68px;
}
.material-tracking-image img { width: 100%; height: 100%; object-fit: cover; }
.material-tracking-image i { padding: 3px; color: var(--ui-color-muted); font-size: var(--ui-font-size-caption); font-style: normal; text-align: center; }
.material-tracking-row strong {
  overflow: hidden;
  color: var(--ui-color-text);
  font-size: var(--ui-font-size-body);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-tracking-row small { color: var(--ui-color-muted); font-size: var(--ui-font-size-note); line-height: var(--ui-line-height); }
.material-tracking-status {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--ui-color-primary-soft);
  color: var(--ui-color-primary-strong);
  font-size: var(--ui-font-size-note);
  font-weight: 600;
}
.material-tracking-status.danger { background: color-mix(in srgb, var(--ui-color-danger) 9%, var(--panel-solid)); color: var(--ui-color-danger); }
.material-tracking-status.pending { background: color-mix(in srgb, var(--ui-color-warning) 10%, var(--panel-solid)); color: var(--ui-color-warning); }
.material-tracking-status.success { background: color-mix(in srgb, var(--ui-color-success) 9%, var(--panel-solid)); color: var(--ui-color-success); }
.material-tracking-shortage strong { color: var(--ui-color-danger); font-weight: 700; }
.material-tracking-toggle { color: var(--ui-color-primary-strong); font-size: var(--ui-font-size-body); font-weight: 500; text-align: center; }
.material-tracking-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .85fr);
  gap: 20px;
  padding: 16px;
  border-top: 1px solid var(--ui-color-border);
  background: var(--ui-color-primary-soft);
}
.material-manual-purchase-confirmation {
  margin-top: 12px;
  padding: 12px;
  display: flex;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--ui-color-border);
  border-radius: 9px;
  background: var(--panel-solid);
}
.material-manual-purchase-confirmation > label,
.material-manual-purchase-confirmation > div { flex: 1; display: grid; gap: 5px; }
.material-manual-purchase-confirmation span { color: var(--ui-color-muted); font-size: var(--ui-font-size-note); }
.material-manual-purchase-confirmation strong { color: var(--ui-color-success); font-size: var(--ui-font-size-body); }
.material-manual-purchase-confirmation input {
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid var(--ui-color-control-border);
  border-radius: 8px;
  background: var(--panel-solid);
  color: var(--ui-color-text);
  font: inherit;
}
.material-field-help {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--ui-color-control-border);
  border-radius: 50%;
  background: var(--panel-solid);
  color: var(--ui-color-primary-strong);
  font-size: var(--ui-font-size-caption);
  font-weight: 600;
  cursor: pointer;
}
.material-tracking-warning {
  margin: 12px 0 0;
  padding: 10px;
  display: grid;
  gap: 3px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ui-color-warning) 10%, var(--panel-solid));
}
.material-tracking-warning strong { color: var(--ui-color-warning); font-size: var(--ui-font-size-body); }
.material-tracking-warning span { color: var(--ui-color-text); font-size: var(--ui-font-size-note); }
.material-tracking-empty {
  min-height: 52px;
  padding: 12px;
  display: grid;
  place-items: center;
  color: var(--ui-color-muted);
  font-size: var(--ui-font-size-body);
}
.material-tracking-no-history { display: block !important; color: var(--ui-color-muted); font-size: var(--ui-font-size-note); }
.material-record-toolbar {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.material-record-toolbar > div { display: flex; align-items: center; gap: 10px; }
.material-record-toolbar > div > span { color: var(--ui-color-muted); font-size: var(--ui-font-size-note); }
.material-purchase-reminder-preview section > small { display: block; margin-top: 6px; color: var(--ui-color-warning); font-size: var(--ui-font-size-note); }
.material-dingtalk-preview img.material-reminder-table-image { width: 100%; height: auto; }

.material-dingtalk-preview { display: grid; gap: 12px; max-height: 52vh; overflow: auto; }
.material-dingtalk-preview section { padding: 12px; border: 1px solid #dfe4ed; border-radius: 10px; background: #f8fafc; }
.material-dingtalk-preview section > div { display: flex; justify-content: space-between; gap: 12px; }
.material-dingtalk-preview section span,
.material-dingtalk-preview section p { color: #66738a; font-size: 12px; }
.material-dingtalk-preview img { display: block; width: 100%; height: auto; margin-top: 10px; border: 1px solid #d9e0ea; border-radius: 10px; background: #fff; }

@media (max-width: 1100px) {
  .production-arrival-entry { grid-template-columns: 1fr auto; }
  .production-arrival-entry-action { display: none; }
  .material-arrival-section { overflow-x: auto; }
  .material-arrival-table-head,
  .material-arrival-row { min-width: 1120px; }
  .material-arrival-expansion { min-width: 1120px; }
  .material-stage-board { grid-template-columns: repeat(6, minmax(120px, 1fr)); }
  .material-order-list { overflow-x: auto; }
  .material-order-list-head,
  .material-order-row { min-width: 1120px; }
  .material-order-expansion { grid-template-columns: 1fr; min-width: 1120px; }
  .material-line-panel { border-right: 0; border-bottom: 1px solid #eee7df; }
  .material-tracking-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .material-tracking-table { overflow-x: auto; }
  .material-tracking-table-head,
  .material-tracking-row { min-width: 1420px; }
}

@media (max-width: 720px) {
  .material-manual-purchase-confirmation { align-items: stretch; flex-direction: column; }
  .production-arrival-entry { grid-template-columns: 1fr; }
  .production-arrival-entry-counts { flex-wrap: wrap; }
  .material-arrival-summary { grid-template-columns: 1fr; }
  .material-arrival-expansion { grid-template-columns: 1fr; min-width: 0; }
  .material-arrival-allocation-list { border-right: 0; border-bottom: 1px solid #eadfe1; }
  .material-stage-board { grid-template-columns: repeat(6, minmax(120px, 1fr)); }
  .material-line-head { display: none; }
  .material-line-row { grid-template-columns: 1fr 1fr; }
  .material-form-grid { grid-template-columns: 1fr; }
  .material-purchase-fields { grid-template-columns: 1fr; }
  .material-view-toolbar { align-items: stretch; flex-direction: column; }
  .material-view-tabs { display: grid; grid-template-columns: repeat(3, 1fr); }
  .material-notify-actions { justify-content: space-between; }
  .material-page-heading { align-items: flex-start; }
  .material-attention-quiet { align-items: flex-start; flex-direction: column; gap: 4px; }
  .material-attention-counts { grid-template-columns: 1fr; }
  .material-push-summary { align-items: flex-start; flex-direction: column; }
  .material-push-last { margin-left: 0; flex-wrap: wrap; }
  .material-push-summary details { width: 100%; }
  .material-push-history-list { position: static; width: auto; margin-top: 8px; box-shadow: none; }
  .material-tracking-filters { grid-template-columns: 1fr 1fr; }
  .material-tracking-filters > input:first-child { grid-column: 1 / -1; }
  .material-tracking-table { overflow: visible; border: 0; background: transparent; }
  .material-tracking-table-head { display: none; }
  .material-tracking-item {
    overflow: hidden;
    margin-top: 8px;
    border: 1px solid var(--ui-color-border);
    border-radius: 10px;
    background: var(--panel-solid);
  }
  .material-tracking-item + .material-tracking-item { border-top: 1px solid var(--ui-color-border); }
  .material-tracking-row {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .material-tracking-row > span {
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: baseline;
  }
  .material-tracking-row > span::before {
    content: attr(data-label);
    color: var(--ui-color-muted);
    font-size: var(--ui-font-size-note);
  }
  .material-tracking-row > span > small { grid-column: 2; }
  .material-tracking-row > .material-tracking-identity { display: grid !important; grid-template-columns: 92px 68px minmax(0, 1fr); }
  .material-tracking-row > .material-tracking-identity::before { grid-column: 1; }
  .material-tracking-row > .material-tracking-identity > .material-tracking-image,
  .material-tracking-row > .material-tracking-identity > .material-tracking-image-shell { grid-column: 2; }
  .material-tracking-row > .material-tracking-identity > span:last-child { grid-column: 3; }
  .material-tracking-row > .material-tracking-select { grid-template-columns: 92px 1fr; place-items: initial; }
  .material-tracking-row > .material-tracking-select input { grid-column: 2; }
  .material-tracking-status { grid-column: 2; }
  .material-tracking-toggle { text-align: left; }
  .material-tracking-detail { grid-template-columns: 1fr; }
  .material-record-toolbar { align-items: flex-start; flex-direction: column; }
  .material-push-history-list p,
  .material-tracking-timeline p { grid-template-columns: 1fr; gap: 4px; }
}
.production-title-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.production-help-tip {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid rgba(107, 120, 144, .45);
  border-radius: 50%;
  color: rgba(107, 120, 144, .72);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: help;
  opacity: .68;
  outline: none;
}
.production-help-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: none;
  width: min(520px, calc(100vw - 80px));
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .98);
  color: #64748b;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
}
.production-help-tip:hover .production-help-popover,
.production-help-tip:focus .production-help-popover,
.production-help-tip:focus-within .production-help-popover {
  display: grid;
  gap: 5px;
}
.production-help-tip:hover,
.production-help-tip:focus,
.production-help-tip:focus-within {
  border-color: rgba(85, 112, 217, .55);
  color: rgba(85, 112, 217, .85);
  opacity: 1;
}
.production-help-popover strong { color: #475569; }
.copy-product-cell {
  cursor: copy;
  user-select: none;
}
.copy-product-cell:hover {
  color: #2563eb;
  background: #eff6ff;
}
#taskDialog .dialog-fields textarea {
  min-height: 96px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  white-space: pre-wrap;
}
.erp-outbound-name {
  min-width: 180px;
  max-width: 280px;
  white-space: normal;
  line-height: 1.35;
}
.erp-outbound-pagebar {
  justify-content: flex-end;
  margin-top: 12px;
}
.erp-outbound-footnote {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
@media (max-width: 1180px) {
  .sales-band-body {
    grid-template-columns: 1fr;
  }
  .erp-outbound-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .sales-band-metrics.internal-sales-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .internal-sales-metrics > div:nth-child(2n) {
    border-right: 0;
  }
  .internal-sales-metrics > div:nth-last-child(-n + 4) {
    border-bottom: 1px solid var(--ui-color-border);
  }
  .internal-sales-metrics > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}
.empty-state {
  border: 1px dashed var(--line);
  border-radius: 13px;
  padding: 14px;
  color: var(--muted);
  background: rgba(255,255,255,.68);
}
.action-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px dashed #cfdaef;
  border-radius: 14px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(240,251,255,.92));
}
.action-empty strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 5px;
}
.action-empty span,
.action-empty small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}
.action-empty small { margin-top: 6px; }
#taskRows > .action-empty,
.task-empty .action-empty { margin: 12px; }
.matrix-placeholder,
.import-matrix {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.import-matrix { grid-template-columns: repeat(4, minmax(90px, 1fr)); margin-top: 14px; }
.import-matrix-real {
  grid-template-columns: 90px 110px 90px minmax(210px, 1fr) 82px;
  max-height: calc(100vh - 360px);
}
.matrix-placeholder > div,
.import-matrix > div {
  padding: 10px 12px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.matrix-placeholder > div:nth-child(-n+6),
.import-matrix > div:nth-child(-n+4) {
  background: #f8f9ff;
  font-weight: 600;
}
.import-matrix-real > div:nth-child(-n+5) {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8f9ff;
  font-weight: 600;
}
.matrix-body { display: contents; }
.matrix-body small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
.import-chip-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}
.import-health-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.6fr) auto;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  padding: 13px;
  border: 1px solid #dce5f6;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(240,252,255,.9));
}
.import-health-copy strong { display: block; font-size: 15px; }
.import-health-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.import-health-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.import-health-metric {
  min-height: 72px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
}
.import-health-metric span,
.import-health-metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.import-health-metric strong {
  display: block;
  margin: 4px 0 2px;
  font-size: 20px;
}
.import-health-metric.ok strong { color: var(--green); }
.import-health-metric.warn strong { color: #a46a00; }
.import-health-metric.danger strong { color: var(--red); }
.import-health-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.import-health-tabs .segment {
  min-width: 64px;
  height: 32px;
  padding: 0 10px;
}
.import-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line-soft);
  background: #fff;
}
.import-chip.ok { color: var(--green); background: #effcf5; border-color: #c9f2da; }
.import-chip.warn { color: #a46a00; background: #fff8df; border-color: #ffe4a4; }
.import-chip.danger { color: var(--red); background: #fff0f5; border-color: #ffc7d8; }
.import-empty {
  grid-column: 1 / -1;
  border: 0 !important;
  border-radius: 0;
  padding: 0 !important;
}
.ok { color: var(--green); }
.warn { color: var(--orange); }
.bad, .danger { color: var(--red); }

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(720px, 1fr) 360px;
  gap: 14px;
  align-items: start;
}
.workbench-grid.single-column {
  grid-template-columns: minmax(0, 1fr);
}
.source-panel { min-height: 680px; }
.current-upload-section,
.manual-source-section,
.erp-source-section {
  margin-top: 14px;
}
.source-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.source-section-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
}
.source-section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.source-section-head.muted h3 { color: #3f4a5e; }
.current-upload-board {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.current-upload-empty {
  color: var(--muted);
  font-weight: 600;
}
.current-upload-summary {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
}
.current-upload-summary strong {
  color: var(--text);
  font-size: 20px;
}
.current-upload-summary small {
  color: var(--muted);
  line-height: 1.5;
}
.upload-step-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.upload-step {
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfcff;
  display: grid;
  gap: 5px;
  align-content: start;
}
.upload-step b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf1f7;
  color: var(--muted);
  font-size: 13px;
}
.upload-step strong {
  color: var(--text);
  font-size: 14px;
}
.upload-step span,
.upload-step small {
  color: var(--muted);
  font-size: 12px;
}
.upload-step-done {
  border-color: #c9f2da;
  background: #f4fdf8;
}
.upload-step-done b { background: var(--green); color: #fff; }
.upload-step-active {
  border-color: #ffdca8;
  background: #fff9ec;
}
.upload-step-active b { background: var(--orange); color: #fff; }
.upload-step-error {
  border-color: #ffc7d8;
  background: #fff3f7;
}
.upload-step-error b { background: var(--red); color: #fff; }
.queue-panel { min-height: 680px; display: flex; flex-direction: column; }
.source-table {
  min-width: 0;
  max-height: calc(100vh - 430px);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  background: #fff;
}
.source-table .table-row {
  display: grid;
  align-items: center;
  min-height: 92px;
  border-bottom: 1px solid var(--line-soft);
}
.manual-source-table .table-row {
  grid-template-columns: 52px 210px minmax(180px, 1fr) 86px 126px minmax(150px, .9fr) 170px;
}
.erp-source-table {
  max-width: 860px;
  max-height: none;
  background: #fbfcff;
}
.erp-source-table .table-row {
  grid-template-columns: 44px minmax(180px, .8fr) minmax(230px, 1fr) minmax(260px, 1.05fr);
  min-height: 52px;
}
.erp-source-table .table-head {
  min-height: 36px;
}
.erp-source-row {
  color: #3f4a5e;
  background: #fbfcff;
}
.erp-source-name {
  color: var(--text);
  font-weight: 700;
}
.erp-sync-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.erp-sync-summary small {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.erp-source-table .row-actions {
  align-items: center;
  gap: 5px;
}
.erp-source-table .source-action-note {
  width: auto;
  margin: 0 3px 0 0;
}
.erp-source-table .tool-button {
  padding: 5px 7px;
  border-radius: 8px;
  font-size: 12px;
}
.erp-source-table .template-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3157b7;
  text-decoration: none;
  white-space: nowrap;
}
.source-table .table-row:last-child { border-bottom: 0; }
.table-head {
  min-height: 42px;
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f8f9ff;
  font-weight: 600;
}
.table-row > span,
.table-cell {
  padding: 0 10px;
  min-width: 0;
  line-height: 1.25;
}
.table-head > span {
  white-space: normal;
  word-break: keep-all;
}
.source-name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.source-retention { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.source-action-note {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.source-store-select {
  width: 100%;
  min-height: 34px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
  font-weight: 600;
}
.source-badge {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.badge-erp { background: linear-gradient(135deg, var(--blue), var(--cyan)); }
.badge-temu { background: linear-gradient(135deg, var(--yellow), #ff8a00); }
.badge-shein { background: linear-gradient(135deg, #343a46, #111827); }
.badge-other { background: linear-gradient(135deg, var(--violet), var(--pink)); }
.file-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { color: var(--muted); margin-top: 6px; font-size: 12px; }
.pending, .rows-count { font-size: 18px; font-weight: 700; }
.pending { color: var(--orange); }

.source-upload-summary {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fbfcff;
}
.source-upload-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.source-upload-main strong {
  font-size: 14px;
  color: var(--text);
}
.source-type-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #edf4ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}
.source-upload-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.source-compute-state {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 8px;
  background: #effdf6;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}
.source-upload-list {
  display: grid;
  gap: 5px;
  padding-top: 3px;
}
.source-upload-list > strong {
  color: var(--muted);
  font-size: 12px;
}
.source-upload-item {
  display: grid;
  grid-template-columns: minmax(88px, 1fr) minmax(92px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  padding: 4px 6px;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}
.source-upload-item span,
.source-upload-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-upload-item small {
  color: var(--muted);
}
.source-upload-item em {
  font-style: normal;
  color: var(--green);
  font-weight: 700;
  white-space: nowrap;
}

.source-progress {
  margin-top: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #f9fbff;
  padding: 8px 10px;
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
}
.source-progress strong { color: var(--text); font-size: 12px; }
.source-next-step {
  color: var(--blue);
  font-weight: 600;
}
.source-progress-selected { border-color: #c7dcff; background: #f0f6ff; }
.source-progress-uploading,
.source-progress-pending { border-color: #ffe4ac; background: #fff9e8; }
.source-progress-success { border-color: #b8f0d5; background: #effdf6; }
.source-progress-error { border-color: #ffc8d5; background: #fff3f7; }
.source-recompute {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #dce8ff;
  background: #f7fbff;
  font-size: 12px;
}
.source-recompute strong { color: var(--text); font-size: 13px; }
.source-recompute span,
.source-recompute small { color: var(--muted); line-height: 1.45; }
.source-recompute-warn { border-color: #ffdca8; background: #fff9ec; }
.source-recompute-warn strong { color: var(--orange); }
.source-recompute-ok strong { color: var(--green); }

.recompute-records {
  display: grid;
  gap: 8px;
  margin: 10px 0 18px;
}

.recompute-record {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  display: grid;
  gap: 4px;
}

.recompute-record strong { font-size: 13px; color: var(--text); }
.recompute-record span,
.recompute-record small { color: var(--muted); font-size: 12px; line-height: 1.45; }

.row-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.tool-button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  color: #5263db;
  padding: 7px 9px;
}
.tool-button:hover { background: #f6f7ff; }
.sync-card {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.sync-card span { color: var(--muted); }

.queue-list {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.queue-item {
  display: grid;
  grid-template-columns: 22px 32px minmax(0, 1fr) 64px 14px;
  gap: 8px;
  align-items: center;
  min-height: 62px;
  border-bottom: 1px solid var(--line-soft);
  padding: 0 10px;
}
.queue-item:last-child { border-bottom: 0; }
.queue-icon {
  width: 28px;
  height: 28px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff7e0;
  color: var(--orange);
  font-weight: 700;
}
.queue-item-done .queue-icon { background: #e9fbf2; color: var(--green); }
.queue-title { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-subtitle,
.queue-task-sync { color: var(--muted); font-size: 12px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-task-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.queue-task-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9ff;
  font-size: 12px;
  font-weight: 600;
}
.queue-status { font-size: 12px; color: var(--orange); font-weight: 600; }
.queue-item-done .queue-status { color: var(--green); }

.task-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.task-summary.compact { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
.task-kpi {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 13px 14px;
  box-shadow: 0 10px 24px rgba(77, 91, 130, .06);
}
.task-kpi span { color: var(--muted); font-size: 12px; }
.task-kpi strong { display: block; margin-top: 5px; font-size: 24px; }
.task-kpi p { margin-top: 5px; }

.task-workbar {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 7px;
  border: 1px solid #dce5f6;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(240,252,255,.9));
}
.task-work-copy strong { display: block; font-size: 15px; }
.task-work-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.task-work-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 5px;
}
.task-work-metric {
  min-height: 42px;
  padding: 6px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
  text-align: left;
}
.task-work-metric-primary {
  grid-column: span 1;
  min-height: 44px;
}
.task-work-metric-action { cursor: pointer; }
.task-work-metric-action:hover { border-color: #ffb36b; background: #fffaf2; }
.task-work-metric-hot {
  border-color: var(--line-soft);
  background: #fff;
  box-shadow: none;
}
.task-work-metric-hot span,
.task-work-metric-hot small { color: #a5561d; }
.task-work-metric-hot strong { color: #d9480f; }
.task-work-metric-active,
.task-work-metric-active:hover {
  border-color: #7c9cff;
  background: #eef5ff;
  box-shadow: 0 0 0 2px rgba(124,156,255,.16);
}
.task-work-metric-active span,
.task-work-metric-active small,
.task-work-metric-active strong { color: #2454c6; }
.task-work-metric-secondary {
  grid-column: span 1;
  min-height: 40px;
  padding: 4px 7px;
  background: rgba(255,255,255,.7);
  border-style: dashed;
  box-shadow: none;
}
.task-work-metric-secondary span,
.task-work-metric-secondary small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.task-work-metric-secondary strong {
  color: var(--text);
  font-size: 13px;
  margin-top: 2px;
}
.task-work-metric-history {
  grid-column: span 2;
}
.operation-history-product {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 190px;
}
.operation-history-product > span { display: grid; gap: 3px; }
.operation-history-product strong { color: var(--ui-color-text); font-size: var(--ui-font-size-body); font-weight: var(--ui-font-weight-semibold); }
.operation-history-product small { color: var(--ui-color-muted); font-size: var(--ui-font-size-note); }
.task-work-metric-muted {
  border-style: dashed;
  background: rgba(255,255,255,.58);
  box-shadow: none;
  opacity: .78;
  grid-column: span 1;
  min-height: 40px;
  padding: 4px 7px;
}
.task-work-metric-muted strong { font-size: 13px; }
.task-work-metric span,
.task-work-metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}
.task-work-metric-label {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
}
.task-metric-help {
  display: inline-flex;
  width: 15px;
  height: 15px;
  align-items: center;
  justify-content: center;
  border: 1px solid #aab7c8;
  border-radius: 50%;
  color: #6b7b91;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 1;
  cursor: help;
}
.task-work-metric strong {
  display: block;
  margin: 2px 0 1px;
  font-size: 18px;
}
.task-detail-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.listing-platform-quick-cards,
.clearance-category-quick-cards {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.listing-platform-quick-card,
.clearance-category-quick-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}
.listing-platform-quick-card strong,
.clearance-category-quick-card strong {
  color: var(--text);
  font-size: 15px;
}
.listing-platform-quick-card:hover,
.clearance-category-quick-card:hover {
  border-color: #9ab3e6;
  background: #f7faff;
}
.listing-platform-quick-card.active,
.clearance-category-quick-card.active {
  border-color: #7c9cff;
  background: #eef5ff;
  color: #2454c6;
  box-shadow: 0 0 0 2px rgba(124,156,255,.14);
}
.listing-platform-quick-card.active strong,
.clearance-category-quick-card.active strong { color: #2454c6; }

#sheinListingCategoryCards {
  padding-left: 8px;
  border-left: 1px solid var(--ui-color-border);
}
.oem-workspace-toolbar .task-filter-line {
  align-items: center;
}
.oem-workspace-toolbar .oem-release-mode-select {
  border-color: color-mix(in srgb, var(--ui-color-warning) 62%, var(--ui-color-border));
  background: color-mix(in srgb, var(--ui-color-warning) 11%, var(--panel-solid));
  color: var(--ui-color-title);
  font-weight: var(--ui-font-weight-semibold);
}
.oem-workspace-toolbar #oemWorkspaceSearch {
  min-width: min(360px, 42vw);
}
.oem-workspace-table-wrap {
  max-height: min(64vh, 720px);
  overflow: auto;
}
#oemWorkspaceTable {
  min-width: 1040px;
}
#oemWorkspaceTable th,
#oemWorkspaceTable td {
  vertical-align: middle;
}
#oemWorkspaceTable td {
  white-space: normal;
}
#oemWorkspaceTable tbody tr.oem-urgent-high-sales > td {
  background: color-mix(in srgb, var(--ui-color-danger) 10%, var(--panel-solid)) !important;
}

/* 库存异常处理优先级沿用系统粉紫青主色，由深到浅表达处理顺序。 */
.clearance-category-quick-card.inventory-action-restock {
  border-color: rgba(239, 71, 111, .28);
  background: linear-gradient(135deg, rgba(255, 126, 182, .22), rgba(155, 123, 255, .16));
  color: #a52a62;
}
.clearance-category-quick-card.inventory-action-restock strong { color: #8f2456; }
.clearance-category-quick-card.inventory-action-delist {
  border-color: rgba(155, 123, 255, .28);
  background: linear-gradient(135deg, rgba(155, 123, 255, .15), rgba(60, 125, 255, .08));
  color: #654bb7;
}
.clearance-category-quick-card.inventory-action-delist strong { color: #553e9d; }
.clearance-category-quick-card.inventory-action-pause {
  border-color: rgba(53, 201, 223, .22);
  background: linear-gradient(135deg, rgba(53, 201, 223, .10), rgba(60, 125, 255, .05));
  color: #47758b;
}
.clearance-category-quick-card.inventory-action-pause strong { color: #3c667a; }
.clearance-category-quick-card.inventory-action-restock.active {
  border-color: rgba(239, 71, 111, .68);
  background: linear-gradient(135deg, rgba(255, 126, 182, .34), rgba(155, 123, 255, .24));
  box-shadow: 0 0 0 2px rgba(239, 71, 111, .13);
}
.clearance-category-quick-card.inventory-action-delist.active {
  border-color: rgba(155, 123, 255, .62);
  background: linear-gradient(135deg, rgba(155, 123, 255, .25), rgba(60, 125, 255, .13));
  box-shadow: 0 0 0 2px rgba(155, 123, 255, .12);
}
.clearance-category-quick-card.inventory-action-pause.active {
  border-color: rgba(53, 201, 223, .52);
  background: linear-gradient(135deg, rgba(53, 201, 223, .18), rgba(60, 125, 255, .09));
  box-shadow: 0 0 0 2px rgba(53, 201, 223, .10);
}

.inventory-action-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}
.inventory-action-badge.inventory-action-restock {
  border-color: rgba(239, 71, 111, .24);
  background: linear-gradient(135deg, rgba(255, 126, 182, .24), rgba(155, 123, 255, .17));
  color: #982555;
}
.inventory-action-badge.inventory-action-delist {
  border-color: rgba(155, 123, 255, .24);
  background: linear-gradient(135deg, rgba(155, 123, 255, .16), rgba(60, 125, 255, .08));
  color: #5e46a8;
}
.inventory-action-badge.inventory-action-pause {
  border-color: rgba(53, 201, 223, .20);
  background: linear-gradient(135deg, rgba(53, 201, 223, .10), rgba(60, 125, 255, .05));
  color: #456e82;
}

.clearance-key-stock-cell {
  display: grid;
  justify-items: start;
  gap: 2px;
}

.clearance-key-stock-value {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.clearance-key-stock-value span {
  color: var(--muted);
  font-size: 12px;
}

.clearance-key-stock-value strong {
  color: var(--text);
  font-size: 14px;
}

.clearance-key-stock-value strong.negative {
  color: #dc2626;
}

.clearance-stock-status-danger {
  color: #dc2626;
  font-weight: 700;
}

.clearance-stock-status-warning {
  color: #b45309;
  font-weight: 700;
}

.production-size-detail-row.clearance-key-size-row > td {
  background: #fff7cc;
  color: var(--text);
  font-weight: 600;
}

.production-size-detail-row td > small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.clearance-suggestion-cell {
  display: grid;
  gap: 4px;
}

.clearance-category-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.clearance-category-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.clearance-category-down { background: #fee2e2; color: #b42318; }
.clearance-category-pending { background: #fff7d6; color: #9a6700; }
.clearance-category-cost { background: #f3e8ff; color: #7e22ce; }
.hot-conflict-metric {
  min-height: 36px;
  padding: 4px 7px;
  border-radius: 9px;
}
.hot-conflict-metric strong {
  font-size: 16px;
  margin: 1px 0;
}
.hot-conflict-metric-danger {
  border-color: rgba(255, 146, 76, .78);
  background: #fff7ed;
}
.hot-conflict-metric-danger strong { color: #d9480f; }
.task-work-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.task-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(116px, 1fr));
  gap: 7px;
  margin-bottom: 10px;
  align-items: center;
}
.task-filters input,
.task-filters select { height: 32px; padding: 0 8px; font-size: 13px; }
.task-filters label { white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.bargain-filters.compact-bargain-filters {
  grid-template-columns: 0.9fr 1fr 1fr 0.95fr 0.95fr 1.1fr 92px 92px;
  gap: 6px;
}
.bargain-filters.compact-bargain-filters input,
.bargain-filters.compact-bargain-filters select,
.bargain-filters.compact-bargain-filters button {
  min-width: 0;
}
.task-filter-board {
  margin: 5px 0 8px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.78);
  overflow: visible;
}
.task-filter-line {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
  min-width: 0;
  overflow: visible;
}
.task-filter-line .multi-filter { flex: 0 0 auto; min-width: 0; }
.task-filter-line #taskPlatform + .multi-filter { width: 112px; }
.task-filter-line #taskStore + .multi-filter { width: 108px; }
.task-filter-line input,
.task-filter-line select {
  height: 30px;
  padding: 0 7px;
  font-size: 12px;
  flex: 0 0 auto;
}
.task-filter-line #taskStatus { width: 104px; }
.task-filter-line #taskPlatform { width: 86px; }
.task-filter-line #taskStore { width: 108px; }
.task-filter-line #taskUser { width: 100px; }
.task-filter-line #taskType { width: 112px; }
.task-filter-line #taskCategory { width: 100px; }
.task-filter-line #taskPriority { width: 116px; }
.task-filter-line #taskSearch {
  width: clamp(210px, 24vw, 340px);
  min-width: 190px;
  flex: 1 1 230px;
}
.task-filter-line #taskSearch.task-search-clearance {
  width: clamp(170px, 17vw, 250px);
  min-width: 160px;
  flex: 0 1 230px;
}
.task-check-field {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  flex: 0 0 auto;
}
.task-filter-line .ghost-button {
  height: 30px;
  min-width: 48px;
  padding: 0 8px;
  font-size: 12px;
  flex: 0 0 auto;
}
.compact-filter-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(116px, 1fr)) minmax(220px, 1.6fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.suppression-compact-filters {
  display: grid;
  grid-template-columns: 88px 86px 105px 100px 102px 92px minmax(190px, 1fr) 48px;
  gap: 5px;
  margin-top: 6px;
}
.suppression-compact-filters select,
.suppression-compact-filters input,
.suppression-compact-filters button {
  height: 30px;
  min-width: 0;
  padding: 0 7px;
  font-size: 12px;
}
.compact-filter-strip select,
.compact-filter-strip input {
  height: 34px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}
.production-filter-strip {
  display: flex;
  flex-wrap: nowrap;
  grid-template-columns: none;
  gap: 6px;
  overflow-x: auto;
}
@media (max-width: 980px) {
  .production-owner-summary-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .production-owner-summary-actions {
    width: 100%;
  }
  .production-owner-summary-actions select {
    flex: 1 1 auto;
  }
  .production-module-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .production-selection-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .production-selection-buttons {
    justify-content: flex-start;
  }
}
.production-filter-strip select,
.production-filter-strip input,
.production-filter-strip button {
  height: 32px;
  min-width: 0;
  padding-right: 7px;
  padding-left: 7px;
  font-size: 12px;
}
.production-filter-strip #productionSearch {
  flex: 1 1 180px;
  width: auto;
  min-width: 150px;
  font-size: 13px;
}
.production-filter-strip select { flex: 0 0 104px; }
.production-filter-strip #productionCategoryFilter { flex-basis: 120px; }
.production-filter-strip .production-page-size {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 5px 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.production-filter-strip .production-page-size select {
  flex: 0 0 48px;
  width: 48px;
  height: 26px;
  min-width: 48px;
  padding: 0 18px 0 4px;
  border: 0;
}
.compact-check-filter {
  position: relative;
  flex: 0 0 128px;
  height: 32px;
}
.compact-check-filter > summary {
  box-sizing: border-box;
  height: 32px;
  padding: 7px 24px 0 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}
.compact-check-filter > summary::-webkit-details-marker { display: none; }
.compact-check-filter > summary::after {
  content: "▾";
  position: absolute;
  top: 7px;
  right: 8px;
  color: #64748b;
}
.compact-check-filter-menu {
  position: absolute;
  z-index: 30;
  top: 36px;
  left: 0;
  display: grid;
  width: 178px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(30, 41, 59, .16);
}
.compact-check-filter-menu label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 3px 6px;
  border-radius: 6px;
  color: #334155;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.compact-check-filter-menu label:hover { background: #f4f7fb; }
.compact-check-filter-menu input[type="checkbox"] {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin: 0;
  padding: 0;
}
.production-filter-strip #searchProductionBtn,
.production-filter-strip #productionPrevPageBtn,
.production-filter-strip #productionNextPageBtn { flex: 0 0 auto; }
.production-filter-strip #productionSelectionHint,
.production-filter-strip #productionPageHint {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
#productionCoordinationTable {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.production-table-wrap {
  margin-top: 8px;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
}
#productionCoordinationTable th,
#productionCoordinationTable td {
  min-width: 0 !important;
  max-width: none !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#productionCoordinationTable td.product-image-cell {
  min-width: 0;
}
.production-size-detail-trigger {
  display: inline-flex;
  align-items: center;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.production-size-detail-trigger::before {
  content: "▶";
  margin-right: 2px;
  font-size: 12px;
}
.production-size-detail-trigger:hover {
  color: #2563eb;
}
.production-size-popover {
  position: fixed;
  z-index: 240;
  width: fit-content;
  min-width: min(560px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: min(560px, calc(100vh - 24px));
  overflow: auto;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .22);
  color: var(--text);
}
.bargain-size-popover {
  width: min(1120px, calc(100vw - 48px));
  max-height: min(640px, calc(100vh - 48px));
  overflow: hidden;
}
.bargain-size-popover-head {
  min-height: 48px;
}
.bargain-size-product-head {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px;
}
.bargain-size-product-head .product-thumb {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 7px;
  object-fit: cover;
}
.bargain-size-product-head > div {
  display: grid;
  min-width: 0;
}
.bargain-size-table-wrap {
  max-height: min(500px, calc(100vh - 142px));
  overflow: auto;
}
.production-size-detail-grid.bargain-size-detail-grid {
  width: max-content;
  min-width: 1480px;
  margin: 0;
  table-layout: fixed;
}
.bargain-size-detail-grid th,
.bargain-size-detail-grid td {
  min-width: 82px;
  max-width: none;
  padding: 5px 6px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bargain-size-detail-grid th:first-child,
.bargain-size-detail-grid td:first-child {
  min-width: 52px;
}
.bargain-size-detail-grid th:nth-child(2),
.bargain-size-detail-grid td:nth-child(2) {
  min-width: 118px;
}
.bargain-size-selection-summary {
  min-height: 30px;
  padding: 5px 8px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  background: #f8fafc;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.production-size-popover-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.production-size-popover-head > div:first-child {
  display: grid;
  min-width: 0;
}
.production-size-popover-head strong,
.production-size-popover-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.production-size-popover-head small {
  color: var(--muted);
  font-size: 12px;
}
.production-size-popover-head > .production-size-popover-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}
.production-size-popover-actions .tool-button {
  min-height: 26px;
  padding: 3px 7px;
  font-size: 12px;
  white-space: nowrap;
}
.production-size-popover-close {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
}
.production-size-detail-grid {
  width: calc(100% - 12px);
  margin: 0 6px 6px;
  border-collapse: collapse;
  table-layout: fixed;
  cursor: cell;
  user-select: none;
  -webkit-user-select: none;
}
.production-size-col-name {
  width: 12%;
}
.production-size-col-number {
  width: 8%;
}
.production-size-col-stockout {
  width: 16%;
}
.production-size-detail-header {
  background: #fff;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}
.production-size-detail-header th {
  position: sticky;
  top: 40px;
  z-index: 1;
  padding: 5px 4px;
  border-right: 1px solid #e2e8f0;
  background: #fff;
  text-align: right;
}
.production-size-detail-header th:first-child,
.production-size-detail-row td:first-child {
  text-align: left;
}
.production-size-detail-header th:last-child,
.production-size-detail-row td:last-child {
  border-right: 0;
}
.production-size-detail-row {
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
}
.production-size-detail-row:nth-child(odd) {
  background: #f8fafc;
}
.production-size-detail-row td {
  min-width: 0;
  padding: 5px 4px;
  border-right: 1px solid #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.production-size-detail-row td.negative {
  color: #dc2626;
  font-weight: 600;
}
.production-size-detail-grid td.business-cell-selected {
  background: #dbeafe !important;
  box-shadow: inset 0 0 0 1px #60a5fa;
}
.production-size-detail-empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}
.production-material-detail-trigger {
  padding: 2px 7px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.production-material-popover {
  position: fixed;
  z-index: 240;
  width: min(560px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 24px));
  overflow: auto;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .22);
  color: var(--text);
}
.production-material-popover-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.production-material-popover-head > div {
  display: grid;
  min-width: 0;
}
.production-material-popover-head strong,
.production-material-popover-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.production-material-popover-head small {
  color: var(--muted);
  font-size: 12px;
}
.production-material-popover-head button {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
}
.production-material-detail-grid {
  display: grid;
  padding: 0 12px 10px;
}
.production-material-detail-header,
.production-material-detail-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(90px, .65fr) 82px 104px 82px;
  align-items: stretch;
}
.production-material-detail-header {
  background: #fff;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}
.production-material-order-title {
  margin-top: 8px;
  padding: 7px 9px;
  border-left: 3px solid #60a5fa;
  background: #eff6ff;
  color: #1e40af;
  font-size: 12px;
  font-weight: 700;
}
.production-material-detail-header > span,
.production-material-detail-row > span,
.production-material-detail-row > strong {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 7px 9px;
  border-right: 1px solid #e2e8f0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.production-material-detail-header > span:first-child,
.production-material-detail-row > span:first-child {
  text-align: left;
}
.production-material-detail-header > span:last-child,
.production-material-detail-row > strong:last-child {
  border-right: 0;
}
.production-material-detail-row {
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
}
.production-material-detail-row:nth-child(odd) {
  background: #f8fafc;
}
.production-material-detail-row > span:first-child strong,
.production-material-detail-row > span:first-child small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.production-material-detail-row > span:first-child small {
  color: var(--muted);
  font-size: 12px;
}
.production-material-detail-row .shortage {
  color: #dc2626;
  font-weight: 700;
}
.production-material-detail-empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}
.compact-table-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.compact-table-actions .pagination-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.compact-table-actions .ghost-button,
.compact-table-actions .tool-button {
  height: 32px;
  padding: 0 12px;
}
.task-suppression-workbar { margin-top: 10px; }
.task-suppression-table-wrap {
  margin-top: 12px;
  max-height: 560px;
  overflow: auto;
}
.hot-conflict-table-wrap {
  margin-top: 12px;
  max-height: 620px;
  overflow: auto;
}
.dense-task-table {
  min-width: 1120px;
  font-size: 12px;
}
.hot-conflict-table {
  min-width: 1500px;
  table-layout: fixed;
}
.dense-task-table th,
.dense-task-table td {
  padding: 7px 8px;
  white-space: normal;
  line-height: 1.25;
  vertical-align: middle;
  word-break: break-word;
}
.dense-task-table th {
  text-align: center;
}
.dense-task-table td {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hot-conflict-table td {
  max-width: none;
}
.hot-conflict-unified-stack,
.hot-conflict-product-name,
.hot-conflict-unified-actions {
  display: grid;
  min-width: 0;
  gap: 3px;
  line-height: 1.4;
  white-space: normal;
}
.hot-conflict-product-name {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: copy;
  font: inherit;
  text-align: left;
}
.hot-conflict-product-name:hover strong,
.hot-conflict-product-name:focus-visible strong {
  color: var(--ui-color-primary);
}
.hot-conflict-product-name:focus-visible {
  outline: 2px solid var(--ui-color-primary);
  outline-offset: 2px;
}
.hot-conflict-unified-stack strong,
.hot-conflict-product-name strong {
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.hot-conflict-unified-stack small,
.hot-conflict-product-name small {
  color: var(--muted);
  font-size: var(--ui-font-size-note);
  font-weight: var(--ui-font-weight-regular);
  overflow-wrap: anywhere;
  white-space: normal;
}
.hot-conflict-key-metrics strong { color: #8a4b00; }
.hot-conflict-unified-tag {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--ui-color-primary-soft);
  color: var(--muted);
  font-size: var(--ui-font-size-caption);
  font-weight: var(--ui-font-weight-semibold);
  overflow-wrap: anywhere;
  white-space: normal;
}
.hot-conflict-identifier-copy {
  border: 0;
  border-radius: 3px;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: copy;
  font: inherit;
}
.hot-conflict-identifier-copy:hover,
.hot-conflict-identifier-copy:focus-visible {
  background: var(--ui-color-primary-soft);
  color: var(--ui-color-primary);
  outline: none;
}
.hot-conflict-unified-actions {
  justify-items: start;
  gap: 6px;
}
.hot-conflict-unified-actions .production-size-detail-trigger,
.hot-conflict-unified-actions .task-log-button {
  width: 100%;
  justify-content: flex-start;
  white-space: nowrap;
}
.hot-conflict-table td.task-admin-message {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hot-conflict-admin-message-text {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hot-conflict-quick-cards { margin-left: 4px; }
.hot-conflict-table tbody tr,
.task-row {
  cursor: pointer;
}
.hot-conflict-table tbody tr:hover td,
.task-row:hover {
  background: #f8fbff;
}
.hot-conflict-table tbody tr.row-selected td,
.report-data-table tbody tr.row-selected td,
.task-row.row-selected {
  background: rgba(124,156,255,.08);
  box-shadow: inset 2px 0 0 rgba(124,156,255,.45);
}
.task-row.task-row-price-cost {
  background: rgba(255, 118, 118, .18);
  box-shadow: inset 3px 0 0 rgba(220, 38, 38, .38);
}
.task-row.task-row-slow-wholesale {
  background: rgba(255, 196, 87, .14);
  box-shadow: inset 3px 0 0 rgba(217, 119, 6, .24);
}
.task-row.task-row-bargain-rejected {
  background: rgba(255, 224, 120, .22);
  box-shadow: inset 4px 0 0 rgba(234, 160, 0, .72);
}
.task-row.task-row-repeat-warning {
  background: rgba(255, 232, 140, .24);
  box-shadow: inset 4px 0 0 rgba(217, 119, 6, .62);
}
.task-row.task-row-price-cost:hover {
  background: rgba(255, 118, 118, .24);
}
.task-row.task-row-slow-wholesale:hover {
  background: rgba(255, 196, 87, .20);
}
.task-row.task-row-bargain-rejected:hover {
  background: rgba(255, 224, 120, .32);
}
.task-warning-pill {
  display: inline-flex;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 247, 204, .92);
  color: #7a3e00;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(217, 119, 6, .25);
}
.hot-conflict-status-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}
.hot-conflict-status-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.hot-conflict-warning-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 244, 196, .95);
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid rgba(217, 119, 6, .28);
}
.hot-conflict-table td.hot-conflict-current-cell {
  background: rgba(255, 220, 120, .74);
  box-shadow: inset 3px 0 0 rgba(217, 119, 6, .72);
  color: #4a2b00;
}
.hot-conflict-table td.hot-conflict-protected-cell {
  background: rgba(130, 214, 166, .72);
  box-shadow: inset 3px 0 0 rgba(22, 132, 74, .72);
  color: #063f25;
}
.hot-conflict-table td.hot-conflict-context-cell {
  background: rgba(224, 237, 255, .78);
  box-shadow: inset 3px 0 0 rgba(74, 127, 214, .46);
  color: #16315d;
}
.hot-conflict-table tbody tr.row-selected td.hot-conflict-current-cell {
  background: rgba(255, 205, 86, .86);
}
.hot-conflict-table tbody tr.row-selected td.hot-conflict-protected-cell {
  background: rgba(101, 200, 143, .84);
}
.hot-conflict-table tbody tr.row-selected td.hot-conflict-context-cell {
  background: rgba(199, 220, 255, .9);
}
.hot-conflict-owner-result {
  display: grid;
  gap: 3px;
  min-width: 118px;
  line-height: 1.35;
}
.hot-conflict-owner-result strong {
  color: #1f2937;
  font-weight: 600;
}
.hot-conflict-owner-result em {
  color: #4b5563;
  font-size: 12px;
  font-style: normal;
}
.hot-conflict-owner-result span {
  color: var(--muted);
  font-size: 12px;
}
.hot-conflict-actions {
  align-items: center;
  margin-top: 0;
}
.hot-conflict-actions span {
  color: var(--muted);
  font-weight: 700;
}
#hotConflictSelectionHint {
  color: #8b97ad;
  font-size: 12px;
  font-weight: 700;
  opacity: .8;
}
#hotConflictSubpage .task-filter-board {
  display: grid;
  gap: 10px;
}
.hot-conflict-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 6px;
  padding: 6px 8px;
}
.hot-conflict-toolbar .task-filter-line {
  gap: 5px;
  min-width: 0;
}
.hot-conflict-toolbar .task-filter-line select,
.hot-conflict-toolbar .task-filter-line input,
.hot-conflict-toolbar .task-filter-line button {
  height: 28px;
  font-size: 12px;
}
.hot-conflict-toolbar #hotConflictSearch {
  min-width: 160px;
}
.hot-conflict-toolbar #hotConflictStatus { width: 104px; }
.hot-conflict-toolbar #hotConflictPlatform { width: 86px; }
.hot-conflict-toolbar #hotConflictStore { width: 110px; }
.hot-conflict-toolbar #hotConflictOwner { width: 100px; }
.hot-conflict-toolbar #hotConflictAdvice { width: 112px; }
body.owner-mode .task-filter-line {
  min-width: 0;
}
.task-drill-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  background: #f7fbff;
}
.task-drill-bar strong,
.task-drill-bar span {
  display: block;
}
.task-drill-bar strong {
  font-size: 13px;
}
.task-drill-bar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.task-role-entry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}
.task-entry-button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  min-height: 64px;
}
.task-entry-button strong { display: block; font-size: 20px; color: var(--text); }
.task-entry-button span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.task-entry-button.active { border-color: #7c9cff; box-shadow: 0 0 0 2px rgba(124,156,255,.14); }

.task-table {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
  max-height: 600px;
  background: #fff;
}
.task-package-list {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}
.task-pagebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin: 6px 0 8px;
  overflow: visible;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.task-pagebar div {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
}
.task-pagination-compact {
  flex: 1 1 auto;
  justify-content: flex-start !important;
  min-width: 0;
}
.task-page-total,
.task-page-number {
  flex: 0 0 auto;
  white-space: nowrap;
  color: #4c5e76;
}
.task-page-actions {
  position: relative;
  flex: 0 0 auto;
}
.task-batch-menu {
  position: relative;
}
.task-batch-menu > summary {
  display: inline-flex;
  align-items: center;
  list-style: none;
  cursor: pointer;
}
.task-batch-menu > summary::-webkit-details-marker { display: none; }
.task-batch-menu > summary::after {
  content: "▾";
  margin-left: 5px;
  color: #718096;
}
.task-pagebar .task-batch-menu-panel {
  position: absolute;
  z-index: 280;
  top: calc(100% + 5px);
  right: 0;
  display: grid;
  width: max-content;
  min-width: 150px;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(23,36,58,.18);
}
.task-pagebar .task-batch-menu-panel .tool-button {
  width: 100%;
  justify-content: flex-start;
}
.page-size-control,
.page-jump-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.page-size-control select {
  height: 26px;
  min-width: 56px;
  padding: 0 24px 0 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  font-weight: 600;
}
.page-jump-control input {
  width: 46px;
  height: 26px;
  padding: 0 6px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
}
.hot-conflict-pagebar {
  align-items: center;
}
.hot-conflict-pagebar > .task-page-actions {
  flex: 1;
}
.hot-conflict-actions {
  display: flex;
  align-items: center;
  min-height: 28px;
  margin: 0;
  gap: 5px;
}
.hot-conflict-actions > span {
  min-width: 44px;
  padding-top: 0;
  white-space: nowrap;
}
.hot-conflict-actions .task-page-actions {
  gap: 4px;
}
.hot-conflict-actions .tool-button {
  height: 26px;
  padding: 0 6px;
  font-size: 12px;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-pagebar .tool-button,
.task-pagebar .ghost-button,
.compact-table-actions .tool-button,
.compact-table-actions .ghost-button {
  min-width: 0;
  height: 26px;
  padding: 0 7px;
  font-size: 12px;
  white-space: nowrap;
}
.compact-table-actions {
  gap: 6px;
  margin-top: 6px;
  min-height: 28px;
  overflow-x: auto;
  white-space: nowrap;
}
.compact-table-actions .pagination-actions {
  gap: 4px;
  flex-wrap: nowrap;
}

/* 商品任务、议价申请、生产协同共用紧凑工具栏 */
.task-filter-line,
.production-filter-strip {
  flex-wrap: wrap;
  overflow: visible;
}
.bargain-filters.compact-bargain-filters,
#bargainLookupControls,
.suppression-compact-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.bargain-filters.compact-bargain-filters select,
#bargainLookupControls select,
.suppression-compact-filters select {
  flex: 0 1 116px;
  width: auto;
}
.bargain-filters.compact-bargain-filters input,
#bargainLookupControls input,
.suppression-compact-filters input {
  flex: 1 1 210px;
  width: auto;
}
.bargain-product-entry {
  display: grid;
  grid-template-columns: auto minmax(150px, .55fr) minmax(220px, .85fr) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 8px;
  flex: 1 0 100%;
  padding: 8px;
  border: 1px solid var(--ui-color-border);
  border-radius: 10px;
  background: var(--ui-color-primary-soft);
}
.bargain-product-entry-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ui-color-text);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}
#bargainLookupControls .bargain-product-entry input,
#bargainLookupControls .bargain-product-entry button {
  width: 100%;
  min-width: 0;
}
.bargain-owner-note-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.bargain-owner-note-field label {
  color: var(--ui-color-text);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
}
.unified-toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-left: auto;
  overflow: visible;
}
.unified-selection-hint {
  color: #7a879a;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.task-batch-menu-panel {
  position: absolute;
  z-index: 280;
  top: calc(100% + 5px);
  right: 0;
  display: grid;
  width: max-content;
  min-width: 156px;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(23,36,58,.18);
}
.task-batch-menu-panel .tool-button,
.task-batch-menu-panel .ghost-button,
.task-batch-menu-panel .primary-button {
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 9px;
  font-size: 12px;
  white-space: nowrap;
}
.task-pagination-compact {
  display: flex;
  flex-wrap: wrap !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 5px !important;
}
.production-pagebar {
  justify-content: flex-start;
}
.production-pagebar .production-page-size {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.production-pagebar .production-page-size select {
  height: 26px;
  min-width: 56px;
  padding: 0 22px 0 7px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}
.production-filter-strip .unified-toolbar-actions,
.task-filter-line .unified-toolbar-actions,
.bargain-filters .unified-toolbar-actions,
#bargainLookupControls .unified-toolbar-actions,
.suppression-compact-filters .unified-toolbar-actions {
  margin-left: auto;
}
.hot-conflict-actions {
  margin-left: auto;
}
.task-package-head,
.task-package-card {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}
.task-package-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}
.task-package-head strong { color: var(--text); }
.task-package-card {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(300px, 1fr) auto;
  align-items: center;
  gap: 10px 14px;
}
.task-package-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.task-package-title strong,
.task-package-card p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-package-meta,
.task-package-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 12px;
}
.task-package-badges { grid-column: 1 / 3; }
.task-package-card .task-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}
.task-row {
  display: grid;
  grid-template-columns: 32px 52px 78px 94px 76px 78px 64px 156px 124px 150px 132px 74px 80px 64px 64px 64px minmax(170px, 1fr) 220px 180px 108px;
  align-items: center;
  min-width: 2170px;
  min-height: 38px;
  border-bottom: 1px solid var(--line-soft);
}
.task-row.task-mode-hot {
  grid-template-columns: 32px 52px 78px 94px 76px 78px 64px 156px 124px 150px 170px 90px 90px 76px 76px 110px minmax(160px, 1fr) 220px 180px 108px;
  min-width: 2290px;
}
.task-row.task-mode-slow {
  grid-template-columns: 32px 52px 78px 94px 76px 78px 64px 156px 124px 150px 132px 90px 76px 84px 72px minmax(170px, 1fr) 150px 180px 108px;
  min-width: 1990px;
}
.task-row.task-mode-inventory {
  grid-template-columns: 32px 52px 78px 94px 76px 78px 64px 156px 124px 88px 150px 132px 88px 90px 86px minmax(170px, 1fr) 220px 180px 108px;
  min-width: 2098px;
}
.task-row.task-mode-clearance {
  grid-template-columns: 32px 52px 78px 94px 76px 78px 64px 156px 124px 150px 110px 92px 90px minmax(170px, 1fr) 150px 180px 108px;
  min-width: 1780px;
}
.task-row.task-mode-listing {
  grid-template-columns: 36px 48px 72px 64px 150px 125px 60px 78px 90px 340px 110px minmax(140px, 1fr) 150px 180px 108px;
  min-width: 1660px;
}
body.owner-mode .task-row.task-mode-listing {
  grid-template-columns: 36px 48px 72px 64px minmax(210px, 1fr) 150px 68px 90px 106px minmax(220px, 1.2fr) 150px 180px 88px 108px;
  min-width: 1580px;
}
body.owner-mode .task-row.task-mode-listing > .task-admin-message {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}
.task-fixed-recommendation { display: grid; gap: 4px; line-height: 1.35; }
.task-fixed-recommendation-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  line-height: 1.2;
  white-space: nowrap;
}
.task-fixed-recommendation-compact > span {
  color: #64748b;
  font-size: 14px;
  font-weight: 400;
}
.task-fixed-recommendation-compact > span > strong {
  color: #202533;
  font-size: 14px;
  font-weight: 600;
}
.task-fixed-recommendation-compact .listing-recommendation-reason { flex: 0 0 auto; }
.task-fixed-recommendation > strong {
  font-size: 15px;
  font-weight: 500;
}
.task-fixed-recommendation small {
  color: #b45f06;
  font-size: 14px;
  font-weight: 500;
}
.task-fixed-recommendation .listing-recommendation-store {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}
.task-fixed-recommendation em {
  display: -webkit-box;
  overflow: hidden;
  color: #64748b;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.task-manual-recommendation small { color: #64748b; }
.listing-recommendation-reason {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2f6fed;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
}
.listing-recommendation-conclusion {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid #e5eaf4;
  border-radius: 14px;
  background: #f8faff;
}
.listing-recommendation-conclusion ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 26px;
  color: var(--text);
}
.listing-recommendation-conclusion li {
  padding-left: 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}
.listing-recommendation-conclusion li::marker {
  color: #2f6fed;
  font-weight: 700;
}
.listing-recommendation-calculation {
  border-top: 1px solid #e5eaf4;
  padding-top: 10px;
}
.listing-recommendation-calculation summary {
  width: fit-content;
  color: #2f6fed;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.listing-recommendation-calculation p {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}
.task-owner-feedback {
  display: grid;
  gap: 3px;
  min-width: 0;
  line-height: 1.28;
}
.task-owner-feedback strong { color: #16794b; }
.task-owner-feedback span {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.task-owner-feedback small { color: #64748b; font-size: 13px; }
.task-owner-feedback-empty { color: #94a3b8; }
.task-platform-warning small { color: #b42318; }
.task-platform-dispatch {
  display: inline-grid;
  justify-items: start;
  gap: 2px;
  line-height: 1.15;
  text-align: left;
}
.task-platform-dispatch small {
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
}
.task-platform-listed { color: #157347; font-weight: 600; }
.task-check,
.task-select-all,
.task-platform-check {
  box-sizing: border-box;
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  margin: 0;
  padding: 0 !important;
  border-radius: 4px;
  accent-color: #2f7df6;
}
.task-platform-check:disabled {
  cursor: default;
  opacity: 1;
  filter: none;
}
.task-platform-check-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}
.task-platform-empty {
  color: #bdc7d8;
  font-weight: 700;
}
.task-row.task-mode-listed-slow {
  grid-template-columns: 32px 52px 78px 64px 156px 148px 150px 90px 90px minmax(170px, 1fr) 150px 180px 108px;
  min-width: 1570px;
}

/* 商品任务主表统一为业务决策视图；所有款式标签独立于图片和商品名称。 */
.task-row.task-mode-default,
.task-row.task-mode-hot,
.task-row.task-mode-slow,
.task-row.task-mode-inventory,
.task-row.task-mode-clearance,
.task-row.task-mode-listing,
body.owner-mode .task-row.task-mode-listing,
.task-row.task-mode-listed-slow {
  grid-template-columns: 36px 52px 86px 72px 92px 180px 220px 150px 160px 210px 176px;
  min-width: 1434px;
}
body.owner-mode .task-row.task-mode-default,
body.owner-mode .task-row.task-mode-hot,
body.owner-mode .task-row.task-mode-slow,
body.owner-mode .task-row.task-mode-inventory,
body.owner-mode .task-row.task-mode-clearance,
body.owner-mode .task-row.task-mode-listing,
body.owner-mode .task-row.task-mode-listed-slow {
  grid-template-columns: 36px 52px 86px 72px 92px 180px 220px 150px 160px 108px;
  min-width: 1268px;
}
.task-row.task-separate-skcid {
  grid-template-columns: 36px 52px 86px 72px 92px 180px 220px 130px 150px 160px 210px 176px;
  min-width: 1564px;
}
body.owner-mode .task-row.task-separate-skcid {
  grid-template-columns: 36px 52px 86px 72px 92px 180px 220px 130px 150px 160px 108px;
  min-width: 1398px;
}
.task-product-label-cell {
  align-self: stretch;
  white-space: normal !important;
}

.task-key-metric-head {
  align-items: center;
  display: flex;
  gap: 4px;
  justify-content: center;
  min-width: 0;
}

.task-key-metric-head .task-sort-button {
  padding: 2px 4px;
}

.task-key-metric-head .task-sort-button span {
  font-size: 12px;
}
.task-product-label-cell .production-product-label-stack {
  height: 100%;
  align-content: center;
}
.task-product-label-cell .production-product-label {
  border-radius: 5px;
}
.task-product-name-pure {
  cursor: copy;
}
.task-current-problem.is-clearance-sold-out,
.task-current-problem.is-clearance-warning {
  align-self: center;
  padding: 7px 9px;
  border-radius: 7px;
  font-weight: var(--ui-font-weight-semibold);
}
.task-current-problem.is-clearance-sold-out {
  background: color-mix(in srgb, var(--ui-color-danger) 14%, var(--panel-solid));
  color: var(--ui-color-danger);
}
.task-current-problem.is-clearance-warning {
  background: color-mix(in srgb, var(--ui-color-warning) 18%, var(--panel-solid));
  color: #9a6200;
}
.task-business-identity,
.task-key-metric,
.task-progress-cell,
.task-unified-actions {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.task-business-identity strong,
.task-key-metric strong,
.task-progress-cell strong {
  overflow: hidden;
  color: var(--ui-color-text);
  font-size: var(--ui-font-size-body);
  font-weight: var(--ui-font-weight-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-business-identity button {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ui-color-muted);
  font: inherit;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: copy;
}
.task-business-owner {
  overflow: hidden;
  color: var(--ui-color-muted);
  font-size: 13px;
  font-weight: var(--ui-font-weight-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-key-metric span,
.task-progress-cell > span {
  overflow: hidden;
  color: var(--ui-color-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-progress-cell > div {
  min-width: 0;
}
.task-unified-actions {
  grid-template-columns: 1fr;
  align-content: center;
}
.task-unified-actions button {
  width: 100%;
}
.task-size-business-context {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.grouped-business-table td.task-clearance-risk-stock {
  background: color-mix(in srgb, var(--ui-color-danger) 12%, var(--panel-solid));
  color: var(--ui-color-danger);
  font-weight: var(--ui-font-weight-semibold);
}

.task-size-data-popover {
  width: min(1400px, calc(100vw - 16px));
}
.task-size-data-scroll {
  overflow: auto;
  max-height: min(460px, calc(100vh - 92px));
}
.task-size-data-popover .production-size-detail-header th {
  top: 0;
  color: #263650;
  font-size: 13px;
  font-weight: 700;
}
.task-size-data-popover .production-size-detail-grid {
  width: max-content;
  min-width: calc(100% - 12px);
  table-layout: auto;
}
.task-size-data-popover .production-size-detail-grid th,
.task-size-data-popover .production-size-detail-grid td {
  min-width: 104px;
  white-space: nowrap;
}
.task-size-data-popover .production-size-detail-grid th:first-child,
.task-size-data-popover .production-size-detail-grid td:first-child {
  min-width: 122px;
}
.task-size-data-popover .task-size-components-cell {
  min-width: 320px;
  max-width: 460px;
  white-space: normal;
  line-height: 1.45;
}
.task-combo-component-summary {
  display: block;
  white-space: normal;
}
.task-product-type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 7px;
  padding: 2px 7px;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}
.task-product-type-badge.is-combo {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
}
.task-combo-size-row td {
  background: #fbfcff;
}
.task-hot-comparison-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.task-hot-context-card {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid;
  border-radius: 10px;
  line-height: 1.35;
}
.task-hot-context-card strong,
.task-hot-context-card span {
  display: block;
}
.task-hot-context-card strong {
  font-size: 13px;
  font-weight: 700;
}
.task-hot-context-card span {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
}
.task-hot-context-card.is-processing {
  border-color: #f4ba59;
  background: #fff5d9;
  color: #7c4b00;
}
.task-hot-context-card.is-retained {
  border-color: #7ed0a5;
  background: #e8f8ef;
  color: #12613b;
}
.task-hot-comparison-grid .task-hot-group-row th {
  text-align: center;
  background: #f5f8fc;
  box-shadow: inset 0 -1px 0 #d9e2ef;
}
.task-hot-comparison-grid .task-hot-priority-group {
  box-shadow: inset 0 -3px 0 #6d7df2;
}
.task-hot-comparison-grid .task-hot-secondary-group {
  color: #64748b;
}
.task-hot-comparison-grid .task-hot-processing-cell {
  background: #fff8e8 !important;
  color: #7d5009 !important;
  font-weight: 600;
}
.task-hot-comparison-grid .task-hot-retained-cell {
  background: #eefaf3 !important;
  color: #176640 !important;
  font-weight: 600;
}
.task-hot-comparison-grid .task-hot-erp-cell,
.task-hot-comparison-grid .task-hot-erp-group {
  background: #f1f4f8 !important;
  color: #586981 !important;
}
@media (max-width: 760px) {
  .task-hot-comparison-context {
    grid-template-columns: 1fr;
  }
}
.task-product-image-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}
.task-product-image-cell .erp-outbound-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 7px;
}
.task-product-image-cell-multiple {
  gap: 3px;
}
.task-product-image-cell-multiple .erp-outbound-thumb {
  width: 30px;
  height: 44px;
}
.task-product-image-cell .erp-outbound-image-empty {
  font-size: 12px;
  line-height: 1.15;
}
.task-row:last-child { border-bottom: 0; }
.task-row > div,
.task-head > span {
  position: relative;
  min-width: 0;
  padding: 6px 7px;
  white-space: normal;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}
.task-head.task-mode-default > span:nth-child(10),
.task-head.task-mode-default > span:nth-child(11),
.task-head.task-mode-default > span:nth-child(12) {
  white-space: nowrap;
}
.task-row > div { white-space: nowrap; }
.task-row.task-mode-listing > div,
.task-row.task-mode-listed-slow > div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-dialog-checks {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px;
  background: #fff;
}
.task-dialog-checks legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 700;
}
.task-dialog-check {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  min-height: 36px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  padding: 7px 10px;
  background: #f9fbff;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}
.task-dialog-check input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
  accent-color: #2f7df6;
}
.task-dialog-check span {
  line-height: 1.2;
}
.task-dialog-check:has(input:checked) {
  border-color: #8fb3ff;
  background: #eef6ff;
  color: #17429f;
}
.task-head {
  min-height: 36px;
  background: #f8f9ff;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
}
.task-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.task-sort-button b {
  color: #2563eb;
  font-size: 13px;
  line-height: 1;
}
.task-sort-button.active { color: #173ea5; }
.task-copy { font-family: var(--font-sans); }
.task-code-wide {
  overflow: hidden;
  text-overflow: clip;
  letter-spacing: 0;
}
.skc-copy-cell {
  cursor: copy;
}
.skc-copy-cell:not(.direct-skc-copy):hover {
  color: #17429f;
  background: #eef6ff;
}
.shein-copy-value {
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ui-color-primary);
  font: inherit;
  font-weight: 500;
  cursor: copy;
}
.shein-copy-value:hover,
.shein-copy-value:focus-visible {
  color: var(--ui-color-primary-strong);
  text-decoration: underline;
}
.task-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-inline-admin-message {
  display: block;
  margin-top: 3px;
  color: #8a5200;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-admin-message,
.task-inline-admin-message,
.hot-conflict-owner-result,
.bargain-review-remark {
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}
.task-admin-message {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}
.task-actions { display: flex; gap: 4px; flex-wrap: nowrap; align-items: center; }
.task-actions button { height: 26px; padding: 0 7px; font-size: 12px; white-space: nowrap; border-radius: 8px; }
.task-empty { padding: 18px; color: var(--muted); }

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 700;
  font-size: 12px;
  background: #e9fbf2;
  color: var(--green);
}
.status-warn { background: #fff7e0; color: var(--orange); }
.status-danger { background: #fff0f5; color: var(--red); }
.status-ok { background: #e9fbf2; color: var(--green); }
.status-pill.ok { background: #e9fbf2; color: var(--green); }
.status-pill.danger { background: #fff0f5; color: var(--red); }
.task-status-cell {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-width: 0;
}
.task-status-cell small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  white-space: normal;
}
.primary-mini { border-color: #c7dcff; color: #275bd8; background: #f0f6ff; }
.danger-mini { border-color: #ffd2dd; color: var(--red); background: #fff5f8; }
.bargain-review-wrap {
  max-height: 68vh;
  overflow: auto;
}
.bargain-loading-state {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}
.bargain-loading-state strong {
  color: var(--ink);
  font-size: 22px;
}
.bargain-review-table {
  min-width: 1600px;
}
.bargain-pending-table {
  min-width: 1500px;
}
.bargain-table .product-image-cell,
.bargain-review-table .product-image-cell {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  text-align: center;
}
.bargain-table .erp-outbound-thumb,
.bargain-review-table .erp-outbound-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 7px;
}
.bargain-review-table th,
.bargain-review-table td {
  padding: 7px 8px;
  line-height: 1.25;
}
.bargain-review-table th {
  white-space: normal;
  word-break: keep-all;
}
.bargain-review-table td {
  white-space: nowrap;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bargain-review-table tr.bargain-review-high-sales td {
  background: #fff0f5;
}
.bargain-review-table tr.bargain-review-high-sales:hover td,
.bargain-review-table tr.bargain-review-high-sales.row-selected td {
  background: #ffe4ef;
}
.bargain-review-table th:nth-child(6),
.bargain-review-table td:nth-child(6),
.bargain-review-table th:nth-child(7),
.bargain-review-table td:nth-child(7) {
  max-width: 168px;
}
.bargain-review-table th:nth-child(9),
.bargain-review-table td:nth-child(9) {
  max-width: 128px;
}
.bargain-review-table th:nth-child(15),
.bargain-review-table td:nth-child(15),
.bargain-review-table th:nth-child(16),
.bargain-review-table td:nth-child(16),
.bargain-review-table th:nth-child(19),
.bargain-review-table td:nth-child(19) {
  max-width: 118px;
}
.bargain-pending-table th.bargain-lowest-price-head,
.bargain-pending-table th:nth-child(15),
.bargain-pending-table td:nth-child(15) {
  min-width: 64px;
  max-width: 76px;
  width: 76px;
}
.bargain-pending-table th.bargain-lowest-price-head {
  white-space: normal;
  word-break: keep-all;
  line-height: 1.15;
}
.bargain-review-table .inline-remark {
  width: 112px;
  min-height: 34px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}
.bargain-review-actions .batch-remark {
  width: 150px;
  min-height: 36px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}
.bargain-review-result {
  display: grid;
  gap: 3px;
  align-items: start;
  width: 116px;
  max-width: 116px;
}
.bargain-review-remark {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  display: block;
  max-width: 116px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.low-price-wrap {
  max-height: 62vh;
  overflow: auto;
}
.low-price-table {
  min-width: 920px;
}
.low-price-table th,
.low-price-table td {
  padding: 7px 8px;
  line-height: 1.25;
}
.low-price-table th {
  white-space: normal;
  word-break: keep-all;
}
.low-price-table td {
  white-space: nowrap;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subpage-panel {
  margin-top: 14px;
}
.owner-bargain-tabs {
  margin: 0 0 14px;
}
#bargainPage.owner-bargain-mode .page-intro,
#bargainPage.owner-replies-open #bargainTabs {
  display: none;
}
#bargainPage.owner-replies-open [data-bargain-history-close] {
  display: none;
}
#bargainPage.owner-replies-open .subpage-panel {
  margin-top: 0;
}
#bargainPage.owner-replies-open .third-level-panel {
  min-height: 0;
  padding: 20px;
}
.third-level-panel {
  min-height: calc(100vh - 220px);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 42px rgba(41, 52, 92, .12);
  padding: 20px;
  overflow: hidden;
}
#bargainPage.subpage-open .bargain-entry-panel {
  display: none;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 24, 40, .18);
}
.task-dialog {
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(41, 52, 92, .24);
  padding: 20px;
}

.dispatch-rule-dialog {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
}

.dispatch-rule-table-wrap {
  max-height: 58vh;
}

.dispatch-rule-baseline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 12px;
  padding: 12px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #f7f9fc;
}

.dispatch-rule-baseline b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #24446f;
  background: #e4edf9;
}

.dispatch-rule-baseline small {
  margin-left: auto;
  color: var(--muted);
}

.dispatch-rule-add-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dispatch-rule-add-row select {
  min-width: 280px;
  max-width: 520px;
}

#dispatchRuleTable input {
  width: 72px;
  min-width: 64px;
}

#dispatchRuleTable th:first-child,
#dispatchRuleTable td:first-child {
  min-width: 180px;
  position: sticky;
  left: 0;
  background: var(--panel, #fff);
  z-index: 1;
}

.dispatch-suggestion-trigger {
  white-space: nowrap;
}

.dispatch-suggestion-status-warning {
  color: #b45309;
  font-weight: 700;
}

.dispatch-suggestion-status-danger {
  color: #b91c1c;
  font-weight: 700;
}
.task-dialog.task-dialog-dispatch-suggestion {
  width: min(1120px, calc(100vw - 32px));
}
.task-dialog.task-dialog-dispatch-suggestion.manual-dispatch-active {
  width: min(1280px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}
.task-dialog.task-dialog-owner-summary {
  width: min(1180px, calc(100vw - 32px));
}
.task-dialog.task-dialog-factory-confirmation {
  width: min(1420px, calc(100vw - 24px));
}
.task-dialog.task-dialog-suppression-manager {
  width: min(1040px, calc(100vw - 32px));
}
.task-dialog-suppression-manager .dialog-context {
  display: none;
}
.suppression-manager-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.suppression-manager-tools input {
  flex: 1;
}
.suppression-manager-tools span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.suppression-manager-table-wrap {
  max-height: 54vh;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}
.suppression-manager-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.suppression-manager-table th,
.suppression-manager-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}
.suppression-manager-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f9fc;
  color: #5d6b82;
  font-size: 12px;
  font-weight: 600;
}
.suppression-manager-table th:nth-child(1) { width: 54px; }
.suppression-manager-table th:nth-child(2) { width: 66px; }
.suppression-manager-table th:nth-child(4) { width: 180px; }
.suppression-manager-table th:nth-child(5) { width: 210px; }
.suppression-manager-table td strong,
.suppression-manager-table td span,
.suppression-manager-table td small {
  display: block;
}
.suppression-manager-table td strong,
.suppression-manager-table td span {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.suppression-manager-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.suppression-manager-table .product-image-cell img,
.suppression-manager-table .product-image-cell > span {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}
.task-dialog-factory-confirmation .dialog-fields {
  display: block;
}
.factory-confirmation-summary,
.factory-confirmation-tools {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.factory-confirmation-summary {
  margin-bottom: 10px;
  color: #475467;
}
.factory-confirmation-summary strong {
  color: #b42318;
}
.factory-confirmation-tools input {
  min-width: 280px;
  flex: 1;
}
.factory-confirmation-tools .is-active {
  border-color: #2e5aac;
  background: #eef4ff;
  color: #21468b;
}
.factory-confirmation-tools span {
  color: #667085;
  font-size: 12px;
}
.factory-confirmation-table-wrap {
  max-height: 58vh;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}
.factory-confirmation-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}
.factory-confirmation-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px;
  border-bottom: 1px solid #d7e0eb;
  background: #eef4fb;
  color: #344054;
  text-align: left;
  font-size: 12px;
}
.factory-confirmation-table td {
  padding: 10px;
  border-bottom: 1px solid #edf0f4;
  vertical-align: top;
  color: #344054;
  font-size: 13px;
}
.factory-confirmation-table td:nth-child(1) {
  width: 40px;
  min-width: 40px;
  text-align: center;
}
.factory-confirmation-table input[name="factory_confirmation_orders"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  accent-color: #2f7df6;
}
.factory-confirmation-table td:nth-child(2) {
  width: 180px;
}
.factory-confirmation-table td:nth-child(3) {
  width: 68px;
  min-width: 68px;
}
.factory-confirmation-table td:nth-child(4) {
  min-width: 260px;
}
.factory-confirmation-table td:nth-child(5) {
  min-width: 180px;
}
.factory-confirmation-table td:nth-child(6) {
  width: 176px;
  min-width: 176px;
}
.factory-confirmation-table td:nth-child(7) {
  min-width: 200px;
}
.factory-confirmation-table td.product-image-cell {
  padding-top: 6px;
  padding-bottom: 6px;
}
.factory-confirmation-table td strong,
.factory-confirmation-table td span,
.factory-confirmation-table td small {
  display: block;
  line-height: 1.45;
}
.factory-confirmation-table td small {
  margin-top: 3px;
  color: #667085;
}
.factory-confirmation-table select {
  width: 160px;
  max-width: 100%;
}
.factory-confirmation-warning {
  color: #b54708 !important;
  background: #fffaeb;
  font-weight: 700;
}
.factory-confirmation-status {
  width: max-content;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.factory-confirmation-status.is-confirmed {
  background: #ecfdf3;
  color: #027a48;
}
.factory-confirmation-status.is-pending {
  background: #fff1f0;
  color: #b42318;
}
.owner-summary-section-list {
  display: grid;
  gap: 12px;
}
.owner-summary-check-section {
  display: grid;
  gap: 0;
  padding: 0;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
}
.owner-summary-check-section legend {
  width: 100%;
  padding: 10px 13px;
  background: #eef5ff;
  color: #173f73;
  font-size: 14px;
  font-weight: 600;
}
.owner-summary-check-table {
  min-width: 1120px;
}
.owner-summary-check-header,
.owner-summary-check {
  display: grid;
  grid-template-columns: 52px 92px 145px 190px 150px minmax(230px, 1fr) minmax(250px, 1.1fr);
  gap: 10px;
  align-items: start;
}
.owner-summary-check-header {
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border-top: 1px solid var(--line-soft);
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}
.owner-summary-check {
  padding: 10px 13px;
  border-top: 1px solid var(--line-soft);
  color: #334155;
  cursor: pointer;
}
.owner-summary-check:hover {
  background: #f8fbff;
}
.owner-summary-check input {
  justify-self: center;
  margin-top: 28px;
}
.owner-summary-check strong,
.owner-summary-check span,
.owner-summary-check small {
  line-height: 1.45;
}
.owner-summary-check small {
  color: #64748b;
}
.owner-summary-product-image {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 9px;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
}
.owner-summary-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.owner-summary-selection-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.owner-summary-selection-tools span {
  color: var(--muted);
  font-size: 12px;
}
.owner-summary-preview-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 58vh;
  object-fit: contain;
  object-position: top center;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #f8fafc;
}
.owner-summary-preview-pages {
  display: grid;
  gap: 14px;
}
.owner-summary-preview-pages section {
  display: grid;
  gap: 6px;
}
.owner-summary-preview-pages section > strong {
  color: #475569;
  font-size: 12px;
}
.production-batch-preview-groups {
  display: grid;
  gap: 16px;
}
.production-batch-preview-group {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #f8fafc;
}
.production-batch-preview-label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 12px;
}
.production-batch-preview-label span,
.production-batch-preview-page small {
  color: #64748b;
  font-size: 12px;
}
.production-batch-preview-page {
  display: grid;
  gap: 6px;
}
.production-preview-image-missing,
.production-preview-image-error::after {
  display: block;
  padding: 18px;
  border: 1px solid #efb4ad;
  border-radius: 10px;
  background: #fff1f0;
  color: #b42318;
  text-align: center;
}
.production-preview-image-error img {
  display: none;
}
.production-preview-image-error::after {
  content: "图片加载失败，请重新预览";
}
.manual-dispatch-search-results {
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow: auto;
}
.manual-dispatch-search-results > button {
  display: grid;
  grid-template-columns: 46px minmax(140px, .7fr) minmax(260px, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 54px;
  padding: 5px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.manual-dispatch-search-results > button:hover { background: #f7faff; }
.manual-dispatch-search-results > button.blocked { border-color: #f2c8a8; }
.manual-dispatch-search-results img,
.manual-dispatch-search-results > button > span {
  width: 42px;
  height: 42px;
  border-radius: 7px;
  object-fit: cover;
  background: #f4f6f9;
  color: #94a3b8;
  font-size: 12px;
}
.manual-dispatch-search-results small { color: #64748b; }
.manual-dispatch-search-results em {
  color: #b45309;
  font-size: 12px;
  font-style: normal;
}
.manual-dispatch-product {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}
.manual-dispatch-product img,
.manual-dispatch-image-empty {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  object-fit: cover;
  background: #f5f7fa;
  color: #94a3b8;
  font-size: 12px;
}
.manual-dispatch-product div {
  display: grid;
  gap: 3px;
}
.manual-dispatch-product span,
.manual-dispatch-existing span {
  color: #64748b;
  font-size: 12px;
}
.manual-dispatch-existing {
  display: grid;
  gap: 4px;
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid #f1d1aa;
  border-radius: 9px;
  background: #fffaf3;
}
.manual-dispatch-active .dialog-head {
  margin-bottom: 8px;
}
.manual-dispatch-active .dialog-form {
  margin: 8px 0 12px;
}
.manual-dispatch-active .dialog-context {
  display: grid;
  gap: 8px;
}
.manual-dispatch-active .manual-dispatch-total {
  flex: 0 1 150px;
  min-width: 130px;
}
.manual-dispatch-active .manual-dispatch-duplicate {
  flex: 1 1 220px;
  min-width: 210px;
}
.manual-dispatch-active .manual-dispatch-comparison-results {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fbfcff;
}
.manual-dispatch-active .dispatch-selected-result {
  margin-top: 10px;
  padding-top: 10px;
}
.manual-dispatch-active .manual-dispatch-plan-heading {
  margin-bottom: 7px;
}
.manual-dispatch-business-wrap {
  max-height: min(310px, 35vh);
}
.manual-dispatch-business-table {
  min-width: 1100px;
}
.manual-dispatch-source-table {
  max-height: 230px;
  margin: 8px 0;
}
.manual-dispatch-summary-table {
  margin-top: 10px;
}
.manual-dispatch-summary-table table {
  min-width: 900px;
}
.manual-dispatch-summary-table th:nth-child(2),
.manual-dispatch-summary-table td:nth-child(2),
.manual-dispatch-summary-table th:nth-child(6),
.manual-dispatch-summary-table td:nth-child(6) {
  min-width: 220px;
}
.manual-dispatch-detail-panel {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
}
.manual-dispatch-detail-panel > summary {
  padding: 10px 12px;
  color: #2448a8;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.manual-dispatch-detail-panel[open] > summary {
  border-bottom: 1px solid var(--line-soft);
  background: #f7faff;
}
.manual-dispatch-detail-content {
  display: grid;
  gap: 10px;
  padding: 11px;
}
.manual-dispatch-detail-title {
  color: #475569;
  font-size: 12px;
}
.manual-dispatch-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}
.manual-dispatch-comparison-results {
  display: grid;
  gap: 10px;
}
.manual-dispatch-ratio-modes {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}
.manual-dispatch-ratio-modes legend {
  width: 100%;
  margin-bottom: 3px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}
.manual-dispatch-ratio-modes label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: #475569;
  cursor: pointer;
}
.manual-dispatch-ratio-modes input {
  width: 14px;
  height: 14px;
  margin: 0;
}
.manual-dispatch-ratio-modes label:has(input:checked) {
  border-color: #6d8cff;
  background: #eef4ff;
  color: #2448a8;
}
.manual-dispatch-custom-ratios {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 7px;
}
.manual-dispatch-calculate-row {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 9px;
}
.manual-dispatch-calculate-row span {
  color: #64748b;
  font-size: 12px;
}
.manual-dispatch-preview {
  display: grid;
  gap: 9px;
}
.manual-dispatch-preview section {
  display: grid;
  gap: 4px;
  padding: 9px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: #fff;
}
.manual-dispatch-preview section span,
.manual-dispatch-preview section div {
  color: #475569;
  font-size: 12px;
}
.task-dialog-dispatch-suggestion .dialog-form {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fffafc;
}
.task-dialog-dispatch-suggestion .dialog-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}
.task-dialog-dispatch-suggestion .dispatch-setting-main {
  flex: 1 1 calc(50% - 8px);
  min-width: 240px;
}
.task-dialog-dispatch-suggestion .dispatch-size-ratio {
  flex: 1 1 88px;
  min-width: 76px;
  max-width: 130px;
}
.task-dialog-dispatch-suggestion .dialog-fields input,
.task-dialog-dispatch-suggestion .dialog-fields select {
  min-height: 36px;
  padding: 7px 9px;
}
.task-dialog-dispatch-suggestion .dialog-actions {
  align-items: center;
  margin-top: 10px;
}
.task-dialog-dispatch-suggestion .field-disabled {
  opacity: .48;
}
.dispatch-suggestion-recalc-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.dispatch-suggestion-recalc-summary span {
  color: var(--muted);
  font-size: 13px;
}
.dispatch-info-help {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  color: #64748b;
  cursor: help;
  font-size: 12px;
  font-weight: 600;
}
.report-data-table th .dispatch-info-help {
  width: 18px;
  height: 18px;
  margin-left: 5px;
  vertical-align: middle;
  font-size: 12px;
}
.dispatch-cell-detail {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
}
.pidan-business-table {
  min-width: 1120px;
}
.pidan-business-table th,
.pidan-business-table td {
  text-align: center;
}
.dispatch-recalculate-status {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}
.dispatch-comparison-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 8px 0;
}
.dispatch-comparison-heading span {
  color: var(--muted);
  font-size: 12px;
}
.dispatch-comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.dispatch-comparison-card {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.dispatch-comparison-card.selected {
  border-color: #4f6cf7;
  box-shadow: 0 0 0 2px rgba(79, 108, 247, .12);
  background: #f7f9ff;
}
.dispatch-comparison-card.unavailable {
  cursor: not-allowed;
  opacity: .72;
}
.dispatch-comparison-title {
  display: flex;
  align-items: center;
  gap: 7px;
}
.dispatch-comparison-sizes {
  color: #334155;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.dispatch-comparison-total {
  font-size: 13px;
}
.dispatch-comparison-card small {
  color: #b45309;
  font-size: 12px;
}
.dispatch-selected-result {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.dispatch-selected-result h3 {
  margin: 0 0 8px;
}
@media (max-width: 720px) {
  .task-dialog-dispatch-suggestion .dispatch-setting-main {
    flex-basis: 100%;
  }
  .dispatch-comparison-grid {
    grid-template-columns: 1fr;
  }
}
.task-dialog.task-dialog-compact {
  width: min(620px, 100%);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 24px 64px rgba(41, 52, 92, .2);
}
.task-dialog.task-dialog-listing-batch {
  width: min(940px, 100%);
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  border-radius: 12px;
  padding: 24px;
}
.task-dialog-listing-batch .dialog-context { display: none; }
.task-dialog-listing-batch .dialog-fields { grid-template-columns: 1fr; }
.task-dialog-listing-batch .task-dialog-dispatch-note textarea { min-height: 72px; }
.listing-batch-dispatch { min-width: 0; }
.listing-batch-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #697386;
  font-size: 13px;
}
.listing-batch-tools button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #2f6fed;
  font-weight: 600;
  cursor: pointer;
}
.listing-batch-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 14px 0 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f5f7fa;
  color: #4a5364;
  font-size: 14px;
}
.listing-batch-summary strong { color: #202533; }
.listing-batch-summary em { color: #b45f06; font-style: normal; }
.listing-batch-table-wrap { overflow-x: auto; border: 1px solid #e3e7ee; border-radius: 10px; }
.listing-batch-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.listing-batch-table th,
.listing-batch-table td { padding: 10px 12px; border-bottom: 1px solid #edf0f5; text-align: left; vertical-align: middle; }
.listing-batch-table tr:last-child td { border-bottom: 0; }
.listing-batch-table th { background: #f8f9fb; color: #697386; font-size: 13px; font-weight: 600; white-space: nowrap; }
.listing-batch-table td:first-child { min-width: 190px; }
.listing-batch-table td:nth-child(2) { min-width: 200px; }
.listing-batch-table td:nth-child(3) { width: 170px; }
.listing-batch-table td > strong,
.listing-batch-table td > span,
.listing-batch-table td > small { display: block; }
.listing-batch-table td > small { margin-top: 3px; color: #697386; }
.listing-batch-product { display: flex; align-items: center; gap: 10px; min-width: 0; }
.listing-batch-product img { width: 44px; height: 44px; flex: 0 0 44px; object-fit: cover; border-radius: 7px; }
.listing-batch-product span { display: grid; gap: 3px; min-width: 0; }
.listing-batch-product strong,
.listing-batch-product small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing-batch-product small { color: #697386; font-size: 12px; font-weight: 400; }
.listing-batch-table select { width: 100%; min-height: 38px; border: 1px solid #d9dee8; border-radius: 8px; background: #fff; padding: 7px 10px; }
.listing-owner-assignment-table td:nth-child(3) { width: auto; min-width: 280px; }
.listing-owner-options { display: flex; flex-wrap: wrap; gap: 8px; }
.listing-owner-options label { position: relative; cursor: pointer; }
.listing-owner-options input { position: absolute; opacity: 0; pointer-events: none; }
.listing-owner-options span {
  display: grid;
  min-height: 36px;
  min-width: 72px;
  place-items: center;
  padding: 6px 12px;
  border: 1px solid #d9dee8;
  border-radius: 8px;
  background: #fff;
  color: #4a5364;
  font-size: 14px;
  font-weight: 500;
}
.listing-owner-options input:checked + span { border-color: #7c9cff; background: #f1f4ff; color: #3158bd; }
.listing-owner-options input:focus-visible + span { outline: 2px solid rgba(49, 88, 189, .24); outline-offset: 2px; }
.listing-batch-status { color: #2d7a50; font-size: 13px; white-space: nowrap; }
.listing-batch-status small { display: block; margin-top: 3px; color: #b45f06; font-size: 12px; }
.listing-batch-status.is-manual { color: #b45f06; }
.listing-batch-note { margin: 0; color: #64748b; font-size: 13px; line-height: 1.4; }
.task-dialog.task-dialog-oem-candidate {
  display: flex;
  flex-direction: column;
  width: min(980px, 100%);
  max-height: min(780px, calc(100vh - 32px));
  overflow: hidden;
  border-radius: 12px;
  padding: 24px;
}
.task-dialog-oem-candidate .dialog-head {
  flex: 0 0 auto;
  align-items: center;
}
.task-dialog-oem-candidate .dialog-head h2 {
  margin: 0;
  color: var(--ui-color-title);
  font-size: 20px;
  font-weight: 600;
}
.task-dialog-oem-candidate .dialog-head p {
  margin: 4px 0 0;
  font-size: 13px;
}
.task-dialog-oem-candidate .dialog-form {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}
.task-dialog-oem-candidate .dialog-fields {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px 16px;
}
.task-dialog-oem-candidate .oem-candidate-table {
  min-height: 0;
  grid-column: 1 / -1;
}
.task-dialog-oem-candidate .listing-batch-table-wrap {
  max-height: min(380px, 48vh);
  overflow: auto;
}
.task-dialog-oem-candidate .listing-batch-table {
  min-width: 900px;
  table-layout: fixed;
}
.task-dialog-oem-candidate .listing-batch-table th,
.task-dialog-oem-candidate .listing-batch-table td {
  padding: 8px 10px;
}
.task-dialog-oem-candidate .listing-batch-table th:nth-child(1),
.task-dialog-oem-candidate .listing-batch-table td:nth-child(1) {
  width: 50px;
  min-width: 50px;
  text-align: center;
}
.task-dialog-oem-candidate .listing-batch-table th:nth-child(2),
.task-dialog-oem-candidate .listing-batch-table td:nth-child(2) {
  width: 68px;
  min-width: 68px;
}
.task-dialog-oem-candidate .listing-batch-table th:nth-child(3),
.task-dialog-oem-candidate .listing-batch-table td:nth-child(3) { width: 120px; }
.task-dialog-oem-candidate .listing-batch-table th:nth-child(5),
.task-dialog-oem-candidate .listing-batch-table td:nth-child(5) { width: 118px; }
.task-dialog-oem-candidate .listing-batch-table th:nth-child(6),
.task-dialog-oem-candidate .listing-batch-table td:nth-child(6),
.task-dialog-oem-candidate .listing-batch-table th:nth-child(7),
.task-dialog-oem-candidate .listing-batch-table td:nth-child(7) { width: 105px; }
.task-dialog-oem-candidate .listing-batch-table th:nth-child(8),
.task-dialog-oem-candidate .listing-batch-table td:nth-child(8) { width: 170px; }
.task-dialog-oem-candidate .listing-batch-table input[type="checkbox"] {
  width: 17px;
  min-width: 17px;
  height: 17px;
  min-height: 17px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
}
.task-dialog-oem-candidate .listing-batch-table input[type="text"] {
  width: 100%;
  min-height: 36px;
  padding: 6px 9px;
  border-radius: 8px;
}
.task-dialog-oem-candidate .listing-batch-table select {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 8px;
}
.task-dialog-oem-candidate .oem-candidate-note {
  grid-column: 1 / -1;
}
.task-dialog-oem-candidate .oem-candidate-note textarea {
  min-height: 58px;
  max-height: 100px;
  padding: 8px 10px;
  border-radius: 8px;
}
.task-dialog-oem-candidate .dialog-actions {
  flex: 0 0 auto;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--ui-color-border);
}
@media (max-width: 760px) {
  .task-dialog.task-dialog-oem-candidate { padding: 18px; }
  .task-dialog-oem-candidate .dialog-fields { grid-template-columns: 1fr; }
  .task-dialog-oem-candidate .oem-candidate-table,
  .task-dialog-oem-candidate .oem-candidate-note { grid-column: 1; }
}
.task-dialog-compact .dialog-head {
  align-items: center;
}
.task-dialog-compact .dialog-head h2 {
  margin: 0;
  color: #202533;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
}
.task-dialog-compact .dialog-head .tool-button {
  min-height: 34px;
  padding: 6px 10px;
  color: #697386;
  font-size: 13px;
  font-weight: 500;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.dialog-head h2 { margin: 10px 0 6px; font-size: 22px; }
.dialog-head p,
.dialog-context p { color: var(--muted); line-height: 1.55; }
.dialog-context {
  margin: 14px 0;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #f9fbff;
  padding: 12px;
}
.dialog-context strong { font-size: 15px; }
.task-dialog-compact .dialog-context {
  margin: 18px 0;
  display: block;
  border: 0;
  border-radius: 8px;
  background: #f5f7fa;
  padding: 13px 16px;
}
.dialog-summary-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}
.dialog-summary-row + .dialog-summary-row {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #e3e7ee;
}
.dialog-summary-row > span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  color: #202533;
  font-size: 14px;
  line-height: 1.45;
}
.dialog-summary-row > span + span::before {
  content: "";
  width: 1px;
  height: 14px;
  margin: 0 14px;
  background: #d9dee8;
}
.dialog-summary-row small {
  color: #697386;
  font-size: 13px;
  font-weight: 400;
}
.dialog-summary-row strong {
  overflow: hidden;
  max-width: 210px;
  color: #202533;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dialog-history-item {
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 10px;
}
.dialog-history-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.dialog-fields {
  display: grid;
  gap: 12px;
}
.dialog-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
}
.task-dialog-compact .dialog-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.task-dialog-compact .dialog-fields > :only-child {
  grid-column: 1 / -1;
}
.task-dialog-compact .dialog-fields > label,
.task-dialog-compact .task-dialog-recipient-message,
.task-dialog-compact .task-dialog-checks,
.task-dialog-compact .task-dialog-segmented {
  color: #3f4757;
  font-size: 14px;
  font-weight: 500;
}
.task-dialog-recipient-message {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  min-width: 0;
}
.task-dialog-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.task-dialog-message-head label {
  color: #3f4757;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
}
.task-dialog-message-copy {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #c7dcff;
  border-radius: 8px;
  background: #f0f6ff;
  color: #275bd8;
  font-family: var(--font-sans);
  font-size: 13px !important;
  font-weight: 600;
  white-space: nowrap;
}
.task-dialog-message-copy:hover {
  border-color: #8fb3ff;
  background: #e8f1ff;
}
.task-dialog-recipient-message textarea {
  width: 100%;
  min-height: 96px;
  font-family: var(--font-sans);
  font-size: 14px !important;
  font-weight: 500;
  line-height: 1.6;
}
.dialog-fields input,
.dialog-fields select,
.dialog-fields textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 9px 11px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}
.task-dialog-compact .dialog-fields input,
.task-dialog-compact .dialog-fields select,
.task-dialog-compact .dialog-fields textarea {
  min-height: 42px;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 400;
}
.task-dialog-segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  border: 0;
  padding: 0;
}
.task-dialog-segmented legend {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  padding: 0;
}
.task-dialog-segmented label {
  position: relative;
  display: block;
  cursor: pointer;
}
.task-dialog-segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.task-dialog-segmented span {
  display: grid;
  min-height: 38px;
  place-items: center;
  border: 1px solid #d9dee8;
  border-radius: 8px;
  background: #fff;
  color: #4a5364;
  font-size: 14px;
  font-weight: 500;
}
.task-dialog-segmented input:checked + span {
  border-color: #7c9cff;
  background: #f1f4ff;
  color: #3158bd;
}
.task-dialog-segmented input:focus-visible + span {
  outline: 2px solid rgba(49, 88, 189, .24);
  outline-offset: 2px;
}
.task-dialog-compact .task-dialog-owner-choice {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 100px));
}
.task-dialog-compact .task-dialog-dispatch-note {
  grid-column: 1 / -1;
}
.task-dialog-compact .task-dialog-dispatch-note textarea {
  min-height: 84px;
}
.dialog-fields textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.6;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.task-dialog-compact .dialog-actions {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #edf0f5;
}
.task-dialog-compact .dialog-actions button {
  min-width: 84px;
}

@media (max-width: 640px) {
  .dialog-backdrop { padding: 12px; }
  .task-dialog.task-dialog-compact { padding: 18px; }
  .dialog-summary-row { display: grid; gap: 6px; }
  .dialog-summary-row > span + span::before { display: none; }
  .dialog-summary-row strong { max-width: none; }
  .task-dialog-compact .dialog-fields { grid-template-columns: 1fr; }
  .task-dialog-compact .dialog-fields > * { grid-column: 1; }
  .task-dialog-segmented { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-dialog-compact .task-dialog-owner-choice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.report-readiness {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(340px, 1.5fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid #dce5f6;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(240,252,255,.9));
}
.report-readiness-copy strong { display: block; font-size: 15px; }
.report-readiness-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.report-readiness-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}
.report-ready-metric {
  min-height: 66px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
}
.report-ready-metric span,
.report-ready-metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.report-ready-metric strong {
  display: block;
  margin: 3px 0 2px;
  font-size: 20px;
}
.report-ready-metric.ok strong { color: var(--green); }
.report-ready-metric.warn strong { color: #a46a00; }
.report-readiness-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.report-card,
.output-row,
.rule-card {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}
.report-card h3 { margin: 0 0 8px; font-size: 15px; }
.report-latest {
  min-height: 48px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #f9fbff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.download-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.output-list { display: grid; gap: 8px; margin-top: 14px; }
.output-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; }
.output-row p { margin-top: 4px; }
.global-numbered-list-row {
  position: relative;
  min-height: 42px;
  padding-left: 52px;
}
.global-list-row-number {
  position: absolute;
  left: 8px;
  top: 50%;
  width: 34px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border-radius: 7px;
  background: #f2f5fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.global-row-number,
.global-grid-row-number {
  width: 52px !important;
  max-width: 52px !important;
  text-align: center !important;
  color: var(--muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.compact-intro {
  align-items: center;
}
.product-query-panel {
  padding: 14px;
}
.product-filter-grid {
  display: grid;
  grid-template-columns: minmax(150px, 180px) minmax(180px, 220px) minmax(220px, 1fr) 84px;
  gap: 8px;
  align-items: end;
}
.product-filter-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.product-filter-grid input {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}
.product-filter-grid button {
  height: 32px;
  border-radius: 8px;
  padding: 0 12px;
}
.product-info-table-wrap {
  max-height: calc(100vh - 260px);
}
.product-info-table {
  font-size: 12px;
}
.product-info-table th,
.product-info-table td {
  min-width: 82px;
  max-width: 160px;
  padding: 7px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.product-info-table th {
  white-space: normal;
  word-break: keep-all;
}
.product-info-table td {
  white-space: nowrap;
}
.product-info-table th:nth-child(1),
.product-info-table td:nth-child(1),
.product-info-table th:nth-child(4),
.product-info-table td:nth-child(4) {
  min-width: 112px;
  max-width: 132px;
}
.product-info-table th:nth-child(2),
.product-info-table td:nth-child(2) {
  min-width: 170px;
  max-width: 220px;
}
.product-info-table th:nth-child(9),
.product-info-table td:nth-child(9),
.product-info-table th:nth-child(10),
.product-info-table td:nth-child(10) {
  min-width: 112px;
  max-width: 150px;
}
.erp-image-missing-panel {
  margin-top: 18px;
  padding: 14px;
}
.erp-image-missing-table td:nth-child(6) {
  min-width: 320px;
  white-space: normal;
}
.erp-image-missing-table .erp-image-missing-status {
  color: #b42318;
  font-weight: 700;
}
.erp-image-read-failed {
  color: #b42318;
  display: inline-block;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}
.suppression-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.suppression-query-panel {
  padding: 14px;
}
.suppression-filter-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.suppression-filter-grid input {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}
.suppression-table-wrap {
  max-height: calc(100vh - 260px);
}
.suppression-table {
  font-size: 12px;
}
.suppression-table th,
.suppression-table td {
  min-width: 96px;
  max-width: 240px;
  padding: 7px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suppression-table th:nth-child(4),
.suppression-table td:nth-child(4),
.suppression-table th:nth-child(5),
.suppression-table td:nth-child(5),
.suppression-table th:nth-child(7),
.suppression-table td:nth-child(7),
.suppression-table th:nth-child(8),
.suppression-table td:nth-child(8) {
  min-width: 150px;
}
@media (max-width: 980px) {
  .compact-filter-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .compact-filter-strip .ghost-button,
  .compact-table-actions .pagination-actions {
    grid-column: 1 / -1;
  }
  .compact-table-actions {
    flex-wrap: wrap;
  }
}
.business-report-shell {
  display: grid;
  gap: 14px;
}
.business-filter-panel,
.business-alert-strip,
.business-table-card {
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.business-filter-panel {
  padding: 16px 18px;
}
.business-filters {
  display: grid;
  grid-template-columns: 150px 150px 120px 160px minmax(160px, 1fr) 120px;
  gap: 10px;
}
.business-alert-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: linear-gradient(135deg, rgba(240,255,247,.94), rgba(255,255,255,.92));
}
.business-alert-strip strong {
  color: var(--green);
  font-size: 15px;
}
.business-alert-strip span {
  color: var(--muted);
  line-height: 1.45;
}
.business-alert-strip.danger {
  background: linear-gradient(135deg, rgba(255,240,245,.96), rgba(255,248,226,.92));
}
.business-alert-strip.danger strong {
  color: var(--red);
}
.business-alert-list {
  display: grid;
  gap: 8px;
}
.business-alert-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}
.business-alert-row strong {
  color: var(--red);
}
.business-alert-row span {
  color: var(--text);
  min-width: 0;
}
.business-alert-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  white-space: nowrap;
}
.business-alert-row.muted-row strong {
  color: var(--green);
}
.business-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.business-kpi {
  min-height: 108px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(77, 91, 130, .07);
}
.business-kpi span,
.business-kpi small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.business-kpi strong {
  display: block;
  margin: 8px 0;
  font-size: 28px;
  line-height: 1.1;
}
.business-kpi.up {
  background: linear-gradient(180deg, #f0fff7, #fff);
}
.business-kpi.down {
  background: linear-gradient(180deg, #fff0f5, #fff);
}
.business-kpi-main {
  grid-column: span 2;
}
.business-kpi.warn strong,
.business-kpi.red strong {
  color: var(--red);
}
.business-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.business-tabs .segment {
  min-height: 36px;
  padding: 0 14px;
}
.business-table-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.business-table-card {
  min-width: 0;
  padding: 18px;
}
.business-table-card .panel-head {
  margin-bottom: 12px;
}
.business-table .up {
  color: var(--green);
  font-weight: 700;
}
.business-table .down {
  color: var(--red);
  font-weight: 700;
}
.range-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 10px;
}
.source-shortcuts {
  margin-top: -2px;
}
.range-shortcuts .segment {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.range-shortcuts .segment.active {
  border-color: #7c8cff;
  background: #f2f5ff;
  color: var(--text);
}
.sales-report-filters {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}
.sales-report-filters button { width: 100%; }
.report-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.report-summary-strip span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.report-summary-strip strong {
  color: var(--text);
  font-size: 17px;
}
.report-table-wrap {
  position: relative;
  max-width: 100%;
  max-height: min(58vh, 620px);
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}
.report-data-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}
.resizable-data-table {
  table-layout: fixed;
}
.resizable-data-table th,
.resizable-data-table td {
  min-width: 0 !important;
  max-width: none !important;
  width: auto !important;
}
.resizable-data-table.selection-first-table th:first-child,
.resizable-data-table.selection-first-table td:first-child {
  width: 42px;
  min-width: 34px;
  max-width: 48px;
  text-align: center;
}
.resizable-data-table th:last-child,
.resizable-data-table td:last-child {
  max-width: none;
}
.resizable-column-head {
  position: relative;
}
.column-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 100%;
  cursor: col-resize;
  z-index: 8;
  user-select: none;
}
.column-resize-handle::after {
  content: "";
  position: absolute;
  top: 22%;
  right: 0;
  width: 1px;
  height: 56%;
  background: rgba(99, 116, 139, .32);
}
.column-resize-handle:hover::after {
  width: 3px;
  background: rgba(37, 99, 235, .72);
}
.resizable-column-head[data-column-movable="1"] {
  cursor: grab;
}
.column-reorder-active,
.column-reorder-active * {
  cursor: grabbing !important;
  user-select: none !important;
}
.column-drag-feedback {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 120;
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 40px));
  padding: 10px 16px;
  border: 1px solid rgba(37, 99, 235, .42);
  border-radius: 10px;
  background: rgba(239, 246, 255, .98);
  color: #1d4ed8;
  box-shadow: 0 12px 30px rgba(37, 99, 235, .22);
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}
.table-preference-status.drag-active {
  color: #1d4ed8;
  font-weight: 700;
}
.resizable-column-head.column-drag-armed {
  z-index: 9;
  outline: 2px solid rgba(37, 99, 235, .72);
  outline-offset: -2px;
  background: #eff6ff !important;
}
.resizable-column-head.column-dragging {
  z-index: 9;
  opacity: .72;
  outline: 2px solid #2563eb;
  outline-offset: -2px;
  background: #dbeafe !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .24);
}
.resizable-column-head.column-drag-target {
  background: #eff6ff !important;
}
.resizable-column-head.column-drag-target-before {
  box-shadow: inset 4px 0 0 #2563eb;
}
.resizable-column-head.column-drag-target-after {
  box-shadow: inset -4px 0 0 #2563eb;
}
.table-preference-controls {
  position: sticky;
  left: 0;
  z-index: 7;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  width: max-content;
  min-width: 100%;
  padding: 5px 6px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .96);
}
.table-column-settings-open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  margin-right: auto;
  padding: 3px 8px;
  border-color: transparent;
  background: transparent;
  color: #6b7a90;
}
.table-column-settings-open:hover,
.table-column-settings-open:focus-visible {
  border-color: #d4ddeb;
  background: #f7f9fc;
  color: #34465d;
}
.table-column-settings-open img {
  width: 15px;
  height: 15px;
  opacity: .72;
}
.table-preference-status {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.table-column-settings-dialog {
  position: fixed;
  z-index: 2147483646;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .28);
}
.table-column-settings-dialog.hidden {
  display: none;
}
.table-column-settings-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(560px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid #d9e1ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .2);
}
.table-column-settings-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 15px;
  border-bottom: 1px solid #e7ecf3;
}
.table-column-settings-card > header > div {
  display: grid;
  gap: 4px;
}
.table-column-settings-card > header strong {
  color: #24344c;
  font-size: 18px;
}
.table-column-settings-card > header span {
  color: #7b8799;
  font-size: 12px;
}
.table-column-settings-list {
  min-height: 220px;
  overflow-y: auto;
  padding: 8px 12px;
}
.table-column-settings-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 8px;
  border-bottom: 1px solid #eef2f7;
  border-radius: 7px;
  cursor: grab;
}
.table-column-settings-row:hover,
.table-column-settings-row.is-drag-target {
  background: #f4f7fc;
}
.table-column-settings-row.is-dragging {
  opacity: .48;
}
.table-column-settings-row input {
  width: 16px;
  height: 16px;
  accent-color: #3978e9;
}
.table-column-settings-label {
  min-width: 0;
  overflow: hidden;
  color: #315fcb;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-column-drag-label {
  color: #a1aab8;
  font-size: 12px;
}
.table-column-move {
  min-height: 28px;
  padding: 3px 7px;
  border: 1px solid #d8e0eb;
  border-radius: 6px;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
}
.table-column-move:hover:not(:disabled),
.table-column-move:focus-visible {
  border-color: #9eb8eb;
  color: #315fcb;
}
.table-column-move:disabled {
  opacity: .35;
  cursor: default;
}
.table-column-settings-card > footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #e7ecf3;
  background: #fbfcfe;
}
.table-column-settings-count {
  color: #7b8799;
  font-size: 12px;
}
@media (max-width: 640px) {
  .table-preference-status,
  .table-preference-save {
    display: none;
  }
  .table-column-settings-dialog {
    padding: 12px;
  }
  .table-column-settings-card {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }
  .table-column-settings-row {
    grid-template-columns: 20px minmax(0, 1fr) auto auto;
  }
  .table-column-drag-label {
    display: none;
  }
  .table-column-settings-card > footer {
    grid-template-columns: 1fr 1fr;
  }
  .table-column-settings-count {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}
.report-data-table th,
.report-data-table td {
  min-width: 58px;
  max-width: 168px;
  padding: 7px 8px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  line-height: 1.25;
}
.report-data-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f6f8ff;
  color: #5e6b84;
  font-weight: 700;
  white-space: normal;
  word-break: keep-all;
  text-align: center;
}
.report-data-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.content-first-table th,
.content-first-table td,
.business-table-web th,
.business-table-web td,
.business-table th,
.business-table td {
  max-width: 168px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.content-first-table th {
  white-space: nowrap;
}
.content-first-table .num,
.business-table-web .num,
.business-table .num {
  max-width: 86px;
}
.content-first-table td:nth-child(1),
.content-first-table td:nth-child(2),
.content-first-table td:nth-child(5),
.content-first-table td:nth-child(10),
.content-first-table th:nth-child(1),
.content-first-table th:nth-child(2),
.content-first-table th:nth-child(5),
.content-first-table th:nth-child(10) {
  max-width: 220px;
}
.resizable-data-table.content-first-table th,
.resizable-data-table.content-first-table td,
.resizable-data-table.dense-task-table th,
.resizable-data-table.dense-task-table td,
.resizable-data-table.bargain-review-table th,
.resizable-data-table.bargain-review-table td {
  max-width: none;
}
.resizable-data-table.selection-first-table.content-first-table th:first-child,
.resizable-data-table.selection-first-table.content-first-table td:first-child,
.resizable-data-table.selection-first-table.dense-task-table th:first-child,
.resizable-data-table.selection-first-table.dense-task-table td:first-child,
.resizable-data-table.selection-first-table.bargain-review-table th:first-child,
.resizable-data-table.selection-first-table.bargain-review-table td:first-child {
  width: 42px;
  min-width: 34px;
  max-width: 48px;
}
#productionCoordinationTable.resizable-data-table.selection-first-table th.production-selection-index,
#productionCoordinationTable.resizable-data-table.selection-first-table td.production-selection-index {
  width: 72px !important;
  min-width: 64px !important;
  max-width: 84px !important;
}
#productionCoordinationTable .production-selection-index {
  text-align: center;
  white-space: nowrap;
  user-select: none;
  cursor: ns-resize;
}
#productionCoordinationTable .production-selection-index > input,
#productionCoordinationTable .production-selection-index > span {
  vertical-align: middle;
}
#productionCoordinationTable .production-selection-number,
#productionCoordinationTable th.production-selection-index > span {
  display: inline-block;
  min-width: 22px;
  margin-left: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.resizable-data-table th:last-child,
.resizable-data-table td:last-child {
  max-width: none;
}
.table-head-toggle {
  position: sticky;
  left: 6px;
  top: 6px;
  z-index: 8;
  width: fit-content;
  min-width: 42px;
  height: 24px;
  margin: 4px 0 2px 4px;
  padding: 0 8px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: rgba(255, 255, 255, .94);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.table-head-toggle:hover {
  border-color: #9db4e8;
  color: var(--text);
}
.table-head-collapsed thead {
  display: none;
}
.business-table-wrap-web,
.sales-overview-wrap-web,
.task-suppression-table-wrap,
.hot-conflict-table-wrap,
.overview-table-wrap,
.task-table {
  position: relative;
}
.package-preview-line span,
.package-meta,
.package-sub,
.product-sales-name,
.product-sales-basis {
  min-width: 0;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.report-data-table tbody tr:hover td {
  background: #f8fbff;
}

.report-data-table td.business-cell-selected,
.task-row > .business-cell-selected,
.source-table .business-cell-selected,
.store-owner-table .business-cell-selected {
  background: #dbeafe !important;
  box-shadow: inset 0 0 0 1px #60a5fa;
}

.report-data-table tbody td,
.task-table .task-row:not(.task-head) > *,
.source-table .table-row:not(.table-head) > *,
.store-owner-table .store-owner-row:not(.store-owner-head) > * {
  user-select: none;
}

#productionCoordinationTable tbody td,
.production-size-detail-grid tbody td {
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

/* 输入与留言区始终使用浏览器原生文字选择，不受表格整格拖选影响。 */
textarea,
input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]),
[contenteditable="true"],
[contenteditable="plaintext-only"] {
  cursor: text;
  user-select: text !important;
  -webkit-user-select: text !important;
}

.business-copy-menu {
  position: fixed;
  z-index: 9999;
  min-width: 112px;
  padding: 6px;
  border: 1px solid #d7e0ec;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
}

.business-copy-menu button {
  width: 100%;
  padding: 8px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #172033;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.business-copy-menu button:hover { background: #eef5ff; }
.report-data-table .num {
  min-width: 54px;
  max-width: 78px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.report-data-table .strong {
  color: var(--text);
  font-weight: 700;
}
.report-data-table .empty-table-cell {
  width: 100%;
  min-width: 520px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.bargain-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.bargain-table {
  min-width: 980px;
}

.bargain-table th,
.bargain-table td {
  min-width: 64px;
  max-width: 140px;
}

.inline-price,
.inline-remark {
  width: 76px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.inline-remark {
  width: 108px;
}
.report-data-table .sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 76px;
  max-width: 112px;
  background: #fff;
}
.report-data-table .sticky-col-2 {
  left: 76px;
  min-width: 96px;
  max-width: 140px;
}
.report-data-table thead .sticky-col {
  z-index: 4;
  background: #f6f8ff;
}
#salesReportHint {
  margin-top: 8px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.rule-card label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.rule-card input, .search-bar input { width: 100%; }
.erp-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.erp-settings-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
}
.erp-settings-grid input { width: 100%; }
.erp-settings-grid .check-line {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
}
.erp-settings-grid .check-line input { width: auto; }
.erp-readonly-option {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fbff;
  color: var(--muted);
}
.erp-readonly-option strong { color: var(--ink); }
#erpSettingsStatus {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 600;
}
.erp-latest-data {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.erp-latest-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--ink);
}
.erp-latest-head span,
.erp-latest-empty {
  color: var(--muted);
  font-weight: 600;
}
.erp-latest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.erp-latest-grid div {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  display: grid;
  gap: 3px;
}
.erp-latest-grid span,
.erp-latest-grid em,
.erp-latest-files {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.erp-latest-grid strong {
  color: var(--ink);
  font-size: 18px;
}
.erp-latest-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.erp-latest-files strong {
  color: var(--ink);
}
.erp-overview-note {
  border: 1px solid #ffd89a;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff8e8;
  color: #8a5b00;
  font-weight: 600;
}
.compact-page-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.erp-settings-page-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.erp-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
  gap: 12px;
  align-items: start;
}
.erp-config-card,
.erp-sync-footer {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(77, 91, 130, .06);
}
.compact-panel-head {
  margin-bottom: 6px;
}
.compact-panel-head h2 {
  margin: 0;
  font-size: 18px;
}
.compact-panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.erp-main-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 0;
}
.erp-main-grid label,
.erp-advanced-settings label {
  font-size: 12px;
}
.erp-sync-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.erp-sync-options .check-line {
  min-height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 0 10px;
  background: #fbfcff;
}
.erp-advanced-settings {
  margin-top: 10px;
  border-top: 1px solid var(--line-soft);
  padding-top: 10px;
}
.erp-advanced-settings summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}
.erp-advanced-settings .erp-settings-grid {
  gap: 10px;
  margin-bottom: 0;
}
.erp-sync-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}
.erp-sync-footer .download-actions {
  align-content: start;
  align-items: start;
}
.erp-sync-result {
  min-height: 96px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}
.erp-sync-result[data-state="success"] {
  border-color: rgba(35, 166, 107, .35);
  background: #effbf5;
}
.erp-sync-result[data-state="failed"] {
  border-color: rgba(224, 72, 96, .35);
  background: #fff3f5;
}
.erp-sync-result[data-state="running"] {
  border-color: rgba(79, 109, 245, .35);
  background: #f4f6ff;
}
.erp-sync-result strong {
  display: block;
  font-size: 15px;
  margin-bottom: 5px;
}
.erp-sync-result p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.erp-sync-result .danger {
  color: var(--red);
}
.erp-sync-result details {
  margin-top: 10px;
}
.erp-sync-result summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}
.erp-sync-result pre {
  max-height: 130px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 8px 0 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}
.backup-actions {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}
.backup-actions input { width: 100%; }
#backupStatus {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 600;
}
.check-result {
  margin-top: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.check-result strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}
.check-result span {
  display: block;
  color: var(--muted);
  line-height: 1.6;
  word-break: break-word;
}
.check-result.running {
  border-color: rgba(60, 125, 255, .28);
  background: #f5f8ff;
}
.check-result.ok {
  border-color: rgba(31, 169, 113, .28);
  background: #f2fff9;
}
.check-result.danger {
  border-color: rgba(239, 71, 111, .3);
  background: #fff5f8;
}
.platform-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}
.platform-chip-row span { color: var(--muted); font-size: 12px; font-weight: 600; }
.platform-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.platform-chip-row strong {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  font-size: 12px;
}
.platform-add-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 8px;
  margin: 0 0 12px;
}
.platform-add-row input,
.platform-add-row button {
  height: 38px;
}
.store-owner-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.store-owner-row {
  display: grid;
  grid-template-columns: 52px 76px 54px 74px 104px minmax(120px, 1.1fr) minmax(140px, 1fr) minmax(220px, 1.4fr) 64px;
  gap: 0;
  align-items: center;
}
.store-owner-row > * {
  min-height: 38px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.store-owner-row label {
  display: grid;
  place-items: center;
}
.store-owner-row label.store-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}
.store-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.store-toggle span {
  min-width: 44px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #d7deef;
  background: #eef2f8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.store-toggle input:checked + span {
  border-color: rgba(22, 125, 255, .35);
  background: #e9f3ff;
  color: #1367d8;
}
.store-toggle input:focus-visible + span {
  outline: 3px solid rgba(22, 125, 255, .18);
  outline-offset: 2px;
}
.store-owner-head span {
  display: flex;
  align-items: center;
  padding: 0 8px;
  background: #f8f9ff;
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
}
.store-owner-row input,
.store-owner-row select {
  width: 100%;
  height: 38px;
  border: 0;
  border-radius: 0;
  padding: 0 10px;
  font-size: 13px;
}
.store-owner-row .tool-button {
  height: 38px;
  border: 0;
  border-radius: 0;
  padding: 0 8px;
  font-size: 12px;
}
.store-info-page-panel {
  padding: 14px 16px;
}
.store-owner-owners {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 4px 8px;
}
.owner-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}
.owner-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(22, 125, 255, .18);
  border-radius: 999px;
  background: #eef5ff;
  color: #1367d8;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.owner-empty {
  color: var(--muted);
  font-size: 12px;
}
.owner-edit-button {
  flex: 0 0 auto;
}
.compact-owner-dialog {
  max-width: 480px;
}
.owner-editor-input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
}
.compat-editor {
  margin-top: 10px;
  color: var(--muted);
}
.compat-editor summary { cursor: pointer; font-weight: 600; }
.master-module-panel textarea {
  width: 100%;
  min-height: 132px;
  margin: 10px 0;
  font: 13px/1.5 Consolas, "Microsoft YaHei", sans-serif;
}
.search-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 14px; }
.search-bar button {
  border: 0;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10000;
  background: #223047;
  color: white;
  border-radius: 14px;
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .18s ease;
  box-shadow: 0 12px 28px rgba(34, 48, 71, .24);
}
.toast.show { opacity: 1; transform: translateY(0); }
.global-action-feedback {
  position: fixed;
  right: 22px;
  bottom: 78px;
  z-index: 9999;
  width: min(440px, calc(100vw - 44px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(80, 129, 255, .28);
  border-radius: 12px;
  background: rgba(239, 245, 255, .98);
  color: var(--blue);
  padding: 11px 12px;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: 0 12px 28px rgba(34, 48, 71, .18);
}
.global-action-feedback[data-state="success"] {
  border-color: rgba(35, 180, 132, .28);
  background: rgba(231, 250, 243, .98);
  color: var(--green);
}
.global-action-feedback[data-state="failed"] {
  border-color: rgba(239, 83, 80, .28);
  background: rgba(255, 240, 240, .98);
  color: var(--red);
}
.global-action-feedback button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  color: inherit;
  padding: 6px 9px;
  cursor: pointer;
}
.dialog-feedback {
  margin: 0 0 14px;
  border: 1px solid rgba(110, 134, 178, .24);
  border-radius: 12px;
  background: rgba(245, 248, 255, .96);
  color: var(--ink);
  padding: 10px 12px;
  font-weight: 600;
  line-height: 1.5;
}
.dialog-feedback[data-state="success"] {
  border-color: rgba(35, 180, 132, .28);
  background: rgba(231, 250, 243, .96);
  color: var(--green);
}
.dialog-feedback[data-state="failed"] {
  border-color: rgba(239, 83, 80, .28);
  background: rgba(255, 240, 240, .96);
  color: var(--red);
}
.dialog-feedback[data-state="running"] {
  border-color: rgba(80, 129, 255, .28);
  background: rgba(239, 245, 255, .96);
  color: var(--blue);
}
.settings-save-status {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 600;
}
.settings-save-status[data-state="success"] { color: var(--green); }
.settings-save-status[data-state="failed"] { color: var(--red); }

@media (max-width: 1260px) {
  .login-gate {
    grid-template-columns: 1fr;
    gap: 16px;
    align-content: center;
    padding: 22px;
  }
  .login-panel {
    width: min(100%, 460px);
    justify-self: center;
    padding: 26px;
  }
  .login-mascot-wrap {
    width: min(190px, 22vh, 34vw);
    margin-bottom: 8px;
    border-radius: 26px;
  }
  .login-brand-panel h1 {
    font-size: 30px;
  }
  .login-brand-mark {
    margin: 10px 0 12px;
  }
  .login-access-note {
    font-size: 16px;
  }
  .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .titlebar { left: 220px; }
  .hero-strip { grid-template-columns: minmax(0, 1fr); }
  .hero-mascot { display: none; }
  .today-grid,
  .home-business-grid,
  .sales-alert-cards,
  .stack-list#todayActionList,
  .workbench-grid,
  .module-grid,
  .master-module-grid,
  .operator-create-row,
  .business-first-screen,
  .business-table-grid { grid-template-columns: 1fr; }
  .management-ledger-card { grid-column: span 1; }
  .span-2 { grid-column: span 1; }
  .span-3 { grid-column: span 1; }
  .workflow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-operation-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-workflow { grid-template-columns: 1fr; }
  .rhythm-lanes { grid-template-columns: 1fr; }
  .guide-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .business-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .business-kpi-main { grid-column: span 2; }
  .business-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-followup-row { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .global-action-feedback {
    right: 12px;
    bottom: 70px;
    width: calc(100vw - 24px);
  }
  .login-gate {
    min-height: 100dvh;
    padding: 22px;
  }
  .login-brand-panel h1 {
    font-size: 32px;
  }
  .login-access-note {
    font-size: 16px;
  }
  .login-panel {
    padding: 22px;
    border-radius: 22px;
  }
  .login-panel-head h2 {
    font-size: 24px;
  }
  .login-field input,
  .login-field select {
    height: 52px;
  }
  .login-submit {
    height: 56px;
    font-size: 18px;
  }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding-top: 18px; }
  .workspace { padding: 0 14px 18px; }
  .titlebar {
    position: static;
    left: auto;
    right: auto;
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    gap: 10px;
    padding: 12px 0;
    background: transparent;
    backdrop-filter: none;
  }
  .page-intro { align-items: flex-start; flex-direction: column; height: auto; gap: 10px; padding: 12px 0; }
  .top-actions, .global-operator { width: 100%; }
  .global-operator { grid-template-columns: 1fr; }
  .metric-row, .home-business-grid, .stack-list#todayActionList, .task-summary, .report-grid, .rules-grid, .erp-settings-grid, .erp-settings-layout, .erp-sync-options, .erp-sync-footer, .sales-report-filters, .business-kpi-grid, .business-filters, .business-first-screen, .business-mover-grid { grid-template-columns: 1fr; }
  .compact-page-intro { align-items: flex-start; }
  .business-kpi-main { grid-column: span 1; }
  .backup-actions { grid-template-columns: 1fr; }
  .master-module-card { min-height: 96px; }
  .workflow-head { flex-direction: column; }
  .workflow-head p { text-align: left; }
  .daily-operation-panel .workflow-head { align-items: flex-start; }
  .rhythm-head { flex-direction: column; }
  .rhythm-head p { text-align: left; }
  .workflow-steps { grid-template-columns: 1fr; }
  .daily-operation-steps { grid-template-columns: 1fr; }
  .compact-workflow { grid-template-columns: 1fr; }
  .rhythm-action { grid-template-columns: 1fr; align-items: flex-start; }
  .rhythm-action button { width: 100%; }
  .guide-steps { grid-template-columns: 1fr; }
  .task-workbar { grid-template-columns: 1fr; }
  .task-work-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-work-actions { justify-content: flex-start; }
  .report-readiness { grid-template-columns: 1fr; }
  .report-readiness-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-readiness-actions { justify-content: flex-start; }
  .business-alert-strip,
  .business-alert-row { grid-template-columns: 1fr; align-items: flex-start; }
  .import-health-bar { grid-template-columns: 1fr; }
  .import-health-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .import-health-tabs { justify-content: flex-start; }
  .sales-focus-bar { grid-template-columns: 1fr; }
  .sales-focus-tabs { justify-content: flex-start; }
  .sales-entry { grid-template-columns: 1fr; }
  .daily-followup-row { align-items: flex-start; }
  .platform-sales-row { grid-template-columns: 1fr 1fr; }
  .action-empty { align-items: flex-start; flex-direction: column; }
  .store-owner-row { grid-template-columns: 1fr; }
  .store-owner-head { display: none; }
}

/* petcircle-mobile-emergency */
@media (max-width: 820px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .login-locked {
    overflow-y: auto;
  }

  .login-gate {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 18px 14px;
  }

  .login-mascot-wrap {
    width: min(160px, 42vw, 18vh);
  }

  .login-brand-panel h1 {
    max-width: 100%;
    white-space: normal;
    font-size: 26px;
  }

  .login-panel {
    width: 100%;
    max-width: 420px;
  }

  .app-shell,
  .workspace,
  .page,
  .today-card,
  .simple-panel,
  .panel,
  .subpage-panel,
  .third-level-panel {
    min-width: 0;
    max-width: 100%;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 35;
    height: auto;
    min-width: 0;
    max-width: 100vw;
    padding: 8px 10px 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.9);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(18px);
    overflow: hidden;
  }

  .brand {
    gap: 8px;
    margin-bottom: 8px;
    padding: 0 2px;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .brand-title {
    font-size: 14px;
    line-height: 1.15;
  }

  .brand-subtitle {
    display: none;
  }

  .nav-list {
    display: flex;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: nowrap;
  }

  .nav-item span {
    font-size: 13px;
    font-weight: 700;
  }

  .nav-item em {
    display: none;
  }

  .operator {
    display: none;
  }

  .workspace {
    width: 100%;
    padding: 0 10px 16px;
  }

  .titlebar {
    width: 100%;
    padding: 12px 0;
  }

  .top-actions,
  .download-actions,
  .task-page-actions,
  .hot-conflict-actions,
  .compact-table-actions,
  .review-actions,
  .sales-actions,
  .source-actions,
  .backup-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    min-width: 0;
  }

  .top-actions > *,
  .download-actions > button,
  .task-page-actions > button,
  .hot-conflict-actions > button,
  .compact-table-actions > button {
    min-width: 0;
  }

  .panel-head,
  .dialog-head,
  .compact-page-intro,
  .business-alert-strip,
  .business-alert-row,
  .task-board-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .task-filter-board,
  .task-filter-line,
  .compact-filter-strip,
  .task-filters,
  .bargain-filters.compact-bargain-filters,
  .product-sales-filters,
  .sales-report-filters,
  .business-filters,
  .erp-settings-grid,
  .erp-settings-layout,
  .erp-sync-footer,
  .backup-actions,
  .search-bar,
  .platform-add-row,
  .owner-entry,
  .operator-create-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .task-filter-line input,
  .task-filter-line select,
  .task-filter-line button,
  .task-filter-line #taskStatus,
  .task-filter-line #taskPlatform,
  .task-filter-line #taskStore,
  .task-filter-line #taskUser,
  .task-filter-line #taskType,
  .task-filter-line #taskPriority,
  .task-filter-line #taskSearch,
  .compact-filter-strip input,
  .compact-filter-strip select,
  .compact-filter-strip button,
  .task-filters input,
  .task-filters select,
  .task-filters button,
  .product-sales-filters input,
  .product-sales-filters select,
  .product-sales-filters button,
  .sales-report-filters input,
  .sales-report-filters select,
  .sales-report-filters button {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  .today-grid,
  .home-business-grid,
  .module-grid,
  .workbench-grid,
  .master-module-grid,
  .business-table-grid,
  .rules-grid,
  .erp-latest-grid,
  .business-kpi-grid,
  .metric-row,
  .task-work-metrics,
  .import-health-metrics,
  .report-readiness-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .business-kpi-main,
  .span-2,
  .span-3 {
    grid-column: auto;
  }

  .report-table-wrap,
  .sales-day-wrap,
  .bargain-table-wrap,
  .task-suppression-table-wrap,
  .hot-conflict-table-wrap,
  .overview-table-wrap,
  .business-table-wrap-web,
  .sales-overview-wrap-web {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .task-table {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .report-data-table,
  .dense-task-table,
  .hot-conflict-table,
  .bargain-table,
  .sales-overview-table,
  .business-table,
  .sales-day-table {
    width: max-content;
    min-width: min(980px, 260vw);
  }

  .report-data-table .empty-table-cell {
    min-width: min(520px, 92vw);
  }

  .toast {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
}

@media (max-width: 430px) {
  .nav-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .today-card,
  .simple-panel,
  .panel {
    padding: 14px;
    border-radius: 14px;
  }

  .task-work-metrics,
  .import-health-metrics,
  .report-readiness-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1260px) {
  .overview-card-groups { grid-template-columns: minmax(0, 1fr); }
  .overview-card-group.sales-group,
  .overview-card-group.hot-group,
  .overview-card-group.alert-group { grid-column: 1 / -1; }
  .overview-card-group.sales-group .home-business-grid,
  .overview-card-group.hot-group .home-business-grid { grid-template-columns: minmax(0, 1fr); }
  .overview-card-group.sales-group .home-business-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-card-group.alert-group .sales-alert-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hot-matrix-head,
  .hot-matrix-row { grid-template-columns: minmax(132px, .78fr) repeat(3, minmax(128px, 1fr)); }
  .overview-detail-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-detail-filters #productSalesQuery { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .overview-head-actions { width: 100%; flex-wrap: wrap; }
  .overview-compact-panel { padding: 14px; }
  .overview-compact-panel .panel-head { align-items: flex-start; }
  .overview-compact-panel .panel-head h2 { font-size: 18px; }
  .overview-card-group { padding: 10px; }
  .overview-card-group .home-business-card,
  .overview-card-group .sales-alert-card {
    min-height: 68px;
    padding: 11px;
  }
  .overview-card-group.sales-group .home-business-grid,
  .overview-card-group.alert-group .sales-alert-cards { grid-template-columns: minmax(0, 1fr); }
  .overview-card-group.hot-group .home-business-grid { grid-template-columns: minmax(0, 1fr); }
  .hot-matrix-head { display: none; }
  .hot-matrix-row {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
    border-top: 1px solid var(--line-soft);
  }
  .hot-platform-label {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .overview-card-label,
  .overview-card-group .home-business-card > .overview-card-label,
  .overview-card-group .sales-alert-card > .overview-card-label { font-size: 13px; }
  .overview-number,
  .overview-card-group .home-business-card .overview-number,
  .overview-card-group .sales-alert-card .overview-number { font-size: 24px; }
  .overview-unit,
  .overview-card-group .home-business-card .overview-unit,
  .overview-card-group .sales-alert-card .overview-unit { font-size: 16px; }
  .overview-detail-filters { grid-template-columns: minmax(0, 1fr); }
  .overview-detail-filters #productSalesQuery { grid-column: auto; }
  .overview-detail-table-wrap { min-height: 360px; }
}

/* 长明细表按当前可见位置使用到屏幕底部的剩余高度；短表仍保持自然高度。 */
.viewport-detail-wrap {
  min-height: 0 !important;
  max-height: var(--detail-table-max-height, min(58vh, 620px)) !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
}

.viewport-detail-wrap.viewport-detail-active {
  transform: translateY(var(--detail-table-offset, 0));
  z-index: 6;
  max-height: var(--detail-table-max-height, calc(100dvh - 90px)) !important;
}

/* 销售总览明细按业务维度使用固定列结构，避免切换明细后列宽和内容互相挤压。 */
.overview-detail-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto !important;
  overscroll-behavior-x: contain;
}

.overview-detail-panel {
  min-width: 0;
  overflow-x: clip;
}

.overview-detail-panel > .panel-head,
.overview-detail-panel > .overview-detail-filters,
.overview-detail-panel > .product-sales-updated,
.overview-detail-panel > .overview-detail-table-wrap {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.overview-detail-table.resizable-data-table {
  width: max-content;
  min-width: max-content;
  table-layout: fixed;
}

.overview-detail-table.resizable-data-table th,
.overview-detail-table.resizable-data-table td {
  max-width: 10em !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1500px) {
  .overview-detail-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.overview-detail-table th,
.overview-detail-table td {
  box-sizing: border-box;
  max-width: none;
  vertical-align: middle;
}

.overview-detail-table td {
  min-height: 0;
  white-space: nowrap;
}

.overview-detail-table td.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.overview-detail-table .detail-main {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-long-preview {
  display: block;
  overflow: hidden;
  color: #475569;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-long-empty {
  color: var(--muted);
}

.overview-long-detail {
  min-width: 0;
  color: #475569;
}

.overview-long-detail summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
  cursor: pointer;
  list-style: none;
}

.overview-long-detail summary::-webkit-details-marker {
  display: none;
}

.overview-long-detail summary em {
  color: #2563eb;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.overview-long-detail[open] summary em {
  font-size: 0;
}

.overview-long-detail[open] summary em::after {
  content: "收起";
  font-size: 12px;
}

.overview-long-full {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: normal;
}

.overview-detail-table .sales-alert-badges {
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

/* 销量填报中的每日销量与 Temu 品质分是并列工作流，原销量结构保持不动。 */
.sales-workspace-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
}
.sales-workspace-tabs .segment {
  min-width: 112px;
}
.sales-workspace-tabs b {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: 5px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: #fff1f2;
  color: #dc2626;
  font-size: 12px;
}
.sales-workspace-module.hidden {
  display: none;
}
.sales-temu-quality-module {
  display: grid;
  gap: 12px;
  font-family: var(--font-sans);
  font-synthesis: none;
  font-size: 14px;
  line-height: 1.5;
}
.sales-temu-quality-module h2 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}
.sales-temu-quality-module button,
.sales-temu-quality-module input,
.sales-temu-quality-module select {
  font-family: inherit;
  font-weight: 600;
}
.sales-temu-quality-module .sales-temu-quality-toolbar > span {
  font-size: 13px;
  font-weight: 400;
}
.sales-temu-quality-module .sales-temu-quality-summary span {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}
.sales-temu-quality-module .sales-temu-quality-summary strong {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
}
.quality-reminder-chip {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid #f3c279;
  border-radius: 999px;
  background: #fff8eb;
  color: #a85b00;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.quality-reminder-chip.passive {
  cursor: default;
}
#salesTemuQualityTable {
  font-family: inherit;
  font-size: 14px;
}
#salesTemuQualityTable th {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: middle;
}
#salesTemuQualityTable td {
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  vertical-align: middle;
}
#salesTemuQualityTable td strong,
#salesTemuQualityTable .detail-main,
#salesTemuQualityTable .quality-status {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
#salesTemuQualityTable td small {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}
#salesTemuQualityTable .quality-score {
  font-size: 14px;
  font-weight: 700;
}
#salesTemuQualityTable .direct-skc-copy {
  font-size: 14px;
  font-weight: 400;
}
.sales-temu-quality-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.sales-temu-quality-toolbar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.sales-temu-quality-toolbar input,
.sales-temu-quality-toolbar select {
  width: 100%;
  height: 40px;
  border-radius: 10px;
}
.sales-temu-quality-toolbar > span {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
}
.quality-entry-launch-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}
.quality-entry-launch-card strong {
  font-size: 16px;
}
.quality-entry-launch-card p {
  margin: 5px 0 0;
  color: var(--muted);
}
.temu-quality-entry-dialog {
  display: flex;
  flex-direction: column;
  width: min(1380px, calc(100vw - 32px));
  height: min(900px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
  padding: 18px;
  font-family: var(--font-sans);
  font-synthesis: none;
  font-size: 14px;
  line-height: 1.5;
}
.temu-quality-entry-dialog h2 {
  font-weight: 700;
}
.temu-quality-entry-dialog button,
.temu-quality-entry-dialog input,
.temu-quality-entry-dialog select,
.temu-quality-entry-dialog textarea {
  font-family: inherit;
}
.temu-quality-entry-dialog button {
  font-weight: 600;
}
.temu-quality-entry-dialog > .dialog-head {
  flex: 0 0 auto;
}
.quality-dialog-context {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(320px, 420px);
  align-items: end;
  gap: 28px;
  margin: 14px 0 16px;
  padding: 16px 20px;
  border: 1px solid #dce4f2;
  border-radius: 12px;
  background: #fbfcff;
}
.quality-dialog-context label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.quality-dialog-context label > span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.quality-dialog-context input,
.quality-dialog-context select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.quality-dialog-context select {
  cursor: pointer;
}
.quality-dialog-workspace {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 16px;
}
.quality-entry-pane,
.quality-results-pane {
  min-height: 0;
  border: 1px solid #dce4f2;
  border-radius: 12px;
  background: #fff;
}
.quality-entry-pane {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: #fbfcff;
}
.quality-entry-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 10px;
  background: #f1f4fa;
}
.quality-entry-mode-tabs .segment {
  min-height: 38px;
  border: 0;
  box-shadow: none;
}
.quality-entry-mode-tabs .segment.active {
  color: #315fcb;
  background: #fff;
  box-shadow: 0 4px 12px rgba(61, 84, 130, .08);
}
.quality-single-panel,
.quality-batch-panel {
  min-height: 0;
  flex: 1 1 auto;
  margin-top: 16px;
}
.quality-single-panel {
  display: flex;
  flex-direction: column;
}
.quality-single-panel label,
.quality-batch-head label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.quality-single-panel input {
  width: 100%;
  height: 48px;
  margin-top: 10px;
  border: 1px solid #cfd9e8;
  border-radius: 10px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  font-size: 17px;
  font-weight: 700;
}
.quality-single-panel > .primary-button,
.quality-batch-panel > .primary-button {
  width: 100%;
  min-height: 48px;
  margin-top: auto;
}
.quality-batch-panel {
  display: flex;
  flex-direction: column;
}
.quality-batch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.quality-batch-panel textarea {
  box-sizing: border-box;
  min-height: 0;
  flex: 1 1 auto;
  width: 100%;
  margin-top: 10px;
  resize: none;
  border: 1px solid #cfd9e8;
  border-radius: 10px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  font: 700 15px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  outline: none;
}
.quality-single-panel input:focus,
.quality-batch-panel textarea:focus {
  border-color: #8b78ef;
  box-shadow: 0 0 0 3px rgba(139, 120, 239, .11);
}
.quality-batch-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.quality-results-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.quality-results-pane .quality-draft-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  margin: 0;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.quality-draft-head > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.quality-draft-head span {
  color: var(--muted);
  font-size: 12px;
}
.quality-dialog-preview {
  min-height: 0;
  flex: 1 1 auto;
  max-height: none;
  margin: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
}
.quality-dialog-actions {
  flex: 0 0 auto;
  min-height: 68px;
  margin-top: 12px;
  padding: 12px 0 0;
  background: #fff;
}
.quality-dialog-actions > div {
  display: flex;
  gap: 8px;
}
.quality-record-type {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.quality-record-type.new {
  background: #fff1f2;
  color: #dc2626;
}
.quality-record-type.historical {
  background: #fff7ed;
  color: #b45309;
}
.quality-record-type.handled {
  background: #ecfdf5;
  color: #047857;
}
.quality-preview-row-note.online {
  color: var(--red);
}
.quality-preview-row-note.suspected {
  color: #b45309;
}
.quality-preview-row-note.handled {
  color: var(--green);
}
.quality-preview-actions .quality-confirm-off {
  min-height: 30px;
  padding: 5px 9px;
}
.sales-temu-quality-entry .temu-quality-entry-grid {
  padding-top: 4px;
}
.sales-temu-quality-entry .temu-quality-paste-field textarea {
  min-height: 128px;
}
.sales-temu-quality-entry .temu-quality-entry-actions {
  align-items: center;
}
.sales-temu-quality-entry .temu-quality-entry-actions > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}
.temu-quality-submit-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--line-soft);
}
.temu-quality-submit-row > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}
.quality-preview-table {
  width: 100%;
  border-collapse: collapse;
}
.quality-preview-table th,
.quality-preview-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}
.quality-preview-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted);
  background: #f8faff;
  font-size: 12px;
}
.quality-preview-table td {
  font-size: 13px;
}
.quality-preview-table input {
  width: 84px;
  height: 34px;
}
.quality-preview-product {
  display: grid;
  grid-template-columns: 48px minmax(120px, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 210px;
}
.quality-preview-product > span {
  display: grid;
  gap: 3px;
}
.quality-preview-product .product-thumbnail,
.quality-preview-product .product-thumbnail-shell {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}
.quality-preview-product small {
  color: var(--muted);
}
.quality-preview-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.quality-preview-actions .tool-button {
  min-height: 30px;
  padding: 5px 8px;
}
.quality-preview-row-note {
  color: var(--muted);
  font-size: 12px;
}
.quality-preview-row-note.pending {
  color: #b45309;
}
.quality-preview-row-note.data-pending {
  color: var(--red);
}

@media (max-width: 1260px) {
  .overview-detail-table.resizable-data-table {
    min-width: max-content;
  }
}

@media (max-width: 980px) {
  .overview-card-group.alert-group .sales-alert-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-quality-toolbar,
  .sales-temu-quality-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-quality-summary,
  .sales-temu-quality-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quality-preview-list {
    overflow-x: auto;
  }
  .quality-preview-table {
    min-width: 900px;
  }
  .quality-entry-launch-card,
  .temu-quality-submit-row {
    align-items: stretch;
    flex-direction: column;
  }
  .temu-quality-entry-dialog {
    height: calc(100vh - 20px);
    max-height: calc(100vh - 20px);
    overflow: auto;
  }
  .quality-dialog-context {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .quality-dialog-workspace {
    flex: 0 0 auto;
    grid-template-columns: 1fr;
  }
  .quality-entry-pane {
    min-height: 430px;
  }
  .quality-results-pane {
    min-height: 480px;
  }
}

/* 说明文字统一挂在页面最外层，避免被卡片、表格、弹窗或滚动容器裁切。 */
.keyword-help::after,
.quotation-help::after,
.info-dot::after,
.production-help-tip .production-help-popover {
  display: none !important;
}

.global-keyword-tooltip {
  position: fixed;
  z-index: 2147483647;
  top: 0;
  left: 0;
  box-sizing: border-box;
  width: max-content;
  max-width: min(320px, calc(100vw - 24px));
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(23, 36, 58, 0.96);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  opacity: 0;
  overflow-wrap: anywhere;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: normal;
}

.global-keyword-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.global-keyword-tooltip[hidden] {
  display: none;
}

/* 全系统字体规范：Windows 与 macOS 使用稳定的中文字体，并限制为三档字重。 */
.app-shell,
.login-gate,
.dialog-backdrop,
.business-copy-menu,
.global-keyword-tooltip {
  font-family: var(--font-sans);
  font-synthesis: none;
}

.report-data-table,
.task-table .task-row,
.source-table .table-row,
.store-owner-table .store-owner-row {
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  line-height: 1.45;
}

.report-data-table th,
.report-data-table td,
.task-table .task-row > *,
.source-table .table-row > *,
.store-owner-table .store-owner-row > * {
  font-size: var(--font-size-body);
  line-height: 1.45;
}

small,
.detail-sub,
.data-missing,
.table-preference-status,
.operator-role,
.brand-subtitle,
.nav-item em {
  font-size: var(--font-size-note);
  font-weight: var(--font-weight-regular);
  line-height: 1.4;
}

.report-data-table th,
.task-table .task-head > *,
.source-table .table-head > *,
.store-owner-table .store-owner-head > *,
label,
button {
  font-weight: var(--font-weight-medium);
}

.page button,
.page input,
.page select,
.page textarea,
.dialog-backdrop button,
.dialog-backdrop input,
.dialog-backdrop select,
.dialog-backdrop textarea {
  font-size: var(--font-size-body) !important;
}

.page h2,
.dialog-backdrop h2 {
  font-size: 20px;
  line-height: 1.4;
}

.page h3,
.dialog-backdrop h3 {
  font-size: 16px;
  line-height: 1.4;
}

h1,
h2,
.brand-title {
  font-weight: var(--font-weight-bold);
}

h3,
.panel-head strong {
  font-weight: 600;
}

.detail-main,
.report-data-table td strong,
.report-data-table .strong {
  font-weight: var(--font-weight-medium);
}

.nav-item span {
  font-weight: var(--font-weight-medium);
}

.eyebrow {
  font-size: var(--font-size-note);
  font-weight: var(--font-weight-medium);
}

.metric-card span,
.business-kpi span,
.report-summary-strip span,
.source-retention,
.source-action-note,
.upload-step span,
.upload-step small,
.business-mover-note,
.business-mover-row span,
.business-mover-row small {
  font-size: var(--font-size-note);
  font-weight: var(--font-weight-regular);
  line-height: 1.45;
}

.report-data-table td {
  font-weight: var(--font-weight-regular);
}

.metric-card strong,
.business-kpi strong {
  font-weight: 600;
}

.num,
[data-skc-copy],
.detail-main,
.metric-card strong,
.business-kpi strong {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .task-filter-line,
  .production-filter-strip,
  .bargain-filters.compact-bargain-filters,
  #bargainLookupControls,
  .suppression-compact-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .task-filter-line input,
  .task-filter-line select,
  .task-filter-line button,
  .production-filter-strip input,
  .production-filter-strip select,
  .production-filter-strip button,
  .bargain-filters.compact-bargain-filters input,
  .bargain-filters.compact-bargain-filters select,
  .bargain-filters.compact-bargain-filters button,
  #bargainLookupControls input,
  #bargainLookupControls select,
  #bargainLookupControls button,
  .suppression-compact-filters input,
  .suppression-compact-filters select,
  .suppression-compact-filters button {
    width: 100%;
    min-width: 0;
  }
  .task-filter-line #taskSearch,
  .production-filter-strip #productionSearch,
  #bargainLookupControls input,
  .bargain-filters.compact-bargain-filters input,
  .suppression-compact-filters input,
  .unified-toolbar-actions {
    grid-column: 1 / -1;
  }
  .unified-toolbar-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
  #bargainLookupControls .bargain-product-entry {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bargain-owner-note-field {
    grid-column: 1 / -1;
  }
  .bargain-product-entry-label,
  #bargainLookupControls .bargain-product-entry button {
    grid-column: 1 / -1;
  }
  .task-pagination-compact {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .task-filter-line,
  .production-filter-strip,
  .bargain-filters.compact-bargain-filters,
  #bargainLookupControls,
  .suppression-compact-filters {
    grid-template-columns: minmax(0, 1fr);
  }
  #bargainLookupControls .bargain-product-entry {
    grid-template-columns: minmax(0, 1fr);
  }
  .bargain-product-entry-label,
  .bargain-owner-note-field,
  #bargainLookupControls .bargain-product-entry button {
    grid-column: auto;
  }
}

/* 生产协同总览：提升 Windows 下的可读性，并避免筛选区拥挤溢出。 */
.production-page-tools {
  flex-wrap: wrap;
  gap: 8px;
}
.production-page-tools .tool-button {
  height: 38px;
  padding: 0 13px;
  font-size: 14px;
  font-weight: 600;
}
.production-module-cards {
  gap: 12px;
  margin: 16px 0;
}
.production-module-card {
  min-height: 76px;
  padding: 14px 16px;
}
.production-module-card .production-module-label {
  font-size: 16px;
  line-height: 1.35;
}
.production-module-card .production-module-help {
  flex-basis: 17px;
}
.production-module-card strong {
  font-size: 21px;
  font-weight: 700;
}
.production-module-card strong.data-pending {
  font-size: 16px;
  font-weight: 600;
}
.production-module-card small {
  font-size: 14px;
  line-height: 1.4;
}
.production-filter-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  overflow: visible;
}
.production-filter-strip > select {
  flex: 1 1 132px;
  width: auto;
  max-width: 190px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
}
.production-filter-strip #productionCategoryFilter {
  flex-basis: 140px;
}
.production-filter-strip #productionSearch {
  flex: 2 1 250px;
  width: auto;
  min-width: 220px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
}
.production-filter-strip > button,
.production-filter-strip > .unified-toolbar-actions > .task-batch-menu > summary {
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
}
.production-filter-strip .compact-check-filter {
  flex: 1 1 160px;
  max-width: 210px;
  height: 40px;
}
.production-filter-strip .compact-check-filter > summary {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 30px 0 12px;
  font-size: 14px;
}
.production-filter-strip .compact-check-filter > summary::after {
  top: 11px;
  right: 11px;
}
.production-filter-strip .compact-check-filter-menu {
  top: 44px;
  width: 196px;
}
.production-filter-strip .compact-check-filter-menu label {
  min-height: 34px;
  font-size: 14px;
}
.production-filter-strip .unified-toolbar-actions {
  flex: 1 0 100%;
  width: 100%;
  min-height: 40px;
  margin-left: 0;
  justify-content: flex-end;
}
.production-filter-strip .unified-selection-hint {
  font-size: 14px;
}
.production-filter-strip .task-batch-menu-panel .tool-button,
.production-filter-strip .task-batch-menu-panel .ghost-button,
.production-filter-strip .task-batch-menu-panel .primary-button {
  min-height: 38px;
  height: auto;
  padding: 7px 11px;
  font-size: 14px;
}

@media (max-width: 760px) {
  .production-filter-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .production-filter-strip > select,
  .production-filter-strip .compact-check-filter,
  .production-filter-strip #productionSearch {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .production-filter-strip #productionSearch,
  .production-filter-strip .unified-toolbar-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 460px) {
  .production-filter-strip {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 销售总览“全部增长发现”：筛选和明细保持 Windows 可读字号。 */
.overview-detail-filters input,
.overview-detail-filters select {
  font-size: var(--font-size-body) !important;
  font-weight: var(--font-weight-regular);
  line-height: 1.4;
}

.overview-detail-filters button {
  font-size: var(--font-size-body) !important;
  font-weight: var(--font-weight-medium);
  line-height: 1.4;
}

.overview-detail-panel .product-sales-updated,
.overview-detail-table .detail-sub,
.overview-detail-table .detail-metrics span,
.overview-detail-table .detail-reason,
.overview-detail-table .internal-reference-detail,
.overview-detail-table .overview-long-preview,
.overview-detail-table .overview-long-detail,
.overview-detail-table .overview-long-detail summary em,
.overview-detail-table .sales-alert-badge {
  font-size: var(--font-size-note);
  font-weight: var(--font-weight-regular);
  line-height: 1.45;
}

.overview-detail-table th,
.overview-detail-table td,
.overview-detail-table .detail-main,
.overview-detail-table .detail-metrics strong {
  font-size: var(--font-size-body);
  line-height: 1.45;
}

.overview-detail-table th,
.overview-detail-table .detail-main,
.overview-detail-table .detail-metrics strong {
  font-weight: var(--font-weight-medium);
}

.overview-detail-table td {
  font-weight: var(--font-weight-regular);
}

.overview-detail-table .sales-alert-badge {
  font-weight: var(--font-weight-medium);
}

.overview-detail-table .overview-long-detail[open] summary em {
  font-size: 0;
}

.overview-detail-table .overview-long-detail[open] summary em::after {
  font-size: var(--font-size-note);
}
.production-size-detail-row.factory-risk-owed > td { background: #fee4e2; color: #9f1b12; }
.production-size-detail-row.factory-risk-out > td { background: #fde7d2; color: #a94b11; }
.production-size-detail-row.factory-risk-d3 > td { background: #fff0b8; color: #8a5a00; }
.production-size-detail-row.factory-risk-d7 > td { background: #fff4cc; color: #8a5a00; }
.production-size-detail-row.factory-risk-d14 > td { background: #e8f2ff; color: #24538a; }
.production-size-detail-row.factory-risk-safe > td { background: #e8f7ee; color: #17633a; }
.production-size-detail-row.factory-risk-pending > td { background: #eef1f5; color: #5f6b7a; }

/* Windows 全版面清晰度：参照旺店通的深色正文、清楚表头和明确菜单。Mac 不进入此作用域。 */
html.os-windows {
  --ui-color-title: #1f2329;
  --ui-color-text: #1f2329;
  --ui-color-muted: #4e5969;
  --ui-color-placeholder: #86909c;
  --ui-color-border: #e5e6eb;
  --ui-color-control-border: #c9cdd4;
  --ui-color-primary: #3370e5;
  --ui-color-primary-strong: #174ea6;
  --ui-color-primary-soft: #f2f7ff;
  --ui-font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

html.os-windows body,
html.os-windows .app-shell,
html.os-windows .login-gate,
html.os-windows .dialog-backdrop,
html.os-windows .business-copy-menu,
html.os-windows .global-keyword-tooltip {
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  font-synthesis: none;
  -webkit-font-smoothing: auto;
  text-rendering: auto;
}

html.os-windows .global-keyword-tooltip {
  border-color: rgba(255, 255, 255, 0.2);
  background: #17243a;
  color: #ffffff;
}

html.os-windows h1,
html.os-windows h2,
html.os-windows h3,
html.os-windows .panel-head strong,
html.os-windows .brand-title,
html.os-windows .dialog-head strong {
  color: var(--ui-color-title);
}

html.os-windows h1,
html.os-windows h2,
html.os-windows .brand-title {
  font-weight: 700;
}

html.os-windows h3,
html.os-windows .panel-head strong,
html.os-windows .dialog-head strong {
  font-weight: 600;
}

html.os-windows input,
html.os-windows select,
html.os-windows textarea {
  color: var(--ui-color-text);
  border-color: var(--ui-color-control-border);
  font-family: var(--font-sans);
  font-size: 14px !important;
  font-weight: 400;
  line-height: 1.45;
}

html.os-windows button:not(.keyword-help):not(.quotation-help):not(.info-dot):not(.task-metric-help) {
  font-family: var(--font-sans);
  font-size: 14px !important;
  font-weight: 500;
  line-height: 1.4;
}

html.os-windows input::placeholder,
html.os-windows textarea::placeholder {
  color: var(--ui-color-placeholder);
  opacity: 1;
}

html.os-windows label {
  color: var(--ui-color-title);
  font-size: 14px;
  font-weight: 500;
}

/* 商品任务筛选栏：Windows 使用更大、更深的文字，Mac 保持原样式。 */
html.os-windows #tasksPage .task-filter-line input,
html.os-windows #tasksPage .task-filter-line select,
html.os-windows #tasksPage .task-filter-line button,
html.os-windows #tasksPage .suppression-compact-filters input,
html.os-windows #tasksPage .suppression-compact-filters select,
html.os-windows #tasksPage .suppression-compact-filters button,
html.os-windows #tasksPage .clearance-category-quick-cards button,
html.os-windows #tasksPage .listing-platform-quick-cards button {
  min-height: 34px;
  color: var(--ui-color-title);
  font-size: 15px !important;
  font-weight: 600;
}

html.os-windows #tasksPage .task-filter-line input::placeholder,
html.os-windows #tasksPage .suppression-compact-filters input::placeholder {
  color: #5f6b7a;
  opacity: 1;
}

html.os-windows small,
html.os-windows .muted,
html.os-windows .muted-row,
html.os-windows .detail-sub,
html.os-windows .data-missing,
html.os-windows .product-sales-updated,
html.os-windows .overview-group-time,
html.os-windows .table-preference-status,
html.os-windows .source-retention,
html.os-windows .source-action-note,
html.os-windows .empty-state,
html.os-windows .operator-role,
html.os-windows .brand-subtitle {
  color: var(--ui-color-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

html.os-windows table,
html.os-windows .task-table,
html.os-windows .source-table,
html.os-windows .store-owner-table,
html.os-windows .matrix-placeholder,
html.os-windows .import-matrix {
  color: var(--ui-color-text);
  font-family: var(--font-sans);
  font-size: 14px;
}

html.os-windows th,
html.os-windows .task-table .task-head,
html.os-windows .source-table .table-head,
html.os-windows .store-owner-table .store-owner-head {
  color: var(--ui-color-title);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

html.os-windows td,
html.os-windows .task-table .task-row:not(.task-head),
html.os-windows .source-table .table-row:not(.table-head),
html.os-windows .store-owner-table .store-owner-row:not(.store-owner-head) {
  color: var(--ui-color-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

html.os-windows td strong,
html.os-windows .detail-main,
html.os-windows .strong {
  color: var(--ui-color-text);
  font-weight: 500;
}

html.os-windows .sidebar {
  border-right: 1px solid rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .76);
  box-shadow: 6px 0 18px rgba(31, 35, 41, .035);
  backdrop-filter: blur(22px);
}

html.os-windows .brand-title {
  font-size: 17px;
  line-height: 1.25;
}

html.os-windows .brand-subtitle {
  margin-top: 3px;
}

html.os-windows .nav-list {
  min-height: 0;
  align-content: start;
  gap: 4px;
  padding: 2px 0 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: auto;
}

html.os-windows .nav-item {
  display: flex;
  min-height: 40px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ui-color-text);
  background: transparent;
  box-shadow: none;
}

html.os-windows .nav-item span {
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

html.os-windows .nav-item em {
  display: none;
}

html.os-windows .nav-item:hover:not(.active) {
  border-color: transparent;
  background: var(--ui-color-primary-soft);
  color: var(--ui-color-primary-strong);
}

html.os-windows .nav-item.active {
  border-color: transparent;
  background: var(--ui-color-primary);
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(51, 112, 229, .22);
}

html.os-windows .nav-item.active em {
  color: rgba(255, 255, 255, .92);
}

html.os-windows .operator-name {
  color: var(--ui-color-text);
  font-size: 14px;
  font-weight: 600;
}

html.os-windows .eyebrow {
  color: var(--ui-color-muted);
  font-size: 13px;
  font-weight: 500;
}

html.os-windows .titlebar h1 {
  color: var(--ui-color-title);
  font-size: 22px;
  font-weight: 700;
}
.unified-task-size-popover {
  width: min(1500px, calc(100vw - 16px));
  max-height: min(760px, calc(100vh - 16px));
  overflow: hidden;
}
.platform-stock-identity-cell {
  min-width: 188px;
}
.platform-stock-size-link {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ui-color-primary);
  font-family: var(--ui-font-family);
  font-size: var(--ui-font-size-note);
  font-weight: var(--ui-font-weight-semibold);
  cursor: pointer;
}
.platform-stock-size-link:hover,
.platform-stock-size-link:focus-visible {
  color: var(--ui-color-primary-strong);
  text-decoration: underline;
}
.platform-stock-size-popover {
  width: min(1220px, calc(100vw - 24px));
  max-height: min(700px, calc(100vh - 24px));
}
.platform-stock-size-head {
  padding: 12px 14px;
}
.platform-stock-size-head > div:first-child {
  gap: 3px;
}
.platform-stock-size-head > .sales-detail-product-head {
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.sales-detail-product-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.sales-detail-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}
.platform-stock-size-head strong {
  color: var(--ui-color-title);
  font-size: var(--ui-font-size-section-title);
  font-weight: var(--ui-font-weight-bold);
}
.platform-stock-size-product {
  color: var(--ui-color-text);
  font-size: var(--ui-font-size-body);
  font-weight: var(--ui-font-weight-semibold);
}
.platform-stock-size-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.platform-stock-size-summary > span {
  padding: 4px 10px;
  border: 1px solid var(--ui-color-border);
  border-radius: 8px;
  color: var(--ui-color-text);
  font-size: var(--ui-font-size-note);
  font-weight: var(--ui-font-weight-medium);
}
.platform-stock-size-summary > span.is-danger,
.platform-stock-negative {
  color: var(--ui-color-danger);
  font-weight: var(--ui-font-weight-semibold);
}
.platform-stock-size-popover .unified-size-table-wrap {
  max-height: min(510px, calc(100vh - 174px));
}
.platform-stock-size-popover .production-size-detail-grid.grouped-business-table {
  min-width: 0;
}
.platform-stock-size-popover td.platform-stock-size-product-image {
  width: 64px;
  min-width: 64px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.platform-stock-size-product-image .erp-outbound-thumb,
.platform-stock-size-product-image .erp-outbound-image-empty,
.platform-stock-size-product-image .erp-image-read-failed {
  width: 48px;
  height: 48px;
}
.unified-size-table-wrap {
  max-height: min(640px, calc(100vh - 122px));
  overflow: auto;
}
.unified-size-table-wrap > .table-preference-controls {
  position: sticky;
  top: 0;
  z-index: 8;
}
.production-size-detail-grid.grouped-business-table {
  width: max-content;
  min-width: 0;
  max-width: none;
  margin: 0;
  table-layout: fixed;
}
.grouped-business-table th,
.grouped-business-table td {
  min-width: 104px;
  max-width: none;
  padding: 7px 8px;
  font-size: 14px;
  line-height: 1.35;
}
.grouped-business-table td.global-row-number {
  min-width: 52px;
  width: 52px;
  color: var(--ui-color-primary);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
}
.grouped-business-table .size-detail-group-row th {
  position: sticky;
  top: 39px;
  z-index: 4;
  border-right: 2px solid var(--ui-color-border);
  background: var(--ui-color-primary-soft);
  color: var(--ui-color-title);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.grouped-business-table .production-size-detail-header tr:last-child th {
  top: 72px;
  z-index: 3;
  background: #fff;
  color: var(--ui-color-text);
  font-size: 14px;
  font-weight: 600;
}
.task-size-selection-summary {
  min-height: 40px;
  padding: 10px 12px;
  overflow-x: auto;
  border-top: 1px solid var(--ui-color-border);
  background: #f8fafc;
  color: var(--ui-color-text);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.unified-production-size-popover {
  display: flex;
  width: min(1480px, calc(100vw - 32px));
  min-width: min(760px, calc(100vw - 32px));
  height: min(780px, calc(100dvh - 32px));
  min-height: min(540px, calc(100dvh - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  flex-direction: column;
  overflow: hidden;
}
.production-size-context {
  min-height: 32px;
  padding: 6px 10px;
  overflow: hidden;
  border-bottom: 1px solid var(--ui-color-border);
  background: var(--ui-color-primary-soft);
  color: var(--ui-color-text);
  font-size: var(--ui-font-size-note);
  font-weight: var(--ui-font-weight-medium);
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.production-size-stack {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-rows: minmax(150px, .5fr) 12px minmax(150px, .5fr);
  padding: 8px 8px 0;
  background: #f8fafc;
}
.task-listing-size-data-popover .production-size-stack {
  grid-template-rows: minmax(0, 1fr);
}
.production-size-data-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ui-color-border);
  border-radius: 9px;
  background: #fff;
}
.production-size-data-panel.is-active {
  border-color: var(--ui-color-primary);
  box-shadow: 0 0 0 1px rgba(60, 125, 255, .08);
}
.production-size-data-panel-head {
  display: flex;
  min-height: 36px;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid var(--ui-color-border);
  background: #fff;
}
.unified-production-size-popover .production-size-popover-head,
.unified-production-size-popover .production-size-context,
.unified-production-size-popover .task-size-selection-summary {
  flex: 0 0 auto;
}
.production-size-data-panel-head strong {
  overflow: hidden;
  color: var(--ui-color-title);
  font-size: var(--ui-font-size-body);
  font-weight: var(--ui-font-weight-semibold);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.production-size-splitter {
  position: relative;
  display: flex;
  min-height: 12px;
  align-items: center;
  justify-content: center;
  color: var(--ui-color-muted);
  cursor: row-resize;
  touch-action: none;
  user-select: none;
}
.production-size-splitter::before {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--ui-color-border);
}
.production-size-splitter span {
  position: relative;
  z-index: 1;
  padding: 0 8px;
  background: #f8fafc;
  color: var(--ui-color-muted);
  font-size: var(--ui-font-size-caption);
  font-weight: var(--ui-font-weight-medium);
  line-height: 1;
  opacity: 0;
  transition: opacity .12s ease;
}
.production-size-splitter:hover span,
.production-size-splitter:focus-visible span,
.production-size-splitter.is-dragging span {
  opacity: 1;
}
.production-size-splitter:focus-visible {
  outline: 2px solid var(--ui-color-primary);
  outline-offset: -2px;
}
.production-unified-size-table-wrap {
  height: auto;
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}
.production-size-detail-grid.unified-production-size-grid {
  width: max-content;
  min-width: 0;
  max-width: none;
}

.unified-production-size-popover .production-size-detail-header tr:last-child th:first-child,
.unified-production-size-popover .unified-production-size-grid td:first-child {
  position: sticky;
  left: 0;
  z-index: 6;
  min-width: 52px;
  width: 52px;
  background: #fff;
}

.unified-production-size-popover .production-size-detail-header tr:last-child th:nth-child(2),
.unified-production-size-popover .unified-production-size-grid td:nth-child(2) {
  position: sticky;
  left: 52px;
  z-index: 5;
  background: #fff;
  box-shadow: 1px 0 0 var(--ui-color-border);
}

.unified-production-size-popover .production-size-detail-header tr:last-child th:first-child,
.unified-production-size-popover .production-size-detail-header tr:last-child th:nth-child(2) {
  z-index: 9;
}

#productionCoordinationTable[data-preference-key="production-factory:v3"] {
  min-width: 1460px;
}

#productionCoordinationTable[data-preference-key="production-factory:v3"] th,
#productionCoordinationTable[data-preference-key="production-factory:v3"] td {
  vertical-align: middle;
}

#productionCoordinationTable[data-preference-key="production-factory:v3"] .dispatch-cell-detail {
  display: block;
  margin-top: 4px;
  white-space: normal;
}
.unified-production-size-grid th,
.unified-production-size-grid td {
  min-width: 0;
  max-width: none;
  padding: 6px 8px;
  overflow: hidden;
  font-size: var(--ui-font-size-body);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.unified-production-size-grid td.global-row-number {
  min-width: 46px;
  width: 46px;
}
.unified-production-size-grid .size-detail-group-row th,
.unified-production-size-grid .production-size-detail-header tr:last-child th {
  font-size: var(--ui-font-size-body);
}
.production-size-tabbar {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--ui-color-border);
  background: #fff;
}
.production-size-tabs {
  display: flex;
  gap: 4px;
}
.production-size-tabs button {
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--ui-color-border);
  border-radius: 7px;
  background: #fff;
  color: var(--ui-color-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.production-size-tabs button[aria-selected="true"] {
  border-color: var(--ui-color-primary);
  background: var(--ui-color-primary-soft);
  color: var(--ui-color-primary);
  font-weight: 600;
}

@media (max-width: 980px), (max-height: 680px) {
  .unified-production-size-popover {
    width: calc(100vw - 16px);
    min-width: 0;
    height: calc(100dvh - 16px);
    min-height: 0;
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
  .unified-production-size-popover .production-size-popover-head {
    align-items: flex-start;
  }
  .unified-production-size-popover .production-size-popover-actions {
    max-width: 68%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .production-size-stack {
    padding: 6px 6px 0;
  }
}

html.os-windows .unified-production-size-grid th,
html.os-windows .unified-production-size-grid td {
  padding-right: 9px;
  padding-left: 9px;
  line-height: 1.45;
}
html.os-windows .unified-production-size-popover .production-unified-size-table-wrap {
  overscroll-behavior: contain;
}
.sales-alert-size-popover.unified-production-size-popover {
  width: min(1120px, calc(100vw - 32px));
  min-width: min(760px, calc(100vw - 32px));
  height: min(720px, calc(100dvh - 32px));
  min-height: min(640px, calc(100dvh - 32px));
}
.sales-alert-size-popover .production-size-stack {
  padding-top: 6px;
}
.sales-size-compact-panel .production-size-data-panel-head {
  min-height: 30px;
  padding-top: 4px;
  padding-bottom: 4px;
}
.sales-size-compact-panel .table-preference-controls {
  min-height: 34px;
  padding-top: 3px;
  padding-bottom: 3px;
}
.sales-size-compact-grid th,
.sales-size-compact-grid td {
  height: 30px;
  padding-top: 4px;
  padding-bottom: 4px;
}
.sales-size-compact-grid .production-size-detail-header tr:last-child th {
  top: 34px;
}
.sales-size-selection-summary {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding-top: 5px;
  padding-bottom: 5px;
}
.shein-product-toolbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, .5fr)) minmax(0, 1.35fr) auto;
  gap: 8px;
  align-items: center;
}
.shein-product-toolbar select,
.shein-product-toolbar input,
.shein-product-toolbar button {
  min-height: 40px;
  font-size: var(--ui-font-size-body);
}
.temu-focus-toolbar {
  grid-template-columns: repeat(3, minmax(0, .7fr)) minmax(220px, 1.5fr) auto;
}
.shein-product-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.temu-focus-kpi {
  min-height: 166px;
}
.temu-focus-kpi-note {
  margin-bottom: 10px;
}
.temu-focus-trend-list {
  display: grid;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid var(--ui-color-border);
}
.temu-focus-trend {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--ui-color-muted);
  font-size: var(--ui-font-size-caption);
  line-height: 1.35;
}
.temu-focus-trend b {
  flex: none;
  font-weight: 700;
}
.temu-focus-trend span {
  overflow: hidden;
  font-size: inherit;
  font-weight: 500;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.temu-focus-trend.is-up b { color: var(--ui-color-success); }
.temu-focus-trend.is-down b { color: var(--ui-color-danger); }
.shein-product-module,
.shein-product-filter-panel,
.shein-product-table-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.shein-product-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: calc(100dvh - 390px);
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}
.shein-product-table {
  width: max-content;
  min-width: 100%;
}
.shein-product-table th,
.shein-product-table td {
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}
.shein-product-table th:first-child,
.shein-product-table td:first-child {
  min-width: 68px;
  width: 68px;
}
.shein-product-table .shein-copy-value,
.shein-product-table .production-product-label-stack {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shein-product-table .production-product-label-stack {
  flex-wrap: nowrap;
}
.shein-product-table td > small {
  display: block;
  margin-top: 3px;
  color: var(--ui-color-muted);
  font-size: var(--ui-font-size-note);
  font-weight: var(--ui-font-weight-regular);
}
.shein-listing-status,
.shein-sellable-days {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--ui-font-size-note);
  font-weight: var(--ui-font-weight-medium);
}
.shein-listing-status.is-active { color: var(--ui-color-success); }
.shein-listing-status.is-pending { color: var(--ui-color-primary); }
.shein-listing-status.is-focus-new { color: var(--ui-color-primary); }
.shein-listing-status.is-focus-hot { color: var(--ui-color-warning); }
.shein-sellable-days.is-normal { color: var(--ui-color-text); }
.shein-sellable-days.is-warning,
.shein-sellable-cell.is-warning {
  background: color-mix(in srgb, var(--ui-color-warning) 14%, white);
  color: var(--ui-color-warning);
  font-weight: var(--ui-font-weight-semibold);
}
.shein-sellable-days.is-danger,
.shein-sellable-cell.is-danger {
  background: color-mix(in srgb, var(--ui-color-danger) 12%, white);
  color: var(--ui-color-danger);
  font-weight: var(--ui-font-weight-semibold);
}
.shein-sellable-days {
  padding: 3px 7px;
  border-radius: 6px;
}
.shein-sellable-days b,
.shein-sellable-cell b {
  margin-left: 5px;
  font-size: var(--ui-font-size-caption);
  font-weight: var(--ui-font-weight-semibold);
}
.shein-product-pagination {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid var(--ui-color-border);
  color: var(--ui-color-text);
  font-size: var(--ui-font-size-note);
}
.shein-product-detail-popover .production-size-stack {
  grid-template-rows: minmax(150px, .42fr) 12px minmax(150px, .58fr);
}
.shein-product-detail-popover .shein-sellable-cell {
  border-radius: 4px;
}
@media (max-width: 1100px) {
  .shein-product-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shein-product-toolbar input { grid-column: span 2; }
}
@media (max-width: 760px) {
  .shein-product-toolbar { grid-template-columns: minmax(0, 1fr); }
  .shein-product-toolbar input { grid-column: auto; }
  .shein-product-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px), (max-height: 720px) {
  .sales-alert-size-popover.unified-production-size-popover {
    width: calc(100vw - 16px);
    min-width: 0;
    height: calc(100dvh - 16px);
    min-height: 0;
  }
}
.production-baby-summary {
  max-width: 55%;
  overflow: hidden;
  padding: 3px 7px;
  border: 1px solid #fdba74;
  border-radius: 7px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.production-baby-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 270px;
  margin-top: 4px;
  padding: 3px 5px;
  border: 1px solid #fdba74;
  border-radius: 7px;
  background: #fff7ed;
  overflow: hidden;
}
.production-store-badge {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 5px;
  background: #f97316;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.production-baby-trigger {
  min-width: 0;
  overflow: hidden;
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.unified-production-size-grid td.baby-size-risk {
  background: #fff0e6;
  color: var(--ui-color-danger);
  font-weight: 600;
}

/* 数据上传：一屏完成，人工与自动两组均使用紧凑业务状态列表。 */
#importPage .source-panel { min-height: 0; }
#importPage .source-panel > .panel-head {
  min-height: 44px;
  padding-bottom: 4px;
}
#importPage .source-panel > .panel-head .download-actions { display: none; }
#importPage .manual-source-section,
#importPage .erp-source-section { margin-top: 10px; }
#importPage .source-section-head {
  min-height: 36px;
  align-items: center;
  margin-bottom: 6px;
}
#importPage .source-section-head h3 {
  font-size: 16px;
  line-height: 1.25;
}
#importPage .keyword-help {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  font-size: 12px !important;
}
#importPage .compact-finalize-button {
  min-height: 34px;
  padding: 6px 16px;
  border-radius: 8px;
  white-space: nowrap;
}
#importPage .source-table {
  max-height: none;
  overflow: visible;
  border-radius: 10px;
}
#importPage .manual-source-table,
#importPage .erp-source-table {
  width: 100%;
  max-width: none;
  background: #fff;
}
#importPage .manual-source-table .table-row,
#importPage .erp-source-table .table-row {
  grid-template-columns: minmax(160px, .55fr) minmax(130px, .45fr) minmax(190px, .65fr) minmax(520px, 1.65fr);
  min-height: 46px;
}
#importPage .source-table .table-head { min-height: 34px; }
#importPage .source-table .table-row > *,
#importPage .source-table .table-head > * {
  padding: 5px 12px;
  line-height: 1.2;
}
#importPage .compact-source-name {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
#importPage .compact-source-time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#importPage .source-table .status-pill {
  min-height: 24px;
  padding: 3px 9px;
  white-space: nowrap;
}
#importPage .source-table .row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: nowrap;
}
#importPage .source-table .tool-button {
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 13px !important;
  white-space: nowrap;
}
#importPage .source-store-options {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 4px;
  white-space: nowrap;
}
#importPage .source-store-option {
  min-width: 42px;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
#importPage .source-store-option.selected {
  border-color: var(--blue);
  background: var(--ui-color-primary-soft);
  color: var(--blue);
  font-weight: 700;
}
#importPage .source-order-options {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 4px;
  white-space: nowrap;
}
#importPage .source-order-option {
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
#importPage .source-order-option.selected {
  border-color: var(--blue);
  background: var(--ui-color-primary-soft);
  color: var(--blue);
  font-weight: 700;
}
#importPage .compact-no-action { color: var(--muted); }

@media (max-width: 980px) {
  #importPage .source-table { overflow-x: auto; }
  #importPage .manual-source-table .table-row,
  #importPage .erp-source-table .table-row { min-width: 1000px; }
}
