:root {
  --ink: #20242a;
  --muted: #687078;
  --line: #dfe2e6;
  --soft: #f5f6f7;
  --canvas: #f3f4f6;
  --panel: #ffffff;
  --green: #34765d;
  --green-2: #47866e;
  --green-soft: #eaf3ef;
  --red: #c64747;
  --amber: #b77712;
  --shadow: 0 10px 28px rgba(42, 86, 64, .055);
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }
button { border: 0; }
svg { width: 18px; height: 18px; stroke-width: 1.8; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 244px; min-width: 244px; min-height: 100vh; background: #edf6f1; color: #42574b; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 30; border-right: 1px solid #d9e8df; }
.brand { height: 76px; display: flex; align-items: center; gap: 12px; padding: 0 22px; border-bottom: 1px solid #d9e8df; background: rgba(255,255,255,.36); }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; background: #dcefe4; color: var(--green); font-weight: 800; border-radius: 7px; box-shadow: inset 0 0 0 1px #cce4d7; }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { color: #214936; font-size: 17px; }
.brand-copy small { font-size: 9px; letter-spacing: 1.6px; color: #7f9689; margin-top: 2px; }
.main-nav { padding: 22px 12px; flex: 1; overflow-y: auto; }
.nav-item { width: 100%; height: 44px; padding: 0 12px; border-radius: 6px; background: transparent; color: #63786d; display: flex; align-items: center; gap: 11px; margin-bottom: 5px; font-size: 14px; text-align: left; transition: .2s ease; }
.nav-item:hover { background: #e0efe7; color: #285c44; }
.nav-item.active { background: #d5ebdf; color: #1f6648; box-shadow: inset 3px 0 #4c9a73; font-weight: 600; }
.nav-item span:nth-child(2) { flex: 1; }
.nav-item > svg:last-child { width: 15px; color: #8ca198; }
.nav-count { flex: none !important; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: #c7e2d3; color: #28664a; font-size: 11px; }
.nav-label { margin: 28px 12px 11px; font-size: 10px; color: #8ba096; letter-spacing: 1.3px; text-transform: uppercase; }
.platform-icon { width: 27px; height: 27px; border-radius: 6px; display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; flex: 0 0 auto; }
.taobao { background: #fff0e9; color: #d85d24; }
.alibaba { background: #eef0ff; color: #5364c4; }
.pdd { background: #ffeded; color: #c94747; }
.douyin { background: #17191c; color: #fff; box-shadow: inset 2px 0 #25f4ee, inset -2px 0 #fe2c55; }
.jd { background: #fff0ef; color: #d92c1f; }
.sidebar-footer { padding: 18px; border-top: 1px solid #d9e8df; background: rgba(255,255,255,.25); }
.account-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; color: #365345; font-size: 11px; }
.account-heading span { display: flex; align-items: center; gap: 7px; font-weight: 700; }
.account-heading svg { width: 16px; height: 16px; color: var(--green); }
.account-heading strong { color: #809087; font-size: 9px; font-weight: 500; }
.usage-row { display: flex; justify-content: space-between; font-size: 11px; color: #758c80; }
.usage-row strong { font-size: 12px; color: #345b48; }
.usage-track { height: 5px; background: #d5e5dc; margin: 9px 0 12px; overflow: hidden; border-radius: 3px; }
.usage-track span { display: block; width: 72.8%; height: 100%; background: #62a982; }
.quota-caption { display: block; margin-top: -5px; color: #87988f; font-size: 9px; }
.account-menu { display: grid; gap: 5px; margin-top: 14px; }
.account-menu button { width: 100%; min-height: 36px; padding: 0 9px; display: flex; align-items: center; gap: 8px; border-radius: 5px; background: rgba(255,255,255,.45); color: #536a5e; font-size: 10px; text-align: left; }
.account-menu button:hover { background: #fff; color: var(--green); }
.account-menu button span { flex: 1; }
.account-menu button svg { width: 14px; height: 14px; }
.account-menu button svg:last-child { width: 12px; color: #91a097; }
.plan-button { width: 100%; background: #fff; color: var(--green); height: 36px; border: 1px solid #d0e3d8; border-radius: 5px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 700; }
.profile { display: flex; align-items: center; gap: 9px; margin-top: 18px; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #cfe8da; color: #286349; font-weight: 700; font-size: 12px; }
.profile > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; }
.profile strong { color: #365345; font-size: 12px; }
.profile small { color: #85978e; font-size: 10px; margin-top: 2px; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; background: transparent; color: #83948b; border-radius: 5px; position: relative; }
.icon-button:hover { background: #e2eee7; color: #3f7258; }
.workspace { margin-left: 244px; width: calc(100% - 244px); min-height: 100vh; }
.topbar { height: 76px; padding: 0 32px; background: rgba(250,253,251,.92); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.crumb { display: flex; align-items: center; gap: 8px; color: #8a958e; font-size: 12px; }
.crumb svg { width: 13px; }
.crumb strong { color: #465149; font-weight: 600; }
.top-actions, .system-status { display: flex; align-items: center; gap: 14px; }
.system-status { color: #65726a; font-size: 11px; padding-right: 14px; border-right: 1px solid var(--line); gap: 7px; }
.system-status span { width: 7px; height: 7px; background: #d09a35; border-radius: 50%; box-shadow: 0 0 0 3px #f7eddb; }
.system-status b { font-weight: 500; }
.system-status.online span { background: #3da875; box-shadow: 0 0 0 3px #e4f4eb; }
.system-status.offline span { background: #c95656; box-shadow: 0 0 0 3px #f7e4e4; }
.theme-picker { height: 34px; padding: 0 8px 0 10px; display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--muted); }
.theme-picker svg { width: 14px; height: 14px; }
.theme-picker select { width: 52px; height: 30px; padding: 0; border: 0; box-shadow: none; background: transparent; color: var(--ink); font-size: 11px; }
.has-dot::after { content: ""; position: absolute; width: 5px; height: 5px; border: 2px solid #fff; background: #d95c58; border-radius: 50%; top: 6px; right: 7px; }
.primary-button, .secondary-button, .icon-text-button { min-height: 38px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.primary-button { background: var(--green); color: white; box-shadow: 0 4px 12px rgba(23,107,77,.17); }
.primary-button:hover { background: #115c41; }
.secondary-button, .icon-text-button { background: #fff; border: 1px solid #dbe3de; color: #3f4d45; }
.secondary-button:hover, .icon-text-button:hover { border-color: #aebdb4; background: #fafcfb; }
.page-container { padding: 26px 22px 44px; max-width: 1820px; margin: auto; }
.page { display: none; animation: pageIn .24s ease; }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; }
.page-heading.compact { margin-bottom: 24px; }
.eyebrow { color: #77867e !important; font-size: 10px !important; letter-spacing: 1.4px; font-weight: 700; margin: 0 0 8px !important; }
.page-heading h1 { margin: 0; font-size: 28px; line-height: 1.25; letter-spacing: 0; }
.page-heading p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.metric-card, .panel { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.metric-card { min-width: 0; padding: 20px; border-radius: 7px; }
.metric-top { display: flex; justify-content: space-between; align-items: flex-start; }
.metric-icon { width: 36px; height: 36px; border-radius: 7px; display: grid; place-items: center; }
.metric-icon.blue { background: #e9f1f8; color: #386f9d; }
.metric-icon.green { background: var(--green-soft); color: var(--green); }
.metric-icon.amber { background: #fbf0dc; color: var(--amber); }
.metric-icon.violet { background: #f0edf8; color: #7160a0; }
.trend, .quiet-badge { font-size: 10px; display: flex; align-items: center; gap: 3px; padding: 4px 6px; border-radius: 4px; }
.trend svg { width: 12px; height: 12px; }
.trend.up { color: #267657; background: #eef7f2; }
.quiet-badge { color: #7e8b83; background: #f2f5f3; }
.metric-card p { margin: 18px 0 2px; color: #76827b; font-size: 12px; }
.metric-card > strong { display: block; font-size: 27px; letter-spacing: 0; }
.metric-card > small { color: #9aa39e; font-size: 10px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .8fr); gap: 18px; margin-bottom: 18px; }
.panel { border-radius: 7px; }
.activity-panel, .quick-panel, .recent-panel { padding: 20px; }
.panel-title { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.panel-title h2, .step-head h2 { margin: 0; font-size: 15px; }
.panel-title p, .step-head p { margin: 4px 0 0; color: #89938d; font-size: 10px; }
.legend { display: flex; gap: 12px; font-size: 10px; color: #7d8982; }
.legend span { display: flex; align-items: center; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.blue-dot { background: var(--green); }
.gray-dot { background: #d7dfda; }
.chart { height: 190px; display: flex; align-items: flex-end; gap: 10px; padding-top: 18px; border-bottom: 1px solid #dce4df; background: linear-gradient(to bottom, transparent 24%, #edf1ef 25%, transparent 26%, transparent 49%, #edf1ef 50%, transparent 51%, transparent 74%, #edf1ef 75%, transparent 76%); }
.chart-group { height: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; position: relative; }
.chart-bar { width: min(16px, 28%); min-width: 5px; border-radius: 3px 3px 0 0; transition: height .6s ease; }
.chart-bar.success { background: var(--green); }
.chart-bar.fail { background: #dce3df; }
.chart-label { position: absolute; bottom: -20px; color: #909a94; font-size: 9px; }
.quick-list { display: flex; flex-direction: column; gap: 7px; }
.quick-list button { height: 61px; padding: 0 12px; display: flex; align-items: center; gap: 11px; background: #f7f9f8; border: 1px solid transparent; border-radius: 6px; text-align: left; }
.quick-list button:hover { background: #fff; border-color: #cddbd3; transform: translateX(2px); }
.quick-list button > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.quick-list strong { font-size: 12px; }
.quick-list small { color: #89958e; font-size: 9px; margin-top: 3px; }
.quick-list svg { color: #9aa59f; width: 15px; }
.text-button { display: flex; gap: 5px; align-items: center; background: transparent; color: var(--green); font-size: 11px; }
.text-button svg { width: 14px; }
.task-list-row { display: grid; grid-template-columns: minmax(240px, 1.7fr) .7fr 1fr .8fr 30px; align-items: center; gap: 16px; min-height: 58px; border-top: 1px solid #edf1ef; font-size: 11px; }
.task-list-row > div:first-child { display: flex; align-items: center; gap: 10px; min-width: 0; }
.task-list-row strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-list-row small { display: block; color: #98a19c; font-size: 9px; margin-top: 2px; }
.task-list-row > span { color: #75817a; }
.mini-progress { display: flex; align-items: center; gap: 8px; }
.mini-progress span { width: 74px; height: 4px; border-radius: 2px; background: #e6ebe8; overflow: hidden; }
.mini-progress span i { display: block; height: 100%; background: var(--green); }
.status { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 5px 8px; border-radius: 4px; font-size: 10px; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.done, .status.valid { background: #eaf5ef; color: #287253; }
.status.running { background: #edf2f7; color: #386b91; }
.status.failed, .status.invalid { background: #faebeb; color: #ad4747; }
.filter-bar { background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 14px; display: grid; grid-template-columns: minmax(240px, 1fr) 160px 160px auto; gap: 10px; margin-bottom: 14px; box-shadow: var(--shadow); }
.warehouse-filter { grid-template-columns: minmax(210px, 1fr) 120px 150px 120px 120px auto; }
.heading-actions { display: flex; align-items: center; gap: 8px; }
.search-field { position: relative; }
.search-field svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; color: #98a39d; }
input, select, textarea { border: 1px solid #dbe3de; outline: none; background: #fff; border-radius: 5px; }
input:focus, select:focus, textarea:focus { border-color: #6ba589; box-shadow: 0 0 0 3px rgba(67,139,105,.09); }
.filter-bar input, .filter-bar select { width: 100%; height: 38px; padding: 0 12px; font-size: 11px; }
.search-field input { padding-left: 36px; }
.table-panel { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
/* 仓库列表: 自适应宽度(固定列宽布局, 不再出横向滚动条) */
#warehousePage .table-wrap { overflow-x: visible; }
#warehousePage table { width: 100%; min-width: 0; table-layout: fixed; }
#warehousePage th, #warehousePage td { padding: 9px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
#warehousePage th:nth-child(1), #warehousePage td:nth-child(1) { width: 42px; }   /* 序号 */
#warehousePage th:nth-child(2), #warehousePage td:nth-child(2) { width: 32px; }   /* 勾选 */
#warehousePage th:nth-child(3), #warehousePage td:nth-child(3) { width: 100px; }  /* 商品ID */
#warehousePage th:nth-child(4), #warehousePage td:nth-child(4) { width: 19%; }    /* 商品信息 */
#warehousePage th:nth-child(5), #warehousePage td:nth-child(5) { width: 12%; }    /* 类目 */
#warehousePage th:nth-child(6), #warehousePage td:nth-child(6) { width: 62px; }   /* 平台 */
#warehousePage th:nth-child(7), #warehousePage td:nth-child(7) { width: 96px; }   /* 分组 */
#warehousePage th:nth-child(8), #warehousePage td:nth-child(8) { width: 11%; }    /* 最低价-最高价 */
#warehousePage th:nth-child(9), #warehousePage td:nth-child(9) { width: 55px; }   /* 月销量 */
#warehousePage th:nth-child(10), #warehousePage td:nth-child(10) { width: 86px; } /* 解析时间 */
#warehousePage th:nth-child(11), #warehousePage td:nth-child(11) { width: 56px; } /* 状态 */
#warehousePage th:nth-child(12), #warehousePage td:nth-child(12) { width: 82px; } /* 操作 */
/* 列内元素跟随列宽 */
#warehousePage .product-info { min-width: 0; }
#warehousePage .product-info strong { max-width: 100%; }
#warehousePage .product-info > div { min-width: 0; }
#warehousePage .group-row-select { width: 100%; }
#warehousePage .cat-path { max-width: 100%; }
#warehousePage .product-id-cell { max-width: none; }
th { height: 43px; padding: 0 15px; background: #f6f8f7; color: #7e8982; font-weight: 600; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
td { height: 64px; padding: 10px 15px; border-bottom: 1px solid #edf1ef; color: #566159; white-space: nowrap; }
tbody tr:hover { background: #fafcfb; }
.task-info, .product-info { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.task-info > span:first-child { width: 31px; height: 31px; border-radius: 6px; background: #edf3f0; color: #657b6f; display: grid; place-items: center; }
.task-info svg { width: 15px; }
.task-info strong, .product-info strong { display: block; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; color: #26332b; }
.task-info small, .product-info small { display: block; margin-top: 3px; color: #99a29d; font-size: 9px; }
.platform-tag { display: inline-flex; align-items: center; gap: 5px; }
.platform-tag .platform-icon { width: 22px; height: 22px; font-size: 10px; border-radius: 4px; }
.table-action { background: transparent; color: var(--green); font-size: 10px; padding: 5px; }
.table-action + .table-action { margin-left: 2px; }
.table-action.danger { color: var(--red); }
.sequence-cell { color: var(--muted); text-align: center; width: 46px; }
.product-id-cell { max-width: 150px; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--ink); }
.group-row-select { width: 145px; height: 32px; padding: 0 8px; font-size: 10px; }
.price-range { color: var(--ink); font-size: 10px; white-space: nowrap; }
.price-range span { padding: 0 2px; color: var(--muted); font-weight: 400; }
.table-footer { min-height: 52px; padding: 8px 15px; display: flex; align-items: center; justify-content: space-between; color: #89938d; font-size: 10px; }
.pagination { display: flex; gap: 4px; }
.pagination button { width: 28px; height: 28px; display: grid; place-items: center; background: #fff; border: 1px solid #dfe5e1; border-radius: 4px; font-size: 10px; color: #78837d; }
.pagination button.active { background: var(--green); color: #fff; border-color: var(--green); }
.pagination button:disabled { opacity: .4; cursor: default; }
.pagination svg { width: 13px; }
.pagination span { min-width: 54px; display: grid; place-items: center; color: var(--ink); }
.warehouse-pager { display: flex; align-items: center; gap: 14px; }
.warehouse-pager > label { display: flex; align-items: center; gap: 6px; }
.warehouse-pager select { height: 30px; padding: 0 24px 0 8px; font-size: 10px; }
.product-info .product-thumb { width: 38px; height: 38px; object-fit: cover; display: grid; place-items: center; border-radius: 5px; font-size: 10px; font-weight: 700; color: #6d746f; background: linear-gradient(135deg, #e0e8e3, #f5f2e8); }
input[type="checkbox"] { accent-color: var(--green); width: 14px; height: 14px; }
.bulk-bar { display: none; height: 42px; padding: 0 14px; margin-bottom: 10px; align-items: center; gap: 8px; background: #e9f3ee; border: 1px solid #cfe2d8; color: #4d6257; border-radius: 6px; font-size: 11px; }
.bulk-bar.show { display: flex; }
.bulk-bar span { flex: 1; }
.bulk-bar button { display: flex; gap: 5px; align-items: center; padding: 6px 9px; background: transparent; color: var(--green); font-size: 10px; }
.bulk-bar select { height: 30px; min-width: 160px; padding: 0 8px; font-size: 10px; }
.bulk-bar svg { width: 13px; }
.bulk-bar .danger-text { color: var(--red); }
.export-dropdown { position: relative; }
.export-menu { position: absolute; z-index: 25; top: calc(100% + 7px); right: 0; width: 238px; padding: 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: 0 16px 36px rgba(24,45,34,.14); }
.export-menu button { width: 100%; padding: 10px; display: flex; align-items: center; gap: 10px; border-radius: 5px; background: transparent; text-align: left; }
.export-menu button:hover { background: var(--soft); }
.export-menu button > svg { color: var(--green); }
.export-menu button span { display: flex; flex-direction: column; gap: 2px; }
.export-menu strong { font-size: 11px; }
.export-menu small { color: var(--muted); font-size: 9px; }
.parser-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 18px; }
.parser-form, .parse-preview { padding: 24px; min-height: 520px; }
.step-head { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 28px; }
.step-head > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 10px; font-weight: 700; }
.field-label { display: flex; flex-direction: column; gap: 8px; color: #56645c; font-size: 11px; margin-bottom: 18px; }
.field-label input, .field-label select { height: 40px; padding: 0 11px; }
.textarea-wrap { position: relative; margin-bottom: 18px; }
.textarea-wrap textarea, .field-label textarea { width: 100%; min-height: 164px; resize: vertical; padding: 12px; line-height: 1.7; font-size: 11px; }
.textarea-wrap span { position: absolute; right: 10px; bottom: 9px; font-size: 9px; color: #9ba59f; }
.textarea-wrap span.over-limit { color: var(--red); font-weight: 700; }
.batch-import { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -7px 0 18px; }
.batch-import label { height: 34px; cursor: pointer; }
.batch-import input { display: none; }
.batch-import small, .queue-hint { color: var(--muted); font-size: 9px; line-height: 1.6; }
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.option-grid label { display: flex; flex-direction: column; gap: 8px; font-size: 11px; color: #56645c; }
.option-grid select { height: 40px; padding: 0 10px; font-size: 11px; }
.field-caption { display: block; margin-bottom: 8px; color: #56645c; font-size: 11px; }
.parse-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.parse-modes label { position: relative; cursor: pointer; }
.parse-modes input { position: absolute; opacity: 0; pointer-events: none; }
.parse-modes label > span { min-height: 82px; padding: 13px; display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; column-gap: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); transition: .18s ease; }
.parse-modes label > span > svg { grid-row: 1 / 3; width: 18px; color: var(--muted); }
.parse-modes strong { align-self: end; font-size: 11px; }
.parse-modes small { align-self: start; margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.parse-modes input:checked + span { border-color: #70a88d; background: var(--green-soft); box-shadow: 0 0 0 2px rgba(63,133,99,.08); }
.parse-modes input:checked + span > svg { color: var(--green); }
.check-group { display: flex; flex-wrap: wrap; gap: 18px; margin: 22px 0; }
.check-group label { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #57655d; }
.full-button { width: 100%; height: 43px; }
.parse-preview { display: flex; flex-direction: column; }
.empty-preview, .preview-running, .preview-result, .preview-error { flex: 1; min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-preview > span { width: 58px; height: 58px; display: grid; place-items: center; background: #f0f4f2; color: #91a198; border-radius: 50%; margin-bottom: 16px; }
.empty-preview > span svg { width: 25px; height: 25px; }
.empty-preview strong, .preview-running strong, .preview-result > strong { font-size: 13px; }
.empty-preview p, .preview-running p, .preview-result > p { color: #98a19c; font-size: 10px; margin: 6px 0; }
.spinner { width: 43px; height: 43px; margin-bottom: 18px; border: 3px solid #e3ebe7; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-track { width: 80%; height: 6px; border-radius: 4px; background: #e7ece9; overflow: hidden; margin-top: 20px; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--green); transition: width .4s ease; }
.progress-stats { width: 80%; margin-top: 18px; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.progress-stats span { display: flex; align-items: center; gap: 4px; }
.progress-stats svg { width: 12px; height: 12px; }
.progress-stats b { font-weight: 500; }
.progress-stats + .progress-track { margin-top: 7px; }
.success-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); margin-bottom: 14px; }
.error-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #b45353; background: #f9eaea; margin-bottom: 14px; }
.preview-error strong { font-size: 13px; }
.preview-error p { max-width: 310px; margin: 7px 0 20px; color: #8e6262; font-size: 11px; line-height: 1.7; }
.preview-result dl { width: 100%; margin: 20px 0; padding: 8px 14px; background: #f7f9f8; border-radius: 6px; }
.preview-result dl div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #e8edea; font-size: 10px; }
.preview-result dl div:last-child { border: 0; }
.preview-result dt { color: #8a958f; }
.preview-result dd { margin: 0; color: #36433b; font-weight: 600; }
.price-meter { width: 100%; margin: 0 0 13px; padding: 12px 14px; border-radius: 6px; background: var(--soft); text-align: left; }
.price-meter > div:first-child { display: flex; justify-content: space-between; font-size: 10px; }
.price-meter > div:first-child span, .price-meter small { color: var(--muted); }
.price-meter small { display: block; margin-top: 6px; font-size: 8px; }
.price-track { height: 6px; margin-top: 8px; border-radius: 3px; background: #dce5e0; overflow: hidden; }
.price-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .45s ease; }
.result-time { display: flex; align-items: center; gap: 5px; margin-bottom: 14px; color: var(--muted); font-size: 10px; }
.result-time svg { width: 13px; height: 13px; }
.result-time strong { color: var(--ink); }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(10, 23, 16, .48); backdrop-filter: blur(3px); }
.modal { width: min(510px, 100%); background: #fff; border-radius: 8px; padding: 24px; box-shadow: 0 24px 70px rgba(7,24,15,.25); animation: modalIn .2s ease; }
@keyframes modalIn { from { transform: translateY(8px); opacity: 0; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal .field-label textarea { min-height: 90px; }
.modal-description { margin: -8px 0 20px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.account-modal { width: min(560px, 100%); }
.usage-record-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.usage-record-summary span { padding: 11px; border-radius: 6px; background: var(--soft); color: var(--muted); font-size: 9px; }
.usage-record-summary strong { display: block; margin-top: 5px; color: var(--ink); font-size: 14px; }
.usage-record-list { max-height: 320px; overflow-y: auto; border-top: 1px solid var(--line); }
.usage-record-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 58px; border-bottom: 1px solid var(--line); }
.usage-record-item strong, .usage-record-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-record-item strong { font-size: 11px; }
.usage-record-item small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.usage-record-item b { color: var(--red); font-size: 10px; }
.empty-record { padding: 48px 0; color: var(--muted); text-align: center; font-size: 11px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.product-modal { width: min(760px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; }
.task-result-modal { width: min(1120px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.task-result-summary { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 8px; margin: -7px 0 16px; }
.task-result-summary > div { min-width: 0; padding: 10px 12px; border-radius: 6px; background: var(--soft); }
.task-result-summary span, .task-result-summary strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-result-summary span { color: var(--muted); font-size: 9px; }
.task-result-summary strong { margin-top: 4px; font-size: 11px; }
.task-result-table-wrap { overflow: auto; border: 1px solid var(--line); }
.task-result-table-wrap table { min-width: 880px; }
.task-result-table-wrap th { position: sticky; top: 0; z-index: 1; }
.task-result-table-wrap td { height: 58px; }
.task-result-product { max-width: 300px; }
.task-result-product strong, .task-result-product small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-result-product small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.task-result-message { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.task-result-loading { height: 160px !important; color: var(--muted); text-align: center; }
.task-result-footer { min-height: 48px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; }
.product-detail-head { display: grid; grid-template-columns: 150px 1fr; gap: 20px; }
.product-detail-head img { width: 150px; height: 150px; object-fit: cover; border-radius: 7px; background: var(--soft); border: 1px solid var(--line); }
.product-detail-head h3 { margin: 0 0 10px; font-size: 17px; line-height: 1.55; }
.product-detail-head .detail-price { margin: 13px 0; color: var(--green); font-size: 23px; font-weight: 700; }
.product-detail-head .detail-price del { margin-left: 8px; color: var(--muted); font-size: 11px; font-weight: 400; }
.detail-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; font-size: 11px; color: var(--muted); }
.detail-meta strong { color: var(--ink); font-weight: 600; }
.detail-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.detail-section h4 { margin: 0 0 12px; font-size: 12px; }
.props-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.props-grid div { min-width: 0; padding: 9px 10px; background: var(--panel); font-size: 10px; }
.props-grid span { color: var(--muted); }
.props-grid strong { display: block; margin-top: 3px; white-space: normal; line-height: 1.5; }
.detail-link { margin-top: 18px; }
.failure-detail { margin-top: 18px; padding: 12px 14px; background: #faebeb; color: #8f3838; border: 1px solid #eccaca; border-radius: 6px; }
.failure-detail strong { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.failure-detail strong svg { width: 16px; height: 16px; }
.failure-detail p { margin: 7px 0 0; line-height: 1.6; font-size: 11px; overflow-wrap: anywhere; }
.toast { position: fixed; left: 50%; top: 18px; z-index: 120; display: flex; align-items: center; gap: 9px; padding: 12px 16px; background: #f4fbf7; color: #285a43; border: 1px solid #cce4d7; border-radius: 6px; font-size: 12px; box-shadow: 0 12px 30px rgba(39,92,65,.16); transform: translateX(-50%) translateY(-18px); opacity: 0; pointer-events: none; transition: .25s ease; max-width: min(92vw, 620px); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast svg { color: #3f956c; width: 16px; flex: 0 0 auto; }
.toast.error { background: #fdf0ef; color: #a53434; border-color: #eec9c7; box-shadow: 0 12px 30px rgba(140,50,45,.18); }
.toast.error svg { color: #c4483f; }
.toast-icon { display: inline-flex; align-items: center; }
.context-menu { position: fixed; z-index: 200; width: 176px; padding: 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: 0 14px 34px rgba(24,45,34,.18); }
.context-menu button { width: 100%; min-height: 34px; padding: 0 9px; display: flex; align-items: center; gap: 9px; border-radius: 5px; background: transparent; color: var(--ink); font-size: 11px; text-align: left; }
.context-menu button:hover { background: var(--green-soft); color: var(--green); }
.context-menu button svg { width: 14px; height: 14px; color: var(--muted); }
.context-menu button:hover svg { color: var(--green); }
.context-divider { height: 1px; margin: 5px 4px; background: var(--line); }
html[data-theme="dark"] .context-menu { box-shadow: 0 14px 34px rgba(0,0,0,.35); }
.hidden { display: none !important; }
.mobile-only { display: none; }

/* Theme presets */
html[data-theme="gray"] .sidebar { background: #f5f6f7; color: #485059; border-color: #dfe2e6; }
html[data-theme="gray"] .brand { background: #fafafa; border-color: #dfe2e6; }
html[data-theme="gray"] .brand-mark { background: #e5ece9; border-color: #d6e1dc; }
html[data-theme="gray"] .brand-copy strong { color: #252b30; }
html[data-theme="gray"] .brand-copy small,
html[data-theme="gray"] .nav-label { color: #858c92; }
html[data-theme="gray"] .nav-item { color: #5d666d; }
html[data-theme="gray"] .nav-item:hover { background: #e9ecee; color: #252b30; }
html[data-theme="gray"] .nav-item.active { background: #e2e9e6; color: #285f49; box-shadow: inset 3px 0 #4d8a70; }
html[data-theme="gray"] .nav-count { background: #dce6e1; color: #315f4c; }
html[data-theme="gray"] .sidebar-footer { background: #f8f9f9; border-color: #dfe2e6; }
html[data-theme="gray"] .usage-track { background: #dfe3e5; }
html[data-theme="gray"] .profile strong { color: #30373c; }

html[data-theme="mint"] {
  --ink: #1d2a23;
  --muted: #65776d;
  --line: #d8e6de;
  --soft: #f4f8f5;
  --canvas: #f0f6f2;
  --panel: #ffffff;
  --green: #28785a;
  --green-2: #3a8b6b;
  --green-soft: #e8f5ee;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7ece9;
  --muted: #9da9a2;
  --line: #344039;
  --soft: #222a26;
  --canvas: #171d1a;
  --panel: #202824;
  --green: #62b28d;
  --green-2: #75c09b;
  --green-soft: #283d33;
  --shadow: 0 10px 28px rgba(0,0,0,.18);
}
html[data-theme="dark"] .sidebar { background: #1b2420; color: #bdc9c2; border-color: #344039; }
html[data-theme="dark"] .brand { background: #1d2722; border-color: #344039; }
html[data-theme="dark"] .brand-mark { background: #294035; border-color: #375445; color: #7bc29f; }
html[data-theme="dark"] .brand-copy strong { color: #eef3f0; }
html[data-theme="dark"] .brand-copy small,
html[data-theme="dark"] .nav-label { color: #7e9086; }
html[data-theme="dark"] .nav-item { color: #aebbb4; }
html[data-theme="dark"] .nav-item:hover { background: #27332d; color: #eef3f0; }
html[data-theme="dark"] .nav-item.active { background: #2a4437; color: #90d4b1; box-shadow: inset 3px 0 #67b58f; }
html[data-theme="dark"] .nav-item > svg:last-child { color: #76887e; }
html[data-theme="dark"] .nav-count { background: #315443; color: #a7ddc1; }
html[data-theme="dark"] .sidebar-footer { background: #1d2722; border-color: #344039; }
html[data-theme="dark"] .account-heading { color: #d7e1db; }
html[data-theme="dark"] .account-menu button { background: #26312b; color: #b8c5be; }
html[data-theme="dark"] .account-menu button:hover { background: #2d3a33; color: #8fd0af; }
html[data-theme="dark"] .usage-row { color: #94a39b; }
html[data-theme="dark"] .usage-row strong { color: #c3cec8; }
html[data-theme="dark"] .usage-track { background: #37443d; }
html[data-theme="dark"] .plan-button { background: #27342e; color: #89ceaa; border-color: #3c5046; }
html[data-theme="dark"] .avatar { background: #315442; color: #a8ddc2; }
html[data-theme="dark"] .profile strong { color: #e2e9e5; }
html[data-theme="dark"] .profile small { color: #84958c; }
html[data-theme="dark"] .topbar { background: rgba(29,36,32,.94); }
html[data-theme="dark"] .crumb strong { color: #d2dbd6; }
html[data-theme="dark"] .system-status { color: #a2aea7; }
html[data-theme="dark"] .system-status span { box-shadow: 0 0 0 3px #294336; }
html[data-theme="dark"] .system-status.offline span { box-shadow: 0 0 0 3px #4b3030; }
html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .icon-text-button,
html[data-theme="dark"] .theme-picker,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .pagination button { background: #252e2a; border-color: #3a463f; color: #d5ddd8; }
html[data-theme="dark"] .metric-card p,
html[data-theme="dark"] .panel-title p,
html[data-theme="dark"] .step-head p { color: #9aa69f; }
html[data-theme="dark"] .metric-card > small,
html[data-theme="dark"] .quick-list small,
html[data-theme="dark"] .task-info small,
html[data-theme="dark"] .product-info small { color: #89968f; }
html[data-theme="dark"] .quick-list button,
html[data-theme="dark"] .preview-result dl { background: #252e2a; }
html[data-theme="dark"] .export-menu { box-shadow: 0 16px 36px rgba(0,0,0,.28); }
html[data-theme="dark"] .price-track { background: #39443e; }
html[data-theme="dark"] .quick-list button:hover,
html[data-theme="dark"] tbody tr:hover { background: #29332e; border-color: #435249; }
html[data-theme="dark"] .chart { border-color: #3a463f; background: linear-gradient(to bottom, transparent 24%, #313b35 25%, transparent 26%, transparent 49%, #313b35 50%, transparent 51%, transparent 74%, #313b35 75%, transparent 76%); }
html[data-theme="dark"] .chart-bar.fail { background: #47534c; }
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .modal { background: var(--panel); }
html[data-theme="dark"] th { background: #252e2a; color: #a8b3ad; }
html[data-theme="dark"] td { color: #c1cbc5; border-color: #313c36; }
html[data-theme="dark"] .task-info strong,
html[data-theme="dark"] .product-info strong { color: #e3e9e5; }
html[data-theme="dark"] .product-thumb,
html[data-theme="dark"] .task-info > span:first-child,
html[data-theme="dark"] .empty-preview > span { background: #2a342f; color: #a5b2aa; }
html[data-theme="dark"] .quiet-badge { background: #303a35; color: #aeb9b3; }
html[data-theme="dark"] .modal-backdrop { background: rgba(3,7,5,.66); }
html[data-theme="dark"] .toast { background: #27352e; color: #bce2ce; border-color: #3d5a4b; }
html[data-theme="dark"] .toast.error { background: #3a2625; color: #f0b6b1; border-color: #6b3b38; }
html[data-theme="dark"] .toast.error svg { color: #e08b84; }
html[data-theme="dark"] .bulk-bar { background: #263a30; border-color: #365242; color: #b6c8be; }
html[data-theme="dark"] .preview-result dl div { border-color: #39443e; }
html[data-theme="dark"] .preview-result dd { color: #dbe3de; }
html[data-theme="dark"] .error-mark { background: #462e2e; color: #ef9a9a; }
html[data-theme="dark"] .preview-error p { color: #d2a0a0; }
@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-grid { grid-template-columns: 1fr; }
  .quick-list { display: grid; grid-template-columns: repeat(3, 1fr); }
  .quick-list button { height: 76px; }
  .parser-layout { grid-template-columns: 1fr; }
  .parse-preview { min-height: 400px; }
}
@media (max-width: 760px) {
  .mobile-only { display: inline-grid; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 12px 0 35px rgba(32,74,52,.14); }
  .sidebar.open { transform: none; }
  .brand .mobile-only { margin-left: auto; color: #668073; }
  .workspace { margin-left: 0; width: 100%; }
  .topbar { height: 64px; padding: 0 16px; }
  .crumb span, .crumb svg, .system-status, .top-actions .has-dot { display: none; }
  .theme-picker { padding-left: 7px; }
  .page-container { padding: 22px 15px 35px; }
  .page-heading { align-items: flex-start; gap: 16px; }
  .heading-actions { flex-wrap: wrap; justify-content: flex-end; }
  .page-heading h1 { font-size: 23px; }
  .page-heading .secondary-button { padding: 0 11px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { padding: 15px; }
  .quick-list { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar .search-field { grid-column: 1 / -1; }
  .task-list-row { grid-template-columns: 1fr auto; padding: 10px 0; gap: 8px; }
  .task-list-row > span, .task-list-row .mini-progress { display: none; }
  .parser-form, .parse-preview { padding: 18px; }
  .task-result-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card > strong { font-size: 23px; }
  .page-heading > .secondary-button { display: none; }
  .top-actions .primary-button { font-size: 0; width: 38px; padding: 0; }
  .top-actions .primary-button svg { width: 17px; }
  .option-grid, .filter-bar { grid-template-columns: 1fr; }
  .filter-bar .search-field { grid-column: auto; }
  .chart { gap: 3px; }
  .product-detail-head { grid-template-columns: 1fr; }
  .product-detail-head img { width: 100%; height: auto; aspect-ratio: 1; }
  .props-grid, .detail-meta { grid-template-columns: 1fr; }
  .parse-modes { grid-template-columns: 1fr; }
  .usage-record-summary { grid-template-columns: 1fr; }
}

/* 类目搜索筛选(我的仓库) */
.cat-filter { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cat-filter::before { content: '类目'; font-size: 11px; font-weight: 600; color: #6b7a72; }
.cat-search-wrap { position: relative; display: inline-flex; align-items: center; min-width: 320px; flex: 0 1 420px; }
.cat-search-wrap svg { position: absolute; left: 11px; width: 15px; color: #98a39d; pointer-events: none; }
.cat-search-wrap input { width: 100%; height: 38px; padding: 0 12px 0 34px; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; background: #fff; }
.cat-search-wrap input:disabled { opacity: .6; cursor: not-allowed; }
.cat-suggest { position: absolute; top: 42px; left: 0; right: 0; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 12px 28px rgba(30,60,45,.12); z-index: 30; }
.cat-suggest-item { display: block; width: 100%; text-align: left; padding: 8px 12px; font-size: 12px; color: #33443b; background: none; border: 0; cursor: pointer; }
.cat-suggest-item:hover, .cat-suggest-item.active { background: #f1f7f3; color: #1f6648; }
.cat-suggest-empty { padding: 10px 12px; font-size: 12px; color: #8d9a93; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 15px; background: #eaf3ef; border: 1px solid #cfe6da; color: #1f6648; font-size: 12px; max-width: 460px; }
.cat-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-chip button { border: 0; background: none; color: #4b7a63; cursor: pointer; font-size: 13px; line-height: 1; }
@media (max-width: 760px) {
  .cat-search-wrap { min-width: 0; flex: 1 1 100%; }
}

/* 仓库列表: 类目全路径 */
.cat-path { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; color: #4c5f55; font-size: 11px; }

/* Logo 图片占位（前台品牌位） */
.brand-mark { flex: 0 0 auto; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: inherit; }
.brand-mark.has-logo { background: transparent; box-shadow: none; overflow: visible; }
