/* ============================================================
   鼎数管家 - 全站样式（设计基调：深蓝 · 沉稳 · 现代卡片式）
   ============================================================ */
:root {
  --primary: #2f54eb;
  --primary-dark: #1d39c4;
  --primary-weak: #eef2ff;
  --navy-1: #0b1730;
  --navy-2: #12244a;
  --text: #1f2733;
  --text-2: #5b6b84;
  --text-3: #94a3bd;
  --line: #e6eaf2;
  --bg: #f4f6fa;
  --card: #ffffff;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 40px rgba(15, 30, 70, .16);
  --sidebar-w: 220px;
  --banner-h: 56px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  /* 全局禁缩放（含微信）：禁双击/捏合缩放，保留单指滚动；禁 iOS 横屏字号膨胀 */
  touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%;
}
body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
/* 滚动条：窄条胶囊款 —— 6px 宽、两端 3px 圆角（= 半宽，正好胶囊头）、轨道透明。
   参考 sh监控脚本 pages/monitor.php:238-240 的大屏细条（6px / radius 3px）。
   ⚠️ 关键：不能再在 html 上写标准属性 scrollbar-width / scrollbar-color ——
      Chrome 121+ 只要检测到它们就改用标准渲染、**忽略** ::-webkit-scrollbar-* 伪元素，
      宽度被系统值接管（实测 .frame-content 滚动条 = 15px，与写的 6px 无关）。
      只有纯 WebKit 伪元素方案才能让细条胶囊真正生效。 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c3cbdb; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9daaca; }
::-webkit-scrollbar-thumb:active { background: #8b99b8; }
::-webkit-scrollbar-corner { background: transparent; }
/* Firefox 不认 WebKit 伪元素，单独给标准 thin（Chrome 支持该选择器 → 走不到这里） */
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-width: thin; scrollbar-color: #c3cbdb transparent; }
}

/* ============================ 通用组件 ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 16px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--text); font-size: 13px; cursor: pointer;
  transition: all .18s; user-select: none; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(47, 84, 235, .28);
}
.btn-primary:hover { color: #fff; filter: brightness(1.08); box-shadow: 0 6px 16px rgba(47, 84, 235, .38); }
.btn-danger { color: var(--err); }
.btn-danger:hover { border-color: var(--err); color: var(--err); background: #fef2f2; }
.btn-del { background: #fef2f2; border-color: #fecaca; color: var(--err); }
.btn-del:hover { background: #fee2e2; border-color: var(--err); color: var(--err); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--primary-weak); }

.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.form-item label b { color: var(--err); font-weight: normal; margin-left: 2px; }
/* 类别两级下拉（一级 → 二级）：宽屏并排，窄屏上下堆叠；二级被隐藏时一级自动占满整行 */
.cat-two { display: flex; gap: 10px; }
.cat-two .input { flex: 1 1 0; min-width: 0; }
/* 下拉面板（.pgsel）：普通字段宽屏仍是原生 select（触发器 display:none，窄屏规则在 ≤768 段），
   级联类别字段（.cat-two）全宽屏都走级联触发器（2026-10-20 起 PC 也不再回退双 select 并排）。
   面板挂 body 末尾，z-index 必须高于 .modal-mask(90) —— 类别下拉大多在弹窗里点开 */
.pgsel-wrap { position: relative; display: block; min-width: 0; }
.cat-two .pgsel-wrap { flex: 1 1 0; min-width: 0; }
.filter-bar .pgsel-wrap { width: auto; min-width: 150px; }
.modal-body .pgsel-wrap { width: 100%; }
/* 级联框内的两个原生 select（各带 .pgsel-wrap）整体收起：全宽屏只留一个级联触发器 */
.pgsel-casc-box .pgsel-wrap { display: none; }
.pgsel-trigger {
  display: none;               /* 宽屏不接管普通字段；级联触发器见下（全宽屏常显） */
  align-items: center; gap: 8px; width: 100%; min-height: 44px;
  padding: 10px 12px; font-size: 16px; font-family: inherit; color: var(--text); text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.pgsel-txt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pgsel-trigger.is-ph .pgsel-txt { color: var(--text-3); }
.pgsel-ar { flex: none; font-size: 11px; color: var(--text-3); transition: transform .2s ease; }
.pgsel-trigger.is-open { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 84, 235, .12); }
.pgsel-trigger.is-open .pgsel-ar { transform: rotate(180deg); }
/* 级联触发器（.cat-two 两个类别 select 合成一个字段）：PC 与移动端同一套左右分层面板 */
.pgsel-cascade-trigger { display: flex; }
/* 级联面板两列：左列一级 / 右列二级（page.js pgselCascadeInit 接管，全宽屏生效） */
.pgsel-casc { display: flex; flex: 1 1 auto; min-height: 0; }
.pgsel-col { flex: 1 1 50%; min-width: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pgsel-col + .pgsel-col { border-left: 1px solid var(--line); background: #fafbfe; }
.pgsel-col .pgsel-opt { font-size: 14px; min-height: 44px; padding: 9px 10px; }
.pgsel-casc-empty { padding: 22px 12px; font-size: 13px; color: var(--text-3); text-align: center; }
.pgsel-col { scrollbar-width: none; -ms-overflow-style: none; }
.pgsel-col::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; }
.pgsel-mask {
  position: fixed; inset: 0; z-index: 120; display: none;
  background: rgba(13, 23, 48, .38); opacity: 0; transition: opacity .2s ease;
  touch-action: none; -webkit-tap-highlight-color: transparent;
}
.pgsel-mask.show { display: block; }
.pgsel-mask.is-open { opacity: 1; }
.pgsel-panel {
  position: fixed; z-index: 1; background: #fff; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .20); overflow: hidden;
  display: flex; flex-direction: column; max-height: 320px;
  opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top center;
  transition: opacity .16s ease, transform .2s cubic-bezier(.25, .8, .4, 1);
}
.pgsel-panel.is-up { transform: translateY(8px) scale(.98); transform-origin: bottom center; }
.pgsel-mask.is-open .pgsel-panel { opacity: 1; transform: none; }
.pgsel-head {
  flex: none; padding: 9px 14px; font-size: 12.5px; color: var(--text-2);
  background: #fafbfe; border-bottom: 1px solid var(--line);
}
.pgsel-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pgsel-opt {
  display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 14px;
  font-size: 15px; color: var(--text); border-bottom: 1px solid #f2f4f8; cursor: pointer;
}
.pgsel-opt:last-child { border-bottom: 0; }
.pgsel-opt:active { background: #f2f5ff; }
.pgsel-opt.is-active { color: var(--primary); font-weight: 600; background: rgba(47, 84, 235, .06); }
.pgsel-opt.is-dis { color: var(--text-3); opacity: .6; cursor: default; }
.pgsel-opt-t { flex: 1 1 auto; min-width: 0; word-break: break-all; }
.pgsel-ck { flex: none; font-style: normal; font-size: 15px; color: var(--primary); opacity: 0; }
.pgsel-opt.is-active .pgsel-ck { opacity: 1; }
/* 紧凑位下拉面板（.pgsel-tight，select 带 data-pgsel-tight）：选项行收紧，
   配合 page.js 的 96px 面板宽（常规面板 160 起，紧凑触发器旁展开会显得「下拉太大」） */
.pgsel-panel.pgsel-tight .pgsel-opt { min-height: 38px; padding: 7px 10px; font-size: 13.5px; gap: 6px; }
.pgsel-panel.pgsel-tight .pgsel-ck { font-size: 13px; }
/* 附件取文件入口：拍照 / 图片 / 文件（替代原生 file 控件，移动端各内核行为不一） */
.att-pick { display: flex; gap: 8px; margin-bottom: 8px; }
.att-pick .btn { flex: 1 1 0; min-width: 84px; height: 36px; white-space: nowrap; }
/* 「选择文件」底部动作面板（移动端）：单入口 + 底部弹出，遮罩 / 200ms 上滑 / 点外部关闭 */
.att-sheet-mask {
  position: fixed; inset: 0; z-index: 130; display: none;
  background: rgba(13, 23, 48, .45); opacity: 0; transition: opacity .2s ease;
  touch-action: none; -webkit-tap-highlight-color: transparent;
}
.att-sheet-mask.show { display: block; }
.att-sheet-mask.is-open { opacity: 1; }
.att-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; background: #fff;
  border-radius: 16px 16px 0 0; padding: 6px 12px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(15, 23, 42, .18);
  transform: translateY(100%); transition: transform .22s cubic-bezier(.25, .8, .4, 1);
}
.att-sheet-mask.is-open .att-sheet { transform: none; }
.att-sheet-t { text-align: center; font-size: 13px; color: var(--text-3); padding: 10px 0 12px; }
.att-sheet-list { display: flex; flex-direction: column; }
.att-sheet-list button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 14px;
  font-size: 16px; font-family: inherit; color: var(--text); background: #fff; border: 0;
  border-radius: 10px; cursor: pointer; text-align: left;
}
.att-sheet-list button + button { border-top: 1px solid var(--line); }
.att-sheet-list button:active { background: var(--primary-weak); }
.att-sheet-x {
  width: 100%; min-height: 48px; margin-top: 8px; font-size: 15px; font-family: inherit;
  color: var(--text-2); background: #f4f6fa; border: 0; border-radius: 10px; cursor: pointer;
}
.att-sheet-x:active { background: #e9edf5; }
.input, select.input, textarea.input {
  width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13px; color: var(--text); background: #fff;
  outline: none; transition: border-color .15s, box-shadow .15s; font-family: inherit;
}
textarea.input { height: auto; padding: 8px 12px; resize: vertical; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 84, 235, .12); }
/* 只读字段（经办人等系统锁定项）：灰底弱化，不响应焦点光环 */
.input[readonly] { background: #f4f6fa; color: var(--text-2); cursor: default; }
.input[readonly]:focus { border-color: var(--line); box-shadow: none; }
.form-tip { font-size: 12px; color: var(--text-3); margin-top: 5px; }
/* 多附件上传：已选文件条（B 文件列表式，双端共用） */
.att-fi {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: #fafbff; margin-top: 7px;
}
.att-fi .att-ico { font-size: 15px; flex: none; }
.att-fi .att-fi-nm { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-fi .att-fs { flex: none; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.att-fi .att-del { flex: none; color: var(--text-3); font-size: 12px; padding: 3px 5px; text-decoration: none; }
.att-fi .att-del:hover { color: var(--err); }
/* 详情/弹窗内的附件预览条（含预览按钮，C 入口） */
.att-view {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 9px; margin-top: 7px;
}
.att-view .att-ico { font-size: 15px; flex: none; }
.att-view .att-fi-nm { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-view .att-fs { flex: none; font-size: 11px; color: var(--text-3); }
.att-view .att-pv { flex: none; font-size: 12px; color: var(--primary); text-decoration: none; font-weight: 600; }

/* 悬浮提示（与监控项目一致）：label 后的小圆问号，悬停显示说明 */
.tip-icon {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 6px; border-radius: 50%;
  background: #c3cbdb; color: #fff; font-size: 11px; font-weight: 700;
  cursor: help; vertical-align: 2px; line-height: 1;
}
.tip-icon:hover { background: var(--primary); }
/* 说明气泡：隐藏态必须 display:none —— visibility:hidden 的绝对定位元素仍参与文档
   可滚动溢出（300px 宽的隐藏气泡会把移动端页面撑出看不见的横向滑动） */
.tip-icon .tip-text {
  display: none; position: absolute; left: -6px; top: calc(100% + 8px);
  width: 300px; max-width: 70vw; background: rgba(51, 65, 85, .9); color: #fff;
  padding: 10px 12px; border-radius: 8px; font-size: 12px; font-weight: 400;
  line-height: 1.6; text-align: left; white-space: normal;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3); z-index: 50;
}
.tip-icon .tip-text::after {
  content: ''; position: absolute; left: var(--tip-arrow-x, 14px); bottom: calc(100% - 1px); transform: translateX(-50%);
  border: 6px solid transparent; border-bottom-color: rgba(51, 65, 85, .9);
}
/* 下方放不下（page.js tipClamp 加 .tip-up）：气泡翻到图标上方，箭头翻到气泡下缘朝上 */
.tip-icon.tip-up .tip-text { top: auto; bottom: calc(100% + 8px); }
.tip-icon.tip-up .tip-text::after {
  bottom: auto; top: calc(100% - 1px);
  border-bottom-color: transparent; border-top-color: rgba(51, 65, 85, .9);
}
.tip-icon:hover .tip-text, .tip-icon.tip-open .tip-text { display: block; animation: tip-in .18s ease; }
@keyframes tip-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
/* 页面标题旁（.page-head）的问号：比表单 label 场景略大，对齐 18px 的 h2 */
.page-head .tip-title { width: 17px; height: 17px; font-size: 12px; vertical-align: 4px; }
/* 气泡里的富文本提示（如枚举页单位名 <b style="color:...">）统一换成深色底上的亮色，
   inline style 特异性高，必须 !important */
.tip-icon .tip-text b[style] { color: #7dd3fc !important; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }

.table-wrap { overflow-x: auto; }
/* 列宽平均分表（枚举管理）：排序列保持 inline 宽度（60px），其余列在 table-layout:fixed 下平分；
   移动端回退 auto 自然列宽——17 位编码在窄屏平分后会被 nowrap 撑出单元格 */
.tb-fixed-avg { table-layout: fixed; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
/* PC 端恢复自然列宽：colgroup inline 宽度是为移动端 fixed 布局（≤768）标定的，
   PC auto 布局下这些声明宽会挤压内容列（窄窗口下名称/备注列被压成竖条）——PC 端一律忽略 */
@media (min-width: 769px) {
  .table-wrap.m-table col { width: auto !important; }
  /* 报销表（mt-rb）两列例外：审批时间按实际内容宽（Y-m-d H:i:s = 142px，auto 布局会把它
     拉到 ~264px 白占一截），附件列 📎N 加宽到 88px 更醒目；其余列仍走自然布局 */
  .table-wrap.m-table.mt-rb col:nth-child(5) { width: 88px !important; }
  .table-wrap.m-table.mt-rb col:nth-child(8) { width: 142px !important; }
}
/* 表格样式与参考项目（访问日志页）一致：全边框网格 + 浅灰表头，内容与表头均居中 */
.tb th, .tb td { border: 1px solid #eee; padding: 6px 10px; font-size: 13px; text-align: center; }
.tb th { background: #fafafa; font-weight: 500; color: #666; white-space: nowrap; }
.tb tbody tr { transition: background .12s; }
.tb tbody tr:hover { background: #f8faff; }
.tb .ops { white-space: nowrap; }
.tb .ops a, .tb .ops .lk { margin-right: 10px; cursor: pointer; font-size: 13px; }

/* 账户余额表（fund_report.php）桌面列宽：账户名 28% 主列，金额列放宽到 170px。
   移动端（≤860）由下方 m-table 区域内的 .mt-acc 覆盖为小字号紧凑布局 */
.fund-acc .c-seq { width: 64px; }
.fund-acc .c-acc { width: 28%; }
.fund-acc .c-type { width: 110px; }
.fund-acc .c-open, .fund-acc .c-cur { width: 170px; }
.fund-acc .c-st { width: 110px; }

.tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; line-height: 18px; }
.tag-ok { background: #ecfdf3; color: var(--ok); }
.tag-off { background: #f2f4f7; color: var(--text-3); }
.tag-warn { background: #fff7e8; color: var(--warn); }
.tag-err { background: #fef2f2; color: var(--err); }
.tag-blue { background: var(--primary-weak); color: var(--primary); }

/* 分页器（100% 对齐参考项目访问日志页样式） */
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 16px; padding: 0 14px 14px; flex-wrap: nowrap; font-size: 13px; color: #666; }
.pager-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 28px;
  padding: 0 10px; border-radius: 8px; font-size: 19px; line-height: 1; text-decoration: none;
  color: #4080ff; border: 1px solid #dce0e8; cursor: pointer; user-select: none; transition: all .2s;
  background: linear-gradient(to bottom, #fff, #f8f9fb); white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04); font-weight: 500; font-family: inherit;
}
.pager-btn:hover { background: linear-gradient(to bottom, #eaf2ff, #dde9ff); border-color: #4080ff; box-shadow: 0 2px 6px rgba(64, 128, 255, .12); }
.pager-btn:active { box-shadow: inset 0 1px 2px rgba(0, 0, 0, .08); transform: translateY(1px); }
.pager-btn.disabled { color: #c0c4cc; cursor: not-allowed; border-color: #eee; pointer-events: none; background: #fafafa; box-shadow: none; }
.pager-btn-go { font-size: 12px; font-weight: 600; letter-spacing: 1px; }
.pager-text { color: #666; font-size: 13px; white-space: nowrap; }
.pager-info { color: #999; font-size: 13px; white-space: nowrap; }
.pager-input {
  width: 46px; height: 28px; padding: 0 6px; border: 1px solid #dce0e8; border-radius: 8px;
  font-size: 13px; text-align: center; outline: none; transition: all .2s;
  background: linear-gradient(to bottom, #fff, #f8f9fb); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); font-family: inherit;
}
.pager-input:focus { border-color: #4080ff; box-shadow: 0 0 0 3px rgba(64, 128, 255, .1); background: #fff; }

.empty { text-align: center; padding: 46px 0 56px; color: var(--text-3); font-size: 13px; }
.empty .ico { font-size: 40px; margin-bottom: 10px; opacity: .6; }
.empty .ico img { width: 40px; height: 40px; display: block; margin: 0 auto; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(13, 23, 48, .45); z-index: 90;
  display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s; backdrop-filter: blur(2px);
}
.modal-mask.show { display: flex; opacity: 1; }
.modal {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 440px; max-width: calc(100vw - 40px); margin-top: 0;
  animation: pop .22s cubic-bezier(.2, .9, .3, 1.2); max-height: 84vh; display: flex; flex-direction: column;
}
@keyframes pop { from { transform: translateY(14px) scale(.97); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px 0; }
.modal-head h3 { font-size: 16px; color: var(--text); }
.modal-head .x { cursor: pointer; color: var(--text-3); font-size: 20px; line-height: 1; padding: 4px; }
.modal-head .x:hover { color: var(--text); }
.modal-body { padding: 18px 22px; overflow: hidden auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 20px; }

/* 原生日期控件在 iOS Safari 有内部最小宽度，强制 min-width:0 让 width:100% 真正生效 */
input[type="date"], input[type="datetime-local"] {
  min-width: 0 !important; width: 100%; max-width: 100%;
}
/* iOS 专属（由 page.js UA 探测加 .ios 类，只影响 Safari）：去原生外观后
   日期框与其它输入框等宽、文本居中；type=date 行为不变，点按仍唤起原生日期选择器 */
.ios input[type="date"], .ios input[type="datetime-local"] {
  -webkit-appearance: none; appearance: none;
  display: block; text-align: center;
}
.toast-wrap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  padding: 9px 20px; border-radius: 8px; font-size: 13px; color: #fff; background: rgba(23, 36, 66, .92);
  box-shadow: var(--shadow-lg); animation: drop .25s; max-width: 70vw;
}
.toast.ok { background: rgba(22, 163, 74, .95); }
.toast.err { background: rgba(220, 38, 38, .95); }
.toast.warn { background: rgba(217, 119, 6, .95); }
@keyframes drop { from { transform: translateY(-12px); opacity: 0; } }

/* 确认弹窗 */
.confirm-box { width: 360px; }
.confirm-box .modal-body { font-size: 14px; color: var(--text); padding-top: 6px; }

/* 工具类 */
.flex { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.grow { flex: 1; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.mono { font-family: Consolas, "Courier New", monospace; }
.muted { color: var(--text-2); } .muted2 { color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }

/* ============================================================
   框架页（左菜单 + banner + 内容区）—— 侧边栏配色与监控项目对齐
   ============================================================ */
.frame-sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); z-index: 20;
  background: #0f172a;
  display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none; /* 隐藏滚动条（保留滚轮/触摸滚动） */
}
.frame-sidebar::-webkit-scrollbar { display: none; }
.brand { display: flex; align-items: center; gap: 10px; height: var(--banner-h); flex: none; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 17px;
}
.brand .t { color: #fff; font-size: 15px; font-weight: 600; white-space: nowrap; }
.brand .logo-img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex: none; }
.login-brand .logo-img { width: 46px; height: 46px; border-radius: 13px; object-fit: cover; flex: none; }

.nav { flex: 1; padding: 12px 0; }
/* 一级菜单行盒模型：叶子项（公司概况/审批事项）与分组标题（资金管理等）共用同一条规则，
   图标/文字尺寸、内边距、3px 左边框占位完全一致 —— 保证所有一级菜单视觉对齐（防止两边各自漂移） */
.nav-item,
.nav-group-title {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  color: #94a3b8; font-size: 14px; cursor: pointer;
  transition: all .15s; border-left: 3px solid transparent; user-select: none; white-space: nowrap;
}
.nav-item svg,
.nav-group-title svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; opacity: .9; }
.nav-item:hover,
.nav-group-title:hover { background: rgba(255,255,255,.05); color: #e2e8f0; }
.nav-item.on { background: rgba(37,99,235,.15); color: #fff; border-left-color: #2563eb; }
/* 审批事项菜单红点（深色侧栏内，有待审批时显示，hover 见数量 title） */
.nav-item { position: relative; }
.nav-item .nav-badge {
  position: absolute; right: 12px; top: 13px;
  width: 8px; height: 8px; border-radius: 50%; background: #e5484d;
  box-shadow: 0 0 0 3px rgba(229, 72, 77, .22);
}
/* 审批事项为一级分组时：红点挂分组标题，right 避开 ::after 展开箭头（约占右侧 20~28px） */
.nav-group-title { position: relative; }
.nav-group-title .nav-badge {
  position: absolute; right: 30px; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 50%; background: #e5484d;
  box-shadow: 0 0 0 3px rgba(229, 72, 77, .22);
}
/* 分组标题：点击展开/收起（手风琴），箭头随状态旋转；盒模型已由上方共用规则保证与一级菜单一致 */
.nav-group-title span { flex: 1; }
.nav-group-title::after {
  content: ''; width: 0; height: 0; flex: none;
  border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor;
  transition: transform .18s;
}
.nav-group.open .nav-group-title::after { transform: rotate(180deg); }
/* 子菜单展开动画：max-height 过渡，展开收起都平滑 */
.nav-sub-list { overflow: hidden; max-height: 0; transition: max-height .25s ease, opacity .2s ease; opacity: 0; }
.nav-group.open .nav-sub-list { max-height: 420px; opacity: 1; }
.nav-sub { padding-left: 34px; }
.frame-sidebar-foot {
  padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.06);
  font-size: 12px; color: #64748b;
}
.frame-sidebar-foot .foot-copy { white-space: nowrap; letter-spacing: .2px; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   PWA 安装（桌面端）：侧栏左下角入口 + 左下角安装卡片
   卡片结构与参考站同款：白底圆角浮层、图标 + 站点名 + 域名、描述、全宽渐变按钮；
   配色沿用本站品牌（--primary 渐变），不引入第二套色板
   ============================================================ */
.pwa-entry {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin-bottom: 10px; padding: 9px 10px; border: none; border-radius: 8px;
  background: rgba(255, 255, 255, .06); color: #b6c3d9;
  font-size: 13px; cursor: pointer; transition: all .15s; text-align: left;
}
.pwa-entry svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pwa-entry:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.pwa-entry span { flex: 1; }

.pwacard {
  display: none; position: fixed; left: 12px; bottom: 12px; z-index: 90;
  width: 304px; max-width: calc(100vw - 24px); padding: 16px;
  border-radius: 16px; background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  animation: pwacardIn .45s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes pwacardIn { from { opacity: 0; transform: translateY(18px) scale(.95); } }
.pwacard_head { display: flex; align-items: center; gap: 10px; }
.pwacard_icon {
  flex: none; width: 45px; height: 45px; padding: 4px; object-fit: cover;
  border-radius: 13px; background: var(--bg);
  border: 1px solid var(--line); box-shadow: 0 4px 10px rgba(15, 30, 70, .14);
}
.pwacard_title { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pwacard_title .name { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwacard_title .domain { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwacard_close {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 27px; height: 27px; border-radius: 999px; cursor: pointer; color: var(--text-3);
  transition: all .3s ease;
}
.pwacard_close:hover { background: var(--bg); color: var(--text-2); transform: rotate(90deg); }
.pwacard_close svg { width: 13px; height: 13px; fill: currentColor; }
.pwacard_desc { margin: 11px 0 14px; font-size: 13px; line-height: 1.65; color: var(--text-2); }
.pwa_btn {
  width: 100%; padding: 9px 0; border: none; border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-size: 14px; letter-spacing: 2.4px; cursor: pointer;
  box-shadow: 0 5px 14px rgba(47, 84, 235, .35);
  transition: transform .3s ease, box-shadow .3s ease, filter .3s ease;
}
.pwa_btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(47, 84, 235, .45); filter: brightness(1.06); }
.pwa_btn:active { transform: translateY(0); }
.pwa_btn.is-done { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 5px 14px rgba(22, 163, 74, .35); pointer-events: none; }
.pwa_btn.is-fallback { background: var(--bg); color: var(--text-2); box-shadow: none; }
.pwa_btn.is-loading { pointer-events: none; filter: brightness(.97); }
.pwa_btn.is-loading::before {
  content: ''; display: inline-block; width: .8em; height: .8em; margin-right: .45em;
  vertical-align: -.08em; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  border-radius: 50%; animation: pwaspin .7s linear infinite;
}
@keyframes pwaspin { to { transform: rotate(360deg); } }
/* 小屏：卡片改底部通栏（JS 内联定位在 ≤768 让位给这里的 !important） */
@media (max-width: 768px) {
  .pwacard { left: 12px !important; right: 12px; bottom: 12px !important; width: auto; }
  /* 窄屏类别两级下拉上下堆叠，各占一行更好点 */
  .cat-two { flex-direction: column; gap: 8px; }
  /* 「安装应用」是桌面端入口（装到电脑桌面），手机端不显示（移动端走浏览器自身的添加到主屏幕） */
  .pwa-entry { display: none; }
}

/* 外框滚动模型与 Ping监控（sh监控脚本）对齐：
   banner 固定高度 + 内容区 flex:1 由 iframe 内部滚动，
   body 自身不产生滚动条 → 滚动条只出现在 banner 下边，不贯穿 banner */
.frame-main {
  margin-left: var(--sidebar-w);
  height: 100vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.frame-banner {
  position: relative; z-index: 10; height: var(--banner-h); flex: none;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 20px; gap: 14px;
}
.banner-title { font-size: 15px; font-weight: 600; color: var(--text); }
.banner-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
/* 顶部时钟（初值 PHP 渲染 + JS 按服务器时间走秒）：PC only，移动端不显示；
   tabular-nums 等宽数字，秒跳动时宽度不抖 */
.banner-clock { flex: none; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 单位切换下拉：整块禁选文字——点选/拖拽触发时不会把单位名选成蓝底，
   双击误选、跨设备拖选的情况一并杜绝（user-select 继承，子元素全覆盖） */
.company-switch { position: relative; -webkit-user-select: none; user-select: none; }
.company-static { display: flex; align-items: center; height: 34px; padding: 0 12px; font-size: 13px; color: var(--text-2); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-switch .cur {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 13px;
  background: #fff; transition: border-color .15s; max-width: 220px;
}
.company-switch .cur:hover { border-color: var(--primary); }
.company-switch .cur .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-switch .cur svg { width: 14px; height: 14px; stroke: var(--text-3); fill: none; stroke-width: 2; transition: transform .2s; }
.company-switch.open .cur svg { transform: rotate(180deg); }
.company-switch .list {
  position: absolute; right: 0; top: 42px; width: 240px; background: #fff; border-radius: 10px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 6px; display: none; z-index: 30;
}
.company-switch.open .list { display: block; animation: drop .18s; }
.company-switch .list .it {
  padding: 9px 12px; border-radius: 7px; cursor: pointer; font-size: 13px;
  display: flex; justify-content: space-between; align-items: center; color: var(--text);
}
.company-switch .list .it:hover { background: var(--primary-weak); }
.company-switch .list .it.on { color: var(--primary); background: var(--primary-weak); font-weight: 500; }

.avatar-wrap { position: relative; }
.avatar {
  display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 5px 8px;
  border-radius: 8px; transition: background .15s;
}
.avatar:hover { background: #f2f5fa; }
.avatar .ava {
  width: 30px; height: 30px; border-radius: 50%; overflow: hidden;
  background: #f2f4f7;
  display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.avatar .ava img { width: 100%; height: 100%; display: block; }
.avatar .nm { font-size: 13px; color: var(--text); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu {
  position: absolute; right: 0; top: 44px; width: 160px; background: #fff; border-radius: 10px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 6px; display: none; z-index: 30;
}
.avatar-wrap.open .user-menu { display: block; animation: drop .18s; }
.user-menu .it { padding: 9px 12px; border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--text); }
.user-menu .it:hover { background: var(--primary-weak); color: var(--primary); }
.user-menu .it.out { color: var(--err); }
.user-menu .it.out:hover { background: #fef2f2; color: var(--err); }

/* 内容区：flex 填满 banner 以下的剩余空间，且是**唯一的滚动容器**（overflow-y: auto）。
   与 sh监控脚本 app.css:167 同款：iframe 被 JS 撑到内容高度，滚动交给本层，
   → 只有一条外框滚动条，且它只出现在 banner 下方（iframe 内部不再有滚动条） */
.frame-content { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; }
#pageFrame { width: 100%; height: 100%; border: 0; display: block; background: transparent; }
.frame-loading {
  position: fixed; top: var(--banner-h); left: var(--sidebar-w); right: 0; height: 2px; z-index: 15;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  background-size: 40% 100%; background-repeat: no-repeat; animation: slide 1s infinite linear;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.frame-loading.show { opacity: 1; }
@keyframes slide { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* 密码修改弹窗里的强度提示 */
.pwd-level { display: flex; gap: 4px; margin-top: 6px; }
.pwd-level i { height: 4px; flex: 1; background: #e6eaf2; border-radius: 2px; transition: background .2s; }

/* ============================================================
   登录页（左右布局）
   ============================================================ */
.login-page { display: flex; min-height: 100vh; background: #fff; position: relative; }
.login-left {
  flex: 1.2; position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(160deg, #0a1428 0%, #0e1e40 55%, #16346b 100%);
  display: flex; flex-direction: column; justify-content: space-between; padding: 52px 60px;
}
.login-left::before, .login-left::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(10px); pointer-events: none;
}
.login-left::before { width: 480px; height: 480px; right: -160px; top: -160px; background: radial-gradient(circle, rgba(59, 130, 246, .22), transparent 65%); }
.login-left::after { width: 420px; height: 420px; left: -140px; bottom: -160px; background: radial-gradient(circle, rgba(47, 84, 235, .28), transparent 65%); }
.login-brand { display: flex; align-items: center; gap: 14px; }
.login-brand .logo {
  width: 46px; height: 46px; border-radius: 13px; font-size: 23px;
  background: linear-gradient(135deg, #3b82f6, #2f54eb);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  box-shadow: 0 8px 24px rgba(47, 84, 235, .5);
}
.login-brand .t { font-size: 22px; font-weight: 700; letter-spacing: 2px; }
.login-brand .s { font-size: 12px; color: rgba(255, 255, 255, .5); letter-spacing: 4px; margin-top: 3px; }
.login-slogan { position: relative; z-index: 1; }
.login-slogan h1 { font-size: 30px; font-weight: 700; letter-spacing: 2px; line-height: 1.5; margin-bottom: 14px; }
.login-slogan p { color: rgba(255, 255, 255, .55); font-size: 14.5px; letter-spacing: 1px; }
.login-feats { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 18px; }
.login-feats .f { display: flex; gap: 14px; align-items: flex-start; }
.login-feats .f .ic {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.login-feats .f b { display: block; font-size: 14.5px; margin-bottom: 3px; font-weight: 600; }
.login-feats .f span { color: rgba(255, 255, 255, .5); font-size: 12.5px; }
.login-copy { position: relative; z-index: 1; font-size: 12px; color: rgba(255, 255, 255, .3); letter-spacing: 1px; }

/* 移动端品牌头/页脚：桌面端隐藏，仅 ≤860px 显示（见下方媒体查询） */
.login-mobile-head { display: none; }
.login-mobile-foot { display: none; }

.login-right { width: 520px; display: flex; align-items: center; justify-content: center; padding: 40px; position: relative; }
.login-box { width: 360px; }
.login-box h2 { font-size: 24px; color: var(--text); margin-bottom: 8px; letter-spacing: 1px; }
.login-box .sub { color: var(--text-3); font-size: 13.5px; margin-bottom: 34px; }
.login-box .field { margin-bottom: 20px; }
.login-box .field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.login-box .field .inp {
  position: relative; display: flex; align-items: center;
}
.login-box .field .inp svg {
  position: absolute; left: 13px; width: 16px; height: 16px; stroke: var(--text-3);
  fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none;
}
.login-box .field input {
  width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0 14px 0 40px; font-size: 14px; outline: none;
  transition: border-color .18s, background .18s, box-shadow .18s;
  background: #f8fafc; color: var(--text); font-family: inherit;
}
.login-box .field input:focus {
  border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(47, 84, 235, .1);
}
/* 密码框尾巴上的眼睛：默认隐藏态显示睁眼（点它看明文），明文态换划线（点它藏回去）。
   只有带 .pwd 的密码框加右内边距让位；账号框不受影响 */
.login-box .field input.pwd { padding-right: 42px; }
/* password 圆点比明文字母瘦（实测推进 7.05px vs 8.88px/字符），点径又小 → 显得稀。
   加 0.13em（=实测差 1.83px @14px 字号）把点距拉平到字母距；明文态属性选择器自动
   复位成 normal，不用 JS 参与 */
.login-box .field input.pwd { letter-spacing: 0.13em; }
.login-box .field input.pwd[type="text"] { letter-spacing: normal; }
.login-box .field .inp .pwd-eye {
  position: absolute; right: 7px; width: 32px; height: 32px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 8px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.login-box .field .inp .pwd-eye svg {
  position: static; width: 17px; height: 17px;
  stroke: var(--text-3); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.login-box .field .inp .pwd-eye:hover svg { stroke: var(--text-2); }
.login-box .field .inp .pwd-eye:active svg { stroke: var(--primary); }
.login-box .field .inp .pwd-eye .eye-slash { display: none; }
.login-box .field .inp .pwd-eye.on .eye { display: none; }
.login-box .field .inp .pwd-eye.on .eye-slash { display: block; }
.login-btn {
  width: 100%; height: 46px; border: 0; border-radius: 10px; margin-top: 6px;
  background: linear-gradient(135deg, #3b6cf6, #2f54eb); color: #fff; font-size: 15px;
  letter-spacing: 6px; cursor: pointer; box-shadow: 0 8px 20px rgba(47, 84, 235, .35);
  transition: all .2s; font-family: inherit;
}
.login-btn:hover { filter: brightness(1.08); box-shadow: 0 10px 26px rgba(47, 84, 235, .45); transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); }
.login-btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
/* 登录页错误提示：右上角抽屉式通知（从右侧滑入 → 多条纵向堆叠 → 数秒后渐隐消失）。
   只服务登录页；内部页面（iframe 子页）的提示不走这里，保持原状。
   .show/.hide 同特异性、.hide 在后 —— 两个类同时在时收起来的状态赢 */
.login-notify-wrap {
  position: fixed; top: 18px; right: 18px; z-index: 1000;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
  pointer-events: none;   /* 容器不挡页面，只有通知本体可交互 */
}
.login-notify {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px;
  min-width: 250px; max-width: 380px; padding: 11px 12px 11px 14px;
  background: #fff; border: 1px solid #fecaca; border-left: 4px solid var(--err);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
  transform: translateX(calc(100% + 26px)); opacity: 0;
  transition: transform .3s cubic-bezier(.2, .9, .4, 1.1), opacity .3s;
}
.login-notify.show { transform: none; opacity: 1; }
.login-notify.hide { transform: translateX(calc(100% + 26px)); opacity: 0; }
.login-notify .n-ic {
  flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%;
  background: #fef2f2; color: var(--err); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.login-notify .n-tx { flex: 1; min-width: 0; font-size: 13px; color: var(--text); line-height: 1.55; }
.login-notify .n-x {
  flex: none; align-self: flex-start; padding: 2px 4px; border-radius: 5px;
  color: var(--text-3); font-size: 14px; line-height: 1; cursor: pointer;
}
.login-notify .n-x:hover { background: #f1f5f9; color: var(--text); }
@media (max-width: 860px) {
  /* 手机登录页：通知通栏（左右各留 12px），避免 380px 上限把窄屏挤爆 */
  .login-notify-wrap { top: 12px; right: 12px; left: 12px; align-items: stretch; }
  .login-notify { min-width: 0; max-width: none; }
}
.login-foot { margin-top: 40px; text-align: center; color: var(--text-3); font-size: 12px; }
.login-beian { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: #94a3b8; font-size: 12px; letter-spacing: .5px; }
@media (max-width: 860px) {
  .login-page { flex-direction: column; background: linear-gradient(180deg, #3b6cf6 0%, #2f54eb 160px, #eef2fb 460px); min-height: 100vh; min-height: 100dvh; }
  .login-left { display: none; }
  .login-right { flex: 1; width: 100%; padding: 0 16px; align-items: center; }
  .login-mobile-head {
    display: block; position: relative; color: #fff; overflow: hidden; text-align: center;
    background: none; padding: 42px 22px 30px;
  }
  .login-mobile-head::before, .login-mobile-head::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(8px);
  }
  .login-mobile-head::before { width: 240px; height: 240px; right: -90px; top: -110px; background: radial-gradient(circle, rgba(59, 130, 246, .35), transparent 65%); }
  .login-mobile-head::after { width: 200px; height: 200px; left: -70px; bottom: -120px; background: radial-gradient(circle, rgba(47, 84, 235, .4), transparent 65%); }
  .lm-brand { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 12px; }
  .lm-brand .logo-img { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; }
  .lm-brand .logo {
    width: 42px; height: 42px; border-radius: 12px; font-size: 21px; font-weight: 700;
    background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center;
  }
  .lm-brand .t { font-size: 20px; font-weight: 700; letter-spacing: 2px; text-align: left; }
  .lm-brand .s { font-size: 11px; color: rgba(255, 255, 255, .6); letter-spacing: 3px; margin-top: 2px; text-align: left; }
  .lm-tag { position: relative; z-index: 1; margin-top: 14px; font-size: 13px; color: rgba(255, 255, 255, .8); letter-spacing: 1px; }
  .login-box {
    width: 100%; max-width: 380px; margin: -18px auto 0; position: relative; top: -28px; z-index: 2;
    background: #fff; border-radius: 18px; padding: 26px 22px 24px;
    box-shadow: 0 16px 40px rgba(15, 30, 64, .14);
  }
  .login-box .sub { margin-bottom: 22px; }
  .login-foot { margin-top: 22px; }
  .login-mobile-foot {
    display: block; text-align: center; color: var(--text-3); font-size: 12px; letter-spacing: .5px;
    padding: 0 20px calc(18px + env(safe-area-inset-bottom, 0px));
  }
  .login-beian { position: static; padding-bottom: 14px; }
}

/* ============================================================
   登录方式切换（账号 / 扫码登录，2026-10-20）
   移动端（≤768）只允许账号登录：不渲染切换器、扫码面板也禁止展示
   （用户明确要求「移动端的扫码登录禁止选择，只能账号登录」）
   ============================================================ */
.login-tabs {
  display: flex; padding: 3px; margin-bottom: 24px;
  background: #f1f5f9; border-radius: 10px;
}
.login-tab {
  flex: 1; height: 36px; border: 0; border-radius: 8px; background: transparent;
  font-size: 13.5px; color: var(--text-2); cursor: pointer; font-family: inherit;
  letter-spacing: 1px; transition: all .18s;
}
.login-tab.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }
@media (max-width: 768px) {
  .login-tabs { display: none !important; }
  #qrPanel { display: none !important; }   /* 双保险：JS 切视口回退 + CSS 兜底 */
}
/* 扫码登录二维码面板：二维码 180px，1 分钟有效、到期自动刷新（不显示倒计时）；
   被手机扫到（poll 返 scanned）时盖上「扫码成功」覆盖层（阿里云登录页同款交互） */
.login-qr { text-align: center; padding: 4px 0 2px; }
.login-qr-box {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 200px; min-height: 200px; padding: 10px; background: #fff;
  border: 1px solid #eef1f6; border-radius: 12px;
}
.login-qr-box svg { display: block; width: 180px; height: 180px; }
.login-qr-wrap { position: relative; display: inline-block; }
.login-qr-ok {
  position: absolute; inset: 0; z-index: 1; border-radius: 12px;
  background: rgba(255, 255, 255, .95);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
}
.login-qr-ok .ok-ic {
  width: 46px; height: 46px; border-radius: 50%; background: #10b981; color: #fff;
  font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(16, 185, 129, .35); margin-bottom: 2px;
}
.login-qr-ok b { font-size: 15px; color: var(--text); letter-spacing: 1px; }
.login-qr-ok span { font-size: 12.5px; color: var(--text-3); }
/* 失效层：与「扫码成功」层同口径盖满二维码，中间是刷新图标，整层可点（手动刷新） */
.login-qr-expire {
  position: absolute; inset: 0; z-index: 2; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .95);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  transition: background .15s;
}
.login-qr-expire:hover { background: #fff; }
.login-qr-expire:hover .rf-ic { transform: rotate(90deg); }
.login-qr-expire:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.login-qr-expire .rf-ic {
  width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 24px; font-weight: 700; line-height: 1; margin-bottom: 2px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(47, 84, 235, .35);
  transition: transform .25s ease;
}
.login-qr-expire b { font-size: 15px; color: var(--text); letter-spacing: 1px; }
.login-qr-expire span { font-size: 12.5px; color: var(--primary); }
.login-qr-tip { margin-top: 16px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.login-qr-msg { margin-top: 8px; font-size: 12px; color: var(--text-3); min-height: 18px; }

/* ============================================================
   手机扫码页（scan_login.php，2026-10-20）
   深色相机界面：调起摄像头扫 PC 登录页二维码 → 跳确认页 qr_login.php
   ============================================================ */
.scan-body {
  min-height: 100vh; min-height: 100dvh;
  background: linear-gradient(170deg, #0a1428 0%, #0e1e40 55%, #16346b 100%);
  color: #e2e8f0; display: flex; flex-direction: column;
  padding: 0 16px calc(18px + env(safe-area-inset-bottom, 0px));
}
.scan-top { position: relative; display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top, 0px)) 0 4px; }
.scan-top .x {
  width: 34px; height: 34px; border: 0; border-radius: 10px; flex: none;
  background: transparent; color: #e2e8f0; font-size: 22px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: inherit;
}
.scan-top .x:hover { background: rgba(255, 255, 255, .1); }
/* 标题绝对定位居中（支付宝式确认页时为「登录确认」，扫描态为「扫一扫」） */
.scan-top .t {
  position: absolute; left: 0; right: 0; text-align: center; pointer-events: none;
  font-size: 16px; font-weight: 600; letter-spacing: 2px;
}
/* 扫码方式分段切换（默认二维码；一帧只跑当前模式的解码器，不双跑不卡） */
.scan-mode { width: 100%; max-width: 420px; margin: 12px auto 0; display: flex; gap: 8px; }
.scan-mode button {
  flex: 1; min-width: 0; height: 38px; padding: 0 10px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid rgba(226, 232, 240, .25); border-radius: 10px;
  background: rgba(255, 255, 255, .06); color: rgba(226, 232, 240, .75);
  font-size: 13.5px; font-family: inherit; cursor: pointer;
}
.scan-mode button:hover { background: rgba(255, 255, 255, .12); }
.scan-mode button.on {
  background: rgba(34, 211, 238, .16); border-color: rgba(34, 211, 238, .55); color: #67e8f9;
}
.scan-mode button svg { width: 17px; height: 17px; flex: none; }
/* 相机区右上角「切换摄像头」下拉（scan.js 建）：>=2 个视频输入才显示。
   自绘（仿站内 pgsel 交互：触发器 + 触发器下方展开面板、当前项高亮），不用浏览器默认样式 */
.scan-cam-dd {
  position: absolute; top: 10px; right: 10px; z-index: 6;
  display: flex; flex-direction: column; align-items: flex-end;
}
.scan-cam-trigger {
  height: 30px; max-width: 172px; padding: 0 8px 0 10px;
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 8px;
  background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 12px; font-family: inherit; line-height: 1; cursor: pointer; outline: none;
  -webkit-tap-highlight-color: transparent;
}
.scan-cam-trigger:active { border-color: rgba(34, 211, 238, .6); }
.scan-cam-trigger .scan-cam-cur { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-cam-trigger svg {
  width: 12px; height: 12px; flex: none; fill: none; stroke: #e2e8f0;
  stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s;
}
.scan-cam-dd.open .scan-cam-trigger svg { transform: rotate(180deg); }
.scan-cam-panel {
  display: none; margin-top: 6px; min-width: 148px; max-width: 208px;
  background: #fff; border-radius: 10px; padding: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.scan-cam-panel.open { display: block; }
.scan-cam-item {
  display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px;
  background: none; color: #1e293b; font-size: 12.5px; font-family: inherit; text-align: left;
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  -webkit-tap-highlight-color: transparent;
}
.scan-cam-item:hover { background: #f1f5f9; }
.scan-cam-item.on { background: rgba(34, 211, 238, .14); color: #0e7490; font-weight: 600; }
.scan-cam {
  position: relative; margin: 10px auto 0; width: 100%; max-width: 420px;
  aspect-ratio: 3 / 4; background: #000; border-radius: 16px; overflow: hidden;
}
.scan-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 取景窗：自身透明，box-shadow 向外扩散盖满容器做遮罩（洞的圆角跟 border-radius 走）。
   ⚠️ 窗口就是解码区（支付宝网页端口径，2026-10-23 起）：scan.js 按本窗口在视频帧上的
   映射算 ROI，框住哪就解哪，所以改这里的尺寸=改解码区，别再单独调 JS 里的比例。 */
.scan-cam .win {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 64%; aspect-ratio: 1 / 1; border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(10, 20, 40, .55);
}
/* 条形码模式：取景窗变横条（一维码横长竖短，方框浪费画面也浪费算力），
   解码区跟着这个横条走（ROI 由 scan.js 按窗口映射，不需额外配置）。 */
.scan-cam.mode-bar .win { width: 88%; aspect-ratio: 2.2 / 1; }
.scan-cam .cn { position: absolute; width: 24px; height: 24px; border: 3px solid #22d3ee; }
.scan-cam .cn.tl { left: -3px; top: -3px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.scan-cam .cn.tr { right: -3px; top: -3px; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.scan-cam .cn.bl { left: -3px; bottom: -3px; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.scan-cam .cn.br { right: -3px; bottom: -3px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.scan-cam .scan-line {
  position: absolute; left: 8px; right: 8px; top: 8px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, #22d3ee, transparent);
  /* ⚠️ 只动 transform，绝不动 top：top 每帧都要走 layout + paint，主线程一被占住
     （解码、GC、首帧绘制）扫描线就一顿一顿 —— 就是「开几秒后卡、掉帧」的观感来源。
     transform 交给合成器，主线程再忙动画照顺。行程距离 --sweep 由 JS 按取景窗实际
     高度写入（.win 是 64% 宽 + 1:1，纯 CSS 算不出像素高度；缺省 200px 兜底）。 */
  will-change: transform;
  animation: scan-sweep 2.4s ease-in-out infinite alternate;
}
@keyframes scan-sweep {
  from { transform: translateY(0); }
  to   { transform: translateY(var(--sweep, 200px)); }
}
/* ⚠️ .scan-body 是 flex 纵向容器：左右 margin:auto 会覆盖默认 stretch，让块收缩到内容宽
   （被内部 210px 的 .scan-dev SVG 钉成 210px，按钮 width:100% 也只能 210 → 显窄）。
   故这些块必须显式 width:100%（max-width 仍保留桌面端居中）。 */
.scan-tip {
  width: 100%; margin: 18px auto 0; max-width: 420px; text-align: center;
  font-size: 13.5px; color: rgba(226, 232, 240, .85); line-height: 1.7;
}
.scan-msg { width: 100%; margin: 8px auto 0; max-width: 420px; text-align: center; font-size: 12.5px; color: #fca5a5; min-height: 18px; }
.scan-msg.ok { color: #6ee7b7; }
/* 识别状态条（scan.js 排查期临时件，默认显示）：一行字回答「引擎有没有在识别」；右侧「隐藏」可关并记忆 */
.scan-status {
  width: 100%; max-width: 420px; margin: 8px auto 0; padding: 5px 10px;
  background: rgba(0, 0, 0, .30); border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 8px; color: #cbd5e1; font-size: 11.5px; line-height: 1.5;
  display: flex; align-items: center; gap: 8px; text-align: left; word-break: break-all;
}
.scan-status.bad { color: #fca5a5; border-color: rgba(248, 113, 113, .45); }
.scan-status .st-txt { flex: 1 1 0; min-width: 0; }
.scan-status .st-hide {
  flex: 0 0 auto; padding: 2px 8px; font-size: 11px; line-height: 1.4;
  color: #94a3b8; background: none; border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 6px; cursor: pointer;
}
.scan-status .st-hide:active { color: #e2e8f0; }
/* 现场诊断面板（scan.js 连点标题 3 下开关，默认隐藏；由 updateDiag 定时刷新） */
.scan-diag {
  width: 100%; max-width: 420px; margin: 10px auto 0; padding: 8px 10px;
  background: rgba(0, 0, 0, .38); border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 8px; color: #cbd5e1;
  font: 11px/1.6 ui-monospace, Menlo, Consolas, monospace;
  white-space: pre-wrap; word-break: break-all; text-align: left;
}
/* 通用扫码浮层（scan.js 动态建，全站复用）：fixed 全屏盖住 iframe 子页/外框，
   z-index 高于站内一切弹窗（modal-mask 是 1000 级）。内部复用上面的 scan-top/cam/tip/msg/err */
.scan-modal {
  position: fixed; inset: 0; z-index: 4000;
  background: linear-gradient(170deg, rgba(10, 20, 40, .97), rgba(14, 30, 64, .97) 55%, rgba(22, 52, 107, .97));
  display: flex; flex-direction: column;
  padding: 0 16px calc(18px + env(safe-area-inset-bottom, 0px));
  animation: scan-fadein .18s ease;
}
@keyframes scan-fadein { from { opacity: 0; } to { opacity: 1; } }
.scan-modal .scan-modal-in { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.scan-modal .scan-top { color: #e2e8f0; }
/* 浮层里相机区改为弹性占位：竖屏剩余空间全给取景框（页面版是 3/4 固定比例，浮层要适应各种高度） */
.scan-modal .scan-cam { flex: 1; min-height: 240px; aspect-ratio: auto; margin: 10px auto 0; }
.scan-torch {
  width: 100%; max-width: 420px; margin: 14px auto 0; height: 42px;
  border: 1px solid rgba(226, 232, 240, .35); border-radius: 10px;
  background: rgba(255, 255, 255, .08); color: #e2e8f0;
  font-size: 13.5px; cursor: pointer; font-family: inherit;
}
.scan-torch:hover { background: rgba(255, 255, 255, .14); }
.scan-err { width: 100%; margin: 16px auto 0; max-width: 420px; text-align: center; }
.scan-err .ic {
  width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 12px;
  background: rgba(248, 113, 113, .15); color: #fca5a5; font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.scan-err p { font-size: 13px; color: rgba(226, 232, 240, .8); line-height: 1.7; margin: 0 0 14px; }
.scan-retry {
  height: 40px; padding: 0 24px; border: 0; border-radius: 10px; font-size: 14px; font-family: inherit;
  background: linear-gradient(135deg, #3b6cf6, #2f54eb); color: #fff; cursor: pointer;
}
/* 扫码成功后的支付宝式确认页：设备线稿插画 + 说明文案 + 通栏确认登录（蓝）/取消（白） */
.scan-found { width: 100%; margin: 4vh auto 0; max-width: 420px; text-align: center; }
.scan-dev { display: block; width: 210px; max-width: 62%; margin: 26px auto 24px; }
.scan-dev rect, .scan-dev line, .scan-dev path, .scan-dev circle {
  stroke: rgba(226, 232, 240, .5); stroke-width: 3; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
.scan-dev .ph { fill: #10234a; }   /* 手机机身盖住身后的显示器线条 */
.scan-q1 { margin: 0; font-size: 15.5px; color: rgba(226, 232, 240, .88); }
.scan-q2 { margin: 10px 0 0; font-size: 14px; color: rgba(226, 232, 240, .55); }
.scan-acc { margin: 16px 0 0; font-size: 13px; color: rgba(226, 232, 240, .6); }
.scan-acc b { font-size: 13.5px; color: rgba(226, 232, 240, .88); font-weight: 600; }
.scan-acc span { color: rgba(226, 232, 240, .6); }
.scan-ops { margin-top: 22px; }
.scan-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 44px; border: 0; border-radius: 6px;
  font-size: 16px; font-family: inherit; cursor: pointer; text-decoration: none;
  background: #1677ff; color: #fff;
}
.scan-btn.plain { background: #fff; color: #1f2329; margin-top: 12px; }
.scan-btn[disabled] { opacity: .6; cursor: not-allowed; }
/* 确认完成态（✓ + 标题 + 提示） */
.scan-found .ok-ic.done {
  width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%;
  background: #1677ff; color: #fff; font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(22, 119, 255, .35);
}
/* 完成态错误变体（无法确认 / 网络异常）：红圈 + 叹号 */
.scan-found .ok-ic.done.err {
  background: var(--err); color: #fff;
  box-shadow: 0 8px 22px rgba(220, 38, 38, .35);
}
.scan-found h2 { margin: 0 0 6px; font-size: 18px; color: #f1f5f9; letter-spacing: 1px; }
.scan-found .hint { margin: 0; font-size: 13px; color: rgba(226, 232, 240, .75); line-height: 1.7; }

/* ============================================================
   子页面公共结构（iframe 内）
   ============================================================ */
.page { padding: 2px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.page-head h2 { font-size: 18px; color: var(--text); display: inline; }
.page-head .desc { font-size: 12.5px; color: var(--text-3); margin-top: 0; margin-left: 10px; display: inline; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar .input, .filter-bar select.input { width: auto; min-width: 150px; }
/* 统一筛选项尾部按钮组：由 page.js 注入（查询 / 重置），
   桌面端经 .fb-body 的 display:contents 直接排在同一行 */
.filter-bar .fb-actions { display: flex; gap: 8px; align-items: center; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
/* 双卡并排容器（如收支报表的收/支分类汇总）：移动端必须收成单列，
   否则卡内非卡片表格的 min-width 会把 1fr 轨道撑到 640px，右卡整体推出屏幕 */
.duo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.stat-card { padding: 18px 20px; position: relative; overflow: hidden; }
.stat-card .lbl { font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.stat-card .val { font-size: 25px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.stat-card .val small { font-size: 13px; font-weight: normal; color: var(--text-3); margin-left: 3px; }
.stat-card .ic {
  position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.stat-card .ic.blue { background: var(--primary-weak); }
.stat-card .ic.green { background: #ecfdf3; }
.stat-card .ic.orange { background: #fff7e8; }
.stat-card .ic.red { background: #fef2f2; }
.stat-card .ic img { width: 22px; height: 22px; display: block; }
/* 审批事项分类卡（appr-tabs）：移动端固定一行 2 个 —— 通用 auto-fit 的 minmax(200px,1fr)
   在 390px 下会退化成 1 列（2 列需 414px），这里显式覆盖；桌面仍走 auto-fit 自适应 */
@media (max-width: 768px) {
  .appr-tabs { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* 开发中占位页 */
.wip {
  min-height: 60vh; display: flex; align-items: center; justify-content: center;
}
.wip .box { text-align: center; padding: 60px 80px; }
.wip .box .ring {
  width: 92px; height: 92px; margin: 0 auto 22px; border-radius: 50%;
  background: var(--primary-weak); display: flex; align-items: center; justify-content: center; font-size: 40px;
}
.wip .box h2 { font-size: 18px; margin-bottom: 10px; }
.wip .box p { color: var(--text-2); font-size: 13.5px; line-height: 1.9; }

/* ============================================================
   移动端适配（≤768px，办公手机端使用）
   ============================================================ */
/* 汉堡按钮与抽屉遮罩：桌面端隐藏（由 index.php 输出、app.js 控制） */
.banner-menu {
  display: none; width: 36px; height: 36px; padding: 0; flex: none;
  align-items: center; justify-content: center; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-2); cursor: pointer;
}
.banner-menu svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.banner-menu:active { background: #f2f5fa; }
/* 左上角 logo（菜单按钮左侧）：桌面端侧栏常驻、无菜单按钮，故与按钮同规则只在移动端显示。
   内容 = 「系统配置」上传的网站 logo（与侧栏 .brand 同源）；未上传时用与侧栏同款的「鼎」字块 */
/* 可点的 logo（有 dashboard 权限时挂 is-link）：手型光标 + 按下反馈，视觉上仍是纯 logo */
.banner-logo.is-link { cursor: pointer; }
.banner-logo.is-link:active { opacity: .75; }
.banner-logo {
  display: none; width: 34px; height: 34px; flex: none;
  border-radius: 9px; object-fit: cover;
}
.banner-logo.logo-def {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff; font-weight: 800; font-size: 17px;
  align-items: center; justify-content: center;
}
/* 左上角 logo 可点（系统配置里填了网站地址）：PC 端点它弹出旁边的二维码浮层，手机扫码打开 */
.brand.is-link { cursor: pointer; }
.brand.is-link:active .logo-img,
.brand.is-link:active .logo { opacity: .75; }
/* 侧栏品牌行右侧「扫一扫」图标：仅移动端抽屉里显示（PC 端点 logo 本身即弹二维码）。
   深色侧栏上的半透明圆底白图标，与导航图标同语言。
   ⚠️ 恒渲染、恒绑事件：它扫的是 PC 登录页二维码，与「系统配置有没有填网站地址」无关 */
.brand-scan {
  display: none; margin-left: auto; flex: none; width: 30px; height: 30px; padding: 0;
  align-items: center; justify-content: center; border: 0; border-radius: 8px;
  background: rgba(255, 255, 255, .10); color: #fff; cursor: pointer; transition: background .15s;
}
.brand-scan svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-scan:active { background: rgba(255, 255, 255, .2); }
/* 二维码浮层（PC）：贴品牌区右侧，fixed + 高 z-index 压过 iframe 内容 */
.brand-qr {
  position: fixed; z-index: 200; display: none; width: 208px;
  padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .22);
}
.brand-qr.show { display: block; animation: pop .18s cubic-bezier(.2, .9, .4, 1.1); }
.brand-qr-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
  font-size: 13px; font-weight: 600; color: var(--text);
}
.brand-qr-x {
  flex: none; font-style: normal; font-size: 15px; line-height: 1; color: var(--text-3);
  cursor: pointer; padding: 3px 5px; border-radius: 6px;
}
.brand-qr-x:hover { background: #f2f5ff; color: var(--primary); }
.brand-qr-box {
  display: flex; align-items: center; justify-content: center;
  padding: 8px; background: #fff; border: 1px solid #eef1f6; border-radius: 10px;
}
.brand-qr-box svg { display: block; width: 160px; height: 160px; }
.sidebar-mask { display: none; }

/* 触屏点按小问号切换说明（桌面 hover 行为不变；显示态由上方 :hover/.tip-open 统一处理） */
.tip-icon.tip-open { background: var(--primary); }

/* 筛选栏折叠结构：桌面隐藏按钮、fb-body 不参与布局（移动端规则见下方媒体查询） */
.filter-bar .fb-toggle { display: none; }
.filter-bar .fb-body { display: contents; }

@media (max-width: 768px) {
  /* ---------- 框架：侧边栏收为抽屉 ---------- */
  .banner-menu { display: inline-flex; }
  .banner-logo { display: block; }
  .banner-logo.logo-def { display: flex; }   /* 默认「鼎」字块需要 flex 居中 */
  /* 抽屉展开后：品牌行右侧显示「扫一扫」图标（PC 隐藏，见上方 .brand-scan 定义） */
  .brand-scan { display: inline-flex; }
  .frame-sidebar {
    width: 264px; transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .frame-sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .sidebar-mask.show {
    display: block; position: fixed; inset: 0; z-index: 19;
    background: rgba(13, 23, 48, .45);
  }
  .frame-main { margin-left: 0; }
  .frame-loading { left: 0; }
  .frame-banner { padding: 0 12px; gap: 10px; }
  /* 顶部时钟只给 PC 看（手机上 banner 空间金贵，日期时间在状态栏/锁屏都有） */
  .banner-clock { display: none; }
  .banner-title { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* 移动端单位名：13px 字号下每字约 13px，5~6 个字需 65~78px。
     原来 .nm 被 110px 总宽扣掉内边距(24)+箭头(16) 后只剩约 64px → 6 个字就被截成「鼎数管…」。
     这里把文字区放到 110px（约 8 字）、外层容器 150px，5~6 个字可完整显示；
     更长的名字仍省略（否则会把页面标题挤出 banner） */
  .company-switch .cur { max-width: 158px; }
  .company-switch .cur .nm { max-width: 116px; }
  .company-static { max-width: 158px; }
  .avatar { padding: 5px 2px; }
  .avatar .nm { display: none; }
  .frame-content { padding: 12px; }

  /* ---------- 输入与触控：16px 防 iOS 聚焦缩放，控件加大 ---------- */
  .input, select.input, textarea.input, .pager-input, .login-box .field input { font-size: 16px; }
  .btn { height: 40px; padding: 0 16px; font-size: 14px; }
  .btn-sm { height: 34px; }
  .tb .ops a, .tb .ops .lk { font-size: 14px; padding: 6px 0; display: inline-block; }
  .pager-btn { min-width: 36px; height: 32px; }
  .company-switch .list .it, .user-menu .it { padding: 12px; }
  .modal-head .x { font-size: 24px; padding: 6px 8px; }

  /* ---------- 分页器：紧凑 + 允许换行 ---------- */
  .pager { flex-wrap: wrap; row-gap: 6px; }
  .pager-btn[title="首页"], .pager-btn[title="末页"], .pager-btn-go { display: none; }

  /* ---------- 弹窗：贴近可视区顶部 ---------- */
  .modal { margin-top: 20px; }

  /* ---------- 弹窗表单：并列表单行窄屏堆叠为单列（form-item.grow 仅用于弹窗内并排字段） ---------- */
  .modal-body div[style*="display:flex"] { flex-wrap: wrap; }
  .modal-body .form-item.grow { min-width: 100%; }

  /* ---------- 表格：默认横滚兜底，高频页（.table-wrap.m-cards）变紧凑卡片 ----------
     参考大厂移动端列表：首字段作标题（整行加粗、超长省略）+ 其余字段两两并排 + 操作钉在右上角，
     单卡高度约为原先的 45%，一屏能多看 2~3 条。--ops-reserve 需 ≥ 操作区实际宽度 */
  .table-wrap { -webkit-overflow-scrolling: touch; }

  /* ---------- 移动端滚动条：只留外框 .frame-content 那一条 ----------
     全局 ::-webkit-scrollbar{6px} 对任何可滚动容器都生效，真机 WebView 会逐个画出常驻竖条；
     而手机上的可滚容器（弹窗 body / 账户列表 / 饼图图例 / 表格 / 子页文档）滑动本就由外框接管，
     或压根没有可滚空间 —— 表现为「右侧一条推不动的死条」。
     这里**只隐藏显示**（scrollbar-width: none + 伪元素归零），不改 overflow，手指滑动完全不受影响 */
  html, body,
  .page, .page *,
  .modal-mask, .modal, .modal * {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  html::-webkit-scrollbar, body::-webkit-scrollbar,
  .page::-webkit-scrollbar, .page *::-webkit-scrollbar,
  .modal-mask::-webkit-scrollbar, .modal::-webkit-scrollbar, .modal *::-webkit-scrollbar {
    width: 0 !important; height: 0 !important; display: none !important;
  }

  .table-wrap:not(.m-cards) .tb { min-width: 640px; } /* 压缩换行难读，横向滚动 */
  /* 平均分表窄屏回退 auto：fixed 下 17 位编码列只有 ~116px，nowrap 会溢出单元格 */
  .tb-fixed-avg { table-layout: auto; }
  .m-cards .tb { --ops-reserve: 136px; }
  .m-cards .tb thead { display: none; }
  .m-cards .tb, .m-cards .tb tbody { display: block; }
  .m-cards .tb tbody { margin: 10px 0; }
  .m-cards .tb tr {
    display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px;
    position: relative;
    border: 1px solid var(--line); border-radius: 8px; background: #fff;
    padding: 2px 12px 6px; margin-bottom: 8px;
  }
  .m-cards .tb tr:last-child { margin-bottom: 0; }
  .m-cards .tb td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
    border: 0; padding: 3px 0; margin: 0; text-align: right; min-width: 0;
    font-size: 13px; word-break: break-all;
  }
  .m-cards .tb td::before {
    content: attr(data-l); flex: none; max-width: 46%;
    color: var(--text-3); font-size: 12px; text-align: left; word-break: keep-all;
  }
  /* 首字段：卡片标题（整行、加粗、超长省略），右侧按 --ops-reserve 给操作按钮留位 */
  .m-cards .tb td:first-child {
    grid-column: 1 / -1; display: block;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-align: left; font-weight: 600; font-size: 14.5px; color: var(--text);
    padding: 7px var(--ops-reserve) 6px 0; border-bottom: 1px dashed var(--line); margin-bottom: 3px;
  }
  .m-cards .tb td:first-child::before { display: none; }
  /* 操作：钉在卡片右上角（大厂列表做法），不再独占一行；左侧白色渐隐让省略号自然过渡 */
  .m-cards .tb td.ops {
    position: absolute; top: 5px; right: 10px; grid-column: auto;
    gap: 0; padding: 0 0 0 12px; align-items: center; white-space: nowrap;
    background: linear-gradient(to right, rgba(255,255,255,0), #fff 12px), #fff;
    box-shadow: 0 1px 0 #fff;
  }
  .m-cards .tb td.ops a, .m-cards .tb td.ops .lk { margin-right: 8px; font-size: 13px; padding: 6px 0; }
  .m-cards .tb td.ops > :last-child { margin-right: 0; }
  /* 操作格没有字段名（data-l 为空时 ::before 仍会占位），显式关掉，免得链接被 flex 的 gap 顶偏 */
  .m-cards .tb td.ops::before { display: none; }
  .m-cards .tb td:empty { display: none; }
  /* 单列卡片变体：条目少的页面（如账户管理）用单列更耐看 */
  .m-cards.m-1col .tb tr { grid-template-columns: 1fr; }
  /* 首列是序号（对业务无意义）时加 .m-skipno：跳过序号列，改用第二列当卡片标题。
     序号必须在卡片模式下彻底消失（display:none 即可，m-cards 已不用 colgroup 对齐） */
  .m-cards.m-skipno .tb td:first-child { display: none; }
  .m-cards.m-skipno .tb td:nth-child(2) {
    grid-column: 1 / -1; display: block;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-align: left; font-weight: 600; font-size: 14.5px; color: var(--text);
    padding: 7px var(--ops-reserve) 6px 0;
    border-bottom: 1px dashed var(--line); margin-bottom: 3px;
  }
  .m-cards.m-skipno .tb td:nth-child(2)::before { display: none; }

  /* ---------- 真表格模式（m-table）：数据量大的页面移动端保持表格 ----------
     收支登记/内部转账/报销审批/账户余额这类数据多的列表，卡片一屏只能看两三条，
     改为紧凑真表格：table-layout:fixed + colgroup 精确列宽，
     已知格式列（日期 Y-m-d=78px / 金额=86px / 审批时间 Y-m-d H:i:s=142px / 枚举 tag≈64px）按固定宽放，
     长文本列（备注/事由/账户名）ellipsis 省略；一律 nowrap 不换行，超宽由 .table-wrap 横滚。
     注意特异性须与上方 :not(.m-cards) 规则（3 类）持平且源顺序在后才能覆盖 min-width。
     ⚠️ 全部带 :not(.m-cards)：同一个容器同时写了 m-table 和 m-cards 时（养殖/来蛋/盘点）
     走的是卡片，若这些「紧凑真表格」的单元格样式仍然生效，卡片会吃到 5px 左右内边距、
     12px 字号和 nowrap+ellipsis（商家名被截断而不是换行），等于两种模式打架 */
  .table-wrap.m-table:not(.m-cards) .tb { min-width: 480px; font-size: 12px; table-layout: fixed; }
  .table-wrap.m-table:not(.m-cards) .tb th, .table-wrap.m-table:not(.m-cards) .tb td {
    padding: 6px 5px; font-size: 12px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .table-wrap.m-table:not(.m-cards) .tb td.ops { overflow: visible; text-overflow: clip; }
  /* 操作链接覆盖 521 行触控规则（14px+padding6 会把整行撑到 43px）：表格内统一 13px/2px，行高与 tag 行一致。
     卡片模式不吃这条——卡上操作是唯一可点区，6px 上下内边距才够手指 */
  .table-wrap.m-table:not(.m-cards) .tb td.ops a, .table-wrap.m-table:not(.m-cards) .tb td.ops .lk { padding: 2px 0; font-size: 13px; }
  /* 链接间距 6px 且末链接无 margin：「编辑+删除」实测 62px，80px 操作列（可用 68px）放得下 */
  .table-wrap.m-table .tb td.ops a, .table-wrap.m-table .tb td.ops .lk { margin-right: 6px; }
  .table-wrap.m-table .tb td.ops a:last-child, .table-wrap.m-table .tb td.ops .lk:last-child { margin-right: 0; }
  /* 各表按列数与内容定制最小宽度（固定列宽之和 + 弹性列保底），窄屏横滚距离可接受 */
  .table-wrap.m-table.mt-rec .tb { min-width: 756px; }  /* 收支登记 10 列（含序号） */
  .table-wrap.m-table.mt-tr  .tb { min-width: 682px; }  /* 内部转账 8 列（含序号、经办人、操作） */
  .table-wrap.m-table.mt-rb  .tb { min-width: 786px; }  /* 报销审批 10 列（含序号） */
  .table-wrap.m-table.mt-acc .tb { min-width: 526px; }  /* 账户余额 6 列（含序号） */
  .table-wrap.m-table.mt-item .tb { min-width: 1080px; } /* 物品档案 11 列（含序号、操作；+包装/散装售价两列） */
  .table-wrap.m-table.mt-pt  .tb { min-width: 540px; }  /* 往来单位 7 列（含序号、操作） */
  .table-wrap.m-table.mt-so  .tb { min-width: 760px; }  /* 出入库单 9 列（含序号、操作） */
  .table-wrap.m-table.mt-sf  .tb { min-width: 856px; }  /* 库存流水 10 列（含序号） */
  .table-wrap.m-table.mt-tk  .tb { min-width: 640px; }  /* 库存盘点 8 列（含序号、操作） */
  .table-wrap.m-table.mt-lg  .tb { min-width: 940px; }  /* 操作日志 9 列（含序号；单位/部门用于区分跨单位日志归属） */
  .table-wrap.m-table.mt-ap  .tb { min-width: 760px; }  /* 审批事项（待批）7 列（含序号、操作：审批+详情） */
  .table-wrap.m-table.mt-apd .tb { min-width: 850px; }  /* 已批事项 9 列（含序号、审批人，独立于待批的 mt-ap） */
  .table-wrap.m-table.mt-flow .tb { min-width: 820px; } /* 收支报表-收支流水 9 列（含序号） */
  /* 账户余额表移动端列宽（覆盖桌面 .fund-acc 规则：inline width 已 class 化，此处特异性 3 类胜出） */
  .table-wrap.m-table.mt-acc .c-seq { width: 46px; }
  .table-wrap.m-table.mt-acc .c-acc { width: auto; }
  .table-wrap.m-table.mt-acc .c-type { width: 58px; }
  .table-wrap.m-table.mt-acc .c-open, .table-wrap.m-table.mt-acc .c-cur { width: 96px; }
  .table-wrap.m-table.mt-acc .c-st { width: 58px; }

  /* 筛选栏日期控件：自带内容最小宽度（min-width 压不住，实测 >151px），
     移动端改为两个日期框平分一整行，宽度与其他条件一致且不撑出横向空间 */
  .filter-bar .fb-body input[type="date"] { display: block; min-width: 0 !important; flex: 1 1 126px; }

  /* 双卡并排容器：移动端收单列（防卡内表格把轨道撑出屏幕） */
  .duo-grid { grid-template-columns: 1fr; gap: 18px; }
  /* 带标题的卡片列表容器：移动端去白壳——白卡套白 mini 卡会糊成一片（边界不可见），
     标题直接排在页面底色上，mini 卡片跟在下面，区块间距靠容器 gap */
  .sec-card { background: transparent; box-shadow: none; }
  .sec-card > .card-pad { padding: 2px 2px 0; }

  /* ---------- 筛选栏：条件较多时折叠为"筛选"按钮（fb 结构由 page.js 注入） ---------- */
  .filter-bar.fb-collapse .fb-toggle { display: inline-flex; }
  .filter-bar.fb-collapse .fb-body { display: none; }
  .filter-bar.fb-collapse.fb-open .fb-body { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; width: 100%; }
  .filter-bar.fb-collapse.fb-open { flex-wrap: wrap; }
  .filter-bar.fb-collapse .fb-toggle::after { content: ' ▾'; }
  .filter-bar.fb-collapse.fb-open .fb-toggle::after { content: ' ▴'; }
  /* 展开时「向下展开、常驻按钮位置不变」：fb-body 展开后 width:100% 会独占一行，
     若常驻按钮（data-fb-keep）排在它后面就会被挤到第三行（位置忽变）→ 用 order 把
     开关和常驻按钮钉在面板前一行。无 data-fb-keep 的页面只有 toggle+body 两个子元素，
     order 1/3 与 DOM 顺序一致，布局零变化；桌面端无此规则，仍按 DOM 顺序
     （fb-body 是 display:contents，常驻按钮依旧在最右） */
  .filter-bar.fb-collapse > .fb-toggle { order: 1; }
  .filter-bar.fb-collapse > [data-fb-keep] { order: 2; }
  .filter-bar.fb-collapse > .fb-body { order: 3; }
  /* 手机端没有回车键，查询/重置做成整行两个等宽按钮，点得到 */
  .filter-bar .fb-actions { width: 100%; }
  .filter-bar .fb-actions .btn { flex: 1; }

  /* ---------- 下拉：原生 select → 触发器 + 下方展开面板（page.js initPgSelect 接管） ----------
     原生控件移出可视区但保留在 DOM：value / change 语义不变，两级联动与提交逻辑不用改。
     触发器视觉样式已上移到全局（级联字段 PC 也用），这里只做窄屏显隐切换 */
  .pgsel-native { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
  .pgsel-trigger { display: flex; }   /* 窄屏：原生 select 收起，触发器上场（级联触发器全宽屏常显） */
  /* 面板滚动条：与全站移动端口径一致，只隐藏显示不改 overflow（手指滑动不受影响） */
  .pgsel-body { scrollbar-width: none; -ms-overflow-style: none; }
  .pgsel-body::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; }

  /* 物品档案：移动端筛选展开后输入框与筛选下拉同处一行（各占一半，永不错行） */
  .filter-bar.item-fb.fb-collapse.fb-open .fb-body { gap: 8px; }
  .filter-bar.item-fb.fb-collapse.fb-open .fb-body > .input,
  .filter-bar.item-fb.fb-collapse.fb-open .fb-body > .pgsel-wrap {
    flex: 1 1 0; min-width: 0;
  }

  /* ---------- 登录页：移动端样式统一由上方 @media(max-width:860px) 的登录块接管 ---------- */
}

/* PC（≥769）：级联触发器与其它 .input 同高同字号（移动端 44px 可点区 / 16px 防 iOS 缩放不动），
   面板选项补桌面 hover 反馈（触屏不命中这段，不会粘 hover） */
@media (min-width: 769px) {
  .pgsel-cascade-trigger { min-height: 36px; padding: 0 12px; font-size: 13px; }
  .pgsel-opt:hover { background: #f2f5ff; }
}

/* ============================================================
   资金账户页：移动端银行卡卡片（≤768px 显示，桌面走表格）
   配色：按类型分色（银行蓝紫 / 微信绿 / 支付宝蓝 / 现金金棕）；停用整卡转灰
   ============================================================ */
.acc-m { display: none; }
.acc-bcard {
  position: relative; overflow: hidden; color: #fff;
  height: 104px; padding: 13px 15px; margin-bottom: 10px;
  border-radius: 14px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 6px 16px rgba(15, 30, 70, .16);
  transition: transform .12s, box-shadow .12s;
}
.acc-bcard:active { transform: scale(.985); }
.acc-bcard.t-bank   { background: linear-gradient(135deg, #3b64f0, #1d39c4); }
.acc-bcard.t-wechat { background: linear-gradient(135deg, #1eb75a, #0f7a37); }
.acc-bcard.t-alipay { background: linear-gradient(135deg, #1677ff, #0b4fd1); }
.acc-bcard.t-cash   { background: linear-gradient(135deg, #c98a3c, #8b5e34); }
.acc-bcard.t-other  { background: linear-gradient(135deg, #5b6b84, #3c4a63); }
.acc-bcard::after {
  content: ''; position: absolute; right: -34px; top: -44px;
  width: 124px; height: 124px; border-radius: 50%; background: rgba(255, 255, 255, .10);
}
.acc-bcard::before {
  content: ''; position: absolute; right: 14px; bottom: -48px;
  width: 92px; height: 92px; border-radius: 50%; background: rgba(255, 255, 255, .07);
}
/* 停用：整卡转灰（须在分色规则之后，同权重靠顺序覆盖） */
.acc-bcard.off {
  background: linear-gradient(135deg, #b3bbc9, #939cab);
  box-shadow: 0 2px 8px rgba(16, 24, 40, .10);
}
.bc-t1 { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: relative; z-index: 1; }
.bc-nm { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.bc-pill { flex: none; font-size: 10.5px; background: rgba(255, 255, 255, .20); border-radius: 20px; padding: 2px 9px; }
.bc-b1 { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; position: relative; z-index: 1; }
.bc-no { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bc-notxt { font-size: 12px; letter-spacing: .5px; color: rgba(255, 255, 255, .80); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-eye { flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 3px; margin: -3px; color: #fff; opacity: .80; }
.bc-eye:active { opacity: 1; }
.bc-eye svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bc-bal { flex: none; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bc-bal small { font-size: 11px; font-weight: 400; color: rgba(255, 255, 255, .72); margin-left: 3px; }

/* 弹窗状态分段控件 */
.seg { display: inline-flex; background: #f2f4f7; border-radius: 9px; padding: 3px; gap: 3px; }
.seg button {
  border: 0; height: 30px; padding: 0 18px; border-radius: 7px;
  background: transparent; color: var(--text-2); font-size: 13px; font-family: inherit; cursor: pointer;
}
.seg button.on { background: #fff; font-weight: 600; color: var(--ok); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }
.seg button.on[data-v="0"] { color: var(--text-2); }

/* 移动端切换：卡片列表上、表格下（桌面反之） */
@media (max-width: 768px) {
  .acc-m { display: block; }
  .acc-pc { display: none; }
}

/* ============================================================
   员工档案页：移动端双行信息卡（≤768px 显示，桌面走表格）
   结构：姓名+状态一行（居右入职日期）→ 部门/岗位/手机/合同 2 列 → 底部整条操作行（4 个操作等分）
   ============================================================ */
.emp-m { display: none; }
.emp-m .ec {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 9px; padding: 12px 13px 0;
}
.emp-m .ec-hd { display: flex; align-items: center; gap: 8px; }
.emp-m .ec-nm { font-size: 15px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 姓名行居右的入职日期：flex:none 保证始终完整可见，长姓名由 ec-nm 截断让位 */
.emp-m .ec-entry { flex: none; margin-left: auto; font-size: 11.5px; color: var(--text-3); }
.emp-m .ec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; margin: 9px 0 10px; }
.emp-m .ec-it { display: flex; gap: 6px; font-size: 12.5px; min-width: 0; }
.emp-m .ec-it .k { color: var(--text-3); flex: none; }
.emp-m .ec-it .v { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 操作条：编辑 | 账号 | 离职 | 删除 四个操作等分整宽，竖线分隔 */
.emp-m .ec-bar { display: flex; border-top: 1px solid var(--line); margin: 0 -13px; }
.emp-m .ec-bar a {
  flex: 1; text-align: center; padding: 9px 0; font-size: 12.5px;
  color: var(--primary); border-right: 1px solid var(--line);
}
.emp-m .ec-bar a:last-child { border-right: 0; }
.emp-m .ec-bar a.danger { color: var(--err); }

@media (max-width: 768px) {
  .emp-m { display: block; }
  .emp-pc { display: none; }
}

/* ============================================================
   公司概况页（dashboard）—— .dash 作用域，不影响其他页面
   统计卡按 资金 / 员工 / 库存与审批 分组，图表用 ECharts
   ============================================================ */
.dash .grp { margin-bottom: 18px; }
.dash .grp-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 9px;
}
.dash .grp-title i { width: 4px; height: 13px; border-radius: 2px; flex: none; }
.dash .grp-title small { font-weight: normal; font-size: 12px; color: var(--text-3); margin-left: 2px; }

.dash .stat-grid { display: grid; gap: 12px; }
.dash .cols-4 { grid-template-columns: repeat(4, 1fr); }
.dash .cols-3 { grid-template-columns: repeat(3, 1fr); }
.dash .stat-card { padding: 16px 18px; }
.dash .stat-card .lbl { font-size: 12.5px; margin-bottom: 7px; }
.dash .stat-card .val { font-size: 22px; font-weight: 700; letter-spacing: 0; }
.dash .stat-card .sub { font-size: 11.5px; margin-top: 6px; color: var(--text-3); }
.dash .stat-card .sub .up { color: var(--err); }
.dash .stat-card .sub .down { color: var(--ok); }
/* 分组色条 */
.dash .stat-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.dash .stat-card.g-fund::before { background: linear-gradient(180deg, #2f54eb, #06b6d4); }
.dash .stat-card.g-emp::before { background: linear-gradient(180deg, #16a34a, #4ade80); }
.dash .stat-card.g-stock::before { background: linear-gradient(180deg, #d97706, #fbbf24); }

/* 图表卡 */
.dash .chart-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.dash .chart-card { padding: 16px 18px 10px; }
.dash .chart-card .c-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.dash .chart-card .c-head b { font-size: 14.5px; }
.dash .chart-card .c-head .c-tip { font-size: 12px; color: var(--text-3); }
.dash .chart { width: 100%; height: 280px; }
.dash .duo-grid { margin-top: 0; }

/* 占比饼图：桌面 = 图占满整卡（外侧引导线标签），右侧 HTML 图例隐藏；
   移动端（≤768）切左右布局：左迷你环形（无标签），右类别图例列表，
   类别多时图例区自身上下滚动，显示得下就不出滚动条 */
.dash .pie-legend { display: none; }

/* 账户余额构成列表（清单式：账户各自独立、余额无可比性，不做百分比条） */
.dash .acc-list { padding: 6px 0 4px; }
.dash .acc-item { display: flex; align-items: center; gap: 12px; padding: 10px 18px; }
.dash .acc-item + .acc-item { border-top: 1px dashed var(--line); }
.dash .acc-item .a-ico {
  width: 34px; height: 34px; border-radius: 9px; flex: none; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.dash .acc-item .a-ico img { width: 20px; height: 20px; display: block; }
.dash .acc-item .a-info { flex: 1; min-width: 0; }
.dash .acc-item .a-name { font-size: 13.5px; margin-bottom: 2px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.dash .acc-item .a-name .a-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash .acc-item .a-name .a-bal { font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash .acc-item .a-type { font-size: 11.5px; color: var(--text-3); }
.dash .acc-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin: 4px 18px 14px; padding: 10px 14px; border-radius: 8px;
  background: var(--primary-weak); font-size: 13px;
}
.dash .acc-foot b { font-size: 17px; color: var(--primary); font-variant-numeric: tabular-nums; }

/* 账户超过 3 个（JS 挂 is-scroll）：列表区限高约 3 行内部上下滚动，不再撑高卡片；
   卡片转 flex 列布局 + 合计条 margin-top:auto 钉底，滚动时合计始终可见。
   行高实测 57px（含 1px 虚线边框），3 行 + 列表上下 padding 10 = 181px */
.dash .acc-card.is-scroll { display: flex; flex-direction: column; }
.dash .acc-card.is-scroll .acc-list { flex: 1 1 auto; min-height: 0; max-height: 181px; overflow-y: auto; }
.dash .acc-card.is-scroll .acc-foot { margin-top: auto; }

@media (max-width: 1200px) {
  /* 中窄屏（笔记本内容区 ~860-1200px）：排布与设计稿一致不折行，仅缩卡片字号防金额溢出；
     图表高度压缩（宽度变窄后 280px 高的饼图上下空白过大不协调） */
  .dash .stat-card { padding: 15px 14px; }
  .dash .stat-card .val { font-size: 19px; }
  .dash .stat-card .lbl { font-size: 12px; }
  .dash .chart { height: 250px; }
  /* 图表卡内边距收窄：给饼图腾宽度（环更大，外侧标签也有空间） */
  .dash .chart-card { padding: 14px 12px 8px; }
}
@media (max-width: 768px) {
  .dash .cols-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  /* 3 卡组（员工/库存与审批）移动端保持一行 3 张，避免 2+1 折行缺卡；
     字号沿用 ≤1200 档，只收窄卡片水平留白给数字腾位 */
  .dash .cols-3 { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .dash .cols-3 .stat-card { padding: 15px 10px; }
  .dash .chart-grid { grid-template-columns: 1fr; }
  .dash .duo-grid { grid-template-columns: 1fr; }
  .dash .chart { height: 240px; }
  /* 占比饼图移动形态：左大环（外侧百分比标签）+ 右紧凑图例（名称 ≤4 字，超出加「.」）。
     饼图容器 flex:1 吃掉剩余全部宽度（环尽量大），图例列固定 80px 贴近右缘，
     名称不会被拉宽、不会离右边缘太远；图例区可滚动，JS 同步显隐兜底 */
  .dash .pie-card .pie-flex { display: flex; align-items: flex-start; gap: 8px; }
  .dash .pie-card .pie-flex .chart { flex: 1 1 0%; min-width: 0; height: 236px; }
  .dash .pie-legend {
    display: block; flex: none; width: 80px; min-width: 0;
    max-height: 236px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .dash .pie-legend .pl-it {
    display: flex; align-items: flex-start; gap: 7px;
    padding: 7px 2px; border-bottom: 1px dashed var(--line); font-size: 12px;
  }
  .dash .pie-legend .pl-it:last-child { border-bottom: 0; }
  .dash .pie-legend .pl-it i { width: 10px; height: 10px; border-radius: 3px; flex: none; margin-top: 3px; }
  .dash .pie-legend .pl-nm { flex: 1; min-width: 0; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ≤360px 极窄屏兜底（375+ 正常手机不受影响）：3 卡组金额 19px 放不下，
   字号降到 16px + 再收留白，防数字溢出卡片 */
@media (max-width: 360px) {
  .dash .cols-3 .stat-card { padding: 15px 8px; }
  .dash .cols-3 .stat-card .val { font-size: 16px; }
}

/* ============================================================
   收支报表：收入/支出分类汇总（方案 B · 占比条列表，桌面/移动同一套）
   结构：卡头（色块图标 + 标题）→ 汇总行（共 N 类 · M 笔 · 合计）→
        分类行两行式：名称+金额（上）/ 占比条+百分比+笔数（下）
   收入绿 var(--ok) / 支出红 var(--err)；极小占比由 .cb-fill min-width 兜底可见
   ============================================================ */
.cat-b { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 14px 8px; margin-top: 16px; }
.cat-b .cb-head { display: flex; align-items: center; gap: 8px; }
.cat-b .cb-ico { width: 22px; height: 22px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; flex: none; }
.cat-b .cb-title { font-size: 14px; font-weight: 700; }
.cat-b .cb-sub { font-size: 11.5px; color: var(--text-3); margin: 3px 0 10px 30px; }
.cat-b .cb-row { padding: 9px 0 11px; border-top: 1px dashed var(--line); }
.cat-b .cb-row:first-child { border-top: 0; }
.cat-b .cb-l1 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cat-b .cb-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-b .cb-amt { font-size: 14px; font-weight: 700; flex: none; }
.cat-b .cb-l2 { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.cat-b .cb-track { flex: 1; height: 6px; background: #eef1f6; border-radius: 3px; overflow: hidden; }
.cat-b .cb-fill { height: 100%; border-radius: 3px; min-width: 3px; }
.cat-b .cb-pct { font-size: 11px; color: var(--text-3); width: 38px; text-align: right; flex: none; }
.cat-b .cb-cnt { font-size: 11px; color: var(--text-3); flex: none; }

/* ============================================================
   移动端底部导航栏（≤768 显示；桌面隐藏）
   · 三个高频业务 tab + 系统设置入口，由 index.php 按权限渲染，
     无权限的 tab 不输出 —— 前端不做权限判断
   · 选中态 .on：图标与文字变主色、顶部 2px 指示条
   · 内容区 .frame-content 在移动端 padding-bottom 让位（含 iOS 安全区）
   · z-index 60：低于弹窗 mask(90)/toast(999)/扫码浮层(4000)/大图浮层(5000)，
     弹窗打开时遮罩能盖住底部导航
   ============================================================ */
.tabbar { display: none; }
@media (max-width: 768px) {
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; align-items: stretch;
    background: #fff; border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 14px rgba(15, 23, 42, .06);
  }
  .tabbar-item {
    flex: 1; min-width: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px;
    padding: 7px 0 6px; cursor: pointer; position: relative;
    color: var(--text-3); -webkit-tap-highlight-color: transparent;
    user-select: none;
  }
  .tabbar-item svg {
    width: 21px; height: 21px; fill: none; stroke: currentColor;
    stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  }
  .tabbar-item span { font-size: 10.5px; line-height: 1; white-space: nowrap; }
  .tabbar-item.on { color: var(--primary); }
  .tabbar-item.on::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 34px; height: 2px; border-radius: 0 0 2px 2px; background: var(--primary);
  }
  .tabbar-item:active { background: #f4f6fb; }
  /* 内容区给底部导航让位：52px 导航 + iOS 安全区已由 env 计入导航自身，
     这里按最大情况预留，短页面 iframe 高度会按 contentViewH 自动收窄 */
  .frame-content { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ============================================================
   移动端定制卡片组件（大厂列表卡片口径，≤768 显示；桌面隐藏）
   · 页面在 load() 时同时渲染表格（桌面）与 .mcards-wrap 卡片（移动端）
   · 表格容器加 .m-pc-only：移动端隐藏；卡片容器 .mcards-wrap：桌面隐藏
   · 信息分层：头行（标题+状态标签）→ 关键字段行 → 长文本行 →
     小标签行（只显示有值的项）→ 底部操作行（等分按钮）
   ============================================================ */
.mcards-wrap { display: none; }
@media (max-width: 768px) {
  .m-pc-only { display: none !important; }
  .mcards-wrap { display: block; }
  .mcard {
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    padding: 12px 14px 6px; margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .04);
  }
  .mcard:last-child { margin-bottom: 0; }
  .mcard-head { display: flex; align-items: center; gap: 8px; }
  .mcard-title {
    flex: 1; min-width: 0; font-size: 15px; font-weight: 700; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .mcard-sub { font-size: 12px; color: var(--text-3); }
  .mcard-row {
    display: flex; flex-wrap: wrap; gap: 4px 16px;
    margin-top: 8px; font-size: 12.5px; color: var(--text-2);
  }
  .mcard-row b { color: var(--text); font-weight: 600; }
  .mcard-line { margin-top: 8px; font-size: 13px; line-height: 1.65; color: var(--text); word-break: break-all; }
  .mcard-line.muted2 { color: var(--text-3); font-size: 12.5px; }
  .mcard-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
  .mcard-tag {
    font-size: 11.5px; color: var(--text-2); background: #f4f6fb;
    border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; line-height: 1.5;
  }
  .mcard-tag b { color: var(--text); font-weight: 600; }
  .mcard-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
  .mcard-thumbs img {
    width: 48px; height: 48px; border-radius: 8px; object-fit: cover;
    border: 1px solid var(--line); cursor: zoom-in; background: #f1f5f9; display: block;
  }
  .mcard-foot { display: flex; border-top: 1px solid var(--line); margin-top: 11px; padding: 3px 0; }
  .mcard-foot a {
    flex: 1; text-align: center; font-size: 13.5px; padding: 6px 0;
    -webkit-tap-highlight-color: transparent;
  }
  .mcard-foot a + a { border-left: 1px solid var(--line); }
  /* 无操作按钮时隐藏底行 */
  .mcard-foot:empty { display: none; }
}
