html, body { height: 100%; margin: 0; }

body { background: #f5f7fa; font-size: 14px; overflow: clip; }

/* 登录遮罩 — 结构性分层 (2026-09-04 15:42)
   position:fixed + z-index:99999, 默认 display:flex (盖住全屏).
   chrome (topbar/app-body) 在文档流背景层. loginOverlay 全屏覆盖 chrome = 视觉上分层.
   JS checkLogin 确认未登录 → 加 .login-ready class (无样式作用, 语义标记).
   JS checkLogin 确认已登录 → 设 style.display='none' 露出 chrome.
   CSS 未加载时 inline <style> 的 !important 兜底防白底闪屏. */
.login-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: #070d1e;
  display: flex;
  align-items: center; justify-content: center;
  overflow: hidden;
}
.login-overlay.login-ready { display: flex; } /* 语义标记, 跟默认一致 */

/* 网格 */
.login-overlay::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background-image:
    linear-gradient(rgba(56,132,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,132,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 70%);
}

/* 主光晕 */
.login-overlay .glow-1 {
  position: absolute; z-index: 1; border-radius: 50%; pointer-events: none;
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(56,132,255,0.12) 0%, rgba(56,132,255,0.04) 35%, transparent 65%);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}

/* 辅光晕 */
.login-overlay .glow-2 {
  position: absolute; z-index: 1; border-radius: 50%; pointer-events: none;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,180,255,0.06) 0%, transparent 60%);
  top: 20%; right: 20%;
}

/* 粒子 */
.login-overlay .p1 { position: absolute; z-index: 1; width: 3px; height: 3px; border-radius: 50%; pointer-events: none; background: rgba(56,132,255,0.2); }
.login-overlay .p2 { position: absolute; z-index: 1; width: 2px; height: 2px; border-radius: 50%; pointer-events: none; background: rgba(56,132,255,0.15); }
.login-overlay .p3 { position: absolute; z-index: 1; width: 4px; height: 4px; border-radius: 50%; pointer-events: none; background: rgba(56,132,255,0.12); }
.login-overlay .p1:nth-child(4) { top: 15%; left: 20%; }
.login-overlay .p1:nth-child(5) { top: 30%; right: 30%; }
.login-overlay .p2:nth-child(6) { top: 60%; left: 10%; }
.login-overlay .p2:nth-child(7) { top: 70%; right: 25%; }
.login-overlay .p3:nth-child(8) { top: 25%; left: 40%; }
.login-overlay .p2:nth-child(9) { top: 80%; left: 35%; }
.login-overlay .p1:nth-child(10) { top: 10%; right: 10%; }
.login-overlay .p2:nth-child(11) { top: 50%; left: 5%; }
.login-overlay .p3:nth-child(12) { top: 40%; right: 15%; }

/* 文字水印 */
.login-overlay .tech-text {
  position: absolute; z-index: 1; pointer-events: none;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  white-space: nowrap;
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 900;
  color: transparent;
  background: linear-gradient(90deg, rgba(56,132,255,0) 0%, rgba(56,132,255,0.06) 30%, rgba(56,132,255,0.08) 50%, rgba(56,132,255,0.06) 70%, rgba(56,132,255,0) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  letter-spacing: 0.25em;
}

/* 登录框 */
.login-box {
  position: relative; z-index: 2;
  background: #fff; border-radius: 12px; padding: 40px 36px;
  width: 340px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-box h5 { text-align: center; color: #4472C4; }
.login-box .form-control:focus {
  border-color: #4472C4; box-shadow: 0 0 0 3px rgba(68,114,196,0.15);
}
.login-box .btn-primary {
  background: #4472C4; border-color: #4472C4; padding: 10px;
}
.login-box .btn-primary:hover { background: #365fa8; }
.login-box .btn-primary {
  background: #4472C4; border-color: #4472C4; padding: 10px;
}
.login-box .btn-primary:hover { background: #365fa8; }

/* 登录方式切换标签 */
.login-tabs {
  display: flex;
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 16px;
}
.login-tab {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  cursor: pointer;
  font-size: 13px;
  color: #6c757d;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  user-select: none;
}
.login-tab:hover {
  color: #4472C4;
}
.login-tab.active {
  color: #4472C4;
  border-bottom-color: #4472C4;
  font-weight: 600;
}


/* 顶栏 — chrome 背景层, loginOverlay 全屏覆盖时它被遮住 */
.topbar {

  background: linear-gradient(90deg,#1565C0,#0D47A1);

  color: white; padding: 8px 16px;

  display: flex !important; /* 2026-09-04 15:47: 覆盖 HTML inline style="display:none" 兑底 */

  align-items: center; gap: 12px;

  box-shadow: 0 2px 6px rgba(0,0,0,0.15);

  height: 52px;

}

.topbar h5 { margin: 0; font-weight: 600; }

.topbar .form-control-sm, .topbar .form-select-sm { height: 32px; }

/* 2026-09-04 22:11 修复: userRightGroup 默认 visible (依赖 core/api/template_routes.py / 路由 已登录守卫),
   避免 inline display:none 导致 JS 加载完成前右上角空白 "煽动". */
.user-right-group { display: flex; }
.user-right-placeholder {
  padding: 4px 18px; border-radius: 999px;
  background: rgba(255,255,255,0.6); color: #1565C0;
  font-size: 1rem; letter-spacing: 3px;
  cursor: default;
}
/* JS 加载完后 user-right-placeholder class 会被去掉, 加 .loaded 标记表示数据已就位 */
.user-right-placeholder.loaded {
  background: rgba(255,255,255,0.9);
  cursor: pointer;
  letter-spacing: 1px;
}



/* 主体三栏布局 */

.app-body { display: flex !important; height: calc(100vh - 52px); } /* 2026-09-04 15:47: 覆盖 inline display:none 兑底 */



/* 侧边栏 */

.sidebar {

  width: 168px; background: #F8FAFC; border-right: 1px solid #E2E8F0;

  overflow-y: auto; padding: 6px 0;

  flex-shrink: 0;

}

.site-group { margin-bottom: 2px; }

.site-header {

  display: flex; align-items: center; padding: 7px 12px;

  cursor: pointer; font-weight: 500; color: #1E293B; /* 2026-09-06 12:29 slate-800 */

  background: #F1F5F9; /* 2026-09-06 12:29 slate-100 */
  border-bottom: 1px solid #E2E8F0;
  user-select: none; font-size: 14px;
  transition: background .12s;

}

.site-header:hover { background: #E2E8F0; /* 2026-09-06 12:29 slate-200 hover */ }

/* 一级菜单语义化图标（menu-icon-picker 自动匹配） */

.site-header /* 2026-09-04 19:18 修复: 17:55 重构后未加载 core-bundle.css 全局规则, .bi glyph 不渲染.
   app.html 已引 icons.css (含 @font-face + .bi-XXX::before { content } 规则),
   但 body 没设全局 font-family → <i class="bi"> 继承 Times New Roman 渲染为空.
   在 .menu-icon 直接指定 bootstrap-icons 字体覆盖 inherit 链. */
.menu-icon {
  margin-right: 8px;
  font-size: 1.05em;
  color: #475569; /* 2026-09-06 12:29 slate-600 */
  font-family: 'bootstrap-icons' !important;
  transform: none;
}

/* 兼容旧样式：其他普通 .bi（比如状态点等）仍保持原尺寸 */

.site-header .bi:not(.menu-icon) { margin-right: 6px; font-size: 0.85em; }

.site-group.collapsed .query-list { display: none; }

.query-item {

  padding: 6px 12px 6px 44px; cursor: pointer;

  color: #475569; border-left: 3px solid transparent; /* 2026-09-06 12:29 slate-600 */

  font-size: 13px;

  transition: color .12s, background .12s;

}

/* 二级 hover：文字变紫色 + 加粗 + 淡蓝底 */

.query-item:hover { color: #1E293B; font-weight: normal; background: #F1F5F9; /* 2026-09-06 12:29 slate hover */ }

.query-item.active { color: #2563EB; font-weight: 500; background: #EFF6FF; border-left-color: #2563EB; /* 2026-09-06 12:29 blue active */ }

.query-item.active:hover { color: #2563EB; background: #DBEAFE; /* 2026-09-06 12:29 active hover */ }





/* 主内容区 */

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }



/* Tab 栏 */

.tab-bar {

  display: flex; align-items: center;

  background: #ECEFF1; border-bottom: 1px solid #CFD8DC;

  padding: 0 8px; min-height: 36px;

  overflow-x: auto; overflow-y: hidden;

}

.tab-item {

  display: flex; align-items: center;

  padding: 6px 10px 6px 12px;

  background: #ECEFF1; border-right: 1px solid #CFD8DC;

  cursor: pointer; white-space: nowrap; gap: 6px;

  color: #546E7A; font-size: 13px;

}

.tab-item:hover { background: #E0E5E8; }

.tab-item.active {

  background: #FFFFFF; color: #1565C0; font-weight: 600;

  border-bottom: 2px solid #1565C0;

}

.tab-item .close {
  /* 2026-09-11 03:44 X 变大避免点偏 (原始 18x20 太小) */
  color: #90A4AE; cursor: pointer; padding: 4px 8px; margin-left: 6px;
  border-radius: 4px; font-size: 18px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; min-height: 28px;
}

.tab-item .close:hover { background: #FFEBEE; color: #C62828; }

.tab-item .close:active { background: #FFCDD2; }

.tab-placeholder {

  padding: 32px; color: #90A4AE; text-align: center; flex: 1;

}



/* Tab 内容区：改成 flex 列 → 让中间面板自适应擑满浏览器高度 */

.tab-content-area { flex: 1; min-width: 0; min-height: 0; padding: 12px 16px; background: #F5F7FA; display: flex; flex-direction: column; overflow: hidden; }

.tab-panel { display: none; min-width: 0; }

.tab-panel.active { display: flex; flex-direction: column; flex: 1; min-height: 0; }



.param-panel {

  background: #fff8e1; border-radius: 6px; padding: 6px 14px;

  margin-bottom: 0; border-bottom: 2px solid #ffc107;

}

.param-panel .form-label { font-size: 12px; margin-bottom: 2px; color: #607D8B; }

.param-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* 标准查询按钮(所有模块统一):flex-shrink:0 不换行,min-width:5em 防止文字变化抖动 */

.param-item { min-width: 140px; display:inline-flex; align-items:center; gap:6px; }

.param-item .form-label { margin-bottom:0; white-space:nowrap; }

.btn-quick { padding: 2px 10px; font-size: 12px; margin-right: 4px; }

.btn-quick-active { background: #2E7D32 !important; color: white !important; border-color: #2E7D32 !important; }

.btn-quick-active .text-primary { color: white !important; }



.result-panel {

  background: transparent; border-radius: 6px; padding: 0;

  box-shadow: none;

  min-width: 0; min-height: 0; overflow-x: auto; overflow-y: hidden;

  max-width: 100%;

  display: flex; flex-direction: column;

  flex: 1;   /* 擑满剩余高度 */

}

.table-wrap {

  background: white;

  flex: 1;   /* 表格区域占满，不再硬编码 max-height */

  min-height: 0;

  overflow-y: auto; overflow-x: auto; position: relative;

  width: 100%; max-width: 100%;

}

.table { margin-bottom: 0 !important; border-collapse: separate; border-spacing: 0; width: 100%; min-width: 100%; table-layout: fixed; }

.table thead {

  position: sticky; top: 0; z-index: 15;

}

.table tfoot td {

  position: sticky; bottom: 0; z-index: 5;

  background: #fff3cd;   /* 淡黄底，避免下方数据透过来 */

  font-weight: bold;

  box-shadow: 0 -2px 0 #ffc107;   /* 上黄线视觉锚定 */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;

}

/* 列宽自适应 (v3): 无max-width限制, 拖拽/width自由控制; 超出省略号仍保留 */
.table th, .table td {
  box-sizing: border-box;
}

/* checkbox 列 40px 固定不走 max-width */
.table th.row-select-header { max-width: 40px; min-width: 40px; width: 40px; }
.table > tbody > tr > td:first-child:has(> input.row-select) { max-width: 40px; min-width: 40px; width: 40px; }

/* 行悬停/选中背景色（CSS 变量驱动，JS 注入颜色值） */
.table { --row-hover-bg: #E3F2FD; --row-selected-bg: #BBDEFB; }
.table > tbody > tr:hover > td { background-color: var(--row-hover-bg); }
.table > tbody > tr.row-selected > td { background-color: var(--row-selected-bg); }
/* 2026-09-28 统一: 覆盖 custom 手写面板(薪资/日薪/在线/配送等)选中行高亮, 与 standard 一致 */
tbody tr.row-selected > td { background-color: var(--row-selected-bg); }

.table thead th {

  background: #4472C4; color: white;

  position: sticky; top: 0;

  font-size: 13px; padding: 6px 8px; white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0,0,0,0.05);

  border-bottom: 2px solid #5B8FE8;

  position: relative;

  min-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table td { font-size: 13px; padding: 4px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 0; }
/* 2026-08-23 12:53: 内容无需自适应 - nowrap + 省略号截断, 列宽由表头标签(th)决定, 内容不换行不撑宽列。
   max-width:0 + fixed 布局 => 列宽完全由 th 控制, td 内容超出显示省略号(title 保留完整内容) */

.col-resizer {

  position: absolute; top: 0; right: 0; width: 14px; height: 100%;

  cursor: col-resize; user-select: none;

  background: transparent;

  z-index: 10;

}

/* 2026-08-23: 扩大拖拽热区 - 在拖柄左边再垫 6px 透明区(右边缘不易点到的列也能拖) */
.col-resizer::before {
  content: ''; position: absolute; top: 0; right: 8px; width: 8px; height: 100%;
  cursor: col-resize;
}

.col-resizer-first { right: -7px; z-index: 15; }

.col-resizer:hover, .col-resizer.resizing { background: rgba(255,255,255,0.35); box-shadow: inset 2px 0 0 #FFD54F; }

/* 列拖动换序 */
.col-header[draggable="true"] { cursor: grab; }
.col-header.col-dragging { opacity: 0.4; }
.col-header.col-drag-over-before { box-shadow: inset 3px 0 0 #0d6efd; }
.col-header.col-drag-over-after  { box-shadow: inset -3px 0 0 #0d6efd; }

.row-overdue td { background-color: #FFCCCB !important; }



/* 库龄行字体颜色：蓝绿黄红，天数越大色越深 */

.age-gte-30 td { color: #0D47A1 !important; }  /* 深蓝 */

.age-gte-60 td { color: #1B5E20 !important; }  /* 深绿 */

.age-gte-90 td { color: #E65100 !important; }  /* 深橙黄 */

.age-gte-120 td { color: #C62828 !important; } /* 红色 */





/* 列设置 Modal（居中屏幕）*/

.col-settings-modal {

  position: fixed; top: 0; left: 0; right: 0; bottom: 0;

  background: rgba(0,0,0,0.4); z-index: 3000;

  display: flex; align-items: center; justify-content: center;

}

.col-settings-dialog {

  background: white; border-radius: 6px; width: 1440px; max-width: 94vw;

  max-height: 92vh; display: flex; flex-direction: column;

  box-shadow: 0 8px 32px rgba(0,0,0,0.2);

}

.col-settings-header {

  padding: 12px 16px; border-bottom: 1px solid #eee;

  display: flex; align-items: center; justify-content: space-between;

  font-size: 15px; font-weight: 600;

}

.col-settings-close {

  cursor: pointer; font-size: 22px; color: #999; line-height: 1;

  padding: 0 6px;

}

.col-settings-close:hover { color: #333; }

.col-settings-body {

  padding: 12px 16px; overflow-y: auto; flex: 1;

}

.col-item-all {

  padding: 6px 4px; margin-bottom: 8px;

  border-bottom: 1px solid #eee;

}

.col-settings-grid {

  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 16px;

}

.col-item {

  display: flex; align-items: center; padding: 4px 6px; cursor: pointer;

  border-radius: 3px; font-size: 13px;

}

.col-item:hover { background: #f0f7ff; }

.col-item-row {
  display: flex; align-items: center; gap: 6px;
  padding: 2px 4px; border-radius: 3px;
}
.col-item-row:hover { background: #f8f9fa; }
.col-item-row .col-orig-idx {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 22px; padding: 0 4px; flex: 0 0 auto;
  font-size: 12px; font-weight: 600; color: #5a6a7a;
  background: #eef2f6; border: 1px solid #dde4ea; border-radius: 3px;
  user-select: none;
}
.col-item-row .col-item { flex: 1 1 auto; min-width: 0; margin: 0; }
.col-item-row .col-item span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.col-item-row .col-rename-input {
  flex: 0 0 160px; font-size: 12px; padding: 2px 6px; height: 28px;
}

/* 列设置弹窗：列顺序排序（拖拽手柄 + 上下箭头） */
.col-item-row .col-move {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border: 1px solid #ddd; background: #fff;
  border-radius: 3px; cursor: pointer; font-size: 13px; line-height: 1;
  color: #495057; padding: 0; flex: 0 0 22px; user-select: none;
}
.col-item-row .col-move:hover { background: #e7f1ff; border-color: #86b7fe; color: #0d6efd; }
.col-item-row .col-drag-handle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; cursor: grab; color: #adb5bd; font-size: 15px;
  flex: 0 0 22px; user-select: none; touch-action: none;
}
.col-item-row .col-drag-handle:hover { color: #495057; }
.col-item-row.col-dragging { opacity: 0.4; background: #e7f1ff; }
.col-item-row.col-drag-over { border-top: 2px solid #0d6efd; }

.col-item input { margin-right: 6px; }

/* 隐藏列折叠区 */
.col-hidden-toggle {
  display: flex; align-items: center; gap: 6px;
  margin: 10px 0 2px; padding: 8px 10px;
  background: #f4f6f8; border: 1px dashed #c9d2da; border-radius: 4px;
  cursor: pointer; font-size: 13px; font-weight: 600; color: #4a5a6a;
  user-select: none;
}
.col-hidden-toggle:hover { background: #e9eef3; }
.col-hidden-arrow {
  display: inline-block; font-size: 12px; color: #6c7a89;
  transition: transform .15s;
}
.col-hidden-section {
  margin: 4px 0 8px; padding: 8px 10px;
  background: #fafbfc; border: 1px solid #e3e8ed; border-radius: 4px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 16px;
}
.col-item-hidden {
  display: flex; align-items: center; padding: 4px 6px; cursor: pointer;
  border-radius: 3px; font-size: 13px; color: #6c7a89;
}
.col-item-hidden:hover { background: #f0f4f8; }
.col-item-hidden span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.col-settings-footer {

  padding: 10px 16px; border-top: 1px solid #eee;

  display: flex; align-items: center; gap: 8px;

}



/* 合计行：固定在底部，不随数据滚动 */

.table-total-row {

  position: sticky;

  bottom: 0;

  z-index: 10;

}

.table-total-row td {

  font-size: 13px;

  background: #fffbe6;

}

.table-total-row td:first-child {

  font-weight: bold;

}



/* Toast */

/* 查询进度条 */

.query-progress-bar {

  display: inline-block;

  width: 140px;

  height: 6px;

  background: #E3F2FD;

  border-radius: 3px;

  overflow: hidden;

  vertical-align: middle;

  margin-right: 6px;

}

.query-progress-bar-inner {

  height: 100%;

  width: 30%;

  background: linear-gradient(90deg, #1565C0, #42A5F5, #1565C0);

  background-size: 200% 100%;

  border-radius: 3px;

  animation: queryProgress 0.9s ease-in-out infinite;

}

@keyframes queryProgress {

  0% { width: 20%; margin-left: -10%; }

  50% { width: 40%; margin-left: 60%; }

  100% { width: 20%; margin-left: 90%; }

}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}



.toast-msg {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 999999;
  padding: 12px 18px; border-radius: 8px;
  background: rgba(0,0,0,0.82); color: white; font-size: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  display: none;              /* 空内容彻底不占位，避免闪烁 */
  opacity: 0; transition: opacity 0.2s;
  pointer-events: none; max-width: 70vw; text-align: center;
  white-space: pre-wrap;
}
.toast-msg.show { display: block; opacity: 1; }
.toast-msg.success { background: #2E7D32; }
.toast-msg.error { background: #C62828; }
.toast-msg.info { background: #1565C0; }

/* 2026-09-13 15:25 源头修复 (用户报 "同步返回提示背景白色"): crawler.js L37 的 toast 函数
   创建 v3-toast div, 但 app.css 里没有 v3-toast 样式, 导致背景默认白色.
   这才是真正的源头. 加 v3-toast 系列样式, 以琥珀色 (#fef3c7) 为默认, 与 #sync-result-test 一致. */
.v3-toast {
  position: fixed;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  z-index: 2000;
  padding: 10px 16px;
  border-radius: 8px;
  background: #fef3c7 !important;  /* 琥珀色, 与同步结果弹窗一致 */
  color: #78350f !important;
  border: 1px solid #f59e0b !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
  max-width: 70vw;
  text-align: center;
  white-space: pre-wrap;
  pointer-events: none;
  animation: v3-toast-in 0.2s ease-out;
}
.v3-toast-ok    { background: #fef3c7 !important; color: #78350f !important; border-color: #f59e0b !important; }
.v3-toast-error { background: #fee2e2 !important; color: #991b1b !important; border-color: #dc2626 !important; }
/* (v3-toast-redline 样式已撤回, 用户示意不要, 需要时启用) */
  50% { transform: translateX(-50%) scale(1.05); box-shadow: 0 12px 32px rgba(220, 38, 38, 0.6); }
}
.v3-toast-info  { background: #dbeafe !important; color: #1e40af !important; border-color: #2563eb !important; }
.v3-toast-success { background: #d1fae5 !important; color: #065f46 !important; border-color: #059669 !important; }
@keyframes v3-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}



/* 粘贴 Cookie 弹窗 */

.modal-mask {

  position: fixed; inset: 0; background: rgba(0,0,0,0.5);

  display: flex; align-items: center; justify-content: center;

  z-index: 3000;

}

.modal-box {

  background: white; border-radius: 10px;

  padding: 24px 28px; width: 90%; max-width: 620px;

  box-shadow: 0 10px 40px rgba(0,0,0,0.3);

}

.modal-box code { background: #ECEFF1; padding: 1px 6px; border-radius: 3px; font-size: 13px; }

/* ── 菜单设置弹窗 v2 (2026-09-04 22:46): 重命名 inline input + 拖动 mousedown ── */
.menu-site-row {
  background: #f8fafc;
  border: 1px solid #e3eaf2 !important;
  transition: background .15s;
}
.menu-site-row:hover { background: #f0f5fb; }
.menu-site-row .menu-site-input {
  max-width: 220px;
  font-weight: 500;
}
/* 2026-09-14 补全: 站点折叠按钮 + 折叠态 (跟老版 settlement-monitor.js 的 menu-site-item collapsed 一致逻辑, 但作用在新版的 menu-site-row 上) */
.menu-site-row .menu-toggle {
  cursor: pointer;
  user-select: none;
  color: #999;
  font-size: 12px;
  transition: transform .15s;
  display: inline-block;
  width: 14px;
  text-align: center;
}
.menu-site-row.collapsed .menu-q-list { display: none; }
.menu-site-row.collapsed .menu-toggle { transform: rotate(-90deg); }
.menu-site-row .menu-site-orig,
.menu-q-row .menu-q-orig {
  font-family: 'Courier New', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}
.menu-q-row {
  padding: 4px 6px;
  border-radius: 3px;
  transition: background .1s;
}
.menu-q-row:hover { background: #f0f5fb; }
.menu-q-row .menu-q-input { font-size: 0.9rem; }
.menu-q-handle {
  display: inline-block;
  transition: color .1s;
}
.menu-q-handle:hover { color: #1976d2 !important; }

/* ── 菜单设置弹窗：header 固定 + body 可滚 + footer 固定 + 一级可折叠 ── */
.menu-modal-box {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  width: 90%;
  max-width: 720px;
  padding: 20px 24px;
}
.menu-modal-header { flex-shrink: 0; }
.menu-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  border: 1px solid #E3EAF2;
  border-radius: 4px;
  background: #fff;
  padding: 8px;
}
.menu-modal-footer {
  flex-shrink: 0;
  border-top: 1px solid #e3eaf2;
  padding-top: 12px;
  margin-top: 12px;
  background: #fff;
}
.menu-toggle {
  cursor: pointer;
  padding: 0 6px;
  color: #666;
  user-select: none;
  font-size: 11px;
  transition: transform .15s;
  display: inline-block;
  width: 14px;
  text-align: center;
}
.menu-toggle:hover { color: #1976d2; }
.menu-site-item.collapsed > .menu-site-header .menu-toggle { transform: rotate(-90deg); }
.menu-site-item.collapsed > .menu-query-list { display: none; }
.menu-site-header { user-select: none; }
.menu-site-header > .menu-name-input { user-select: text; }





/* 库龄预警条 */

.age-bar { background:#fff8e1; padding:8px 12px; border-bottom:2px solid #ffc107; display:none; align-items:center; gap:4px; flex-wrap:wrap; }

.age-bar .age-btn { border:none; border-radius:12px; padding:2px 10px; font-size:12px; cursor:pointer; line-height:1.6; }

.age-bar .age-btn:hover { opacity:0.85; }

.age-bar .age-btn-unsel { background:#ffd54f; color:#bf360c; font-weight:600; }

.age-bar .age-btn-sel { background:#e65100; color:#fff; font-weight:700; }


.dbtools-panel { padding: 0; }
.dbtools-header { padding: 10px 16px; background: #f8f9fa; border-bottom: 1px solid #e3eaf2; display: flex; align-items: center; gap: 12px; }
.dbtools-title { font-weight: 600; font-size: 15px; }
.dbtools-status { font-size: 13px; color: #666; margin-left: 8px; }
.dbtools-tabs { display: flex; gap: 0; border-bottom: 2px solid #1976d2; background: #fff; padding: 0 12px; }
.dbtools-tab { border: none; background: transparent; padding: 10px 18px; font-size: 13px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; color: #555; }
.dbtools-tab:hover { color: #1976d2; }
.dbtools-tab.active { color: #1976d2; border-bottom-color: #1976d2; font-weight: 600; }
.dbtools-body { padding: 12px; min-height: 400px; }
.dbtools-list-wrap { display: flex; gap: 12px; min-height: 400px; }
.dbtools-list-left { width: 280px; min-width: 280px; max-height: 70vh; overflow-y: auto; border: 1px solid #e3eaf2; border-radius: 6px; padding: 8px; background: #fafbfc; }
.dbtools-new-bar { padding: 4px 4px 8px 4px; border-bottom: 1px dashed #ddd; margin-bottom: 6px; }
.dbtools-new-form { padding: 16px; max-width: 480px; }
.dbtools-new-form h6 { margin-bottom: 12px; color: #1976d2; }
.dbtools-new-form .form-text { color: #999; }
.dbtools-new-form code { background: #f5f5f5; padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.dbtools-group { margin-bottom: 8px; }
.dbtools-group-name { font-size: 12px; color: #888; padding: 4px 6px; font-weight: 600; }
.dbtools-item { padding: 6px 10px; cursor: pointer; font-size: 13px; border-radius: 4px; font-family: monospace; }
.dbtools-item:hover { background: #e3f2fd; }
.dbtools-item.active { background: #1976d2; color: #fff; }
.dbtools-item.active .dbtools-item-desc { color: rgba(255, 255, 255, 0.92); }
.dbtools-list-right { flex: 1; border: 1px solid #e3eaf2; border-radius: 6px; padding: 12px; background: #fff; max-height: 70vh; overflow: auto; }
.dbtools-source { background: #1e1e1e; color: #d4d4d4; padding: 12px; border-radius: 4px; font-size: 12px; max-height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.dbtools-textarea-sql { width: 100%; font-family: Consolas, Courier New, monospace; font-size: 13px; resize: vertical; }
.dbtools-cm-wrap { border: 1px solid #444; border-radius: 4px; overflow: hidden; }
.dbtools-cm-wrap .CodeMirror { height: 60vh !important; min-height: 450px; }
.dbtools-define-result { margin-top: 10px; }
.cm-error-line { background: rgba(255, 0, 0, 0.15) !important; border-bottom: 1px wavy #ff5555; }
/* 强化 VSCode Dracula 风格 - 覆盖 CodeMirror Dracula 默认色 */
.CodeMirror.cm-s-dracula .cm-number { color: #50fa7b !important; }
.CodeMirror.cm-s-dracula .cm-comment { color: #6272a4 !important; font-style: italic; }
.CodeMirror.cm-s-dracula .cm-string { color: #f1fa8c !important; }
.CodeMirror.cm-s-dracula .cm-keyword { color: #ff79c6 !important; }
.CodeMirror.cm-s-dracula .cm-atom { color: #bd93f9 !important; }
.CodeMirror.cm-s-dracula .cm-def { color: #50fa7b !important; }
.dbtools-row-num { color: #888; font-weight: normal; text-align: right; width: 40px; background: #f8f9fa; }
.dbtools-col-comment { color: #999; font-weight: normal; font-size: 12px; margin-left: 4px; }
.dbtools-sql-wrap { padding: 8px; }
.dbtools-sql-textarea { width: 100%; font-family: Consolas, Courier New, monospace; font-size: 13px; padding: 8px; border: 1px solid #ccc; border-radius: 4px; }


/* 数据库工具 - 表注释块 */
.dbtools-table-desc {
    background: #f0f7ff;
    border-left: 3px solid #1976d2;
    padding: 6px 10px;
    margin: 6px 0 10px 0;
    font-size: 13px;
    color: #333;
    border-radius: 0 4px 4px 0;
}
.dbtools-detail-head h6 {
    margin-bottom: 4px;
}
.dbtools-detail-head table code {
    color: #c7254e;
    background: #f9f2f4;
    padding: 1px 4px;
    border-radius: 3px;
}

.dbtools-item-desc { color: #2f3b52; font-size: 12px; margin-left: 2px; font-weight: 700; }

.dbtools-db-label { margin-right: 8px; font-size: 13px; }
.dbtools-db-select { padding: 3px 6px; font-size: 13px; border-radius: 3px; border: 1px solid #ced4da; max-width: 200px; }

.sql-kw { color: #c0392b; font-weight: 600; }
.sql-str { color: #27ae60; }
.sql-com { color: #7f8c8d; font-style: italic; }

.dbtools-addfield-wrap { padding: 8px; }
.dbtools-addfield-table { border: 1px solid #dee2e6; border-radius: 4px; background: #fff; }
.dbtools-af-row { display: grid; grid-template-columns: 1.5fr 1fr 0.7fr 0.5fr 1fr 1.5fr 36px; gap: 6px; padding: 6px 8px; align-items: center; }
.dbtools-af-row.dbtools-af-head { background: #f1f3f5; font-weight: 600; font-size: 12px; color: #495057; }
.dbtools-af-row:not(.dbtools-af-head) { border-top: 1px solid #e9ecef; }
.dbtools-af-row .form-control, .dbtools-af-row .form-select { padding: 2px 6px; font-size: 12px; height: 28px; }
.dbtools-af-c-null { width: 18px; height: 18px; }

/* 日期输入框点击整框都能弹出日期选择器 */
input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
  opacity: 0;
  cursor: pointer;
}
input[type="date"] {
  position: relative;
}


/* 兵监管快捷筛选按钮 */
.soldier-quick-btn {
  background-color: #FFF3CD !important;
  color: #000000 !important;
  border-color: #FFE69C !important;
}
.soldier-quick-btn:hover {
  background-color: #FFE69C !important;
  color: #000000 !important;
}
.soldier-quick-btn.active {
  background-color: #FFC107 !important;
  color: #000000 !important;
  border-color: #FFA000 !important;
}

/* ── 兵抱怨 2D 主从表 ── */
.complaint-tbl-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 160px);
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

/* ===== 兵抱怨 2D 主从表 - 商务深色表头配色 ===== */
.complaint-2d-tbl {
  border-collapse: collapse;
  font-size: 12.5px;
  width: auto;
  min-width: 100%;
}

.complaint-2d-tbl thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.complaint-2d-tbl th {
  background: #1E3A8A;
  color: #fff;
  padding: 5px 6px;
  white-space: nowrap;
  border-bottom: 2px solid #0F172A;
  border-right: 1px solid #334155;
  font-size: 12px;
  font-weight: 600;
}

.complaint-2d-tbl th.ch-row-label {
  background: #581C87;
  color: #fff;
  position: sticky;
  left: 0;
  z-index: 12;
  border-right: 2px solid #6B21A8;
}

.complaint-2d-tbl th.ch-group-month {
  background: #2563EB;
  color: #fff;
  border-bottom: 2px solid #1E40AF;
  font-weight: 700;
}

.complaint-2d-tbl th.ch-group-type {
  background: #7C3AED;
  color: #fff;
  border-bottom: 2px solid #5B21B6;
  font-weight: 700;
}

.complaint-2d-tbl th.ch-month-col {
  background: #3B82F6;
  color: #fff;
  font-weight: 500;
}

.complaint-2d-tbl th.ch-type-col {
  background: #8B5CF6;
  color: #fff;
  font-weight: 500;
}

.complaint-2d-tbl th.ch-subtotal {
  background: #F59E0B;
  color: #fff;
  font-weight: 700;
}

.complaint-2d-tbl th.ch-total {
  background: #DC2626;
  color: #fff;
  font-weight: 700;
}

.complaint-2d-tbl td {
  padding: 3px 6px;
  white-space: nowrap;
  border-bottom: 1px solid #E2E8F0;
  border-right: 1px solid #EEF2F7;
  font-size: 12.5px;
  color: #1E293B;
}

.complaint-2d-tbl td.cc-label {
  background: #F1F5F9;
  font-weight: 600;
  color: #0F172A;
  border-right: 2px solid #CBD5E1;
}

.complaint-2d-tbl td.cc-month {
  background: #EFF6FF;
}

.complaint-2d-tbl td.cc-type {
  background: #FAF5FF;
}

.complaint-2d-tbl td.cc-subtotal {
  background: #FEF3C7;
  font-weight: 600;
  color: #78350F;
  border-right: 2px solid #CBD5E1;
}

.complaint-2d-tbl td.cc-type-sub {
  background: #FCE7F3;
  font-weight: 600;
  color: #831843;
}

.complaint-2d-tbl td.cc-total {
  background: #FEE2E2;
  font-weight: 700;
  color: #991B1B;
}

.complaint-2d-tbl tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: #FFFFFF;
  color: #DC2626;
  font-weight: 700;
  font-size: 13px;
  border-top: 2px solid #CBD5E1;
  border-bottom: none;
  letter-spacing: 0.3px;
}

.complaint-2d-tbl .cr-data {
  cursor: pointer;
}

.complaint-2d-tbl .cr-data:hover td {
  background-color: #DBEAFE !important;
  color: #0F172A !important;
}

.complaint-2d-tbl .cr-data:hover td.cc-label {
  background-color: #BFDBFE !important;
  color: #0F172A !important;
}

.complaint-2d-tbl .cr-data:hover td.cc-subtotal {
  background-color: #FDE68A !important;
  color: #78350F !important;
}

.complaint-2d-tbl .cr-data:hover td.cc-total {
  background-color: #FECACA !important;
  color: #7F1D1D !important;
}

/* 从表面板 */
/* 从表模态框 (无标题栏版) */
.complaint-2d-modal .modal-content {
  max-height: 50vh;
  position: relative;
}
/* 浮动 X 关闭按钮（top-right） */
.complaint-2d-modal .cd-float-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #D1D5DB;
  color: #1F2937;
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
}
.complaint-2d-modal .cd-float-close:hover {
  background: #F3F4F6;
  border-color: #9CA3AF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transform: scale(1.05);
}
.complaint-2d-modal .modal-body {
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
}
.complaint-2d-modal .modal-body {
  padding: 0;
}
.complaint-2d-modal .cd-tbl {
  font-size: 12px;
  margin-bottom: 0;
}
.complaint-2d-modal .cd-tbl thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #E6F0FA;
  box-shadow: 0 1px 0 #B8C5D6;
}
.complaint-2d-modal .cd-tbl th {
  padding: 6px 10px;
  font-weight: 600;
  white-space: nowrap;
  font-size: 12px;
  background: #E6F0FA;
  color: #1F2937;
  border-bottom: 1px solid #D0DCE8;
}
.complaint-2d-modal .cd-tbl td {
  padding: 4px 10px;
  white-space: nowrap;
  font-size: 12px;
  border-bottom: 1px solid #F0F4F8;
}
.complaint-2d-modal .cd-tbl tbody tr:hover {
  background: #F8FBFF;
}

/* 同期对比面板 */
.yoy-panel {
  border-top: 1px solid #E2E8F0;
  padding-top: 16px;
}
.yoy-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.yoy-title {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
}
.yoy-controls {
  display: flex;
  align-items: center;
}
.yoy-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #E2E8F0;
}
.yoy-tab-btn {
  padding: 6px 18px;
  font-size: 12px;
  border: 1px solid #E2E8F0;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: #F8FAFC;
  color: #64748B;
  cursor: pointer;
}
.yoy-tab-btn.yoy-active {
  background: #fff;
  color: #1E3A8A;
  font-weight: 600;
  border-bottom: 2px solid #1E3A8A;
}
.yoy-content table {
  width: 100%;
  border-collapse: collapse;
}
.yoy-content th {
  background: #1E3A8A;
  color: #fff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  position: sticky;
  top: 0;
}
.yoy-content td {
  padding: 4px 10px;
  font-size: 12px;
  text-align: center;
  border-bottom: 1px solid #E2E8F0;
}
.yoy-content .yoy-positive {
  color: #059669;
  font-weight: 600;
}
.yoy-content .yoy-negative {
  color: #DC2626;
  font-weight: 600;
}
.yoy-content .yoy-zero {
  color: #94A3B8;
}
.yoy-content .yoy-total-row td {
  background: #1E293B;
  color: #fff;
  font-weight: 600;
}
.yoy-content .yoy-total-row td:first-child {
  border-radius: 4px 0 0 4px;
}
.yoy-content .yoy-total-row td:last-child {
  border-radius: 0 4px 4px 0;
}
.yoy-export-btn {
  font-size: 11px;
  padding: 2px 8px;
  margin-left: auto;
}

/* ===== 岗位角色 chip 多选 ===== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 12px;
  font-size: 12px;
  margin: 2px;
  white-space: nowrap;
}
.chip .chip-remove {
  cursor: pointer;
  color: #999;
  font-weight: bold;
  margin-left: 2px;
}
.chip .chip-remove:hover { color: #d32f2f; }
.chip-add {
  display: inline-block;
  padding: 2px 8px;
  background: #fff;
  border: 1px dashed #ccc;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
  margin: 2px;
  color: #666;
}
.chip-add:hover { border-color: #1976d2; color: #1976d2; }
.chip-options {
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 4px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-height: 240px;
  overflow-y: auto;
}
.chip-options div {
  padding: 4px 12px;
  cursor: pointer;
  font-size: 13px;
  border-radius: 4px;
}
.chip-options div:hover { background: #e3f2fd; color: #1976d2; }
/* 受保护角色（「超级管理员」）在 chip-options 中保留显示但 disabled + tooltip */
.chip-options div.role-protected { color: #ccc; cursor: not-allowed; background: #fafafa; }
.chip-options div.role-protected:hover { background: #fafafa; color: #ccc; }

/* 账号管理：操作列冻结右侧（黑色背景 2026-08-21） */
.table .acct-sticky-col { position: sticky !important; right: 0; }
.table tbody tr:hover .acct-sticky-col { background: #2a2a2a !important; }

/* 2026-11-25 员工管理操作列冻结右侧：
   员工表 16 列总宽 2090px > 容器 1400px，操作列会被推到横向滚动区外，
   看起来"操作列溢出/不见了"。冻结右侧后始终可见。 */
.table .emp-sticky-ops {
  position: sticky !important;
  right: 0;
  z-index: 6;
  background: #fff;
  box-shadow: -4px 0 6px -3px rgba(0,0,0,.12);
}
.table thead .emp-sticky-ops { z-index: 16; background: #2c5282; }
.table tbody tr:nth-of-type(odd) .emp-sticky-ops { background: #f9fafb; }
.table tbody tr:hover .emp-sticky-ops { background: #eef4ff; }
.table tbody tr.row-selected .emp-sticky-ops { background: #e7f1ff; }

/* Ա���������п��϶��ֱ� */
.emp-col-resizer:hover { background: rgba(13,110,253,0.35); }
.emp-th { user-select:none; }


/* 提现单号 → 费用台账联动（可点击） */
td[data-field='transfer_no'] { color:#0d6efd; cursor:pointer; text-decoration:underline; }
td[data-field='transfer_no']:hover { color:#0a58ca; background:#f0f6ff; }

/* 结算中报表网格线加强 */
.dpr-grid th, .dpr-grid td { border:1px solid #B8C4D0 !important; }
.dpr-grid thead th { border-bottom:2px solid #8FA3B8 !important; }
.dpr-grid tfoot td { border-top:2px solid #8FA3B8 !important; }

/* 小程序配置面板 */
.mpx-row { display:flex; align-items:center; margin:10px 0; }
.mpx-lab { flex:0 0 130px; color:#666; }
.mpx-row .inp { flex:1; padding:8px 10px; border:1px solid #d9d9d9; border-radius:6px; }

/* �T�T�T dbsync �ƶ�����ͬ����壨һ�ڣ� �T�T�T */
.dbsync-card { border:1px solid #e3e6ea; border-radius:8px; padding:12px; background:#fff; }
#tk-fields .form-check-input { margin-top:0; }


/* ===== custom query designer 2026-08-12 ===== */
.cq-center-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;}
.cq-center-tip{margin-bottom:10px;font-size:12px;}
.cq-center-table td,.cq-center-table th{font-size:13px;}
.cq-modal-mask{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:9000;display:flex;align-items:center;justify-content:center;}
.cq-modal{background:#fff;border-radius:8px;width:640px;max-height:86vh;display:flex;flex-direction:column;box-shadow:0 8px 30px rgba(0,0,0,.25);}
.cq-modal-lg{width:880px;max-width:94vw;}
.cq-modal-head{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid #eee;font-size:15px;}
.cq-modal-body{padding:14px 16px;overflow:auto;flex:1;}
.cq-modal-foot{padding:10px 16px;border-top:1px solid #eee;display:flex;gap:8px;justify-content:flex-end;}
.cq-modal-steps{padding:10px 16px 0;border-bottom:1px solid #f0f0f0;}
.cq-steps{list-style:none;display:flex;gap:6px;margin:0;padding:0;}
.cq-steps li{flex:1;text-align:center;font-size:12px;color:#888;padding:6px 4px;border-bottom:2px solid transparent;cursor:pointer;}
.cq-steps li b{display:inline-block;width:20px;height:20px;line-height:20px;border-radius:50%;background:#e0e0e0;color:#fff;margin-right:4px;}
.cq-steps li.active{color:#1976d2;border-color:#1976d2;}
.cq-steps li.active b{background:#1976d2;}
.cq-steps li.done b{background:#43a047;}
.cq-form-row{margin-bottom:12px;}
.cq-form-row>label{display:block;font-size:12px;color:#555;margin-bottom:3px;}
.cq-col-preview{margin-top:8px;max-height:120px;overflow:auto;border:1px solid #eee;border-radius:4px;padding:6px;background:#fafafa;}
.cq-chip-row{display:flex;flex-wrap:wrap;gap:4px;}
.cq-chip{font-size:11px;background:#eef4ff;color:#1565c0;border:1px solid #cfe0ff;border-radius:10px;padding:1px 8px;}
.cq-j-toolbar{margin-bottom:10px;display:flex;gap:10px;align-items:center;}
.cq-join-list{max-height:52vh;overflow:auto;}
.cq-join-card{border:1px solid #e0e0e0;border-radius:6px;padding:10px;margin-bottom:10px;background:#fafbfc;}
.cq-join-head{display:flex;justify-content:space-between;align-items:center;font-weight:600;font-size:13px;margin-bottom:8px;}
.cq-on-row{display:flex;align-items:center;gap:6px;}
.cq-on-row label{margin:0;min-width:70px;}
.cq-jf-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:4px 10px;border:1px solid #eee;border-radius:4px;padding:8px;background:#fff;max-height:150px;overflow:auto;}
.cq-mini-check{font-size:12px;font-weight:normal;display:flex;align-items:center;gap:4px;margin:0;white-space:nowrap;}
.cq-mini-check code{font-size:11px;}
.cq-f3-layout{display:grid;grid-template-columns:1fr 1.3fr;gap:12px;height:54vh;}
.cq-f3-avail,.cq-f3-sel{border:1px solid #e0e0e0;border-radius:6px;display:flex;flex-direction:column;overflow:hidden;}
.cq-f3-title{padding:6px 10px;background:#f5f7fa;font-size:12px;font-weight:600;border-bottom:1px solid #e0e0e0;}
.cq-f3-scroll{padding:8px;overflow:auto;flex:1;}
.cq-sel-row{display:flex;align-items:center;gap:5px;padding:5px;border-bottom:1px solid #f2f2f2;}
.cq-drag{cursor:move;color:#aaa;user-select:none;}
.cq-sel-label{flex:1 1 auto;min-width:80px;}
.cq-sel-field{flex:0 0 110px;}
.cq-sel-w{flex:0 0 70px;}
.cq-sel-fmt{flex:0 0 90px;}
.cq-sel-sum{flex:0 0 auto;margin:0;font-size:12px;}
.cq-f-toolbar{margin-bottom:10px;display:flex;gap:8px;align-items:center;}
.cq-filter-list .cq-filter-row{display:flex;gap:6px;align-items:center;margin-bottom:6px;flex-wrap:wrap;}
.cq-filter-row select[data-ffld]{flex:0 0 200px;}
.cq-filter-row input[data-flbl]{flex:1 1 140px;min-width:120px;}
.cq-preview-table{max-height:50vh;overflow:auto;border:1px solid #eee;}
.cq-preview-table table{margin:0;font-size:12px;}


/* ── 查询按钮 loading 态(2026-08-23 重写:文字不变,加 spinner 防抖动闪动) ── */
.btn-query.loading { pointer-events: none; opacity: .75; position: relative; }
.btn-query.loading::after {
  content: ""; position: absolute; right: 6px; top: 50%; margin-top: -7px;
  width: 14px; height: 14px; box-sizing: border-box; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: rs-spin .8s linear infinite;
}
@keyframes rs-spin { to { transform: rotate(360deg); } }



/* 2026-08-23 修复: 结算监控交叉表 - 覆盖 .table 的 width/min-width 100% 锁宽。
   宽度由内容+列宽决定(初始铺满容器, 拖宽某列时表格自然变宽出横向滚动, 其它列不动)。
   fixed 布局下若表格宽被锁死, 拖一列变宽会从其它列扣宽度(挤压)。 */
table.sm-grid { width: auto !important; min-width: auto !important; }

/* 2026-08-23 修复: 账号管理表格 - 覆盖 .table 的 width:100% 锁宽(同结算监控 sm-grid)。
   拖动列宽时表格宽跟随列宽和, 不挤压其它列。 */
table.acct-grid { width: auto !important; min-width: auto !important; }

/* 2026-08-23 修复: 结算中报表 - 覆盖 .table 锁宽(统一列拖动不挤压) */
table.dpr-grid { width: auto !important; min-width: auto !important; }

/* 2026-08-23 修复: 明细弹窗 - 覆盖 .table 锁宽(统一列拖动不挤压) */
#table-smd_modal { width: auto !important; min-width: auto !important; }


/* 2026-08-23 统一列宽: 标准列表表格宽度跟随列宽和。
   初始 min-width:100% 铺满容器; 拖动时 mousedown 清 minWidth -> 表格宽=列宽和(超容器横向滚动),
   拖一列只变该列, 其它列不被挤压; mouseup 保持拖动宽度不回弹。 */
table.colw-auto { width: auto; min-width: auto; } /* !important removed: JS 需设 tbl.style.width */

/* 2026-08-23: 员工表 width:100% 锁宽会挤压列, 改 auto(无!important, JS 需设 tbl.style.width=列宽和) */
table[id^="empTable-"] { width: auto; min-width: 100%; }

/* === 2026-08-31: 启动遮罩视觉统一 === */
/* 改前:appLoading 是 #f5f7fa 浅灰底,登录页是 #070d1e 深蓝底,刷新时浅灰→深蓝明显跳跃。 */
/* 改后:boot-loading 沿用登录页深蓝渐变底 + 光晕,加 spinner 动效 + "数字改变未来" 水印。 */
/* 配合 index.html 的 <style>#loginOverlay:not(.login-ready){display:none !important}</style> */
/* (CSS 未到前 loginOverlay 隐起来,避免 0~145ms 闪一下深蓝页面)。 */

.boot-loading {
  position: fixed; inset: 0; z-index: 90000;
  background: #070d1e;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 24px;
  overflow: hidden;
  /* 平滑切换:从 opacity 1 → 0 时不抖 */
  opacity: 1;
  transition: opacity 0.25s ease;
}
.boot-loading.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* 主光晕 (跟 login-overlay 同步) */
.boot-glow {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(56,132,255,0.12) 0%, rgba(56,132,255,0.04) 35%, transparent 65%);
}
.boot-glow-1 {
  width: 900px; height: 900px;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  animation: bootGlowPulse 4s ease-in-out infinite;
}
.boot-glow-2 {
  width: 300px; height: 300px;
  top: 20%; right: 20%;
  background: radial-gradient(circle, rgba(0,180,255,0.06) 0%, transparent 60%);
}

/* 网格底纹 (跟 login-overlay::before 同步) */
.boot-loading::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background-image:
    linear-gradient(rgba(56,132,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,132,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 70%);
}

/* "数字改变未来" 水印 */
.boot-tech-text {
  position: relative; z-index: 2;
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 900;
  white-space: nowrap; letter-spacing: 0.25em;
  color: transparent;
  background: linear-gradient(90deg, rgba(56,132,255,0) 0%, rgba(56,132,255,0.08) 50%, rgba(56,132,255,0) 100%);
  -webkit-background-clip: text; background-clip: text;
  animation: bootTechFade 3s ease-in-out infinite;
  margin-top: -60px; /* 抬到中上,给 spinner 留位 */
}

/* 加载中 spinner + 文字 */
.boot-spinner {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  color: rgba(180,200,230,0.85);
  font-size: 14px; letter-spacing: 3px;
}
.boot-spinner-ring {
  width: 18px; height: 18px;
  border: 2px solid rgba(56,132,255,0.18);
  border-top-color: rgba(56,132,255,0.85);
  border-radius: 50%;
  animation: bootSpin 0.9s linear infinite;
}

@keyframes bootSpin { to { transform: rotate(360deg); } }
@keyframes bootGlowPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}
@keyframes bootTechFade {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
