/* 与飞同行 · 统一视觉收口层
 * 加载顺序：所有页面最后一个样式表。
 * 只做视觉、排版、文案与交互时长的统一，不改变任何功能与流程。
 * 设计令牌冻结：字号 12/13/15/18（正文最小 12px）、按钮高度 3 档、圆角 4 档、危险色 1 种、主色 1 种。
 */
:root {
  /* 字号（唯一允许的 4 档；正文与状态文字不得小于 12px） */
  --yf-font-min: 12px;
  --yf-font-xs: 12px;
  --yf-font-sm: 12px;
  --yf-font-md: 13px;
  --yf-font-base: 13px;
  --yf-font-lg: 15px;
  --yf-font-xl: 18px;

  /* 控件高度（唯一允许的 3 档） */
  --yf-control-sm: 32px;
  --yf-control-md: 36px;
  --yf-control-lg: 40px;

  /* 圆角（唯一允许的 4 档） */
  --yf-radius-control: 8px;
  --yf-radius-card: 10px;
  --yf-radius-dialog: 12px;
  --yf-radius-panel: 14px;

  /* 主色与语义色 */
  --yf-primary: #2f6b4f;
  --yf-primary-hover: #275c43;
  --yf-primary-soft: #eaf3ed;
  --yf-primary-text: #2f6b4f;
  --yf-danger: #9c4a44;
  --yf-danger-soft: #fbf0ee;
  --yf-danger-line: rgba(156, 74, 68, 0.22);
  --yf-info: #2b6cb0;
  --yf-info-soft: #eef4fb;
  --yf-warn: #8a6a2f;
  --yf-warn-soft: #fdf6e7;

  /* 中性色 */
  --yf-text: #1f2621;
  --yf-text-soft: #55605a;
  --yf-text-muted: #78827c;
  --yf-disabled-bg: #f1f3f2;
  --yf-disabled-text: #8d9691;
  --yf-line: rgba(23, 24, 28, 0.12);
  --yf-line-soft: rgba(23, 24, 28, 0.08);
  --yf-backdrop: rgba(17, 24, 28, 0.45);
  --yf-shadow-dialog: 0 18px 48px rgba(17, 24, 28, 0.16);

  /* 交互时长 */
  --yf-dur-fast: 80ms;
  --yf-dur-base: 120ms;

}

/* 弹窗令牌收口：这套变量由 layout-dialogs 在 body 上声明并被全量引用，
   必须声明在同一层级才能真正覆盖；改这里等于全站弹窗统一。 */
:is(
  body.erp-app,
  body.source-inbox-frame-page,
  body.source-inbox-app,
  body.copywriting-app,
  body.api-app,
  body.templates-app
) {
  --m2-dialog-overlay: rgba(17, 24, 28, 0.45) !important;
  --m2-dialog-danger: #9c4a44 !important;
  --m2-dialog-danger-soft: #fbf0ee !important;
  --m2-dialog-accent: #2f6b4f !important;
  --m2-dialog-accent-hover: #275c43 !important;
  --m2-dialog-radius: 12px !important;
  --m2-dialog-control-radius: 8px !important;
  --m2-dialog-muted: #55605a !important;
  --m2-dialog-shadow: 0 18px 48px rgba(17, 24, 28, 0.16) !important;
}

/* ---------- 1. 交互时长与按压反馈 ---------- */
button,
.workflowButton,
.pageClearButton,
.selectionDeleteButton,
.selectionPromptButton,
.embeddedRemovalButton,
.collector-button,
.export-mapping-button,
.export-complete-button,
.export-quiet-delete,
.user-menu-action,
.modal-btn,
.runtime-dialog-button {
  transition:
    background-color var(--yf-dur-fast) ease,
    border-color var(--yf-dur-fast) ease,
    color var(--yf-dur-fast) ease,
    box-shadow var(--yf-dur-fast) ease !important;
}

button:active:not(:disabled) {
  transform: none !important;
}

/* ---------- 2. 字号收敛 ---------- */
table th {
  font-size: var(--yf-font-xs) !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}

table td {
  font-size: var(--yf-font-sm) !important;
}

body.erp-app .sidebar .nav button,
body.erp-app .nav button {
  font-size: var(--yf-font-md) !important;
}

body.erp-app .sidebar .user-name,
body.erp-app .user-name {
  font-size: var(--yf-font-sm) !important;
}

.commandBar button,
.collector-commandbar button,
.export-listing-header button {
  font-size: var(--yf-font-sm) !important;
}

.mapping-status-badge,
.copy-status,
.collector-inline-status,
.tableFootnote {
  font-size: var(--yf-font-xs) !important;
}

/* 2026-09-17（C 方案）：上架准备页的"类目 + 置信度 + 手动改类目"单元格。 */
body.erp-app .mapping-category-cell {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-right: 4px !important;
  vertical-align: middle !important;
}
body.erp-app .mapping-category-cell select {
  max-width: 132px !important;
  height: 24px !important;
  padding: 0 4px !important;
  border: 1px solid var(--yftx-line-strong) !important;
  border-radius: 6px !important;
  background: var(--yftx-surface) !important;
  color: var(--yftx-text) !important;
  font-size: 11px !important;
}
body.erp-app .mapping-category-cell small {
  color: var(--yftx-subtle) !important;
  font-size: 10px !important;
  white-space: nowrap !important;
}

/* 历史遗留的 10 / 10.5px 小字统一抬到 11px（18 处规则分散在多层样式里） */
:is(
  body.erp-app,
  body.api-app,
  body.templates-app,
  body.copywriting-app,
  body.source-inbox-frame-page
) :is(
  .mapping-status-badge,
  .export-mapping-issue-item,
  .export-mapping-issue-more,
  .system-check-badge,
  .template-meta,
  .browse-path,
  .template-title small,
  .provider-dot,
  .status-pill,
  .connection-card small,
  .result-head span
) {
  font-size: var(--yf-font-min) !important;
}

.mapping-status-badge {
  min-height: 22px !important;
  padding: 2px 8px !important;
  border-radius: var(--yf-radius-control) !important;
  line-height: 16px !important;
}

/* ---------- 3. 按钮高度、圆角与语义色 ---------- */
.pageClearButton,
.selectionDeleteButton,
.selectionPromptButton,
.embeddedRemovalButton,
.workflowButton,
.collector-button,
.export-listing-header button,
.erp-toast ~ * button,
.image-tool-button,
.image-open-doubao,
.export-mapping-button,
.export-complete-button,
.export-quiet-delete {
  height: var(--yf-control-sm) !important;
  min-height: var(--yf-control-sm) !important;
  max-height: var(--yf-control-sm) !important;
  border-radius: var(--yf-radius-control) !important;
}

.modal-btn,
.account-modal-button,
.runtime-dialog-button,
.collector-detail-actions button {
  height: var(--yf-control-sm) !important;
  min-height: var(--yf-control-sm) !important;
  border-radius: var(--yf-radius-control) !important;
}

.system-check-button.primary,
#loginSubmitBtn {
  height: var(--yf-control-md) !important;
  border-radius: var(--yf-radius-control) !important;
}

/* 主色统一为绿；蓝色只保留给链接与信息提示 */
#loginSubmitBtn,
.modal-btn.confirm:not(.danger),
.system-check-button.primary,
.account-add-button,
#collectorStartButton,
#startExportMapping,
#embeddedTransferExport,
.export-mapping-button:not(.secondary),
.export-complete-button,
.image-open-doubao,
.transferRemovalButton {
  border-color: var(--yf-primary) !important;
  background: var(--yf-primary) !important;
  color: #fff !important;
  box-shadow: none !important;
}

#loginSubmitBtn:hover:not(:disabled),
.modal-btn.confirm:not(.danger):hover:not(:disabled),
.system-check-button.primary:hover:not(:disabled),
.account-add-button:hover:not(:disabled),
#collectorStartButton:hover:not(:disabled),
#startExportMapping:hover:not(:disabled),
#embeddedTransferExport:hover:not(:disabled),
.export-mapping-button:not(.secondary):hover:not(:disabled),
.export-complete-button:hover:not(:disabled),
.image-open-doubao:hover:not(:disabled),
.transferRemovalButton:hover:not(:disabled) {
  border-color: var(--yf-primary-hover) !important;
  background: var(--yf-primary-hover) !important;
  color: #fff !important;
}

/* 危险操作统一为一种红 + 一种浅底 */
.selectionDeleteButton,
.embeddedRemovalButton.danger,
#collectorStopButton,
#collectorDeleteButton,
.export-quiet-delete,
.image-inline-delete,
.removal-secondary-button.danger,
.modal-btn.confirm.danger,
.account-modal-button.danger,
.logout-action {
  border-color: var(--yf-danger-line) !important;
  background: var(--yf-danger-soft) !important;
  color: var(--yf-danger) !important;
  box-shadow: none !important;
}

.selectionDeleteButton:hover:not(:disabled),
.embeddedRemovalButton.danger:hover:not(:disabled),
#collectorStopButton:hover:not(:disabled),
#collectorDeleteButton:hover:not(:disabled),
.export-quiet-delete:hover:not(:disabled),
.image-inline-delete:hover:not(:disabled),
.removal-secondary-button.danger:hover:not(:disabled),
.logout-action:hover:not(:disabled) {
  border-color: rgba(156, 74, 68, 0.34) !important;
  background: #f7e7e4 !important;
  color: #8d413c !important;
}

.runtime-dialog-button.danger,
.runtime-dialog-button.primary.danger {
  border-color: var(--yf-danger) !important;
  background: var(--yf-danger) !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14) !important;
}

.runtime-dialog-button.danger:hover {
  border-color: #8d413c !important;
  background: #8d413c !important;
}

/* 禁用态：降低视觉权重但保持可辨识 */
button:disabled,
button[disabled],
.collector-button:disabled,
.export-mapping-button:disabled,
.export-complete-button:disabled {
  border-color: transparent !important;
  background: var(--yf-disabled-bg) !important;
  color: var(--yf-disabled-text) !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

/* 导出类按钮改为描边样式，实心绿只留给主操作 */
#exportCompleteTable:not(:disabled) {
  border-color: var(--yf-line) !important;
  background: #fff !important;
  color: var(--yf-primary-text) !important;
}

#exportCompleteTable:hover:not(:disabled) {
  border-color: rgba(47, 107, 79, 0.34) !important;
  background: var(--yf-primary-soft) !important;
}

/* 缺模板按钮在有内容时用警示描边，避免被忽略 */
#exportMissingTemplatePlan:not([hidden]) {
  border-color: rgba(138, 106, 47, 0.34) !important;
  background: var(--yf-warn-soft) !important;
  color: var(--yf-warn) !important;
}

/* ---------- 4. 工具栏排版 ---------- */
/* 文案优化工具条同样按状态显示：清空要有内容，删除/祛除/转入要有勾选 */
body.copywriting-app .commandBar #clearCopywritingPage[hidden],
body.copywriting-app .commandBar #clearParsePage[hidden],
body.copywriting-app .commandBar #deleteSelected[hidden],
body.copywriting-app .commandBar #embeddedDeleteRemovalSelected[hidden],
body.copywriting-app .commandBar #embeddedStripBrandTerms[hidden],
body.copywriting-app .commandBar #embeddedTransferExport[hidden] {
  display: none !important;
}

/* 上架准备头部同样按状态显示：有商品才出现生成/清空，可导出才出现导出 */
body.erp-app .export-listing-header #clearExportPage[hidden],
body.erp-app .export-listing-header #startExportMapping[hidden],
body.erp-app .export-listing-header #exportMissingTemplatePlan[hidden],
body.erp-app .export-listing-header #exportCompleteTable[hidden],
body.erp-app .export-listing-header #deleteExportSelected[hidden] {
  display: none !important;
}

/* 失败恢复入口与文案 */
body.erp-app .export-listing-header .export-mapping-status.is-error {
  color: var(--yf-danger) !important;
}

body.erp-app .export-listing-header .export-mapping-recovery {
  height: 24px;
  margin-left: 6px;
  padding: 0 8px;
  border: 1px solid rgba(47, 107, 79, 0.28);
  border-radius: 6px;
  background: #fff;
  color: var(--yf-primary-text);
  font-size: var(--yf-font-min);
  font-weight: 650;
  cursor: pointer;
}

body.erp-app .export-listing-header .export-mapping-recovery:hover {
  background: var(--yf-primary-soft);
}

/* 缺模板按钮移到右侧操作组后，保持与导出按钮同高同距 */
body.erp-app .export-listing-actions #exportMissingTemplatePlan {
  height: var(--yf-control-sm) !important;
  min-height: var(--yf-control-sm) !important;
  max-height: var(--yf-control-sm) !important;
}

/* 弹窗按钮宽度统一：次要 64px、主操作/危险 88px */
.export-file-modal .account-modal-button,
.watermark-tool-modal .account-modal-button,
.account-modal .account-modal-button,
body.erp-app .modal-btn {
  min-width: 64px;
}

.export-file-modal .account-modal-button.primary,
.watermark-tool-modal .account-modal-button.primary,
.account-modal .account-modal-button.primary,
body.erp-app .modal-btn.confirm {
  min-width: 88px;
}

/* 导出按钮第一次可用时轻微呼吸一次，避免突然出现被忽略 */
body.erp-app .export-listing-header #exportCompleteTable.attention {
  animation: yf-export-attention 1.6s ease !important;
}

@keyframes yf-export-attention {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 107, 79, 0);
  }
  20% {
    box-shadow: 0 0 0 5px rgba(47, 107, 79, 0.18);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(47, 107, 79, 0.09);
  }
  75% {
    box-shadow: 0 0 0 4px rgba(47, 107, 79, 0.13);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(47, 107, 79, 0);
  }
}

/* 生成中：按钮保持实心绿 + 缓慢呼吸，配合“正在匹配类目模板… 12s”文案 */
body.erp-app .export-listing-header #startExportMapping[aria-busy="true"] {
  border-color: var(--yf-primary) !important;
  background: var(--yf-primary) !important;
  color: #fff !important;
  cursor: progress !important;
  box-shadow: none !important;
  animation: yf-mapping-pulse 1.5s ease-in-out infinite !important;
}

@keyframes yf-mapping-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.84;
  }
}

.previewDangerZone {
  gap: 8px !important;
}

/* 采集筛选：开始采集固定为操作组第一位，按钮按语义分组留白 */
.collector-commandbar {
  gap: 16px !important;
}

.collector-commandbar-side {
  gap: 8px !important;
}

/* 按钮不再被压缩：装不下时整组换到第二行，而不是把字挤扁或横向溢出 */
body.source-inbox-frame-page .collector-commandbar {
  flex-wrap: wrap !important;
  row-gap: 8px !important;
}

body.source-inbox-frame-page .collector-commandbar :is(.collector-button, .page-clear-button) {
  flex: 0 0 auto !important;
}

/* 2026-09-18（老板要求）：输入框右端要停在表头「链接」那一列的右侧竖线上，并且定死不跳。
   原来这里是 flex:1 1 260px，输入框会占满整行 —— 很长，而且采集开始后右侧多了
   「暂停/停止/状态」就把它挤窄（老板 09-16 提的「开始后突然变短」就是这个）。
   实测（无头 Chrome + 老板截图同一批商品数据）：「链接」列右竖线到输入框左边的距离
   ≈ 0.452 × 工具栏内容宽 − 88px（百分比是按工具栏内容宽算的，不是外框宽）；
   在老板的 1920 窗口里内容宽 1750px → 703px，
   正好等于截图里那条竖线的位置。这个公式在别的窗口宽度下也贴着那条线走。
   数据是表格列宽的函数（表格是 auto 布局），所以这里用比例而不是写死像素。 */
body.source-inbox-frame-page .collector-commandbar .collector-links-input {
  flex: 0 0 auto !important;
  width: calc(45.2% - 88px) !important;
  max-width: calc(100% - 192px) !important;
  min-width: 220px !important;
}

/* 窄屏（≤1180px）工具栏本来就要换行，输入框占满整行，别再按 75% 算。 */
@media (max-width: 1180px) {
  body.source-inbox-frame-page .collector-commandbar .collector-links-input {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
  }
}

body.source-inbox-frame-page .collector-commandbar-side {
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}

#collectorStartButton {
  order: -1;
}

/* 上架准备头部固定三列，不做换行导致的高度跳动 */
body.erp-app .export-listing-header {
  grid-template-columns: minmax(140px, 1fr) minmax(300px, auto) minmax(180px, 1fr) !important;
  align-items: center !important;
  overflow-x: auto !important;
}

body.erp-app .export-clear-toolbar,
body.erp-app .export-mapping-center,
body.erp-app .export-listing-actions {
  justify-self: auto !important;
}

body.erp-app .export-clear-toolbar {
  justify-self: start !important;
}

body.erp-app .export-mapping-center {
  justify-self: center !important;
}

body.erp-app .export-listing-actions {
  justify-self: end !important;
}

/* 侧栏与账号区层次 */
.erp-app .nav button {
  min-height: var(--yf-control-lg) !important;
}

body.erp-app .user-name {
  color: #5b655f !important;
}

/* ---------- 5. 表格与空状态 ---------- */
/* 采集结果行：明确“整行可点”，并给标题单元格一个显式详情入口 */
body.source-inbox-frame-page #collectorResultTable tbody tr {
  cursor: pointer;
}

body.source-inbox-frame-page #collectorResultTable tbody tr:hover td {
  background: #f7fbf8;
}

body.source-inbox-frame-page #collectorResultTable tbody tr.selected td {
  background: #eef3ed;
}

#dataTable td,
#outputTable td,
.collector-table-wrap td,
.export-listing-table-wrap td,
.removal-table-wrap td,
.image-opt-table-wrap td {
  height: 60px !important;
  max-height: 60px !important;
}

#dataTable th,
#outputTable th,
.collector-table-wrap th,
.export-listing-table-wrap th {
  height: 34px !important;
}

.export-listing-table-wrap th {
  height: 38px !important;
}

/* SKU 列保持可读宽度，长 SKU 走省略号而不是被压成两行 */
#dataTable col.col-sku,
#outputTable col.col-sku,
.collector-table-wrap col.col-sku,
.export-listing-table-wrap col.col-sku {
  width: 120px !important;
}

.collector-table-wrap img,
.image-cell img,
.removal-table-wrap img {
  max-height: 48px !important;
}

.collector-empty-state,
.emptyCell,
.embeddedRemovalEmpty,
.embeddedRemovalEmptyState td,
.export-empty-state,
.image-opt-empty-state {
  color: #8e9792 !important;
  font-size: var(--yf-font-base) !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
  text-align: center !important;
}

/* 三处「暂无数据」与上架准备完全对齐：同字号、同颜色、同居中方式 */
:is(body.erp-app, body.copywriting-app, body.source-inbox-frame-page) :is(
  #dataTable .emptyCell,
  #dataTable tbody.centeredEmptyState td,
  .embeddedRemovalEmpty,
  .embeddedRemovalEmptyState td,
  .export-listing-empty,
  .centered-empty-state td,
  .collector-empty-state
) {
  color: #8e9792 !important;
  font-size: var(--yf-font-base) !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
  text-align: center !important;
  vertical-align: middle !important;
}

body.copywriting-app #dataTable .emptyCell,
body.copywriting-app #dataTable tbody.centeredEmptyState td,
body.copywriting-app .embeddedRemovalEmpty {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* 采集工具栏按状态显示：空闲只留开始，采集中换成暂停+停止，选中行才出现转入/删除。
   这些按钮的 hidden 属性曾被历史样式表的 display!important 覆盖，这里统一兜住。 */
body.source-inbox-frame-page .collector-commandbar #collectorStartButton[hidden],
body.source-inbox-frame-page .collector-commandbar #collectorPauseButton[hidden],
body.source-inbox-frame-page .collector-commandbar #collectorStopButton[hidden],
body.source-inbox-frame-page .collector-commandbar #collectorTransferButton[hidden],
body.source-inbox-frame-page .collector-commandbar #collectorDeleteButton[hidden],
/* 2026-09-13：新「查看已跳过」+ 三枚按状态显示的工具按钮（品牌词替换 / 顺序替换 / 撤销替换）同样兜住 hidden。 */
body.source-inbox-frame-page .collector-commandbar #collectorSkippedButton[hidden],
body.source-inbox-frame-page .collector-commandbar #collectorBrandReplaceButton[hidden],
body.source-inbox-frame-page .collector-commandbar #collectorOrderButton[hidden],
body.source-inbox-frame-page .collector-commandbar #collectorBrandUndoButton[hidden] {
  display: none !important;
}

/* 2026-09-15：下载采集器从店铺库存搬到采集筛选页之后，它是个 <a>，
   老样式表把 .collector-button 的 display 定死了，结果 [hidden] 藏不住 ——
   扩展已经装好、JS 把 hidden 设上了，页面上还是显示「下载采集器」。
   这里把这条兜住（命令栏里所有 <a> 的 hidden 一起兜）。 */
body.source-inbox-frame-page .collector-commandbar a[hidden],
body.source-inbox-frame-page .collector-commandbar #collectorExtensionLink[hidden] {
  display: none !important;
}

/* 2026-09-15（重大）：采集筛选页的空状态块被 layout-unified-v188 里的
   `body.source-inbox-frame-page .collector-empty-state { display:flex !important; height:100% }`
   顶掉了 [hidden]，于是「有数据」时它照样占满整块内容区（高 736px），
   把真正的结果表整张挤到可视区外面 —— 表现就是「上面说合格 3 个，下面一个都不显示」。
   这里用更高权重把 hidden 抢回来：只有没数据的时才铺满。 */
body.source-inbox-frame-page #collectorEmptyState[hidden] {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* 2026-09-15（总兜底）：这类事故的本质是「历史样式表用 display!important 压掉了 hidden」，
   从下载采集器到空状态已经踩了两次。这里把「hidden 就是隐藏」这条平台默认规则，
   在采集筛选页和 ERP 外壳里整体抢回来 —— 以后新加的元素用 hidden 一定藏得住，
   不需要再逐个 id 打补丁。要显示某元素就用「去掉 hidden」，不要用 display 硬压。 */
/* 类名重复两次是为了把权重抬到 (0,3,2)：历史上那批「按钮统一 inline-flex !important」的规则
   里有 :is(.icon-button.has-label, …) 这种 (0,3,1) 的选择器，普通写法压不过它。 */
html body.source-inbox-frame-page.source-inbox-frame-page [hidden],
html body.erp-app.erp-app [hidden] {
  display: none !important;
}

/* ---------- 7. 图标按钮 ---------- */
/* 单元格长文本悬停提示：替代浏览器原生 title 弹层（原生长文本会撑成大黑框） */
.yf-hover-tip {
  position: fixed;
  z-index: 9999;
  max-width: min(420px, calc(100vw - 24px));
  max-height: 200px;
  overflow: auto;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--yf-radius-control);
  background: rgba(20, 26, 30, 0.96);
  color: #fff;
  font-size: var(--yf-font-sm);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  pointer-events: none;
  box-shadow: 0 10px 28px rgba(17, 24, 28, 0.28);
}

.yf-hover-tip[hidden] {
  display: none !important;
}

@media (hover: none) {
  .cellCopyButton,
  #dataTable td .cellCopyButton,
  #outputTable td .cellCopyButton {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- 8. 弹窗统一 ---------- */
.runtime-dialog-backdrop,
.modal-backdrop,
.collector-detail-backdrop,
.erp-image-zoom-backdrop {
  background: var(--yf-backdrop) !important;
  transition: opacity var(--yf-dur-base) ease !important;
}

:is(
  body.erp-app,
  body.copywriting-app,
  body.api-app,
  body.templates-app,
  body.source-inbox-frame-page
) .runtime-dialog,
:is(body.erp-app, body.copywriting-app, body.api-app, body.templates-app) :is(.system-modal, .export-file-modal, .watermark-tool-modal) {
  width: min(380px, calc(100vw - 28px)) !important;
  max-width: 380px !important;
  border-radius: var(--yf-radius-dialog) !important;
  box-shadow: var(--yf-shadow-dialog) !important;
}

:is(body.erp-app, body.copywriting-app, body.api-app, body.templates-app) .account-modal,
:is(body.erp-app, body.copywriting-app, body.api-app, body.templates-app) .product-detail-drawer,
:is(body.erp-app, body.copywriting-app, body.api-app, body.templates-app) .collector-detail {
  width: min(560px, calc(100vw - 28px)) !important;
  max-width: 560px !important;
  border-radius: var(--yf-radius-dialog) !important;
  box-shadow: var(--yf-shadow-dialog) !important;
}

:is(
  body.erp-app,
  body.copywriting-app,
  body.api-app,
  body.templates-app,
  body.source-inbox-frame-page
) .runtime-dialog:has(.runtime-dialog-input) {
  width: min(560px, calc(100vw - 28px)) !important;
  max-width: 560px !important;
}

:is(
  body.erp-app,
  body.copywriting-app,
  body.api-app,
  body.templates-app,
  body.source-inbox-frame-page
) .runtime-dialog-copy h2 {
  font-size: var(--yf-font-lg) !important;
  line-height: 22px !important;
}

:is(
  body.erp-app,
  body.copywriting-app,
  body.api-app,
  body.templates-app,
  body.source-inbox-frame-page
) .runtime-dialog-copy p {
  color: var(--yf-text-soft) !important;
  font-size: var(--yf-font-base) !important;
  line-height: 1.62 !important;
}

:is(
  body.erp-app,
  body.copywriting-app,
  body.api-app,
  body.templates-app,
  body.source-inbox-frame-page
) .runtime-dialog-actions {
  gap: 10px !important;
}

:is(
  body.erp-app,
  body.copywriting-app,
  body.api-app,
  body.templates-app,
  body.source-inbox-frame-page
) .runtime-dialog-button.secondary:not(:disabled) {
  min-width: 64px !important;
}

:is(
  body.erp-app,
  body.copywriting-app,
  body.api-app,
  body.templates-app,
  body.source-inbox-frame-page
) .runtime-dialog-button.primary:not(:disabled) {
  min-width: 88px !important;
}

/* 结果类提示不再抢占焦点：toast 可点击关闭 */
.moduleToast,
.collector-toast,
.erp-toast,
.watermark-toast {
  cursor: pointer !important;
  font-size: var(--yf-font-sm) !important;
  transition-duration: var(--yf-dur-fast) !important;
}

/* ---------- 9. 文案与分隔符统一 ---------- */
.collector-campaign-dot,
.commandMeta span + span,
.collector-selection-meta span + span {
  margin: 0 6px !important;
  padding-left: 0 !important;
  border-left: 0 !important;
  color: #9aa39d !important;
}

.collector-campaign-result b,
.collector-selection-meta strong,
.export-selection-meta strong {
  color: var(--yf-text) !important;
  font-weight: 650 !important;
}

/* ---------- 10. 组件圆角统一 ---------- */
.contentCard,
.collector-shell,
.tableWrap,
.collector-table-frame,
.parseInputPane,
.embeddedRemovalPane,
.removal-table-card,
.image-opt-table-card,
.accounts-table-panel {
  border-radius: var(--yf-radius-panel) !important;
}

.collector-button,
.workflowButton,
.pageClearButton,
.embeddedRemovalButton,
.user-name,
.collector-page-size select,
.collector-links-input {
  border-radius: var(--yf-radius-control) !important;
}

/* ---------- 11. 窄屏：工具栏允许两行但外壳必须让位 ---------- */
@media (max-width: 1180px) {
  body.copywriting-app .workspaceShell,
  body.source-inbox-frame-page .collector-shell {
    grid-template-rows: auto minmax(0, 1fr) !important;
  }

  .commandBar,
  .collector-commandbar {
    position: relative !important;
    z-index: 20 !important;
  }

  body.copywriting-app .previewDangerZone {
    justify-self: start !important;
  }

  body.copywriting-app .commandMeta {
    justify-self: end !important;
  }
}

/* 已选条数常驻脚注，勾选后不再需要猜按钮为何可用 */

/* ---------- 12. 三页同构外壳：工具条卡片 / 内容卡片 / 底部轨道 ---------- */
/* 采集筛选、文案优化、上架准备统一成同一种骨架：
   一条工具条卡片 → 一片内容卡片 → 一条底部轨道（左「每页 N 条」、右「上一页/下一页」）。
   轨道高度固定 39px，加上 6px 外边距正好与左栏「老板」上方的分隔线齐平，
   三页来回切换时不再出现「有的是卡片、有的是上下黏连」的观感差异。 */
:is(body.source-inbox-frame-page, body.copywriting-app, body.erp-app) {
  --yf-shell-pad: 6px;
  --yf-shell-gap: 6px;
  --yf-toolbar-h: 52px;
  --yf-shell-rail: 41px;
  --yf-shell-line: rgba(60, 60, 67, 0.08);
}

:is(body.source-inbox-frame-page .collector-shell, body.copywriting-app .workspaceShell, body.erp-app #view-导出上架 .yf-export-shell) {
  height: 100% !important;
  min-height: 0 !important;
  /* 上架准备的历史规则给 .view 加了 justify-items:center，
     空数据时外壳会被压成内容宽度（约 710px）居中显示，这里强制铺满。 */
  width: 100% !important;
  max-width: none !important;
  justify-self: stretch !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: var(--yf-shell-gap) !important;
  padding: var(--yf-shell-pad) !important;
  overflow: hidden !important;
  background: transparent !important;
}

:is(body.source-inbox-frame-page .collector-shell, body.copywriting-app .workspaceShell) {
  grid-template-rows: auto minmax(0, 1fr) var(--yf-shell-rail) !important;
}

/* 上架准备多一行「缺模板商品」提示条，行数固定，出现与否都不影响底部轨道位置。
   外壳用独立类名 yf-export-shell，避开历史 .export-listing-shell 的 :has() 高权重规则。 */
body.erp-app #view-导出上架 .yf-export-shell {
  grid-template-rows: auto auto minmax(0, 1fr) var(--yf-shell-rail) !important;
}

body.erp-app #view-导出上架 .export-listing-header {
  grid-row: 1 !important;
}

body.erp-app #view-导出上架 #exportMappingIssueBar {
  grid-row: 2 !important;
}

body.erp-app #view-导出上架 .export-listing-table-wrap {
  grid-row: 3 !important;
}

body.erp-app #view-导出上架 .export-listing-footer {
  grid-row: 4 !important;
}

/* 三种工具条一律做成同一张卡片：同高、同圆角、同边框、同底色 */
:is(body.source-inbox-frame-page .collector-commandbar, body.copywriting-app .commandBar, body.erp-app #view-导出上架 .export-listing-header) {
  height: var(--yf-toolbar-h) !important;
  min-height: 52px !important;
  max-height: none !important;
  padding: 6px 8px !important;
  border: 1px solid var(--yf-shell-line) !important;
  border-radius: var(--yf-radius-card) !important;
  background: rgba(255, 255, 255, 0.76) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

/* 三种内容区一律做成独立卡片，不再与工具条/分页条黏成一体 */
:is(body.source-inbox-frame-page .collector-content, body.copywriting-app .contentCard, body.erp-app #view-导出上架 .export-listing-table-wrap) {
  min-height: 0 !important;
  border: 1px solid var(--yf-shell-line) !important;
  border-radius: var(--yf-radius-card) !important;
  background: #fff !important;
  box-shadow: none !important;
}

:is(body.source-inbox-frame-page .collector-content, body.copywriting-app .contentCard) {
  overflow: hidden !important;
}

body.erp-app #view-导出上架 .export-listing-table-wrap {
  overflow: auto !important;
}

/* 底部轨道：只放分页控件，不加边框不加底，视觉上让位给内容卡片 */
:is(body.source-inbox-frame-page .collector-footer, body.copywriting-app .workspaceFooter, body.erp-app #view-导出上架 .export-listing-footer) {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  height: var(--yf-shell-rail) !important;
  min-height: var(--yf-shell-rail) !important;
  padding: 0 var(--yf-shell-pad) !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

:is(body.source-inbox-frame-page .collector-page-size, body.copywriting-app .workflow-page-size, body.erp-app #view-导出上架 .workflow-page-size,
  body.source-inbox-frame-page .collector-pager, body.copywriting-app .workflow-pagination, body.erp-app #view-导出上架 .workflow-pagination) {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--yf-text-muted) !important;
  font-size: var(--yf-font-xs) !important;
  white-space: nowrap !important;
}

/* 分页条只有「数据多到需要翻页」时才出现：
   采集筛选/文案优化用 [hidden] 属性，上架准备用 .hidden 类，两种都要压住 display:flex。 */
:is(body.source-inbox-frame-page .collector-pager, body.copywriting-app .workflow-pagination, body.erp-app #view-导出上架 .workflow-pagination):is([hidden], .hidden) {
  display: none !important;
}

:is(body.source-inbox-frame-page .collector-page-size select, body.copywriting-app .workflow-page-size select, body.erp-app #view-导出上架 .workflow-page-size select) {
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 8px !important;
  border: 1px solid var(--yf-line) !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: var(--yf-text) !important;
  font-size: var(--yf-font-xs) !important;
  line-height: 1 !important;
}

:is(body.source-inbox-frame-page .collector-pager button, body.copywriting-app .workflow-pagination button, body.erp-app #view-导出上架 .workflow-pagination button) {
  height: 26px !important;
  min-height: 26px !important;
  min-width: 64px !important;
  padding: 0 10px !important;
  border: 1px solid var(--yf-line) !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #3f4a44 !important;
  font-size: var(--yf-font-xs) !important;
  font-weight: 650 !important;
  box-shadow: none !important;
}

:is(body.source-inbox-frame-page .collector-pager button, body.copywriting-app .workflow-pagination button, body.erp-app #view-导出上架 .workflow-pagination button):disabled {
  cursor: not-allowed !important;
  opacity: 0.45 !important;
  background: #fff !important;
}

/* 窄屏：工具条允许换到第二行，外壳行数不变，底部轨道始终贴在分隔线上 */
/* AI 结果回填：左右两块也拆成独立卡片，避免「一块大卡里嵌两条」的割裂感 */
body.copywriting-app .contentCard:has(#panel-parse.active) {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: hidden !important;
}

body.copywriting-app #panel-parse.active :is(.parseInputPane, .embeddedRemovalPane) {
  min-height: 0 !important;
  border: 1px solid var(--yf-shell-line) !important;
  border-radius: var(--yf-radius-card) !important;
  background: #fff !important;
  overflow: hidden !important;
}

/* iframe 宽度 ≈ 视口 - 138px，断点按主文档的外层内边距切换点（视口 1280px）换算，
   这样三种页面在同一视口宽度下同时切换，分隔线始终对齐。 */
@media (max-width: 1142px) {
  :is(body.source-inbox-frame-page, body.copywriting-app) {
    --yf-shell-pad: 4px;
    --yf-shell-rail: 39px;
  }

  :is(body.source-inbox-frame-page .collector-commandbar, body.copywriting-app .commandBar) {
    height: auto !important;
    min-height: 52px !important;
    flex-wrap: wrap !important;
  }
}

/* 上架准备在主文档里，视口比 iframe 宽一个侧栏，断点同步右移，三种宽度下分隔线保持一致 */
@media (max-width: 1280px) {
  body.erp-app {
    --yf-shell-pad: 4px;
    --yf-shell-rail: 39px;
  }

  body.erp-app #view-导出上架 .export-listing-header {
    height: auto !important;
    min-height: 52px !important;
  }
}

/* 主文档统一广播窄屏标记：优先级高于上面的媒体查询，
   避免父页面与 iframe 各自按自身宽度判断、在边界宽度上错开几像素。 */
:is(body.erp-app, body.copywriting-app, body.source-inbox-frame-page)[data-yf-shell-narrow="1"] {
  --yf-shell-pad: 4px;
  --yf-shell-rail: 39px;
}

:is(body.erp-app, body.copywriting-app, body.source-inbox-frame-page)[data-yf-shell-narrow="0"] {
  --yf-shell-pad: 6px;
  --yf-shell-rail: 41px;
}

/* ---------- 13. 圆角收敛：控件 8px、卡片 10px，全站只用两档 ---------- */
/* 左侧菜单是 8px，账号菜单里的功能按钮却各不相同（7 / 9 / 6px），
   统一之后视觉上是一套东西。 */
body.erp-app .user-menu .user-popover,
body.erp-app .user-menu.open .user-popover,
body.erp-app .user-menu:hover .user-popover,
body.erp-app .user-menu:focus-within .user-popover {
  /* 原来面板固定 158px 宽、靠 right:0 定位，侧栏只有 108px，
     整个面板被推到屏幕左边外面，悬停高亮被视口裁成直角——这才是"直棱直角"的真因。 */
  left: 0 !important;
  right: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  transform: none !important;
  border-radius: var(--yf-radius-card) !important;
  padding: 6px !important;
  border: 1px solid var(--yf-line-soft) !important;
  box-shadow: 0 14px 34px rgba(17, 24, 28, 0.12) !important;
}

body.erp-app .user-menu-action {
  height: var(--yf-control-sm) !important;
  border-radius: var(--yf-radius-control) !important;
  color: var(--yf-text-soft) !important;
  font-size: var(--yf-font-md) !important;
  font-weight: 600 !important;
}

body.erp-app .user-menu-action:hover,
body.erp-app .user-menu-action:focus-visible {
  background: var(--yf-primary-soft) !important;
  color: var(--yf-text) !important;
}

body.erp-app .user-menu-action.logout-action {
  border-radius: var(--yf-radius-control) !important;
}

body.erp-app .user-name,
body.erp-app .account-modal-close,
body.erp-app .account-modal-button,
body.erp-app .account-editor-primary,
body.erp-app .account-editor-secondary {
  border-radius: var(--yf-radius-control) !important;
}

/* 分页条上的下拉与按钮此前是 6px，和按钮的 8px 并排看会“半圆半方” */
:is(body.source-inbox-frame-page .collector-page-size select, body.copywriting-app .workflow-page-size select, body.erp-app #view-导出上架 .workflow-page-size select) {
  border-radius: var(--yf-radius-control) !important;
}

:is(body.source-inbox-frame-page .collector-pager button, body.copywriting-app .workflow-pagination button, body.erp-app #view-导出上架 .workflow-pagination button) {
  border-radius: var(--yf-radius-control) !important;
}

body.erp-app #view-导出上架 .export-quiet-delete {
  border-radius: var(--yf-radius-control) !important;
}

/* ---------- 14. 全站细节收敛：控件高度 / 滚动条 / 表头 / 徽章 / 焦点 / 空状态 ---------- */
/* 14.1 控件高度收到三档：32（工具条）/ 36（表单、菜单）/ 40（主操作） */
:is(
  body.erp-app .account-form-feedback,
  body.erp-app .account-editor-primary,
  body.erp-app .account-editor-secondary,
  body.erp-app .modal-btn,
  body.erp-app .system-check-button,
  body.erp-app .account-add-button
) {
  border-radius: var(--yf-radius-control) !important;
}

:is(body.erp-app .account-add-button, body.erp-app .system-check-button, body.erp-app .account-editor-primary, body.erp-app .account-editor-secondary) {
  min-height: var(--yf-control-md) !important;
  height: var(--yf-control-md) !important;
  border-radius: var(--yf-radius-control) !important;
  font-size: var(--yf-font-md) !important;
}

:is(body.erp-app .modal-btn, body.erp-app .account-modal-button) {
  min-height: var(--yf-control-md) !important;
  font-size: var(--yf-font-md) !important;
}

/* 14.2 滚动条全站一种：细、无轨道底色、颜色统一（原来三页三种灰） */
:is(body.erp-app, body.copywriting-app, body.source-inbox-frame-page, body.templates-app, body.api-app) {
  scrollbar-width: thin !important;
  scrollbar-color: #c7cdd4 transparent !important;
}

:is(body.erp-app, body.copywriting-app, body.source-inbox-frame-page, body.templates-app, body.api-app) *::-webkit-scrollbar {
  width: 10px !important;
  height: 10px !important;
}

:is(body.erp-app, body.copywriting-app, body.source-inbox-frame-page, body.templates-app, body.api-app) *::-webkit-scrollbar-track {
  background: transparent !important;
}

:is(body.erp-app, body.copywriting-app, body.source-inbox-frame-page, body.templates-app, body.api-app) *::-webkit-scrollbar-thumb {
  border: 3px solid transparent !important;
  border-radius: 999px !important;
  background: #c7cdd4 !important;
  background-clip: content-box !important;
}

:is(body.erp-app, body.copywriting-app, body.source-inbox-frame-page, body.templates-app, body.api-app) *::-webkit-scrollbar-thumb:hover {
  background: #aeb6bf !important;
  background-clip: content-box !important;
}

:is(body.erp-app, body.copywriting-app, body.source-inbox-frame-page, body.templates-app, body.api-app) *::-webkit-scrollbar-corner {
  background: transparent !important;
}

/* 14.3 表头高度统一 34px（原来上架准备 42px、文案优化 34px） */
:is(body.erp-app #view-导出上架 .export-listing-table-wrap, body.copywriting-app .previewTableWrap, body.copywriting-app .embeddedRemovalTableWrap) thead th {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  font-size: var(--yf-font-sm) !important;
  font-weight: 650 !important;
}

/* 14.4 徽章统一成一种胶囊：同高、同圆角、同字号 */
:is(body.erp-app .mapping-status-badge, body.erp-app .image-status-badge, body.erp-app .system-check-badge) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 22px !important;
  padding: 2px 10px !important;
  border-radius: 999px !important;
  font-size: var(--yf-font-xs) !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

/* 14.5 焦点态统一：一圈主色描边，不再有 2px/3px/无 三种 */
:is(body.erp-app, body.copywriting-app, body.source-inbox-frame-page) :is(button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid rgba(47, 107, 79, 0.45) !important;
  outline-offset: 1px !important;
  box-shadow: none !important;
}

/* 14.6 空状态统一：整卡居中、同字号同色（上架准备与另两页此前靠上） */
:is(body.erp-app #view-导出上架 .export-listing-table-wrap, body.copywriting-app .previewTableWrap, body.copywriting-app .embeddedRemovalTableWrap) :is(.centered-empty-state, .centeredEmptyState, .embeddedRemovalEmptyState) {
  height: 100% !important;
}

/* 14.7 登录卡圆角并入全站卡片档位（原来 24px，和应用内 10px 割裂） */
body:not(.erp-app) .login-card,
body.erp-app .login-card {
  border-radius: var(--yf-radius-panel) !important;
}

/* 14.8 快照卡片 / 侧栏用户按钮高度对齐到控件档位 */
body.erp-app .user-name {
  height: var(--yf-control-md) !important;
  font-size: var(--yf-font-md) !important;
}

/* 14.9 按钮最小宽度收到三档，避免同排按钮宽窄乱跳 */
body.erp-app .account-add-button,
body.erp-app .system-check-button {
  min-width: 96px !important;
}

/* ---------- 15. 类目模板 / API设置：从「窄居中卡片」改为铺满 ---------- */
/* 这两页此前被历史规则限制成 min(920~1120px) 居中，和三大页「铺满卡片」
   不是同一套语言；这里统一成整宽，内部栅格保持原样。 */
/* 历史规则把这两页锁在 680px（module-tail / layout-unified-v188 里都有），
   用元素级 + 双类权重压过去，改成和三大页一样铺满。 */
body.templates-app main.template-page,
body.api-app main.api-page,
body.templates-app .template-page,
body.api-app .api-page {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  justify-self: stretch !important;
}

/* 再加一层权重：历史补丁层里有多条 .template-page/.api-page 限宽规则 */
body.templates-app.templates-app main.template-page,
body.api-app.api-app main.api-page {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

/* API 设置页还有 :has() 高权重限宽，这里把类名写两遍压到 (0,4,2) */
body.api-app.api-app main.api-page.api-page,
body.templates-app.templates-app main.template-page.template-page {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

body.templates-app .template-page {
  height: 100% !important;
  max-height: none !important;
}

body.api-app .api-page {
  height: 100% !important;
  max-height: none !important;
}

/* ---------- 16. 设计令牌收敛：12 套并行变量统一到同一套圆角档位 ---------- */
/* 现状：--yftx- / --ds- / --wb- / --m2- / --quiet- / --ref- / --sys- / --radius- 各自
   声明圆角，同一档在不同作用域是 6/8/10/14/16px。这里不改 8000+ 处引用，
   直接把变量本身重指向统一档位：控件 8 / 卡片 10 / 弹窗 12 / 胶囊 999。 */
:root,
body.erp-app,
body.copywriting-app,
body.source-inbox-frame-page,
body.templates-app,
body.api-app,
body.infrastructure-app,
body.infringement-app,
body.source-inbox-app {
  --yftx-radius-small: 8px !important;
  --yftx-radius-control: 8px !important;
  --yftx-radius-card: 10px !important;
  --yftx-radius-frame: 12px !important;
  --yftx-radius-panel: 12px !important;
  --yftx-radius-modal: 12px !important;

  --ds-radius-sm: 8px !important;
  --ds-radius: 8px !important;
  --ds-radius-lg: 12px !important;
  --ds-radius-frame: 12px !important;
  --ds-radius-pill: 999px !important;

  --quiet-radius: 8px !important;
  --quiet-radius-lg: 12px !important;

  --wb-radius-sm: 8px !important;
  --wb-radius: 10px !important;
  --wb-radius-lg: 12px !important;

  --m2-radius: 10px !important;
  --m2-frame-radius: 10px !important;

  --ref-radius-sm: 8px !important;
  --ref-radius: 10px !important;
  --sys-radius: 10px !important;

  --radius-control: 8px !important;
  --radius-card: 10px !important;
  --radius-frame: 12px !important;
  --radius-small: 8px !important;
}

/* ---------- 17. 表格平铺：按卡片宽度自适应，不再出现横向滚动条 ---------- */
/* 上架准备：16 列固定 px 宽度（合计 2504px）塞进 1448px 容器，只能左右拖。
   历史规则用 :nth-child / :not(:has()) 把权重抬到 (1,3,3)，还会同时锁 th/td 宽度，
   所以这里用双 id 权重整段覆盖，列宽改由 colgroup 的百分比决定。 */
body.erp-app #view-导出上架 #exportListingTable {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  table-layout: fixed !important;
}

/* 列宽已经算好，纵向照旧滚动，横向不再出现滚动条（含 1px 舍入溢出） */
body.erp-app #view-导出上架 .export-listing-table-wrap {
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body.erp-app #view-导出上架 #exportListingTable > colgroup > col,
body.erp-app #view-导出上架 #exportListingTable > thead > tr > th,
body.erp-app #view-导出上架 #exportListingTable > tbody > tr > td {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

/* 单元格内容自己收口，避免长 URL / 长文本把表格撑出横向溢出 */
body.erp-app #view-导出上架 #exportListingTable > tbody > tr > td {
  overflow: hidden !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

body.erp-app #view-导出上架 #exportListingTable > colgroup > col.export-col-select,
body.erp-app #view-导出上架 #exportListingTable > thead > tr > th.export-select-cell,
body.erp-app #view-导出上架 #exportListingTable > tbody > tr > td.export-select-cell {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
}

body.erp-app #view-导出上架 #exportListingTable > colgroup > col.image-col-image,
body.erp-app #view-导出上架 #exportListingTable > colgroup > col.export-optimized-image-column {
  width: 7% !important;
  min-width: 78px !important;
  max-width: 110px !important;
}

body.erp-app #view-导出上架 #exportListingTable > colgroup > col.image-col-sku {
  width: 8% !important;
}

body.erp-app #view-导出上架 #exportListingTable > colgroup > col.image-col-name {
  width: 15% !important;
}

body.erp-app #view-导出上架 #exportListingTable > colgroup > col.image-col-brand {
  width: 7% !important;
}

body.erp-app #view-导出上架 #exportListingTable > colgroup > col.image-col-short {
  width: 8.5% !important;
}

body.erp-app #view-导出上架 #exportListingTable > colgroup > col.image-col-long {
  width: 12% !important;
}

body.erp-app #view-导出上架 #exportListingTable > colgroup > col.image-col-mapping-status {
  width: 8% !important;
}
/* 文案优化两张表同样平铺：AI 结果表原本 min-width 1280px，右侧永远挂着横向滚动条 */
body.copywriting-app #panel-parse .embeddedRemovalTableWrap > table,
body.copywriting-app #panel-preview .previewTableWrap > table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  table-layout: fixed !important;
}

body.copywriting-app #panel-parse .embeddedRemovalTableWrap > table > colgroup > col,
body.copywriting-app #panel-preview .previewTableWrap > table > colgroup > col {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

body.copywriting-app #panel-parse .embeddedRemovalTableWrap > table > colgroup > col.selectionColumn,
body.copywriting-app #panel-preview .previewTableWrap > table > colgroup > col.selectionColumn {
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
}

/* 勾选列收窄后，表头/单元格的内边距同步收紧，多出来的宽度让给内容列 */
body.copywriting-app :is(#panel-preview .previewTableWrap, #panel-parse .embeddedRemovalTableWrap) :is(th.selectCell, td.selectCell, th.embeddedRemovalSelect, td.embeddedRemovalSelect) {
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
}

body.copywriting-app #panel-parse .embeddedRemovalTableWrap > table > colgroup > col.col-sku,
body.copywriting-app #panel-preview .previewTableWrap > table > colgroup > col.col-sku {
  width: 11% !important;
}

body.copywriting-app #panel-parse .embeddedRemovalTableWrap > table > colgroup > col.col-name,
body.copywriting-app #panel-preview .previewTableWrap > table > colgroup > col.col-name {
  width: 20% !important;
}

body.copywriting-app #panel-parse .embeddedRemovalTableWrap > table > colgroup > col.col-short,
body.copywriting-app #panel-preview .previewTableWrap > table > colgroup > col.col-short {
  width: 10% !important;
}

body.copywriting-app #panel-parse .embeddedRemovalTableWrap > table > colgroup > col.col-long,
body.copywriting-app #panel-preview .previewTableWrap > table > colgroup > col.col-long {
  width: 17% !important;
}

/* 粘贴 AI 结果的输入框占满整张卡片：状态提示浮在右下角，不再单独占一行 */
body.copywriting-app #panel-parse.active .parseInputPane {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
}

body.copywriting-app #panel-parse.active .parseInputPane #aiResult {
  flex: 1 1 auto !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
}

body.copywriting-app #panel-parse.active .parseInputPane .message {
  position: absolute !important;
  right: 12px !important;
  bottom: 10px !important;
  z-index: 2 !important;
  max-width: calc(100% - 24px) !important;
  margin: 0 !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: var(--yf-text-muted) !important;
  font-size: var(--yf-font-xs) !important;
  line-height: 18px !important;
  pointer-events: none !important;
}


/* 文案优化两张表：最左侧勾选列固定 28px（fixed 布局下必须同时锁 col 与 th/td，
   否则剩余空间会被均分给该列，反而变宽）。 */
body.copywriting-app .previewTableWrap col.selectionColumn,
body.copywriting-app .embeddedRemovalTableWrap col.selectionColumn {
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
}

body.copywriting-app .previewTableWrap th.selectCell,
body.copywriting-app .previewTableWrap td.selectCell,
body.copywriting-app .embeddedRemovalTableWrap th.embeddedRemovalSelect,
body.copywriting-app .embeddedRemovalTableWrap td.embeddedRemovalSelect {
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
}

/* 勾选列：历史补丁里有多条 .selectCell 定宽规则，这里把类名写两遍抬到 (0,4,x) 压住。 */
body.copywriting-app.copywriting-app .previewTableWrap.previewTableWrap col.selectionColumn,
body.copywriting-app.copywriting-app .embeddedRemovalTableWrap.embeddedRemovalTableWrap col.selectionColumn {
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
}

body.copywriting-app.copywriting-app .previewTableWrap.previewTableWrap th.selectCell,
body.copywriting-app.copywriting-app .previewTableWrap.previewTableWrap td.selectCell,
body.copywriting-app.copywriting-app .embeddedRemovalTableWrap.embeddedRemovalTableWrap th.embeddedRemovalSelect,
body.copywriting-app.copywriting-app .embeddedRemovalTableWrap.embeddedRemovalTableWrap td.embeddedRemovalSelect {
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
}

/* 勾选列最终定宽：必须比本文件里那条 col{width:auto} 的通用重置更精确，
   否则该列会变成 auto 并吞掉表格剩余宽度（实测被撑到 188px）。 */
body.copywriting-app #panel-preview .previewTableWrap > table > colgroup > col.selectionColumn,
body.copywriting-app #panel-parse .embeddedRemovalTableWrap > table > colgroup > col.selectionColumn {
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
}

body.copywriting-app #panel-preview .previewTableWrap > table > thead > tr > th.selectCell,
body.copywriting-app #panel-preview .previewTableWrap > table > tbody > tr > td.selectCell,
body.copywriting-app #panel-parse .embeddedRemovalTableWrap > table > thead > tr > th.embeddedRemovalSelect,
body.copywriting-app #panel-parse .embeddedRemovalTableWrap > table > tbody > tr > td.embeddedRemovalSelect {
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
}

/* ---------- 17. 响应观感收口：主色 / 弹窗 / 控件高度（只改表现，不改功能） ---------- */
/* 17.1 主色收敛：登录主按钮此前落到历史 accent（#0e6b58），与其它主操作的
   --yf-primary（#2f6b4f）不是同一个绿。历史层里有大量更高权重的 accent 覆盖，
   这里用双类 + 双类把登录按钮并回唯一主色。 */
body.erp-app.erp-app .login-card #loginSubmitBtn {
  border-color: var(--yf-primary) !important;
  background: var(--yf-primary) !important;
  color: #fff !important;
}

body.erp-app.erp-app .login-card #loginSubmitBtn:hover:not(:disabled) {
  border-color: var(--yf-primary-hover) !important;
  background: var(--yf-primary-hover) !important;
}

/* 17.2 弹窗宽度收到三档：确认 360 / 表单 440 / 抽屉 560（抽屉已是 560）。
   .system-modal 在历史层里有 22 条 width 声明，最近生效的是 300px，
   比设计档位窄一档，中文确认文案换行过多。 */
body.erp-app.erp-app #systemModal .system-modal {
  width: min(360px, calc(100vw - 28px)) !important;
  max-width: 360px !important;
}

body.erp-app.erp-app #exportFileModal .export-file-modal {
  width: min(440px, calc(100vw - 28px)) !important;
  max-width: 440px !important;
}

/* 17.3 弹窗动作行不再被裁：导出弹窗有四个按钮（取消 / 保存到桌面 /
   上传到亚马逊后台 / 导出），一行需要 508px，而弹窗只有 340px 且
   overflow:hidden，最后一个按钮会被裁掉。允许换行后任意按钮数都完整可见。 */
body.erp-app :is(.system-modal-actions, .export-file-modal-actions, .account-editor-actions, .runtime-dialog-actions) {
  flex-wrap: wrap !important;
  row-gap: 8px !important;
}

/* 17.4 弹窗正文 12px → 13px：确认文案与提示是最需要读清楚的一段。 */
body.erp-app.erp-app #systemModal #modalMessage,
body.erp-app.erp-app #exportFileModal #exportFileMessage,
body.erp-app.erp-app #systemModal .system-modal-copy p,
body.erp-app.erp-app #exportFileModal .export-file-modal-copy p {
  font-size: var(--yf-font-base) !important;
  line-height: 1.6 !important;
}

/* 17.5 圆角收敛：大图预览是唯一 10px 的浮层，并入弹窗档位 12px。 */
body.erp-app.erp-app .erp-image-zoom-dialog {
  border-radius: var(--yf-radius-dialog) !important;
}

/* 17.6 控件高度收到三档（32 / 36 / 40）：分页按钮与每页下拉此前是 26px，
   低于可舒适点击的下限；删除按钮 34px、弹窗关闭 30px 也各是一档。 */
:is(
  body.erp-app #view-导出上架 .workflow-pagination button,
  body.erp-app #view-导出上架 .workflow-page-size select,
  body.source-inbox-frame-page .collector-pager button,
  body.source-inbox-frame-page .collector-page-size select,
  body.copywriting-app .workflow-pagination button,
  body.copywriting-app .workflow-page-size select
) {
  height: var(--yf-control-sm) !important;
  min-height: var(--yf-control-sm) !important;
  max-height: var(--yf-control-sm) !important;
  font-size: var(--yf-font-sm) !important;
}

body.erp-app.erp-app #deleteExportSelected {
  height: var(--yf-control-sm) !important;
  min-height: var(--yf-control-sm) !important;
  max-height: var(--yf-control-sm) !important;
}

body.erp-app.erp-app :is(.account-editor-close, .product-detail-close, .erp-image-zoom-close) {
  height: var(--yf-control-sm) !important;
  min-height: var(--yf-control-sm) !important;
  max-height: var(--yf-control-sm) !important;
}

/* ---------- 18. 外壳显隐：恢复 .hidden 语义（首屏 CLS 与半屏多余布局的根因） ---------- */
/* #appView / #loginView 在历史层里有多条 `display:grid !important` 的 id 级规则，
   权重都高于 `.hidden`，于是 `.hidden` 对这两个外壳完全失效：
   1) 未登录时整个 ERP 外壳仍参与布局并绘制在登录卡下方（body 高度 905 → 1810）；
   2) 外壳消失时整屏塌陷，实测 CLS 0.571。
   ui.js 的 openApp/closeApp 本来就是靠 .hidden 切换两个外壳，这里把语义补回来。 */
body.erp-app.erp-app #appView.hidden,
body.erp-app.erp-app #loginView.hidden {
  display: none !important;
}

/* ---------- 19. 点击即时反馈（第三方动作不可能毫秒，但"我按到了"必须同帧可见） ---------- */
/* 历史规则里 button:active 被写成 transform:none，按下去只有颜色过渡（有几帧延迟），
   长耗时动作（生成模板 / 上传亚马逊 / 甄选）点完容易以为没反应。
   这里让按下态不走过渡、当帧变暗并加内阴影；不改变任何按钮的行为。 */
:is(
  body.erp-app,
  body.copywriting-app,
  body.source-inbox-frame-page,
  body.templates-app,
  body.api-app
) :is(button, .collector-button, [role="button"]):active:not(:disabled) {
  transition: none !important;
  filter: brightness(0.93) !important;
  box-shadow: inset 0 1px 2px rgba(16, 24, 20, 0.18) !important;
}

/* 触摸端去掉 300ms 点击延迟与高亮闪烁（桌面端无影响）。 */
:is(
  body.erp-app,
  body.copywriting-app,
  body.source-inbox-frame-page,
  body.templates-app,
  body.api-app
) :is(button, .collector-button, [role="button"], select, input[type="checkbox"], input[type="radio"]) {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* 17.7 危险动作同一种长相：清空上架准备此前是中性白按钮，
   与同页的「删除」危险色不一致；两者都属于"会丢数据"的动作。 */
body.erp-app.erp-app #clearExportPage {
  border-color: var(--yf-danger-line) !important;
  background: var(--yf-danger-soft) !important;
  color: var(--yf-danger) !important;
}

body.erp-app.erp-app #clearExportPage:hover:not(:disabled) {
  border-color: rgba(156, 74, 68, 0.36) !important;
  background: #f7e5e2 !important;
  color: #8d3f3a !important;
}
/* 系统检测「复制诊断信息」的隐藏兜底输入框（CSP 下不能用内联 style）。 */
.yftx-hidden-copy {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* 自动模式：把「需要人工点」的按钮收起来，避免和自动流程打架。
   随时可以在自动化控制台或右下角的小条上切回手动模式。 */
body.erp-app.auto-mode #startExportMapping,
body.erp-app.auto-mode #exportCompleteTable,
body.erp-app.auto-mode #exportMissingTemplatePlan,
body.erp-app.auto-mode #clearExportPage {
  display: none !important;
}

body.erp-app.auto-mode .export-clear-toolbar,
body.erp-app.auto-mode .export-listing-actions {
  pointer-events: none;
}

.auto-mode-chip {
  position: fixed;
  right: 18px;
  bottom: 16px;
  z-index: 40;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(47, 107, 79, .28);
  border-radius: 999px;
  background: #eaf3ed;
  color: #2f6b4f;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(34, 43, 38, .10);
}

.auto-mode-chip:hover {
  background: #dfeee5;
}

.auto-mode-chip[hidden] {
  display: none !important;
}

/* ---------- 自动化：看得见的执行 + 随时接管 ---------- */

@keyframes yftx-auto-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(43, 108, 176, .45); }
  50% { box-shadow: 0 0 0 8px rgba(43, 108, 176, 0); }
}

.auto-action-chip[hidden] {
  display: none !important;
}

.auto-action-chip.show {
  animation: yftx-chip-in .16s ease both;
}

@keyframes yftx-chip-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.auto-action-takeover:hover {
  background: #e6effa;
}

/* 2026-09-12 上架准备：次要信息弱化。
   只降视觉权重（颜色变浅、去掉加粗感），不动字号、不动功能、不动导出字段名。
   入选依据：全站文字清单里这些是 A 级（有用但不必抢眼）。 */
body.erp-app #exportListingTable thead th[data-export-field="\56FE\7247"],
body.erp-app #exportListingTable thead th[data-export-field="\6700\7EC8\4EF7\683C"],
body.erp-app #exportListingTable thead th[data-export-field="Product Type"],
body.erp-app #exportListingTable thead th[data-export-field="\5206\7C7B\8DEF\5F84"] {
  color: var(--quiet-subtle) !important;
  font-weight: 600 !important;
}

body.erp-app #exportSelectedMeta,
body.erp-app .export-listing-header .export-mapping-center #exportMappingStatus,
body.erp-app .export-product-mode-fixed {
  color: var(--quiet-subtle) !important;
  font-weight: 500 !important;
}

/* 2026-09-12 系统检测：把「复制诊断信息」收成图标按钮（低频动作，页头只留一个主按钮 + 一个图标）。
   图标按钮不再靠改文字反馈：复制成功/失败只换图标和悬停说明。 */
body.erp-app .system-check-header .system-check-icon-button {
  width: 34px;
  min-width: 34px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.erp-app .system-check-header .system-check-icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.erp-app .system-check-header .system-check-icon-button .system-check-icon-done {
  display: none;
}

body.erp-app .system-check-header .system-check-icon-button[data-state="done"] .system-check-icon-copy {
  display: none;
}

body.erp-app .system-check-header .system-check-icon-button[data-state="done"] .system-check-icon-done {
  display: block;
}

body.erp-app .system-check-header .system-check-icon-button[data-state="failed"] {
  color: var(--quiet-danger) !important;
  border-color: #b33a322e !important;
}

/* 出错提示里的小「重试」按钮（配合 js/friendly-error.js） */
body.erp-app .friendly-retry-button {
  margin-left: 6px;
  height: 24px;
  padding: 0 10px;
  border: 1px solid #D2D2D7;
  border-radius: 6px;
  background: #FFFFFF;
  color: #1D1D1F;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
body.erp-app .friendly-retry-button:hover:not(:disabled) { background: #F5F5F7; }
body.erp-app .friendly-retry-button:disabled { opacity: .5; cursor: default; }

/* ===== 2026-09-14 动效与刻度统一（克制版）=====
   统一节奏：所有交互 180ms / ease-out；数字用等宽数字；系统开启「减少动态效果」时自动关掉。 */
:root {
  --yftx-ease: cubic-bezier(.2, .7, .2, 1);
  --yftx-dur: 180ms;
  --yftx-dur-fast: 140ms;
}
button,
.collector-button,
.page-clear-button,
.nav button,
a,
input,
select {
  transition:
    background-color var(--yftx-dur) var(--yftx-ease),
    color var(--yftx-dur) var(--yftx-ease),
    border-color var(--yftx-dur) var(--yftx-ease),
    box-shadow var(--yftx-dur) var(--yftx-ease),
    opacity var(--yftx-dur) var(--yftx-ease),
    transform var(--yftx-dur) var(--yftx-ease);
}
button:active,
.collector-button:active,
.nav button:active {
  transform: translateY(.5px);
}
#collectorResultTable tbody tr {
  transition: background-color var(--yftx-dur-fast) var(--yftx-ease);
}
#collectorResultTable td,
#collectorResultTable th,
#exportListingTable td,
#exportListingTable th {
  font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

/* 2026-09-14：账号菜单分组（账号 / 设置） */
body.erp-app .user-popover-group{display:block;padding:6px 8px 2px;color:var(--yftx-subtle, #8b847d);font-size:12px;font-weight:600;text-align:left}
body.erp-app .user-popover-divider{display:block;height:1px;margin:4px 6px;background:var(--line, rgba(60,60,67,.12))}
/* 2026-09-14：老板账号徽标 + 该行锁定观感 */
body.erp-app .account-owner-badge{display:inline-flex;align-items:center;margin-left:6px;padding:0 6px;border:1px solid rgba(82,112,90,.25);border-radius:999px;background:#edf4ee;color:#3d6b4a;font-size:12px;font-weight:600}
body.erp-app .account-table-row.account-row-owner{background:rgba(237,244,238,.45)}
/* 2026-09-14：缺模板入口并进「开始映射」状态提示后，那段文字可点 */
body.erp-app #exportMappingStatus.is-actionable{cursor:pointer;text-decoration:underline;text-underline-offset:3px}
/* 2026-09-14：账号列表分组标题（总账号 / 其他账号）+ 上架准备清空按钮挪到页脚 */
body.erp-app .account-list-group{background:transparent!important;border-bottom:0!important}
body.erp-app .account-list-group .account-table-cell{grid-column:1 / -1;display:flex;align-items:center;padding:10px 2px 4px;color:var(--yftx-subtle, #8b847d);font-size:12px;font-weight:600;text-align:left}
body.erp-app #view-导出上架 .export-footer-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}
/* 2026-09-14：新增账号挪到「账号列表」标题右侧，和它作用的对象在同一视线 */
body.erp-app .accounts-list-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 2px 8px}
body.erp-app .accounts-list-title{color:var(--yftx-text, #30363a);font-size:13px;font-weight:600}

/* 2026-09-14 晚 v3：API 设置页 = 账号管理那种「居中窄栏 + 模块化卡片」，小巧、表单不撑满整屏。
   注意：本文件前面有一条 body.api-app.api-app main.api-page.api-page 的 (0,4,2) 高权重限宽规则，
   这里必须用同样权重、并且放在它后面，否则压不住（上一版就是这么没生效的）。 */
body.api-app.api-app main.api-page.api-page{display:block!important;width:min(720px,100%)!important;max-width:720px!important;height:auto!important;min-height:100%!important;max-height:none!important;margin:0 auto!important;padding:18px 18px 26px!important;overflow:auto!important;background:transparent!important;border:0!important;box-shadow:none!important;grid-template-columns:none!important;gap:0!important}
body.api-app.api-app main.api-page.api-page .api-sidebar{display:block!important;position:relative!important;width:auto!important;min-height:0!important;max-height:none!important;margin:0 0 10px!important;padding:10px 12px!important;border:1px solid var(--yftx-line,var(--line))!important;border-radius:10px!important;background:#fff!important}
body.api-app.api-app main.api-page.api-page .sidebar-head{padding:0!important;border:0!important;background:transparent!important;width:auto!important}
body.api-app.api-app main.api-page.api-page .sidebar-tools{display:flex!important;gap:8px!important}
body.api-app.api-app main.api-page.api-page .connection-list{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(168px,1fr))!important;gap:6px!important;width:auto!important;max-height:126px!important;padding:8px 0 0!important;overflow:auto!important}
body.api-app.api-app main.api-page.api-page .connection-card{margin:0!important;border-radius:8px!important}
body.api-app.api-app main.api-page.api-page .connection-empty{margin:0!important}
body.api-app.api-app main.api-page.api-page .api-workspace{display:block!important;width:auto!important;height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;border:0!important;background:transparent!important}
body.api-app.api-app main.api-page.api-page .connection-form{display:block!important;height:auto!important;border:1px solid var(--yftx-line,var(--line))!important;border-radius:10px!important;background:#fff!important;overflow:hidden!important}
body.api-app.api-app main.api-page.api-page .editor-bar{padding:10px 14px!important;border-bottom:1px solid var(--yftx-line,var(--line))!important}
body.api-app.api-app main.api-page.api-page .editor-body{display:grid!important;grid-template-columns:minmax(0,1fr)!important;justify-content:stretch!important;gap:8px!important;padding:12px!important;overflow:visible!important;justify-items:stretch!important;align-content:start!important}
body.api-app.api-app main.api-page.api-page .panel-card,body.api-app.api-app main.api-page.api-page .result-card{width:100%!important;max-width:100%!important;justify-self:stretch!important;margin:0!important;padding:12px 14px!important;border:1px solid var(--yftx-line,var(--line))!important;border-radius:8px!important;background:#fbfcfd!important}
body.api-app.api-app main.api-page.api-page .advanced-card{padding:0!important}
body.api-app.api-app main.api-page.api-page .advanced-grid{padding:0 13px 13px!important}
body.api-app.api-app main.api-page.api-page .editor-actions{position:static!important;padding:10px 12px!important;border-top:1px solid var(--yftx-line,var(--line))!important}
body.api-app.api-app main.api-page.api-page .empty-editor{display:block!important;height:auto!important;padding:0!important}
body.api-app.api-app main.api-page.api-page .empty-panel{padding:16px!important;border:1px solid var(--yftx-line,var(--line))!important;border-radius:10px!important;background:#fff!important}
body.api-app.api-app main.api-page.api-page .empty-actions{justify-content:center!important}
body.api-app.api-app main.api-page.api-page:has(.connection-form:not(.hidden)) .empty-editor{display:none!important}

/* 2026-09-16（第二刀）：映射问题条上「只重跑不合格的 N 条」的按钮样式 */
.export-mapping-issue-retry {
  flex: 0 0 auto;
  margin-left: auto;
  height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(47, 107, 79, .38) !important;
  border-radius: var(--yf-radius-control, 6px);
  background: rgba(47, 107, 79, .10);
  color: #2f6b4f;
  font-size: var(--yf-font-min, 11px);
  font-weight: 650;
  line-height: 22px;
  white-space: nowrap;
  cursor: pointer;
}

.export-mapping-issue-retry:hover:not(:disabled) {
  border-color: rgba(47, 107, 79, .55) !important;
  background: rgba(47, 107, 79, .18);
}

/* ------------------------------------------------------------------ */
/* 确认弹窗的按钮：整行居中 + 收小一点                                  */
/* 2026-09-18（老板要求）：原来动作行是 flex-end 右对齐、按钮 88×32，    */
/* 两个按钮又大又偏右。现在整行居中，按钮 68×28、字号 12。              */
/* ------------------------------------------------------------------ */
body.erp-app #systemModal .system-modal-actions {
  justify-content: center !important;
  min-height: 48px !important;
  padding: 9px 16px !important;
}

body.erp-app #systemModal .system-modal-actions .modal-btn,
body.erp-app #systemModal .system-modal-actions button {
  min-width: 68px !important;
  width: auto !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 0 14px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

/* 只有一个按钮的提示弹窗：保持同样的小尺寸，别再被拉满整行 */
body.erp-app #systemModal.single-action .system-modal-actions #modalConfirmBtn,
body.erp-app #systemModal.single-action .system-modal-actions #modalCancelBtn {
  width: auto !important;
  min-width: 88px !important;
}
