/* ==========================================================
   明源云 (s-green 皮肤) 视觉还原 —— 尺寸取自源站真实样式表
   ------------------------------------------------------------
   本次「等比例」对照来源（均为源站 /_frontend 下的真实文件）：
     themes/default/main.css  布局尺寸（侧栏 210 / 导航 55 / 菜单项 50 …）
     themes/s-green/skin.css  配色（--my-green #44b549 等）
     3rd/miniui/miniui.css    控件基线（分页 28 / 表头行高 22 …）
     dist/css/controls.css    查询区（筛选按钮 30 / 搜索框 38 / 条件标签 13）
   ========================================================== */
:root {
  /* s-green 皮肤配色：全部取自 skin.css */
  --my-green: #44b549;
  --my-green-hover: #3da242;
  --my-green-dark: #1e8f51;
  --my-side-bg: #32ac69;
  --my-side-text: #d5d6d8;
  --my-body-bg: #e7e8eb;
  --my-border: #e7e8eb;
  --my-navbar-border: #ddd;
  --my-text: #222;
  --my-text-2: #555;
  --my-text-3: #777;
  --my-radius: 3px;

  /* 源站真实尺寸（themes/default/main.css） */
  --side-w: 210px;          /* .mp-layout_sidebar width */
  --side-w-min: 52px;       /* .mp-layout.collapse .mp-layout_sidebar */
  --side-menu-top: 106px;   /* .mp-sidemenu top（logo + 应用切换器） */
  --logo-h: 54px;           /* .mp-sidebar_logo-image max-height */
  --appswitch-h: 44px;      /* .mp-app_switch height/line-height */
  --menu-item-h: 50px;      /* .mp-sidemenu ul li a / .mp-submenu-title */
  --menu-font: 12px;        /* .mp-submenu-item a font-size */
  --navbar-h: 55px;         /* .mp-navbar height */
  --crumb-h: 54px;          /* .mp-navbar .mp-crumb height */
  --crumb-font: 16px;       /* .mp-navbar .mp-crumb font-size */
  --content-pad: 20px;      /* .p20 */
  --searchbox-h: 38px;      /* .mc-search-box__tree */
  --filterbtn-h: 30px;      /* .mc-filter-handler */
  --btn-font: 14px;         /* .mini-button-text */
  --grid-title-h: 36px;     /* .map-grid-title */
  --grid-head-lh: 22px;     /* .mini-grid-headerCell-inner */
  --grid-row-h: 32px;       /* 列表行高 */
  --pager-h: 28px;          /* .mini-pager height */
  --ctrl-h: 28px;           /* 表单控件高度 */

  --p0: #f86161;
  --p1: #f0a02a;
  --p2: #5ba1f5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background: var(--my-body-bg);
  color: var(--my-text);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===================== 左侧深色侧边栏 ===================== */
.mp-layout { display: flex; min-height: 100vh; }
.mp-layout_sidebar {
  width: var(--side-w);
  flex: none;
  background: var(--my-side-bg);
  color: var(--my-side-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 200;
  transition: width .16s;
  overflow: hidden;
}
.mp-layout.collapsed .mp-layout_sidebar { width: var(--side-w-min); }

/* logo 区，等同 .mp-sidebar_logo */
.mp-sidebar_logo {
  height: var(--logo-h);
  flex: none;
  background-color: var(--my-side-bg);
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px; overflow: hidden; white-space: nowrap;
}
.mp-sidebar_logo-image {
  width: 28px; height: 28px; flex: none; border-radius: var(--my-radius);
  background: #fff; color: var(--my-side-bg);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.mp-sidebar_logo-inner { color: #fff; font-size: 14px; font-weight: 600; }
.mp-sidebar_logo-inner small { display: block; font-size: 10px; color: rgba(255,255,255,.6); font-weight: 400; }

/* 应用切换器：源站 .mp-app_switch{height:44px;line-height:44px;padding-left:44px;padding-right:18px} */
.mp-app { flex: none; position: relative; }
.mp-app_switch {
  color: var(--my-side-text);
  height: var(--appswitch-h);
  line-height: var(--appswitch-h);
  padding: 0 18px 0 14px;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; white-space: nowrap;
  border-left: 3px solid transparent;
  border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.mp-app_switch:hover { background: rgba(0,0,0,.08); }
.mp-app_switch .icon { color: rgba(255,255,255,.6); font-size: 12px; }
.mp-app_switch .cur { flex: 1; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.mp-app_switch .arrow { font-size: 10px; transition: transform .15s; }
.mp-app.open .mp-app_switch .arrow { transform: rotate(180deg); }

/* 应用下拉面板 */
.mp-app_list-panel {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--my-side-bg);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  max-height: 72vh; overflow-y: auto;
}
.mp-app.open .mp-app_list-panel { display: block; }
.mp-app_list-title { padding: 7px 12px 4px; font-size: 11px; color: rgba(255,255,255,.55); }
.mp-app_item a, .mp-app_item span.app {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 12px; color: rgba(255,255,255,.75);
  cursor: pointer; white-space: nowrap; font-size: 13px;
}
.mp-app_item > a:hover, .mp-app_item span.app:hover { background-color: rgba(0,0,0,.12); }
.mp-app_item.active > a, .mp-app_item.active span.app { color: #fff; font-weight: 600; }
.mp-app_item { position: relative; }
.mp-app_item.active > a::before, .mp-app_item.active span.app::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--my-green);
}
.mp-app_item .cnt { margin-left: auto; font-size: 11px; color: rgba(255,255,255,.45); }
.mp-app_divider { border-top: 1px solid rgba(255,255,255,.15); margin: 6px 0; }

/* 菜单区：源站 .mp-sidemenu{top:106px} ul li a{height:50px;line-height:50px} */
.mp-sidemenu-box {
  flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 0 10px;
}
.mp-sidemenu-box::-webkit-scrollbar { width: 6px; }
.mp-sidemenu-box::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 3px; }
.mp-sidemenu ul { list-style: none; }
.mp-sidemenu-search { padding: 6px 10px 8px; }
.mp-sidemenu-search input {
  width: 100%; height: 26px; line-height: 26px;
  border: 1px solid rgba(255,255,255,.25); border-radius: var(--my-radius);
  background: rgba(0,0,0,.14); color: #fff; outline: none;
  padding: 0 8px; font-size: 12px; font-family: inherit;
}
.mp-sidemenu-search input::placeholder { color: rgba(255,255,255,.5); }
.mp-sidemenu-search input:focus { border-color: var(--my-green); background: rgba(0,0,0,.2); }

.mp-submenu-title {
  padding-left: 14px; padding-right: 10px;
  height: var(--menu-item-h); line-height: var(--menu-item-h);
  color: rgba(255,255,255,.85);
  font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.mp-submenu-title:hover { background-color: rgba(0,0,0,.1); }
.mp-submenu-title .arrow { font-size: 9px; color: rgba(255,255,255,.5); transition: transform .15s; }
.mp-submenu.open .mp-submenu-title .arrow { transform: rotate(90deg); }
.mp-submenu-title .cnt { margin-left: auto; font-size: 11px; color: rgba(255,255,255,.45); }

.mp-submenu-item > a, .mp-submenu-item > span.fn {
  display: block;
  height: var(--menu-item-h); line-height: var(--menu-item-h);
  padding: 0 12px 0 26px;
  font-size: var(--menu-font);
  color: rgba(255,255,255,.7);
  border-left: 3px solid transparent;
  cursor: pointer; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.mp-submenu-body { display: none; }
.mp-submenu.open .mp-submenu-body { display: block; }
.mp-submenu-item > a:hover, .mp-submenu-item > span.fn:hover { background: var(--my-green-dark); color: #fff; }
.mp-submenu-item > a.active, .mp-submenu-item > span.fn.active {
  background: var(--my-green-dark); border-left-color: var(--my-green); color: #fff;
}
.mp-submenu-item .dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  margin-right: 6px; vertical-align: 1px; flex: none;
}
.dot.P0 { background: var(--p0); } .dot.P1 { background: var(--p1); } .dot.P2 { background: var(--p2); }

.mp-sidebar_btn-collapse {
  flex: none; height: 34px; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-top: 1px solid rgba(255,255,255,.12); font-size: 12px;
}
.mp-sidebar_btn-collapse:hover { background-color: var(--my-green-dark); color: #fff; }
.mp-layout.collapsed .mp-app_switch .cur,
.mp-layout.collapsed .mp-sidebar_logo-inner,
.mp-layout.collapsed .mp-sidemenu-box,
.mp-layout.collapsed .mp-app_list-title,
.mp-layout.collapsed .mp-app_item .cnt { display: none; }
.mp-layout.collapsed .mp-submenu-item > span.fn { padding-left: 0; text-align: center; }

/* ===================== 右侧主体 ===================== */
.mp-layout_body {
  flex: 1; margin-left: var(--side-w);
  background-color: var(--my-body-bg);
  min-height: 100vh; transition: margin-left .16s;
  display: flex; flex-direction: column;
}
.mp-layout.collapsed .mp-layout_body { margin-left: var(--side-w-min); }

/* 面包屑导航条：源站 .mp-navbar{height:55px;border-bottom:1px solid #ddd}
                    .mp-navbar .mp-crumb{height:54px;line-height:54px;font-size:16px;left:15px} */
.mp-navbar {
  flex: none; height: var(--navbar-h);
  background: #fff; border-bottom: 1px solid var(--my-navbar-border);
  display: flex; align-items: center; padding: 0 15px;
  position: relative; z-index: 90;
}
.mp-navbar .mp-crumb {
  position: absolute; left: 15px; top: 0;
  height: var(--crumb-h); line-height: var(--crumb-h);
  font-size: var(--crumb-font); min-width: 100px;
}
.mp-navbar .mp-crumb ol { list-style: none; }
.mp-navbar .mp-crumb ol li {
  float: left; margin-right: 10px; position: relative;
  color: #222; font-size: var(--crumb-font); line-height: var(--crumb-h);
}
.mp-navbar .mp-crumb ol li a { color: #222; text-decoration: none; cursor: pointer; }
.mp-navbar .mp-crumb ol li a:hover { color: var(--my-green); }
.mp-navbar .mp-crumb ol li.active { color: #777; }
.mp-navbar .mp-crumb ol li .icon-arrow-right { margin-left: 5px; font-size: 12px; color: #bbb; }
.mp-navbar .nav-right {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  height: var(--navbar-h);
}
.mp-hamburger { display: none; cursor: pointer; font-size: 15px; color: #222; }

/* 内容区：源站 .mp-content{padding:0 10px 10px}
           .mp-content_view{min-width:970px;min-height:100%;border:1px solid #ddd;border-top:0;background:#fff} */
.mp-content {
  flex: 1; padding: 11px 10px 10px;
  background-color: var(--my-body-bg); overflow: auto;
}
/* 源站 .mp-content .mp-content_border{border-top:1px solid #ddd;margin-top:-1px} */
.mp-content_border { height: 1px; background: #ddd; }
.mp-content_view {
  box-sizing: border-box; min-width: 970px; min-height: 100%;
  border: 1px solid #ddd; border-top: 0; background-color: #fff; position: relative;
}
/* 源站 .p20{padding:20px} */
.p20 { padding: 20px; }
.page-foot { margin-top: 10px; color: var(--my-text-3); }

/* ===================== 页面容器（blank-content） ===================== */
.blank-content {
  background: #fff; border: 1px solid var(--my-border); border-radius: 2px;
  min-height: calc(100vh - var(--navbar-h) - 12px);
  display: flex; flex-direction: column;
}
.pad { padding: 12px 15px; }
.muted { color: var(--my-text-2); }
.tiny { color: var(--my-text-3); font-size: 12px; }
.en { font-family: Consolas, Monaco, monospace; }

/* ===================== 明源主/次按钮 =====================
   源站 .mini-button-text{padding:5px 15px;font-size:14px} */
.ms-button, .ms-button-white {
  display: inline-block;
  padding: 5px 15px;
  font-size: var(--btn-font);
  line-height: 1.5;
  font-family: inherit; white-space: nowrap;
  border-radius: var(--my-radius); cursor: pointer;
  border: 1px solid var(--my-green);
}
.ms-button { background-color: var(--my-green); color: #fff; }
.ms-button:hover { background-color: var(--my-green-hover); border-color: var(--my-green-hover); }
.ms-button-white { border-color: var(--my-border); background-color: #fff; color: #222; }
.ms-button-white:hover { background-color: #f4f5f9; border-color: #d5d8dd; color: #333; }
.ms-button[disabled], .ms-button-white[disabled] { opacity: .55; cursor: not-allowed; }

.btn-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ===================== 搜索/查询区（.miniux-search-box） =====================
   源站：.mc-search-box__tree{height:38px;border:1px solid #e7e7eb}
         .mc-filter-handler{height:30px;line-height:30px;margin-left:12px;color:#666} */
/* 源站 .mc-search-box__tree{height:38px;border:1px solid #e7e7eb;width:100%} */
.miniux-search-box { margin-bottom: 12px; }
.miniux-search-box .mc-search-box__tree {
  display: block; height: var(--searchbox-h); box-sizing: border-box;
  border: 1px solid #e7e7eb; border-bottom: 0; width: 100%; background: #fff;
}
.mc-search-box {
  display: flex; align-items: center; gap: 12px;
  height: 100%; padding: 0 12px; background: #fff;
}
.mc-search-box__project-filter {
  display: flex; align-items: center; gap: 6px;
  height: 100%; padding-right: 12px; border-right: 1px solid #e7e7eb;
}
.mc-search-box__project-filter select {
  height: var(--ctrl-h); border: 1px solid #dcdfe6; border-radius: var(--my-radius);
  padding: 0 6px; font-size: 13px; font-family: inherit; color: var(--my-text);
  outline: none; min-width: 130px; background: #fff;
}
/* 源站 .hc-search .el-input__inner{height:30px;border-radius:2px;padding:5px 10px 4px}
          .hc-search__button{position:absolute;right:1px;top:1px;width:30px;height:28px;border-left:1px solid #ddd} */
.mc-search-box__quick-find { position: relative; display: flex; align-items: center; flex: 1; max-width: 330px; }
.mc-search-box__quick-find input {
  height: 30px; flex: 1; min-width: 120px;
  border: 1px solid #ddd; border-radius: 2px;
  padding: 0 36px 0 10px; font-size: 13px; font-family: inherit; outline: none; color: #222;
}
.mc-search-box__quick-find input::placeholder { color: #bbb; }
.mc-search-box__quick-find input:hover { border-color: #d0d0d0; }
.mc-search-box__quick-find input:focus {
  border-color: #96c4ff; box-shadow: 0 0 4px rgba(150,196,255,.8);
}
.mc-search-box__quick-find .hc-search__button {
  position: absolute; right: 1px; top: 1px;
  width: 30px; min-width: 30px; height: 28px; padding: 0;
  border: 0; border-left: 1px solid #ddd; background: #fff;
  color: #9f9f9f; font-size: 13px; cursor: pointer; font-family: inherit;
}
.mc-search-box__quick-find .hc-search__button::before { content: '🔍'; font-size: 12px; }
.mc-search-box__quick-find .hc-search__button:hover { color: #34a6f8; }
.mc-filter-handler {
  display: inline-flex; align-items: center; gap: 4px;
  height: var(--filterbtn-h); line-height: var(--filterbtn-h);
  margin-left: auto; color: #666; cursor: pointer; font-size: 14px;
  padding: 0 10px; border-radius: var(--my-radius);
}
.mc-filter-handler:hover { color: var(--my-green); background: #f4f8f4; }
.mc-filter-handler .cnt { color: var(--my-green); font-size: 12px; }

/* 展开后的筛选条件面板（源站 table.mc-filter-controls） */
.mc-filter-wrap { border: 1px solid #e7e7eb; border-bottom: 0; }
.mc-filter-controls {
  width: 100%; border-collapse: collapse; background: #fafbfc;
}
.mc-filter-controls th.mc-filter-item__label {
  width: 130px; font-size: 13px; font-weight: 400; color: #777;
  text-align: left; padding-left: 12px; vertical-align: top; white-space: nowrap;
  border-bottom: 1px solid #f0f1f3;
}
.mc-filter-controls th.mc-filter-item__label > span { display: block; padding: 11px 0; }
.mc-filter-controls td.mc-filter-item__target {
  padding: 6px 12px 6px 0; border-bottom: 1px solid #f0f1f3;
}
.mc-filter-controls input, .mc-filter-controls select {
  height: var(--ctrl-h); width: 100%; max-width: 240px;
  border: 1px solid #dcdfe6; border-radius: var(--my-radius);
  padding: 0 8px; font-size: 13px; font-family: inherit; outline: none;
}
.mc-filter-controls input:focus, .mc-filter-controls select:focus { border-color: var(--my-green); }
.mc-filter-actions {
  padding: 10px 12px; display: flex; gap: 8px;
  background: #fafbfc; border-top: 1px solid #f0f1f3;
}

/* ===================== 列表头：状态页签 + 工具栏 =====================
   源站 .listheader-ul{background:#f4f5f9;border:1px solid #e7e7eb;border-bottom:0;padding:3px 20px}
        .listheader-ul li{float:left;border:1px solid #c9cace;padding:7px 20px;line-height:1;margin-right:-1px}
        .listheader-toolbar .miniux-button{margin:4px 6px 5px}
        高级模式左侧按钮：color:#34a6f8;透明底;左侧 1px×20px #e5e5e5 竖分隔线 */
.listheader { border: 0; position: relative; }
.listheader::after { content: ''; display: block; clear: both; }
.listheader-ul {
  background-color: #f4f5f9; border: 1px solid #e7e7eb; border-bottom: 0;
  padding: 3px 20px; list-style: none; overflow: hidden;
}
.listheader-ul:empty { display: none; }
.listheader-ul li {
  float: left; border: 1px solid #c9cace; padding: 7px 20px; line-height: 1;
  margin-right: -1px; position: relative; cursor: pointer;
  font-size: 13px; color: #222; background: #fff;
}
.listheader-ul li:hover { color: var(--my-green); }
.listheader-ul li.on {
  background: var(--my-green); border-color: var(--my-green); color: #fff; z-index: 1;
}
.mc-listheader { background: #f8f8fa; position: relative; border: 1px solid #e7e7eb; border-bottom: 0; }
.listheader-toolbar { padding: 0 18px; overflow: hidden; }
.toolbar-row { display: block; overflow: hidden; background: transparent; }
.toolbar-row::after { content: ''; display: block; clear: both; }
.toolbar-panel-left { float: left; }
.toolbar-panel-right { float: right; }
.toolbar-panel-center { float: left; }

/* 明源工具栏按钮：蓝色文字 + 竖分隔线 */
.miniux-button {
  position: relative; display: inline-block; box-sizing: content-box;
  height: 22px; line-height: 22px; font-size: 14px; font-weight: 400;
  text-align: center; vertical-align: middle; white-space: nowrap;
  cursor: pointer; background: transparent; border: 1px solid transparent;
  color: #34a6f8; margin: 4px 6px 5px; padding-left: 0; padding-right: 0;
  font-family: inherit; min-width: auto;
}
.miniux-button:hover { color: #2b8ed6; text-decoration: underline; }
.menubar-panel-item { position: relative; display: inline-block; vertical-align: middle; }
/* 源站 .miniux-button:before{content:'';position:absolute;left:-12px;top:5px;width:1px;height:20px;background:#e5e5e5} */
.menubar-panel-item + .menubar-panel-item > .miniux-button::before,
.menubar-panel-item + .menubar-panel-item.miniux-button::before {
  content: ''; position: absolute; left: -6px; top: 5px; width: 1px; height: 20px; background: #e5e5e5;
}
.toolbar-tip { font-size: 13px; color: var(--my-text-3); margin-right: 6px; }
.toolbar-tip b { color: var(--my-green); font-weight: 600; }

/* 「更多」下拉组 */
.miniux-button-group { padding-right: 14px; }
.miniux-button-group > .caret { font-size: 10px; color: #34a6f8; margin-left: 2px; }
.miniux-button-group > .child-menus { display: none; }
/* .open 由 function.js 点击切换 —— 只靠 :hover 时鼠标稍快就整个错过这个下拉 */
.miniux-button-group:hover > .child-menus,
.miniux-button-group.open > .child-menus {
  display: block; position: absolute; left: -6px; top: 100%; z-index: 120;
  background: #fff; border: 1px solid #e7e7eb; box-shadow: 0 4px 12px rgba(0,0,0,.12);
  min-width: 120px; padding: 4px 0;
}
.miniux-button-group.open > .txt { color: #2b8ed6; }
.miniux-button-group.open > .caret { transform: rotate(180deg); display: inline-block; }
.miniux-button-group > .child-menus .miniux-button.dis,
.miniux-button-group > .child-menus .miniux-button.dis:hover {
  color: #b8bcc4; cursor: not-allowed; background: transparent; text-decoration: none;
}
.miniux-button-group > .child-menus ul { list-style: none; }
.miniux-button-group > .child-menus li { display: block; }
.miniux-button-group > .child-menus .miniux-button {
  display: block; width: 100%; text-align: left; padding: 0 14px; margin: 0; color: #222;
}
.miniux-button-group > .child-menus .miniux-button:hover { background: #f4f5f9; text-decoration: none; }
.miniux-button-group > .child-menus .miniux-button::before { display: none; }

/* ===================== 数据网格（#appGrid.map-grid） ===================== */
.map-grid { width: 100%; display: block; box-sizing: border-box; overflow-x: hidden; }
/* 源站 .map-grid .mini-grid-border{border:1px solid #e5e5e5;border-bottom:none;position:relative} */
.mini-grid-border { border: 1px solid #e5e5e5; position: relative; }
/* 源站 .map-grid-title{height:36px;line-height:30px;font-size:15px;background:#f8f8fa} */
.map-grid-title {
  display: flex; align-items: center; gap: 10px;
  height: var(--grid-title-h); line-height: 30px;
  padding: 3px 10px; font-size: 15px; font-weight: 600;
  background-color: #f8f8fa; border-bottom: 1px solid var(--my-border);
}
.map-grid-title .count { font-size: 12px; font-weight: 400; color: var(--my-text-3); margin-left: 8px; }
.map-grid-title .count b { color: var(--my-green); }
.map-grid-title .sp { flex: 1; }
/* 源站 .map-grid-refresh{width:17px;height:24px;float:right;margin-right:4px;cursor:pointer} */
.map-grid-refresh {
  width: 17px; height: 24px; cursor: pointer; color: #999; font-size: 15px;
  display: grid; place-items: center; margin-right: 4px;
}
.map-grid-refresh::before { content: '⟳'; }
.map-grid-refresh:hover { color: var(--my-green); }

.grid-wrap { overflow: auto; }

table.grid {
  display: table; /* 兜底：防止页面里其它 .grid 工具类（display:grid）误命中数据表格导致整表错位 */
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 13px; background: #fff;
}
/* 源站 .mini-grid-headerCell-inner{line-height:22px}；单元格只画右/下边框（外框由 .mini-grid-border 提供）。
   注意：必须用 border-collapse:separate —— collapse + sticky 操作列在 Chrome 下会绘制错乱 */
table.grid th {
  line-height: var(--grid-head-lh);
  background: #f7f8fa;
  border-right: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
  padding: 7px 9px; text-align: left; font-weight: 600; color: #333;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
table.grid td {
  height: var(--grid-row-h);
  border-right: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
  padding: 4px 9px; color: #333;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
table.grid th.num { text-align: right; }
table.grid th:not(.rowtoolbar):not(.center) { cursor: pointer; }
table.grid th.center { text-align: center; }
table.grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid td.date, table.grid td.center { text-align: center; }
table.grid th .sort { font-style: normal; font-size: 9px; color: var(--my-green); margin-left: 3px; }
table.grid tbody tr:nth-child(even) { background: #fafbfc; }
table.grid tbody tr:hover { background: #eef8ef; }
table.grid tbody tr.sel { background: #e6f5ea; }
/* 本页合计（金额/数量列） */
table.grid tfoot td {
  background: #f7f8fa; border-right: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5;
  padding: 4px 9px; font-weight: 600; color: #333; white-space: nowrap;
}
table.grid tfoot tr.sum td:first-child { color: var(--my-text-2); font-weight: 400; }
/* 右侧固定操作列（源站 .map-rowtoolbar-container） */
table.grid th.rowtoolbar, table.grid td.rowtoolbar {
  position: sticky; right: 0; background: #fff; z-index: 2;
  text-align: center; white-space: nowrap;
}
table.grid th.rowtoolbar { background: #f7f8fa; }
table.grid tbody tr:nth-child(even) td.rowtoolbar { background: #fafbfc; }
table.grid tbody tr:hover td.rowtoolbar { background: #eef8ef; }
.grid-empty { padding: 46px 0; text-align: center; color: var(--my-text-3); }

/* 默认表格（通用外观） */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border: 1px solid var(--my-border); padding: 6px 9px; text-align: left; }
th { background: #f5f7fa; font-weight: 600; color: #333; }

/* ===================== 分页（源站 .mini-pager{height:28px}） ===================== */
.mini-pager {
  display: flex; align-items: center; gap: 6px;
  min-height: var(--pager-h); padding: 6px 12px;
  border-top: 1px solid var(--my-border); background: #fff; flex-wrap: wrap;
}
.mini-pager .pg-info { color: var(--my-text-3); font-size: 12px; }
.mini-pager .pg-btn {
  min-width: 26px; height: 22px; line-height: 20px; text-align: center; padding: 0 6px;
  border: 1px solid #dcdfe6; background: #fff; cursor: pointer;
  border-radius: var(--my-radius); color: #333; font-size: 12px;
}
.mini-pager .pg-btn:hover { border-color: var(--my-green); color: var(--my-green); }
.mini-pager .pg-btn.on { background: var(--my-green); border-color: var(--my-green); color: #fff; }
.mini-pager .pg-btn[disabled] { color: #bbb; cursor: not-allowed; border-color: #e4e7ed; }
.mini-pager .pg-jump { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--my-text-3); }
.mini-pager .pg-jump input {
  width: 38px; height: 22px; text-align: center;
  border: 1px solid #dcdfe6; border-radius: var(--my-radius); outline: none; font-family: inherit;
}
.mini-pager .sp { flex: 1; }

/* 轻量提示条（明源 messagebox 简化版） */
.mp-toast {
  display: none; position: fixed; left: 50%; top: 76px; transform: translateX(-50%);
  z-index: 1200; background: rgba(34,34,34,.9); color: #fff;
  padding: 8px 18px; border-radius: 3px; font-size: 13px; max-width: 70vw;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.mp-toast.show { display: block; }

/* 标签 / 徽标 */
.tag { display: inline-block; font-size: 11px; padding: 0 8px; border-radius: 9px; margin-right: 5px; line-height: 17px; }
.tag.P0 { background: #fdeaea; color: var(--p0); }
.tag.P1 { background: #fdf3e2; color: #a86a00; }
.tag.P2 { background: #eaf2fd; color: #3179ef; }
.tag.c  { background: #eaf6ec; color: var(--my-green); }
.tag.gray { background: #f1f3f5; color: var(--my-text-2); }
.pill { display: inline-block; background: #f4f5f9; border: 1px solid var(--my-border); border-radius: 11px; padding: 0 10px; margin: 3px 5px 3px 0; font-size: 12px; line-height: 19px; color: var(--my-text-2); }
.state {
  display: inline-block; padding: 0 7px; border-radius: 2px; font-size: 11px; line-height: 17px;
  background: #eaf6ec; color: #28a745; border: 1px solid #cde8d4;
}
.state.gray { background: #f1f3f5; color: #777; border-color: var(--my-border); }
.state.blue { background: #eaf2fd; color: #3179ef; border-color: #cfe0fb; }
.state.red  { background: #fdeaea; color: var(--p0); border-color: #f7cfcf; }
.state.orange { background: #fdf3e2; color: #a86a00; border-color: #f5e0bd; }

/* 卡片 / KPI */
.card { background: #fff; border: 1px solid var(--my-border); border-radius: 2px; padding: 14px; margin-bottom: 10px; }
.card h2 { font-size: 14px; margin-bottom: 3px; }
.card h3 { font-size: 13px; color: var(--my-text-2); margin: 12px 0 6px; font-weight: 600; }
.kpis { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.kpi { background: #fff; border: 1px solid var(--my-border); border-radius: 2px; padding: 12px 20px; min-width: 110px; }
.kpi b { display: block; font-size: 21px; color: var(--my-green); font-weight: 600; }
.kpi span { font-size: 12px; color: var(--my-text-3); }
.notice { background: #fff8e6; border: 1px solid #f5e0bd; border-radius: 2px; padding: 9px 12px; font-size: 12px; color: #a86a00; margin-bottom: 10px; }
.notice.ok { background: #eaf6ec; border-color: #cde8d4; color: #28a745; }
/* 卡片网格仅限 .card 容器内（appview 模块功能点用）；
   不能写成裸 .grid —— 会命中列表数据表 table.grid，把表格 display 改成 grid 导致整表错位 */
.card .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tile { background: #fff; border: 1px solid var(--my-border); border-radius: 2px; padding: 13px 15px; cursor: pointer; transition: .12s; }
.tile:hover { border-color: var(--my-green); box-shadow: 0 2px 8px rgba(68,181,73,.12); }
.tile .ic { font-size: 19px; }
.tile .nm { font-weight: 600; margin-top: 3px; }
.tile .mt { font-size: 12px; color: var(--my-text-3); margin-top: 2px; }
.tile .bar { height: 4px; border-radius: 2px; background: #eef1f4; margin-top: 8px; overflow: hidden; }
.tile .bar i { display: block; height: 100%; background: var(--my-green); }
.empty { text-align: center; color: var(--my-text-3); padding: 40px 0; }
a.lnk { color: var(--my-green); cursor: pointer; text-decoration: none; margin-right: 8px; font-size: 13px; }
a.lnk:hover { text-decoration: underline; }
a.lnk.dis { color: #bbb; cursor: not-allowed; }
a.lnk.dis:hover { text-decoration: none; }
/* 状态不满足时按钮置灰但不移除（明源按钮序列保持不变） */
.miniux-button[disabled], .miniux-button.dis {
  color: #bbb; cursor: not-allowed; text-decoration: none;
}
.miniux-button[disabled]:hover, .miniux-button.dis:hover { color: #bbb; text-decoration: none; }
table.kv { width: 100%; border-collapse: collapse; font-size: 13px; }
table.kv th, table.kv td { border: 1px solid var(--my-border); padding: 6px 9px; text-align: left; }
table.kv th { background: #f5f7fa; font-weight: 600; color: #333; width: 190px; }

/* 表单 / 弹窗 */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px 14px; }
.fitem { display: flex; align-items: center; gap: 8px; }
.fitem > label {
  width: 120px; flex: none; color: var(--my-text-2); text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px;
}
.fitem input, .fitem select, .fitem textarea {
  flex: 1; height: var(--ctrl-h); line-height: calc(var(--ctrl-h) - 2px);
  border: 1px solid #dcdfe6; border-radius: var(--my-radius);
  padding: 0 8px; font-size: 13px; color: var(--my-text); outline: none; font-family: inherit; width: 100%;
}
.fitem textarea { height: 56px; line-height: 1.5; padding: 4px 8px; resize: vertical; }
.fitem input:focus, .fitem select:focus, .fitem textarea:focus { border-color: var(--my-green); }
.fitem input[readonly], .fitem select:disabled, .fitem textarea[readonly] {
  background: #fafbfc; color: var(--my-text-3); cursor: not-allowed;
}
.fitem input.err, .fitem select.err, .fitem textarea.err {
  border-color: var(--p0); background: #fff7f7;
}
.req::before { content: '*'; color: var(--p0); margin-right: 2px; }

/* 单据表单分组（对齐明源「单据信息/金额信息/申请信息」分段） */
.fgroup { border: 1px solid var(--my-border); border-radius: 2px; margin-bottom: 12px; background: #fff; }
.fgroup + .fgroup { margin-top: 0; }
.fgroup-hd {
  background: #f7f8fa; border-bottom: 1px solid var(--my-border);
  padding: 6px 12px; font-size: 13px; font-weight: 600; color: #333;
}
.fgroup .form-grid {
  padding: 12px; gap: 10px 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.fgroup .fitem.wide { grid-column: 1 / -1; align-items: flex-start; }
.fgroup .fitem.wide > label { padding-top: 5px; }

.mp-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 900; }
.mp-mask.show { display: block; }
.mp-dialog {
  display: none; position: fixed; z-index: 901; left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  background: #fff; border-radius: 3px; width: 860px; max-width: 94vw;
  max-height: 88vh; overflow: auto; box-shadow: 0 6px 24px rgba(0,0,0,.24);
}
.mp-dialog.show { display: block; }
/* 源站 .mini-panel-header{background:#E3E6E8;font-weight:bold} */
.mp-dialog-hd {
  height: 42px; line-height: 42px; padding: 0 14px;
  border-bottom: 1px solid var(--my-border);
  background: #f3f4f6; font-size: 14px; font-weight: 600;
  display: flex; align-items: center;
}
.mp-dialog-hd .x { margin-left: auto; cursor: pointer; color: var(--my-text-3); font-size: 16px; }
.mp-dialog-bd { padding: 15px; }
.mp-dialog-ft {
  padding: 10px 14px; border-top: 1px solid var(--my-border); background: #fafbfc;
  text-align: right; display: flex; gap: 8px; justify-content: flex-end;
}

/* ===== 全屏表单模式（form.layout = "page"） =====
   源系统这些单据页以「小弹窗」呈现，字段一多就要在 860px 里挤成一团。
   规格里声明 form.layout="page" 的页面，把共用弹窗升级成整页面板：
   面板从侧边栏右侧、面包屑下方铺到右下角 —— 左侧菜单与顶部面包屑保持可见，
   头部与底部操作条吸附，中间内容区独立滚动。
   注意：#dialog 是全局共用的，page-mode 必须在关闭时摘掉，
   否则下一个用同一个容器的弹窗（如附件面板）会继承全屏尺寸。 */
.mp-dialog.page-mode {
  left: var(--side-w); top: var(--navbar-h);
  transform: none;
  width: calc(100% - var(--side-w));
  height: calc(100% - var(--navbar-h));
  max-width: none; max-height: none; border-radius: 0;
  box-shadow: none; flex-direction: column; overflow: hidden;
}
/* 侧边栏收起时让出 52px 而不是 210px（:has 不支持的老内核退化为固定 210px，仅多留白） */
body:has(.mp-layout.collapsed) .mp-dialog.page-mode {
  left: var(--side-w-min); width: calc(100% - var(--side-w-min));
}
/* 全屏下遮罩只压暗到底色级别：左侧菜单要留在视野里，不能像小弹窗那样盖成黑的 */
.mp-mask.page-mode { background: rgba(15, 23, 42, .08); }
.mp-dialog.page-mode.show { display: flex; }
.mp-dialog.page-mode .mp-dialog-hd {
  position: sticky; top: 0; z-index: 2;
  height: 52px; line-height: 52px; padding: 0 20px;
  font-size: 15px; background: #fff;
}
.mp-dialog.page-mode .mp-dialog-hd .x { font-size: 18px; padding: 0 6px; }
.mp-dialog.page-mode .mp-dialog-bd {
  flex: 1; overflow: auto; padding: 18px 20px 24px;
  background: #f5f7fa;
}
.mp-dialog.page-mode .mp-dialog-bd .form-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.mp-dialog.page-mode .mp-dialog-ft {
  position: sticky; bottom: 0; z-index: 2;
  padding: 12px 20px; background: #fff;
  box-shadow: 0 -2px 8px rgba(0,0,0,.06);
}
/* 明细子表在全屏下给足宽度，避免金额列被挤断 */
.mp-dialog.page-mode .detail-table { min-width: 0; }

/* ===== 附件在线预览层（图片 / PDF / 文本） =====
   与 #dialog 分开的独立浮层，避免抢占共用弹窗容器。 */
.at-pv {
  display: none; position: fixed; inset: 0; z-index: 950;
  background: rgba(15,22,35,.55); align-items: center; justify-content: center;
}
.at-pv.show { display: flex; }
.at-pv-box {
  background: #fff; border-radius: 6px; width: min(900px, 94vw);
  max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 18px 48px rgba(0,0,0,.3);
}
.at-pv-hd {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--my-border); font-size: 14px; font-weight: 600;
}
.at-pv-hd .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-pv-hd a, .at-pv-hd .x { cursor: pointer; font-weight: 400; font-size: 13px; color: var(--my-green); }
.at-pv-hd .x { color: var(--my-text-3); font-size: 18px; }
.at-pv-bd { flex: 1; overflow: auto; background: #f0f2f5; padding: 14px; text-align: center; }
.at-pv-bd img { max-width: 100%; border-radius: 4px; }
.at-pv-bd iframe { width: 100%; height: 68vh; border: 0; background: #fff; border-radius: 4px; }
.at-pv-bd pre {
  text-align: left; background: #fff; padding: 18px; border-radius: 4px;
  font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-all;
}
.at-pv-tip { color: var(--my-text-3); font-size: 13px; line-height: 2; }

/* ===================== 移动端（企业微信内嵌） ===================== */
@media (max-width: 768px) {
  .mp-layout.collapsed .mp-layout_body, .mp-layout_body { margin-left: 0; }
  .mp-layout_sidebar { transform: translateX(-100%); width: 78%; }
  .mp-layout_sidebar.show { transform: translateX(0); }
  .mp-hamburger { display: block; }
  .mp-navbar .mp-crumb { left: 44px; font-size: 14px; }
  .mp-content { padding: 8px; }
  .mp-content_view { min-width: 0; }
  .p20 { padding: 10px; }
  .mc-search-box { flex-wrap: wrap; height: auto; padding: 8px 10px; gap: 8px; }
  .mc-search-box__project-filter { border-right: none; padding-right: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .fitem > label { width: 90px; }
  .mp-dialog { width: 96vw; }
  /* 移动端侧边栏是抽屉式的，全屏表单直接铺满视口 */
  .mp-dialog.page-mode, body:has(.mp-layout.collapsed) .mp-dialog.page-mode {
    left: 0; top: 0; width: 100%; height: 100%;
  }
  .mp-dialog.page-mode .mp-dialog-bd { padding: 12px; }
  .mp-dialog.page-mode .mp-dialog-bd .form-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   OA 门户首页（workbench）
   ------------------------------------------------------------
   仅服务于首页，class 统一 .oa- 前缀，不复用 .card/.tile/.kpi，
   配色沿用 :root 的 s-green 变量与 --p0/--p1/--p2 优先级色。
   参考尺寸：卡片间距 10px / 卡片内边距 14px / 板块标题 14px /
             列表行高 34px / 次级文字 12px(--my-text-3)
   ========================================================== */

/* 顶部欢迎条 */
.oa-hero {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; margin-bottom: 10px;
  background: linear-gradient(90deg, var(--my-side-bg), var(--my-green));
  border-radius: var(--my-radius); color: #fff;
}
.oa-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: #fff; color: var(--my-green-dark);
  font-size: 20px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
}
.oa-hero-l { min-width: 0; }
.oa-hero-name { font-size: 17px; font-weight: 600; line-height: 1.4; }
.oa-hero-role { font-size: 13px; font-weight: 400; opacity: .9; }
.oa-hero-sub { display: block; font-size: 12px; margin-top: 3px; color: rgba(255, 255, 255, .88); }
.oa-hero-r { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.oa-hero-date { text-align: right; font-size: 12px; line-height: 1.6; color: rgba(255, 255, 255, .95); }
.oa-hero-btn {
  font-family: inherit; font-size: 13px; cursor: pointer; white-space: nowrap;
  padding: 5px 14px; border-radius: var(--my-radius);
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .55); color: #fff;
}
.oa-hero-btn:hover { background: #fff; color: var(--my-green-dark); }

/* 数字卡片 */
.oa-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.oa-stat {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  background: #fff; border: 1px solid var(--my-border); border-radius: 2px;
  padding: 12px 14px; transition: .15s;
}
.oa-stat:hover { border-color: #d5d8dd; box-shadow: 0 2px 10px rgba(0, 0, 0, .08); transform: translateY(-1px); }
.oa-stat-ic {
  width: 38px; height: 38px; border-radius: var(--my-radius); flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
}
.oa-stat-ic.c1 { background: var(--my-green); }
.oa-stat-ic.c2 { background: var(--p1); }
.oa-stat-ic.c3 { background: var(--p2); }
.oa-stat-ic.c4 { background: #7a6ff0; }
.oa-stat-n { display: block; font-size: 22px; font-weight: 600; line-height: 1.15; }
.oa-stat-t { display: block; font-size: 12px; color: var(--my-text-3); margin-top: 2px; }
.oa-stat-i { margin-left: auto; font-size: 14px; color: #c9ccd1; }

/* 主体三栏：左主（约 62%）右辅（约 38%） */
.oa-cols { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 10px; align-items: start; margin-bottom: 10px; }
.oa-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* 通用板块卡片 */
.oa-card { background: #fff; border: 1px solid var(--my-border); border-radius: 2px; }
.oa-mb { margin-bottom: 10px; }
.oa-hd { height: 42px; padding: 0 14px; display: flex; align-items: center; border-bottom: 1px solid var(--my-border); }
.oa-hd-t { position: relative; padding-left: 10px; font-size: 14px; font-weight: 600; }
.oa-hd-t::before {
  content: ''; position: absolute; left: 0; top: 2px; bottom: 2px;
  width: 3px; border-radius: 2px; background: var(--my-green);
}
.oa-hd-x { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.oa-more { font-size: 12px; color: var(--my-text-3); cursor: pointer; }
.oa-more:hover { color: var(--my-green); }
.oa-empty { padding: 22px 0; text-align: center; font-size: 12px; color: var(--my-text-3); }

/* 列表行（待办 / 审批） */
.oa-bd { padding: 4px 0; }
.oa-row {
  display: flex; align-items: center; gap: 8px;
  min-height: 34px; padding: 4px 14px; cursor: pointer;
  border-bottom: 1px dashed #f0f1f3;
}
.oa-row:last-child { border-bottom: 0; }
.oa-row:hover { background: #f7fbf7; }
.oa-prio { display: inline-block; width: 3px; height: 14px; border-radius: 2px; flex: none; background: var(--p2); }
.oa-prio.P0 { background: var(--p0); }
.oa-prio.P1 { background: var(--p1); }
.oa-prio.P2 { background: var(--p2); }
.oa-row-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-row-t b { font-weight: 600; margin-right: 6px; }
.oa-row-m { flex: none; font-size: 12px; color: var(--my-text-3); }
.oa-amt { font-family: Consolas, Monaco, monospace; color: var(--my-text-2); }
.oa-act { flex: none; font-size: 12px; color: var(--my-green); padding: 0 4px; }
.oa-row:hover .oa-act { text-decoration: underline; }

/* 通知公告 */
.oa-notice {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px; cursor: pointer;
  border-bottom: 1px dashed #f0f1f3;
}
.oa-notice:last-child { border-bottom: 0; }
.oa-notice:hover { background: #f7fbf7; }
.oa-new { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--p0); flex: none; }
.oa-notice-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oa-notice-d { flex: none; font-size: 12px; color: var(--my-text-3); font-family: Consolas, Monaco, monospace; }

/* 今日日程时间轴 */
.oa-tl { padding: 10px 14px 12px; }
.oa-tl-item { display: flex; gap: 10px; padding: 5px 0; }
.oa-tl-time { flex: none; width: 96px; font-size: 12px; color: var(--my-text-2); font-family: Consolas, Monaco, monospace; }
.oa-tl-dot { position: relative; flex: none; width: 10px; }
.oa-tl-dot::before {
  content: ''; position: absolute; left: 1px; top: 6px;
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
  border: 2px solid var(--my-green);
}
.oa-tl-dot::after {
  content: ''; position: absolute; left: 5px; top: 15px; bottom: -12px;
  width: 1px; background: var(--my-border);
}
.oa-tl-item:last-child .oa-tl-dot::after { display: none; }
.oa-tl-b { min-width: 0; }
.oa-tl-title { display: block; font-size: 13px; }
.oa-tl-place { display: block; font-size: 12px; color: var(--my-text-3); margin-top: 2px; }

/* 团队通讯录 */
.oa-contact { display: flex; align-items: center; gap: 10px; padding: 6px 14px; cursor: pointer; }
.oa-contact:hover { background: #f7fbf7; }
.oa-av {
  position: relative; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: #eaf6ec; color: var(--my-green-dark); font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.oa-av .st {
  position: absolute; right: -1px; bottom: -1px;
  width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #fff;
}
.oa-av .st.on { background: #28c445; }
.oa-av .st.busy { background: var(--p1); }
.oa-av .st.off { background: #c4c8ce; }
.oa-contact-n { display: block; font-size: 13px; }
.oa-contact-d { display: block; font-size: 12px; color: var(--my-text-3); }

/* 常用流程九宫格 */
.oa-flows { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px 14px 14px; }
.oa-flow { text-align: center; padding: 10px 4px; cursor: pointer; border: 1px solid transparent; border-radius: var(--my-radius); }
.oa-flow:hover { background: #f7fbf7; border-color: #e3f0e4; }
.oa-flow-ic { font-size: 20px; line-height: 1.2; }
.oa-flow-n { font-size: 12px; color: var(--my-text-2); margin-top: 4px; }

/* 快捷入口 */
.oa-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; padding: 12px 14px 14px; }
.oa-app {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border: 1px solid var(--my-border); border-radius: 2px; padding: 10px 12px; transition: .15s;
}
.oa-app:hover { border-color: var(--my-green); box-shadow: 0 2px 8px rgba(68, 181, 73, .12); }
.oa-app-ic {
  width: 34px; height: 34px; border-radius: var(--my-radius); flex: none;
  background: #eaf6ec; color: var(--my-green-dark); font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.oa-app-n { display: block; font-size: 13px; font-weight: 600; }
.oa-app-m { display: block; font-size: 12px; color: var(--my-text-3); margin-top: 2px; }

/* 本月业务概览（CSS 手绘柱状图，不引第三方图表库） */
.oa-chart-wrap { padding: 14px; }
.oa-chart { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding: 0 4px; border-bottom: 1px solid var(--my-border); }
.oa-chart-col {
  flex: 1; height: 100%; padding-top: 26px; /* 顶部留出数值标签位，柱高按百分比撑满剩余高度 */
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px;
}
.oa-bar-v { font-size: 12px; color: var(--my-text-2); font-family: Consolas, Monaco, monospace; }
.oa-bar { width: 60%; max-width: 46px; min-height: 4px; border-radius: 3px 3px 0 0; }
.oa-chart-col:hover .oa-bar { filter: brightness(1.08); }
.oa-chart-x { display: flex; gap: 10px; padding: 8px 4px 0; }
.oa-chart-x span { flex: 1; text-align: center; font-size: 12px; color: var(--my-text-3); }
.oa-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--my-border); }
.oa-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.oa-legend span { font-size: 12px; color: var(--my-text-2); }

/* ===================== OA 门户：移动端塌陷 ===================== */
@media (max-width: 768px) {
  .oa-hero { flex-wrap: wrap; padding: 12px; }
  .oa-hero-r { margin-left: 0; width: 100%; flex-wrap: wrap; justify-content: flex-end; }
  .oa-hero-date { text-align: left; margin-right: auto; }
  .oa-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oa-cols { grid-template-columns: minmax(0, 1fr); }
  .oa-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oa-chart { height: 140px; gap: 6px; }
  .oa-tl-time { width: 78px; }
  .oa-row { flex-wrap: wrap; }
  .oa-row-m:nth-of-type(1) { flex: 1; }
}

/* ===================================================================
   报销/业务类别面板（明源「费用报销列表」左侧面板）
   真实页结构：公司/项目 下拉 → 面板标题 → 类别列表（圆图标 + 名称 + 新增）
   =================================================================== */
.map-grid.with-cate { display: flex; align-items: flex-start; gap: 12px; }
.map-grid .map-grid-main { flex: 1; min-width: 0; }
.map-cate-panel {
  width: 250px; flex-shrink: 0;
  background: #fff; border: 1px solid #ddd;
  align-self: stretch;
}
.map-cate-scope { padding: 10px; border-bottom: 1px solid #e5e5e5; }
.map-cate-scope select {
  width: 100%; height: var(--ctrl-h); padding: 0 6px;
  border: 1px solid #d9d9d9; border-radius: 2px; font-size: 12px; color: #333;
  background: #fff;
}
.map-cate-scope select:focus { outline: none; border-color: #96c4ff; box-shadow: 0 0 3px #96c4ff; }
.map-cate-hd { padding: 12px 12px 6px; font-size: 14px; font-weight: 600; color: #333; }
.map-cate-list { list-style: none; margin: 0; padding: 2px 0 10px; }
.map-cate-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; font-size: 13px; color: #333; cursor: pointer;
}
.map-cate-list li:hover { background: #f5f6f8; }
.map-cate-list li.on { background: #e8f3fd; }
.map-cate-ico {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: #4da1f0; color: #fff; font-size: 12px; line-height: 22px;
  text-align: center;
}
.map-cate-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-cate-add { color: #34a6f8; font-size: 12px; flex-shrink: 0; }
.map-cate-add:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .map-grid.with-cate { flex-direction: column; }
  .map-cate-panel { width: 100%; }
}

/* ===================================================================
   应用切换宫格面板（v2）
   修复：① cur-app 与父级双重绑定导致 toggle 互相抵消（表现为只有小图标可点）
        ② 应用行 cnt 取了不存在的 a.functions 显示 undefined
   现为：2 列宫格卡片，整卡可点（含键盘），当前应用高亮
   =================================================================== */
.mp-app_grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px 8px 8px; }
.mp-app_card {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 4px 8px; border-radius: 4px; cursor: pointer;
  color: rgba(255,255,255,.78); text-align: center;
  border: 1px solid transparent; user-select: none; min-width: 0;
}
.mp-app_card:hover { background: rgba(0,0,0,.16); color: #fff; }
.mp-app_card:focus-visible { outline: 2px solid rgba(255,255,255,.6); outline-offset: -2px; }
.mp-app_card.active { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); color: #fff; font-weight: 600; }
.mp-app_card-icon { font-size: 22px; line-height: 1.25; }
.mp-app_card-name {
  font-size: 12px; line-height: 1.3; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mp-app_card-cnt { font-size: 10px; color: rgba(255,255,255,.5); font-weight: 400; }
.mp-app_card.active .mp-app_card-cnt { color: rgba(255,255,255,.78); }
/* 侧栏收起时面板按固定宽度浮出，避免被压成一条 */
.mp-layout.collapsed .mp-app_list-panel { right: auto; width: 210px; }

/* ===================================================================
   单据明细子表（报销明细「添加消费」/ 分摊信息「新增分摊·默认分摊」）
   采用 CSS Grid：行用 display:contents 直接挂到父网格，
   保证表头 / 数据行 / 合计行列宽严格对齐，且整块可横向滚动。
   =================================================================== */
.fgroup .form-grid { row-gap: 16px; }

.fitem { position: relative; }
/* 灰色辅助提示（如「若该报销提前做了申请，请选择对应的申请单」） */
.fitem > .fhint {
  position: absolute; left: 128px; top: 100%; margin-top: -1px;
  max-width: calc(100% - 128px); font-size: 11px; line-height: 1.4;
  color: var(--my-text-3); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.fitem.wide > .fhint { left: 0; top: auto; position: static; margin-top: 4px; max-width: 100%; }

/* 明细子表独占整行：标题在上，表格在下 */
.fitem.wide.detail-item { flex-direction: column; align-items: stretch; gap: 6px; }
.fitem.wide.detail-item > label {
  width: auto; text-align: left; font-weight: 600; color: var(--my-text); font-size: 13px;
}
.dt-wrap { display: block; }
.dt-actions { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; flex-wrap: wrap; }
.dt-add {
  height: 26px; padding: 0 10px; font-size: 12px; cursor: pointer; font-family: inherit;
  border: 1px solid var(--my-green); background: #fff; color: var(--my-green);
  border-radius: var(--my-radius); line-height: 24px;
}
.dt-add:hover { background: var(--my-green); color: #fff; }
.dt-add:active { box-shadow: inset 0 1px 3px rgba(0,0,0,.15); }
.dt-add2 { border-color: #c0c4cc; color: var(--my-text-2); }
.dt-add2:hover { background: #f0f2f5; color: var(--my-text); border-color: #c0c4cc; }

.detail-table {
  --dt-cols: 6;
  display: grid;
  grid-template-columns: repeat(var(--dt-cols), minmax(96px, 1fr)) 44px;
  border: 1px solid var(--my-border); border-top-color: #d8dbe0;
  border-radius: var(--my-radius); background: #fff; overflow: auto; max-height: 320px;
}
.dt-row { display: contents; }
.dt-cell {
  display: flex; align-items: center; min-width: 0; padding: 5px 8px;
  border-right: 1px solid var(--my-border); border-bottom: 1px solid var(--my-border);
  font-size: 13px; color: var(--my-text);
}
.dt-cell:last-child, .dt-op { border-right: 0; }
.dt-head > .dt-cell {
  background: #f7f8fa; font-weight: 600; color: #333;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
  padding: 7px 8px; position: sticky; top: 0; z-index: 1;
}
.dt-row:last-child > .dt-cell { border-bottom: 0; }
.dt-lbl.req::before { content: '*'; color: var(--p0); margin-right: 2px; }
.dt-cell input, .dt-cell select {
  width: 100%; min-width: 0; height: 28px; font-size: 12px; font-family: inherit;
  border: 1px solid #dcdfe6; border-radius: 2px; padding: 0 6px;
  color: var(--my-text); outline: none; background: #fff;
}
.dt-cell input:focus, .dt-cell select:focus { border-color: var(--my-green); }
.dt-cell input[readonly], .dt-cell select:disabled {
  background: #fafbfc; color: var(--my-text-3); cursor: not-allowed;
}
.dt-row.dt-err input, .dt-row.dt-err select { border-color: var(--p0); background: #fff7f7; }
.dt-op { justify-content: center; padding: 5px 4px; }
.dt-del {
  color: var(--my-text-3); cursor: pointer; font-size: 13px; line-height: 1;
  padding: 4px; border-radius: 2px;
}
.dt-del:hover { color: var(--p0); background: #fef0f0; }
.dt-empty {
  grid-column: 1 / -1; padding: 20px 12px; text-align: center;
  color: var(--my-text-3); font-size: 12px; background: #fcfcfd;
}
.dt-foot > .dt-cell {
  background: #fcfcfd; font-weight: 600; color: #333;
  border-bottom: 0; white-space: nowrap;
}
.dt-num { justify-content: flex-end; color: var(--p0); font-variant-numeric: tabular-nums; }
/* 分摊不平账时的合计行告警 */
.dt-foot.dt-err2 > .dt-cell { background: #fff7f7; color: var(--p0); }

/* ==========================================================
   登录 / 改密（账密登录外壳）—— 左品牌区 + 右表单卡片
   品牌蓝取自 s-green 皮肤的链接蓝 #2b8ed6，品牌绿 --my-green #44b549
   ========================================================== */
.auth-wrap { display: flex; min-height: 100vh; background: #eef1f5; }
.auth-brand {
  flex: 1 1 0; min-width: 0; position: relative; overflow: hidden;
  background: linear-gradient(155deg, #1c6fd0 0%, #2b8ed6 48%, #3aa660 100%);
  color: #fff; display: flex; flex-direction: column; justify-content: center;
  padding: 56px 8%;
}
.auth-brand::after {
  content: ''; position: absolute; right: -90px; bottom: -110px;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}
.auth-brand::before {
  content: ''; position: absolute; left: -60px; top: -80px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}
.auth-brand-inner { position: relative; z-index: 1; }
.auth-logo {
  width: 44px; height: 44px; border-radius: 8px; background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35); color: #fff;
  font-size: 22px; font-weight: 700; text-align: center; line-height: 42px; margin-bottom: 16px;
}
.auth-title { font-size: 27px; font-weight: 600; letter-spacing: 1px; }
.auth-sub { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .85); }
.auth-points { list-style: none; margin-top: 26px; }
.auth-points li {
  position: relative; padding-left: 18px; margin-bottom: 10px;
  font-size: 13px; color: rgba(255, 255, 255, .92); line-height: 1.6;
}
.auth-points li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: #b6f0c0;
}
.auth-brand-foot {
  position: absolute; left: 8%; bottom: 26px; z-index: 1;
  font-size: 12px; color: rgba(255, 255, 255, .7);
}
.auth-main {
  flex: 0 0 480px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 40px 32px;
}
.login-card {
  width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--my-border);
  border-radius: 4px; box-shadow: 0 6px 24px rgba(24, 45, 70, .10); padding: 28px 28px 24px;
}
.login-hd { margin-bottom: 18px; }
.login-hd h2 { font-size: 19px; font-weight: 600; color: #222; }
.login-hd-sub { display: block; margin-top: 4px; font-size: 12px; color: var(--my-text-3); }

.login-err {
  display: none; border-radius: var(--my-radius); padding: 8px 10px; margin-bottom: 12px;
  font-size: 12px; line-height: 1.6; border: 1px solid #f7cfcf; background: #fdeaea; color: #c94a4a;
}
.login-err.show { display: block; }
.login-err.info { border-color: #cfe0fb; background: #eaf2fd; color: #2b6cb8; }
.login-err.ok { border-color: #cde8d4; background: #eaf6ec; color: #28a745; }

.login-field { margin-bottom: 14px; }
.login-field > label {
  display: block; font-size: 12px; color: var(--my-text-2); margin-bottom: 5px;
}
.login-ctl {
  display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px;
  border: 1px solid #dcdfe6; border-radius: var(--my-radius); background: #fff;
}
.login-ctl:focus-within { border-color: var(--my-green); }
.login-ctl > input {
  flex: 1; min-width: 0; height: 36px; border: 0; outline: none;
  font-size: 13px; font-family: inherit; color: var(--my-text); background: transparent;
}
.login-ico { font-size: 13px; color: #b6bcc6; line-height: 1; }
.login-eye, .login-cap-new {
  font-size: 12px; color: var(--my-text-3); cursor: pointer; user-select: none; white-space: nowrap;
}
.login-eye:hover, .login-cap-new:hover { color: var(--my-green); }
.login-cap-svg { display: inline-flex; cursor: pointer; line-height: 0; }
.login-cap-svg svg { width: 84px; height: 30px; border-radius: 2px; display: block; }

.login-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 14px; font-size: 12px; color: var(--my-text-2);
}
.login-row--center { justify-content: center; margin-bottom: 0; }
.login-remember { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.login-remember input { margin: 0; }
.login-forgot { color: var(--my-green); cursor: pointer; text-decoration: none; }
.login-forgot:hover { text-decoration: underline; }
.login-tip { font-size: 12px; color: var(--my-text-3); }

.login-submit {
  width: 100%; height: 38px; border: 0; border-radius: var(--my-radius);
  font-size: 14px; letter-spacing: 2px; cursor: pointer;
}
.login-submit[disabled] { opacity: .6; cursor: not-allowed; }

.login-wecom { margin-top: 14px; text-align: center; }
.login-or {
  display: block; position: relative; font-size: 12px; color: var(--my-text-3); margin-bottom: 10px;
}
.login-wecom-btn {
  display: inline-block; width: 100%; height: 34px; line-height: 32px;
  border: 1px solid #cde8d4; border-radius: var(--my-radius);
  background: #f3fbf4; color: var(--my-green); font-size: 13px; cursor: pointer;
}
.login-wecom-btn:hover { background: #e9f7eb; }
.login-foot { margin-top: 14px; font-size: 12px; color: var(--my-text-3); }

/* 账号态徽标（组织用户列表「状态」列联动登录账号） */
.pill-ok { display: inline-block; padding: 0 7px; border-radius: 2px; font-size: 11px; line-height: 17px;
  background: #eaf6ec; color: #28a745; border: 1px solid #cde8d4; }
.pill-warn { display: inline-block; padding: 0 7px; border-radius: 2px; font-size: 11px; line-height: 17px;
  background: #fdf3e2; color: #a86a00; border: 1px solid #f5e0bd; }
.pill-bad { display: inline-block; padding: 0 7px; border-radius: 2px; font-size: 11px; line-height: 17px;
  background: #fdeaea; color: #d05050; border: 1px solid #f7cfcf; }
.pill-none { display: inline-block; padding: 0 7px; border-radius: 2px; font-size: 11px; line-height: 17px;
  background: #f1f3f5; color: #777; border: 1px solid var(--my-border); }
.acct-code { font-family: Consolas, Monaco, monospace; }
.acct-none { color: #b6bcc6; }
.acct-must { color: var(--p1); margin-left: 4px; font-size: 11px; }

/* 一次性密码展示（开通 / 重置后只展示一次） */
.pwd-once {
  display: block; padding: 10px 12px; margin: 8px 0; border: 1px dashed #f5e0bd;
  background: #fffaf0; border-radius: var(--my-radius);
  font-family: Consolas, Monaco, monospace; font-size: 15px; letter-spacing: 1px; color: #a86a00;
}
.pwd-once-note { font-size: 12px; color: var(--p0); }

/* 窄屏（<900px）降级为居中卡片 */
@media (max-width: 900px) {
  .auth-wrap { flex-direction: column; min-height: 100vh; }
  .auth-brand { flex: none; padding: 30px 24px 34px; }
  .auth-brand::before, .auth-brand::after { display: none; }
  .auth-title { font-size: 22px; }
  .auth-points { margin-top: 16px; }
  .auth-points li { font-size: 12px; margin-bottom: 6px; }
  .auth-brand-foot { position: static; margin-top: 14px; }
  .auth-main { flex: 1 1 auto; padding: 24px 16px 32px; }
  .login-card { max-width: 420px; padding: 22px 20px 20px; }
}

/* ===================================================================
   首页态：左侧常驻「系统模块 / 常用功能」导航（原先进首页侧栏是空的）
   =================================================================== */
.mp-mnav-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px 6px; font-size: 11px; letter-spacing: 1px;
  color: rgba(255,255,255,.45); user-select: none;
}
.mp-mnav-cnt {
  font-size: 10px; padding: 0 6px; border-radius: 8px;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.6);
}
.mp-mod {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 8px 14px; border-left: 2px solid transparent; user-select: none;
}
.mp-mod:hover, .mp-mod:focus-visible {
  background: rgba(255,255,255,.08); border-left-color: rgba(255,255,255,.5); outline: none;
}
.mp-mod-ic {
  flex: none; width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; background: rgba(255,255,255,.12); color: #fff;
}
.mp-mod-tx {
  flex: 1; min-width: 0; font-size: 13px; color: rgba(255,255,255,.86);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mp-mod-cnt {
  flex: none; font-size: 10px; color: rgba(255,255,255,.42);
  font-variant-numeric: tabular-nums;
}
.mp-hot {
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 6px 14px 6px 22px; font-size: 12px; color: rgba(255,255,255,.66);
  border-left: 2px solid transparent; user-select: none;
}
.mp-hot:hover, .mp-hot:focus-visible {
  background: rgba(255,255,255,.07); color: #fff; outline: none;
}
.mp-hot-dot { flex: none; width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.4); }
.mp-hot:hover .mp-hot-dot { background: #4fd1c5; box-shadow: 0 0 6px #4fd1c5; }
.mp-hot-tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-mnav-empty { padding: 14px; font-size: 12px; color: rgba(255,255,255,.4); }

/* ===================================================================
   首页态外壳（仅在首页生效）
   首页与业务页统一走明源浅色商务风：这里不再覆盖主题变量，
   只放开内容区背景，让首页卡片自己决定底色（home.css 的 .hm-*）。
   =================================================================== */
body.home-mode .mp-content_view { background: transparent; }
body.home-mode .mp-content_border { background: transparent; }

/* ===================================================================
   审批中心（web/pages/approve.js）
   约定：类名统一 .ap- 前缀，沿用上面 :root 里的明源变量，不新增主题变量
   =================================================================== */
.ap-wrap { max-width: 1360px; }
.ap-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ap-title { font-size: 18px; font-weight: 600; color: var(--my-text); }
.ap-hd-sub { font-size: 12px; color: var(--my-text-3); }
.ap-badge {
  margin-left: auto; font-size: 12px; padding: 3px 10px; border-radius: 10px;
  background: #eef1f4; color: var(--my-text-2); border: 1px solid var(--my-border);
}
.ap-badge.hot { background: #fdecec; color: var(--p0); border-color: #f7c9c9; }

.ap-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ap-input {
  height: var(--ctrl-h); width: 260px; padding: 0 10px; font-size: 13px;
  color: var(--my-text); background: #fff;
  border: 1px solid var(--my-border); border-radius: var(--my-radius); outline: none;
}
.ap-input:focus { border-color: var(--my-green); }
.ap-btn {
  height: var(--ctrl-h); padding: 0 14px; font-size: 13px; cursor: pointer;
  color: var(--my-text-2); background: #fff;
  border: 1px solid var(--my-border); border-radius: var(--my-radius); outline: none;
}
.ap-btn:hover { color: var(--my-text); border-color: #cfd3d8; }
.ap-btn.primary { color: #fff; background: var(--my-green); border-color: var(--my-green); }
.ap-btn.primary:hover { background: var(--my-green-hover); border-color: var(--my-green-hover); color: #fff; }
.ap-btn.danger { color: #fff; background: var(--p0); border-color: var(--p0); }
.ap-btn.danger:hover { color: #fff; filter: brightness(.94); }
.ap-btn.warn { color: #fff; background: var(--p1); border-color: var(--p1); }
.ap-btn.warn:hover { color: #fff; filter: brightness(.94); }
.ap-btn[disabled] { opacity: .55; cursor: not-allowed; }

.ap-tabs { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--my-border); margin-bottom: 12px; }
.ap-tab {
  padding: 8px 16px; font-size: 13px; color: var(--my-text-2); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ap-tab:hover { color: var(--my-text); }
.ap-tab.active { color: var(--my-green); border-bottom-color: var(--my-green); font-weight: 600; }

.ap-card { background: #fff; border: 1px solid var(--my-border); border-radius: var(--my-radius); }
.ap-card-hd {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; font-size: 12px; color: var(--my-text-2); border-bottom: 1px solid var(--my-border);
}
.ap-tip { color: var(--my-text-3); }
.ap-table-wrap { overflow-x: auto; }
.ap-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ap-table th {
  text-align: left; height: var(--grid-head-lh); padding: 6px 10px; font-weight: 600;
  color: var(--my-text-2); background: #fafbfc; border-bottom: 1px solid var(--my-border); white-space: nowrap;
}
.ap-table td {
  padding: 8px 10px; color: var(--my-text); border-bottom: 1px solid #f1f2f4; vertical-align: middle;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ap-table tbody tr { cursor: pointer; }
.ap-table tbody tr:hover td { background: #f6fffa; }
.ap-mono { font-family: Consolas, "Courier New", monospace; }
.ap-num { text-align: right; font-variant-numeric: tabular-nums; }
.ap-appr { display: inline-block; margin-left: 6px; font-size: 12px; color: var(--my-text-3); }
.ap-empty, .ap-loading { padding: 26px 12px; text-align: center; color: var(--my-text-3); font-size: 13px; }

.ap-state {
  display: inline-block; padding: 1px 8px; font-size: 12px; line-height: 18px;
  border-radius: 9px; border: 1px solid transparent; white-space: nowrap;
}
.ap-run { color: var(--p2); background: #eef5ff; border-color: #cfe2fb; }
.ap-ok { color: var(--my-green-dark); background: #eaf7ee; border-color: #c8ebd4; }
.ap-bad { color: var(--p0); background: #fdeeec; border-color: #f7cdc9; }
.ap-warn { color: var(--p1); background: #fff6e8; border-color: #f8e2bd; }
.ap-none { color: var(--my-text-3); background: #f2f3f5; border-color: #e4e6ea; }

.ap-pager { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12px; color: var(--my-text-2); }
.ap-pg-total { margin-right: 6px; }
.ap-pg, .ap-pg-btn {
  min-width: 26px; height: 24px; line-height: 22px; text-align: center; padding: 0 6px; cursor: pointer;
  background: #fff; border: 1px solid var(--my-border); border-radius: var(--my-radius); user-select: none;
}
.ap-pg.cur { color: #fff; background: var(--my-green); border-color: var(--my-green); }
.ap-pg-btn.off { opacity: .45; cursor: not-allowed; }
.ap-pg-do { padding: 0 2px; color: var(--my-text-3); }

/* 右侧抽屉 */
.ap-mask { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 900; }
.ap-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 94vw; z-index: 901;
  display: flex; flex-direction: column; background: #fff; box-shadow: -6px 0 18px rgba(0,0,0,.12);
}
.ap-drawer-hd {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--my-border);
}
.ap-drawer-t { font-size: 15px; font-weight: 600; color: var(--my-text); }
.ap-drawer-sub { margin-top: 2px; font-size: 12px; color: var(--my-text-3); }
.ap-drawer-rt { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ap-x {
  width: 26px; height: 26px; line-height: 1; font-size: 18px; cursor: pointer; color: var(--my-text-3);
  background: transparent; border: 1px solid transparent; border-radius: var(--my-radius);
}
.ap-x:hover { color: var(--my-text); border-color: var(--my-border); }
.ap-drawer-bd { flex: 1; overflow-y: auto; padding: 12px 16px; }
.ap-sec { margin-bottom: 16px; }
.ap-sec-hd {
  font-size: 13px; font-weight: 600; color: var(--my-text); margin-bottom: 8px;
  padding-left: 8px; border-left: 3px solid var(--my-green); line-height: 1.2;
}
.ap-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.ap-sum-i { display: flex; align-items: baseline; gap: 6px; font-size: 12px; }
.ap-sum-l { flex: none; width: 66px; color: var(--my-text-3); }
.ap-sum-v { color: var(--my-text); word-break: break-all; }
.ap-sum-v.mono { font-family: Consolas, "Courier New", monospace; }

/* 流转轨迹时间轴 */
.ap-tl { list-style: none; margin: 0; padding: 2px 0 2px 6px; }
.ap-tl-item { position: relative; padding: 0 0 14px 18px; border-left: 1px solid var(--my-border); }
.ap-tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.ap-tl-dot {
  position: absolute; left: -5px; top: 4px; width: 9px; height: 9px; border-radius: 50%;
  background: #d9dce0; border: 2px solid #fff;
}
.ap-tl-dot.run { background: var(--p2); }
.ap-tl-dot.ok { background: var(--my-green); }
.ap-tl-dot.bad { background: var(--p0); }
.ap-tl-dot.warn { background: var(--p1); }
.ap-tl-dot.none { background: var(--my-text-3); }
.ap-tl-item.pending .ap-tl-title { color: var(--my-green-dark); }
.ap-tl-title { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--my-text); }
.ap-tl-who { font-size: 12px; color: var(--my-text-3); }
.ap-tl-op { margin-top: 2px; font-size: 12px; color: var(--my-text-2); word-break: break-all; }
.ap-tl-time { margin-top: 2px; font-size: 12px; color: var(--my-text-3); }

.ap-drawer-ft { padding: 12px 16px; border-top: 1px solid var(--my-border); }
.ap-opinion-l { display: block; font-size: 12px; color: var(--my-text-3); margin-bottom: 4px; }
.ap-opinion {
  width: 100%; padding: 6px 8px; font-size: 13px; font-family: inherit; color: var(--my-text);
  border: 1px solid var(--my-border); border-radius: var(--my-radius); outline: none; resize: vertical;
}
.ap-opinion:focus { border-color: var(--my-green); }
.ap-actions { display: flex; gap: 8px; margin-top: 10px; }
.ap-note { font-size: 12px; color: var(--my-text-3); }
#ap-cancel { margin-top: 10px; width: 100%; }

@media (max-width: 900px) {
  .ap-hd { flex-wrap: wrap; }
  .ap-badge { margin-left: 0; }
  .ap-input { width: 100%; }
  .ap-sum { grid-template-columns: 1fr; }
  .ap-drawer { width: 100%; }
}

/* ---------------- 业务列表页内的审批入口（费用报销等已接入审批引擎的功能点） ----------------
   只补 .ap- 前缀的新类，不动上面任何既有规则；
   行内链接随「该单据是否有审批实例」动态出现，未接入审批的功能点一个都不渲染。 */
.ap-mark {
  display: inline-block; margin-left: 6px; padding: 0 5px; font-size: 12px; line-height: 16px;
  color: var(--p2); background: #eef5ff; border: 1px solid #cfe2fb; border-radius: 8px;
  white-space: nowrap; vertical-align: middle;
}
.ap-lnk { margin-left: 8px; color: var(--my-green); }
.ap-lnk:hover { text-decoration: underline; }
.ap-lnk-danger { color: var(--p0); }
.ap-tl-gate {
  margin-left: 6px; padding: 0 4px; font-size: 11px; color: var(--p1);
  background: #fff6e8; border: 1px solid #f8e2bd; border-radius: 6px;
}
/* 弹窗里承载轨迹时给正文一个可滚动区域（沿用明源弹窗外壳） */
.mp-dialog .ap-sec { margin-bottom: 12px; }
.mp-dialog .ap-sec-hd { margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--my-text); }
.mp-dialog .ap-note { margin-top: 8px; }

/* ===================================================================
   流程管理中心（web/pages/flow-center.js + flow-cfg.js + flow-inst.js）
   约定：类名统一 .fl- 前缀，只引用上面 :root 里的明源变量，不新增主题变量。
   =================================================================== */
.fl-wrap { max-width: 1440px; }
.fl-hd { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.fl-title { font-size: 18px; font-weight: 600; color: var(--my-text); }
.fl-hd-sub { font-size: 12px; color: var(--my-text-3); }
.fl-loading { padding: 30px 0; text-align: center; color: var(--my-text-3); font-size: 13px; }
.fl-note { margin-top: 8px; font-size: 12px; color: var(--my-text-3); }
.fl-note.warn { color: var(--p1); }
.mono { font-family: Consolas, "Courier New", monospace; }
.sp { flex: 1; }

/* 统计卡 */
.fl-kpis { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.fl-kpi {
  display: flex; align-items: center; gap: 10px; min-width: 168px;
  background: #fff; border: 1px solid var(--my-border); border-radius: var(--my-radius);
  padding: 12px 16px;
}
.fl-kpi-ic {
  width: 32px; height: 32px; flex: none; border-radius: var(--my-radius);
  display: grid; place-items: center; font-size: 14px;
  background: #eef1f4; color: var(--my-text-2);
}
.fl-kpi-b { display: flex; flex-direction: column; line-height: 1.3; }
.fl-kpi-b b { font-size: 20px; font-weight: 600; color: var(--my-text); }
.fl-kpi-b span { font-size: 12px; color: var(--my-text-3); }
.fl-kpi.run .fl-kpi-ic { background: #eef5ff; color: var(--p2); }
.fl-kpi.ok .fl-kpi-ic { background: #eaf7ee; color: var(--my-green-dark); }
.fl-kpi.warn .fl-kpi-ic { background: #fff6e8; color: var(--p1); }

/* 区块卡片 */
.fl-card { background: #fff; border: 1px solid var(--my-border); border-radius: var(--my-radius); margin-bottom: 12px; }
.fl-card-hd {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border-bottom: 1px solid var(--my-border); background: #fafbfc;
}
.fl-card-t { font-size: 13px; font-weight: 600; color: var(--my-text); }
.fl-card-sub { font-size: 12px; color: var(--my-text-3); }
.fl-grid-wrap { overflow-x: auto; }
.fl-sec { margin-bottom: 16px; }
.fl-sec:last-child { margin-bottom: 0; }
.fl-sec-hd {
  font-size: 13px; font-weight: 600; color: var(--my-text); margin: 14px 0 8px;
  padding-left: 8px; border-left: 3px solid var(--my-green); line-height: 1.2;
}

/* 筛选条 */
.fl-filter {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 12px;
  background: #fff; border: 1px solid var(--my-border); border-radius: var(--my-radius);
}
.fl-fl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--my-text-2); }
.fl-inp, .fl-sel {
  height: var(--ctrl-h); padding: 0 8px; font-size: 13px; font-family: inherit;
  color: var(--my-text); background: #fff;
  border: 1px solid var(--my-border); border-radius: var(--my-radius); outline: none;
}
.fl-inp:focus, .fl-sel:focus { border-color: var(--my-green); }
.fl-sel { min-width: 120px; }
.fl-inp.wide { width: 260px; }

/* 迷你进度条（列表内） */
.fl-bar {
  display: inline-block; width: 46px; height: 5px; vertical-align: middle;
  background: #eef1f4; border-radius: 3px; overflow: hidden;
}
.fl-bar > i { display: block; height: 100%; background: var(--my-green); }
.fl-bar-tx { margin-left: 5px; font-size: 12px; color: var(--my-text-3); }

/* ===================== 页签一：配置节点弹窗 ===================== */
.fl-cfg-dlg { min-width: 0; }
.fl-svg-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.fl-svg-tip { font-size: 12px; color: var(--my-text-3); }
.fl-svg-box {
  overflow-x: auto; padding: 8px 4px; margin-bottom: 12px;
  background: #fafbfc; border: 1px solid var(--my-border); border-radius: var(--my-radius);
}
.fl-svg-el { display: block; }

/* SVG 节点（配置态） */
.fl-nrect { fill: #fff; stroke: var(--my-border); stroke-width: 1; }
.fl-node.fixed .fl-nrect { fill: #f3fbf5; stroke: #b7e3c4; }
.fl-node:hover .fl-nrect { stroke: var(--my-green); }
.fl-ntitle { font-size: 13px; fill: var(--my-text); }
.fl-nsub { font-size: 11px; fill: var(--my-text-3); }
.fl-nidx { font-size: 11px; fill: var(--my-text-3); }
.fl-nline { stroke: #9aa0a8; stroke-width: 1.4; }
.fl-ndel { cursor: pointer; }
.fl-ndel-bg { fill: #fff; stroke: var(--my-border); }
.fl-ndel:hover .fl-ndel-bg { fill: var(--p0); stroke: var(--p0); }
.fl-ndel-x { font-size: 9px; fill: var(--my-text-3); }
.fl-ndel:hover .fl-ndel-x { fill: #fff; }
.fl-nempty { font-size: 12px; fill: var(--my-text-3); }

/* 节点编辑行 */
.fl-rows-hd {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px;
  font-size: 13px; font-weight: 600; color: var(--my-text);
  padding-left: 8px; border-left: 3px solid var(--my-green); line-height: 1.2;
}
.fl-rows { display: block; }
.fl-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid var(--my-border); border-radius: var(--my-radius);
  margin-bottom: 6px; background: #fff;
}
.fl-row:hover { background: #f8fcf9; }
.fl-seq {
  flex: none; width: 22px; height: 22px; line-height: 22px; text-align: center;
  font-size: 12px; color: #fff; background: var(--my-green); border-radius: 50%;
}
.fl-row .f-name { width: 150px; }
.fl-row .f-key { width: 130px; }
.fl-row .f-amt { width: 90px; }
.fl-row .f-mode { width: 150px; }
.fl-row .f-person { height: 62px; width: 190px; padding: 2px; }
.fl-row .f-remark { width: 130px; }
.fl-gate { font-size: 12px; color: var(--my-text-2); white-space: nowrap; }
.fl-mut { font-size: 12px; color: var(--my-text-3); max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-ops { margin-left: auto; display: inline-flex; gap: 4px; }

/* ===================== 页签二：实例流程图 ===================== */
.fl-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 12px; }
.fl-sum-i { display: flex; align-items: baseline; gap: 6px; font-size: 12px; }
.fl-sum-l { flex: none; width: 66px; color: var(--my-text-3); }
.fl-sum-v { color: var(--my-text); word-break: break-all; }
.fl-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--my-text-2); }
.fl-lg { display: inline-flex; align-items: center; gap: 4px; }
.fl-lg i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.fl-lg i.ok { background: var(--my-green); }
.fl-lg i.cur { background: var(--p2); }
.fl-lg i.wait { background: #9aa0a8; }
.fl-lg i.todo { background: #d9dce0; }
.fl-lg i.bad { background: var(--p0); }

.fl-irect { fill: #fff; stroke: var(--my-border); stroke-width: 1; }
.fl-ititle { font-size: 13px; fill: var(--my-text); }
.fl-isub { font-size: 11px; fill: var(--my-text-2); }
.fl-itip { font-size: 10px; fill: var(--my-text-3); }
.fl-iline { stroke: #9aa0a8; stroke-width: 1.4; }
/* 节点状态着色：绿=已通过 蓝=当前 灰=待审 浅灰=未开始 红=驳回 */
.fl-inode.ok .fl-irect { fill: #eaf7ee; stroke: #b7e3c4; }
.fl-inode.ok .fl-ititle, .fl-inode.ok .fl-isub { fill: var(--my-green-dark); }
.fl-inode.cur .fl-irect { fill: #eef5ff; stroke: #9cc7f8; stroke-width: 2; }
.fl-inode.cur .fl-ititle { fill: var(--p2); font-weight: 600; }
.fl-inode.wait .fl-irect { fill: #f4f5f7; stroke: #c9ced4; }
.fl-inode.todo .fl-irect { fill: #fafbfc; stroke: #e4e6ea; }
.fl-inode.todo .fl-ititle, .fl-inode.todo .fl-isub { fill: #b0b4ba; }
.fl-inode.bad .fl-irect { fill: #fdeeec; stroke: #f7cdc9; }
.fl-inode.bad .fl-ititle, .fl-inode.bad .fl-isub { fill: var(--p0); }

/* ===================== 管理员干预 ===================== */
.fl-iact { display: block; }
.fl-act { border: 1px solid var(--my-border); border-radius: var(--my-radius); margin-top: 8px; }
.fl-act-hd { padding: 6px 10px; font-size: 13px; font-weight: 600; color: var(--my-text); background: #fafbfc; }
.fl-act-bd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; }
.fl-act-bd .ms-button-white.danger { color: var(--p0); border-color: #f3c3c0; }
.fl-act-bd .ms-button-white.danger:hover { background: #fdeeec; }

/* ===================== 页签三：说明 / 总览 ===================== */
.fl-doc-bd { padding: 12px; }
.fl-doc-list { padding-left: 20px; }
.fl-doc-list li { font-size: 13px; color: var(--my-text-2); line-height: 1.9; }
.fl-doc-list b { color: var(--my-text); }
.fl-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.fl-bar-lb { flex: none; width: 190px; font-size: 12px; color: var(--my-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-bar-track { flex: 1; height: 10px; background: #eef1f4; border-radius: 5px; overflow: hidden; }
.fl-bar-track > i { display: block; height: 100%; background: var(--my-green); }
.fl-bar-v { flex: none; width: 40px; text-align: right; font-size: 12px; color: var(--my-text-2); }
.fl-chips { display: flex; flex-wrap: wrap; }
.fl-chips .pill b { color: var(--my-green); }

@media (max-width: 900px) {
  .fl-kpi { min-width: 140px; flex: 1; }
  .fl-sum { grid-template-columns: 1fr; }
  .fl-bar-lb { width: 120px; }
  .fl-row .f-remark, .fl-row .f-person { width: 150px; }
}

/* ===================== AI 介入层（校验 / 摘要 / 明细） ===================== */
/* 弹窗内复用 #dialog，这里只定义 AI 专属内容块，避免与业务弹窗样式互相污染 */
.ai-src { font-size: 12px; color: var(--my-text-3); margin-bottom: 8px; }
.ai-sec-t { font-size: 13px; color: var(--my-text); font-weight: 500; margin: 12px 0 6px; }
.ai-issue-list { max-height: 320px; overflow: auto; }
.ai-issue {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 8px 10px; margin-bottom: 6px;
  border: 1px solid var(--my-border); border-left-width: 3px; border-radius: var(--my-radius);
  font-size: 13px; line-height: 1.6;
}
.ai-issue > b { flex: none; font-weight: 500; }
.ai-issue.err  { border-left-color: #e24b4a; background: #fdf2f2; }
.ai-issue.err > b { color: #c0392b; }
.ai-issue.warn { border-left-color: #f0a02a; background: #fffaf0; }
.ai-issue.warn > b { color: #b26a00; }
.ai-issue.info { border-left-color: #5ba1f5; background: #f5f9ff; }
.ai-issue.info > b { color: #2a6db0; }

.ai-list { padding-left: 20px; margin: 0; }
.ai-list li { font-size: 13px; color: var(--my-text-2); line-height: 1.9; }
.ai-list.todo li { color: var(--my-text); }

.ai-prog { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--my-text-2); }
.ai-prog-bar { flex: 1; height: 10px; background: #eef1f4; border-radius: 5px; overflow: hidden; }
.ai-prog-bar > i { display: block; height: 100%; background: var(--my-green); }
.ai-names { display: flex; flex-wrap: wrap; gap: 6px; max-height: 160px; overflow: auto; }
.ai-names > span {
  padding: 2px 8px; border: 1px solid var(--my-border); border-radius: 10px;
  font-size: 12px; color: var(--my-text-2); background: #fafbfc;
}
.tiny-grid td { padding: 3px 8px; border-bottom: 1px solid var(--my-border); font-size: 12px; }

/* ===================== OA 用印管理（oa-seal 扩展） ===================== */
/* 台账「待用印」小红点：列表里一眼看出这行还等着盖章 */
.sl-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--p0); margin-left: 5px; vertical-align: middle;
}
/* 确认用印弹窗：印章块 + 关键字段表 */
.sl-cfm .sl-seal {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 10px;
  border: 1px solid #f6d9d9; background: linear-gradient(180deg, #fff8f8, #fff); border-radius: 4px;
}
.sl-cfm .sl-seal-ic {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 600;
  background: radial-gradient(circle at 32% 28%, #e8676a, #c0392b);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35);
}
.sl-cfm .sl-seal > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.sl-cfm .sl-seal b { font-size: 14px; }
.sl-cfm .sl-seal i { font-style: normal; color: var(--my-text-2); }
.sl-lb { display: block; margin: 10px 0 5px; font-size: 12px; color: var(--my-text-2); }
.sl-ta {
  width: 100%; box-sizing: border-box; padding: 7px 9px; font-family: inherit; font-size: 13px;
  border: 1px solid var(--my-border); border-radius: 2px; outline: none; resize: vertical;
}
.sl-ta:focus { border-color: var(--my-green); box-shadow: 0 0 0 2px rgba(40, 167, 69, .12); }
/* 用印记录下钻弹窗 */
.sl-sum { display: flex; gap: 16px; font-size: 12px; color: var(--my-text-2); margin-bottom: 8px; }
.sl-sum b { font-size: 14px; color: var(--my-text); margin-left: 2px; }
.sl-sum-p b { color: var(--p0); }
.sl-sum-d b { color: var(--my-green); }
.sl-rec-wrap { max-height: 360px; overflow: auto; }
.sl-rec thead th {
  position: sticky; top: 0; background: #fafbfc; z-index: 1;
  font-weight: 500; color: var(--my-text-2);
  padding: 5px 8px; border-bottom: 1px solid var(--my-border); font-size: 12px; text-align: left;
}
.sl-rec td.num { text-align: right; }
