/**
 * @copyright © 2026 易企网ERP订货系统. 保留所有权利.
 * 本文件为系统源码之一，仅供授权使用，禁止未经授权的复制、修改与分发。
 */
/* ==========================================================================
   校园缴费系统 · 平台总后台
   基调：#1e3a5f 深藏蓝侧边栏 / #e5361f 亮蓝选中 / #f5f7fa 页面底色
   ========================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ------------------------------------------------------------------
   [hidden] 兜底 —— ★ 必需，不能删
   HTML 的 hidden 属性底层来自浏览器 UA 样式表（display:none），权重极低；
   本文件下方 .modal-mask 写了 display:flex，会把 hidden 覆盖掉。
   症状：页面一打开，「处理中…」遮罩和一个空弹窗压在登录页上，
        登录按钮点不到（被透明遮罩拦下），用户完全无法登录。
   用 !important 明确压过任何 display 声明。
   （另有 login.css 与 common.js 的 forceHideOverlays() 做双重保险）

   ★ .hidden 一并带上：common.js 的 forceHideOverlays() 会给遮罩
     同时加 hidden 属性与 .hidden 类，两者都要能压住 display:flex。
   ------------------------------------------------------------------ */
[hidden], .hidden { display: none !important; }

:root {
  --sb-bg: #1e3a5f;
  --sb-bg-dark: #172f4d;
  --sb-text: #c6d4e4;
  --sb-active: #e5361f;
  --page-bg: #f5f7fa;
  --card-bg: #ffffff;
  --line: #e8ecf2;
  --line-2: #dde3ec;
  --txt: #1f2d3d;
  --txt-2: #5c6b7f;
  --txt-3: #93a1b3;
  --blue: #e5361f;
  --green: #22a95c;
  --orange: #f59e0b;
  --red: #e5484d;
  --radius: 8px;
}

html, body {
  height: 100%;
  font-size: 14px;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  color: var(--txt);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: 14px; outline: none; }
a { text-decoration: none; color: var(--blue); }
ul { list-style: none; }

/* 图标统一尺寸 */
.ico { width: 16px; height: 16px; display: inline-block; vertical-align: -2px; flex: none; }
.ico-lg { width: 20px; height: 20px; }

/* ==========================================================================
   框架布局：一级侧边栏 + 顶栏 + 二级菜单 + 内容

   ★ 布局说明：这里用 min-height:100vh 而不是 height:100%。
   height:100% 需要「父元素 body 有确定高度 → body 的 height:100% 依赖 html 有高度」整条链成立，
   中间任何一环（如 body 下混入了非 fixed 的元素、或嵌在别的容器里）就会退化为内容高度，
   症状是：侧边栏不撑满、右侧主区域被挤到侧边栏下方。
   100vh 是视口单位，直接相对视口计算，不依赖任何父级，最稳。
   注意：注释记号必须配对完整；漏在注释外的裸文字会让解析器
   把后面的 .app 规则整条丢弃（历史事故：布局整体塌陷）。
   ========================================================================== */
.app {
  display: flex;
  flex-direction: row;      /* 明确横向排布，防止意外换行导致侧栏与主区上下堆叠 */
  flex-wrap: nowrap;
  /* ★ 必须是 height 而不是 min-height：
     min-height:100vh 时，右侧内容一长（学校列表、应用市场），.app 会跟着长高，
     文档整体滚动，而侧栏写死 height:100vh 会被一起卷上去 ——
     表现为「右侧内容长的栏目，最左侧底部出现一条白底」。
     固定成视口高度 + .page 内部滚动，侧栏就永远贴满整屏。 */
  height: 100vh;
  overflow: hidden;
}
/* ---- 一级侧边栏 ---- */
/* 宽度比例：150px（208px 过宽 → 172px 客户仍嫌宽 → 150px；16px 图标 + 4 字菜单刚好） */
.sidebar {
  width: 150px; flex: none; height: 100%;
  background: var(--sb-bg); color: var(--sb-text);
  display: flex; flex-direction: column;
}
.sb-brand {
  height: 56px; flex: none; display: flex; align-items: center; gap: 8px;
  padding: 0 13px; background: var(--sb-bg-dark);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.sb-logo {
  width: 26px; height: 26px; border-radius: 7px; flex: none;
  background: var(--sb-active); display: flex; align-items: center; justify-content: center;
}
.sb-logo .ico { width: 16px; height: 16px; color: #fff; }
.sb-name { font-size: 14px; font-weight: 600; color: #fff; letter-spacing: 0; white-space: nowrap; }
.sb-menu { flex: 1; padding: 4px 0; overflow-y: auto; }
.sb-item { position: relative; }
.sb-item > a {
  display: flex; align-items: center; gap: 9px;
  height: 34px; padding: 0 13px; cursor: pointer;
  font-size: 15px; font-weight: 600; letter-spacing: .5px;
  text-transform: uppercase; color: var(--sb-text);
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}
.sb-item > a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sb-item > a .ico { color: #9fb6d2; }
.sb-item.on > a {
  background: var(--sb-active); color: #fff; font-weight: 700;
  border-left-color: #ff7a5c;
}
.sb-item.on > a .ico { color: #fff; }
.sb-foot {
  flex: none; height: 38px; display: flex; align-items: center; justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, .06); font-size: 12px; color: #7f95b1;
}

/* ---- 主体 ---- */
.main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }

/* ---- 顶栏 ---- */
.topbar {
  height: 56px; flex: none; background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px 0 20px;
}
.tb-left { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.tb-title { font-size: 16px; font-weight: 600; }
.tb-crumb { font-size: 13px; color: var(--txt-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-right { display: flex; align-items: center; gap: 16px; }
.tb-search {
  display: flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 4px 0 10px;
  background: #f2f5f9; border: 1px solid transparent; border-radius: 16px;
  transition: border-color .15s, background .15s;
}
.tb-search:focus-within { background: #fff; border-color: var(--blue); }
.tb-search-ico { display: flex; color: var(--txt-3); }
.tb-search input {
  width: 190px; border: 0; background: transparent; height: 30px; padding: 0;
}
.tb-search input::placeholder { color: var(--txt-3); }
.tb-search-btn {
  height: 26px; padding: 0 12px; border: 0; border-radius: 13px;
  background: var(--blue); color: #fff; font-size: 12px; cursor: pointer;
}
.tb-search-btn:hover { background: #c52a16; }

.tb-bell { position: relative; cursor: pointer; color: var(--txt-2); padding: 4px; display: flex; }
.tb-bell:hover { color: var(--blue); }
.tb-bell .dot {
  position: absolute; top: 2px; right: 2px; width: 7px; height: 7px;
  background: var(--red); border-radius: 50%; border: 1.5px solid #fff;
}
.tb-user { position: relative; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #e5361f, #ff7a5c);
  color: #fff; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.tb-uname { font-size: 13px; color: var(--txt); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-user .caret { display: flex; color: var(--txt-3); }
.tb-menu {
  position: absolute; top: 40px; right: 0; min-width: 140px; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 6px 18px rgba(31, 45, 61, .12); padding: 5px 0;
}
.tb-menu a { display: block; padding: 9px 16px; color: var(--txt-2); font-size: 13px; }
.tb-menu a:hover { background: #f5f8fc; color: var(--blue); }

/* ---- 二级菜单栏 ---- */
.body { flex: 1; min-height: 0; display: flex; }
.subnav {
  width: 148px; flex: none; background: #fff;
  border-right: 1px solid var(--line); padding: 12px 0; overflow-y: auto;
}
.sub-group { padding: 0 10px; margin: 10px 0 6px; font-size: 11px; color: var(--txt-3); letter-spacing: .5px; }
.subnav a {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px 9px 18px; margin: 1px 8px;
  border-radius: 6px; font-size: 13px; color: var(--txt-2);
  border-left: 2px solid transparent; cursor: pointer;
}
.subnav a:hover { background: #f4f7fb; color: var(--txt); }
.subnav a.on { background: #fdeceb; color: var(--blue); font-weight: 500; border-left-color: var(--blue); }
.subnav a .ico { width: 14px; height: 14px; opacity: .8; }
.subnav .sub-empty { padding: 20px 16px; color: var(--txt-3); font-size: 12px; text-align: center; }

/* ---- 内容区 ---- */
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.tabs {
  flex: none; display: flex; align-items: center; gap: 2px;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 0 16px; overflow-x: auto; min-height: 42px;
}
.tab {
  position: relative; padding: 12px 14px; font-size: 13px; color: var(--txt-2);
  cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--blue); }
.tab.on { color: var(--blue); font-weight: 500; border-bottom-color: var(--blue); }
.page { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; }

/* ==========================================================================
   通用组件
   ========================================================================== */

/* ---- 卡片 ---- */
.card {
  background: var(--card-bg); border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(31, 45, 61, .06); margin-bottom: 16px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.card-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-title::before { content: ""; width: 3px; height: 14px; background: var(--blue); border-radius: 2px; }
.card-title .sub { font-size: 12px; font-weight: 400; color: var(--txt-3); }
.card-extra { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

/* ---- 统计卡片 ---- */
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-row.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-row.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat {
  background: #fff; border-radius: var(--radius); padding: 18px;
  box-shadow: 0 1px 3px rgba(31, 45, 61, .06);
  display: flex; align-items: flex-start; gap: 14px;
}
.stat-ico {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #fdeceb; color: var(--blue);
}
.stat-ico .ico { width: 22px; height: 22px; }
.stat-ico.g { background: #e6f7ee; color: var(--green); }
.stat-ico.o { background: #fef4e4; color: var(--orange); }
.stat-ico.r { background: #fdeced; color: var(--red); }
.stat-ico.c { background: #e9f2ff; color: #2f7fe0; }
.stat-ico.p { background: #f2edfd; color: #7a5af5; }
.stat-main { min-width: 0; flex: 1; }
.stat-title { font-size: 13px; color: var(--txt-2); }
.stat-sub { font-size: 12px; color: var(--txt-3); margin-top: 3px; height: 16px; overflow: hidden; }
.stat-val {
  font-size: 24px; font-weight: 600; margin-top: 4px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-val small { font-size: 12px; font-weight: 400; color: var(--txt-3); margin-left: 4px; }
.stat-arrow { color: var(--txt-3); display: flex; margin-top: 2px; }

/* ---- 应用市场统计卡（v2.0.0）：简洁三行卡，与 .stat 同一视觉语言 ---- */
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(31, 45, 61, .06); min-width: 0;
}
.stat-body { min-width: 0; }
.stat-label { font-size: 13px; color: var(--txt-2); }
.stat-value {
  font-size: 24px; font-weight: 600; margin-top: 6px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-value small { font-size: 12px; font-weight: 400; color: var(--txt-3); margin-left: 4px; }
.stat-extra { font-size: 12px; color: var(--txt-3); margin-top: 4px; }

/* ---- 图表 ---- */
.chart-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 16px; }
.chart-box { width: 100%; }
.chart-box svg { display: block; width: 100%; height: auto; }
.donut-wrap svg { display: block; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: center; margin-top: 12px; }
/* 环形图容器：左侧环图、右侧图例，窄屏自动上下堆叠 */
.donut-wrap {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  justify-content: center;
}
.donut-wrap > svg { flex: none; }
.donut-wrap .chart-legend {
  flex: 1 1 160px; margin-top: 0; flex-direction: column;
  align-items: flex-start; justify-content: center; gap: 8px;
}
.donut-wrap .lg-item { width: 100%; }
.lg-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--txt-2); }
.lg-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.lg-val { color: var(--txt-3); }
.chart-empty { height: 240px; display: flex; align-items: center; justify-content: center; color: var(--txt-3); font-size: 13px; }

/* ---- 工具条 ---- */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.toolbar .sp { flex: 1; }
.tb-field { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--txt-2); }
.inp, .sel, .txa {
  height: 32px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 6px;
  background: #fff; color: var(--txt); transition: border-color .15s, box-shadow .15s;
}
.inp:focus, .sel:focus, .txa:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(229, 54, 31, .1); }
.inp::placeholder, .txa::placeholder { color: #b6c0cd; }
.txa { height: auto; padding: 8px 10px; line-height: 1.6; resize: vertical; min-height: 72px; width: 100%; }
.sel { min-width: 120px; cursor: pointer; }
.inp.w-sm { width: 110px; }
.inp.w-md { width: 180px; }
.inp.w-full { width: 100%; }
.inp.mono, .txa.mono { font-family: Consolas, Monaco, "Courier New", monospace; font-size: 13px; }
.sel.w-full, .sel.w-full-2 { width: 100%; }
.inp.err, .sel.err, .txa.err { border-color: var(--red); }
.hint { font-size: 12px; color: var(--txt-3); }
.hint.warn { color: var(--orange); }
.hint.danger { color: var(--red); }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 32px; padding: 0 14px; border: 1px solid var(--line-2);
  background: #fff; color: var(--txt-2); border-radius: 6px;
  cursor: pointer; white-space: nowrap; transition: all .15s; font-size: 13px;
}
.btn:hover { color: var(--blue); border-color: #a9c6f8; background: #f7faff; }
.btn .ico { width: 14px; height: 14px; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: #c52a16; border-color: #c52a16; color: #fff; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #cf3a3f; border-color: #cf3a3f; color: #fff; }
/* 次要按钮（弹窗取消/关闭）：继承 .btn 的白底描边，仅显式声明以覆盖同名引用 */
.btn-default { background: #fff; border-color: var(--line-2); color: var(--txt-2); }
.btn-default:hover { color: var(--blue); border-color: #a9c6f8; background: #f7faff; }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; }
.btn-success:hover { background: #1b8f4d; border-color: #1b8f4d; color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: #fdeceb; }
.btn-sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn-lg { height: 40px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn .spin { width: 13px; height: 13px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-default .spin { border-color: rgba(92, 107, 127, .3); border-top-color: var(--txt-2); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 表格 ---- */
.tbl-wrap { width: 100%; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  background: #f7f9fc; color: var(--txt-2); font-weight: 600; text-align: left;
  padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12.5px;
}
.tbl td {
  padding: 12px 14px; border-bottom: 1px solid #f1f4f8;
  color: var(--txt); vertical-align: middle;
}
.tbl tbody tr:hover { background: #f8fbff; }
/* 停用行：整行淡出，用于区分「已停用」的学校 / 无数据分组 */
.tbl tbody tr.row-off td,
.tbl tbody tr.row-off > td { color: #a8b0bf; background: #fbfcfd; }
.tbl tbody tr.row-off td a { color: #a8b0bf; }
.tbl tbody tr.row-off:hover td { background: #f6f8fa; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .td-num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .td-mid { text-align: center; }
.tbl .td-act { white-space: nowrap; }
.tbl .td-strong { font-weight: 600; }
.tbl .sub-text { font-size: 12px; color: var(--txt-3); margin-top: 3px; }
.tbl .ell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.row-off td { background: #fbfcfd; }
.row-off .td-strong { color: var(--txt-3); font-weight: 400; }

.lnk { color: var(--blue); cursor: pointer; margin-right: 12px; white-space: nowrap; }
.lnk:hover { text-decoration: underline; }
.lnk.danger { color: var(--red); }
.lnk.muted { color: var(--txt-3); cursor: default; }
.lnk.muted:hover { text-decoration: none; }
.lnk-sep { color: #d6dce5; margin-right: 12px; }

.cell-ico {
  width: 30px; height: 30px; border-radius: 8px; flex: none; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
}
.app-cell { display: flex; align-items: center; gap: 10px; }
.app-cell .txt { min-width: 0; }
.app-cell .nm { font-weight: 500; }
.app-cell .ds { font-size: 12px; color: var(--txt-3); margin-top: 2px; }

/* 状态标签 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 4px;
  font-size: 12px; line-height: 1; white-space: nowrap;
}
.tag-blue { background: #fdeceb; color: #e5361f; }
.tag-green { background: #e6f7ee; color: #1b8f4d; }
.tag-orange { background: #fef4e4; color: #c77700; }
.tag-red { background: #fdeced; color: #cf3a3f; }
.tag-gray { background: #f0f2f5; color: #6b7789; }
.tag-purple { background: #f2edfd; color: #6d4bd8; }
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* 更新日志：内置变更清单（新增 / 优化 / 修复） */
.cl-list { margin: 0 0 6px; padding: 0; list-style: none; }
.cl-list li {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 2px; border-bottom: 1px dashed var(--line);
  font-size: 13px; color: var(--txt-2); line-height: 1.7;
}
.cl-list li:last-child { border-bottom: 0; }
.cl-list li .tag { flex: none; margin-top: 3px; }

/* ---- 分页 ---- */
.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border-top: 1px solid var(--line); flex-wrap: wrap;
}
.pager-info { font-size: 13px; color: var(--txt-3); }
.pager-list { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pg {
  min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--line-2);
  border-radius: 6px; background: #fff; color: var(--txt-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 13px;
}
.pg:hover:not(.on):not(.dis) { color: var(--blue); border-color: #a9c6f8; }
.pg.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.pg.dis { color: #c3ccd8; cursor: not-allowed; }
.pg-dots { color: var(--txt-3); padding: 0 2px; }
.pg-sizes { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--txt-2); }
.pg-sizes .sel { height: 30px; min-width: 92px; }

/* ---- 空状态 / 加载 ---- */
.empty { padding: 54px 20px; text-align: center; color: var(--txt-3); font-size: 13px; }
.empty .ico { width: 44px; height: 44px; color: #cfd8e4; margin-bottom: 12px; }
.loading { padding: 44px 20px; text-align: center; color: var(--txt-3); font-size: 13px; }
.loading .spin { width: 22px; height: 22px; border: 2px solid #dbe3ee; border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; margin-bottom: 10px; }

/* ==========================================================================
   弹窗
   ========================================================================== */
.modal-mask {
  position: fixed; inset: 0; z-index: 6000;   /* ★ v1.2.64 必须高于 x-drawer-mask(3000)，否则抽屉里开选择商品弹窗会被压住半边 */
  background: rgba(23, 38, 60, .45);
  display: flex; align-items: center; justify-content: center; padding: 30px 16px;
  overflow-y: auto;
  /* ★ v1.2.40：防止横向拖动/边缘滑动触发浏览器手势或误关弹窗 */
  touch-action: pan-y; overscroll-behavior-x: none;
}
.modal {
  width: 620px; max-width: 100%; background: #fff; border-radius: 10px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, .2); display: flex; flex-direction: column;
  max-height: calc(100vh - 60px); margin: auto;
}
.modal-sm { width: 420px; }
.modal-lg { width: 860px; }
.modal-xl { width: 1080px; }
.modal-head {
  flex: none; height: 52px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close { font-size: 24px; line-height: 1; color: var(--txt-3); cursor: pointer; padding: 0 4px; }
.modal-close:hover { color: var(--txt); }
.modal-body { flex: 1; padding: 18px; overflow-y: auto; }
.modal-body.flush { padding: 0; }
.modal-foot {
  flex: none; padding: 13px 18px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
}
.modal-foot .left { margin-right: auto; }

/* ---- v1.2.28 通用商品选择（扫码 / 搜索） ---- */
.pk { display: flex; flex-direction: column; gap: 10px; }
.pk-bar { display: flex; gap: 8px; align-items: center; }
.pk-bc, .pk-kw { height: 34px; }
.pk-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }

/* ★ v1.2.64 商品多选：独立全屏遮罩（不依赖后台通用弹窗，任何页面/抽屉之上都在最前） */
.pk-multi-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15, 23, 42, .48);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.pk-multi-box {
  width: 900px; max-width: 100%; max-height: calc(100vh - 40px);
  background: #fff; border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}
.pk-multi-hd {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px; border-bottom: 1px solid #eef1f6;
  font-size: 15px; font-weight: 600;
}
.pk-multi-x { font-size: 22px; line-height: 1; color: #98a2b3; cursor: pointer; padding: 0 4px; }
.pk-multi-x:hover { color: #333; }
.pk-multi-bd { flex: 1; min-height: 0; padding: 12px 18px; overflow: auto; }
.pk-multi-bd .pk-list { max-height: none; }
.pk-multi-foot {
  flex: none; display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 18px; border-top: 1px solid #eef1f6; background: #fff;
}
.pk-multi-foot .btn { min-width: 118px; height: 36px; }
.pk-multi-foot .pk-ok { font-weight: 600; }
/* 多选时底部「确定加入（N）」按钮再加粗一点，避免用户找不到 */
#modalFoot .btn-primary { min-width: 132px; font-weight: 600; }
.pk-loading, .pk-empty { padding: 28px; text-align: center; color: var(--txt-3); font-size: 13px; }
.pk-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.pk-tbl th { text-align: left; padding: 9px 10px; background: #f6f8fb; color: var(--txt-2); font-weight: 600; position: sticky; top: 0; }
.pk-tbl td { padding: 9px 10px; border-top: 1px solid var(--line); color: var(--txt); }
.pk-row { cursor: pointer; }
/* ★ v1.2.64 商品弹窗多选：勾选行高亮 + 已选计数条 */
.pk-row.on { background: #fff4f3; box-shadow: inset 3px 0 0 #e1251b; }
.pk-tbl .pk-ck { width: 38px; text-align: center; }
.pk-tbl .pk-ck input { width: 15px; height: 15px; cursor: pointer; }
.pk-picked { padding: 6px 12px 2px; font-size: 12.5px; color: #666; }
.pk-picked b { color: #e1251b; font-size: 14px; padding: 0 2px; }
.pk-row:hover { background: #f0f6ff; }
.pk-tbl .ta-right { text-align: right; }
/* 开单明细里的"选择/扫码"按钮 + 显示 */
.pc-pick { display: flex; align-items: center; gap: 8px; }
.pc-pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--txt); }
.pc-pick-name.empty { color: var(--txt-3); }

/* ★ v1.2.28：采购入库序列号录入弹窗 */
.ser-intro { padding: 10px 12px; background: #fff8e6; border: 1px solid #ffe2a8; color: #8a6400;
  border-radius: 8px; font-size: 13px; line-height: 1.6; margin-bottom: 14px; }
.ser-list { display: flex; flex-direction: column; gap: 14px; max-height: 56vh; overflow: auto; }
.ser-line { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; }
.ser-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ser-hd b { color: var(--txt); font-size: 14px; }
.ser-spec { color: var(--txt-2); font-size: 12px; }
.ser-need { margin-left: auto; color: #c0392b; font-size: 12px; font-weight: 600; }
.ser-ta { width: 100%; min-height: 64px; resize: vertical; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 13px;
  font-family: ui-monospace, Menlo, Consolas, monospace; line-height: 1.7; color: var(--txt); }
.ser-ta:focus { border-color: var(--brand); outline: none; }
.ser-tip { min-height: 16px; margin-top: 4px; font-size: 12px; color: var(--txt-3); }
.ser-tip.ser-err { color: #c0392b; }

/* ---- 表单 ---- */
.form { display: block; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-item { width: 50%; margin-bottom: 15px; }
.form-item.full { width: 100%; }
.form-item.third { width: calc(33.333% - 10px); }
.form-label { display: block; font-size: 13px; color: var(--txt-2); margin-bottom: 6px; }
.form-label .req { color: var(--red); margin-right: 3px; }
.form-label .opt { color: var(--txt-3); font-weight: 400; margin-left: 4px; }
.form-ctrl { position: relative; }
.form-ctrl .inp, .form-ctrl .sel, .form-ctrl .txa { width: 100%; }
.form-tip { font-size: 12px; color: var(--txt-3); margin-top: 5px; line-height: 1.5; }
.form-tip.warn { color: var(--orange); }
.form-err { font-size: 12px; color: var(--red); margin-top: 5px; min-height: 0; }
.form-sec {
  margin: 4px 0 14px; padding: 9px 12px; background: #f6f9fd;
  border-left: 3px solid var(--blue); border-radius: 0 6px 6px 0;
  font-size: 13px; font-weight: 600; color: var(--txt);
}
.form-sec.mt { margin-top: 22px; }
.chk-group { display: flex; flex-wrap: wrap; gap: 8px 10px; padding: 4px 0; }
.chk {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 6px 11px; border: 1px solid var(--line-2); border-radius: 6px;
  background: #fff; font-size: 13px; color: var(--txt-2); user-select: none;
  transition: all .15s;
}
.chk:hover { border-color: #a9c6f8; color: var(--blue); }
.chk input { display: none; }
.chk .box {
  width: 14px; height: 14px; border: 1px solid #c6d0dd; border-radius: 3px;
  display: flex; align-items: center; justify-content: center; flex: none; background: #fff;
}
.chk.on { border-color: var(--blue); background: #f2f7ff; color: var(--blue); }
.chk.on .box { background: var(--blue); border-color: var(--blue); }
.chk.on .box::after { content: ""; width: 4px; height: 7px; border: 2px solid #fff; border-top: 0; border-left: 0; transform: rotate(42deg) translate(-1px, -1px); }
.chk .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

.radio-list { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 4px 0; }
.radio-list label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; color: var(--txt-2); }
.radio-list input { width: 15px; height: 15px; accent-color: var(--blue); cursor: pointer; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--txt-2); }
.switch input { display: none; }
.switch .track {
  width: 40px; height: 22px; border-radius: 11px; background: #ccd5e0; position: relative;
  transition: background .18s; flex: none;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform .18s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.switch.on .track { background: var(--blue); }
.switch.on .track::after { transform: translateX(18px); }

/* ==========================================================================
   模块专属
   ========================================================================== */

/* 应用卡片 */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.app-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 11px;
  transition: box-shadow .16s, border-color .16s;
}
.app-card:hover { box-shadow: 0 6px 18px rgba(31, 45, 61, .09); border-color: #d7e3f7; }
.app-card-top { display: flex; align-items: center; gap: 11px; }
.app-card-ico {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
}
.app-card-name { font-size: 15px; font-weight: 600; }
.app-card-code { font-size: 12px; color: var(--txt-3); font-family: Consolas, Monaco, monospace; margin-top: 3px; }
.app-card-sum { font-size: 13px; color: var(--txt-2); line-height: 1.6; min-height: 42px; }
.app-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 11px; border-top: 1px solid #f1f4f8; }

/* 应用开通勾选网格 */
.app-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.app-pick {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff;
  transition: all .15s; user-select: none;
}
.app-pick:hover { border-color: #a9c6f8; }
.app-pick input { display: none; }
.app-pick.on { border-color: var(--blue); background: #f4f8ff; }
.app-pick .ap-ico { width: 32px; height: 32px; border-radius: 8px; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; }
.app-pick .ap-nm { font-size: 13px; font-weight: 500; }
.app-pick .ap-sub { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; }
.app-pick .ap-extra { margin-left: auto; font-size: 12px; color: var(--txt-3); text-align: right; }

/* 描述列表 */
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0; }
.dl-item {
  display: flex; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid #f4f6fa; font-size: 13px; align-items: baseline;
}
.dl-item.full { grid-column: 1 / -1; }
.dl-k { color: var(--txt-3); width: 116px; flex: none; }
.dl-v { color: var(--txt); word-break: break-all; min-width: 0; }
.dl-v.mono { font-family: Consolas, Monaco, monospace; }

/* 键值统计块 */
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.kv {
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: #fbfcfe;
}
.kv-k { font-size: 12.5px; color: var(--txt-3); }
.kv-v { font-size: 18px; font-weight: 600; margin-top: 6px; word-break: break-all; }
.kv-v.small { font-size: 14px; font-weight: 500; }
.kv.ok { border-color: #b9e6cd; background: #f2fbf6; }
.kv.ok .kv-v { color: #1b8f4d; }
.kv.bad { border-color: #f6cdcf; background: #fef5f5; }
.kv.bad .kv-v { color: #cf3a3f; }

/* 分组标题 */
.sec-title {
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px;
  font-size: 14px; font-weight: 600; color: var(--txt);
}
.sec-title::before { content: ""; width: 3px; height: 13px; background: var(--blue); border-radius: 2px; }
.sec-title .sub { font-size: 12px; font-weight: 400; color: var(--txt-3); }
.sec-title.mt { margin-top: 20px; }
.sec-title .r { margin-left: auto; display: flex; gap: 8px; }

/* 时间线 */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: #e3e9f2; }
.tl-item { position: relative; padding: 0 0 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--blue); box-shadow: 0 0 0 3px #fdeceb;
}
.tl-item.old .tl-dot { border-color: #c3ccd8; box-shadow: 0 0 0 3px #f0f2f5; }
.tl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tl-ver { font-size: 14.5px; font-weight: 600; }
.tl-title { font-size: 13.5px; color: var(--txt-2); }
.tl-time { font-size: 12px; color: var(--txt-3); margin-left: auto; }
.tl-body { font-size: 13px; color: var(--txt-2); line-height: 1.75; margin-top: 8px; white-space: pre-wrap; }
.tl-link { font-size: 12.5px; margin-top: 8px; }

/* 进度条 */
.bar { height: 6px; border-radius: 3px; background: #eef1f6; overflow: hidden; min-width: 70px; }
.bar > i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.bar.g > i { background: var(--green); }
.bar.o > i { background: var(--orange); }
.bar-cell { display: flex; align-items: center; gap: 8px; }
.bar-cell .pct { font-size: 12px; color: var(--txt-3); width: 34px; flex: none; }

/* 授权说明块 */
.doc-block { font-size: 13px; color: var(--txt-2); line-height: 1.85; }
.doc-block p { margin-bottom: 9px; }
.doc-block ol, .doc-block ul { padding-left: 20px; margin-bottom: 9px; list-style: decimal; }
.doc-block ul { list-style: disc; }
.doc-block code {
  background: #f2f5f9; border-radius: 4px; padding: 1px 6px;
  font-family: Consolas, Monaco, monospace; font-size: 12.5px; color: #b5541f;
}
.code-box {
  background: #f7f9fc; border: 1px solid var(--line); border-radius: 6px;
  padding: 11px 13px; font-family: Consolas, Monaco, monospace; font-size: 12.5px;
  color: var(--txt); line-height: 1.7; word-break: break-all; margin-bottom: 9px;
}
.readonly-val {
  display: flex; align-items: center; gap: 8px; padding: 7px 11px;
  background: #f7f9fc; border: 1px dashed var(--line-2); border-radius: 6px;
  font-family: Consolas, Monaco, monospace; font-size: 13px; word-break: break-all;
}

/* Toast */
.toast-wrap {
  position: fixed; top: 22px; left: 50%; transform: translateX(-50%);
  z-index: 400; display: flex; flex-direction: column; align-items: center; gap: 10px;
  pointer-events: none;
}
.toast {
  min-width: 220px; max-width: 460px; padding: 11px 16px; border-radius: 8px;
  background: #fff; box-shadow: 0 8px 24px rgba(23, 38, 60, .16);
  border-left: 3px solid var(--blue); font-size: 13.5px; color: var(--txt);
  display: flex; align-items: flex-start; gap: 9px; animation: tin .22s ease;
}
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--orange); }
.toast .ico { margin-top: 1px; }
.toast.ok .ico { color: var(--green); }
.toast.err .ico { color: var(--red); }
.toast.warn .ico { color: var(--orange); }
.toast.info .ico { color: var(--blue); }
.toast .tx { flex: 1; line-height: 1.6; word-break: break-word; }
@keyframes tin { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* 通知浮层 */
.popover {
  position: fixed; top: 52px; right: 132px; z-index: 120; width: 300px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 38, 60, .14); overflow: hidden;
}
.pop-title { padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.pop-body { max-height: 320px; overflow-y: auto; }
.pop-item { display: flex; gap: 9px; padding: 11px 14px; border-bottom: 1px solid #f4f6fa; }
.pop-item:last-child { border-bottom: 0; }
.pop-item .pd { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex: none; }
.pop-item .pt { font-size: 13px; line-height: 1.6; }
.pop-item .pm { font-size: 11.5px; color: var(--txt-3); margin-top: 3px; }
.pop-empty { padding: 30px 16px; text-align: center; color: var(--txt-3); font-size: 13px; }

/* 杂项 */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ml-auto { margin-left: auto; }
.nowrap { white-space: nowrap; }
.mono { font-family: Consolas, Monaco, "Courier New", monospace; }
.tnum { font-variant-numeric: tabular-nums; }
.txt-2 { color: var(--txt-2); }
.txt-3 { color: var(--txt-3); }
.txt-red { color: var(--red); }
.txt-green { color: var(--green); }
.txt-orange { color: var(--orange); }
.txt-blue { color: var(--blue); }
.fw-6 { font-weight: 600; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.right { text-align: right; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c8d2df; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #aab8c9; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- 页级提示条 ---- */
.page-alert {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 12px 16px; margin-bottom: 16px;
  background: #fff8e6; border: 1px solid #ffe0a3; border-radius: var(--radius);
  color: #ad6800; font-size: 13px; line-height: 1.7;
}

/* 响应式 */
@media (max-width: 1280px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-row { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .sidebar { width: 62px; }
  .sb-name, .sb-item > a span:not(.ico) { display: none; }
  .sb-item > a { justify-content: center; padding: 0; }
  .sb-brand { justify-content: center; padding: 0; }
  .subnav { width: 138px; }
  .form-item, .form-item.third { width: 100%; }
}

/* ==============================================================
   在线升级页
   ============================================================== */

/* 更新说明分类清单（新增 / 优化 / 修复） */
.chg-list { display: flex; flex-direction: column; gap: 10px; }
.chg-row { display: flex; gap: 10px; align-items: flex-start; }
.chg-tag { flex: none; margin-top: 1px; }
.chg-items { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.chg-item {
  font-size: 12.5px; color: var(--txt-2); line-height: 1.7;
  padding-left: 12px; position: relative;
}
.chg-item::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 4px; height: 4px; border-radius: 50%; background: #c3ccd9;
}

/* 按钮行 */
.btn-line { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* 日志框：等宽、深底、纵向滚动 */
.logbox {
  background: #1b2330; color: #cdd7e4; border-radius: 8px;
  padding: 12px 14px; font-family: Consolas, Monaco, monospace;
  font-size: 12px; line-height: 1.85; max-height: 320px; overflow: auto;
  white-space: pre-wrap; word-break: break-all;
}
.logbox .lg { padding: 1px 0; }
.logbox .lg-bad { color: #ff9b9b; }
.logbox .lg-ok { color: #8ee6a8; }
.logbox .lgmuted { color: #6b7789; }

/* 升级体检用的迷你表格 */
.mini-tb { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-tb td { padding: 8px 10px; border-bottom: 1px solid #f1f4f8; vertical-align: middle; }
.mini-tb tr:last-child td { border-bottom: 0; }
.mini-tb td:first-child { color: var(--txt-2); }

/* 数字后缀单位（如「3 次」） */
.unit { font-size: 12px; color: var(--txt-3); margin-left: 2px; }

/* ==========================================================================
   车销版进销存 · 业务专属组件（在缴费系统基线之上叠加）
   ★ 基线来自 campus-pay v2.5.0 admin.css，本节只做业务扩展，不改基线视觉
   ========================================================================== */

/* ---------- 顶部横幅 ---------- */
.banner {
  background: #fff7e6;
  border-bottom: 1px solid #ffe0a3;
  color: #8a5300;
  padding: 9px 18px;
  font-size: 13px;
  flex: none;
}
.banner.err { background: #fdecec; border-bottom-color: #f7c1c1; color: #a32d2d; }

/* ---------- 二级菜单分组标题 ---------- */
.sub-group { padding: 0 10px; margin: 12px 0 6px; font-size: 11px; color: var(--txt-3); letter-spacing: .5px; }

/* ---------- 统计卡（带图标，缴费系统同款） ---------- */
.stat { display: flex; align-items: flex-start; gap: 14px; }
.stat-ico {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #fdeceb; color: var(--blue);
}
.stat-ico .ico { width: 22px; height: 22px; }
.stat-ico.g { background: #e6f7ee; color: var(--green); }
.stat-ico.o { background: #fef4e4; color: var(--orange); }
.stat-ico.r { background: #fdeced; color: var(--red); }
.stat-ico.c { background: #e9f2ff; color: #2f7fe0; }
.stat-ico.p { background: #f2edfd; color: #7a5af5; }

/* ---------- 货在哪（三段流转条） ---------- */
.flow-bar { display: flex; gap: 10px; margin-top: 12px; }
.flow-item { flex: 1; min-width: 150px; }
.flow-bar-bg { height: 8px; background: #eef1f6; border-radius: 4px; overflow: hidden; }
.flow-bar-fill { height: 100%; border-radius: 4px; transition: width .3s; }
.flow-label { font-size: 12px; color: var(--txt-2); margin-top: 7px; }
.flow-val { font-size: 14px; font-weight: 600; color: var(--txt); margin-top: 2px; }
.flow-val em { font-style: normal; font-size: 12px; color: var(--txt-3); font-weight: 400; }
.flow-item.gray .flow-val { color: var(--txt-3); }

/* ---------- 迷你进度条 ---------- */
.mini-bar {
  display: inline-block; width: 72px; height: 6px; background: #eef1f6;
  border-radius: 3px; overflow: hidden; vertical-align: middle; margin-right: 6px;
}
.mini-bar > div { height: 100%; background: var(--blue); border-radius: 3px; }

/* ---------- 柱状图（纯 CSS，不引图表库） ---------- */
.bar-chart {
  display: flex; align-items: flex-end; gap: 3px;
  height: 200px; padding: 10px 0 0; overflow-x: auto;
}
.bar-item { flex: 1; min-width: 14px; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.bar-item .bar { background: linear-gradient(180deg, #ff7a5c, #e5361f); border-radius: 3px 3px 0 0; min-height: 2px; }
.bar-item:hover .bar { background: var(--blue); }
.bar-x { font-size: 10px; color: var(--txt-3); text-align: center; margin-top: 5px; white-space: nowrap; }

/* ---------- 应用中心卡片 ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.app-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 11px;
  transition: box-shadow .16s, border-color .16s;
}
.app-card:hover { box-shadow: 0 6px 18px rgba(31, 45, 61, .09); border-color: #d7e3f7; }
.app-card.on { border-color: #b9d0fb; background: #fbfcff; }
.app-card-top { display: flex; align-items: center; gap: 11px; }
.app-ico {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px;
}
.app-ico .ico { width: 20px; height: 20px; }
.app-card-name { font-size: 15px; font-weight: 600; }
.app-card-sum { font-size: 13px; color: var(--txt-2); line-height: 1.6; min-height: 42px; }
.app-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 11px; border-top: 1px solid #f1f4f8; }

/* ---------- 应用勾选网格（套餐配置用） ---------- */
.app-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.app-pick {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff;
  transition: all .15s; user-select: none;
}
.app-pick:hover { border-color: #a9c6f8; }
.app-pick input { display: none; }
.app-pick.on { border-color: var(--blue); background: #f4f8ff; }
.app-pick .ap-ico { width: 32px; height: 32px; border-radius: 8px; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; }
.app-pick .ap-nm { font-size: 13px; font-weight: 500; }
.app-pick .ap-sub { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; }
.app-pick .ap-extra { margin-left: auto; font-size: 12px; color: var(--txt-3); text-align: right; }

/* ---------- 开关式勾选（老组件保留） ---------- */
.switch-item {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 13px; color: var(--txt); cursor: pointer; background: #fff;
}
.switch-item input { margin: 0; }
.switch-item:has(input:disabled) { opacity: .55; cursor: not-allowed; }

/* ---------- 预警行 ---------- */
.alert-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 6px; margin-bottom: 8px;
  font-size: 13px; line-height: 1.6;
}
.alert-row.lv1 { background: #fef4e4; color: #a06a12; }
.alert-row.lv2 { background: #fdecec; color: #c62f2f; }
.alert-row.lv3 { background: #fdeceb; color: #e5361f; }
.alert-row b { display: block; font-weight: 600; }
.alert-row span { color: var(--txt-2); font-size: 12px; }

/* ---------- 合计条 ---------- */
.sum-box { background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.sum-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; color: var(--txt-2); }
.sum-row b { color: var(--txt); font-weight: 600; }
.sum-row.total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.sum-row.total b { font-size: 18px; color: var(--blue); }

/* ==========================================================================
   ★ v1.2.2：打印模板「表格拖拽式」设计器
   ========================================================================== */
.dnd-wrap { display: flex; gap: 14px; align-items: flex-start; }
.dnd-left { flex: none; width: 220px; }
.dnd-right { flex: 1; min-width: 0; }
.dnd-palette {
  background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; padding: 10px;
  max-height: 420px; overflow-y: auto;
}
.dnd-palette-title { font-size: 12px; color: var(--txt-3); margin-bottom: 8px; }
.dnd-field {
  display: flex; align-items: center; gap: 6px; cursor: grab;
  padding: 7px 9px; margin-bottom: 6px; background: #fff;
  border: 1px solid var(--line-2); border-radius: 6px; font-size: 12.5px; color: var(--txt);
  user-select: none; transition: all .12s;
}
.dnd-field:hover { border-color: var(--blue); color: var(--blue); }
.dnd-field:active { cursor: grabbing; }
.dnd-field.dragging { opacity: .45; }
.dnd-field .df-key { font-size: 11px; color: var(--txt-3); margin-left: auto; font-family: Consolas, monospace; }

.dnd-canvas {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  min-height: 220px; overflow-x: auto;
}
.dnd-canvas.empty { display: flex; align-items: center; justify-content: center; color: var(--txt-3); font-size: 13px; }
.dnd-cols { width: 100%; border-collapse: collapse; font-size: 13px; }
.dnd-cols th {
  background: #f7f9fc; border-bottom: 1px solid var(--line); padding: 0;
  text-align: left; font-weight: 600; color: var(--txt-2); font-size: 12.5px;
}
.dnd-cols th.dnd-th { position: relative; }
.dnd-th-inner { display: flex; align-items: center; gap: 5px; padding: 10px 10px; cursor: grab; }
.dnd-th-inner:active { cursor: grabbing; }
.dnd-th-inner.dragging { opacity: .4; }
.dnd-th-inner .ico { width: 13px; height: 13px; color: var(--txt-3); flex: none; }
.dnd-th-inner .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dnd-cols td { padding: 9px 10px; border-bottom: 1px solid #f1f4f8; color: var(--txt); }
.dnd-cols tr.drag-over td { background: #f4f8ff; }
.dnd-cols .col-acts { white-space: nowrap; text-align: right; }
.dnd-cols .col-acts .btn { height: 24px; padding: 0 7px; font-size: 12px; }
.dnd-drop-hint {
  text-align: center; color: var(--txt-3); font-size: 12px; padding: 18px;
  border: 1px dashed var(--line-2); border-radius: 6px; margin-top: 10px;
}
.dnd-preview {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 14px; overflow-x: auto;
}
.dnd-preview table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dnd-preview th { background: #f2f5f9; padding: 7px 9px; border: 1px solid var(--line); text-align: left; color: var(--txt-2); }
.dnd-preview td { padding: 7px 9px; border: 1px solid var(--line); color: var(--txt-3); }
.dnd-preview td.r { text-align: right; }
.dnd-preview td.c { text-align: center; }

/* ---------- 报表页头（筛选条） ---------- */
.rpt-filter {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 14px;
}
.rpt-filter .fld { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--txt-2); }
.rpt-filter .sp { flex: 1; }

/* ---------- 报表分组小卡 ---------- */
.rpt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.rpt-kpi {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.rpt-kpi .k { font-size: 12.5px; color: var(--txt-3); }
.rpt-kpi .v { font-size: 21px; font-weight: 600; margin-top: 5px; letter-spacing: -.2px; }
.rpt-kpi .v small { font-size: 12px; font-weight: 400; color: var(--txt-3); margin-left: 4px; }
.rpt-kpi .s { font-size: 12px; color: var(--txt-3); margin-top: 4px; }
.rpt-kpi.g .v { color: var(--green); }
.rpt-kpi.r .v { color: var(--red); }
.rpt-kpi.o .v { color: var(--orange); }
.rpt-kpi.b .v { color: var(--blue); }

/* ---------- 账龄分桶条 ---------- */
.aging-bar { display: flex; height: 30px; border-radius: 6px; overflow: hidden; margin: 10px 0 6px; }
.aging-seg { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11.5px; min-width: 0; }
.aging-seg.s0 { background: #22a95c; }
.aging-seg.s1 { background: #f59e0b; }
.aging-seg.s2 { background: #e8804b; }
.aging-seg.s3 { background: #e5484d; }
.aging-seg.s4 { background: #a32d2d; }

/* ---------- 侧栏品牌区文字防溢出 ---------- */
/* 150px 侧栏里 logo(26) + gap(8) + 左右 padding(26) 已占 60px，
   商户简称过长会把 .sb-brand 撑开、logo 被挤出可视区 —— 必须省略号截断。 */
.sb-brand { overflow: hidden; }
.sb-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 二级菜单文字防溢出 ---------- */
.subnav a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   ★ v1.2.3 报表中心
   ========================================================================== */
.rc-head { margin-bottom: 12px; }
.rc-title { font-size: 18px; font-weight: 600; margin: 0; }
.rc-desc { font-size: 12.5px; color: var(--txt-3); margin-top: 4px; }

/* 筛选条 */
.rc-filter {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 14px;
}
.rc-filter .fld { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--txt-2); }
.rc-filter .fld > span { white-space: nowrap; }
.rc-filter .sp { flex: 1; min-width: 10px; }

/* KPI 行 */
.rc-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.rc-kpi {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); min-width: 0;
}
.rc-kpi .k { font-size: 12.5px; color: var(--txt-3); }
.rc-kpi .v {
  font-size: 21px; font-weight: 600; margin-top: 6px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--txt);
}
.rc-kpi .s { font-size: 12px; color: var(--txt-3); margin-top: 4px; }
.rc-kpi.g .v { color: var(--green); }
.rc-kpi.r .v { color: var(--red); }
.rc-kpi.o .v { color: var(--orange); }
.rc-kpi.b .v { color: var(--blue); }

/* 图表 */
.rc-chart { width: 100%; }
.rc-chart svg { display: block; width: 100%; }
.rc-xaxis {
  display: flex; justify-content: space-between; margin-top: 6px;
  font-size: 10.5px; color: var(--txt-3); gap: 4px;
}
.rc-xaxis span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-pie { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.rc-legend { flex: 1 1 220px; display: flex; flex-direction: column; gap: 8px; }
.rc-lg { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--txt-2); }
.rc-lg i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.rc-lg b { margin-left: auto; color: var(--txt); font-weight: 600; }
.rc-lg em { font-style: normal; color: var(--txt-3); width: 46px; text-align: right; }
.chart-empty { height: 180px; display: flex; align-items: center; justify-content: center; color: var(--txt-3); font-size: 13px; }

/* 明细表：表头固定 + 表体滚动 */
.rc-tblwrap { max-height: 560px; overflow: auto; }
.rc-tbl thead th {
  position: sticky; top: 0; z-index: 2; background: #f7f9fc;
  box-shadow: inset 0 -1px 0 var(--line);
}
.rc-tbl tbody tr:hover { background: #f8fbff; }

/* 两列 */
.rc-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .rc-2col { grid-template-columns: 1fr; } }

/* 排行 */
.rc-rank { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; }
.rc-rank .no {
  width: 20px; height: 20px; border-radius: 5px; flex: none;
  background: #eef1f6; color: var(--txt-2); font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
.rc-rank:nth-child(1) .no { background: var(--blue); color: #fff; }
.rc-rank .nm { width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--txt); }
.rc-rank .bar { flex: 1; height: 6px; background: #eef1f6; border-radius: 3px; overflow: hidden; }
.rc-rank .bar > i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.rc-rank .amt { width: 96px; text-align: right; color: var(--txt-2); font-variant-numeric: tabular-nums; }

/* 待办 */
.rc-todo { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.rc-todo-item {
  border: 1px solid var(--line); border-radius: 8px; padding: 14px;
  background: #fbfcfe; text-align: center;
}
.rc-todo-item b { display: block; font-size: 24px; font-weight: 600; color: var(--txt-2); line-height: 1.2; }
.rc-todo-item span { display: block; font-size: 12.5px; color: var(--txt-2); margin-top: 6px; }
.rc-todo-item em { font-style: normal; font-size: 11px; color: var(--txt-3); }
.rc-todo-item.on { border-color: #f6cdcf; background: #fef5f5; }
.rc-todo-item.on b { color: var(--red); }

/* ==========================================================================
   ★ v1.2.4 补齐「被大量引用但从未定义」的组件
   --------------------------------------------------------------------------
   成因：页面代码是分批写的，类名先落地、样式后补，结果有 20 多个类
   只有名字没有定义。表现非常隐蔽 —— 页面不报错，只是：
     · 金额列表格不右对齐（ta-right 87 处引用，0 条规则）
     · 错误/成功提示条没有底色（alert* 共 45 处引用，0 条规则）
     · 已开通/未开通、已授权/未授权标签全是灰字（tag-ok/tag-danger）
   这类问题「看着像设计粗糙」，实际是样式缺失，必须补齐。
   ========================================================================== */

/* ---- 对齐工具类 ---- */
.ta-right  { text-align: right; }
.ta-center { text-align: center; }
.td-num    { text-align: right; font-variant-numeric: tabular-nums; }
.fs-12     { font-size: 12px; }
.fs-13     { font-size: 13px; }
.txt-2     { color: var(--txt-2); }
.txt-3     { color: var(--txt-3); }

/* ---- 状态文字色 ---- */
.ok-t  { color: var(--green); }
.bad-t { color: var(--red); }

/* ---- 标签别名（与 tag-green/tag-red 同义，历史代码用的是这组） ---- */
.tag-ok,
.tag-success { background: #e6f7ee; color: #1b8f4d; }
.tag-danger  { background: #fdeced; color: #cf3a3f; }
.tag-warn    { background: #fef4e4; color: #c77700; }

/* ---- 提示条 ---- */
.alert {
  padding: 10px 13px; border-radius: 8px; font-size: 13px; line-height: 1.75;
  border: 1px solid transparent; margin-bottom: 12px;
}
.alert b { font-weight: 600; }
.alert-ok   { background: #eefaf3; border-color: #c8ecd7; color: #17734a; }
.alert-err  { background: #fdecec; border-color: #f7c6c6; color: #b32b2b; }
.alert-warn { background: #fef6e6; border-color: #f8dfae; color: #9a6412; }
.alert-info { background: #fdeceb; border-color: #cfe0fd; color: #c52a16; }

/* ---- 卡片标题右侧小字说明 ---- */
.card-tip {
  font-size: 12px; font-weight: 400; color: var(--txt-3);
  margin-left: 8px; line-height: 1.5;
}

/* ---- 两列布局 ---- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 1080px) { .two-col { grid-template-columns: 1fr; } }

/* ---- 小票预览（打印模板设计器用） ---- */
.p-wrap {
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  padding: 14px 12px; color: #222; font-size: 12px; line-height: 1.6;
}
.p-title { text-align: center; font-size: 15px; font-weight: 700; margin-bottom: 8px; letter-spacing: 1px; }
.p-center { text-align: center; }
.p-row { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.p-row.big {
  font-size: 14px; font-weight: 600; margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed #bbb;
}
.p-sign { margin-top: 14px; padding-top: 10px; border-top: 1px dashed #bbb; color: #666; }

/* ==========================================================================
   ★ v1.2.4 条码标签（打印用）
   ========================================================================== */
.bc-label {
  display: inline-flex; flex-direction: column; align-items: center;
  width: 160px; padding: 8px 6px; margin: 0 8px 8px 0;
  border: 1px dashed #ccd4e0; border-radius: 4px; background: #fff;
  page-break-inside: avoid; break-inside: avoid;
  vertical-align: top;
}
.bc-label .bc-p1 {
  font-size: 12px; font-weight: 600; color: #111; text-align: center;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bc-label .bc-p2 { font-size: 10.5px; color: #555; margin: 2px 0 4px; }
.bc-label svg { display: block; max-width: 100%; height: 38px; }
.bc-label .bc-p3 { font-size: 11px; letter-spacing: 1px; margin-top: 3px; font-family: Consolas, monospace; color: #111; }
.bc-label .bc-p4 { font-size: 11.5px; color: #b32b2b; margin-top: 2px; }

@media print {
  /* 打印时只留标签区：其余框架元素全部隐藏 */
  body { background: #fff !important; }
  .sidebar, .topbar, .subnav, .tabs, .banner, .toast-wrap,
  .modal-mask, .popover, .toolbar, .card-title, .pager,
  #bcTbl, #bcPrintArea ~ * { display: none !important; }
  .card { border: 0 !important; box-shadow: none !important; margin: 0 !important; }
  #bcPrintArea { display: block !important; }
  .bc-label { border-color: #eee; }
}

/* ==========================================================================
   ★ v1.2.4 待办中心列表（商户端复用平台端的列表观感）
   ========================================================================== */
.pl-list { display: flex; flex-direction: column; }
.pl-list-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 0;
  border-bottom: 1px dashed #eef2f8; font-size: 13px;
}
.pl-list-item:last-child { border-bottom: 0; }
.pl-list-item .li-ico {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: #f2f5fa; color: #7b8aa0; display: flex; align-items: center; justify-content: center;
}
.pl-list-item .li-ico .ico { width: 15px; height: 15px; }
.pl-list-item .li-main { flex: 1; min-width: 0; }
.pl-list-item .li-nm { font-weight: 500; color: #22304a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-list-item .li-sub { font-size: 11.5px; color: var(--txt-3); margin-top: 2px; }
.pl-list-item .li-right { font-size: 12px; color: #7b8aa0; white-space: nowrap; }
.pl-empty { padding: 26px; text-align: center; color: var(--txt-3); font-size: 12.5px; }

.rc-todo-item { cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.rc-todo-item.active {
  border-color: var(--blue); box-shadow: 0 0 0 2px rgba(229, 54, 31, .12);
  background: #f4f8ff;
}

/* ==========================================================================
   ★ v1.2.5 AI 助手（悬浮球 + 侧滑面板）
   ========================================================================== */
.ai-wrap { position: fixed; right: 22px; bottom: 22px; z-index: 900; }
.ai-fab {
  position: relative; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #e5361f, #ff7a5c); color: #fff;
  font-size: 15px; font-weight: 700; letter-spacing: .5px;
  box-shadow: 0 10px 24px rgba(229, 54, 31, .38);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, box-shadow .15s;
}
.ai-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(229, 54, 31, .45); }
.ai-fab-txt { pointer-events: none; }
.ai-dot {
  position: absolute; top: 2px; right: 2px; width: 9px; height: 9px; border-radius: 50%;
  background: #c3ccd9; border: 2px solid #fff;
}
.ai-dot.on { background: #22a95c; }

.ai-panel {
  position: absolute; right: 0; bottom: 64px; width: 400px; max-width: calc(100vw - 44px);
  height: 560px; max-height: calc(100vh - 120px);
  background: #fff; border: 1px solid #e6ebf3; border-radius: 14px;
  box-shadow: 0 24px 60px rgba(16, 28, 44, .22);
  display: flex; flex-direction: column; overflow: hidden;
  animation: aiIn .18s ease-out;
}
@keyframes aiIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ai-head {
  flex: none; height: 52px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(120deg, #16325a, #e5361f 140%); color: #fff;
}
.ai-title { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.ai-sub { font-size: 10.5px; font-weight: 400; background: rgba(255, 255, 255, .18); padding: 2px 7px; border-radius: 20px; }
.ai-close { cursor: pointer; font-size: 20px; line-height: 1; opacity: .8; padding: 0 4px; }
.ai-close:hover { opacity: 1; }

.ai-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 14px 6px; background: #f7f9fc; }
.ai-msg { display: flex; margin-bottom: 10px; }
.ai-msg.me { justify-content: flex-end; }
.ai-bubble {
  max-width: 86%; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.7;
  background: #fff; color: #22304a; border: 1px solid #e8edf5; word-break: break-word;
}
.ai-msg.me .ai-bubble { background: #e5361f; color: #fff; border-color: #e5361f; }

.ai-chips {
  flex: none; display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px;
  background: #fff; border-top: 1px solid #f0f4f9;
}
.ai-chips span {
  font-size: 12px; color: #e5361f; background: #fdeceb; border: 1px solid #f8d6cf;
  padding: 4px 9px; border-radius: 20px; cursor: pointer;
}
.ai-chips span:hover { background: #e2ecff; }
.ai-input { flex: none; display: flex; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid #f0f4f9; }
.ai-input input {
  flex: 1; height: 38px; border: 1px solid #dfe6f0; border-radius: 9px; padding: 0 12px; font-size: 13px;
  background: #fbfcfe;
}
.ai-input input:focus { border-color: #e5361f; background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(229, 54, 31, .1); }
.ai-input button {
  width: 68px; height: 38px; border: 0; border-radius: 9px; cursor: pointer;
  background: #e5361f; color: #fff; font-size: 13px;
}
.ai-input button:hover { background: #c52a16; }

/* 开单草稿卡 */
.ai-draft {
  max-width: 100%; width: 100%; background: #fff; border: 1px solid #f8d6cf;
  border-radius: 10px; padding: 12px; font-size: 12.5px;
}
.ai-draft-h { font-size: 13px; font-weight: 600; color: #c52a16; margin-bottom: 8px; }
.ai-draft-row { display: flex; justify-content: space-between; padding: 3px 0; color: #55647a; }
.ai-draft-row b { color: #22304a; }
.ai-draft-total { text-align: right; margin-top: 8px; font-size: 13px; color: #55647a; }
.ai-draft-total b { font-size: 16px; color: #b32b2b; }
.ai-draft-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.ai-done { color: #17734a; background: #eefaf3; border: 1px solid #c8ecd7; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; }
.ai-dim { color: #93a1b3; font-size: 12px; }


/* ==================================================================
   v1.2.29：通用业务页 / 分析报表 / 打印模板中心
   ================================================================== */
.v29-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.v29-lb { font-size: 12px; color: var(--txt-3); }
.v29-tbl { font-size: 13px; }
.v29-tbl .td-num { text-align: right; }
.v29-empty { text-align: center; color: var(--txt-3); padding: 28px; }
.v29-pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 12px 4px 4px; color: var(--txt-3); font-size: 12px; }
.v29-stat { padding: 10px 12px; margin: 0 0 10px; border-radius: 6px;
  background: var(--line-2, #f2f5fa); font-size: 13px; }
.v29-dim { color: var(--txt-3); }
.v29-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.v29-form .form-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.v29-form .inp, .v29-form .sel, .v29-form textarea { width: 100%; box-sizing: border-box; }

/* 打印模板中心（左侧打印类型树 + 右侧模板列表） */
.pt-wrap { display: flex; gap: 14px; align-items: flex-start; }
.pt-side { width: 170px; flex: none; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; overflow: hidden; }
.pt-side-hd { padding: 12px 14px; font-weight: 600; border-bottom: 1px solid var(--line); font-size: 13px; }
.pt-node { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; cursor: pointer; font-size: 13px; }
.pt-node:hover { background: var(--line-2, #f2f5fa); }
.pt-node.on { background: var(--sb-active, #2b7fff); color: #fff; }
.pt-num { color: var(--txt-3); font-size: 12px; }
.pt-node.on .pt-num { color: #fff; }
.pt-main { flex: 1; min-width: 0; }
.pt-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pt-sub { display: flex; justify-content: space-between; align-items: center;
  margin: 12px 0; font-size: 13px; color: var(--txt-3); }
.pt-right { display: flex; gap: 6px; flex-wrap: wrap; }
.pt-tbl { font-size: 13px; }
.pt-tag { font-size: 11px; padding: 1px 6px; border-radius: 3px; background: #e8f0ff; color: #2b6cb0; }
.pt-on { color: #16a34a; }
.pt-off { color: #94a3b8; }
.btn-warn { background: #fff8e6; border-color: #f5d18a; color: #b7791f; }
.btn-warn:hover { background: #ffefcc; }
.col-acts { margin-top: 6px; display: flex; gap: 2px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .pt-wrap { flex-direction: column; }
  .pt-side { width: 100%; }
  .v29-form { grid-template-columns: 1fr; }
}


/* ==================================================================
   v1.2.30：开单体验（行内搜索选择器 / 开单表单网格）
   ================================================================== */
.ips-drop { position: fixed; background: #fff; border: 1px solid var(--line, #dfe6ef);
  border-radius: 8px; box-shadow: 0 10px 28px rgba(16,24,40,.16);
  max-height: 300px; overflow: auto; }
.ips-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ips-tbl td { padding: 8px 10px; border-bottom: 1px solid #f0f3f8;
  color: var(--txt-2, #354052); white-space: nowrap; }
.ips-tbl td.ta-right { text-align: right; }
.ips-row.on td { background: #fdeceb; color: #e5361f; }
.ips-row:hover td { background: #f6f9ff; cursor: pointer; }
.ips-empty { padding: 16px; text-align: center; color: var(--txt-3, #93a1b3); font-size: 12.5px; }
.sc-grid, .sc-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
.sc-grid .form-item, .sc-grid4 .form-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sc-grid label, .sc-grid4 label { font-size: 12px; color: var(--txt-3, #7a879b); }
.sc-grid .x-input, .sc-grid4 .x-input { width: 100%; box-sizing: border-box; }
@media (max-width: 900px) {
  .sc-grid, .sc-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   商城设置 · 基础设置（v1.2.38 重构）
   ========================================================================== */
.mall-set { max-width: 920px; }
.mall-set-group { padding: 4px 0 10px; }
.mall-set-group + .mall-set-group { border-top: 1px solid var(--line, #eef1f6); margin-top: 6px; }
.mall-set-group-h {
  display: flex; align-items: baseline; gap: 10px; margin: 14px 0 6px;
  font-size: 14px; font-weight: 650; color: var(--txt, #101828);
}
.mall-set-group-h span { font-size: 12px; font-weight: 400; color: var(--txt-3, #98a2b3); }
.mall-set-row {
  display: flex; align-items: center; gap: 16px; padding: 12px 2px;
  border-bottom: 1px dashed #eef1f6;
}
.mall-set-row:last-child { border-bottom: 0; }
.mall-set-label {
  flex: none; width: 150px; color: var(--txt-2, #475467); font-size: 13px;
  display: flex; align-items: center; gap: 4px;
}
.mall-set-label .req { color: var(--blue, #e5361f); font-style: normal; }
.mall-set-ctrl { flex: 1; min-width: 0; display: flex; align-items: center; }
.mall-set-ctrl .inp { width: 260px; max-width: 100%; }
.mall-set-foot { margin-top: 18px; display: flex; align-items: center; gap: 10px; }

/* ==========================================================================
   商城设置 · 内容装修（v1.2.38 重构：模块卡片 + 主题）
   ========================================================================== */
.mall-dec { max-width: 1100px; }
.mall-dec-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px; margin-top: 4px;
}
.mall-dec-card {
  border: 1px solid var(--line, #e7ecf3); border-radius: 12px; overflow: hidden;
  background: #fff; transition: box-shadow .16s, transform .16s, border-color .16s;
  display: flex; flex-direction: column;
}
.mall-dec-card:hover { box-shadow: 0 8px 22px rgba(31, 45, 61, .10); border-color: #d7e3f7; transform: translateY(-1px); }
.mall-dec-cover {
  position: relative; height: 120px; display: flex; align-items: center; justify-content: center;
}
.mall-dec-cover-tag {
  position: absolute; top: 8px; left: 8px; background: rgba(0, 0, 0, .42); color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 6px; backdrop-filter: blur(2px);
}
.mall-dec-cover-ph {
  color: rgba(255, 255, 255, .92); font-size: 15px; font-weight: 600; letter-spacing: 1px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .25);
}
.mall-dec-card-bd { padding: 11px 13px 4px; flex: 1; }
.mall-dec-card-name { font-size: 14px; font-weight: 600; color: var(--txt, #101828); }
.mall-dec-card-desc { font-size: 12px; color: var(--txt-3, #98a2b3); margin-top: 4px; line-height: 1.5; min-height: 36px; }
.mall-dec-card-acts { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid #f1f4f8; }
.mall-dec-card-acts .btn { flex: 1; }

.mall-theme { padding: 4px 0; }
.mall-theme-cur { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--txt-2, #475467); }
.mall-theme-dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .08); }
.mall-theme-cur b { color: var(--txt, #101828); font-family: Consolas, Monaco, monospace; letter-spacing: .5px; }
.mall-theme-pick { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.mall-theme-pick-label { font-size: 12.5px; color: var(--txt-3, #98a2b3); margin-right: 2px; }
.mall-theme-sw {
  width: 30px; height: 30px; border-radius: 8px; border: 2px solid transparent; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12); transition: transform .12s, border-color .12s;
}
.mall-theme-sw:hover { transform: scale(1.06); }
.mall-theme-sw.on { border-color: var(--txt, #101828); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue, #e5361f); }
.mall-theme-custom {
  width: 30px; height: 30px; padding: 0; border: 1px solid var(--line-2, #dbe3ee); border-radius: 8px;
  background: none; cursor: pointer;
}
.mall-theme-acts { display: flex; gap: 10px; }
.mall-dec-more { display: flex; flex-wrap: wrap; gap: 10px; }
.mall-dec-more .btn { min-width: 120px; }

.mall-dec-editor { animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.dec-back { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.dec-back-label { font-size: 14px; font-weight: 600; color: var(--txt, #101828); }

/* ==========================================================================
   商城设置 · 视觉精致化（v1.2.x，红橙体系，不改主色、不改布局结构）
   —— 仅增强视觉层次与交互反馈：分组色条 / 行 hover / 卡片阴影 / 选中态外发光
   ========================================================================== */
/* 基础设置：分组标题加左侧色条，提升层级 */
.mall-set-group-h::before {
  content: ''; width: 4px; height: 15px; border-radius: 3px; flex: none;
  background: linear-gradient(180deg, var(--blue, #e5361f), var(--x-primary-2, #c52a16));
}
/* 设置行 hover 反馈 */
.mall-set-row { transition: background .15s ease; border-radius: 9px; }
.mall-set-row:hover { background: #fafbfd; }
/* 输入控件与按钮更现代 */
.mall-set-ctrl .inp, .mall-set-ctrl .sel { height: 34px; }
.mall-set-foot .btn { height: 38px; padding: 0 22px; border-radius: 9px; font-weight: 600; }
/* 装修卡片：更柔和的立体感 + 更明显的 hover 抬升 */
.mall-dec-card { box-shadow: 0 1px 3px rgba(16, 24, 40, .05); }
.mall-dec-card:hover { box-shadow: 0 14px 30px rgba(31, 45, 61, .12); transform: translateY(-2px); }
.mall-dec-card-acts .btn { font-size: 12.5px; }
/* 主题色板选中态：双环 + 外发光，强调当前选中 */
.mall-theme-sw.on {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue, #e5361f), 0 5px 14px rgba(229, 54, 31, .30);
}
/* 更多装修项：按钮卡片化 + hover 微抬升 */
.mall-dec-more .btn {
  min-width: 132px; justify-content: center; padding: 11px 14px; border-radius: 10px;
  font-weight: 550; box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
  transition: box-shadow .15s ease, transform .15s ease;
}
.mall-dec-more .btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(31, 45, 61, .10); }
