/* 鸿辉云供应链 ERP — WEB 端设计令牌与基础组件（1440 设计稿还原） */
:root {
  --brand: #1A6DFF;
  --brand-2: #7A5CFF;
  --brand-weak: #EAF1FF;
  --stock: #00A870;
  --stock-weak: #E8F8F3;
  --warn: #FF9F1C;
  --warn-weak: #FFF4E5;
  --danger: #E54545;
  --danger-weak: #FDECEC;
  --success-bg: #E8F8F3;
  --text: #0E1729;
  --text-2: #5A6478;
  --text-3: #98A2B3;
  --bg: #F4F6FA;
  --card: #FFFFFF;
  --line: #EEF1F6;
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar: 200px;
  --topbar: 72px;
  --shadow: 0 2px 12px rgba(14, 23, 41, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-num: "DIN Alternate", "SF Mono", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
/* `hidden` 是 HTML 的原生语义，但被打上它的按钮多半自带 display:inline-flex，
   那会把 hidden 顶掉 —— 「移除图片」这种按钮就会在没图的时候也杵在那儿。
   全站兜一条，免得每个页面各写一遍。 */
[hidden] { display: none !important; }
body {
  margin: 0; font-family: var(--font); color: var(--text);
  background: var(--bg); font-size: 14px; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #D8DEE9; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: 0 0 var(--sidebar); background: #fff; color: var(--text);
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 20;
  border-right: 1px solid var(--line);
}
.sidebar .logo {
  height: var(--topbar); display: flex; align-items: center; gap: 10px; padding: 0 20px;
  font-size: 16px; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar .logo .mark {
  width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; font-size: 14px; font-weight: 700;
}
.sidebar .logo small { display: block; font-size: 11px; font-weight: 400; color: #7E8CA6; }
.side-nav { flex: 1; overflow-y: auto; padding: 12px 0 24px; display: flex; flex-direction: column; gap: 2px; }
.side-nav .grp { padding: 12px 20px 4px; font-size: 11px; color: var(--text-3); letter-spacing: .5px; }
.side-nav a {
  display: flex; align-items: center; gap: 8px; height: 36px; margin: 0 12px; padding: 0 10px;
  border-radius: 8px; font-size: 13px; color: var(--text-2); cursor: pointer;
}
.side-nav a:hover { color: var(--text); background: var(--bg); }
.side-nav a.active { color: var(--brand); background: var(--brand-weak); font-weight: 600; }
.side-nav a .ic { width: 18px; text-align: center; opacity: .9; }
/* 企业版二级菜单（设计稿 S79/S80 侧栏）：一级可展开，二级缩进 */
.nav-group { display: flex; flex-direction: column; }
.nav-parent .tx { flex: 1; }
.nav-parent .ar { font-size: 11px; color: var(--text-3); transition: transform .18s; padding: 0 2px; }
.nav-parent .ar:hover { color: var(--brand); }
/* 二级 / 三级菜单只在「自己这一组展开时」显示、箭头只在自己展开时转 ——
   1.3.99 起侧栏有三级（系统设置 → 字段库管理 → 三张字典表），
   原来写的是后代选择器，外层展开会把里层收起的三级菜单一起拽出来、箭头也一起转。
   改成直接子元素，各管各的。 */
.nav-group.open > .nav-parent .ar { transform: rotate(180deg); }
.nav-sub { display: none; flex-direction: column; gap: 2px; margin: 2px 12px 6px; padding-left: 26px; border-left: 1px solid var(--line); }
.nav-group.open > .nav-sub { display: flex; }
.nav-sub a { height: 30px; margin: 0; padding: 0 10px; font-size: 12.5px; color: var(--text-3); border-radius: 6px; }
.nav-sub a:hover { color: var(--text); background: var(--bg); }
.nav-sub a.active { color: var(--brand); background: var(--brand-weak); font-weight: 600; }
/* 二级分组（字段库管理）：夹在二级链接里的一行，箭头靠右，自身可展开三级 */
.nav-sub .nav-group { margin: 0; }
.nav-sub .nav-parent.lv2 { height: 30px; margin: 0; padding: 0 10px; font-size: 12.5px; color: var(--text-3); border-radius: 6px; }
.nav-sub .nav-parent.lv2:hover { color: var(--text); background: var(--bg); }
.nav-sub .nav-parent.lv2.active { color: var(--brand); background: var(--brand-weak); font-weight: 600; }
/* 三级菜单：缩进收窄到 12 + 14px，一行四个字（明细字段）在最窄的侧栏里也放得下 */
.nav-sub .nav-sub.lv3 { margin: 2px 0 4px 12px; padding-left: 14px; }
.nav-sub .nav-sub.lv3 a { height: 28px; font-size: 12px; }
.sidebar .side-foot { padding: 10px 12px 14px; font-size: 12px; color: var(--text-2); }
/* S36 侧栏底部席位卡 */
.seat { background: var(--bg); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 5px; }
.seat .t { font-size: 11px; font-weight: 600; color: var(--text); }
.seat .s { font-size: 10px; color: var(--text-3); }
.seat .bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.seat .bar i { display: block; height: 100%; border-radius: 3px; background: var(--stock); }
.seat .who { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }

.main { margin-left: var(--sidebar); flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar); background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 20px; position: sticky; top: 0; z-index: 10;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; }
.topbar .brand .mark {
  width: 28px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 700;
}
/* 品牌标识为图片资源时（与设计稿、小程序端统一） */
.topbar .brand img.mark { background: none; display: block; object-fit: contain; }
.topbar .brand .n { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.25; }
.topbar .brand .n small { display: block; font-size: 10px; font-weight: 400; color: var(--text-3); }
.topbar .spacer { flex: 1; }
.topbar .search {
  width: 260px; height: 32px; border-radius: 16px; background: var(--bg);
  display: flex; align-items: center; gap: 6px; padding: 0 12px; position: relative;
}
/* 搜索结果面板 */
.gsp {
  position: absolute; top: 40px; left: 0; width: 340px; z-index: 50;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px;
  box-shadow: 0 8px 24px rgba(14,23,41,.12); max-height: 380px; overflow: auto;
}
.gsp .it { padding: 8px 10px; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.gsp .it:hover { background: var(--bg); }
.gsp .it b { font-size: 13px; font-weight: 600; color: var(--text); }
.gsp .it span { font-size: 11px; color: var(--text-3); }
.gsp .none { padding: 16px; text-align: center; font-size: 12px; color: var(--text-3); }
.topbar .search input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-size: 12px; font-family: var(--font); color: var(--text);
}
.topbar .search .ic { color: var(--text-3); font-size: 13px; }
.topbar .crumb { font-size: 13px; color: var(--text-2); }
.topbar .crumb b { color: var(--text); font-weight: 600; }
.topbar .right { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--text-2); }
/* 1.3.149：头像放大一倍（28→56），并作为「我的账号」下拉入口。
   顶栏高度同步 56→72，否则 56px 头像会上下顶死。 */
.topbar .avatar {
  width: 56px; height: 56px; border-radius: 28px; background: var(--brand-weak);
  color: var(--brand); display: grid; place-items: center; font-size: 20px; font-weight: 700;
  cursor: pointer; user-select: none; transition: box-shadow .15s, transform .15s;
}
.topbar .avatar:hover { box-shadow: 0 0 0 3px var(--brand-weak); }
.topbar .avatar:active { transform: scale(.96); }
.avatar-wrap { position: relative; flex: 0 0 auto; }
.avatar-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: 216px; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(16,24,40,.16); padding: 6px; font-size: 13px;
}
.avatar-menu[hidden] { display: none; }
.avatar-menu .am-head { padding: 9px 10px 11px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.avatar-menu .am-name { font-weight: 600; color: var(--text); }
.avatar-menu .am-role { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.avatar-menu .am-item {
  display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box;
  padding: 9px 10px; border: 0; border-radius: 6px; background: transparent;
  font: inherit; font-size: 13px; color: var(--text); text-align: left;
  cursor: pointer; text-decoration: none;
}
.avatar-menu .am-item:hover { background: var(--brand-weak); color: var(--brand); }
.avatar-menu .am-item.danger { color: #C4321A; }
.avatar-menu .am-item.danger:hover { background: #FEF0EC; color: #C4321A; }
.avatar-menu .am-ic { width: 16px; text-align: center; font-size: 14px; opacity: .8; }
.avatar-menu .am-sep { height: 1px; background: var(--line); margin: 4px 2px; }
.content { padding: 20px 24px; flex: 1; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 20px; font-weight: 600; }
.page-head .sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.actions { display: flex; gap: 10px; }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.card.tight { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.card-head .more { font-size: 13px; color: var(--brand); cursor: pointer; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- 统计卡 ---------- */
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.stat .label { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.stat .value { font-family: var(--font-num); font-size: 26px; font-weight: 700; margin-top: 8px; letter-spacing: .3px; }
.stat .delta { font-size: 12px; margin-top: 6px; color: var(--text-3); }
.stat .delta.up { color: var(--danger); }
.stat .delta.down { color: var(--stock); }
.stat.blue { background: linear-gradient(135deg, #1A6DFF, #4C8DFF); color: #fff; }
.stat.blue .label, .stat.blue .delta { color: rgba(255,255,255,.85); }
.stat.purple { background: linear-gradient(135deg, #7A5CFF, #9B84FF); color: #fff; }
.stat.purple .label, .stat.purple .delta { color: rgba(255,255,255,.85); }
.stat.green { background: linear-gradient(135deg, #00A870, #33C48D); color: #fff; }
.stat.green .label, .stat.green .delta { color: rgba(255,255,255,.85); }

/* ---------- 表格 ---------- */
.table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th {
  background: #F8FAFD; font-size: 13px; font-weight: 500; color: var(--text-2);
  text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
tbody tr:hover { background: #FAFBFE; }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-family: var(--font-num); }
td .code { font-family: var(--font-num); color: var(--brand); cursor: pointer; }
.td-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
/* 商品管理的「品类」列（1.3.90）：品类名 + 品类大类两行，平台大类名最长 7 字，
   窄列会折成两行、把整行撑高 —— 这里锁不换行，宽度由 goods.js 的列宽让出来 */
.gd-cat { white-space: nowrap; }
/* 采购询价列表（1.3.152）：9 列在 1080 下必然压字 —— 表格给最小宽度、外层横向滚动，
   单元格左右内边距从 16 收到 10（9 列省下 108px），把宽度让给技术文件列的文件名。
   注意别把 overflow 加回 .table-wrap：那会把 pager 一起拖进滚动区 */
.iq-scroll { overflow-x: auto; }
.iq-scroll > table { min-width: 1140px; }
.iq-grid th, .iq-grid td { padding: 12px 10px; }
.iq-grid td { font-size: 13px; }
/* 1.3.155：固定布局 —— auto 布局下唯一没写宽的「询价主题」会吃掉所有剩余宽度，
   容器一宽中间就出现 700px 空洞，其他列挤到折行（截图里的「挤压变形」）。
   列宽改由 colgroup 百分比给出，窗口变宽等比放大；溢出一律省略号 + title 看全名 */
.iq-grid { table-layout: fixed; }
.iq-grid th { overflow: hidden; text-overflow: ellipsis; }
.iq-grid td { overflow: hidden; }
.empty { padding: 60px 0; text-align: center; color: var(--text-3); font-size: 14px; }
.empty .ico { font-size: 40px; opacity: .35; margin-bottom: 10px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff;
  color: var(--text); font-size: 13px; cursor: pointer; font-family: var(--font); transition: .15s;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #0E5AE6; color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: #F5C6C6; }
.btn.danger:hover { background: var(--danger-weak); border-color: var(--danger); color: var(--danger); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { color: var(--brand); cursor: pointer; }
.link + .link { margin-left: 12px; }
/* 表格里的操作链接不许断行：「移除」被拆成「移」「除」比什么都难看 */
td .link { white-space: nowrap; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; line-height: 18px;
  background: #F0F3F8; color: var(--text-2);
  /* 列宽紧张时标签会一个字一行竖着排，比换行更难读；宁可挤旁边也不折标签 */
  white-space: nowrap;
}
.tag.blue { background: var(--brand-weak); color: var(--brand); }
.tag.green { background: var(--stock-weak); color: var(--stock); }
.tag.orange { background: var(--warn-weak); color: #D97706; }
.tag.red { background: var(--danger-weak); color: var(--danger); }
.tag.gray { background: #F0F3F8; color: var(--text-3); }
.tag.purple { background: #F0ECFF; color: var(--brand-2); }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
/* 客户名称占两格：名称后面要并一个「同步平台企业档案」按钮，一格放不下（输入框会被挤到百来像素） */
.field.span2 { grid-column: span 2; }
.pf-name-row { display: flex; gap: 8px; align-items: center; }
.pf-name-row input { flex: 1 1 auto; min-width: 0; }
/* 按钮与输入框同高，且不许换行 —— 「同步平台企业档案」被拆成两行比什么都难看 */
.pf-name-row .btn { flex: 0 0 auto; height: 36px; white-space: nowrap; }
.field label { font-size: 13px; color: var(--text-2); }
.field label .req { color: var(--danger); margin-right: 2px; }
.field input, .field select, .field textarea {
  height: 36px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 12px; font-size: 14px; font-family: var(--font); color: var(--text); background: #fff; outline: none;
}
.field textarea { height: auto; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); }
.field .hint { font-size: 12px; color: var(--text-3); }

/* ---------- 日期区间选择器（对账期间等） ---------- */
.dr { position: relative; }
.field .dr .dr-in { width: 100%; padding-right: 38px; cursor: pointer; }
.dr-btn {
  position: absolute; top: 1px; right: 1px; bottom: 1px; width: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--text-3); cursor: pointer; padding: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.dr-btn:hover { color: var(--brand); background: var(--brand-weak); }

.dr-pop {
  position: fixed; z-index: 900; max-width: calc(100vw - 16px);
  display: flex; gap: 10px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(16, 24, 40, .16);
}
.dr-presets {
  width: 84px; display: flex; flex-direction: column; gap: 2px;
  border-right: 1px solid var(--line); padding-right: 8px;
}
.dr-preset {
  height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent;
  color: var(--text-2); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer;
}
.dr-preset:hover { background: var(--brand-weak); color: var(--brand); }
.dr-main { flex: 1; }
.dr-grids { display: flex; gap: 18px; }
.dr-m { width: 196px; }
.dr-mh { display: flex; align-items: center; justify-content: space-between; height: 26px; margin-bottom: 2px; }
.dr-mt { font-size: 12.5px; font-weight: 600; color: var(--text); }
.dr-nav {
  width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; color: var(--text-2); font-size: 15px; line-height: 1; cursor: pointer;
}
.dr-nav:hover { border-color: var(--brand); color: var(--brand); }
.dr-nav-ghost { width: 24px; }
.dr-wd { display: grid; grid-template-columns: repeat(7, 28px); }
.dr-wd span { height: 22px; line-height: 22px; text-align: center; font-size: 11px; color: var(--text-3); }
.dr-days { display: grid; grid-template-columns: repeat(7, 28px); grid-auto-rows: 26px; }
.dr-d {
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; color: var(--text); font-variant-numeric: tabular-nums;
  border-radius: 6px; cursor: pointer;
}
.dr-d:hover { background: var(--brand-weak); color: var(--brand); }
.dr-d.out { color: #C3C9D6; }
.dr-d.in { background: var(--brand-weak); border-radius: 0; color: var(--brand); }
.dr-d.s, .dr-d.s:hover { background: var(--brand); color: #fff; font-weight: 600; }
.dr-ft {
  display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--line); min-height: 20px;
}
.dr-val { font-size: 12.5px; color: var(--text-2); font-family: var(--font-num); }
.dr-val.wait { color: var(--warn); }
.dr-note { margin-left: auto; font-size: 11.5px; color: var(--warn); }

/* ---------- 对账日选择器（每月几号关账） ---------- */
.rd { position: relative; }
.field .rd .rd-in { width: 100%; padding-right: 38px; cursor: pointer; }
.rd-btn {
  position: absolute; top: 1px; right: 1px; bottom: 1px; width: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--text-3); cursor: pointer; padding: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.rd-btn:hover { color: var(--brand); background: var(--brand-weak); }
.rd-prev { font-size: 12px; line-height: 18px; color: var(--text-3); margin-top: 2px; }
.rd-pop { max-width: calc(100vw - 16px); }
.rd-col { width: 200px; }
.rd-ft { margin-top: 8px; }
.rd-ft .dr-val { display: block; line-height: 18px; }
.rd-ft .dr-val b { color: var(--text); font-weight: 600; font-size: 12.5px; font-family: var(--font); }
.rd-ft .dr-val span { color: var(--text-2); font-size: 12px; }
.rd-last {
  width: 100%; margin-top: 6px; height: 26px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
  color: var(--text-2); font: inherit; font-size: 11.5px; cursor: pointer;
}
.rd-last:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-weak); }
/* 选中日号在每个月里的落点：实心；今天：只描边 —— 两种标记别混成一样 */
.dr-d.anchor, .dr-d.anchor:hover { background: var(--brand); color: #fff; font-weight: 600; border-radius: 6px; }
.dr-d.today { box-shadow: inset 0 0 0 1px var(--brand); border-radius: 6px; }
/* 对账页顶部的提醒条（上期漏对的单据要前移起始日） */
.rd-note-bar {
  margin-bottom: 10px; padding: 9px 12px; border-radius: 8px;
  background: #FFF9EC; border: 1px solid #FFE0A6; color: #8A5B00;
  font-size: 12.5px; line-height: 20px;
}
.rd-note-bar .link { color: var(--brand); font-weight: 600; cursor: pointer; }

/* ---------- 全站日期选择器（点日历，不手敲） ----------
 * 框尾那枚日历图标是唯一的入口提示：原生控件的指示器被藏掉（它弹的是
 * 另一套长相的原生日历），点框内任意位置都开我们自己的月历。 */
html input.dp-in {
  cursor: pointer; padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 16 16' fill='none' stroke='%2398A2B3' stroke-width='1.4' stroke-linecap='round'%3E%3Crect x='2' y='3.3' width='12' height='10.7' rx='2'/%3E%3Cpath d='M2 6.7h12M5.4 1.9v2.6M10.6 1.9v2.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 15px 15px;
}
/* readonly 是刻意的：日期只能由日历产生，不能敲半截 */
html input.dp-in[readonly] { opacity: 1; cursor: pointer; }
html input.dp-in:hover { border-color: #C7D3E8; }
html input.dp-in::-webkit-calendar-picker-indicator { opacity: 0; width: 0; height: 0; margin: 0; padding: 0; pointer-events: none; }
html input.dp-in::-webkit-datetime-edit-fields-wrapper { color: var(--text); }
html input.dp-in::-webkit-datetime-edit-text { color: var(--text-3); }
/* 表格里那种很窄的格子：图标缩一号，别把日期挤成省略号 */
html td input.dp-in { padding-right: 24px; background-position: right 5px center; background-size: 13px 13px; }

.dp-pop {
  position: fixed; z-index: 1100; padding: 10px 10px 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(16, 24, 40, .16); user-select: none;
}
.dp-h { display: flex; align-items: center; justify-content: space-between; height: 28px; margin-bottom: 4px; }
.dp-ym { font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.dp-nav {
  width: 24px; height: 24px; padding: 0; border: 1px solid transparent; border-radius: 6px;
  background: transparent; color: var(--text-2); font-size: 14px; line-height: 1; cursor: pointer;
}
.dp-nav:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-weak); }
.dp-w { display: grid; grid-template-columns: repeat(7, 30px); }
.dp-w span { height: 22px; line-height: 22px; text-align: center; font-size: 11px; color: var(--text-3); }
.dp-g { display: grid; grid-template-columns: repeat(7, 30px); grid-auto-rows: 30px; }
.dp-d {
  display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; background: transparent; font: inherit; font-size: 13px;
  color: var(--text); border-radius: 6px; cursor: pointer; font-variant-numeric: tabular-nums;
}
.dp-d:hover { background: var(--brand-weak); color: var(--brand); }
.dp-d.out { color: #C3C9D6; }
.dp-d.today { box-shadow: inset 0 0 0 1px var(--brand); }
/* 选中：实心；今天：只描边 —— 两个标记别混成一样 */
.dp-d.on, .dp-d.on:hover { background: var(--brand); color: #fff; font-weight: 600; box-shadow: none; }
.dp-d.off { color: #DDE2EA; cursor: not-allowed; background: transparent; }
.dp-mg { display: grid; grid-template-columns: repeat(3, 64px); gap: 6px; }
.dp-mo {
  height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font: inherit; font-size: 12.5px; color: var(--text); cursor: pointer;
}
.dp-mo:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-weak); }
.dp-mo.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.dp-f { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dp-a {
  height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
  color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer;
}
.dp-a:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-weak); }
.dp-v { margin-left: auto; font-size: 12px; color: var(--text-2); font-family: var(--font-num); white-space: nowrap; }
.dp-v[data-empty] { color: var(--text-3); }

/* ---------- 筛选条 ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.filters input, .filters select {
  height: 34px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 12px; font-size: 13px; font-family: var(--font); background: #fff; outline: none; min-width: 150px;
}
.filters input:focus, .filters select:focus { border-color: var(--brand); }

/* ---------- 描述列表 ---------- */
.desc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 20px; }
.desc .item .k { font-size: 13px; color: var(--text-2); }
.desc .item .v { font-size: 14px; margin-top: 4px; word-break: break-all; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* 企业 LOGO（1.3.99）：企业信息里的上传区与查看态小图。
   做法跟平台 LOGO 一致 —— 浅底 + 内描边 + contain，
   方形 / 横版店招都不会被裁掉两头 */
.ent-logo-row { display: flex; gap: 14px; align-items: flex-start; }
/* 收货地址「从往来单位带入」：这只是个取数入口，不是要存下来的字段，
   所以做成贴右的小下拉，不能长得跟旁边的输入框一样大 */
.e-raddr-src {
  margin-left: auto; height: 24px; max-width: 220px; padding: 0 4px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
  font-size: 12px; color: var(--text-2); cursor: pointer;
}
.e-raddr-src:hover { border-color: var(--brand); color: var(--brand); }
/* 字段来源标记：说明这个值是营业执照识别带出来的，不是要你手填的空白。
   做成浅蓝小字，比 hint 更贴标签，又不会抢输入框的注意力 */
.e-ocr {
  margin-left: 6px; padding: 1px 5px; border-radius: 3px;
  background: #EEF4FF; color: #2C6BD8;
  font-size: 10px; font-weight: 400; line-height: 15px; letter-spacing: 0;
  vertical-align: 1px; white-space: nowrap;
}
.ent-logo-box {
  width: 72px; height: 72px; flex: none; border-radius: 12px; overflow: hidden;
  background: #F4F6F9; box-shadow: inset 0 0 0 1px var(--line);
  display: grid; place-items: center;
}
.ent-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.ent-logo-box.is-empty { color: var(--text-3); font-size: 11px; }
.ent-logo-acts { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ent-logo-v {
  width: 44px; height: 44px; border-radius: 8px; object-fit: contain; display: block;
  background: #F4F6F9; box-shadow: inset 0 0 0 1px var(--line);
}

/* ---------- 步骤条 ---------- */
.steps { display: flex; align-items: center; margin-bottom: 24px; }
.steps .step { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; }
.steps .step .dot {
  width: 24px; height: 24px; border-radius: 50%; background: #EDEFF4; color: var(--text-3);
  display: grid; place-items: center; font-size: 12px;
}
.steps .step.on { color: var(--brand); }
.steps .step.on .dot { background: var(--brand); color: #fff; }
.steps .step.done .dot { background: var(--stock); color: #fff; }
.steps .line { flex: 1; height: 1px; background: var(--line); margin: 0 12px; min-width: 40px; }
.steps .line.done { background: var(--stock); }

/* ---------- 抽屉 / 弹层 ---------- */
.mask { position: fixed; inset: 0; background: rgba(14,23,41,.45); z-index: 100; display: flex; justify-content: flex-end; }
.drawer { width: 520px; background: #fff; height: 100%; display: flex; flex-direction: column; animation: slide .22s ease; }
/* 列多的表单用宽抽屉（1.3.94 报价议价表 6 列，520px 装不下） */
.drawer.is-wide { width: 760px; }
/* 列更多的宽表格（1.3.120 运费模板地区规则 8 列，760px 仍会挤成一团） */
.drawer.is-xwide { width: 1080px; max-width: 94vw; }
@keyframes slide { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer header { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.drawer .body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer footer { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.modal { margin: auto; width: 460px; background: #fff; border-radius: var(--radius); overflow: hidden; }
.modal header { padding: 18px 20px 0; font-size: 16px; font-weight: 600; }
.modal .body { padding: 16px 20px; font-size: 14px; color: var(--text-2); }
.modal footer { padding: 12px 20px 18px; display: flex; justify-content: flex-end; gap: 10px; }

/* 居中表单弹窗（1.3.121 运费模板）：抽屉贴右侧填 8 列表格要来回甩头，
   而且 xwide 1080px 几乎盖住整页，改居中 + 底部按钮常驻更稳 */
.mask.is-center { justify-content: center; align-items: center; }
.modal.is-form {
  width: 1000px; max-width: 95vw; max-height: 88vh; border-radius: 12px;
  display: flex; flex-direction: column; animation: pop .18s ease;
}
.modal.is-form.is-sm { width: 720px; }
.modal.is-form header {
  flex: none; height: 54px; padding: 0 22px; font-size: 15px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.modal.is-form header .close { cursor: pointer; color: var(--text-3); font-weight: 400; }
.modal.is-form header .close:hover { color: var(--text); }
.modal.is-form .body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 22px; font-size: 14px; color: var(--text); }
.modal.is-form footer { flex: none; padding: 12px 22px; border-top: 1px solid var(--line); }
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: .5; } to { transform: none; opacity: 1; } }
/* 危险操作的二次密码确认（1.3.99）：标题下面先摆风险，再让人输密码 */
.pwd-box { width: 420px; }
.pwd-box .pwd-tip {
  padding: 10px 12px; margin-bottom: 14px; border-radius: var(--radius-sm);
  background: var(--danger-weak); border: 1px solid #FBD5D5;
  color: #8E2B2B; font-size: 13px; line-height: 1.7;
}
.pwd-box .field { margin-bottom: 0; }
.pwd-box .field input { width: 100%; font-size: 14px; letter-spacing: 1px; }
.pwd-box .pwd-err { margin-top: 10px; font-size: 12.5px; color: var(--danger); line-height: 1.6; }
.close { cursor: pointer; color: var(--text-3); font-size: 18px; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 16px; font-size: 13px; color: var(--text-2); }
.pager button {
  min-width: 30px; height: 30px; border: 1px solid var(--line); background: #fff;
  border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text-2);
}
.pager button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; top: 24px; transform: translateX(-50%);
  background: #0E1729; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px; z-index: 999;
}
.loading { padding: 40px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ---------- 图表占位（纯 CSS 柱状） ---------- */
.bars { display: flex; align-items: flex-end; gap: 18px; height: 180px; padding: 10px 0; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bars .stack { width: 100%; display: flex; align-items: flex-end; gap: 4px; height: 150px; }
.bars .bar { flex: 1; border-radius: 4px 4px 0 0; min-height: 4px; }
.bars .bar.p { background: linear-gradient(180deg, #4C8DFF, var(--brand)); }
.bars .bar.s { background: linear-gradient(180deg, #9B84FF, var(--brand-2)); }
.bars .lab { font-size: 12px; color: var(--text-3); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }

/* ---------- 登录（S38-WEB登录页-双入口，1440×900；lp- 前缀） ---------- */
.login-page { min-height: 100vh; display: flex; }

/* 品牌区 560px：渐变 #0E4FC4(顶) → #1A6DFF(底)，pad 64/72/56，gap 24 */
.lp-brand {
  width: 560px; flex: 0 0 560px; color: #fff;
  background: linear-gradient(180deg, #0E4FC4 0%, #1A6DFF 100%);
  padding: 72px 64px 56px; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 24px;
}
/* 品牌标识：方形图标直接放；横版标识（图形+文字）必须套白色底板，
   否则深色字落在深蓝背景上等于看不见（线上就踩过这个） */
.lp-logo-wrap { display: inline-flex; align-self: flex-start; align-items: center; justify-content: center; }
.lp-logo { width: 64px; height: 64px; border-radius: 14px; display: block; }
.lp-logo-wrap.wide { background: #fff; border-radius: 14px; padding: 10px 18px; box-shadow: 0 6px 18px rgba(6, 28, 76, .18); }
.lp-logo-wrap.wide .lp-logo { width: auto; height: 34px; max-width: 216px; border-radius: 0; object-fit: contain; }
.lp-name { font-size: 32px; font-weight: 700; line-height: 1.2; }
.lp-slogan { font-size: 15px; color: rgba(255, 255, 255, .85); }
.lp-flex { flex: 1; min-height: 24px; }
.lp-feat { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.lp-check {
  width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%;
  background: rgba(255, 255, 255, .22); color: #fff;
  font-size: 11px; line-height: 18px; text-align: center;
}
.lp-qr { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.lp-qr img { width: 84px; height: 84px; border-radius: 8px; display: block; background: #fff; padding: 4px; box-sizing: border-box; }
.lp-qr-tip { font-size: 12px; color: rgba(255, 255, 255, .8); line-height: 1.6; }

/* 登录区：表单 400px，gap 16 */
.lp-form-wrap { flex: 1; display: flex; align-items: center; justify-content: center; background: #fff; padding: 40px; }
.lp-form { width: 400px; display: flex; flex-direction: column; gap: 16px; }
.lp-title { font-size: 24px; font-weight: 700; color: var(--text); }
.lp-sub { font-size: 13px; color: var(--text-2); margin-top: -8px; }

/* 入口选择：卡片 圆角12，pad 14/12，gap 12 */
.lp-entries { display: flex; gap: 12px; }
.lp-entry {
  flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  cursor: pointer; display: flex; flex-direction: column; gap: 5px; background: #fff;
}
.lp-entry.on { border-color: var(--brand); background: #EAF1FF; }
.lp-entry-h { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.lp-entry.on .lp-entry-h { color: var(--brand); }
.lp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.lp-entry.on .lp-dot { background: var(--brand); }
.lp-entry-d { font-size: 11px; color: var(--text-2); line-height: 1.5; }
/* 统一入口（身份由账号决定，不再提供版本切换） */
.lp-entries.single .lp-entry { cursor: default; }
.lp-entries.single .lp-entry-d { line-height: 1.6; }

/* 侧栏身份标签：只读，替代原来的「企业版 / 运营商版」切换按钮 */
.acct-tag {
  margin-top: 10px; padding: 7px 10px; border-radius: 8px; text-align: center;
  font-size: 11px; font-weight: 600; color: var(--brand);
  background: #EAF1FF; border: 1px solid #CFE0FF;
}
.acct-tag.op { color: #B26A00; background: #FFF4E5; border-color: #FFE0B2; }

/* 输入：h44，圆角10，pad 14 */
.lp-field { height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 14px; box-sizing: border-box; }
.lp-field input { width: 100%; height: 42px; border: none; outline: none; font-size: 13px; color: var(--text); background: transparent; }
.lp-field input::placeholder { color: #98A2B3; }
.lp-row { display: flex; gap: 10px; }
.lp-row .lp-field { flex: 1; }
.lp-code {
  width: 110px; flex: 0 0 110px; height: 44px; border: none; border-radius: 10px;
  background: #EAF1FF; color: var(--brand); font-size: 12px; font-weight: 600; cursor: pointer;
}
.lp-submit {
  height: 44px; border: none; border-radius: 10px; background: var(--brand); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.lp-agree { font-size: 11px; color: var(--text-2); text-align: center; }
.lp-divider { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--text-2); }
.lp-divider i { flex: 1; height: 1px; background: var(--line); }
.lp-wx {
  height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer;
}
.lp-wx svg { width: 18px; height: 18px; }

/* 扫码登录面板：点「微信扫码登录」展开，二维码由服务端出（带一次性票据） */
.lp-scan {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; background: #FBFCFE;
}
.lp-scan-qr {
  width: 180px; height: 180px; border-radius: 10px; background: #fff; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.lp-scan-qr img { width: 100%; height: 100%; display: block; }
.lp-scan-load {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand);
  display: inline-block; animation: lp-spin .8s linear infinite;
}
.lp-scan-load.err {
  border: none; animation: none; width: auto; height: auto;
  font-size: 28px; font-weight: 700; color: #D64545; line-height: 1;
}
@keyframes lp-spin { to { transform: rotate(360deg); } }
.lp-scan-tip { font-size: 12px; color: var(--text-2); line-height: 1.6; text-align: center; }
.lp-scan-tip.ok { color: #067A56; }
.lp-scan-tip.warn { color: #B26A00; }
.lp-scan-tip.err { color: #D64545; }
/* 第二行小字：错误码 / 修复步骤这类补充信息，主行只留人话（1.3.86） */
.lp-scan-sub { display: block; margin-top: 6px; font-size: 11px; line-height: 1.7; color: var(--text-3); text-align: left; word-break: break-word; }

/* 扫码出不来时的说明块（1.3.86）：区分「谁能修」，不再把 errcode 整串甩给员工 */
.wx-err { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #FFF5F2; border: 1px solid #FFD9CF; }
.wx-err-t { font-size: 13px; font-weight: 600; color: #C0392B; word-break: break-word; }
.wx-err-d { font-size: 12.5px; line-height: 20px; color: var(--text-2); margin-top: 6px; word-break: break-word; }
.wx-err-c { font-size: 11px; line-height: 18px; color: var(--text-3); margin-top: 8px; word-break: break-all; }
/* 凭证没配齐是「平台还没做完」，不是报错：用黄条，别用红条吓人 */
.wx-warn { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #FFFBEB; border: 1px solid #FDE68A; }
.wx-warn-t { font-size: 13px; font-weight: 600; color: #B45309; word-break: break-word; }
.wx-warn-d { font-size: 12.5px; line-height: 20px; color: var(--text-2); margin-top: 6px; word-break: break-word; }
.lp-scan-foot { display: flex; gap: 20px; font-size: 12px; color: var(--brand); }
.lp-scan-foot span { cursor: pointer; }

/* 微信扫码登录弹窗（1.3.23）：原来是登录卡片内联展开，会把卡片撑长、把公众号二维码顶走。
   改成点按钮弹窗后，登录区恢复成干净的一屏，扫码这种低频动作不再占常驻位置。 */
.lp-modal { position: fixed; inset: 0; z-index: 999; display: none; align-items: center; justify-content: center; }
.lp-modal.on { display: flex; }
.lp-modal-mask { position: absolute; inset: 0; background: rgba(14, 23, 41, .45); }
.lp-modal-card {
  position: relative; width: 320px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 14px; box-shadow: 0 18px 48px rgba(14, 23, 41, .22);
  padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 12px;
}
.lp-modal-head { display: flex; align-items: center; }
.lp-modal-title { font-size: 15px; font-weight: 600; color: var(--text); }
.lp-modal-x { margin-left: auto; font-size: 20px; line-height: 1; color: var(--text-3); cursor: pointer; }
.lp-modal-body { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lp-modal-foot { display: flex; gap: 22px; justify-content: center; font-size: 12px; color: var(--brand); }
.lp-modal-foot span { cursor: pointer; }
.lp-modal-foot span.gray { color: var(--text-2); }

/* 公众号二维码：跟在登录卡片正下方（原在左侧品牌区底部，填完表单容易漏看） */
.lp-qr-bottom {
  margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.lp-qr-bottom img {
  width: 72px; height: 72px; border-radius: 8px; display: block;
  background: #fff; padding: 4px; box-sizing: border-box; border: 1px solid var(--line);
}
.lp-qr-bottom-tip { font-size: 12px; color: var(--text-2); line-height: 1.6; }

/* 登录页「平台公众号二维码」常驻卡：放在「其他登录方式 / 微信扫码登录」下面，
   扫码登录改成弹窗后这块位置就归它了（登录卡片下方不再另放一个，避免同屏两个一样的码） */
.lp-qr-card {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.lp-qr-card img {
  width: 76px; height: 76px; border-radius: 8px; display: block;
  background: #fff; padding: 4px; box-sizing: border-box; border: 1px solid var(--line);
}
.lp-qr-card-tip { display: flex; flex-direction: column; gap: 2px; }
.lp-qr-card-tip b { font-size: 12px; font-weight: 600; color: var(--text); }
.lp-qr-card-tip span { font-size: 11px; color: var(--text-2); line-height: 1.6; }

/* 登录方式切换（验证码 / 密码） */
.lp-modes { display: flex; gap: 18px; }
.lp-mode { font-size: 13px; color: var(--text-2); padding-bottom: 4px; border-bottom: 2px solid transparent; cursor: pointer; }
.lp-mode.on { color: var(--brand); font-weight: 600; border-bottom-color: var(--brand); }

/* 提示条：说明验证码为何收不到 */
.lp-hint {
  font-size: 12px; line-height: 1.6; padding: 10px 12px; border-radius: 10px;
  background: #FFF8E6; color: #B26A00; border: 1px solid rgba(255, 159, 28, .28);
}
.lp-hint.ok { background: #E8F8F3; color: #067A56; border-color: rgba(0, 168, 112, .2); }
.lp-hint.info { background: #F4F8FF; color: var(--brand); border-color: rgba(26, 109, 255, .2); }

/* 注册 / 忘记密码 */
.lp-links { display: flex; justify-content: space-between; font-size: 12px; color: var(--brand); }
.lp-links span { cursor: pointer; }
.lp-banner {
  font-size: 12px; padding: 10px 12px; border-radius: 10px;
  background: #EAF1FF; color: var(--brand);
}

@media (max-width: 1100px) {
  .lp-brand { display: none; }
  .lp-form-wrap { padding: 24px; }
}
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs span { padding-bottom: 10px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.tabs span.on { color: var(--brand); border-bottom: 2px solid var(--brand); font-weight: 600; }

/* ---------- S36 企业版工作台（专用，wb- 前缀） ---------- */
.wb-head { display: flex; align-items: center; justify-content: space-between; }
.wb-head .t { font-size: 18px; font-weight: 700; color: var(--text); }
.wb-head .s { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.wb-head .acts { display: flex; gap: 10px; }

.wb-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.wb-kpi .k {
  background: #fff; border-radius: 10px; padding: 14px 16px; min-height: 96px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px;
}
.wb-kpi .k .lab { font-size: 12px; color: var(--text-2); }
.wb-kpi .k .row { display: flex; align-items: center; gap: 8px; }
.wb-kpi .k .v { font-family: var(--font-num); font-size: 22px; font-weight: 700; color: var(--text); }
.wb-kpi .k .v.warn { color: #FF8B00; }
.wb-kpi .k .sub { font-size: 11px; color: var(--text-3); }
.wb-pill { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 6px; font-size: 10px; font-weight: 600; }
.wb-pill.up { background: var(--stock-weak); color: var(--stock); }
.wb-pill.flat { background: #F0F3F8; color: var(--text-3); }
.wb-pill.warn { background: var(--warn-weak); color: #B25E00; }
.wb-pill.blue { background: var(--brand-weak); color: var(--brand); }
.wb-pill.green { background: var(--stock-weak); color: var(--stock); }
.wb-pill.o { background: var(--warn-weak); color: #B25E00; }

.wb-row { display: grid; gap: 16px; margin-top: 16px; align-items: start; }
.wb-row.r1 { grid-template-columns: 1fr 340px; }
.wb-row.r2 { grid-template-columns: 380px 1fr; }
.wb-card { background: #fff; border-radius: 10px; padding: 14px 16px; box-shadow: var(--shadow); }
.wb-card .ch { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wb-card .ch h4 { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.wb-card .unit { font-size: 11px; color: var(--text-3); }
.wb-card .more { font-size: 12px; color: var(--brand); cursor: pointer; }

.wb-bars { display: flex; align-items: flex-end; gap: 12px; height: 190px; margin-top: 14px; }
.wb-bars .b { width: 40px; border-radius: 4px; background: var(--brand-weak); min-height: 8px; }
.wb-bars .b.on { background: var(--brand); }
.wb-axis { display: flex; gap: 12px; margin-top: 6px; }
.wb-axis span { width: 40px; text-align: center; font-size: 10px; color: var(--text-3); }
.wb-axis span.on { color: var(--brand); }

.wb-struct { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.wb-struct .r { display: flex; align-items: center; gap: 8px; }
.wb-struct .nm { width: 64px; font-size: 12px; color: var(--text-2); }
.wb-struct .track { flex: 1; height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.wb-struct .track i { display: block; height: 100%; border-radius: 4px; }
.wb-struct .pv { width: 32px; text-align: right; font-size: 12px; color: var(--text); }

.wb-todo { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.wb-todo .i {
  height: 40px; border-radius: 8px; background: var(--bg); padding: 0 12px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-2); cursor: pointer;
}
.wb-todo .i:hover { background: #EDF1F8; }
.wb-todo .i b { font-size: 14px; font-family: var(--font-num); }
.wb-todo .i b.o { color: #FF8B00; }
.wb-todo .i b.b { color: var(--brand); }
.wb-todo .i b.r { color: var(--danger); }

.wb-doc { margin-top: 10px; }
.wb-doc .h {
  display: flex; align-items: center; height: 32px; border-radius: 6px;
  background: var(--bg); font-size: 11px; color: var(--text-3);
}
.wb-doc .d {
  display: flex; align-items: center; height: 40px; font-size: 12px;
  color: var(--text); border-bottom: 1px solid var(--line); cursor: pointer;
}
.wb-doc .d:last-child { border-bottom: 0; }
.wb-doc .d:hover { background: #FAFBFE; }
.wb-doc span { padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-doc .c1 { width: 120px; font-family: var(--font-num); }
.wb-doc .c2 { width: 80px; color: var(--text-2); }
.wb-doc .c3 { flex: 1; color: var(--text-2); }
.wb-doc .c4 { width: 90px; font-family: var(--font-num); }
.wb-doc .c5 { width: 80px; }

.wb-notice {
  display: flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 16px;
  border-radius: 8px; background: var(--warn-weak); padding: 10px 14px;
  font-size: 12px; color: #B25E00; line-height: 1.5;
}

@media (max-width: 1280px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .desc { grid-template-columns: repeat(2, 1fr); }
  .wb-kpi { grid-template-columns: repeat(2, 1fr); }
  .wb-row.r1, .wb-row.r2 { grid-template-columns: 1fr; }
}

/* ---------- 系统设置：子页签与嵌套面板（短信 / OCR 并入系统设置） ---------- */
.tabs button {
  background: none; border: none; padding: 0 0 10px; font-family: inherit; font-size: 14px;
  color: var(--text-2); cursor: pointer;
}
.tabs button.on { color: var(--brand); border-bottom: 2px solid var(--brand); font-weight: 600; }
.subpane > .page-head {
  margin: 0 0 14px; padding: 0 0 12px; align-items: flex-end;
  border-bottom: 1px dashed var(--line);
}
.subpane > .page-head h1 { font-size: 17px; }

/* ---------- 邮箱配置：收发人规则 + 通道自检 ---------- */
.mail-rcpt { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 20px; }
.mail-rcpt .field label .role {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px;
  font-size: 11px; background: var(--brand-weak); color: var(--brand);
}
.mail-steps { display: flex; flex-direction: column; gap: 6px; }
.mail-step { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-2); }
.mail-step .dot {
  width: 16px; height: 16px; border-radius: 50%; flex: none; margin-top: 2px;
  display: grid; place-items: center; font-size: 10px; color: #fff; background: var(--text-3);
}
.mail-step.ok .dot { background: var(--stock); }
.mail-step.bad .dot { background: var(--danger); }
.mail-step .nm { font-weight: 600; color: var(--text); margin-right: 6px; }

/* ---------- 收发人：绑定企业版用户字段 + 实时匹配结果 ---------- */
.mail-rcpt-list { display: flex; flex-direction: column; gap: 10px; }
.mail-rcpt-row {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; background: #FBFCFE;
}
.mail-rcpt-row .rr-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.mail-rcpt-row .rr-name { font-size: 14px; font-weight: 600; color: var(--text); }
.mail-rcpt-row .rr-head .role {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font-size: 11px; background: var(--brand-weak); color: var(--brand);
}
.mail-rcpt-row .rr-match {
  margin-left: auto; font-size: 12px; font-family: var(--font-num);
  padding: 2px 8px; border-radius: 10px; background: #F0F3F8; color: var(--text-3);
  max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mail-rcpt-row .rr-match.ok { background: var(--stock-weak); color: var(--stock); }
.mail-rcpt-row .rr-match.none { background: var(--danger-weak); color: var(--danger); }
.mail-rcpt-row .rr-body { display: flex; gap: 8px; flex-wrap: wrap; }
.mail-rcpt-row .rr-body select { min-width: 190px; }
.mail-rcpt-row .rr-body .rr-fixed { flex: 1; min-width: 240px; }
.mail-rcpt-row .hint { margin-top: 6px; }

/* ---------- 发送模板设置 ---------- */
.tpl-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tpl-tabs button {
  height: 32px; padding: 0 14px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--text-2); font-size: 13px;
}
.tpl-tabs button:hover { border-color: var(--brand); color: var(--brand); }
.tpl-tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.tpl-vars { margin: 4px 0 6px; }
.tpl-vars .tv-label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.tpl-vars .tv-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.var-chip {
  height: 26px; padding: 0 10px; border-radius: 13px; cursor: pointer;
  border: 1px dashed var(--line); background: #fff;
  font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-2);
}
.var-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-weak); }
.tpl-preview { margin-top: 14px; }
.tpl-preview .tpl-pv-head {
  display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px;
  font-size: 13px; color: var(--text-3);
}
.tpl-preview .tpl-pv-head b { color: var(--text); font-size: 14px; }
.tpl-preview .tpl-pv-frame {
  width: 100%; height: 320px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff;
}

/* 单据变量速查：按单据类型分组展示「变量 → 单据字段」的对应关系 */
.dv-list { display: flex; flex-direction: column; gap: 12px; }
.dv-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--bg-2, #FAFBFC); }
.dv-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; flex-wrap: wrap; }
.dv-head .dv-desc { color: var(--text-3); font-size: 12px; }
.dv-vars { display: flex; gap: 6px; flex-wrap: wrap; }
.var-chip.static { cursor: default; border-style: solid; }
.var-chip.static:hover { border-color: var(--line); color: var(--text-2); background: #fff; }
.var-chip i {
  font-style: normal; margin-left: 6px; padding-left: 6px;
  border-left: 1px solid var(--line); color: var(--text-3); font-size: 11px;
}
/* 当前单据取不到值的变量：标黄提醒，避免写进模板发出去是空的 */
.var-chip.warn { border-color: var(--warn); color: var(--warn); background: #FFF8E6; }
.var-chip.warn i.var-warn { border-left-color: var(--warn); color: var(--warn); font-family: inherit; }

/* 工号 / 编码：等宽字体，避免 0 与 O、1 与 l 混淆 */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: .2px; }

/* ============ 往来单位（S44 / S44B / S44C / S52 / S53 / S54 / S55 / S56）============ */

/* ---------- 表单分节（新增客户 / 新增供应商）---------- */
.pf-wrap { display: flex; flex-direction: column; gap: 22px; }
.pf-sec { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pf-sec-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: #F7F9FC; border-bottom: 1px solid var(--line);
}
.pf-sec-head h4 { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.pf-sec-tip { font-size: 12px; color: var(--text-3); }
.pf-sec > .form-grid { padding: 16px; margin: 0; }

/* ---------- 详情键值对 ---------- */
.kv-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; }
.kv { display: flex; flex-direction: column; gap: 3px; }
.kv .k { font-size: 12px; color: var(--text-3); }
.kv .v { font-size: 13px; color: var(--text); word-break: break-all; }
.kv-list.one { grid-template-columns: 1fr; }

/* ---------- 额度进度条 ---------- */
.credit-bar { margin-top: 10px; }
.credit-bar .track { height: 8px; border-radius: 4px; background: #EEF1F6; overflow: hidden; }
.credit-bar .track i { display: block; height: 100%; border-radius: 4px; transition: width .2s; }
.credit-bar .row { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--text-2); }

/* ---------- 详情页两栏 ---------- */
.pd-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.pd-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pd-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.pd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pd-head .tt { display: flex; align-items: center; gap: 12px; }
.pd-avatar {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 10px; color: #fff;
  background: linear-gradient(135deg, #1A6DFF, #4C8DFF);
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700;
}
.pd-head .nm { font-size: 18px; font-weight: 700; margin: 0; }
.pd-head .meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.pd-head .acts { display: flex; gap: 10px; }

.pd-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pd-kpi .k { background: #F7F9FC; border-radius: 8px; padding: 12px 14px; }
.pd-kpi .k .lab { font-size: 12px; color: var(--text-3); }
.pd-kpi .k .val { font-family: var(--font-num); font-size: 20px; font-weight: 700; margin-top: 4px; }
.pd-kpi .k .ext { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ---------- 待办 / 分布列表 ---------- */
.todo-list { display: flex; flex-direction: column; gap: 10px; }
.todo-item { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.todo-item .n { font-family: var(--font-num); font-weight: 700; color: var(--brand); }
.dist-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.dist-row .nm { width: 96px; flex: 0 0 96px; color: var(--text-2); }
.dist-row .track { flex: 1; height: 8px; border-radius: 4px; background: #EEF1F6; overflow: hidden; }
.dist-row .track i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #4C8DFF, var(--brand)); }
.dist-row .pc { width: 46px; text-align: right; font-family: var(--font-num); color: var(--text-2); }

/* ---------- 快捷操作 ---------- */
.qa-list { display: flex; flex-direction: column; gap: 8px; }
.qa-btn {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--text); cursor: pointer;
}
.qa-btn:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 价目 / 价格提示 ---------- */
.price-note {
  margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: #F7F9FC;
  font-size: 12px; color: var(--text-2); line-height: 1.7;
}
.hist-list { display: flex; flex-direction: column; gap: 8px; }
.hist-item { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; }
.hist-item .p { font-size: 12px; color: var(--text-3); }
.hist-item .v { font-family: var(--font-num); font-weight: 600; }

/* ============ 商品分类 / 计量单位（字典管理）============ */

/* 树形表格 */
.gc-row.lv1 > td { background: #FAFBFD; }
.gc-row.lv2 > td:first-child { padding-left: 40px; }
.gc-row.empty-row > td { background: #fff; }
.gc-name { display: flex; align-items: center; gap: 8px; }
.gc-toggle {
  display: inline-block; width: 18px; flex: 0 0 18px; text-align: center;
  cursor: pointer; color: var(--text-2); user-select: none; font-size: 12px;
}
.gc-toggle:hover { color: var(--brand); }
.gc-blank { display: inline-block; width: 18px; flex: 0 0 18px; color: var(--text-3); font-size: 12px; }
.gc-subcount { font-size: 12px; color: var(--text-3); }
.sm-tag { padding: 1px 6px; font-size: 11px; }

/* 操作列：按钮横排不换行 */
td.ops, .ops { white-space: nowrap; }
td.ops .btn.sm, .ops .btn.sm { margin-right: 4px; }
td.ops .btn.sm:last-child, .ops .btn.sm:last-child { margin-right: 0; }

/* ============ 添加商品 / 编辑商品（S58）============ */
.gf-grid { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.gf-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.gf-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }

/* 一级 + 二级分类并排，视觉上仍是一个「商品分类」字段 */
.gf-catpair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gf-mini { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.gf-mini a { color: var(--brand); cursor: pointer; }
/* 输入框 + 单位后缀（重量 g 等）：input 吃满剩余宽度，单位贴右不对齐抖动 */
.gf-with-unit { display: flex; align-items: center; gap: 8px; }
.gf-with-unit input { flex: 1; min-width: 0; }
.gf-with-unit .gfu { font-size: 13px; color: var(--text-2); white-space: nowrap; }

/* 名称自动匹配品类的提示条（1.3.92）：一行放得下就把「已匹配 / 可能是 / 没匹配到」说清 */
.gf-match {
  margin-top: 6px; font-size: 12px; line-height: 1.6; color: var(--text-3);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 20px;
}
.gf-match b { color: var(--text); font-weight: 600; }
.gf-match .gm-tip { color: var(--text-3); }
.gf-match .gm-lead { color: var(--text-3); }
.gf-match .gm-hit { color: var(--text-3); }
.gf-match .gm-tag {
  color: var(--stock, #00A870); background: rgba(0, 168, 112, .1);
  border-radius: 4px; padding: 0 6px; line-height: 18px;
}
.gf-match.is-ask .gm-lead { color: var(--warn, #E08A00); }
.gf-match .gm-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--brand); font-size: 12px; text-decoration: underline;
}
/* 候选品类做成小胶囊：点一下就填上，比让人回下拉里翻快得多 */
.gf-match .gm-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 14px;
  padding: 1px 10px; cursor: pointer; font-size: 12px; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px; line-height: 20px;
}
.gf-match .gm-chip:hover { border-color: var(--brand); color: var(--brand); }
.gf-match .gm-chip i { font-style: normal; font-size: 11px; color: var(--text-3); }

/* 图片上传 */
.gf-up { padding: 16px; }
.gf-preview {
  width: 100%; height: 180px; border: 1px dashed var(--line); border-radius: 8px;
  background: #F7F9FC; display: flex; align-items: center; justify-content: center;
  overflow: hidden; color: var(--text-3); font-size: 13px;
}
.gf-preview img { width: 100%; height: 100%; object-fit: contain; }
/* 缺图兜底（1.3.89）：不摆「暂无图片」，直接把对外展示的平台 LOGO 亮出来。
   框还留着虚线，读起来仍是「这个位置空着」，不会让人以为图已经传了。 */
.gf-preview.is-ph { flex-direction: column; gap: 10px; padding: 16px; }
.gf-preview.is-ph img {
  width: 84px; height: 84px; border-radius: 12px; box-shadow: 0 2px 8px rgba(14, 23, 41, .08);
}
.gf-preview.is-ph .gf-ph-tip { font-size: 12px; color: var(--text-3); line-height: 1.5; }
.gf-up-acts { display: flex; align-items: center; gap: 8px; margin-top: 12px; }

/* 商品多图（1.3.132）
   2×2 网格，第 1 格固定是主图。上限 4 张是留一次返工余量，下限 3 张是硬要求：
   微信小店的头图规则是「至少 3 张且不能重复」，少一张就推不上去。 */
.gf-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gf-img {
  position: relative; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1; border: 1px dashed var(--line); border-radius: 8px;
  background: #F7F9FC; overflow: hidden;
}
.gf-img.has { border-style: solid; border-color: transparent; background: #fff; }
.gf-img.is-main.has { border-color: var(--brand); }
.gf-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gf-img .gi-add { font-size: 20px; color: var(--text-3); line-height: 1; }
.gf-img .gi-txt { font-size: 11px; color: var(--text-3); margin-top: 5px; }
.gf-img .gi-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; cursor: pointer;
}
.gf-img .gi-empty:hover .gi-add,
.gf-img .gi-empty:hover .gi-txt { color: var(--brand); }
/* 主图角标只占左上角，不压产品 —— 这一格在商城首屏、小店头图第 1 位都用它 */
.gf-img .gi-main {
  position: absolute; left: 5px; top: 5px; padding: 0 6px; border-radius: 4px;
  background: var(--brand); color: #fff; font-size: 10px; line-height: 16px;
}
.gf-img .gi-set,
.gf-img .gi-del {
  position: absolute; border: 0; cursor: pointer; color: #fff;
  background: rgba(14, 23, 41, .62); opacity: 0; transition: opacity .12s;
}
.gf-img .gi-set { left: 5px; top: 5px; padding: 0 6px; border-radius: 4px; font-size: 10px; line-height: 16px; }
.gf-img .gi-del {
  right: 4px; top: 4px; width: 20px; height: 20px; border-radius: 10px;
  font-size: 13px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.gf-img:hover .gi-set,
.gf-img:hover .gi-del { opacity: 1; }
/* 触屏没有 hover：按钮必须常显，否则图上什么都点不到 */
@media (hover: none) {
  .gf-img .gi-set, .gf-img .gi-del { opacity: 1; }
}
/* 商品无图时按名称自动生成的字母图标（1.3.105）：首字 + 名称哈希取色，铺满容器圆角 */
.g-avatar { display: flex; align-items: center; justify-content: center; color: #fff;
  font-weight: 700; border-radius: 8px; user-select: none; line-height: 1; overflow: hidden; }

/* 入库设置开关 */
.gf-switches { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.gf-switch { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; }
.gf-switch input { width: 16px; height: 16px; min-width: auto; cursor: pointer; }

@media (max-width: 1100px) {
  .gf-grid { grid-template-columns: 1fr; }
  .gf-side { position: static; }
}

/* ============ 商品管理（S59）============ */

/* Tab 行与搜索框同行，两端对齐 */
.gd-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 0 16px; border-bottom: 1px solid var(--line);
}
.gd-bar .tabs { border-bottom: none; margin-bottom: 0; gap: 22px; }
.tab .n { display: inline-block; margin-left: 4px; font-family: var(--font-num); font-size: 12px; }
.tab.green .n { color: var(--success); }
.tab.gray .n { color: var(--text-3); }
.tab.orange .n { color: var(--warn); }

/* 批量操作栏 */
.gd-bulk {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 16px; background: var(--brand-weak); font-size: 13px; color: var(--text);
}
.gd-bulk b { font-family: var(--font-num); color: var(--brand); }
.gd-bulk-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* 分页：左侧计数、右侧页码 */
.pinfo { margin-right: auto; color: var(--text-2); }
.pnums { display: flex; gap: 6px; }
.pbtn { min-width: 30px; padding: 4px 8px; }

/* 标题内返回箭头 */
.ghost-back { padding: 0 8px; font-size: 16px; line-height: 1; vertical-align: middle; margin-right: 6px; }

/* ============ 批量导入商品（1.3.92）============ */

/* 上传区：整块可点、可拖，选完文件只改边框颜色，不换页 ——
   人还要在下面核对，跳走就断了上下文 */
.gi-drop {
  border: 1.5px dashed var(--line); border-radius: 10px; padding: 34px 20px;
  text-align: center; cursor: pointer; background: #FBFCFE; transition: border-color .15s, background .15s;
}
.gi-drop:hover, .gi-drop.is-over { border-color: var(--brand); background: var(--brand-weak); }
/* 文件已经进来了就把上传区压扁：下面还有一整张表要核对，这儿不该继续占半屏 */
.gi-drop.is-done { border-style: solid; border-color: var(--success, #00A870); background: #F6FFFA; padding: 14px 18px; }
.gi-drop.is-done .gi-drop-ico { font-size: 18px; display: inline-block; vertical-align: -2px; margin-right: 8px; }
.gi-drop.is-done .gi-drop-t { display: inline-block; margin: 0; font-size: 13px; }
.gi-drop.is-done .hint { margin-top: 4px; }
.gi-drop-ico { font-size: 30px; line-height: 1; }
.gi-drop-t { margin: 10px 0 6px; font-size: 14px; }
.gi-err {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13px;
  background: #FEF1F1; color: var(--danger); border: 1px solid #FBD5D5;
}

/* 预览区头部：标题 + 操作，窄屏能折行 */
.gi-bar {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.gi-bar h3 { margin: 0 0 4px; font-size: 15px; }
.gi-bar-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gi-check { font-size: 12px; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.gi-check input { width: 14px; height: 14px; min-width: auto; }

/* 统计条：五格等分，数字用等宽字体对齐 */
.gi-stats {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px;
  background: var(--line); border-bottom: 1px solid var(--line);
}
.gi-stats > div { background: #fff; padding: 12px 16px; }
.gi-stats i { display: block; font-style: normal; font-size: 12px; color: var(--text-3); }
.gi-stats b { display: block; margin-top: 4px; font-family: var(--font-num); font-size: 20px; }

.gi-table td { vertical-align: top; }
.gi-table tr.is-bad td { background: #FFFBFB; }
.gi-table .gi-catcell { line-height: 1.5; }
.gi-warn { color: var(--warn); }
/* 品类名 + 「改」同一行：flex 让按钮不被长文字挤到下一行 */
.gi-catline { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
/* 行内问题说明：不铺整行红底，只在名称下面挂两行小字 */
.gi-note { margin-top: 4px; font-size: 12px; line-height: 1.6; color: var(--warn); }
.gi-note.is-err { color: var(--danger); }
.gi-table .gi-cat { width: 100%; min-width: 150px; font-size: 12px; padding: 4px 6px; }
.gi-table .gm-btn { margin-left: 6px; }

/* 页脚：说明靠左、确认按钮靠右 */
.gi-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 14px 16px; border-top: 1px solid var(--line);
}
.gi-foot .hint { flex: 1; min-width: 260px; }
.gi-foot-acts { display: flex; gap: 8px; }

/* 进度与结果 */
.gi-progress, .gi-done { padding: 40px 24px; text-align: center; }
.gi-pbar { height: 8px; border-radius: 4px; background: #EEF1F6; overflow: hidden; margin: 18px auto 10px; max-width: 520px; }
.gi-pbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4C8DFF, var(--brand)); transition: width .2s; }
.gi-done-ico {
  width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: rgba(0, 168, 112, .12); color: var(--success, #00A870);
}
.gi-done-ico.is-warn { background: #FFF3E0; color: var(--warn); }
.gi-done h3 { margin: 0 0 14px; font-size: 16px; }
.gi-done-num { display: flex; gap: 26px; justify-content: center; font-size: 13px; color: var(--text-2); }
.gi-done-num b { font-family: var(--font-num); font-size: 18px; color: var(--text); margin-left: 4px; }
.gi-fails {
  margin: 16px auto 0; max-width: 640px; text-align: left;
  padding: 12px 14px; border-radius: 8px; background: #FEF7F7; border: 1px solid #FBD5D5;
  font-size: 12px; line-height: 1.8; color: var(--text-2); max-height: 220px; overflow: auto;
}

@media (max-width: 900px) {
  .gi-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============ 库存查询（S42）============ */

/* 统计卡右上角小角标 */
.card-tag {
  display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 4px;
  font-size: 11px; font-weight: 400; background: var(--brand-weak); color: var(--brand);
  vertical-align: middle;
}
.card-tag.orange { background: #FFF3E0; color: var(--warn); }

/* 图表图例 */
.sk-legend { display: flex; gap: 18px; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.sk-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.sk-legend .dot.in { background: linear-gradient(180deg, #4C8DFF, var(--brand)); }
.sk-legend .dot.out { background: linear-gradient(180deg, #9B84FF, var(--brand-2)); }

/* 分布列表容器 */
.dist-list { padding-top: 4px; }

/* 底部公告条 */
.notice-bar {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
  padding: 12px 16px; border-radius: 8px; background: #FFF8E6;
  border: 1px solid #FFE9B8; font-size: 13px; color: #8A6100;
}
.notice-bar .ico { font-size: 15px; }

/* S67 库存详情的分区栅格已收进 web/pages/stock-detail.js 的页面级样式
   （sdd-page 页面级作用域），这里只保留全站通用的打印规则。 */

/* ---------------- 全平台水印（上传文件 / 业务单据）---------------- *
 * 单据页常显；其它页面上不显示，但打印时强制显示 —— 列表打出来也是对外单据。
 * 层级压在内容之上、侧栏与顶栏之下（8 < 10 < 20），不挡点击。
 *
 * 浓度：屏幕上是「认得出、不碍读」，打印才需要更实（纸面发白，同样的值印出来更淡）。
 * 之前 .045 / .055 配 186px 的 logo，一屏铺出三四行字加一堆 logo，
 * 商品名与单价被压住看不清 —— 水印是溯源用的，不是给正常查阅添堵的。
 *
 * 1.3.99 起：屏幕上的页面水印**不铺 logo**（只留文字 + 右下角标），
 * logo 只出现在打印件（.08）与文件预览（.05）里 —— 见下方 .wm-page 与 @media print。
 */
.wm-layer {
  position: fixed; inset: 0; z-index: 8; pointer-events: none;
  display: none; overflow: hidden;
}
.wm-layer.on { display: block; }
.wm-layer .wm-tile { position: absolute; inset: -32%; transform: rotate(-22deg); }
.wm-layer .wm-lg {
  position: absolute; inset: 0; opacity: .02;
  background-image: url("/assets/wm-logo.png");
  background-repeat: repeat; background-position: center;
}
/* 页面级那层（单据页常显）屏幕上不铺 logo：.02 + 520px 贴片本来就是纯底噪，
   屏幕上没人看得出它，删掉这一层只会更干净。真正会被转发出去的
   「打印件」与「文件预览」里它仍在 —— 打印见 @media print，预览见 .wm-stage。
   右下角品牌角标不在此列，屏幕上照常显示（那是标，不是底噪）。 */
.wm-page .wm-lg { display: none; }
.wm-layer .wm-tx {
  position: absolute; inset: 0;
  /* 1.3.106：屏幕上文字水印由 .06 调到 .045，更淡、不抢正文（契约测试要求 ≤ .08） */
  opacity: .045;
  background-repeat: repeat; background-position: 140px 80px;
}
.wm-layer .wm-corner {
  position: absolute; right: 16px; bottom: 12px;
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: #0E1729;
  /* 1.3.106：右下角标由 .24 调到 .2，logo 由 76px 缩到 60px，少占营业视觉 */
  opacity: .2;
}
.wm-layer .wm-corner img { width: 60px; height: auto; display: block; }

/* 文件预览弹层（图片 / PDF / 其它格式统一带水印） */
.wm-mask {
  position: fixed; inset: 0; z-index: 1200; background: rgba(14, 23, 41, .55);
  display: flex; align-items: center; justify-content: center;
}
/* 预览开着时藏掉页面那层水印：两层叠在一起会糊成一片，看不清文件本身 */
body.wm-viewing > .wm-layer { display: none !important; }
.wm-viewer {
  width: min(1120px, 94vw); height: 88vh; background: #fff; border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 18px 48px rgba(14, 23, 41, .28);
}
.wm-viewer header {
  flex: 0 0 52px; height: 52px; display: flex; align-items: center; gap: 10px;
  padding: 0 16px; border-bottom: 1px solid var(--line);
}
.wm-viewer .wm-title {
  font-size: 13px; font-weight: 600; max-width: 42%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wm-viewer .wm-note { font-size: 11px; color: var(--text-3); }
.wm-viewer .wm-spacer { flex: 1; }
.wm-stage { position: relative; flex: 1; min-height: 0; background: #F4F6FA; display: flex; }
.wm-stage .wm-layer { position: absolute; display: block; }
/* 预览里的水印压在图片上，但 1.3.106 起也要更克制：文字由 .085 调到 .05、
   logo 维持 .05（已是契约下限，再低自检会挂）。字号与 logo 尺寸已在 watermark.js 收小。 */
.wm-stage .wm-layer .wm-lg { opacity: .05; }
.wm-stage .wm-layer .wm-tx { opacity: .05; }
.wm-stage .wm-scroll {
  flex: 1; min-width: 0; overflow: auto; display: grid; place-items: center; padding: 16px;
}
.wm-stage img.wm-img {
  max-width: 100%; max-height: calc(88vh - 120px); display: block;
  background: #fff; box-shadow: 0 4px 20px rgba(14, 23, 41, .12);
}
/* 图片预览改成画布：水印已经画进像素，右键另存拿到的就是带水印那张 */
.wm-stage .wm-cv { display: grid; place-items: center; }
.wm-stage .wm-canvas {
  max-width: 100%; max-height: calc(88vh - 120px); display: block;
  background: #fff; box-shadow: 0 4px 20px rgba(14, 23, 41, .12);
  /* 画布也挡掉拖拽：拖出去就是一张图 */
  -webkit-user-drag: none; user-select: none; pointer-events: none;
}
.wm-stage .wm-cv-tip { padding: 40px 20px; font-size: 13px; color: var(--text-3); }
.wm-stage iframe { flex: 1; border: 0; background: #fff; }
.wm-stage iframe.wm-frame { flex: 0 0 auto; width: min(980px, 100%); min-height: 70vh; }
.wm-cover {
  margin: auto; width: min(520px, 84%); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.wm-cover .ico {
  width: 86px; height: 86px; border-radius: 16px; background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 15px; font-weight: 700; color: var(--brand); letter-spacing: .5px;
}
.wm-cover .t { font-size: 15px; font-weight: 600; word-break: break-all; }
.wm-cover .s { font-size: 12px; color: var(--text-2); line-height: 1.8; }

/* 打印（导出 PDF）：只留主体，隐藏侧栏与按钮 */
@media print {
  .sidebar, .topbar, .page-head .actions, #sd-back, #sd-pdf, #sd-refresh, #sd-export { display: none !important; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #E5E9F0; }
  body { background: #fff; }

  /* 任何页面打印都带水印：单据、列表、详情一视同仁 */
  .wm-layer { display: block !important; }
  .wm-layer .wm-lg { opacity: .08; }
  /* 屏幕上藏掉的 logo 在这一张纸上放回来：打印件才是会被带走的那一份 */
  .wm-page .wm-lg { display: block; }
  .wm-layer .wm-tx { opacity: .085; }
  .wm-layer .wm-corner { opacity: .5; }
  .wm-layer, .wm-layer .wm-lg, .wm-layer .wm-tx {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }

  /* 从文件预览里点「打印」：只留预览卡片，别把后台一起打出去 */
  body.wm-printing > *:not(.wm-mask) { display: none !important; }
  body.wm-printing .wm-mask { position: static; inset: auto; background: none; display: block; }
  body.wm-printing .wm-viewer { width: 100%; height: auto; box-shadow: none; }
  body.wm-printing .wm-viewer header { display: none; }
  body.wm-printing .wm-stage { display: block; background: #fff; }
  body.wm-printing .wm-stage .wm-scroll { overflow: visible; padding: 0; display: block; }
  body.wm-printing .wm-stage img.wm-img { max-height: none; box-shadow: none; margin: 0 auto; }
}

/* ---------------- 附件资料（新增客户 / 供应商 · S44B / S44C）---------------- */
.pf-att { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 16px; }
.pf-att-item {
  border: 1px solid var(--line); border-radius: 8px; padding: 12px;
  background: #FCFDFF; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.pf-att-head { display: flex; align-items: center; gap: 8px; }
.pf-att-name { font-size: 13px; font-weight: 600; color: var(--text); }
.pf-att-badge { font-size: 11px; padding: 2px 6px; border-radius: 4px; background: #E8F1FF; color: var(--brand); }
.pf-att-badge.gray { background: #F0F2F6; color: var(--text-3); }
/* 上传后自动识别的状态提示：进行中灰、成功绿、失败橙 */
.pf-att-ocr { font-size: 11px; color: var(--text-3); }
.pf-att-ocr:empty { display: none; }
.pf-att-ocr.ing { color: var(--text-3); }
.pf-att-ocr.ok { color: #12805C; }
.pf-att-ocr.fail { color: #B7791F; }
.pf-att-body { display: flex; flex-direction: column; gap: 8px; }
.pf-att-drop {
  border: 1px dashed var(--line); border-radius: 8px; background: #F7F9FC;
  padding: 16px 12px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pf-att-drop:hover, .pf-att-drop.over { border-color: var(--brand); background: #F0F6FF; }
.pf-att-ico { font-size: 20px; color: var(--text-3); line-height: 1; }
.pf-att-t { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.pf-att-s { font-size: 11px; color: var(--text-3); margin-top: 4px; line-height: 1.5; }
/* 支持格式提示：鲜亮底色 + 品牌蓝，别让人传完 PDF 才发现识别不了 */
.pf-att-fmt {
  display: flex; align-items: flex-start; gap: 6px; margin-top: 8px;
  font-size: 11px; line-height: 1.6; color: #0B4FC4;
  background: #EAF3FF; border: 1px solid #C7DEFF; border-radius: 6px; padding: 6px 8px;
}
.pf-att-fmt .fmt-tag {
  flex: 0 0 auto; background: var(--brand); color: #fff;
  border-radius: 4px; padding: 1px 5px; font-weight: 600; letter-spacing: .5px;
}
.pf-att-file {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.pf-thumb {
  width: 44px; height: 44px; min-width: 44px; border-radius: 6px; overflow: hidden;
  background: #F0F2F6; display: flex; align-items: center; justify-content: center;
}
.pf-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* 缩略图用背景图而不是 <img>：<img> 右键能直接存原件，背景图不能。
   缩略图本身不需要点（查看有按钮），pointer-events 一并关掉 */
.pf-thumb-img {
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
}
.pf-att-ext { font-size: 11px; font-weight: 600; color: var(--text-3); }
.pf-att-meta { flex: 1; min-width: 0; }
.pf-att-fname { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-att-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.pf-att-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* 详情页附件资料卡 */
.att-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.att-box { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #FCFDFF; min-width: 0; }
.att-box.missing { background: #FFFBF2; border-color: #F3E2C0; }
.att-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.att-rows { display: flex; flex-direction: column; gap: 8px; }
.att-row { display: flex; align-items: center; gap: 10px; }
.att-row .pf-att-meta { min-width: 0; }
.att-empty { font-size: 12px; color: var(--text-3); }
.att-miss { font-size: 12px; color: #A06A00; }

@media (max-width: 1100px) {
  .pf-att { grid-template-columns: 1fr; }
  .att-grid { grid-template-columns: 1fr; }
}

/* ---------------- 地区三级联动（所在地区 / 收发货地区）---------------- */
.rg-wrap { display: flex; flex-direction: column; gap: 6px; }
.rg-cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rg-cells select { width: 100%; min-width: 0; }
.rg-cells select:disabled { background: #F5F6F8; color: var(--text-3); }
.rg-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rg-sum { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-toggle { font-size: 12px; color: var(--brand); cursor: pointer; white-space: nowrap; }
.rg-toggle:hover { text-decoration: underline; }
.rg-manual { width: 100%; }
.rg-tip { font-size: 11px; color: #A06A00; line-height: 1.6; }
@media (max-width: 900px) { .rg-cells { grid-template-columns: 1fr; } }

/* ---------------- 整单议价折扣「不启用」勾选 ----------------
 * 折扣输入框与勾选项同一行：勾上后输入框置灰，值仍留在档案里便于恢复。 */
.pf-inline { display: flex; align-items: center; gap: 10px; }
.pf-inline input[type="number"] { flex: 1; min-width: 0; }
.pf-inline input[type="number"]:disabled { background: #F5F6F8; color: var(--text-3); cursor: not-allowed; }
/* 单位级「启用工艺类型匹配询盘订单」（1.3.14）：紧跟在工艺类别勾选区下方 */
.craft-match { margin-top: 10px; font-size: 13px; color: var(--text-1); font-weight: 500; }
.craft-match input { accent-color: var(--brand); }
.craft-match + .hint { margin-top: 4px; }

.pf-ck { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); white-space: nowrap; cursor: pointer; user-select: none; }
.pf-ck input { width: 14px; height: 14px; margin: 0; }
.pf-ck:hover { color: var(--brand); }

/* ---------------- 工艺类别多选（1.3.11） ----------------
 * 按工艺大类分组的标签勾选；已选高亮，字典里已停用的标灰但仍可取消勾选 */
/* 1.3.17：字典扩到 8 大类 45 项，勾选区限高滚动，别把表单撑到一屏装不下 */
/* 1.3.166：字典项目多了以后靠眼睛翻太累，两个多选控件统一加关键词过滤 */
.craft-search {
  display: flex; align-items: center; gap: 7px; height: 32px; margin: 0 0 8px;
  padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff;
}
.craft-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(26, 109, 255, .12); }
.craft-search-ico { width: 13px; height: 13px; color: var(--text-3); flex: 0 0 auto; }
.craft-q {
  flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; border: none; background: transparent;
  font-size: 12.5px; color: var(--text-1); box-shadow: none;
}
.craft-q::placeholder { color: var(--text-3); }
.craft-q:focus { outline: none; border: none; box-shadow: none; }
.craft-q-clear {
  flex: 0 0 auto; width: 18px; height: 18px; padding: 0; cursor: pointer; line-height: 17px;
  border: none; border-radius: 50%; background: #F1F3F7; color: var(--text-3); font-size: 12px;
}
.craft-q-clear:hover { background: #E8F1FF; color: var(--brand); }
.craft-hit {
  flex: 0 0 auto; font-size: 12px; color: var(--text-3);
  padding-left: 8px; border-left: 1px solid var(--line);
}
.craft-hit:empty { display: none; }
.craft-hit.on { color: var(--brand); font-weight: 600; }
.craft-row.hide, .craft-chip.hide { display: none; }
.craft-noq { font-size: 12px; color: var(--text-3); padding: 10px 0; text-align: center; }
.craft-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #FBFCFE; }
.craft-scroll { max-height: 268px; overflow-y: auto; }
.craft-sum { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.craft-count { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 2px 8px; border-radius: 10px; background: #F1F3F7; }
.craft-count.on { color: var(--brand); background: #E8F1FF; }
.craft-tip { font-size: 12px; color: var(--text-3); }
/* 1.3.22：按所属行业置顶推荐大类并默认展开，其余折叠；大类标题整行可点 */
.craft-row { padding: 4px 0; }
.craft-row + .craft-row { border-top: 1px dashed var(--line); }
.craft-g {
  display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
  font-size: 13px; color: var(--text-2); line-height: 26px; font-weight: 600;
}
.craft-g:hover { color: var(--brand); }
.craft-arrow { display: inline-block; font-size: 10px; color: var(--text-3); transition: transform .15s; }
.craft-row.open .craft-arrow { transform: rotate(90deg); }
.craft-gname { flex: 0 0 auto; }
.craft-badge {
  font-size: 11px; font-weight: 600; color: var(--brand); background: #E8F1FF;
  border-radius: 8px; padding: 1px 6px; line-height: 16px;
}
.craft-row.rec .craft-gname { color: var(--brand); }
.craft-gn { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--text-3); }
.craft-items { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 4px 16px; }
.craft-row:not(.open) .craft-items { display: none; }
.craft-chip {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none;
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; font-size: 12px; color: var(--text-2); line-height: 18px;
}
.craft-chip input { width: 13px; height: 13px; margin: 0; }
.craft-chip:hover { border-color: var(--brand); color: var(--brand); }
.craft-chip.on { background: #E8F1FF; border-color: var(--brand); color: var(--brand); font-weight: 600; }
.craft-chip.off { opacity: .65; }
.craft-empty { font-size: 12px; color: var(--text-3); padding: 8px 0; }

/* 详情页工艺标签 */
.craft-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.craft-tag {
  display: inline-block; padding: 2px 9px; border-radius: 12px; font-size: 12px;
  background: #E8F1FF; color: var(--brand); border: 1px solid #CFE0FF;
}

/* 1.3.107 企业信息多选（市场与区域 / 订单类型 / 企业管理系统）：复用 .craft-chip 的勾选样式 */
.mc-scroll { max-height: 248px; overflow-y: auto; }
.mc-g + .mc-g { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* 1.3.108 企业信息 · 生产设备 / 检测设备 / 资质认证 行条目表格 */
.eq-intro { font-size: 12px; color: var(--text-3); margin: 4px 0 12px; }
.eq-block { margin-bottom: 14px; }
.eq-acts { display: flex; gap: 8px; }
.eq-wrap table { font-size: 13px; }
.eq-wrap th, .eq-wrap td { padding: 6px 8px; vertical-align: middle; }
.eq-row.drag { opacity: .4; }
.eq-row.over { box-shadow: inset 0 0 0 2px var(--brand); }
.eq-drag { cursor: grab; color: var(--text-3); text-align: center; user-select: none; width: 34px; }
.eq-drag .h { font-size: 14px; }
.eq-input {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 5px 7px; font-size: 13px; background: #fff; box-sizing: border-box;
}
.eq-input:focus { outline: none; border-color: var(--brand); }
.eq-num { width: 78px; }
.eq-year { width: 92px; }
.eq-out { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--text-3); margin-left: 6px; }
.eq-ops { text-align: center; width: 48px; }
.eq-del { border: none; background: none; cursor: pointer; font-size: 15px; opacity: .55; padding: 2px; }
.eq-del:hover { opacity: 1; color: #E23; }
.eq-cert-show { display: inline-block; margin-right: 6px; vertical-align: middle; }

/* 1.3.174 资质附件：上传按钮与识别状态都留在行内，不然「传了没反应」 */
.eq-cert-wrap table { table-layout: fixed; }
.eq-cert-wrap.drop { box-shadow: inset 0 0 0 2px var(--brand); border-radius: var(--radius-sm); }
.eq-cert-cell { min-width: 230px; }
.eq-cert-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eq-cert-st { margin-top: 5px; font-size: 11.5px; line-height: 1.65; word-break: break-all; }
.eq-cert-st.busy { color: var(--text-3); }
.eq-cert-st.ok { color: #15803d; }
.eq-cert-st.warn { color: #b45309; }
.eq-cert-st .ok-t { color: #15803d; }
.eq-cert-st .warn-t { color: #b45309; }
.eq-cert-adopt { color: var(--brand); text-decoration: underline; cursor: pointer; }
.mc-glabel { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.mc-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------- 协同版（外部往来单位）单据列表 ----------------
 * 与「采购 / 销售订单列表」的列宽一致，六列：编号 / 日期 / 金额 / 状态 / 协同确认 / 操作 */
.co-head, .co-row {
  display: grid; grid-template-columns: 1.6fr .9fr 1fr .8fr .9fr 1.2fr;
  gap: 10px; align-items: center; padding: 12px 16px;
}
.co-head { font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--line); background: #FAFBFD; }
.co-row { border-bottom: 1px solid var(--line); font-size: 13px; color: var(--text); }
.co-row:hover { background: #FAFBFD; }
.co-row .c1 { font-family: var(--font-num); font-weight: 600; }
.co-row .c1 small { display: block; font-size: 11px; font-weight: 400; color: var(--text-3); margin-top: 2px; }
.co-row .c3 { font-family: var(--font-num); }
.co-row .c6 { display: flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 1200px) {
  .co-head, .co-row { grid-template-columns: 1.4fr .8fr 1fr .8fr .8fr 1fr; }
}

/* 协同工作台待办行 */
.co-todo {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px;
}
.co-todo:last-child { border-bottom: 0; }
.co-todo:hover { background: #FAFBFD; }
.co-todo b { font-family: var(--font-num); font-size: 14px; color: var(--text-3); }
.co-todo b.blue { color: var(--brand); }
.co-todo b.orange { color: #FF8B00; }
.co-todo b.purple { color: #7C5CFF; }

/* 登录页「协同账号」页签的说明条 */
.lp-coop-tip {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px; font-size: 12px; line-height: 1.7;
  background: #FFF8E8; color: #8A5A00; border: 1px solid rgba(255, 139, 0, .22);
}
.lp-coop-tip b { color: #6B4500; }

/* ---------------- 单据页统计卡（对齐设计稿 S73/S74 口径） ----------------
 * 白底圆角 10、标签 12px 次级色、数值 22px 数字字体、右上角徽章、底部说明 11px。 */
.st-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1320px) { .st-row { grid-template-columns: repeat(2, 1fr); } }
.st-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 6px;
}
.st-card .k { font-size: 12px; color: var(--text-2); }
.st-card .vrow { display: flex; align-items: center; gap: 8px; }
.st-card .v { font-size: 22px; font-weight: 700; color: var(--text); font-family: var(--font-num); line-height: 1.2; }
.st-card .v.muted { color: var(--text-3); }
.st-card .s { font-size: 11px; color: var(--text-3); }
/* 1.3.172：套餐卡底部操作区。四张卡 grid 等高，按钮靠 margin-top:auto 压在底部，
   视线齐平；其余三张没有按钮，多出来的空白自然落在下方，不影响对齐 */
.st-card .st-acts { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.st-card .st-exp { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* 套餐对比表：套餐名 + 「当前 / 推荐」徽章同一行，列宽不够时宁可行高多一点也不让徽章掉下去 */
.pl-name { white-space: nowrap; }
.pl-name .st-badge { vertical-align: 1px; }
.st-badge { font-size: 10px; border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
.st-badge.green  { background: #E6F7F1; color: #00A870; }
.st-badge.orange { background: #FFF4E6; color: #B25E00; }
.st-badge.blue   { background: #EAF1FF; color: #1A6DFF; }
.st-badge.red    { background: #FDECEA; color: #E8453C; }
.st-badge.gray   { background: #F4F6FA; color: #98A1B3; }
/* 运营商端「企业权限开通」矩阵：徽章可点即切换该企业的该项能力 */
.st-badge[data-toggle] { cursor: pointer; user-select: none; }
.st-badge[data-toggle]:hover { filter: brightness(0.95); }

/* 单据详情页：信息分组卡 */
.doc-sec { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-top: 16px; }
.doc-sec > h3 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
/* 1.3.171：可折叠的 doc-sec —— 标题整行可点，右侧「展开 / 收起」与「刷新」并排。
   折叠体用 display 而不是 hidden，免得和自带 display 的表格打架 */
.doc-sec.foldable > h3 { cursor: pointer; user-select: none; }
.doc-sec.foldable > h3:hover .fold-t { color: var(--brand); }
.doc-sec.foldable .fold-t { display: inline-flex; align-items: center; min-width: 0; }
.doc-sec.foldable .fold-caret { width: 0; height: 0; flex: 0 0 auto; margin-right: 7px;
  border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  opacity: .5; transition: transform .15s ease; }
.doc-sec.foldable.open .fold-caret { transform: rotate(90deg); }
.doc-sec.foldable .fold-sum { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--text-3); }
.doc-sec.foldable .fold-more .more { font-size: 13px; color: var(--brand); }
.doc-sec.foldable .fold-more .more:hover { text-decoration: underline; }
.doc-sec.foldable .fold-more { display: inline-flex; align-items: center; gap: 14px; flex: 0 0 auto; font-size: 13px; }
/* 折叠时标题下那 12px 内边距没用，收掉 —— 一行卡片更利落 */
.doc-sec.foldable:not(.open) > h3 { margin-bottom: 0; }
.doc-sec.foldable .fold-body { display: none; }
.doc-sec.foldable.open .fold-body { display: block; }
.doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 24px; }
@media (max-width: 1320px) { .doc-grid { grid-template-columns: repeat(2, 1fr); } }
.doc-grid .it { min-width: 0; }
.doc-grid .it .k { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.doc-grid .it .v { font-size: 13px; color: var(--text); word-break: break-all; }
.doc-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* 列表页状态 Tab（pill）与批量操作条 —— 对齐设计稿 S87/S73D */
.tab-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill-tab {
  display: inline-flex; align-items: center; height: 30px; padding: 0 14px;
  border-radius: 15px; background: #fff; border: 1px solid var(--line);
  font-size: 12px; color: var(--text); cursor: pointer; user-select: none;
}
.pill-tab:hover { border-color: #C9D6EE; }
.pill-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pill-tab.warn:not(.on) { background: #FFF4E0; border-color: #FFE0B2; color: #B37A1F; }
.batch-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  background: #EDF4FF; color: var(--brand); font-size: 12px;
  border-radius: 10px 10px 0 0; flex-wrap: wrap;
}
.batch-bar .sp { flex: 1; }
.batch-bar b { font-family: var(--font-num); }

/* ---------------- 询价议价（1.3.94）---------------- *
 * 采购只能提「议价」，不能改供应商报的价。
 * 报价单价旁边的小标签是这套功能的核心：一条 2.5 元的报价，
 * 改过三轮的价和刚报的价长得一模一样，对账时谁也说不清 ——
 * 所以只要价格来源不是「首次报价」，就必须留一个看得见的标记。
 * 命名统一 bg- 前缀（bargain），不占用现有的 .tag / .status。
 */
.bg-tag {
  display: inline-block; margin-left: 4px; padding: 0 5px; height: 16px;
  line-height: 16px; border-radius: 3px; font-size: 10px; font-weight: 500;
  vertical-align: 1px; white-space: nowrap;
}
.bg-tag.is-deal { background: #E8F7EE; color: #1B9E5A; }
.bg-tag.is-rev { background: #FFF1E6; color: #C2620C; }

.bg-pill {
  display: inline-block; margin-right: 4px; padding: 0 6px; height: 18px;
  line-height: 18px; border-radius: 9px; font-size: 10px; white-space: nowrap;
}
.bg-pill.is-wait { background: #FFF4E0; color: #B37A1F; }
.bg-pill.is-deal { background: #E8F7EE; color: #1B9E5A; }
.bg-pill.is-ref { background: #F3F4F7; color: #5A6478; }
.bg-pill.is-rev { background: #FFF1E6; color: #C2620C; }

/* 报价单价：只读态（这是供应商的价，采购不能直接改） */
.bg-ro {
  display: inline-flex; align-items: center; justify-content: flex-end; gap: 2px;
  min-width: 84px; height: 28px; padding: 0 8px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 6px; background: #F7F8FB;
  font-size: 12px; color: var(--text); font-family: var(--font-num);
}
.bg-ro.is-empty { color: var(--text-3); }
.bg-ro .bg-tag { margin-left: 2px; }

/* 议价输入框：填了数字才高亮，空着跟普通输入一样不起眼 */
.drawer .bg-bargain { width: 96px; text-align: right; font-family: var(--font-num); }
.drawer .bg-bargain.has-val { border-color: #FFB65C; background: #FFFBF3; }
.drawer .bg-off { font-size: 10px; color: var(--text-3); }

/* 交期（1.3.157）：查看是一行日期文字，代录点开弹月历 —— 页面上不存在「年/月/日」输入框 */
.qd-ro {
  font-size: 12px; color: var(--text); font-family: var(--font-num);
  white-space: nowrap; letter-spacing: .2px;
}
.qd-ro.is-empty { color: var(--text-3); }
/* 代录态：日期本身就是按钮 —— 没有边框、没有「年/月/日」占位。
   不用虚线做提示：虚线的圆角一拉就成了「悬空的方括号」，反而更像填空白；
   改用日期后面一枚细日历图标，只表达「点这里选日期」。 */
.qd-btn {
  display: inline-flex; align-items: center; gap: 4px;
  height: 26px; padding: 0 6px; border: 1px solid transparent; border-radius: 6px;
  background: transparent; color: var(--text); cursor: pointer;
  font-size: 12px; line-height: 1; font-family: var(--font-num); white-space: nowrap;
}
.qd-btn:hover { background: #F2F6FF; border-color: #D6E2FF; color: var(--brand); }
.qd-btn.is-empty { color: var(--text-3); }
.qd-btn::after {
  content: ''; flex: none; width: 11px; height: 11px; opacity: .55;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Crect x='2.3' y='3.4' width='11.4' height='10.8' rx='2'/%3E%3Cpath d='M2.3 6.7h11.4M5.5 1.7v2.6M10.5 1.7v2.6'/%3E%3C/g%3E%3C/svg%3E") center / 11px 11px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Crect x='2.3' y='3.4' width='11.4' height='10.8' rx='2'/%3E%3Cpath d='M2.3 6.7h11.4M5.5 1.7v2.6M10.5 1.7v2.6'/%3E%3C/g%3E%3C/svg%3E") center / 11px 11px no-repeat;
}
.qd-btn:hover::after { opacity: 1; }
.qd-cal {
  position: fixed; z-index: 400; width: 232px; padding: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(16, 32, 64, .16);
  font-family: var(--font-num); font-size: 12px; color: var(--text);
}
.qd-cal-h { display: flex; align-items: center; gap: 2px; padding: 2px 2px 8px; }
.qd-cal-ym { flex: 1; text-align: center; font-weight: 600; }
.qd-cal-nav {
  width: 22px; height: 24px; border: none; border-radius: 5px; background: transparent;
  color: var(--text-2); font-size: 12px; line-height: 1; cursor: pointer;
}
.qd-cal-nav:hover { background: #EEF3FF; color: var(--text); }
.qd-cal-w, .qd-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.qd-cal-w span { height: 22px; line-height: 22px; text-align: center; font-size: 10px; color: var(--text-3); }
.qd-cal-d {
  height: 28px; border: none; border-radius: 6px; background: transparent;
  color: var(--text); font-size: 12px; font-family: var(--font-num); cursor: pointer;
}
.qd-cal-d:hover { background: #EEF3FF; }
.qd-cal-d.out { color: var(--text-3); }
.qd-cal-d.today { box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.qd-cal-d.on { background: var(--brand); color: #fff; font-weight: 600; }
.qd-cal-f { display: flex; gap: 6px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.qd-cal-f button {
  flex: 1; height: 26px; border: 1px solid var(--line); border-radius: 6px; background: #fff;
  color: var(--text-2); font-size: 11px; cursor: pointer;
}
.qd-cal-f button:hover { border-color: var(--brand); color: var(--brand); }

/* 抽屉里的「待供应商回应」条：这是议价的回执区，采购在这儿看供应商怎么答的 */
.bg-waitlist {
  margin-top: 12px; border: 1px solid #FFE0B2; background: #FFFBF3;
  border-radius: 8px; padding: 10px 12px;
}
.bg-waitlist > .h {
  display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  color: #B37A1F; margin-bottom: 8px;
}
.bg-waitlist > .h .s { font-weight: 400; color: var(--text-3); }
.bg-waitrow {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-top: 1px dashed #FFE7C6; font-size: 12px;
}
.bg-waitrow:first-of-type { border-top: none; }
.bg-waitrow .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bg-waitrow .pr { color: var(--text-3); font-size: 11px; white-space: nowrap; }
.bg-waitrow .pr b { color: #C2620C; font-size: 12px; font-family: var(--font-num); }
.bg-yn {
  width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line);
  background: #fff; font-size: 12px; line-height: 1; cursor: pointer; padding: 0; flex: none;
}
.bg-yn.yes { border-color: #B7E4C9; color: #1B9E5A; }
.bg-yn.yes:hover { background: #E8F7EE; }
.bg-yn.no { border-color: #F0D4D4; color: #D14343; }
.bg-yn.no:hover { background: #FDEDED; }

/* 议价/改价的历史轨迹：抽屉底部一条细线说明，不抢表格的注意力 */
.bg-hist { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.bg-hist .it { font-size: 11px; color: var(--text-3); display: flex; gap: 6px; align-items: baseline; }
.bg-hist .it b { color: var(--text-2); font-weight: 500; }
.bg-hist .dot { width: 5px; height: 5px; border-radius: 50%; background: #D6DCE8; flex: none; }
.bg-hist .dot.deal { background: #7FD0A3; }
.bg-hist .dot.rev { background: #F0B26B; }

/* ---------------- 主营品类图标（1.3.99）---------------- *
 * 参考小程序首页金刚区：#1F6BFF 蓝线、圆头、透明底。
 * 列表里 18~22px，选择器里 28px；选中态用品牌浅底 + 蓝框，不用打勾。
 */
.cat-ico { display: inline-block; vertical-align: middle; object-fit: contain; flex: none; }
.cat-ico.sm { opacity: .85; }
.cat-picker {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px;
  max-height: 228px; overflow: auto; padding: 8px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.cat-pick {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 2px 5px; border: 1px solid transparent; border-radius: 7px;
  background: #F7F9FC; cursor: pointer; min-width: 0;
}
.cat-pick span {
  font-size: 10px; color: var(--text-3); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.cat-pick:hover { background: #EEF4FF; }
.cat-pick.on { border-color: var(--brand); background: #EAF1FF; }
.cat-pick.on span { color: var(--brand); font-weight: 600; }
.cat-group-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 0;
  border-top: 1px dashed var(--line);
}
.cat-group-row:first-child { border-top: none; }
.cat-group-row .nm { flex: 1; min-width: 0; font-size: 13px; }
.cat-group-row .ct { font-size: 11px; color: var(--text-3); white-space: nowrap; }

/* ---------------- 编码规则卡片（1.3.100）---------------- *
 * 原来 22 个前缀格子平铺占满一屏，改成默认折叠：
 * 收起时只看规则 + 常用前缀，展开才按业务域分组铺开。
 */
.cr-summary { font-size: 14px; line-height: 1.9; }
.cr-hint { font-size: 12px; color: var(--text-3); line-height: 1.7; margin-top: 4px; }
.cr-quick {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  margin-top: 8px; font-size: 12px; color: var(--text-2);
}
.cr-quick b { font-family: var(--font-num); color: var(--brand); font-size: 12px; }
.cr-more { color: var(--text-3); margin-left: 4px; }
.cr-fold { margin-top: 12px; border-top: 1px dashed var(--line); }
.cr-fold > summary {
  display: flex; align-items: center; gap: 8px; padding: 10px 2px 2px;
  cursor: pointer; list-style: none; user-select: none;
  font-size: 13px; color: var(--brand); font-weight: 600;
}
.cr-fold > summary::-webkit-details-marker { display: none; }
.cr-fold > summary:hover { color: var(--brand-dark, #0B57D0); }
.cr-fold > summary .cr-count {
  font-weight: 400; font-size: 12px; color: var(--text-3); flex: 1;
}
.cr-chev { font-size: 16px; line-height: 1; transition: transform .18s ease; }
.cr-fold[open] > summary .cr-chev { transform: rotate(180deg); }
.cr-body { padding: 10px 0 4px; }
.cr-sec { padding-top: 12px; margin-top: 12px; border-top: 1px dashed var(--line); }
.cr-sec:first-child { padding-top: 0; margin-top: 0; border-top: none; }
.cr-sec-h {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-size: 13px; font-weight: 600; margin-bottom: 8px;
}
.cr-sec-h span { font-size: 11px; font-weight: 400; color: var(--text-3); }
.cr-sec-sub { font-size: 11px; color: var(--text-3); margin: 8px 0 6px; }
.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 8px; }
.cr-chip {
  border: 1px solid var(--line); border-radius: var(--radius-sm, 8px);
  padding: 7px 10px; min-width: 0; background: #fff;
}
.cr-chip b {
  display: block; font-family: var(--font-num); font-size: 13px;
  font-weight: 600; color: var(--brand); letter-spacing: .2px;
}
.cr-chip span {
  display: block; font-size: 11px; color: var(--text-2); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cr-formula { font-size: 13px; line-height: 1.8; margin-bottom: 8px; }
.cr-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cr-pair > div { border: 1px solid var(--line); border-radius: var(--radius-sm, 8px); padding: 10px 12px; }
.cr-pair b { display: block; font-size: 13px; margin-bottom: 4px; }
.cr-pair span { display: block; font-size: 12px; color: var(--text-2); }
.cr-pair em {
  display: inline-block; margin-top: 6px; font-style: normal;
  font-family: var(--font-num); font-size: 12px; color: var(--brand);
}
@media (max-width: 720px) { .cr-pair { grid-template-columns: 1fr; } }

/* ---------------- 平台字段库（1.3.102）---------------- *
 * 「字段库管理」下 22 个字典链接 + 5 个分组标题，不滚动会把侧栏撑出屏幕。
 * 字段标识是系统内部编号：等宽 + 小锁，视觉上和「可编辑的名称」区分开。
 */
.nav-sub .nav-sub.lv3 { max-height: min(46vh, 360px); overflow-y: auto; scrollbar-width: thin; }
.nav-sub .nav-sub.lv3::-webkit-scrollbar { width: 5px; }
.nav-sub .nav-sub.lv3::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.nav-sep {
  height: 22px; display: flex; align-items: center; padding: 0 6px;
  font-size: 10.5px; color: var(--text-3); letter-spacing: .5px;
  border-top: 1px dashed var(--line); margin-top: 4px; pointer-events: none;
}
.nav-sub .nav-sub.lv3 .nav-sep:first-child { border-top: none; margin-top: 0; }
.fl-key {
  display: inline-block; font-family: var(--font-num); font-size: 11.5px;
  color: var(--text-2); background: var(--bg); border: 1px solid var(--line);
  border-radius: 5px; padding: 2px 6px; white-space: nowrap;
}
.fl-sys {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px;
  padding: 0 10px; border: 1px dashed var(--line); border-radius: var(--radius-sm, 8px);
  background: var(--bg); color: var(--text-2); font-family: var(--font-num); font-size: 12px;
}
.fl-check { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; font-size: 13px; }
.fl-logo { width: 32px; height: 32px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; }
.fl-img-row { display: flex; align-items: center; gap: 10px; }
.fl-img-box {
  width: 56px; height: 56px; flex: none; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line); border-radius: 8px; background: var(--bg);
  color: var(--text-3); font-size: 12px; overflow: hidden;
}
.fl-img-box img { width: 100%; height: 100%; object-fit: contain; }
