/* ============================================================
   铭洋 ERP · 主题样式（轻量覆盖 Bootstrap 5 默认主题）
   设计令牌取自 Ardot 视觉稿：主色 #2563EB / 底 #F4F6F9 /
   卡片白底 + #E5E8EF 描边 / 圆角 12 / 三级文字 / 状态色体系
   ============================================================ */

:root {
  --primary:        #2563EB;
  --primary-weak:   #EFF3FF;
  --primary-hover:  #1D4FD8;
  --bg:             #F4F6F9;
  --surface:        #FFFFFF;
  --border:         #E5E8EF;
  --text-1:         #1A2233;
  --text-2:         #5B6478;
  --text-3:         #98A1B3;
  --table-head:     #EDF1F7;
  --table-alt:      #F5F8FC;
  --table-hover:    #EEF3FF;
  --status-ok:      #059669;
  --status-warn:    #D97706;
  --status-danger:  #DC2626;
  --status-muted:   #98A1B3;
  --flow-branch:    #2C8FCB;
  --radius:         12px;
  --sidebar-w:      240px;
  --topbar-h:       56px;
  --shadow-sm:      0 1px 2px rgba(26,34,51,.06), 0 1px 3px rgba(26,34,51,.04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- Bootstrap 主题覆盖 ---------- */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
}
.bg-primary { background-color: var(--primary) !important; }
.text-primary { color: var(--primary) !important; }
a { color: var(--primary); }

/* 通用面板（现有页面多使用 border rounded bg-white） */
.border.rounded {
  border-color: var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm);
}

/* ---------- 表格 ---------- */
.table {
  background: var(--surface);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: 13.5px;
  width: 100%;
  margin-bottom: 0;
}
.table > :not(caption) > * > * {
  padding: .62rem .85rem;
  border-color: var(--border);
  vertical-align: middle;
}
.table > thead > tr > th {
  background: var(--table-head);
  color: var(--text-2);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: .02em;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}
/* 隔行底色：通过覆盖 Bootstrap 单元格同源变量 --bs-table-bg 实现，避免与 Bootstrap 单元格背景规则的特异性冲突。
   用 :not() 排除状态行（danger/warning/secondary/success/info/active），保证状态高亮优先级始终高于斑马纹。 */
.table > tbody > tr:nth-child(even):not(.table-danger):not(.table-warning):not(.table-secondary):not(.table-success):not(.table-info):not(.table-active) {
  --bs-table-bg: var(--table-alt);
}
/* 行 hover 反馈（覆盖斑马纹与默认态，状态行 hover 也给出统一反馈） */
.table > tbody > tr:hover > * { background: var(--table-hover) !important; }

/* 统一表格观感：table-bordered 仅保留外框与行分隔、去掉竖向网格线，
   使 19 个列表页与仪表盘的干净风格完全一致（一处覆盖，全站受益） */
.table.table-bordered > :not(caption) > * > * { border-left: 0 !important; border-right: 0 !important; }

/* ---------- 徽标/状态 ---------- */
.badge { font-weight: 500; }
.badge.bg-primary { background: var(--primary) !important; }
.badge.bg-secondary { background: #E2E8F0 !important; color: var(--text-2) !important; }
.badge.bg-info { background: var(--primary-weak) !important; color: var(--primary) !important; }
.badge.bg-danger { background: var(--status-danger) !important; }
.badge.bg-success { background: var(--status-ok) !important; }
.badge.bg-warning { background: #FEF3C7 !important; color: var(--status-warn) !important; }

.status-ok     { color: var(--status-ok); }
.status-warn   { color: var(--status-warn); }
.status-danger { color: var(--status-danger); }
.status-muted  { color: var(--status-muted); }

/* ---------- 流程选择卡片（新建流程页） ---------- */
/* 自适应网格：宽屏多列、手机单列（容器 <250px 时自动折为 1 列），无需额外媒体查询 */
.flow-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.flow-card {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: inherit; text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.flow-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(37, 99, 235, .14);
  transform: translateY(-2px);
  color: inherit;
}
/* 图标方块：主色弱底 + 主色线性图标，与全站主色体系一致 */
.flow-card-icon {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px;
  background: var(--primary-weak); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.flow-card-icon svg { width: 24px; height: 24px; display: block; }
.flow-card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.flow-card-title { font-size: 15px; font-weight: 600; color: var(--text-1); line-height: 1.4; }
.flow-card-desc  { font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
/* 右侧“发起”箭头：hover 时变主色并右移 */
.flow-card-go {
  flex: 0 0 auto; align-self: center; color: var(--text-3);
  display: flex; align-items: center;
  transition: color .15s ease, transform .15s ease;
}
.flow-card-go svg { width: 18px; height: 18px; display: block; }
.flow-card:hover .flow-card-go { color: var(--primary); transform: translateX(3px); }
/* 占位卡（更多流程）：虚线描边、弱化图标与文字，不可点击 */
.flow-card--muted {
  border-style: dashed; background: transparent; box-shadow: none; cursor: default;
}
.flow-card--muted:hover { border-color: var(--border); box-shadow: none; transform: none; }
.flow-card--muted .flow-card-icon { background: var(--bg); color: var(--text-3); }
.flow-card--muted .flow-card-title { color: var(--text-2); }

/* ============================================================
   全站视觉增强：标题层级 / 卡片 / 表单 / 按钮 / 标签页 /
   反馈组件 / 空状态 / 焦点态 / 滚动条
   —— 统一在 theme.css 一处，不逐个改模板，40 个页面同时受益
   ============================================================ */

/* ---------- 标题层级 ---------- */
.content h4 { font-size: 18px; font-weight: 700; color: var(--text-1); letter-spacing: .01em; }
.content h4 small { font-size: 12.5px; font-weight: 400; }

/* ---------- 卡片 ---------- */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}
.card-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--text-1);
  padding: .7rem 1rem;
}
.card-header.bg-white { background: var(--surface) !important; }
.card-head-accent { border-left: 3px solid var(--primary); }
.card-body { padding: 1rem; }
/* 卡片内紧贴（p-0）的表格去掉自身外框与圆角，避免与卡片描边叠加成双层线 */
.card-body.p-0 > .table { border: 0; border-radius: 0; }
.card-footer { background: var(--surface); border-top: 1px solid var(--border); }
.modal-content { border: 1px solid var(--border); border-radius: var(--radius); }
.modal-header { border-bottom: 1px solid var(--border); }
.modal-footer { border-top: 1px solid var(--border); }

/* ---------- 表单控件（品牌色聚焦环，替代 Bootstrap 默认蓝） ---------- */
.form-control, .form-select {
  border-color: var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:hover, .form-select:hover { border-color: #CFD6E4; }
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.form-control::placeholder { color: var(--text-3); }
.form-control:disabled, .form-select:disabled { background: var(--bg); color: var(--text-3); }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: .35rem; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.input-group-text { background: var(--bg); border-color: var(--border); color: var(--text-2); font-size: 13.5px; }

/* ---------- 按钮 ---------- */
.btn { border-radius: 8px; font-weight: 500; transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
.btn-sm { font-size: 13px; }
.btn-outline-secondary { color: var(--text-2); border-color: var(--border); }
.btn-outline-secondary:hover { background: var(--bg); color: var(--text-1); border-color: var(--border); }
.btn:focus-visible, .form-control:focus-visible, .form-select:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .25);
}

/* ---------- 标签页（库存等页面使用） ---------- */
.nav-tabs { border-bottom-color: var(--border); }
.nav-tabs .nav-link {
  color: var(--text-2); border: 1px solid transparent; border-radius: 8px 8px 0 0;
  font-size: 13.5px; padding: .5rem .9rem;
}
.nav-tabs .nav-link:hover { color: var(--primary); border-color: transparent; }
.nav-tabs .nav-link.active {
  color: var(--primary); font-weight: 600; background: var(--surface);
  border-color: var(--border) var(--border) var(--surface);
}

/* ---------- 反馈组件 ---------- */
.alert { border-radius: 8px; border-color: var(--border); font-size: 13.5px; }
.badge { border-radius: 6px; }
.list-group { border-radius: var(--radius); overflow: hidden; }
.list-group-item { border-color: var(--border); }
.pagination { --bs-pagination-border-color: var(--border); --bs-pagination-active-bg: var(--primary); --bs-pagination-active-border-color: var(--primary); }

/* ---------- 空状态（列表/表格无数据时统一呈现） ---------- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 40px 16px; text-align: center;
}
.empty-state .es-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--bg); color: var(--text-3);
  display: flex; align-items: center; justify-content: center; margin-bottom: 2px;
}
.empty-state .es-icon svg { width: 26px; height: 26px; display: block; }
.empty-state .es-title { font-size: 14px; font-weight: 600; color: var(--text-2); }
.empty-state .es-desc { font-size: 12.5px; color: var(--text-3); }
/* 表格空行：统一留白、居中与弱化（配合模板里的 empty-cell 类） */
.table td.empty-cell {
  padding: 26px 16px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  background: transparent;
}
/* 表格整表为空时，空状态在单元格内居中呈现（与协同待办页一致） */
.table td .empty-state { padding: 36px 16px; width: 100%; }

/* ---------- 行内图标（按钮/链接内嵌的线性 SVG，替代彩色 emoji） ---------- */
svg.icon { width: 16px; height: 16px; flex: 0 0 auto; vertical-align: -3px; }
.btn svg.icon, a.btn svg.icon { margin-right: 5px; }
.btn-lg svg.icon { width: 20px; height: 20px; vertical-align: -4px; }

/* ---------- 细节：选中色与滚动条 ---------- */
::selection { background: rgba(37, 99, 235, .15); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D6DBE4; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #BFC7D6; }

/* ============================================================
   应用外壳：左栏 + 顶栏 + 内容区
   ============================================================ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ---------- 左侧栏 ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
}
.sidebar-brand img { height: 28px; width: auto; }
.sidebar-nav {
  padding: 12px 10px;
  flex: 1;
}
.sidebar-group { margin-bottom: 14px; }
.sidebar-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--text-3);
  padding: 6px 12px;
  text-transform: uppercase;
}
.sidebar-link, .sidebar-sublink {
  display: block;
  padding: 8px 12px;
  margin: 2px 0;
  border-radius: 8px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.4;
  border-left: 3px solid transparent;
}
.sidebar-sublink { padding-left: 24px; font-size: 13px; }
.sidebar-link:hover, .sidebar-sublink:hover {
  background: var(--bg);
  color: var(--text-1);
}
.sidebar-link.active, .sidebar-sublink.active {
  background: var(--primary-weak);
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
}

/* ---------- 主区域 ---------- */
.main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: var(--topbar-h);
  flex: 0 0 var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 1020;
}
.topbar-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 20px;
  color: var(--text-2);
  cursor: pointer;
}
.topbar-breadcrumb {
  font-size: 14px;
  color: var(--text-2);
  font-weight: 600;
}
.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-actions .user-name { color: var(--text-1); font-size: 13px; }
.topbar-actions a, .topbar-actions .btn { font-size: 13px; }

.content {
  padding: 24px;
  flex: 1 1 auto;
}

/* ---------- 抽屉遮罩 ---------- */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,34,51,.35);
  z-index: 1035;
}

/* ---------- 手机 PWA 极简外壳（/mobile/* 全屏无侧栏/顶栏） ---------- */
.pwa-shell {
  min-height: 100vh;
  background: var(--bg);
  padding: env(safe-area-inset-top) 0 0;
}

/* ---------- 登录页（独立外壳，不继承后台侧栏） ---------- */
.page-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 16px;
  position: relative;
}
.auth-card {
  width: 420px;
  max-width: 100%;
  border-top: 3px solid var(--primary) !important;
}
.auth-logo { height: 48px; width: auto; }
.auth-footer {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
}

/* 待办事宜操作按钮组：默认桌面端横向排列（原 d-flex gap-1 改由本类自管，避免 Bootstrap d-flex !important 干扰移动端 grid） */
.todo-actions { display: flex; gap: 4px; }

/* 手机端表格视图切换条：桌面端默认隐藏，仅在 ≤768px 媒体查询内显示 */
.table-view-toggle { display: none; }
/* 页面标题 + 视图切换图标按钮 的弹性行容器（标题在左、按钮在右） */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head h4 { margin-bottom: 0; }

/* ---------- 移动端：侧栏折叠 + 内容适配 ---------- */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0;
    z-index: 1040;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 2px 0 12px rgba(26,34,51,.12);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.show { display: block; }
  .topbar-toggle { display: block; }
  /* 内容内边距收紧 */
  .content { padding: 14px; }
  /* 手机端表格视图切换：单个图标按钮（点一下在卡片/表格间切换），置于页面标题右侧 */
  .table-view-toggle {
    display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center;
    width: 38px; height: 38px; padding: 0;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); color: var(--text-2); cursor: pointer;
    -webkit-appearance: none; appearance: none; line-height: 1;
  }
  .table-view-toggle:hover { border-color: var(--primary); color: var(--primary); }
  .table-view-toggle svg { width: 18px; height: 18px; display: block; }

  /* —— 卡片视图（默认） —— */
  .table {
    border: none; box-shadow: none; background: transparent; border-radius: 0; overflow: visible;
  }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr {
    margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm);
  }
  .table td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: .55rem .75rem; border: none; border-bottom: 1px solid var(--border);
    text-align: right; white-space: normal;
  }
  .table td:last-child { border-bottom: none; }
  .table td::before {
    content: attr(data-label); font-weight: 600; color: var(--text-2); text-align: left;
    flex: 0 0 auto; max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .table td[colspan]::before { content: none; }
  /* 卡片视图下清空全局斑马变量，使奇偶卡片均为纯白；状态行仍按原色保留 */
  .table tbody tr:nth-child(even):not(.table-danger):not(.table-warning):not(.table-secondary):not(.table-success):not(.table-info):not(.table-active) { --bs-table-bg: var(--surface); }
  .table tbody tr:hover > * { background: transparent !important; }

  /* —— 表格视图（横向滚动 + 首列冻结 + 表头吸顶） —— */
  .table.view-table {
    border: 1px solid var(--border); box-shadow: var(--shadow-sm); background: var(--surface);
    border-radius: var(--radius); display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .table.view-table thead { display: table-header-group; }
  .table.view-table tbody { display: table-row-group; }
  .table.view-table tr { display: table-row; margin: 0; border: none; border-radius: 0; overflow: visible; background: transparent; box-shadow: none; }
  .table.view-table td {
    display: table-cell; padding: .6rem .85rem; border: 1px solid var(--border);
    text-align: left; white-space: nowrap; background-color: var(--bs-table-bg, var(--surface));
  }
  .table.view-table td::before { content: none; }
  .table.view-table tbody tr:hover > * { background: var(--table-hover) !important; }
  .table.view-table thead th {
    position: sticky; top: 0; z-index: 2; background: var(--table-head);
  }
  .table.view-table td:first-child, .table.view-table th:first-child {
    position: sticky; left: 0; z-index: 1; background-color: var(--bs-table-bg, var(--surface));
  }
  .table.view-table thead th:first-child { z-index: 3; }
  /* 顶栏：小屏隐藏面包屑，给操作区留空间 */
  .topbar-breadcrumb { display: none; }
  .topbar { padding: 0 12px; gap: 8px; }
  /* 待办事宜：窄屏下文字与操作按钮上下分栏，按钮等宽、触控区≥40px；
     auto-fit 让 2 按钮（草稿）与 3 按钮（待处理）都均分整行宽度 */
  .todo-item { flex-direction: column; align-items: stretch; }
  .todo-item > div:first-child { margin-bottom: 8px; }
  .todo-actions { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); gap: 8px; }
  .todo-actions > a.btn,
  .todo-actions > form .btn { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: center; }
}

@media (max-width: 420px) {
  .topbar-actions .user-name { display: none; }
}

/* ---------- KPI 卡片：浅色底 + 语义色强调，替代 Bootstrap text-bg-* 饱和实色 ---------- */
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--status-muted);
  border-radius: var(--radius);
}
.kpi-card .kpi-label { color: var(--text-2); font-size: .8rem; margin-bottom: 2px; }
.kpi-card .kpi-value { color: var(--text-1); font-size: 1.45rem; font-weight: 700; line-height: 1.2; }
.kpi-card .kpi-delta { font-size: .8rem; margin-top: 2px; }
.kpi-card .kpi-sub   { color: var(--text-3); font-size: .78rem; margin-top: 2px; }
.kpi-card--success { border-left-color: var(--status-ok); }
.kpi-card--success .kpi-value { color: var(--status-ok); }
.kpi-card--warning { border-left-color: var(--status-warn); }
.kpi-card--warning .kpi-value { color: var(--status-warn); }
.kpi-card--danger  { border-left-color: var(--status-danger); }
.kpi-card--danger .kpi-value { color: var(--status-danger); }
.kpi-card--primary { border-left-color: var(--primary); }
.kpi-card--primary .kpi-value { color: var(--primary); }
.kpi-card--neutral { border-left-color: var(--status-muted); }
.kpi-card--neutral .kpi-value { color: var(--text-1); }

/* ---------- 弹窗组件：统一替代各页手写的 position:fixed 遮罩（避免重复 + 品牌色一致） ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 34, 51, .5);
  z-index: 1050;
  justify-content: center;
  align-items: center;
}
.modal-overlay.is-open { display: flex; }
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 90%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 8px;
}
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-2);
  padding: 0;
}
.modal-close:hover { color: var(--text-1); }
/* 弹窗内标签页（如 OCR 上传/粘贴切换），激活态用品牌色 */
.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.modal-tab {
  border: none;
  background: none;
  padding: 6px 16px;
  cursor: pointer;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
}
.modal-tab.is-active { font-weight: 700; color: var(--primary); border-bottom-color: var(--primary); }
/* 拖拽上传区 */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
}
/* 隐藏态工具类：JS 切换显示时替代 style="display:none" 的视觉写法 */
.d-none-flex { display: none !important; }
/* 定宽工具类：替代 style="width:90px" 这类精确控件宽度 */
.w-90 { width: 90px; }
/* ---------- 商品选择器（packing 页专用，原页内 <style> 抽出并统一品牌 token） ---------- */
.picker-overlay { position: fixed; inset: 0; background: rgba(26,34,51,.45); z-index: 1080; display: flex; align-items: center; justify-content: center; }
.picker-box { background: var(--surface); width: min(90%, 640px); max-height: 80vh; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.picker-head { padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.picker-body { padding: 1rem; overflow: auto; }
.picker-item { cursor: pointer; }
#pickerList { max-height: 360px; overflow: auto; }
#scan-log { max-height: 180px; overflow: auto; font-size: .85rem; }
