/* ========== QCOS 文字清晰度增强（全模块通用，不改布局结构） ========== */

html {
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

/* —— 主工作区禁用毛玻璃 —— */
body.layout-erp .app-main,
body.layout-erp .app-content,
body.layout-erp .app-main .page,
body.layout-erp .app-main .card,
body.layout-erp .app-main .filter-row,
body.layout-erp .app-main .form-row,
body.layout-erp .app-main .table-wrap,
body.layout-erp .app-main .ped-card,
body.layout-erp .app-main .ped-side-card,
body.layout-erp .modal-overlay,
body.layout-erp .modal-card,
body.layout-erp .modal-content,
body.layout-erp .drawer-panel,
body.layout-erp .app-main [class*='-hero'],
body.layout-erp .app-main [class*='-kpi'],
body.layout-erp .app-main [class*='-filter-panel'],
body.layout-erp .app-main [class*='-filter-console'],
body.layout-erp .app-main [class*='-toolbar'],
body.layout-erp .app-main [class*='-table-wrap'],
body.layout-erp .app-main [class*='-registry-panel'],
body.layout-erp .app-main [class*='-create-panel'],
body.layout-erp .app-main [class*='-insight-strip'],
body.layout-erp .app-main [class*='-aside'],
body.layout-erp .erp-main-chrome,
body.layout-erp .app-page-head,
#page-create-task .ct-footer-actions,
#page-oqc-sn .oqc-actions,
.qod-hero-card,
.ped-audit-modal {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.layout-pro .erp-main-chrome {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

#page-create-task .ct-footer-actions,
#page-oqc-sn .oqc-actions {
  background: rgb(255 255 255 / 0.98) !important;
}

.qod-hero-card {
  background: #ffffff !important;
}

/* —— 卡片 / 面板：实白底（覆盖 AI 半透明渐变） —— */
body.layout-erp .app-main .card,
body.layout-erp .app-main .filter-row,
body.layout-erp .app-main .form-row,
body.layout-erp .app-main .table-wrap,
body.layout-erp .app-main .compact-help-details,
body.layout-erp .app-main [class*='-hero'],
body.layout-erp .app-main [class*='-kpi'],
body.layout-erp .app-main [class*='-filter-panel'],
body.layout-erp .app-main [class*='-filter-console'],
body.layout-erp .app-main [class*='-toolbar']:not(.erp-nav-bar),
body.layout-erp .app-main [class*='-table-wrap'],
body.layout-erp .app-main [class*='-registry-panel'],
body.layout-erp .app-main [class*='-create-panel'],
body.layout-erp .app-main [class*='-insight-strip'],
body.layout-erp .app-main [class*='-aside'],
body.layout-erp .app-main .ped-card,
body.layout-erp .app-main .ped-side-card,
body.layout-erp .app-main .qod-card,
body.layout-erp .app-main .entry-panel-modern,
body.layout-erp .app-main .ct-section,
body.layout-erp .app-main .itr-form,
body.layout-erp .app-main .itr-filter,
body.layout-erp .app-main .itr-table-wrap,
body.layout-erp .modal-card,
body.layout-erp .modal-content {
  background: #ffffff !important;
}

/* —— 标题层级 —— */
#page-title,
.app-page-title {
  color: var(--text-title) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: -0.01em !important;
}

#page-title-desc,
.app-page-desc {
  color: var(--text-muted) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  opacity: 1 !important;
}

body.layout-pro .erp-nav-current {
  color: var(--text-title) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
}

.ped-titlebar h2,
.ped-card-head h3,
.ped-side-card h3,
.page-header h2,
.card > h3,
.card h3:first-child,
.itr-hero h2,
.qc-go-live-title,
.mdm-tab-bar .mdm-tab,
body.layout-erp .app-main .card h2,
body.layout-erp .app-main .card h3,
body.layout-erp .app-main [class*='-hero'] h2,
body.layout-erp .app-main [class*='-toolbar-head'] h3,
body.layout-erp .app-main [class*='-table-title'] h3,
body.layout-erp .app-main [class*='-action-copy'] strong,
body.layout-erp .app-main [class*='-registry-head'] h3 {
  color: var(--text-title) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
}

.ped-titlebar h2,
body.layout-erp .app-main [class*='-hero'] h2 {
  font-size: 22px !important;
  font-weight: 700 !important;
}

/* —— 眉题 / Kicker —— */
.ped-eyebrow,
.ped-section-kicker,
.itr-eyebrow,
.itr-table-kicker,
.itr-query-badge,
[class*='-eyebrow'],
[class*='-kicker'],
.sidebar-section-title,
.fc-tree-kicker,
.qc-go-live-step-no,
body.layout-erp .app-main [class*='-eyebrow'],
body.layout-erp .app-main [class*='-kicker'] {
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  opacity: 1 !important;
}

body.layout-erp [class*='kicker']:not(.login-brand-kicker),
body.layout-erp [class*='eyebrow']:not(.login-brand-eyebrow) {
  letter-spacing: 0.08em !important;
}

body.layout-erp .app-main [class*='-console-head'] strong,
body.layout-erp .app-main [class*='-registry-head'] strong {
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
}

body.layout-erp .app-main [class*='-filters']::before,
body.layout-erp .app-main [class*='-filter-console']::before {
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
}

/* —— 正文与辅助文字 —— */
body.layout-erp,
body.layout-erp .app-main {
  color: var(--text-body);
}

.muted-text,
.ped-pane-hint,
.ped-inline-note,
.cell-muted,
.itr-hero p,
.ped-titlebar p:last-child,
.ped-side-card ol,
.ped-side-card li,
.qc-go-live-summary,
.hint,
.tiny.muted-text,
body.layout-erp .app-main .card > p,
body.layout-erp .app-main [class*='-hero'] p,
body.layout-erp .app-main [class*='-toolbar-head'] p,
body.layout-erp .app-main [class*='-console-head'] p,
body.layout-erp .app-main [class*='-registry-head'] p,
body.layout-erp .app-main [class*='-action-copy'] small,
body.layout-erp .app-main [class*='-scan-strip'] small,
body.layout-erp .app-main [class*='-insight'] small,
body.layout-erp .app-main [class*='-aside-sub'] {
  color: var(--text-muted) !important;
  opacity: 1 !important;
}

.ped-pane-hint,
.ped-inline-note,
.card .ped-pane-hint,
.qc-go-live-summary,
body.layout-erp .app-main [class*='-hero'] p,
body.layout-erp .app-main [class*='-toolbar-head'] p,
body.layout-erp .app-main [class*='-console-head'] p,
body.layout-erp .app-main [class*='-registry-head'] p,
body.layout-erp .app-main [class*='-action-copy'] small {
  font-size: 13px !important;
  line-height: 1.55 !important;
  font-weight: 500 !important;
}

.ped-side-card p,
.ped-side-card ol {
  font-size: 14px !important;
  line-height: 1.6 !important;
}

/* —— KPI 数字与标签 —— */
body.layout-erp .app-main [class*='-kpi'] span,
body.layout-erp .app-main [class*='-kpi'] small {
  color: var(--text-muted) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  opacity: 1 !important;
}

body.layout-erp .app-main [class*='-kpi'] strong {
  font-weight: 700 !important;
}

body.layout-erp .app-main [class*='-scan-strip'] strong,
body.layout-erp .app-main [class*='-insight-main'] strong {
  color: var(--text-title) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

/* —— 筛选芯片 / 侧栏列表项 —— */
body.layout-erp .app-main [class*='-stage-chip']:not([class*='--active']),
body.layout-erp .app-main [class*='-type-row']:not([class*='--active']),
body.layout-erp .app-main [class*='-aside-toggle'] {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--text-body) !important;
  opacity: 1 !important;
}

body.layout-erp .app-main [class*='-stage-chip--active'],
body.layout-erp .app-main [class*='-type-row--active'] {
  font-weight: 600 !important;
}

body.layout-erp .app-main [class*='-scan-strip'] button {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--text-body) !important;
  opacity: 1 !important;
}

body.layout-erp .app-main [class*='-aside-heading'] {
  color: var(--text-title) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

/* —— 筛选区底色：与输入框拉开层次 —— */
body.layout-erp .app-main #page-products .prod-toolbar-filters,
body.layout-erp .app-main [class*='-toolbar-filters'],
body.layout-erp .app-main [class*='-filter-console'],
body.layout-erp .app-main [class*='-filter-panel'] {
  background: #f8fafc !important;
}

body.layout-erp .app-main #page-products .prod-toolbar-filters::before {
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em !important;
  color: #0958d9 !important;
  background: #e6f4ff !important;
}

/* —— 表单控件：实边框 + 白底（压过各页 #page-* 浅边框） —— */
body.layout-erp .app-main input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='range']):not([type='color']):not([type='submit']):not([type='button']):not([type='reset']):not([type='image']),
body.layout-erp .app-main select,
body.layout-erp .app-main textarea,
body.layout-erp .app-main [id^='page-'] input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='range']):not([type='color']):not([type='submit']):not([type='button']):not([type='reset']):not([type='image']),
body.layout-erp .app-main [id^='page-'] select,
body.layout-erp .app-main [id^='page-'] textarea,
body.layout-erp .modal-overlay input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='range']):not([type='color']):not([type='submit']):not([type='button']):not([type='reset']):not([type='image']),
body.layout-erp .modal-overlay select,
body.layout-erp .modal-overlay textarea,
body.layout-erp .modal input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='range']):not([type='color']):not([type='submit']):not([type='button']):not([type='reset']):not([type='image']),
body.layout-erp .modal select,
body.layout-erp .modal textarea,
body.layout-erp .drawer-panel input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='range']):not([type='color']):not([type='submit']):not([type='button']):not([type='reset']):not([type='image']),
body.layout-erp .drawer-panel select,
body.layout-erp .drawer-panel textarea {
  min-height: 40px !important;
  padding: 8px 14px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  color: #111827 !important;
  background: #ffffff !important;
  border: 1px solid #9ca3af !important;
  border-radius: 6px !important;
  box-shadow: inset 0 1px 2px rgb(15 23 42 / 0.05) !important;
  opacity: 1 !important;
}

body.layout-erp .app-main input:not([type='checkbox']):not([type='radio']):not([type='hidden']):focus,
body.layout-erp .app-main select:focus,
body.layout-erp .app-main textarea:focus,
body.layout-erp .app-main [id^='page-'] input:not([type='checkbox']):not([type='radio']):not([type='hidden']):focus,
body.layout-erp .app-main [id^='page-'] select:focus,
body.layout-erp .app-main [id^='page-'] textarea:focus,
body.layout-erp .modal-overlay input:not([type='checkbox']):not([type='radio']):not([type='hidden']):focus,
body.layout-erp .modal-overlay select:focus,
body.layout-erp .modal-overlay textarea:focus,
body.layout-erp .modal input:not([type='checkbox']):not([type='radio']):not([type='hidden']):focus,
body.layout-erp .modal select:focus,
body.layout-erp .modal textarea:focus,
body.layout-erp .drawer-panel input:not([type='checkbox']):not([type='radio']):not([type='hidden']):focus,
body.layout-erp .drawer-panel select:focus,
body.layout-erp .drawer-panel textarea:focus {
  border-color: #1677ff !important;
  outline: none !important;
  box-shadow:
    inset 0 1px 2px rgb(15 23 42 / 0.04),
    0 0 0 3px rgb(22 119 255 / 0.16) !important;
}

body.layout-erp .app-main select,
body.layout-erp .app-main [id^='page-'] select,
body.layout-erp .modal-overlay select,
body.layout-erp .modal select,
body.layout-erp .drawer-panel select {
  font-weight: 500 !important;
  cursor: pointer;
}

body.layout-erp .app-main input::placeholder,
body.layout-erp .app-main textarea::placeholder,
body.layout-erp .app-main [id^='page-'] input::placeholder,
body.layout-erp .app-main [id^='page-'] textarea::placeholder,
body.layout-erp .modal-overlay input::placeholder,
body.layout-erp .modal-overlay textarea::placeholder,
body.layout-erp .modal input::placeholder,
body.layout-erp .modal textarea::placeholder {
  color: #6b7280 !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}

body.layout-erp .app-main input::-webkit-input-placeholder,
body.layout-erp .app-main textarea::-webkit-input-placeholder,
body.layout-erp .app-main [id^='page-'] input::-webkit-input-placeholder,
body.layout-erp .app-main [id^='page-'] textarea::-webkit-input-placeholder,
body.layout-erp .modal input::-webkit-input-placeholder,
body.layout-erp .modal textarea::-webkit-input-placeholder {
  color: #6b7280 !important;
  opacity: 1 !important;
}

/* 物料档案：压过 #page-products .class input 残留规则 */
body.layout-erp .app-main #page-products input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='submit']):not([type='button']),
body.layout-erp .app-main #page-products select {
  color: #111827 !important;
  background: #ffffff !important;
  border: 1px solid #9ca3af !important;
  border-radius: 6px !important;
  box-shadow: inset 0 1px 2px rgb(15 23 42 / 0.05) !important;
  font-weight: 500 !important;
}

body.layout-erp .app-main #page-products input::placeholder {
  color: #6b7280 !important;
  opacity: 1 !important;
}

/* —— 表单与表格最小字号 —— */
body.layout-erp input,
body.layout-erp select,
body.layout-erp textarea,
body.layout-erp .btn,
body.layout-erp .data-table,
body.layout-erp .data-table th,
body.layout-erp .data-table td,
body.layout-erp .nav-item,
body.layout-erp label {
  font-size: max(13px, 1em);
}

body.layout-erp .data-table {
  font-size: 14px;
}

body.layout-erp .app-main .data-table thead th {
  color: var(--text-muted) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  background: #f9fafb !important;
  opacity: 1 !important;
}

body.layout-erp .btn-sm {
  font-size: 13px !important;
}

/* —— 避免用 opacity 淡化文字（侧栏见 sidebar-nav.css） —— */
body.layout-erp .badge,
body.layout-erp .qod-list-item small,
body.layout-erp .fc-sub,
body.layout-erp .itr-rule-cell small {
  opacity: 1 !important;
}

/* —— 图标与按钮对齐 —— */
body.layout-erp .btn,
body.layout-erp .erp-back-btn,
body.layout-erp .qc-psc-toolbar,
body.layout-erp .ped-quick-rule-actions,
body.layout-erp .itr-form-actions,
body.layout-erp .table-actions {
  align-items: center;
}

body.layout-erp .btn svg,
body.layout-erp .erp-back-btn svg {
  transform: none !important;
  flex-shrink: 0;
}

body.layout-erp .btn:active {
  opacity: 1 !important;
  filter: brightness(0.97);
}

/* —— 卡片内说明 —— */
body.layout-erp .card,
body.layout-erp .ped-card,
body.layout-erp .qc-stage-card,
body.layout-erp .qc-mat-card {
  color: var(--text-body);
}

body.layout-erp .card > p,
body.layout-erp .ped-card > p,
body.layout-erp .qc-stage-head .muted-text {
  line-height: 1.6;
}

body.layout-erp .qc-mat-card .muted-text,
body.layout-erp .qc-stage-drawings {
  font-size: 13px !important;
  line-height: 1.55 !important;
}

/* —— 表格状态徽章 —— */
body.layout-erp .badge {
  font-size: 13px !important;
  font-weight: 600;
  line-height: 1.35;
}

/* —— 禁止主内容区 zoom 导致发糊 —— */
body.layout-erp .app-main {
  zoom: 1;
}
