/* ==========================================================================
   与飞同行 · Apple shell v193（苹果风外壳视觉层）
   --------------------------------------------------------------------------
   只做视觉：圆角、字号、层级、间距、分隔线、阴影、悬停/按下状态、过渡节奏。
   不改任何 id、不改 DOM、不改事件、不改流程/存储/接口，不改采集规则，
   不改 --collector-data-row-height（采集页「10 条/页」的行高由 collector.js 现算）。

   加载位置：system-polish.css 之后（全站末位）。
   整体回退：删掉 index.html 与 modules/source-inbox/index.html 里的这一个
   <link>，全站立刻回到 v192 的观感，不需要动其它文件。

   两条铁律（本项目踩过的坑，后续维护务必遵守）：
   1) 任何可能带 hidden 属性的元素（.modal-backdrop / .collector-empty-state /
      .collector-table-frame / .collector-bar-tools / 隐藏按钮 …）
      一律不写 display —— 会盖掉 .hidden{display:none}，弹窗就关不掉了。
   2) 用 opacity/visibility 做开合的元素（.user-popover / .erp-toast / 遮罩）
      不写 opacity、visibility、transform —— 会合不上。
   3) system-polish.css 第 938 行的缺右大括号不要补（补了会复活 178 个废弃规则块）。
   ========================================================================== */

:is(body.erp-app, body.source-inbox-frame-page) {
  --apl-ease: cubic-bezier(.32, .72, 0, 1);
  --apl-dur: 200ms;
  --apl-radius-card: 14px;
  --apl-radius-menu: 12px;
  --apl-radius-control: 10px;
  --apl-hairline: rgba(60, 60, 67, .09);
  --apl-hairline-soft: rgba(60, 60, 67, .06);
  --apl-fill-hover: rgba(120, 120, 128, .08);
  --apl-fill-press: rgba(120, 120, 128, .15);
  --apl-shadow-card: 0 1px 2px rgba(16, 24, 20, .04), 0 10px 26px rgba(16, 24, 20, .05);
  --apl-shadow-menu: 0 12px 32px rgba(16, 24, 20, .16), 0 2px 6px rgba(16, 24, 20, .06);
  --apl-shadow-modal: 0 30px 72px rgba(16, 24, 20, .22), 0 2px 10px rgba(16, 24, 20, .08);
  --apl-ring: 0 0 0 3.5px rgba(47, 107, 79, .18);
}

/* 统一的键盘焦点环（鼠标点击不出现，键盘 Tab 才出现） */
:is(body.erp-app, body.source-inbox-frame-page)
  :is(.collector-button, .modal-btn, .system-check-button, .account-add-button,
      .account-editor-primary, .account-editor-secondary, .collector-pager button,
      .collector-icon-button, .account-more-button, .password-control button,
      .nav button, .user-name, .user-menu-action, .brand):focus-visible {
  outline: 0 !important;
  box-shadow: var(--apl-ring) !important;
}

/* ==========================================================================
   1. 侧边栏
   ========================================================================== */
body.erp-app .sidebar {
  padding: 12px 8px 10px !important;
  border: 1px solid var(--apl-hairline) !important;
  border-radius: var(--apl-radius-card) !important;
  background: #fff !important;
  box-shadow: var(--apl-shadow-card) !important;
}

body.erp-app .sidebar .brand {
  height: 54px !important;
  min-height: 54px !important;
  margin: 0 0 6px !important;
  border-radius: var(--apl-radius-control) !important;
  transition: background var(--apl-dur) var(--apl-ease) !important;
}

body.erp-app .sidebar .brand:hover {
  background: var(--apl-fill-hover) !important;
}

body.erp-app .sidebar .nav {
  gap: 4px !important;
  padding: 6px 0 !important;
}

body.erp-app .sidebar .nav button {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 10px !important;
  border: 1px solid transparent !important;
  border-radius: var(--apl-radius-control) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  transition: background var(--apl-dur) var(--apl-ease),
              color var(--apl-dur) var(--apl-ease) !important;
}

body.erp-app .sidebar .nav button:not(.active):not([aria-current="true"]):hover {
  background: var(--apl-fill-hover) !important;
  color: var(--yftx-text) !important;
}

body.erp-app .sidebar-user {
  padding-top: 10px !important;
  border-top: 1px solid var(--apl-hairline) !important;
}

body.erp-app .sidebar .user-name {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 10px !important;
  border: 1px solid transparent !important;
  border-radius: var(--apl-radius-control) !important;
  background: var(--apl-fill-hover) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  transition: background var(--apl-dur) var(--apl-ease) !important;
}

body.erp-app .sidebar .user-menu:hover .user-name,
body.erp-app .sidebar .user-menu.open .user-name,
body.erp-app .sidebar .user-menu:focus-within .user-name {
  background: var(--apl-fill-press) !important;
}

/* 菜单宽度对齐触发按钮，避免整块飘出侧栏被裁掉（侧栏只有 108px 宽，且 overflow:hidden）。
   注意 v188 还有 min-width:158px 与 translateX(-50%)，会把菜单推到侧栏左侧、被裁掉一半，
   这里连同开态的 transform 一起压掉（开态是 0,4,1，必须用 0,5,1 才压得住）。 */
body.erp-app .user-popover {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: 5px !important;
  border: 1px solid var(--apl-hairline) !important;
  border-radius: var(--apl-radius-menu) !important;
  background: #fff !important;
  box-shadow: var(--apl-shadow-menu) !important;
  transform: translateY(4px) !important;
}

body.erp-app .sidebar .user-menu:hover .user-popover,
body.erp-app .sidebar .user-menu:focus-within .user-popover,
body.erp-app .sidebar .user-menu.open .user-popover {
  transform: translateY(0) !important;
}

body.erp-app .user-popover .user-menu-action {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 8px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-align: center !important;
  transition: background var(--apl-dur) var(--apl-ease) !important;
}

body.erp-app .user-popover .user-menu-action:hover,
body.erp-app .user-popover .user-menu-action:focus-visible {
  background: var(--apl-fill-hover) !important;
}

body.erp-app .user-popover-divider {
  height: 1px !important;
  margin: 4px 6px !important;
  background: var(--apl-hairline) !important;
}

body.erp-app .user-popover .logout-action {
  margin-top: 0 !important;
  border-top: 0 !important;
  border-radius: 8px !important;
}

/* ==========================================================================
   2. 登录页
   ========================================================================== */
body.erp-app .login-card {
  width: min(360px, 100%) !important;
  padding: 34px 30px 28px !important;
  border: 1px solid var(--apl-hairline) !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: var(--apl-shadow-modal) !important;
}

body.erp-app #loginView .login-card input {
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 12px !important;
  border: 1px solid var(--apl-hairline) !important;
  border-radius: var(--apl-radius-control) !important;
  background: rgba(120, 120, 128, .06) !important;
  font-size: 15px !important;
  transition: border-color var(--apl-dur) var(--apl-ease),
              background var(--apl-dur) var(--apl-ease),
              box-shadow var(--apl-dur) var(--apl-ease) !important;
}

body.erp-app #loginView .login-card input:focus {
  border-color: rgba(47, 107, 79, .45) !important;
  background: #fff !important;
  box-shadow: var(--apl-ring) !important;
}

body.erp-app #loginView .login-card #password {
  margin-top: 10px !important;
}

body.erp-app .login-card #loginSubmitBtn {
  height: 40px !important;
  min-height: 40px !important;
  margin-top: 14px !important;
  border-radius: var(--apl-radius-control) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-indent: 0 !important;
  transition: background var(--apl-dur) var(--apl-ease) !important;
}

body.erp-app .login-error {
  font-size: 13px !important;
  line-height: 18px !important;
}

/* ==========================================================================
   3. 账号管理
   ========================================================================== */
body.erp-app .accounts-shell-minimal {
  width: min(720px, 100%) !important;
  max-width: 720px !important;
  margin: 0 auto !important;
}

body.erp-app .account-add-button {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 14px !important;
  border-radius: 980px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  transition: background var(--apl-dur) var(--apl-ease) !important;
}

body.erp-app .account-table {
  border: 1px solid var(--apl-hairline) !important;
  border-radius: var(--apl-radius-card) !important;
  background: #fff !important;
  overflow: hidden !important;
  box-shadow: var(--apl-shadow-card) !important;
}

body.erp-app .account-table-header {
  height: 38px !important;
  min-height: 38px !important;
  border-bottom: 1px solid var(--apl-hairline) !important;
  background: rgba(120, 120, 128, .05) !important;
  color: var(--yftx-muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: .02em !important;
}

body.erp-app .account-table-row {
  border-bottom: 1px solid var(--apl-hairline-soft) !important;
  transition: background var(--apl-dur) var(--apl-ease) !important;
}

body.erp-app .account-table-row:hover {
  background: var(--apl-fill-hover) !important;
}

body.erp-app .account-table-row:last-child {
  border-bottom: 0 !important;
}

body.erp-app .account-table-cell-name > span,
body.erp-app .account-table-cell-account {
  font-size: 13px !important;
}

body.erp-app .account-table-cell-name > span {
  font-weight: 600 !important;
  color: var(--yftx-text) !important;
}

body.erp-app .account-table-cell-account {
  color: var(--yftx-muted) !important;
  font-variant-numeric: tabular-nums !important;
}

body.erp-app .account-status-badge {
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 10px !important;
  border-radius: 980px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

body.erp-app .account-more-button {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  border-radius: 9px !important;
  font-size: 15px !important;
  color: var(--yftx-muted) !important;
  transition: background var(--apl-dur) var(--apl-ease),
              color var(--apl-dur) var(--apl-ease) !important;
}

body.erp-app .account-more-button:hover {
  background: var(--apl-fill-press) !important;
  color: var(--yftx-text) !important;
}

body.erp-app .account-action-menu {
  padding: 5px !important;
  border: 1px solid var(--apl-hairline) !important;
  border-radius: var(--apl-radius-menu) !important;
  background: #fff !important;
  box-shadow: var(--apl-shadow-menu) !important;
}

body.erp-app .account-action-menu button {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  transition: background var(--apl-dur) var(--apl-ease) !important;
}

body.erp-app .account-list-empty .account-table-cell strong {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--yftx-text) !important;
}

body.erp-app .account-list-empty .account-table-cell .empty-hint {
  font-size: 13px !important;
  color: var(--yftx-subtle) !important;
}

/* ==========================================================================
   4. 系统检测
   ========================================================================== */
body.erp-app .system-check-page {
  width: min(720px, 100%) !important;
  max-width: 720px !important;
  border: 1px solid var(--apl-hairline) !important;
  border-radius: var(--apl-radius-card) !important;
  background: #fff !important;
  overflow: hidden !important;
  box-shadow: var(--apl-shadow-card) !important;
}

body.erp-app .system-check-header {
  height: 56px !important;
  min-height: 56px !important;
  padding: 0 18px !important;
  gap: 12px !important;
  border-bottom: 1px solid var(--apl-hairline) !important;
  background: rgba(120, 120, 128, .04) !important;
}

body.erp-app .system-check-header p {
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 20px !important;
}

body.erp-app .system-check-row {
  padding: 12px 18px !important;
  border-bottom: 1px solid var(--apl-hairline-soft) !important;
}

body.erp-app .system-check-row-main strong {
  font-size: 13px !important;
  font-weight: 600 !important;
}

body.erp-app .system-check-row-main span {
  font-size: 13px !important;
  color: var(--yftx-muted) !important;
}

body.erp-app .system-check-badge {
  padding: 0 10px !important;
  border-radius: 980px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

/* ==========================================================================
   5. 弹窗与表单（确认 / 账号编辑 / 导出 / 商品详情）
   ========================================================================== */
body.erp-app .modal-backdrop {
  padding: 20px !important;
  background: rgba(20, 24, 26, .34) !important;
  -webkit-backdrop-filter: saturate(140%) blur(3px) !important;
  backdrop-filter: saturate(140%) blur(3px) !important;
}

body.erp-app :is(.system-modal, .account-editor-modal, .export-file-modal) {
  border: 1px solid var(--apl-hairline) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: var(--apl-shadow-modal) !important;
}

body.erp-app .system-modal-copy h2,
body.erp-app .account-editor-header h2,
body.erp-app .export-file-modal-copy h2 {
  font-size: 18px !important;
  font-weight: 600 !important;
  letter-spacing: -.01em !important;
}

body.erp-app .system-modal-copy p,
body.erp-app .export-file-message {
  font-size: 13px !important;
  line-height: 1.55 !important;
  color: var(--yftx-muted) !important;
}

body.erp-app .system-modal-actions,
body.erp-app .export-file-modal-actions,
body.erp-app .account-editor-actions {
  border-top: 1px solid var(--apl-hairline) !important;
  background: rgba(120, 120, 128, .04) !important;
}

body.erp-app .modal-btn {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 16px !important;
  border-radius: var(--apl-radius-control) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  transition: background var(--apl-dur) var(--apl-ease) !important;
}

/* 确认弹窗与导出弹窗的按钮被 #id 级规则压着（layout-buttons-v190 是 1,1,1，
   shell-runtime-v174 的 #systemModal .modal-btn 是 1,2,1），必须 1,3,1 才压得住 */
body.erp-app #systemModal .system-modal-actions .modal-btn,
body.erp-app #exportFileModal .export-file-modal-actions .modal-btn {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 16px !important;
  border-radius: var(--apl-radius-control) !important;
  font-size: 14px !important;
}

body.erp-app .modal-btn + .modal-btn {
  border-left: 1px solid var(--apl-hairline) !important;
}

body.erp-app .modal-btn.confirm {
  font-weight: 600 !important;
}

body.erp-app .modal-btn:not(.confirm):hover:not(:disabled) {
  background: var(--apl-fill-hover) !important;
}

body.erp-app .account-editor-header {
  padding: 16px 18px !important;
  border-bottom: 1px solid var(--apl-hairline) !important;
}

body.erp-app .account-editor-close,
body.erp-app .product-detail-close,
body.erp-app .erp-image-zoom-close {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  border-radius: 980px !important;
  background: var(--apl-fill-hover) !important;
  color: var(--yftx-muted) !important;
  transition: background var(--apl-dur) var(--apl-ease) !important;
}

body.erp-app .account-editor-close:hover,
body.erp-app .product-detail-close:hover,
body.erp-app .erp-image-zoom-close:hover {
  background: var(--apl-fill-press) !important;
  color: var(--yftx-text) !important;
}

body.erp-app .account-editor-field span {
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: .01em !important;
  color: var(--yftx-muted) !important;
}

body.erp-app #accountEditorBackdrop .account-editor-field input,
body.erp-app #exportFileModal .export-file-modal-copy input[type="text"] {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  border: 1px solid var(--apl-hairline) !important;
  border-radius: var(--apl-radius-control) !important;
  background: rgba(120, 120, 128, .06) !important;
  font-size: 13px !important;
  transition: border-color var(--apl-dur) var(--apl-ease),
              background var(--apl-dur) var(--apl-ease),
              box-shadow var(--apl-dur) var(--apl-ease) !important;
}

body.erp-app #accountEditorBackdrop .account-editor-field input:focus,
body.erp-app #exportFileModal .export-file-modal-copy input[type="text"]:focus {
  border-color: rgba(47, 107, 79, .45) !important;
  background: #fff !important;
  box-shadow: var(--apl-ring) !important;
}

body.erp-app .password-control button {
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

body.erp-app .account-editor-secondary,
body.erp-app .account-editor-primary {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 14px !important;
  border-radius: 980px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

body.erp-app #accountEditorBackdrop .account-editor-actions .account-editor-primary,
body.erp-app #accountEditorBackdrop .account-editor-actions .account-editor-secondary {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 18px !important;
  border-radius: 980px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

body.erp-app .account-editor-primary {
  transition: background var(--apl-dur) var(--apl-ease) !important;
}

body.erp-app .product-detail-drawer {
  border-left: 1px solid var(--apl-hairline) !important;
  background: #fff !important;
  box-shadow: -24px 0 64px rgba(16, 24, 20, .18) !important;
}

body.erp-app .product-detail-header {
  padding: 16px 18px !important;
  border-bottom: 1px solid var(--apl-hairline) !important;
}

body.erp-app .product-detail-header h2 {
  font-size: 18px !important;
  font-weight: 600 !important;
  letter-spacing: -.01em !important;
}

body.erp-app .product-detail-header p {
  font-size: 13px !important;
  color: var(--yftx-muted) !important;
}

/* ==========================================================================
   6. 采集筛选页（iframe 独立文档：body.source-inbox-frame-page）
      只碰观感：分隔线、悬停、圆角、弹窗；不碰表格行高与列宽。
   ========================================================================== */
body.source-inbox-frame-page .collector-commandbar {
  border: 1px solid var(--apl-hairline) !important;
  border-radius: var(--apl-radius-card) !important;
  box-shadow: var(--apl-shadow-card) !important;
}

body.source-inbox-frame-page .collector-content {
  border: 1px solid var(--apl-hairline) !important;
  border-radius: var(--apl-radius-card) !important;
  background: #fff !important;
  box-shadow: var(--apl-shadow-card) !important;
}

body.source-inbox-frame-page #collectorResultTable th {
  border-bottom: 1px solid var(--apl-hairline) !important;
  border-right: 1px solid var(--apl-hairline-soft) !important;
  background: rgba(120, 120, 128, .05) !important;
  color: var(--yftx-muted) !important;
  font-weight: 600 !important;
  letter-spacing: .01em !important;
}

body.source-inbox-frame-page #collectorResultTable td {
  border-right: 1px solid var(--apl-hairline-soft) !important;
  border-bottom: 1px solid var(--apl-hairline-soft) !important;
  font-size: 12px !important;
}

body.source-inbox-frame-page #collectorResultTable tbody tr:hover td {
  background: rgba(120, 120, 128, .05) !important;
}

body.source-inbox-frame-page #collectorResultTable tbody tr.selected td {
  background: rgba(47, 107, 79, .09) !important;
}

body.source-inbox-frame-page .collector-thumb,
body.source-inbox-frame-page .collector-detail-image img {
  border-radius: 8px !important;
}

body.source-inbox-frame-page .collector-copy-button,
body.source-inbox-frame-page .collector-detail-image-remove,
body.source-inbox-frame-page .collector-detail-image-move {
  border-radius: 8px !important;
  transition: background var(--apl-dur) var(--apl-ease),
              color var(--apl-dur) var(--apl-ease) !important;
}

/* 分页控件与每页条数的高度/字号/圆角由 collector-toolbar-v192.css 拥有
   （具体度 1,3,2 与 1,4,2），这里只负责描边与悬停底色的兜底观感，不参与尺寸竞争。 */
body.source-inbox-frame-page .collector-pager button,
body.source-inbox-frame-page #collectorPageSize {
  border: 1px solid var(--apl-hairline) !important;
  background: #fff !important;
  transition: background var(--apl-dur) var(--apl-ease) !important;
}

body.source-inbox-frame-page .collector-pager button:hover:not(:disabled) {
  background: var(--apl-fill-hover) !important;
}

body.source-inbox-frame-page .collector-rules-dialog {
  border: 1px solid var(--apl-hairline) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: var(--apl-shadow-modal) !important;
}

body.source-inbox-frame-page .collector-rules-head {
  padding: 16px 18px !important;
  border-bottom: 1px solid var(--apl-hairline) !important;
}

body.source-inbox-frame-page .collector-rules-head strong {
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

body.source-inbox-frame-page .collector-rules-foot {
  padding: 12px 18px !important;
  border-top: 1px solid var(--apl-hairline) !important;
  background: rgba(120, 120, 128, .04) !important;
}

body.source-inbox-frame-page .collector-icon-button {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  border-radius: 980px !important;
  background: var(--apl-fill-hover) !important;
  font-size: 15px !important;
  transition: background var(--apl-dur) var(--apl-ease) !important;
}

body.source-inbox-frame-page .collector-icon-button:hover {
  background: var(--apl-fill-press) !important;
}

body.source-inbox-frame-page .collector-detail {
  border-left: 1px solid var(--apl-hairline) !important;
  background: #fff !important;
  box-shadow: -24px 0 64px rgba(16, 24, 20, .18) !important;
}

body.source-inbox-frame-page .collector-detail-head {
  padding: 16px 18px !important;
  border-bottom: 1px solid var(--apl-hairline) !important;
}

body.source-inbox-frame-page .collector-detail-actions {
  border-top: 1px solid var(--apl-hairline) !important;
  background: rgba(120, 120, 128, .04) !important;
}

body.source-inbox-frame-page .collector-rule-item {
  border-radius: var(--apl-radius-control) !important;
}

body.source-inbox-frame-page .collector-rule-index {
  border-radius: 980px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

body.source-inbox-frame-page .collector-toast {
  border-radius: var(--apl-radius-menu) !important;
  box-shadow: var(--apl-shadow-menu) !important;
}


/* ---- 6.1 结果表：数字右对齐 + 等宽数字 ----
   数字列的结构是 <span class="collector-copyable-cell"><span class="cell-*">，
   内层是行内元素，所以对齐写在块级包装上（text-align 会继承下去）；
   右侧留 20px 内边距让文字避开悬停才出现的复制按钮 —— 复制按钮是 right:0
   相对 padding box 定位的，加内边距不会把按钮挪走。 */
body.source-inbox-frame-page #collectorResultTable th.number-cell,
body.source-inbox-frame-page #collectorResultTable th.rank-number-cell {
  padding-right: 20px !important;
  text-align: right !important;
}

body.source-inbox-frame-page #collectorResultTable td.number-cell .collector-copyable-cell,
body.source-inbox-frame-page #collectorResultTable td.rank-number-cell .collector-copyable-cell {
  padding-right: 20px !important;
  text-align: right !important;
}

body.source-inbox-frame-page #collectorResultTable td.number-cell .cell-number,
body.source-inbox-frame-page #collectorResultTable td.number-cell .cell-price,
body.source-inbox-frame-page #collectorResultTable td.number-cell .cell-rating,
body.source-inbox-frame-page #collectorResultTable td.rank-number-cell .cell-number {
  font-variant-numeric: tabular-nums !important;
}

body.source-inbox-frame-page #collectorResultTable td.number-cell .cell-price {
  font-weight: 600 !important;
}

body.source-inbox-frame-page #collectorResultTable td.number-cell .cell-rating {
  color: #8a6220 !important;
  font-weight: 600 !important;
}

body.source-inbox-frame-page .collector-thumb-placeholder {
  border-radius: 8px !important;
}

/* ---- 6.2 商品详情抽屉 ---- */
body.source-inbox-frame-page .collector-detail-head {
  min-height: 64px !important;
  padding: 14px 20px !important;
  gap: 14px !important;
}

body.source-inbox-frame-page .collector-detail-head strong {
  color: var(--yftx-muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: .04em !important;
}

body.source-inbox-frame-page .collector-detail-head h2 {
  margin-top: 3px !important;
  color: var(--yftx-text) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  line-height: 1.4 !important;
}

body.source-inbox-frame-page .collector-detail-body {
  padding: 18px 20px 24px !important;
}

body.source-inbox-frame-page .collector-detail-section {
  margin-bottom: 22px !important;
}

body.source-inbox-frame-page .collector-detail-section h3 {
  margin: 0 0 8px !important;
  color: var(--yftx-muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: .02em !important;
}

body.source-inbox-frame-page .collector-detail-meta-row {
  padding: 7px 0 !important;
  border-bottom: 1px solid var(--apl-hairline-soft) !important;
  font-size: 13px !important;
}

body.source-inbox-frame-page .collector-detail-meta-row:last-child {
  border-bottom: 0 !important;
}

body.source-inbox-frame-page .collector-field label {
  color: var(--yftx-muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

body.source-inbox-frame-page .collector-field input,
body.source-inbox-frame-page .collector-field textarea {
  padding: 9px 11px !important;
  border: 1px solid var(--apl-hairline) !important;
  border-radius: var(--apl-radius-control) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  transition: border-color var(--apl-dur) var(--apl-ease),
              box-shadow var(--apl-dur) var(--apl-ease) !important;
}

body.source-inbox-frame-page .collector-field input:focus,
body.source-inbox-frame-page .collector-field textarea:focus {
  border-color: rgba(47, 107, 79, .42) !important;
  box-shadow: var(--apl-ring) !important;
}

body.source-inbox-frame-page .collector-detail-image {
  border: 1px solid var(--apl-hairline) !important;
  border-radius: var(--apl-radius-control) !important;
}

body.source-inbox-frame-page .collector-detail-image-remove {
  border-radius: 980px !important;
}

body.source-inbox-frame-page .collector-detail-image-count {
  font-weight: 600 !important;
}

/* 具体度陷阱：layout-buttons-v190.css 那个大 :is() 列表里含 .icon-button.has-label
   （两个 class），整个 :is() 因此是 (0,2,0)，整组选择器是 (0,3,1)。
   只写 body.source-inbox-frame-page .collector-detail-recollect 是 (0,2,1)，会整条输掉
   （height 与 border-radius 都不生效）。这里带 #collectorDetailBody 升到 (1,2,1) 才稳。
   另外 v190 同时声明了 min-height / max-height，光写 height 会被夹回 32px，必须一起写。 */
body.source-inbox-frame-page #collectorDetailBody .collector-detail-recollect {
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  border: 1px solid var(--apl-hairline) !important;
  border-radius: 980px !important;
  background: var(--apl-fill-hover) !important;
  color: var(--yftx-text) !important;
  font-weight: 600 !important;
}

body.source-inbox-frame-page #collectorDetailBody .collector-detail-recollect:hover:not(:disabled) {
  border-color: var(--apl-hairline) !important;
  background: var(--apl-fill-press) !important;
  color: var(--yftx-text) !important;
}

/* 页脚高度由 v191 固定成 54px；这里只给横向内边距，纵向交给 flex 居中。 */
body.source-inbox-frame-page .collector-detail-actions {
  padding: 0 20px !important;
}

/* 36px = 系统自己的主控件尺寸（system-polish.css 的 --yf-control-md）。
   与 v190 的 (0,3,1) 打平只能靠加载顺序赢，这里带 #collectorDetailPanel 升到 (1,3,1)；
   同时必须补 min-height / max-height，否则 v190 的 32px 会把 height 夹住。 */
body.source-inbox-frame-page #collectorDetailPanel .collector-detail-actions .collector-button {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  min-width: 96px !important;
  border-radius: var(--apl-radius-control) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

/* 次要操作改成灰底、去掉描边；主操作保持实心（颜色沿用采集页自己的主题色）。 */
body.source-inbox-frame-page #collectorDetailPanel .collector-detail-actions .collector-button.secondary {
  border-color: transparent !important;
  background: var(--apl-fill-hover) !important;
  color: var(--yftx-text) !important;
}

body.source-inbox-frame-page #collectorDetailPanel .collector-detail-actions .collector-button.secondary:hover:not(:disabled) {
  border-color: transparent !important;
  background: var(--apl-fill-press) !important;
  color: var(--yftx-text) !important;
}

/* ---- 6.3 空状态（.collector-empty-state 靠 hidden 属性开合，这里绝不写 display） ---- */
body.source-inbox-frame-page .collector-empty-state {
  padding: 28px !important;
  color: var(--yftx-muted) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

body.source-inbox-frame-page .collector-empty-state::before {
  content: "" !important;
  display: block !important;
  width: 56px !important;
  height: 56px !important;
  margin: 0 0 14px !important;
  border-radius: 980px !important;
  background: rgba(120, 120, 128, .08)
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa39d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M3.6 12.6h3.8l1.2 2.1h6.8l1.2-2.1h3.8'/><path d='M5.9 5.7h12.2a2 2 0 0 1 1.9 1.4l1.1 4v4.8a2 2 0 0 1-2 2H4.9a2 2 0 0 1-2-2V11.1l1.1-4a2 2 0 0 1 1.9-1.4Z'/></svg>")
    center / 26px 26px no-repeat !important;
}

body.source-inbox-frame-page .collector-empty-state strong {
  color: var(--yftx-text) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

body.source-inbox-frame-page #collectorResultTable .collector-empty-row td {
  color: var(--yftx-muted) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

/* ---- 6.4 采集页提示条（success/warning/error 沿用 v191 的语义色，不在这里抢） ---- */
body.source-inbox-frame-page .collector-toast:not(.success):not(.warning):not(.error) {
  border-color: rgba(255, 255, 255, .10) !important;
  background: rgba(28, 28, 30, .82) !important;
}

body.source-inbox-frame-page .collector-toast {
  -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
  backdrop-filter: saturate(180%) blur(20px) !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

/* ==========================================================================
   7. 全站提示条（.erp-toast）
      它的开合靠 v174 的 opacity / transform:translateX(-50%)，这一节绝不写
      opacity / visibility / transform，否则提示条会飘位或收不起来。
      success / warning / error 三个语义色归 layout-dialogs-v191.css，不抢。
   ========================================================================== */
body.erp-app .erp-toast:not(.success):not(.warning):not(.error) {
  border-color: rgba(255, 255, 255, .10) !important;
  background: rgba(28, 28, 30, .82) !important;
}

body.erp-app .erp-toast {
  border-radius: var(--apl-radius-menu) !important;
  box-shadow: var(--apl-shadow-menu) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
  backdrop-filter: saturate(180%) blur(20px) !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

/* ==========================================================================
   8. 响应式（只用 1280 / 1024 / 760 三档，与既有断点对齐）
   ========================================================================== */
@media (max-width: 1280px) {
  body.erp-app .accounts-shell-minimal,
  body.erp-app .system-check-page {
    width: 100% !important;
  }
}

@media (max-width: 1024px) {
  body.erp-app .sidebar .nav button {
    font-size: 12px !important;
  }
}

@media (max-width: 760px) {
  body.erp-app .login-card {
    width: 100% !important;
    padding: 26px 20px 22px !important;
    border-radius: 16px !important;
  }

  body.erp-app .sidebar .nav button {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
  }

  body.erp-app .account-table-header,
  body.erp-app .account-table-row {
    padding: 0 10px !important;
    gap: 6px !important;
  }

  body.erp-app .modal-btn {
    font-size: 15px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(body.erp-app, body.source-inbox-frame-page) * {
    transition-duration: .01ms !important;
  }
}
