:root {
  color-scheme: light;
  --graphite: #101a23;
  --graphite-2: #17242e;
  --graphite-3: #22323d;
  --teal: #009f8c;
  --teal-dark: #007c70;
  --teal-soft: #eafaf7;
  --blue: #2d6cdf;
  --blue-soft: #edf4ff;
  --coral: #f26d4f;
  --red: #d43f52;
  --red-soft: #fff1f3;
  --amber: #a16500;
  --amber-soft: #fff7df;
  --surface: #ffffff;
  --canvas: #eef2f5;
  --surface-muted: #f7f9fb;
  --border: #d6e0e6;
  --border-strong: #bccbd3;
  --text: #1f303a;
  --muted: #647781;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; padding-bottom: 78px; color: var(--text); background: var(--canvas); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
input, select, textarea { width: 100%; color: var(--text); background: #fff; border: 1px solid var(--border-strong); border-radius: 5px; transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease; }
input, select { height: 38px; padding: 0 10px; }
textarea { padding: 11px 12px; line-height: 1.6; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #91aab5; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 159, 140, .11); }
label { display: grid; gap: 6px; min-width: 0; }
label > span, legend { font-size: 13px; font-weight: 700; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid #23b6a5; outline-offset: 2px; }

.app-header { position: sticky; z-index: 30; top: 0; display: flex; min-height: 64px; align-items: center; justify-content: space-between; padding: 8px 20px 8px 22px; color: #fff; background: var(--graphite); border-bottom: 1px solid #253640; box-shadow: 0 4px 18px rgba(12, 26, 35, .15); }
.brand-lockup { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo { display: block; width: 82px; height: 44px; flex: 0 0 auto; object-fit: contain; border-radius: 8px; }
.brand-lockup h1 { margin: 0; font-size: 19px; line-height: 1.2; }
.header-actions, .progress-actions, .prompt-actions, .pricing-bulk-actions { display: flex; align-items: center; gap: 7px; }
.status-chip { padding: 6px 10px; color: #dbe5e7; background: #22333e; border: 1px solid #415660; border-radius: 5px; font-size: 12px; font-weight: 700; }
.status-chip.ready { color: #bff2e8; border-color: #3f8178; }
.status-chip.missing { color: #ffd3d7; border-color: #8f5660; }

.workspace-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.task-nav { position: sticky; top: 64px; display: flex; height: calc(100vh - 64px); min-height: 580px; flex-direction: column; padding: 20px 13px 13px; color: #d8e1e3; background: var(--graphite-2); border-right: 1px solid #243741; }
.task-nav-heading { display: grid; gap: 5px; padding: 0 10px 16px; }
.task-nav-heading strong { color: #fff; font-size: 17px; }
.eyebrow { color: #58d1c2; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.task-nav-list { display: grid; gap: 5px; }
.task-nav-item { position: relative; display: grid; grid-template-columns: 30px 1fr; min-height: 58px; align-items: center; padding: 8px 10px; color: #d7e2e6; text-decoration: none; border: 1px solid transparent; border-radius: 6px; }
.task-nav-item > span { display: grid; width: 23px; height: 23px; place-items: center; color: #8fa8b2; background: #22323d; border-radius: 4px; font-size: 12px; font-weight: 800; }
.task-nav-item b { font-size: 14px; }
.task-nav-item small { grid-column: 2; margin-top: -5px; color: #8fa1a9; font-size: 12px; }
.task-nav-item:hover { color: #fff; background: #1d2d37; }
.task-nav-item.active { color: #fff; background: var(--graphite-3); border-color: #334a56; box-shadow: inset 3px 0 0 var(--teal); }
.task-nav-item.active > span { color: #fff; background: var(--teal); }
.task-nav-spacer { flex: 1; }
.task-nav-note { display: flex; gap: 8px; padding: 12px 9px; color: #aab8bd; border-top: 1px solid #334751; font-size: 12px; line-height: 1.55; }
.status-dot { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 3px; background: #42c6b7; border-radius: 50%; }
.nav-exchange-rate { display: grid; gap: 4px; padding: 12px; background: #101c24; border: 1px solid #324852; border-radius: 6px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03); }
.nav-exchange-rate > span:first-child { color: #78b8b2; font-size: 12px; font-weight: 700; }
.nav-exchange-rate strong { color: #fff; font-size: 16px; }
.nav-exchange-rate small, .exchange-rate-state { color: #9eb0b5; font-size: 12px; }
.exchange-rate-state.warning { color: #f3cf75; }

.workspace-main { min-width: 0; padding: 16px 18px; }
.workspace-section { min-width: 0; max-width: 1380px; margin: 0 auto 14px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; box-shadow: 0 3px 12px rgba(32, 52, 63, .055); scroll-margin-top: 76px; }
.task-setup, #aiRulesWorkspace, #jobSection { max-width: none; }
.page-hidden { display: none !important; }
body.automation-page-active #jobForm,
body.automation-page-active #formError,
body.automation-page-active #aiRulesWorkspace,
body.automation-page-active #jobSection,
body.automation-page-active .task-action-bar { display: none !important; }
.reference-template-block { grid-column: 1 / -1; }
.reference-template-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.template-preview { margin: 8px 0 0; padding: 8px 10px; color: var(--text-muted); background: #f5faf9; border: 1px solid #dcebea; border-radius: 5px; }
.template-selection-hint { color: #d93025; font-weight: 700; }
.template-field-selection { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 7px; padding: 7px 9px; background: #f8fbff; border: 1px solid #dce7f3; border-radius: 5px; }
.template-field-selection label { display: inline-flex; align-items: center; gap: 4px; margin: 0; white-space: nowrap; font-size: 12px; color: var(--text); }
.template-field-selection input { margin: 0; }
.template-selection-empty { border-color: #f2b8b5; background: #fff8f7; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.section-heading h2 { margin: 2px 0 0; font-size: 21px; line-height: 1.25; }
.section-kicker { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.model-name { align-self: center; padding: 5px 9px; color: var(--blue); background: var(--blue-soft); border: 1px solid #d6e5ff; border-radius: 5px; font-size: 12px; font-weight: 700; }

.operation-mode-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.operation-mode-options label { cursor: pointer; }
.operation-mode-options input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; clip: rect(0 0 0 0); }
.operation-mode-options label > span { position: relative; display: grid; min-height: 72px; align-content: center; gap: 4px; padding: 11px 14px 11px 18px; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 6px; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background-color .16s ease; }
.operation-mode-options label > span::before { position: absolute; top: 14px; bottom: 14px; left: 8px; width: 3px; content: ""; background: #c6d2d8; border-radius: 2px; }
.operation-mode-options label:hover > span { border-color: #a8bbc4; transform: translateY(-1px); }
.operation-mode-options label > span strong { font-size: 15px; }
.operation-mode-options label > span small { color: var(--muted); font-size: 12px; font-weight: 400; }
.operation-mode-options input:checked + span { color: var(--teal-dark); background: var(--teal-soft); border-color: #70c8bd; box-shadow: 0 4px 12px rgba(0, 159, 140, .09); }
.operation-mode-options input:checked + span::before { background: var(--teal); }

fieldset { min-width: 0; margin: 0; }
.config-block { min-width: 0; padding: 13px; background: #fff; border: 1px solid var(--border); border-radius: 6px; }
.config-block legend { padding: 0 5px; color: #344951; }
.primary-config-grid, .title-quick-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-bottom: 11px; }
.selection-mode-options { display: flex; flex-wrap: wrap; gap: 7px; }
.control-option { display: flex; min-width: 0; min-height: 36px; align-items: center; gap: 7px; padding: 7px 10px; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 5px; transition: border-color .16s ease, background-color .16s ease; }
.control-option:hover { background: #fff; border-color: #a8bbc4; }
.control-option:has(input:checked) { color: var(--teal-dark); background: var(--teal-soft); border-color: #86cfc6; }
.control-option input { flex: 0 0 auto; width: 15px; height: 15px; margin: 0; accent-color: var(--teal); }
.control-option span { font-size: 13px; font-weight: 600; }
.range-inputs, .character-range-fields { display: flex; align-items: end; gap: 7px; margin-top: 8px; }
.range-field { grid-template-columns: auto 85px; align-items: center; }
.character-range-fields label { grid-template-columns: auto 80px; align-items: center; }
.field-help { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.site-options { display: flex; flex-wrap: wrap; gap: 6px; }
.site-option { padding: 6px 8px; }
.site-label { display: inline-flex; align-items: center; gap: 7px; }
.site-inline-label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.site-flag { display: inline-block; width: 20px; height: 14px; flex: 0 0 auto; object-fit: cover; border: 1px solid rgba(31, 48, 58, .14); border-radius: 2px; box-shadow: 0 1px 2px rgba(31, 48, 58, .08); }

.advanced-settings { margin: 2px 0 11px; border: 1px solid var(--border); border-radius: 6px; }
.advanced-settings > summary, .pricing-batch-details > summary { padding: 10px 13px; color: #3f555e; background: var(--surface-muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.advanced-settings > summary span { margin-left: 7px; color: var(--muted); font-size: 12px; font-weight: 400; }
.advanced-settings-grid { display: grid; grid-template-columns: .75fr 1.5fr 1fr; gap: 9px; padding: 10px; }
.inline-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sku-strategy-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 7px; }
.sku-strategy-options[aria-disabled="true"] { opacity: .5; }

.pricing-policy { display: grid; gap: 9px; }
.pricing-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pricing-heading legend { padding: 0; font-size: 16px; }
.pricing-heading .field-help { margin: 2px 0 0; }
.pricing-batch-details { border: 1px solid var(--border); border-radius: 4px; }
.pricing-batch-bar { display: grid; grid-template-columns: 120px 140px 150px 170px auto; gap: 8px; align-items: end; padding: 8px; }
.table-shell { max-width: 100%; overflow: auto; border: 1px solid var(--border); border-radius: 5px; }
table { width: 100%; border-collapse: collapse; }
th { color: #425b66; background: #f0f4f6; font-size: 12px; font-weight: 800; text-align: left; }
th, td { padding: 9px 10px; border-bottom: 1px solid #e2e9ed; vertical-align: middle; }
tbody tr { transition: background-color .14s ease; }
tbody tr:hover { background: #f8fbfc; }
tbody tr:last-child td { border-bottom: 0; }
.pricing-table { min-width: 920px; }
.pricing-table th:first-child { width: 92px; }
.pricing-table th:nth-child(2) { width: 190px; }
.pricing-table td input, .pricing-table td select { height: 34px; font-size: 13px; }
.pricing-table td:nth-child(2) { display: grid; gap: 4px; }
.pricing-site-name { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.pricing-site-name strong { font-size: 13px; }
.pricing-site-copy { min-height: 22px; padding: 0; color: var(--teal-dark); background: transparent; border: 0; font-size: 12px; }
.pricing-site-checkbox { width: 15px; height: 15px; accent-color: var(--teal); }
.pricing-row-disabled { opacity: .45; }
.pricing-row-error { background: var(--red-soft); box-shadow: inset 3px 0 0 var(--red); }
.pricing-formula-text, .pricing-definition { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.pricing-definition { padding: 6px 8px; color: #765400; background: var(--amber-soft); border-left: 3px solid #d69a1b; }

.prompt-panel { display: grid; gap: 8px; }
.public-collector-section { border-left: 3px solid var(--blue); }
.collector-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.collector-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px; align-items: stretch; margin: 12px 0; padding: 9px; background: linear-gradient(90deg, #f5fbfa, #f7faff); border: 1px solid #d7e8e8; border-radius: 6px; }
.collector-guide-step { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 7px 8px; background: rgba(255, 255, 255, .78); border: 1px solid #deeaed; border-radius: 5px; }
.collector-guide-step > span { display: grid; width: 23px; height: 23px; flex: 0 0 auto; place-items: center; color: #fff; background: var(--blue); border-radius: 50%; font-size: 12px; font-weight: 800; }
.collector-guide-step div { display: grid; min-width: 0; gap: 1px; }
.collector-guide-step strong { font-size: 12px; }
.collector-guide-step small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.collector-guide-safety { display: flex; min-width: 150px; align-items: center; gap: 6px; padding: 7px 8px; color: #39716b; font-size: 11px; line-height: 1.35; }
.collector-guide-safety .status-dot { background: var(--teal); }
.public-collector-table-shell { min-height: 360px; max-height: none; overflow: visible; }
.public-collector-table-shell.log-scroll { max-height: 520px; overflow: auto; }
.public-collector-table-shell { overflow-x: auto; }
.public-collector-table-shell table { min-width: 1490px; table-layout: fixed; }
.public-collector-table-shell th:nth-child(1) { width: 84px; }
.public-collector-table-shell th:nth-child(2) { width: 190px; }
.public-collector-table-shell th:nth-child(3) { width: 300px; }
.public-collector-table-shell th:nth-child(4) { width: 150px; }
.public-collector-table-shell th:nth-child(5) { width: 125px; }
.public-collector-table-shell th:nth-child(6) { width: 120px; }
.public-collector-table-shell th:nth-child(7) { width: 96px; }
.public-collector-table-shell th:nth-child(8) { width: 200px; }
.public-collector-table-shell th:nth-child(9) { width: 150px; }
.public-collector-table-shell td:nth-child(9) { white-space: nowrap; }
.public-collector-table-shell th:nth-child(10) { width: 75px; }
.public-collector-table-shell td:nth-child(10) { white-space: nowrap; }
.public-collector-table-shell th, .public-collector-table-shell td { padding: 5px 6px; }
.public-collector-table-shell td { overflow-wrap: anywhere; font-size: 12px; line-height: 1.35; }
/* 执行日志表整行内容上下居中：这一条要压过下面 .result-pricing-cell 的 top 对齐。 */
.public-collector-table-shell td { vertical-align: middle; }
.public-collector-table-shell .result-pricing-cell { padding: 5px; }
.collector-title-result { vertical-align: middle; }
.collector-title-result div { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 4px; padding: 2px 0; }
.collector-title-result strong { color: var(--teal-dark); font-size: 10px; }
.collector-attempts { white-space: nowrap; }
.collector-attempts > span + span { margin-top: 2px; }
.collector-attempts > span { display: grid; grid-template-columns: 30px 18px; align-items: center; column-gap: 4px; color: var(--muted); font-size: 11px; }
.collector-attempt-label { text-align: left; }
.collector-attempts strong { color: var(--ink); font-size: 11px; font-weight: 700; text-align: right; }
.collector-row-retry-button { display: inline-flex; min-height: 24px; margin-top: 6px; padding: 2px 9px; align-items: center; color: #fff; background: var(--red); border: 0; border-radius: 4px; font-size: 11px; cursor: pointer; }
.collector-row-retry-button:hover { background: #c0392b; }
.collector-row-retry-button:disabled { opacity: .55; cursor: wait; }
.collector-retry-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 5px; }
.collector-retry-controls select { width: min(150px, 100%); height: 28px; font-size: 11px; }
.collector-retry-controls .collector-row-retry-button { margin-top: 0; white-space: nowrap; }
.collector-log-toolbar .secondary-button { min-height: 30px; color: var(--teal-dark); border-color: #86cfc6; background: #f1fbf9; }
.collector-log-heading { display: flex; align-items: center; flex-wrap: nowrap; gap: 8px; }
.collector-progress { display: flex; align-items: center; flex-wrap: nowrap; gap: 5px; }
.collector-progress-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 29px; padding: 4px 10px; border: 1px solid; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.collector-progress-chip b { font-size: 13px; }
.collector-progress-chip.overview { color: #075d58; background: #e7f7f4; border-color: #9bd9d0; }
.collector-progress-chip.success { color: #087444; background: #e8f8ef; border-color: #a5ddbc; }
.collector-progress-chip.failed { color: #b13b3b; background: #fff0ef; border-color: #efb1ab; }
.collector-progress-chip.editing { color: #285f9a; background: #eaf3ff; border-color: #afcdf0; }
.collector-batch-filter { display: inline-flex; align-items: center; gap: 5px; min-height: 29px; padding: 4px 10px; border: 1px solid #c0d4db; border-radius: 999px; background: #f7fafb; color: var(--ink); font-weight: 700; white-space: nowrap; cursor: pointer; }
.collector-batch-filter input { width: 14px; height: 14px; margin: 0; accent-color: var(--teal); }
.collector-status-running { color: var(--teal-dark); }
.collector-status-failed { color: var(--red); }
.automation-profile-form { display: grid; gap: 10px; margin: 12px 0; padding: 12px; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 6px; }
.public-collector-section { max-width: none; width: 100%; }
.master-toggle { position: relative; display: inline-flex; width: 42px; height: 22px; vertical-align: middle; cursor: pointer; }
.master-toggle input { position: absolute; opacity: 0; }
.master-toggle span { width: 100%; height: 100%; background: #aebbc2; border-radius: 999px; position: relative; transition: .2s; }
.master-toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: .2s; }
.master-toggle input:checked + span { background: var(--teal); }
.master-toggle input:checked + span::after { transform: translateX(20px); }
.feature-title { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.feature-title input { width: 15px; height: 15px; accent-color: var(--teal); }
.collector-log-toolbar { margin-top: 14px; }
.collector-log-pagination select { width: 78px; height: 32px; }
.collector-log-pagination label, .collector-log-pagination .pagination-actions { display: flex; align-items: center; gap: 6px; }
.page-jump-input { width: 64px !important; height: 30px !important; }
.automation-master-switch { justify-self: start; background: var(--teal-soft); border-color: #86cfc6; }
.automation-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.automation-profile-grid textarea { min-height: 128px; margin-top: 8px; }
.automation-profile-grid select { margin-top: 8px; }
.automation-optimization-block { grid-column: 1 / -1; }
.automation-inline-fields { display: grid; grid-template-columns: 1.3fr .7fr .8fr; gap: 7px; margin-top: 8px; }
.automation-inline-fields select { margin-top: 0; }
.automation-profile-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.automation-profile-actions .field-help { margin: 0; }
.prompt-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); }
.prompt-tab { min-height: 40px; padding: 0 14px; color: var(--muted); background: transparent; border: 0; border-bottom: 3px solid transparent; font-size: 13px; font-weight: 700; }
.prompt-tab span { display: inline-flex; min-width: 22px; justify-content: center; margin-left: 4px; padding: 1px 5px; background: #edf1f3; border-radius: 9px; font-size: 12px; }
.prompt-tab:hover, .prompt-tab.active { color: var(--teal); border-bottom-color: var(--teal); }
.prompt-tab-panel { display: none; gap: 7px; }
.prompt-tab-panel.active { display: grid; }
.prompt-tab-panel textarea { min-height: 130px; max-height: 230px; }
#promptInput { min-height: 170px; font-family: Consolas, "Microsoft YaHei", monospace; font-size: 13px; }
.prompt-inline-actions { display: flex; max-width: 320px; gap: 6px; }

.progress-heading { align-items: center; }
.progress-actions { flex-wrap: wrap; justify-content: flex-end; }
.progress-actions select { width: 130px; }
.progress-actions input { width: 250px; }
#itemSiteFilter.site-filter-has-flag { padding-left: 38px; background-position: 10px center; background-repeat: no-repeat; background-size: 20px 14px; }
.progress-track { height: 7px; overflow: hidden; background: #e1e8ec; border-radius: 4px; }
.progress-bar { width: 0; height: 100%; background: var(--teal); transition: width .25s ease; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); margin: 10px 0; border: 1px solid var(--border); }
.metrics div { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 10px; border-right: 1px solid var(--border); }
.metrics div:last-child { border-right: 0; }
.metrics span { color: var(--muted); font-size: 12px; }
.metrics strong { font-size: 20px; }
.success-text { color: var(--teal); }
.failure-text { color: var(--red); }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 9px 0; color: var(--muted); font-size: 12px; }
.table-toolbar > div, .result-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.result-table-shell { max-height: 510px; }
.result-table-shell table { min-width: 1120px; table-layout: fixed; }
.result-table-shell thead { position: sticky; z-index: 2; top: 0; }
.result-table-shell th:nth-child(1) { width: 48px; }
.result-table-shell th:nth-child(2) { width: 76px; }
.result-table-shell th:nth-child(3) { width: 21%; }
.result-table-shell th:nth-child(4) { width: 27%; }
.result-table-shell th:nth-child(5) { width: 31%; }
.result-table-shell th:nth-child(6) { width: 52px; }
.result-table-shell th:nth-child(7) { width: 190px; }
.result-table-shell th, .result-table-shell td { padding: 7px 8px; }
.result-table-shell td { overflow-wrap: anywhere; font-size: 13px; line-height: 1.4; }
.result-main-row { cursor: pointer; }
.result-main-row:focus { outline: 0; }
.result-main-row:focus-visible { box-shadow: inset 0 0 0 2px rgba(0, 159, 140, .65); }
.result-main-row[aria-expanded="true"] { background: #f3faf8; }
.result-pricing-cell { vertical-align: top; }
.source-price-result { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 5px; padding-bottom: 4px; border-bottom: 1px solid #e3eaed; }
.source-price-result span { color: var(--muted); font-size: 11px; font-weight: 700; }
.source-price-result strong { color: #253a44; font-size: 13px; white-space: nowrap; }
.site-price-results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; }
.site-price-result { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 5px; padding: 3px 5px; background: #f4f8f9; border: 1px solid #dfe8eb; border-radius: 4px; }
.site-price-result .site-inline-label { min-width: 0; gap: 4px; font-size: 11px; }
.site-price-result .site-inline-label > span { white-space: nowrap; }
.site-price-result .site-flag { width: 17px; height: 12px; }
.site-price-result strong { color: var(--teal-dark); font-size: 12px; white-space: nowrap; }
.empty-result-text { color: var(--muted); font-size: 12px; }
.result-detail-row td { padding: 0; background: #f7fafb; }
.result-detail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); }
.result-detail > div { min-width: 0; padding: 9px 10px; background: #f8fbfc; }
.result-detail span { color: var(--muted); font-size: 11px; font-weight: 800; }
.result-detail p { margin: 3px 0 0; font-size: 12px; line-height: 1.45; }
.title-character-count { display: inline-block; margin-left: 7px; color: var(--red); font-size: 12px; font-weight: 800; white-space: nowrap; }
.item-status { display: inline-block; padding: 3px 7px; border-radius: 4px; font-size: 12px; font-weight: 700; }
.item-status.success { color: #06645d; background: var(--teal-soft); }
.item-status.failed { color: var(--red); background: var(--red-soft); }
.item-status.running { color: var(--blue); background: #edf5fb; }
.item-status.pending { color: var(--amber); background: var(--amber-soft); }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; }
.page-buttons { display: flex; gap: 3px; }
.page-button { min-width: 30px; height: 30px; padding: 0 6px; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 3px; }
.page-button.active { color: #fff; background: var(--teal); border-color: var(--teal); }
.page-jump { display: flex; grid-template-columns: auto 55px auto; align-items: center; gap: 5px; }

.task-action-bar { position: fixed; z-index: 40; right: 0; bottom: 0; left: 220px; display: grid; grid-template-columns: minmax(170px, 1fr) auto minmax(210px, auto); min-height: 68px; align-items: center; gap: 20px; padding: 9px 20px; background: rgba(255, 255, 255, .98); border-top: 1px solid var(--border-strong); box-shadow: 0 -5px 18px rgba(24, 42, 49, .09); backdrop-filter: blur(10px); }
.action-status { display: grid; gap: 1px; }
.action-status span { font-weight: 800; }
.action-status span { font-size: 15px; }
.action-status small { color: var(--muted); font-size: 12px; }
.action-facts { display: flex; gap: 20px; color: var(--muted); font-size: 12px; }
.action-facts strong { margin-left: 4px; color: var(--text); }

.primary-button, .secondary-button, .text-button, .icon-button { min-height: 36px; padding: 0 13px; border-radius: 5px; font-size: 13px; font-weight: 700; transition: background-color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.primary-button { color: #fff; background: var(--teal); border: 1px solid var(--teal); }
.primary-button:hover { background: var(--teal-dark); border-color: var(--teal-dark); box-shadow: 0 4px 12px rgba(0, 124, 112, .2); transform: translateY(-1px); }
.secondary-button { color: #35515a; background: #fff; border: 1px solid #b9c8cd; }
.secondary-button:hover { color: var(--teal-dark); border-color: var(--teal); background: var(--teal-soft); }
.text-button { color: var(--teal-dark); background: transparent; border: 0; }
.text-button:hover { color: var(--teal); background: var(--teal-soft); }
.icon-button { width: 32px; padding: 0; color: var(--muted); background: transparent; border: 1px solid var(--border); font-size: 18px; }
.form-error, .job-error { max-width: 1380px; margin: 0 auto 10px; color: var(--red); font-size: 13px; }
.job-error { padding: 7px; background: var(--red-soft); border-left: 3px solid var(--red); }
.toast { position: fixed; z-index: 70; right: 18px; bottom: 88px; max-width: 420px; padding: 11px 14px; color: #fff; background: #1d3039; border: 1px solid #3f5964; border-radius: 6px; box-shadow: 0 10px 28px rgba(10, 25, 33, .22); opacity: 0; pointer-events: none; transform: translateY(6px); transition: .18s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
dialog { width: min(520px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: 6px; box-shadow: 0 18px 60px rgba(0, 0, 0, .28); }
dialog::backdrop { background: rgba(20, 31, 36, .55); }
dialog form { padding: 16px; }
.unmatched-template-dialog { width: min(680px, calc(100vw - 24px)); }
.unmatched-template-content { padding: 16px; }
.unmatched-template-content textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.dialog-heading h2 { margin: 2px 0 0; font-size: 18px; }
.credentials-fields { display: grid; gap: 9px; }
.show-secrets-control { display: flex; align-items: center; gap: 7px; }
.show-secrets-control input { width: 15px; height: 15px; }
.dialog-actions { display: flex; margin-top: 12px; }
.align-right { justify-content: flex-end; }
/* 采集模板库：设置页维护模板，插件只负责挑选其中一个 */
.collection-template-block { margin: 6px 0; }
.collection-template-create { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.collection-template-create label { display: grid; gap: 5px; min-width: 220px; flex: 1; }
.collection-template-create input { margin: 0; }
.collection-template-table-shell { margin-top: 8px; }
.collection-template-table-shell table { min-width: 560px; }
.collection-template-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.collection-template-active { display: inline-block; padding: 2px 8px; color: #fff; background: var(--teal); border-radius: 999px; font-size: 12px; font-weight: 700; }
.collection-template-missing { color: var(--muted); font-size: 12px; }
.danger-text-button { color: var(--red); }
.danger-text-button:hover { color: #fff; background: var(--red); }
.collection-template-details-dialog { width: min(760px, calc(100vw - 24px)); }
.collection-template-details-body { display: grid; max-height: min(68vh, 720px); gap: 10px; overflow: auto; padding: 2px 3px; }
.collection-template-detail-section { padding: 10px 12px; background: #f7fafb; border: 1px solid var(--border); border-radius: 6px; }
.collection-template-detail-section h3 { margin: 0 0 8px; color: var(--graphite); font-size: 14px; }
.collection-template-detail-section dl { display: grid; grid-template-columns: minmax(105px, 145px) minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 13px; }
.collection-template-detail-section dt { color: var(--muted); font-weight: 700; }
.collection-template-detail-section dd { min-width: 0; margin: 0; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.collection-template-detail-section pre { margin: 0; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.job-id-loader { display: inline-flex; align-items: center; gap: 5px; }
.job-id-loader span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.job-id-loader input { width: 78px; margin: 0; }

.hidden, [hidden] { display: none !important; }
.automation-profile-grid { grid-template-columns: 1fr; gap: 6px; }
.automation-profile-grid .config-block { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 10px; padding: 8px 10px; }
.automation-profile-grid .config-block legend { grid-column: 1 / -1; font-size: 13px; font-weight: 700; }
.automation-profile-grid .config-block .control-option { grid-column: 1 / -1; margin: 0; padding: 5px 7px; }
.automation-profile-grid .config-block textarea { grid-column: 1 / -1; min-height: 52px; margin: 0; }
.automation-profile-grid .config-block .field-help { grid-column: 1 / -1; margin: 0; }
.automation-profile-grid .config-block > label:not(.control-option) { display: flex; align-items: center; gap: 8px; margin: 0; }
.automation-profile-grid .config-block > label:not(.control-option) > span { white-space: nowrap; }
.automation-profile-grid .config-block select, .automation-profile-grid .config-block input { margin: 0; }
.automation-profile-grid .config-block.feature-disabled > :not(legend):not(.control-option) { display: none !important; }
.automation-profile-grid .config-block.feature-disabled { min-height: 0; }
.automation-profile-grid .config-block.feature-disabled { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.automation-profile-grid .config-block.feature-disabled legend { grid-column: 1; grid-row: 1; }
.automation-profile-grid .config-block.feature-disabled .control-option { grid-column: 2; grid-row: 1; padding: 0; }
.automation-profile-grid .config-block.feature-disabled .control-option span { display: none; }
.package-info-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 8px; }
.package-info-fields > label { display: grid; gap: 4px; }
.unit-input { position: relative; display: inline-flex; align-items: center; max-width: 150px; }
.unit-input input { width: 100%; padding-right: 30px; }
.unit-input em { position: absolute; right: 9px; color: #9aa8ad; font-size: 12px; font-style: normal; pointer-events: none; }
.login-page { min-height: 100vh; padding: 24px; background: radial-gradient(circle at 15% 15%, rgba(0, 159, 140, .12), transparent 32%), linear-gradient(135deg, #f1f6f6, #e8eef2); }
.login-shell { display: grid; min-height: calc(100vh - 48px); place-items: center; }
.login-card { width: min(440px, 100%); padding: 38px 42px 28px; text-align: center; background: rgba(255, 255, 255, .96); border: 1px solid #dbe5e8; border-radius: 16px; box-shadow: 0 24px 70px rgba(25, 50, 59, .13); }
.login-logo { display: block; width: 142px; height: 78px; margin: 0 auto 8px; object-fit: contain; }
.login-kicker { margin: 0; color: var(--teal-dark); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.login-card h1 { margin: 5px 0 0; color: var(--graphite); font-size: 25px; line-height: 1.3; }
.login-description { margin: 8px 0 25px; color: var(--muted); font-size: 13px; }
.login-form { display: grid; gap: 15px; text-align: left; }
.login-form > label:not(.remember-login) { display: grid; gap: 7px; }
.login-form > label:not(.remember-login) span { color: #344b55; font-size: 13px; font-weight: 700; }
.login-form input[type=text], .login-form input[type=password] { height: 46px; padding: 0 13px; border-radius: 7px; }
.remember-login { display: inline-flex; width: fit-content; align-items: center; gap: 8px; color: #405761; cursor: pointer; }
.remember-login input { width: 16px; height: 16px; margin: 0; accent-color: var(--teal); }
.remember-login span { font-size: 13px; font-weight: 600; }
.login-error { min-height: 19px; margin: -7px 0 -8px; color: var(--red); font-size: 13px; }
.login-button { width: 100%; min-height: 46px; font-size: 15px; border-radius: 7px; }
.login-footer { margin: 20px 0 0; color: #82939a; font-size: 11px; }
@media (max-width: 520px) { .login-page { padding: 14px; } .login-shell { min-height: calc(100vh - 28px); } .login-card { padding: 30px 22px 23px; border-radius: 12px; } .login-card h1 { font-size: 22px; } }
@media (max-width: 800px) { .package-info-fields { grid-template-columns: repeat(2, minmax(120px, 1fr)); } }
.collector-actions .danger-button { border-color: #d05b5b; color: #a52c2c; background: #fff5f5; }
.visually-hidden-submit { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 1100px) {
  .workspace-shell { grid-template-columns: 194px minmax(0, 1fr); }
  .task-action-bar { left: 194px; }
  .advanced-settings-grid { grid-template-columns: 1fr 1fr; }
  .mark-policy { grid-column: 1 / -1; }
  .operation-mode-options label > span { padding: 8px; }
  .operation-mode-options label > span small { display: none; }
}

@media (max-width: 800px) {
  body { padding-bottom: 104px; }
  .app-header { position: static; }
  .brand-logo { width: 66px; height: 36px; }
  .brand-lockup h1 { font-size: 16px; }
  .workspace-shell { display: block; }
  .task-nav { position: static; display: block; width: 100%; height: auto; min-height: 0; padding: 8px; }
  .task-nav-heading, .task-nav-note, .task-nav-spacer { display: none; }
  .task-nav-list { display: flex; overflow-x: auto; }
  .task-nav-item { min-width: 125px; }
  .nav-exchange-rate { margin-top: 7px; grid-template-columns: 1fr auto; align-items: center; }
  .nav-exchange-rate small, .exchange-rate-state { text-align: right; }
  .workspace-main { padding: 8px; }
  .workspace-section { padding: 11px; }
  .operation-mode-options, .primary-config-grid, .title-quick-settings, .advanced-settings-grid, .automation-profile-grid, .collector-guide { grid-template-columns: 1fr; }
  .automation-inline-fields { grid-template-columns: 1fr 1fr; }
  .automation-inline-fields label:first-child { grid-column: 1 / -1; }
  .automation-profile-actions { align-items: stretch; flex-direction: column; }
  .collector-actions { justify-content: flex-start; }
  .collector-guide-safety { min-width: 0; }
  .pricing-heading, .section-heading, .table-toolbar { align-items: flex-start; flex-direction: column; }
  .pricing-batch-bar { grid-template-columns: 1fr 1fr; }
  .progress-actions { justify-content: flex-start; }
  .task-action-bar { left: 0; grid-template-columns: 1fr auto; gap: 8px; padding: 7px 10px; }
  .action-facts { grid-column: 1 / -1; grid-row: 2; gap: 10px; }
  .task-action-bar .primary-button { grid-column: 2; grid-row: 1 / span 2; }
  .result-detail { grid-template-columns: 1fr; }
}

.collector-batch-lifecycle { margin: 12px 0; padding: 12px; border: 1px solid #dce5ec; border-radius: 10px; font-size: 13px; }
.collector-batch-lifecycle summary { cursor: pointer; font-weight: 600; }
.collector-batch-lifecycle p { color: #66788a; }
.collector-batch-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 9px 0; border-top: 1px solid #eef2f5; }
.collector-batch-row span { overflow-wrap: anywhere; }

.collector-progress-chip input { width: 14px; height: 14px; margin: 0; accent-color: var(--teal); }
label.collector-progress-chip { cursor: pointer; }

.deployment-notice { margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--blue-soft); color: var(--text); }

.execution-stage { display: block; min-width: 0; max-width: 100%; overflow-wrap: anywhere; margin-top: 5px; white-space: normal; color: var(--text-muted); font-size: 12px; line-height: 1.5; }

.ai-model-control { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai-model-control select { min-width: 190px; max-width: 100%; padding: 6px 8px; }

.ai-model-control > span { flex: 0 0 auto; white-space: nowrap; }
.ai-model-control select { flex: 1; min-width: 0; width: auto; }
.result-table-shell th:nth-child(2) { width: 190px; }

.collector-settings-details > summary { cursor: pointer; font-weight: 700; padding: 9px 0; color: #173a48; }
.collector-settings-details:not([open]) { padding-top: 2px; padding-bottom: 2px; }
.collector-settings-content { padding: 6px 0; }
.collector-preset-content { display: grid; gap: 10px; }
.collector-live-actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.collector-concurrency-control { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; }
.collector-concurrency-control select { width: 62px; margin: 0; padding: 6px; }
.collector-live-actions .field-help { margin: 0; font-size: 12px; }

/* Keep filters and actions on two complete rows; narrow screens scroll each row. */
.table-toolbar.collector-log-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
.collector-log-toolbar > .collector-log-heading { min-width: 0; max-width: 100%; overflow-x: auto; padding-bottom: 2px; }
.collector-log-toolbar > .collector-live-actions { align-self: flex-end; min-width: 0; max-width: 100%; overflow-x: auto; padding-bottom: 2px; }
.collector-log-heading > *, .collector-live-actions > * { flex-shrink: 0; white-space: nowrap; }
