/* ============================================================
   星奕海外仓 WMS · 企业级 Design System
   设计基调：专业 · 简洁 · 克制 · 现代 · 效率优先
   主色 #2563EB · 背景 #F5F7FA · 卡片 #FFFFFF · 文字 #1F2937
   ============================================================ */
:root {
  /* 品牌与状态色 */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-active: #1e40af;
  --primary-light: #eff6ff;
  --success: #22c55e;
  --success-dark: #16a34a;
  --warning: #f59e0b;
  --warning-dark: #d97706;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --info: #3b82f6;

  /* 中性色 */
  --bg: #f5f7fa;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --border-light: #eef0f3;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;

  /* 语义浅背景（Badge / Tag） */
  --success-bg: #ecfdf5;
  --warning-bg: #fffbeb;
  --danger-bg: #fef2f2;
  --info-bg: #eff6ff;
  --muted-bg: #f3f4f6;

  /* 布局与圆角 */
  --sidebar-w: 224px;
  --header-h: 56px;
  --radius-card: 8px;
  --radius-input: 6px;
  --radius-btn: 6px;
  --radius-tag: 4px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);

  /* Element Plus 基础尺寸（默认输入/按钮 36px） */
  --el-component-size: 36px;
  --el-border-radius-base: 6px;
  --el-border-radius-small: 4px;
  --el-font-size-base: 14px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
#app { height: 100%; }

/* 等宽字体（单号/编码列用）：优先 Windows 自带 Consolas，字型清晰易识别 */
.mono { font-family: "Consolas", "SF Mono", "Menlo", "DejaVu Sans Mono", "Courier New", monospace; font-size: 13.5px; letter-spacing: 0.2px; }

/* ============================================================
   页面标题体系
   ============================================================ */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-header-left { min-width: 0; }
.page-header-breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.page-header-breadcrumb .crumb-sep { margin: 0 6px; color: #d1d5db; }
.page-header-title { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.3; letter-spacing: .2px; }
.page-header-desc { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.page-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   区块卡片（Section）
   ============================================================ */
.wms-section {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); overflow: hidden; margin-bottom: 16px;
}
.wms-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--border-light);
}
.wms-section-title { font-size: 15px; font-weight: 600; color: var(--text); }
.wms-section-extra { font-size: 13px; color: var(--text-muted); }
.wms-section-body { padding: 16px; }

/* ============================================================
   统计卡片 StatCard
   ============================================================ */
.stat-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: 16px; transition: border-color .15s, box-shadow .15s;
}
.stat-card:hover { border-color: #dbe4f3; }
.stat-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.stat-card-icon {
  width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-card-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.stat-card-num { font-size: 26px; font-weight: 700; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-card-footer { margin-top: 8px; font-size: 12px; }
.stat-card-footer.tone-muted { color: var(--text-muted); }
.stat-card-footer.tone-success { color: var(--success-dark); }
.stat-card-footer.tone-warning { color: var(--warning-dark); }
.stat-card-footer.tone-danger { color: var(--danger-dark); }

/* 兼容旧页面 metric-tile 用法（升级为 StatCard 风格） */
.metric-tile {
  flex: 1; min-width: 130px; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 14px 16px;
}
.metric-tile .metric-value { font-size: 24px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.metric-tile .metric-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   空状态 Empty
   ============================================================ */
.wms-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; text-align: center; }
.wms-empty-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--muted-bg); color: #c0c7d1; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.wms-empty-title { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.wms-empty-desc { font-size: 12px; color: var(--text-muted); margin-top: 4px; max-width: 360px; }

/* ============================================================
   状态 Badge（浅色）
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--radius-tag);
  font-size: 12px; line-height: 18px; font-weight: 500; white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success-dark); }
.badge-warning { background: var(--warning-bg); color: var(--warning-dark); }
.badge-danger { background: var(--danger-bg); color: var(--danger-dark); }
.badge-info { background: var(--info-bg); color: var(--primary); }
.badge-muted { background: var(--muted-bg); color: var(--text-secondary); }

/* ============================================================
   全局布局：顶部导航（一级+悬停分组下拉）+ 标签页 + 内容区
   ============================================================ */
.wms-layout { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.wms-body { flex: 1; min-height: 0; }

/* ---- 标签页 Header ---- */
.wms-header {
  height: var(--header-h); background: #f6f7fb; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; padding: 0 16px 0 0; flex-shrink: 0;
}
.wms-header-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex-shrink: 0; }
.wms-header-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; margin-left: auto; }
.wms-notify {
  width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); cursor: pointer; transition: background .15s, color .15s;
}
.wms-notify:hover { background: var(--muted-bg); color: var(--text); }
.wms-topbar-icon {
  width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); cursor: pointer; transition: background .15s, color .15s;
}
.wms-topbar-icon:hover { background: var(--muted-bg); color: var(--text); }
/* ===== 全局功能搜索（Ctrl+K） ===== */
.search-results { max-height: 380px; overflow-y: auto; margin-top: 10px; }
.search-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-radius: 8px; cursor: pointer; border: 1px solid transparent;
}
.search-item:hover { background: #eff6ff; border-color: #bfdbfe; }
.search-title { font-size: 14px; color: var(--text); font-weight: 500; }
.search-path { font-size: 12px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ===== 通知面板 ===== */
.notify-panel { max-height: 480px; overflow-y: auto; }
.notify-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 4px 8px; margin-bottom: 2px;
}
.notify-item { padding: 10px 4px; cursor: pointer; border-bottom: 1px solid #f0f1f3; }
.notify-item:last-child { border-bottom: none; }
.notify-item:hover { background: #fafbfc; }
.notify-item.unread .notify-title::before {
  content: ''; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: #ef4444; margin-right: 6px; flex-shrink: 0;
}
.notify-title { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; }
.notify-content {
  font-size: 12px; color: var(--text-secondary); margin: 3px 0 2px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.notify-time { font-size: 11px; color: #b0b4bb; }
/* 时间列按仓库时区显示 */
.time-col { font-variant-numeric: tabular-nums; }
.wms-user {
  display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 8px; cursor: pointer;
  color: var(--text); transition: background .15s;
}
.wms-user:hover { background: var(--muted-bg); }
.wms-user-name { font-size: 13px; font-weight: 500; color: var(--text); }
.wms-user-role { font-size: 11px; color: var(--text-muted); }

.wms-main { padding: 20px; overflow-y: auto; flex: 1; min-height: 0; background: var(--bg); }

/* ===== 多标签页工作台（置于 header 内，与面包屑同行） ===== */
.wms-tabs {
  display: flex; align-items: center; gap: 6px;
  min-width: 0; flex: 1; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin; padding-left: 12px;
}
.wms-tabs::-webkit-scrollbar { height: 4px; }
.wms-tabs::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
.wms-tabs-inner { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.wms-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 6px; cursor: pointer; user-select: none;
  font-size: 13px; color: var(--text-secondary);
  background: #fff; border: 1px solid var(--border, #e5e7eb);
  transition: all .15s;
  max-width: 200px; white-space: nowrap; flex-shrink: 0;
}
.wms-tab:hover { color: var(--primary, #2563eb); border-color: var(--primary, #2563eb); }
.wms-tab.active {
  color: #fff; background: var(--primary, #2563eb); border-color: var(--primary, #2563eb);
  font-weight: 500;
}
.wms-tab.pinned { cursor: default; }
.wms-tab-title { overflow: hidden; text-overflow: ellipsis; }
.wms-tab-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; font-size: 13px; line-height: 1;
  color: inherit; opacity: .7; flex-shrink: 0;
}
.wms-tab-x:hover { opacity: 1; background: rgba(255,255,255,.25); color: #f56c6c; }
.wms-tab:not(.active) .wms-tab-x:hover { background: #fee2e2; color: #f56c6c; }
.wms-pages { min-height: 200px; }
.wms-page { min-height: 200px; }

/* ============================================================
   极风式导航（蓝白方案）：顶部一级导航 + 悬停分组下拉
   ============================================================ */
.wms-topnav {
  height: var(--header-h);
  background: #fff;
  color: var(--text);
  display: flex; align-items: center;
  padding: 0 16px 0 0; flex-shrink: 0; position: relative; z-index: 300;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(31, 41, 55, .06);
}
.wms-topnav-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px 0 20px; margin: 0;
  border-right: 1px solid var(--border);
  cursor: pointer; flex-shrink: 0; height: 100%;
  width: 200px; box-sizing: border-box;
}
.wms-topnav-logo-img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.wms-topnav-logo-title { font-size: 14.5px; font-weight: 700; letter-spacing: .4px; white-space: nowrap; color: var(--primary); }
.wms-topnav-menu {
  display: flex; align-items: center; gap: 2px;
  flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; height: 100%;
}
.wms-topnav-menu::-webkit-scrollbar { display: none; }
.wms-topnav-item {
  display: flex; align-items: center; gap: 4px;
  height: 100%; padding: 0 16px; cursor: pointer;
  font-size: 14px; color: var(--text-secondary);
  white-space: nowrap; transition: background .15s, color .15s; flex-shrink: 0;
}
.wms-topnav-item:hover { background: var(--primary-light); color: var(--primary); }
.wms-topnav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; box-shadow: inset 0 -2px 0 var(--primary); }
.wms-topnav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.wms-topnav-right .wms-notify { color: var(--text-secondary); }
.wms-topnav-right .wms-notify:hover { background: var(--muted-bg); color: var(--text); }
.wms-topnav-right .wms-user { color: var(--text); }
.wms-topnav-right .wms-user:hover { background: var(--muted-bg); }
.wms-topnav-right .wms-user-name { color: var(--text); }

/* 悬停分组多列下拉面板 */
.wms-nav-dropdown {
  position: absolute; top: var(--header-h);
  background: #fff; border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 28px rgba(31, 41, 55, .14);
  display: flex; gap: 8px; padding: 16px 18px 18px;
  min-width: 520px; max-width: 92vw;
  border-top: 2px solid var(--primary);
  z-index: 310;
}
.wms-nav-drop-col { min-width: 148px; padding: 0 10px; border-right: 1px solid var(--border-light); }
.wms-nav-drop-col:last-child { border-right: none; }
.wms-nav-drop-title {
  font-size: 12px; color: var(--text-muted); font-weight: 600;
  padding: 2px 8px 8px; letter-spacing: .5px;
}
.wms-nav-drop-item {
  padding: 7px 8px; border-radius: 6px; cursor: pointer;
  font-size: 13.5px; color: var(--text-secondary); white-space: nowrap;
  transition: background .12s, color .12s;
}
.wms-nav-drop-item:hover { background: var(--primary-light); color: var(--primary); }
.wms-nav-drop-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.wms-nav-fade-enter-active, .wms-nav-fade-leave-active { transition: opacity .12s; }
.wms-nav-fade-enter-from, .wms-nav-fade-leave-to { opacity: 0; }

/* 左侧：当前模块子功能菜单栏（替代合并页顶部 tab 行） */
.wms-sidebar { background: #fff; overflow-y: auto; overflow-x: hidden; border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.wms-sidebar::-webkit-scrollbar { width: 4px; }
.wms-side-head {
  height: var(--header-h); display: flex; align-items: center; gap: 6px;
  padding: 0 16px; border-bottom: 1px solid var(--border);
  font-size: 14px; font-weight: 700; color: var(--text); flex-shrink: 0;
}
.wms-side-nav { padding: 10px 12px 18px; flex: 1; overflow-y: auto; }
.wms-side-nav::-webkit-scrollbar { width: 4px; }
.wms-side-group { margin-bottom: 4px; }
.wms-side-group-title {
  font-size: 12px; color: var(--text-muted); font-weight: 600;
  padding: 10px 8px 6px; letter-spacing: .5px;
}
.wms-side-item {
  padding: 8px 10px 8px 14px; border-radius: 6px; cursor: pointer;
  font-size: 13.5px; color: var(--text-secondary);
  transition: background .12s, color .12s;
}
.wms-side-item:hover { background: var(--primary-light); color: var(--primary); }
.wms-side-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* 合并页：顶部 tab 行已迁至左侧菜单，隐藏原 tab 头部 */
.merged > .el-tabs > .el-tabs__header { display: none; }
.finance-page > .el-tabs > .el-tabs__header { display: none; }

/* 顶栏 header 收紧：仅承载标签页 */
.wms-header { background: #f6f7fb; border-bottom: 1px solid var(--border); }

/* 移动端：顶栏可横滚 */
@media (max-width: 767px) {
  .wms-topnav { padding: 0 8px; }
  .wms-topnav-logo { padding-right: 10px; }
  .wms-topnav-logo-title { font-size: 12.5px; }
  .wms-topnav-item { padding: 0 10px; font-size: 13px; }
  .wms-nav-dropdown { min-width: 0; width: 94vw; flex-wrap: wrap; }
  .wms-nav-drop-col { min-width: 42%; border-right: none; }
}

/* ============================================================
   Dashboard 首页
   ============================================================ */
.dashboard-page { width: 100%; max-width: 1440px; margin: 0 auto; }

/* 扫码操作区头部（退件/检测扫码入库） */
.scan-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 2px 0 14px; margin-bottom: 4px; border-bottom: 1px solid var(--border-light);
}
.scan-card-title { font-size: 15px; font-weight: 600; color: var(--text); }
.scan-card-desc { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* 本次入库明细 表头 */
.scan-table-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 10px; flex-wrap: wrap;
}
.scan-table-title { font-size: 14px; font-weight: 600; color: var(--text); }
.scan-table-meta { font-size: 12.5px; color: var(--text-muted); margin-left: 10px; }

/* 表格内时间列 / 弱化文字 */
.time-col { font-family: "Consolas", "SF Mono", Menlo, "Courier New", monospace; font-size: 12.5px; color: var(--text-secondary); }
.muted-text { color: var(--text-muted); }

/* 欢迎区 */
.dash-welcome {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: 18px 20px; margin-bottom: 16px;
}
.dash-welcome-title { font-size: 17px; font-weight: 700; color: var(--text); }
.dash-welcome-sub { font-size: 13px; color: var(--text-secondary); margin-top: 3px; }
.dash-welcome-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }

/* 首页：库存结构 / 检测统计 环形图看板（每卡全宽，上下堆叠） */
.dash-inv-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 16px; }
.donut-wrap { display: flex; align-items: center; gap: 24px; }
.donut { width: 150px; height: 150px; flex: none; }
.donut-bg { stroke: var(--muted-bg); stroke-width: 13; }
.donut-seg { stroke-width: 13; }
.donut-num { font-size: 19px; font-weight: 700; fill: var(--text); font-variant-numeric: tabular-nums; }
.donut-unit { font-size: 10px; fill: var(--text-muted); }
.donut-legend { flex: 1; min-width: 0; max-width: 480px; display: flex; flex-direction: column; gap: 9px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.3; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.legend-label { flex: 1; min-width: 0; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend-value { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.legend-pct { width: 44px; text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* 近期操作表格 */
.recent-table .time-col { font-family: "Consolas", "SF Mono", Menlo, "Courier New", monospace; font-size: 12.5px; color: var(--text-secondary); }
.recent-table .order-col { font-family: "Consolas", "SF Mono", Menlo, "Courier New", monospace; font-size: 13.5px; color: var(--text); }

/* ============================================================
   表格统一设计（企业级 WMS 表格）
   表头浅灰蓝 · 行高 48px · 细边框 · 轻 hover · 数字右对齐
   ============================================================ */
.el-table {
  --el-table-border-color: #e5e7eb;
  --el-table-header-bg-color: #f8fafc;
  --el-table-header-text-color: #475569;
  --el-table-row-hover-bg-color: #f1f5f9;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
/* 表头：44px 高、浅灰蓝底、加粗、左对齐（数字列在模板中单独右对齐） */
.el-table th.el-table__cell {
  background: #f5f8fd !important;
  color: #475569 !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  height: 44px !important;
  padding: 0 !important;
  border-bottom: 1px solid #e5e7eb !important;
}
.el-table th.el-table__cell .cell { line-height: 44px; }
/* 数据行：48px（默认）/ 40px（small） */
.el-table .el-table__row td.el-table__cell { padding: 0; height: 48px; }
.el-table .el-table__row td.el-table__cell .cell { line-height: 48px; }
.el-table--small .el-table__row td.el-table__cell { height: 40px; }
.el-table--small .el-table__row td.el-table__cell .cell { line-height: 40px; }
/* 取消垂直单元格内边框（保留细底边，减少视觉噪音） */
.el-table--border .el-table__cell { border-right: 1px solid transparent !important; }
.el-table td.el-table__cell { border-bottom: 1px solid #f1f5f9 !important; }
.el-table--border .el-table__inner-wrapper::after,
.el-table--border .el-table__border-left-patch,
.el-table--border .el-table__border-bottom-patch { background: #e5e7eb; }
/* 行 hover 与隔行条纹（轻微） */
.el-table .el-table__row:hover > td.el-table__cell { background: #f1f5f9 !important; }
.el-table__body tr.hover-row > td.el-table__cell { background: #f1f5f9 !important; }
.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell { background: #fafbfc; }
.el-table--striped .el-table__body tr.el-table__row--striped:hover td.el-table__cell { background: #f1f5f9; }
/* 单元格文字 */
.el-table .cell { font-size: 13.5px; color: var(--text); line-height: 1.5; }
/* ============ 全系统表格单行显示（V1.164）============
   所有表格单元格强制单行，超长省略号截断，杜绝两行显示；
   悬浮查看全文由列级 show-overflow-tooltip 提供（已带该属性的列不受影响）。
   Element Plus 默认 .cell 为 white-space:normal + word-break:break-all，
   长英文（如 transfer_receive）会把行撑成两行，故全局覆盖。 */
.el-table .cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.el-table__body .el-table__row td.el-table__cell .cell { max-width: 100%; }
.el-table--small .cell { font-size: 13px; }
/* 数字列：中等字重 + 等宽数字对齐 */
.el-table td.el-table__cell .cell.num {
  font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text);
}
/* 弱化列（时间/备注） */
.el-table td.el-table__cell .cell.time-col,
.el-table td.el-table__cell .cell.muted-text { color: var(--text-muted); }
/* 语义色文字（仓龄预警等） */
.text-warning { color: #d97706 !important; font-weight: 500; }
.text-danger { color: #dc2626 !important; font-weight: 600; }
/* 主键列（物流单号/单号/FNSKU）加深 */
.el-table td.el-table__cell .cell.mono { font-size: 13px; }
.el-table td.el-table__cell .cell.order-no { font-weight: 600; color: #334155; }
/* 库存查询：明细跳转链接 */
.inv-detail-link { color: var(--primary); cursor: pointer; text-decoration: none; font-weight: 500; }
.inv-detail-link:hover { text-decoration: underline; }
/* 库存查询：FNSKU 单元格（明细链接 + 汇总标签，垂直居中避免歪斜） */
.fnsku-cell { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.fnsku-summary-tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  font-size: 12px; line-height: 1; color: #16a34a; background: #f0fdf4;
  border: 1px solid #bbf7d0; border-radius: 10px; cursor: pointer;
  flex-shrink: 0; user-select: none; transition: background .15s, border-color .15s;
}
.fnsku-summary-tag:hover { background: #dcfce7; border-color: #86efac; }
.fnsku-summary-tag:active { transform: scale(.96); }
/* 库存查询：0 数量行弱化 */
.el-table .row-dim td.el-table__cell { color: #9ca3af; }
.el-table .row-dim td.el-table__cell .cell { color: #9ca3af; }
.el-table .row-dim td.el-table__cell .cell.num b { color: #9ca3af; }
/* 库存查询：低库存预警（可售数量低于阈值标红） */
.el-table .cell.low-stock b { color: #dc2626 !important; font-weight: 700; }
/* 库存查询：底部合计条 */
.inv-summary {
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  margin-top: 10px; padding: 8px 12px; background: var(--primary-light);
  border: 1px solid #dbeafe; border-radius: 6px; font-size: 13px; color: #475569;
}
.inv-summary b { color: var(--primary); font-size: 14px; font-variant-numeric: tabular-nums; }
/* 空状态 */
.el-table .el-table__empty-block { padding: 8px 0; }
/* 加载遮罩（保留表头骨架感） */
.el-table .el-loading-mask { background: rgba(255, 255, 255, .65); }
.el-table .el-loading-spinner .circular { width: 26px; height: 26px; }
/* 复选框：16~18px，点击区放大 */
.el-table .el-checkbox { height: 18px; }
.el-table .el-checkbox__inner { width: 16px; height: 16px; border-radius: 4px; }
.el-table .el-checkbox__inner::after { top: 3px; left: 5px; }
/* 操作列文字按钮 */
.el-table .cell .el-button.is-link { font-weight: 500; }

/* 作业/检验任务列表 当前选中行高亮 */
.el-table .wms-row-active td.el-table__cell {
  background: var(--primary-light) !important;
  box-shadow: inset 3px 0 0 var(--primary);
}
.el-table .wms-row-active td.el-table__cell .cell { color: var(--primary) !important; font-weight: 600; }

/* ============================================================
   Element Plus 全局克制化覆盖
   ============================================================ */
.el-card { border: 1px solid var(--border) !important; border-radius: var(--radius-card) !important; box-shadow: var(--shadow-card) !important; }
.el-card__header { padding: 14px 16px !important; border-bottom: 1px solid var(--border-light) !important; }
.el-card__body { padding: 16px !important; }

.el-button { border-radius: var(--radius-btn); font-weight: 500; }
.el-button--primary { background: var(--primary); border-color: var(--primary); }
.el-button--primary:hover, .el-button--primary:focus { background: var(--primary-hover); border-color: var(--primary-hover); }
.el-button--primary:active { background: var(--primary-active); border-color: var(--primary-active); }
.el-button--primary.is-plain { background: var(--primary-light); color: var(--primary); border-color: #dbeafe; }
.el-button--primary.is-plain:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.el-input__wrapper, .el-select__wrapper { border-radius: var(--radius-input); }
.el-input__wrapper:hover { box-shadow: 0 0 0 1px #cbd5e1 inset !important; }
.el-input__wrapper.is-focus, .el-select__wrapper.is-focus { box-shadow: 0 0 0 1px var(--primary) inset !important; }

.el-tag { border-radius: var(--radius-tag); border: 1px solid transparent; font-weight: 500; }
.el-tag.el-tag--primary { background: var(--info-bg); color: var(--primary); border-color: #dbeafe; }
.el-tag.el-tag--success { background: var(--success-bg); color: var(--success-dark); border-color: #d1fae5; }
.el-tag.el-tag--warning { background: var(--warning-bg); color: var(--warning-dark); border-color: #fde68a; }
.el-tag.el-tag--danger { background: var(--danger-bg); color: var(--danger-dark); border-color: #fecaca; }
.el-tag.el-tag--info { background: var(--muted-bg); color: var(--text-secondary); border-color: #e5e7eb; }
.el-tag.el-tag--plain { background: #fff; }

/* 表格单元格自定义了 line-height:48px，el-dropdown 默认 vertical-align:top 会被顶到顶部，
   与状态列的 el-tag 垂直错位；改为 middle 使其与 el-button/el-tag 一样垂直居中 */
.el-table .el-dropdown { vertical-align: middle; }

/* 商品档案：FNSKU 展开按钮高亮（展开态） */
.el-table .el-button.expand-btn-on {
  color: #2563eb;
  background: rgba(37, 99, 235, .10);
}

/* 商品档案：新增/编辑弹窗内容超长时内部滚动，避免底部字段被截断 */
.product-edit-dialog .el-dialog__body {
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}

/* 客户门户：新增商品弹窗内部滚动 */
.portal-product-dialog .el-dialog__body {
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}

/* 客户门户：新增商品图片拖拽上传区 */
.portal-img-drop {
  width: 100%;
  height: 128px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #f8fafc;
  position: relative;
  overflow: hidden;
  transition: border-color .15s, background .15s;
}
.portal-img-drop:hover,
.portal-img-drop.dragging {
  border-color: #2563eb;
  background: #eff6ff;
}
.portal-img-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(239, 68, 68, .9);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 2;
}

/* 商品档案（仓库端/客户端共用）：SKU/FNSKU/商品名称 完整显示 + hover 显示复制按钮 */
.hover-copy {
  display: flex;
  align-items: center;
  gap: 4px;
}
.hover-copy-text {
  word-break: break-all;
  white-space: normal;
  line-height: 1.35;
}
.hover-copy-btn {
  opacity: 0;
  transition: opacity .15s;
  flex-shrink: 0;
}
.hover-copy:hover .hover-copy-btn {
  opacity: 1;
}

/* 商品档案（仓库端/客户端共用）：FNSKU 展开明细（一行一个 FNSKU） */
.fnsku-expand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}
.fnsku-expand-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #334155;
  line-height: 1.6;
  border-radius: 4px;
}
.fnsku-expand-item.primary {
  color: #2563eb;
  font-weight: 600;
}
.fnsku-expand-item .hover-copy-btn2 {
  opacity: 0;
  transition: opacity .15s;
  flex-shrink: 0;
}
.fnsku-expand-item:hover .hover-copy-btn2 {
  opacity: 1;
}

.el-pagination { margin-top: 14px; justify-content: flex-end; }
.el-pagination.is-background .el-pager li,
.el-pagination.is-background .btn-prev,
.el-pagination.is-background .btn-next {
  min-width: 32px; height: 32px; line-height: 30px; border-radius: 6px; font-size: 13px; background: #fff;
  border: 1px solid var(--border); margin: 0 2px; color: var(--text-secondary);
}
.el-pagination.is-background .el-pager li:hover:not(.is-active),
.el-pagination.is-background .btn-prev:hover,
.el-pagination.is-background .btn-next:hover { color: var(--primary); border-color: var(--primary); }
.el-pagination.is-background .el-pager li:not(.is-disabled).is-active {
  background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600;
}
.el-pagination .el-select .el-input__wrapper { height: 32px; }
.el-pagination .el-pagination__sizes { font-size: 13px; }
.el-pagination__total, .el-pagination__sizes, .el-pagination__jump { color: var(--text-secondary); font-size: 13px; }

.el-dialog { border-radius: 10px !important; }
.el-dialog__header { padding: 16px 20px 0 !important; }
.el-dialog__body { padding: 16px 20px !important; }
.el-dialog__footer { padding: 0 20px 16px !important; }

/* Tab 线条式（合并标签页） */
.el-tabs__header { margin: 0 0 14px; }
.el-tabs__nav-wrap::after { background-color: var(--border); height: 1px; }
.el-tabs__nav-wrap { padding: 0 !important; margin: 0 !important; }
.el-tabs__header { padding: 0 !important; }
.el-tabs__item { font-size: 14px; color: var(--text-secondary); height: 40px; line-height: 40px; padding: 0 18px; }
.el-tabs__item:hover { color: var(--primary); }
.el-tabs__item.is-active { color: var(--primary); font-weight: 600; }
.el-tabs__active-bar { background-color: var(--primary); height: 2px; }

.el-overlay { z-index: 2000 !important; }
.el-message-box { border-radius: 10px; }
.el-empty__description p { color: var(--text-muted); }

/* 工具栏（兼容现有页面） */
.toolbar { margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar + .toolbar { margin-top: -4px; }

/* 筛选面板（Card 化） */
.wms-filter-panel {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--shadow-card);
}

/* 表格顶部轻量数据统计条（紧凑 Statistic） */
.table-stats {
  display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 12px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); overflow: hidden;
}
.table-stat {
  flex: 1; min-width: 120px; padding: 10px 16px; border-right: 1px solid var(--border-light);
}
.table-stat:last-child { border-right: none; }
.table-stat .ts-label { font-size: 12px; color: var(--text-muted); }
.table-stat .ts-value {
  font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.table-stat .ts-value.ts-primary { color: var(--primary); }

/* 表格记录计数 */
.table-total {
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 12.5px; color: var(--text-secondary);
}
.table-total b { color: var(--text); font-weight: 600; }

/* ============================================================
   登录页（后台 + 门户统一基调）
   ============================================================ */
.login-page, .portal-login-page {
  height: 100vh; display: flex; align-items: center; justify-content: center;
  background: #f5f7fa;
}
.login-card, .portal-login-card {
  width: 380px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 34px 30px; box-shadow: 0 8px 30px rgba(16, 24, 40, .08);
}
.login-logo {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 12px; background: var(--primary);
  color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .22);
}
.login-title, .portal-login-title { text-align: center; margin-bottom: 26px; }
.login-title h1, .portal-login-title h1 { font-size: 20px; margin: 0 0 4px; color: var(--text); font-weight: 700; }
.login-title p, .portal-login-title p { margin: 0; color: var(--text-muted); font-size: 13px; }

/* ============================================================
   标签打印区
   ============================================================ */
.label-box {
  background: var(--card-bg); border: 1px dashed var(--border); border-radius: var(--radius-card);
  padding: 10px 14px; margin: 8px; width: 260px; display: inline-block; font-size: 12px; line-height: 1.6;
}
.label-box .lb-title { font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--border); margin-bottom: 4px; padding-bottom: 4px; }

/* ============================================================
   手机扫码
   ============================================================ */
.scan-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: none; background: none; font-size: 18px; cursor: pointer;
  border-radius: 6px; flex-shrink: 0; padding: 0; line-height: 1; color: var(--text-secondary);
}
.scan-btn:hover { background: var(--muted-bg); color: var(--primary); }
.scanner-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(17, 24, 39, .88); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.scanner-box { background: var(--card-bg); border-radius: 12px; width: 94%; max-width: 420px; overflow: hidden; }
.scanner-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.scanner-title { font-size: 15px; font-weight: 600; color: var(--text); }
.scanner-close {
  width: 32px; height: 32px; border: none; background: var(--muted-bg); border-radius: 50%;
  font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: all .15s;
}
.scanner-close:hover { background: var(--border); color: var(--text); }
.scanner-view { width: 100%; aspect-ratio: 16/9; background: #000; position: relative; overflow: hidden; }
.scanner-view video { width: 100%; height: 100%; object-fit: cover; }
.scanner-footer { padding: 12px 16px 16px; }
.scanner-hint { text-align: center; font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.scanner-manual { display: flex; align-items: center; gap: 6px; }
.scanner-input { flex: 1; height: 36px; border: 1px solid var(--border); border-radius: var(--radius-input); padding: 0 10px; font-size: 14px; outline: none; }
.scanner-input:focus { border-color: var(--primary); }
.scanner-btn { height: 36px; padding: 0 16px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius-input); font-size: 13px; cursor: pointer; white-space: nowrap; }
.scanner-btn:hover { background: var(--primary-hover); }
.scanner-result { text-align: center; font-size: 14px; font-weight: 600; margin-top: 8px; padding: 6px; border-radius: var(--radius-input); background: var(--muted-bg); }

/* ============================================================
   客户门户（与后台同风格）
   ============================================================ */
.portal-layout { display: flex; height: calc(100vh - 38px); margin-top: 38px; overflow: hidden; }
.portal-sidebar {
  width: 200px; background: #fff; flex-shrink: 0; display: flex; flex-direction: column; overflow-y: auto;
  z-index: 100; transition: transform .25s ease; border-right: 1px solid var(--border);
}
.portal-sidebar-header { padding: 16px 14px 12px; border-bottom: 1px solid var(--border-light); text-align: center; }
.portal-sidebar-logo-img { width: 42px; height: 42px; border-radius: 50%; object-fit: contain; display: block; margin: 0 auto 6px; }
.portal-sidebar-logo { font-size: 15px; font-weight: 700; color: var(--primary); display: block; }
.portal-sidebar-user { font-size: 12px; color: var(--text-muted); display: block; margin-top: 4px; }
.portal-sidebar-nav { padding: 8px; flex: 1; }
.portal-sidebar-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin: 2px 0; border-radius: 6px;
  color: var(--text-secondary); text-decoration: none; font-size: 13px; transition: all .15s; cursor: pointer;
}
.portal-sidebar-item:hover { background: var(--primary-light); color: var(--primary); }
.portal-sidebar-item.active { background: var(--primary-light); color: var(--primary); font-weight: 500; box-shadow: inset 3px 0 0 var(--primary); }
.portal-sidebar-item .el-icon { font-size: 16px; }
.portal-sidebar-divider { height: 1px; background: var(--border-light); margin: 8px 12px; }
.portal-sidebar-section-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; padding: 6px 12px 2px; letter-spacing: .5px; }
.portal-sidebar-footer { padding: 8px; border-top: 1px solid var(--border-light); flex-shrink: 0; }

.portal-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.portal-topbar {
  height: 52px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center;
  gap: 12px; padding: 0 16px; flex-shrink: 0;
}
.portal-hamburger {
  display: none; align-items: center; justify-content: center; width: 32px; height: 32px; border: none;
  background: none; font-size: 18px; cursor: pointer; border-radius: 6px; color: var(--text-secondary); flex-shrink: 0;
}
.portal-hamburger:hover { background: var(--muted-bg); }
.portal-topbar-title { font-size: 15px; font-weight: 600; color: var(--text); flex: 1; }
.portal-topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.portal-topbar-user { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.portal-content { flex: 1; overflow-y: auto; padding: 20px; }

/* ===== 门户（OMS）多标签页 ===== */
.portal-tabs-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 38px; z-index: 2100;
  display: flex; align-items: center; padding: 0 12px;
  background: #fff; border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.portal-tabs-inner { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
.portal-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 6px; cursor: pointer; user-select: none;
  font-size: 13px; color: var(--text-secondary);
  background: #f5f6f8; border: 1px solid #e5e7eb;
  transition: all .15s; white-space: nowrap; flex-shrink: 0;
}
.portal-tab:hover { color: var(--primary, #2563eb); border-color: var(--primary, #2563eb); }
.portal-tab.active {
  color: #fff; background: var(--primary, #2563eb); border-color: var(--primary, #2563eb);
  font-weight: 500;
}
.portal-tab.pinned { cursor: default; }
.portal-tab-title { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.portal-tab-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%; font-size: 13px; line-height: 1;
  opacity: .7; flex-shrink: 0; color: inherit;
}
.portal-tab-x:hover { opacity: 1; background: #fee2e2; color: #f56c6c; }
.portal-card { margin-bottom: 16px; }
.portal-card .el-card__body { padding: 16px 18px; }
/* 客户门户：批量导入预报错误明细 */
.portal-import-errors {
  max-height: 200px; overflow-y: auto; margin-top: 8px; padding: 8px 10px;
  background: var(--danger-bg); border: 1px solid #fca5a5; border-radius: var(--radius-input);
}
.portal-metrics { display: flex; gap: 14px; }
.portal-metric-item {
  flex: 1; text-align: center; padding: 16px 8px; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: var(--radius-card);
}
.portal-metric-item .metric-num { font-size: 26px; font-weight: 700; color: var(--primary); line-height: 1.2; font-variant-numeric: tabular-nums; }
.portal-metric-item .metric-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.portal-quick-links { display: flex; gap: 10px; flex-wrap: wrap; }
.portal-quick-links .el-button { flex: 1; min-width: 100px; white-space: normal; }
.portal-aging { display: flex; flex-direction: column; gap: 10px; }
.aging-row { display: flex; align-items: center; gap: 10px; }
.aging-label { width: 80px; font-size: 13px; color: var(--text-secondary); flex-shrink: 0; }
.aging-bar-track { flex: 1; height: 8px; background: var(--muted-bg); border-radius: 4px; overflow: hidden; }
.aging-bar-fill { height: 100%; border-radius: 4px; transition: width .4s; min-width: 2px; }
.aging-value { width: 40px; text-align: right; font-size: 13px; font-weight: 600; color: var(--text); }
.portal-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.portal-item-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.portal-item-header { font-size: 12px; color: var(--text-muted); padding: 0 4px; margin-bottom: 4px; }
.portal-item-block { margin-bottom: 6px; }
.portal-item-block .portal-item-row { margin-bottom: 2px; }
.portal-item-stock { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 4px 2px; font-size: 12px; }
.portal-stock-tag { padding: 1px 8px; border-radius: 10px; background: var(--muted-bg); color: var(--text-muted); }
.portal-stock-tag.active { background: #dbeafe; color: #2563eb; font-weight: 600; }
/* 客户门户：财务中心统计卡片 */
.portal-stat {
  padding: 14px 16px; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: var(--radius-card); text-align: center;
}
.portal-stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.portal-stat-value { font-size: 22px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

/* 客户门户：单列表单字段统一合理宽度，避免输入框/选项框占满整行（el-col 多列和表格明细不受影响） */
.portal-content .el-form-item__content > .el-input,
.portal-content .el-form-item__content > .el-select,
.portal-content .el-form-item__content > .el-input-number,
.portal-content .el-form-item__content > .el-textarea {
  max-width: 400px;
}

/* 详情弹窗 */
.detail-info { display: flex; flex-direction: column; gap: 8px; }
.detail-row { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.detail-label { width: 90px; flex-shrink: 0; color: var(--text-muted); }

/* ============================================================
   滚动条
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1200px) {
  .metrics-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .wms-hamburger { display: inline-flex; }
  .wms-sidebar.sidebar-mobile {
    position: fixed !important; top: 0; left: 0; z-index: 2001; height: 100vh !important;
    transform: translateX(-100%); transition: transform .25s ease;
  }
  .wms-sidebar.sidebar-mobile.open { transform: translateX(0); }
  .wms-sidebar-overlay {
    display: block; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, .4); z-index: 2000; opacity: 0; pointer-events: none; transition: opacity .25s ease;
  }
  .wms-sidebar-overlay.show { opacity: 1; pointer-events: auto; }
  .wms-main { padding: 12px; }
  .wms-user-name, .wms-user-role { display: none; }
  .wms-header { padding: 0 10px; gap: 8px; }
  .wms-header-left { gap: 6px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .donut-wrap { flex-direction: column; align-items: center; gap: 14px; }
  .donut { width: 120px; height: 120px; }
  .el-card .el-table { min-width: 600px; }
  .el-card { overflow-x: auto; }
  .el-dialog { width: 94% !important; max-width: 94% !important; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .el-input, .toolbar .el-select, .toolbar .el-button { width: 100% !important; }
  .el-row .el-col { margin-bottom: 10px; }
  .el-form-item { flex-direction: column; }
  .el-form-item__label { text-align: left; padding: 0 0 4px; height: auto; }
  .dash-welcome { flex-direction: column; align-items: flex-start; }
  .dash-welcome-actions { width: 100%; }
  .login-card, .portal-login-card { width: 90% !important; max-width: 380px; padding: 28px 20px; }

  .portal-hamburger { display: inline-flex; }
  .portal-sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: 200px; transform: translateX(-100%); z-index: 2001;
  }
  .portal-sidebar.open { transform: translateX(0); }
  .portal-sidebar-overlay {
    display: block; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .4);
    z-index: 2000; opacity: 0; pointer-events: none; transition: opacity .25s ease;
  }
  .portal-sidebar-overlay.show { opacity: 1; pointer-events: auto; }
  .portal-content { padding: 12px; }
  .portal-metrics { gap: 8px; }
  .portal-metric-item { padding: 12px 6px; }
  .portal-metric-item .metric-num { font-size: 20px; }
  .portal-item-row { flex-wrap: wrap; }
  .portal-content .el-card .el-table { min-width: 500px; }
  .portal-content .el-card { overflow-x: auto; }
}


/* ==================== 财务管理页（finance.js）UI 优化 ==================== */
.finance-page .el-card { border-radius: 8px; }
.finance-page .el-card__header { border-bottom: 1px solid var(--border-light); }
.finance-page .el-tabs__item { font-weight: 500; }
.finance-page .el-tabs__item.is-active { color: var(--primary); font-weight: 600; }
/* 表格表头浅蓝底 + 主色文字 */
.finance-page .el-table th.el-table__cell {
  background: #f5f8fd; color: #475569; font-weight: 600;
}
.finance-page .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
  background: #f9fbfe;
}
.finance-page .el-table__body tr:hover > td.el-table__cell { background: #f0f5ff; }
/* 合计区卡片 */
.finance-page .bill-summary { background: #f7f9fc; border: 1px solid #e3eaf3; }
.finance-page .bill-summary .el-form-item { margin-bottom: 10px; }
.finance-page .bill-summary .el-collapse-item__header { font-size: 13px; color: #6b7280; }
.finance-page .num { font-variant-numeric: tabular-nums; }
/* 收费项分组树：组名醒目 + 批量选中提示 */
.finance-page .fee-group-name { font-weight: 600; color: #1f4e79; }
.finance-page .fee-sub-name { font-weight: 600; color: #2c3e50; }
.finance-page .batch-hint { margin-left: 8px; color: #909399; font-size: 13px; }
/* 角色编辑弹窗：从左侧菜单右侧开始铺开，保持左侧功能区可见 */
.role-edit-dialog {
  margin-left: 236px !important;
  margin-top: 4vh !important;
  margin-bottom: 4vh !important;
}

/* ============================================================
   客户门户：创建出库单页（UI 重设计 V1.32）
   ============================================================ */
.ob-page { max-width: 1280px; margin: 0 auto; }
.ob-header { margin-bottom: 16px; }
.ob-title { font-size: 20px; font-weight: 700; color: var(--text); }
.ob-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.ob-form .el-form-item { margin-bottom: 16px; }
.ob-form .el-form-item__label { font-size: 13px; color: #606266; padding-bottom: 6px; line-height: 1.2; font-weight: 500; }
.ob-form .el-form-item__content { line-height: 1.4; }
.ob-grid { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.ob-col-left { width: 100%; }
.ob-col-right { width: 100%; }
.ob-card { background: #fff; border: 1px solid var(--border-light); border-radius: 10px; padding: 20px 22px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.ob-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.ob-card-title { font-size: 15px; font-weight: 600; color: var(--text); position: relative; padding-left: 10px; }
.ob-card-title::before { content: ''; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 2px; background: var(--primary); }
.ob-card-tag { font-size: 12px; color: var(--text-muted); background: var(--muted-bg); padding: 2px 10px; border-radius: 10px; }
.ob-subhead { font-size: 13px; font-weight: 600; color: #909399; margin: 2px 0 14px; padding-top: 14px; border-top: 1px dashed var(--border-light); }
.ob-row2 { display: flex; gap: 12px; }
.ob-row2 .el-form-item { flex: 1; }
.ob-row3 { display: flex; gap: 12px; }
.ob-row4 { display: flex; gap: 12px; }
.ob-row4 .el-form-item { flex: 1; }
.ob-row3 .el-form-item { flex: 1; }
.ob-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ob-selected { font-size: 12px; color: #909399; }
.ob-table .el-table__header th { background: #f5f8fd; color: #475569; font-weight: 600; }
.ob-table.el-table--border { border-radius: 6px; }
.ob-tips { margin-top: 8px; font-size: 12px; color: #b0b3b8; line-height: 1.8; }
.ob-mt { margin-top: 16px; }
.ob-upload .el-upload-dragger { padding: 22px 0; }
.ob-upload-text { font-size: 13px; color: #666; margin-top: 4px; line-height: 1.6; }
.ob-upload-text span { font-size: 12px; color: #b0b3b8; }
.ob-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.ob-actions .el-button { min-width: 120px; padding: 10px 20px; }
/* 检测维修作业台：扫码定位高亮 */
.board-highlight { background: #fdf6ec !important; }

/* ===== V1.88 修复：el-image 预览层偶发卡在 enter-from（opacity:0）导致页面出现白色线条 ===== */
.el-image-viewer__wrapper.viewer-fade-enter-from,
.el-image-viewer__wrapper.viewer-fade-leave-to {
  opacity: 1 !important;
}

/* ============================================================
   客户门户 · 极简主题（V1.139）
   原则：白/浅灰两色、去阴影去重边框、去彩色表头、留白舒适、层级靠字重
   仅作用于客户门户作用域，不影响 WMS 后台
   ============================================================ */
.portal-layout {
  background: #fafafc;
}
.portal-main { background: #fafafc; }
.portal-content { padding: 20px 24px 32px; }
.portal-content::-webkit-scrollbar { width: 4px; }

/* —— 侧边栏：去装饰、轻分隔 —— */
.portal-sidebar {
  width: 196px; background: #fff; border-right: 1px solid #f0f1f3;
}
.portal-sidebar-header {
  padding: 20px 18px 14px; border-bottom: 1px solid #f4f5f7; text-align: left;
  display: flex; align-items: center; gap: 10px;
}
.portal-sidebar-logo-img {
  width: 30px; height: 30px; border-radius: 6px; margin: 0; flex-shrink: 0;
}
.portal-sidebar-logo { font-size: 15px; font-weight: 600; color: #111827; display: block; }
.portal-sidebar-user { display: none; }
.portal-sidebar-nav { padding: 8px 10px; }
.portal-sidebar-item {
  padding: 9px 10px; margin: 1px 0; border-radius: 6px; font-size: 13px;
  color: #6b7280; gap: 8px;
}
.portal-sidebar-item:hover { background: #f6f7f9; color: #111827; }
.portal-sidebar-item.active {
  background: #f2f5ff; color: #2563eb; font-weight: 500;
  box-shadow: inset 2px 0 0 #2563eb; border-radius: 6px 2px 2px 6px;
}
.portal-sidebar-item.active .el-icon { color: #2563eb; }
.portal-sidebar-divider { background: #f4f5f7; margin: 6px 12px; }
.portal-sidebar-footer { border-top: 1px solid #f4f5f7; padding: 6px 10px; }

/* —— 顶栏：极轻 —— */
.portal-topbar {
  height: 52px; background: #fafafc; border-bottom: 1px solid #f0f1f3;
  padding: 0 24px;
}
.portal-topbar-title { font-size: 16px; font-weight: 600; color: #111827; }
.portal-topbar-user { font-size: 13px; color: #9ca3af; }

/* —— 卡片：无阴影、极淡边框 —— */
.portal-card { margin-bottom: 16px; border: 1px solid #f0f1f3; border-radius: 8px; }
.portal-card .el-card__body { padding: 18px 20px; }
.portal-content .el-card { border: 1px solid #f0f1f3; border-radius: 8px; box-shadow: none; }

/* —— 指标 / 统计卡：去边框浅底 —— */
.portal-metric-item {
  background: #f6f7f9; border: none; border-radius: 8px; padding: 14px 8px;
}
.portal-metric-item .metric-num { font-size: 24px; color: #111827; }
.portal-metric-item .metric-label { font-size: 12px; color: #9ca3af; }
.portal-stat {
  background: #f6f7f9; border: none; border-radius: 8px; padding: 12px 14px;
}
.portal-stat-value { font-size: 20px; color: #111827; }

/* —— 表格：表头无彩底、极简斑马 —— */
.portal-content .el-table th.el-table__cell {
  background: #f5f8fd; color: #475569; font-weight: 600;
}
.portal-content .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
  background: #fafafc;
}
.portal-content .el-table__body tr:hover > td.el-table__cell { background: #f0f5ff; }
.portal-content .el-table--border .el-table__inner-wrapper::after,
.portal-content .el-table--border { border-color: #f0f1f3; }

/* —— 工具栏与表单控件：收敛圆角 —— */
.portal-toolbar { gap: 8px; margin-bottom: 14px; }
.portal-content .el-button { border-radius: 4px; }
.portal-content .el-input__wrapper, .portal-content .el-select__wrapper { border-radius: 4px; }
.portal-content .el-form-item__label { color: #4b5563; }
.portal-content .el-textarea__inner { border-radius: 4px; }

/* —— 弹窗：轻圆角浅边框 —— */
.portal-content .el-dialog { border-radius: 8px; border: 1px solid #f0f1f3; }
.portal-content .el-dialog__header { padding-bottom: 12px; border-bottom: 1px solid #f4f5f7; }
.portal-content .el-dialog__title { font-size: 15px; font-weight: 600; color: #111827; }

/* —— 创建出库单页卡片 —— */
.ob-card { border: 1px solid #f0f1f3; border-radius: 8px; box-shadow: none; padding: 18px 20px; }
.ob-card-title { font-size: 14px; font-weight: 600; }
.ob-card-title::before { width: 2px; border-radius: 1px; }
.ob-table .el-table__header th { background: #f5f8fd; color: #475569; font-weight: 600; }

/* —— 详情/明细行 —— */
.portal-content .detail-label { color: #9ca3af; }

/* —— 登录页：素净 —— */
.portal-login-page { background: #fafafc; }
.portal-login-card {
  width: 380px; border: none; border-radius: 10px; padding: 36px 32px;
  box-shadow: 0 4px 24px rgba(16, 24, 40, .06);
}
.portal-login-card .login-logo {
  width: 44px; height: 44px; border-radius: 8px; box-shadow: none;
  background: #2563eb; color: #fff; font-size: 20px;
}
.portal-login-title h1 { font-size: 18px; font-weight: 600; color: #111827; }
.portal-login-title p { color: #9ca3af; }
.portal-login-card .el-button { border-radius: 4px; }

/* —— 折叠标签页（首页）轻量化 —— */
.portal-content .el-tabs__item { color: #6b7280; }
.portal-content .el-tabs__item.is-active { color: #2563eb; font-weight: 500; }
.portal-content .el-tabs__active-bar { height: 2px; }

/* —— 创建页：面包屑 + 分区标题 + 两列表单（V1.215 对齐极风） —— */
.portal-breadcrumb { margin-bottom: 14px; }
.portal-breadcrumb .el-breadcrumb__inner { color: #9ca3af; font-size: 13px; }
.portal-breadcrumb .el-breadcrumb__inner a { color: #2563eb; font-weight: 400; }
.portal-breadcrumb .el-breadcrumb__item:last-child .el-breadcrumb__inner { color: #111827; font-weight: 500; }
.portal-section-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #111827; margin-bottom: 14px; }
.portal-section-bar { width: 3px; height: 14px; border-radius: 2px; background: #2563eb; }
.portal-2col-form { display: flex; flex-wrap: wrap; margin-right: -12px; }
.portal-2col-form .el-form-item { width: 50%; padding-right: 12px; margin-bottom: 16px; }
.portal-2col-form .el-form-item.portal-full-row { width: 100%; }
@media (min-width: 1400px) {
  .portal-2col-form .el-form-item { width: 25%; }
}
.portal-card-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }

/* ============ 数据板块（V1.168） ============ */
.data-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: 14px 16px;
}
.trend-chart { width: 100%; }
.trend-legend { display: flex; gap: 16px; font-size: 12px; color: #6b7280; margin-bottom: 6px; }
.trend-legend i.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }
.trend-body { display: flex; align-items: flex-end; gap: 6px; height: 140px; overflow-x: auto; padding-top: 4px; }
.trend-col { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 34px; }
.trend-col .bars { display: flex; align-items: flex-end; gap: 3px; height: 130px; }
.trend-col .bar { width: 12px; border-radius: 2px 2px 0 0; min-height: 2px; }
.trend-date { font-size: 10px; color: #9ca3af; margin-top: 4px; white-space: nowrap; }
.aging-bar { display: flex; width: 100%; height: 10px; border-radius: 5px; overflow: hidden; background: #f3f4f6; margin-bottom: 4px; }
.aging-seg { height: 100%; }
.wh-tag {
  display: inline-block; background: #f1f5f9; border-radius: 4px; padding: 1px 6px;
  font-size: 11px; color: #475569; margin: 1px 3px 1px 0;
}
.mini-stat {
  background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; min-width: 110px;
}
/* ============================================================
   V1.252 全局 UI 统一（窗口/弹窗/组件一致性）
   1) Element Plus 主题色接入 Design System（--primary #2563eb 体系）
   2) 弹窗宽度收敛 4 档：480 / 640 / 760 / 880（超大 960+ 保持）
   3) 表格表头 / 卡片 / 表单 / 分页 / 标签 全局统一
   ============================================================ */

/* ---- 1. Element Plus 主题色接入（select/date/radio/tag/checkbox 等组件统一为品牌蓝） ---- */
:root {
  --el-color-primary: #2563eb;
  --el-color-primary-light-3: #5b8def;
  --el-color-primary-light-5: #94b4f3;
  --el-color-primary-light-7: #c8d8f9;
  --el-color-primary-light-8: #dde7fb;
  --el-color-primary-light-9: #f0f5fe;
  --el-color-primary-dark-2: #1e4fbc;
  --el-border-radius-base: 6px;
  --el-border-radius-small: 4px;
  --el-border-radius-round: 20px;
  --el-text-color-primary: #1f2937;
  --el-text-color-regular: #374151;
  --el-text-color-secondary: #6b7280;
  --el-border-color: #e5e7eb;
  --el-border-color-light: #eef0f3;
  --el-border-color-lighter: #f3f4f6;
}

/* ---- 2. 弹窗（el-dialog）统一 ---- */
.el-dialog {
  border-radius: 12px !important;
  box-shadow: 0 8px 28px rgba(16, 24, 40, .14), 0 2px 8px rgba(16, 24, 40, .08) !important;
  max-width: calc(100vw - 32px);
}
.el-dialog__header { padding: 18px 22px 12px !important; }
.el-dialog__title { font-size: 16px; font-weight: 700; color: #1f2937; letter-spacing: .2px; }
.el-dialog__headerbtn { top: 14px; right: 14px; }
.el-dialog__headerbtn .el-dialog__close { font-size: 18px; color: #9ca3af; }
.el-dialog__headerbtn:hover .el-dialog__close { color: #2563eb; }
.el-dialog__body { padding: 14px 22px 8px !important; }
.el-dialog__footer { padding: 10px 22px 18px !important; }
.el-dialog__footer .el-button + .el-button { margin-left: 10px; }

/* 弹窗内表单垂直间距统一 */
.el-dialog .el-form-item { margin-bottom: 16px; }
.el-dialog .el-form-item__label { color: #374151; font-weight: 500; }
.el-dialog .el-input__wrapper, .el-dialog .el-select__wrapper { border-radius: 6px; }

/* ---- 3. 表格（el-table）全局统一 ---- */
.el-table { --el-table-header-bg-color: #f5f8fd; --el-table-border-color: #eef0f3; --el-table-row-hover-bg-color: #f0f5ff; border-radius: 8px; }
.el-table th.el-table__cell {
  background: #f5f8fd; color: #475569; font-weight: 600; font-size: 13px;
  border-bottom: 1px solid #e8edf5 !important;
}

.el-table td.el-table__cell { color: #374151; }
.el-table__body tr:hover > td.el-table__cell { background: #f0f5ff; }
.el-table--border, .el-table--group { border-color: #eef0f3; }
.el-table__empty-text { color: #9ca3af; }
.el-table .cell { line-height: 1.5; }

/* 表头操作列 / 数字列右对齐保持，文字列默认左对齐（既有左对齐偏好） */

/* ---- 4. 卡片（el-card）统一 ---- */
.el-card {
  border-radius: 10px; border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.el-card__header {
  padding: 13px 18px; border-bottom: 1px solid #eef0f3;
  font-size: 15px; font-weight: 600; color: #1f2937;
}
.el-card__body { padding: 16px 18px; }

/* ---- 5. 表单控件统一 ---- */
.el-input__wrapper, .el-select__wrapper, .el-textarea__inner {
  border-radius: 6px; box-shadow: 0 0 0 1px #e5e7eb inset;
}
.el-input__wrapper:hover, .el-select__wrapper:hover { box-shadow: 0 0 0 1px #c7d6f5 inset; }
.el-input__wrapper.is-focus, .el-select__wrapper.is-focused {
  box-shadow: 0 0 0 1px #2563eb inset !important;
}
.el-form-item__label { color: #374151; }
.el-form-item { margin-bottom: 18px; }
.el-form-item__error { font-size: 12px; }

/* ---- 6. 分页统一 ---- */
.el-pagination { --el-pagination-button-color: #374151; }
.el-pagination.is-background .el-pager li { border-radius: 6px; }
.el-pagination.is-background .el-pager li.is-active { background: #2563eb; }
.el-pagination { justify-content: flex-end; margin-top: 14px; }

/* ---- 7. 标签（el-tag）统一 ---- */
.el-tag { border-radius: 5px; font-weight: 500; }
.el-tag--success { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.el-tag--warning { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.el-tag--danger { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.el-tag--primary { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.el-tag--info { background: #f3f4f6; border-color: #e5e7eb; color: #4b5563; }

/* ---- 8. 筛选工具栏统一（toolbar / filter-bar 常见类） ---- */
.toolbar, .filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 14px 16px; margin-bottom: 12px;
  background: #fff; border: 1px solid #eef0f3; border-radius: 10px;
}
.toolbar .el-input { width: 200px !important; }
.toolbar .el-select { width: 160px !important; }
.toolbar .el-button + .el-button { margin-left: 0; }
.toolbar .el-button--primary { min-width: 84px; }

/* ---- 9. 空态 & 提示统一 ---- */
.el-empty__description p { color: #9ca3af; }

/* ---- 10. 滚动条美化 ---- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- 11. 标签页（el-tabs）统一 ---- */
.el-tabs__item { font-size: 14px; }
.el-tabs__item.is-active { color: #2563eb; font-weight: 600; }
.el-tabs__active-bar { background-color: #2563eb; height: 2px; }
.el-tabs__item:hover { color: #2563eb; }

/* ---- 12. 消息/通知弹层圆角 ---- */
.el-message, .el-message-box { border-radius: 10px; }
.el-message-box { border: 1px solid #e8edf5; box-shadow: 0 8px 28px rgba(16,24,40,.14); }

/* ---- 13. 窄屏弹窗自适应（覆盖既有媒体查询，避免内容溢出） ---- */
@media (max-width: 768px) {
  .el-dialog { width: calc(100vw - 24px) !important; max-width: calc(100vw - 24px) !important; }
  .el-dialog__body { padding: 12px 16px 6px !important; }
  .el-dialog__header { padding: 16px 16px 10px !important; }
  .el-dialog__footer { padding: 8px 16px 14px !important; }
}

/* ---- 14b. OMS 门户工具栏输入统一（与 WMS .toolbar 同规范） ---- */
.portal-toolbar .el-input { width: 200px !important; }
.portal-toolbar .el-select { width: 160px !important; }
.portal-toolbar .el-button + .el-button { margin-left: 0; }
.portal-toolbar .el-button--primary { min-width: 84px; }
@media (max-width: 768px) {
  .portal-toolbar .el-input, .portal-toolbar .el-select, .portal-toolbar .el-button { width: 100% !important; }
}
