/* ============================================================
   ui-unify.css — 全局 UI 统一覆盖层（p7i / 2026-09-14）
   Henry 拍板：各页面设计风格、组件、弹窗保持统一；
   宽度 = 屏宽自适应（p7i Henry 改令：不限宽，Pad/宽屏都能用）
   基准 = 新贸易页（经营看板/财务管理）：
     · 容器 padding:16px 20px，宽度自适应铺满（不再限 1100px）
     · 页面标题条 14px/600/#334155 带 emoji
     · TAB 下划线式：13px，未选 #64748B/400，选中 #2563EB/700 + 2px 下划线
     · 弹窗：遮罩 rgba(15,23,42,.45)，白卡圆角 12px，标题 15px/600
   ============================================================ */

/* ① 容器宽度：全页屏宽自适应（p7i 起不限宽；老页原本即铺满，此处仅保留负边距修正） */
#page-customers { margin: 0 !important; } /* 覆盖 wave8 紧凑布局的 -12px 负边距 */

/* ② 页面标题条统一：缺标题的老页用 ::before 注入 14px 标题 */
#inventory-panel::before { content: '🏭 库存管理'; }
#customer-panel::before  { content: '👥 客户管理'; }
#archive-panel::before   { content: '📁 文档管理'; }
#page-calc::before       { content: '🧮 计算工具'; }
#inventory-panel::before,
#customer-panel::before,
#archive-panel::before,
#page-calc::before {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 10px;
}
/* 设置页大标题收编为统一标题条 */
#page-settings .page-header { margin-bottom: 10px !important; }
#page-settings .page-header h1 {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  margin: 0 !important;
}
#page-settings .page-header h1::before { content: '⚙️ '; }

/* ③ TAB 统一为下划线式 */
/* — 库存管理（原浅蓝底胶囊） — */
#page-products .inv-tabs { gap: 0 !important; padding-bottom: 0 !important; border-bottom: 1px solid #E2E8F0 !important; }
#page-products .inv-tab {
  border-radius: 0 !important; background: none !important;
  padding: 8px 16px !important; font-size: 13px !important; font-weight: 400 !important;
  color: #64748B !important;
  border-bottom: 2px solid transparent !important; margin-bottom: -1px !important;
}
#page-products .inv-tab:hover { background: none !important; color: #1E293B !important; }
#page-products .inv-tab.active {
  background: none !important; color: #2563EB !important;
  border-bottom-color: #2563EB !important; font-weight: 700 !important;
}
/* — 客户管理（原深蓝底胶囊） — */
#page-customers .cust-tabs {
  background: none !important; border: none !important; border-radius: 0 !important;
  border-bottom: 1px solid #E2E8F0 !important; padding: 0 !important; gap: 0 !important;
}
#page-customers .cust-tab {
  border-radius: 0 !important; background: none !important;
  padding: 8px 16px !important; font-size: 13px !important; font-weight: 400 !important;
  color: #64748B !important;
  border-bottom: 2px solid transparent !important; margin-bottom: -1px !important;
}
#page-customers .cust-tab:hover { background: none !important; color: #1E293B !important; }
#page-customers .cust-tab.active {
  background: none !important; color: #2563EB !important;
  border-bottom-color: #2563EB !important; font-weight: 700 !important;
}
/* — 客户管理旧下划线 TAB 色调对齐基准蓝 — */
#page-customers .customer-tabs { border-bottom: 1px solid #E2E8F0 !important; }
#page-customers .customer-tab { font-size: 13px !important; padding: 8px 16px !important; color: #64748B !important; }
#page-customers .customer-tab.active { color: #2563EB !important; border-bottom-color: #2563EB !important; font-weight: 700 !important; }
/* — 计算工具（已是下划线，色调对齐基准蓝） — */
#page-calc .calc-tab { color: #64748B !important; padding: 8px 16px !important; }
#page-calc .calc-tab:hover { color: #1E293B !important; }
#page-calc .calc-tab.active { color: #2563EB !important; border-bottom-color: #2563EB !important; font-weight: 700 !important; }
/* — 系统设置（原灰底分段控件） — */
#page-settings .settings-tabs {
  background: none !important; border: none !important; border-radius: 0 !important;
  border-bottom: 1px solid #E2E8F0 !important; padding: 0 !important; gap: 0 !important;
}
#page-settings .settings-tab {
  border-radius: 0 !important; background: none !important; box-shadow: none !important;
  padding: 8px 16px !important; font-size: 13px !important; font-weight: 400 !important;
  color: #64748B !important;
  border-bottom: 2px solid transparent !important; margin-bottom: -1px !important;
}
#page-settings .settings-tab:hover { background: none !important; color: #1E293B !important; }
#page-settings .settings-tab.active {
  background: none !important; box-shadow: none !important;
  color: #2563EB !important; border-bottom-color: #2563EB !important; font-weight: 700 !important;
}
/* — 系统设置内嵌文档管理（原蓝底胶囊） — */
#page-settings .doc-tabs {
  background: none !important; border-radius: 0 !important;
  border-bottom: 1px solid #E2E8F0 !important; padding: 0 !important; gap: 0 !important;
}
#page-settings .doc-tab {
  border-radius: 0 !important; background: none !important;
  padding: 8px 16px !important; font-size: 13px !important;
  color: #64748B !important;
  border-bottom: 2px solid transparent !important; margin-bottom: -1px !important;
}
#page-settings .doc-tab:hover { background: none !important; color: #1E293B !important; }
#page-settings .doc-tab.active {
  background: none !important; color: #2563EB !important;
  border-bottom-color: #2563EB !important; font-weight: 700 !important;
}
/* — 文档管理（已是下划线，色调对齐基准蓝） — */
#page-archive .archive-tabs .tab { font-size: 13px !important; padding: 8px 16px !important; color: #64748B !important; }
#page-archive .archive-tabs .tab:hover { color: #1E293B !important; }
#page-archive .archive-tabs .tab.active { color: #2563EB !important; border-bottom-color: #2563EB !important; font-weight: 700 !important; }

/* ④ 弹窗统一：遮罩 / 圆角 / 阴影 / 标题字号 对齐 TradeDialogs 基准 */
.modal-overlay { background: rgba(15, 23, 42, .45) !important; }
.modal-box {
  border-radius: 12px !important;
  box-shadow: 0 10px 40px rgba(15, 23, 42, .18) !important;
}
.modal-box .modal-header { padding: 16px 20px !important; border-bottom: 1px solid #F1F5F9 !important; }
.modal-box .modal-header h3 { font-size: 15px !important; font-weight: 600 !important; color: #1E293B !important; }
.modal-box .modal-footer { border-top: 1px solid #F1F5F9 !important; }
.modal-close { color: #94A3B8 !important; }
.modal { box-shadow: 0 10px 40px rgba(15, 23, 42, .18) !important; }
.modal .modal-header h3 { font-size: 15px !important; }
