/* ==========================================================================
   Enterprise Cloud Console Design System (Arco Design Pro / Ant Design Pro 5)
   星枢内部企业工作台 (/sales) 正统政企级 B2B 云中台样式规范（含 A4 单据打印）
   ========================================================================== */

:root {
  /* 顶栏深海政企蓝黑与工作区冷灰底座 */
  --topbar-bg: #091936;
  --topbar-border: rgba(255, 255, 255, 0.1);
  --bg-canvas: #f0f2f5;
  --bg-subtle: #f7f8fa;
  --bg-hover: #f2f3f5;
  --bg-surface: #ffffff;
  --bg-row-hover: #f2f7ff;

  /* 侧边二级导航（纯白底 + 科技蓝激活态） */
  --bg-nav: #ffffff;
  --bg-nav-hover: #f2f3f5;
  --bg-nav-active: #e6f4ff;

  /* 正统政企文字色阶 */
  --ink-1: #1d2129;
  --ink-2: #4e5969;
  --ink-3: #4e5969;
  --ink-4: #86909c;

  /* 硬朗清晰的 1px 结构分割线 */
  --line-1: #e5e6eb;
  --line-2: #f2f3f5;
  --line-input: #cbd5e1;
  --line-strong: #c9cdd4;

  /* 正统企业科技蓝品牌主色（严禁死黑主按钮） */
  --primary: #1677ff;
  --primary-hover: #4096ff;
  --primary-active: #0958d9;
  --primary-soft: #e6f4ff;
  --primary-border: #91caff;

  /* 政企标准语义色（成功绿 / 预警橙 / 高危红 / 业务紫） */
  --ok: #00b42a;
  --ok-hover: #009a29;
  --ok-soft: #e8ffea;
  --ok-border: #aff0b5;

  --warn: #ff7d00;
  --warn-soft: #fff7e8;
  --warn-border: #ffe4ba;

  --bad: #f53f3f;
  --bad-soft: #ffece8;
  --bad-border: #fdcdc5;

  --purple: #722ed1;
  --purple-soft: #f5e8ff;
  --purple-border: #d3adf7;

  /* 严谨利落的企业级圆角规范（控件 4px，面板 6px） */
  --radius-xs: 3px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 6px;
  --radius-xl: 6px;

  /* 克制稳重的政企面板阴影 */
  --shadow-xs: 0 1px 3px rgba(0, 21, 41, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 21, 41, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 21, 41, 0.18), 0 2px 6px rgba(0, 21, 41, 0.08);

  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
}

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

html, body {
  height: 100%;
  background: var(--bg-canvas);
  color: var(--ink-1);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.14s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* 全局数字、金额、单号、日期强制开启等宽对齐 */
.num, .mono, .k-val, .nav-badge, .bell-dot {
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: -0.01em;
}

.ui-ico {
  display: inline-block;
  vertical-align: -0.16em;
  flex-shrink: 0;
}

/* 初始启动加载器 */
.boot-loading {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg-canvas);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
}

.boot-spinner {
  color: var(--primary);
  animation: xsSpin 0.85s linear infinite;
}

@keyframes xsSpin {
  to { transform: rotate(360deg); }
}

@keyframes xsPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 119, 255, 0.36); }
  50% { box-shadow: 0 0 0 4px rgba(22, 119, 255, 0); }
}

/* ==================== 一键复制微交互控件 ==================== */
.mono-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  vertical-align: middle;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: var(--ink-4);
  background: transparent;
  transition: all 0.14s ease;
  flex-shrink: 0;
  vertical-align: middle;
}

.copy-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary);
}

.copy-btn.copied,
.copy-btn.is-copied {
  background: var(--ok-soft);
  border-color: var(--ok-border);
  color: var(--ok);
}

.copy-btn .ui-ico {
  vertical-align: 0;
}

/* ==================== 1. 政企中台黄金三层架构（顶栏深海蓝 + 侧栏纯白蓝条 + 灰底白卡） ==================== */
.ent-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-canvas);
}

/* 顶部全局深海政企蓝主导航栏（固定置顶，高 50px，横跨 100%） */
.ent-topbar {
  height: 50px;
  min-height: 50px;
  width: 100%;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.2);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 40;
  color: #ffffff;
  user-select: none;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  flex: 1 1 auto;
}

.sidebar-toggle-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.ent-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  min-width: 0;
  flex-shrink: 0;
}

.ent-logo {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #4096ff 0%, #1677ff 60%, #0958d9 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.ent-logo .ui-ico {
  vertical-align: 0;
}

.ent-brand-txt {
  min-width: 0;
}

.ent-brand-txt b {
  display: block;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ent-brand-txt .brand-short {
  display: none;
}

.topbar-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

/* 通用面包屑（页面内容区）与深海蓝顶栏面包屑 */
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-4);
  white-space: nowrap;
  min-width: 0;
}

.breadcrumb b {
  color: var(--ink-1);
  font-weight: 600;
}

.breadcrumb .bc-sep {
  color: var(--line-strong);
}

.ent-topbar .breadcrumb {
  color: rgba(255, 255, 255, 0.68);
  overflow: hidden;
  text-overflow: ellipsis;
}

.ent-topbar .breadcrumb b {
  color: #ffffff;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ent-topbar .breadcrumb .bc-sep {
  color: rgba(255, 255, 255, 0.32);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* 顶栏深色半透明全局搜索框 */
.cmd-search-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 262px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  overflow: hidden;
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.cmd-search-btn .cmd-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.cmd-search-btn:hover {
  border-color: #4096ff;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.cmd-kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  flex-shrink: 0;
}

/* 顶栏环境模式指示灯 */
.top-env-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  flex-shrink: 0;
}

.env-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.env-dot.prod {
  background: #00b42a;
  box-shadow: 0 0 0 2px rgba(0, 180, 42, 0.25);
}

.env-dot.sandbox {
  background: #ff7d00;
  box-shadow: 0 0 0 2px rgba(255, 125, 0, 0.28);
}

/* 顶栏科技蓝描边岗位视角切换器 */
.role-switcher-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  background: rgba(22, 119, 255, 0.22);
  border: 1px solid rgba(64, 150, 255, 0.65);
  color: #e6f4ff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.role-switcher-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4096ff;
  flex-shrink: 0;
}

.role-switcher-pill select {
  border: none;
  background: transparent;
  color: #ffffff;
  font-weight: 600;
  font-size: 12px;
  height: 24px;
  min-height: 24px;
  padding: 0 2px;
  outline: none;
  cursor: pointer;
}

.role-switcher-pill select option {
  background: #091936;
  color: #ffffff;
}

/* 顶栏白色告警通知铃铛与红色数字角标 */
.icon-bell-btn {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.icon-bell-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.bell-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--bad);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px var(--topbar-bg);
}

/* 顶栏员工身份与改密/退出操作区 */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 6px 0 4px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  white-space: nowrap;
  flex-shrink: 0;
}

.user-avatar {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-xs);
  background: var(--primary);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.user-chip-name {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  padding-right: 2px;
}

.chip-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-xs);
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  transition: all 0.12s ease;
}

.chip-act-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.chip-act-btn.danger:hover {
  background: rgba(245, 63, 63, 0.24);
  color: #ff9b98;
}

/* 下层主体容器：左侧 242px 纯白菜单 + 右侧冷灰工作区（防止长菜单名与超时角标挤压截断） */
.ent-body {
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  flex: 1;
  min-height: calc(100vh - 50px);
}

.ent-shell.nav-collapsed .ent-body {
  grid-template-columns: 0px minmax(0, 1fr);
}

.ent-shell.nav-collapsed .ent-sidebar {
  width: 0;
  overflow: hidden;
  border-right: none;
}

/* 左侧 216px 纯白二级导航侧边栏 */
.ent-sidebar {
  background: var(--bg-nav);
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 50px;
  height: calc(100vh - 50px);
  overflow-y: auto;
  border-right: 1px solid var(--line-1);
  z-index: 20;
  user-select: none;
}

.nav-scroll {
  flex: 1;
  padding: 8px 8px 16px;
}

.nav-group-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-4);
  padding: 14px 12px 6px;
  white-space: nowrap;
}

.nav-scroll .nav-group-label:first-child {
  padding-top: 6px;
}

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 9px 8px 10px;
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 400;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  margin-bottom: 2px;
  white-space: nowrap;
}

.nav-btn:hover {
  background: var(--bg-nav-hover);
  color: var(--ink-1);
}

/* 激活选中态：#E6F4FF 浅科技蓝底 + #1677FF 加粗蓝字与蓝图标 + 左侧 3px 蓝色竖条 */
.nav-btn.active {
  background: var(--bg-nav-active);
  border-left-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.nav-btn .nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.nav-btn .nav-left > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-ico {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-4);
  flex-shrink: 0;
  transition: color 0.12s ease;
}

.nav-btn:hover .nav-ico {
  color: var(--ink-1);
}

.nav-btn.active .nav-ico {
  color: var(--primary);
}

.nav-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: var(--bg-hover);
  color: var(--ink-2);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-btn.active .nav-badge {
  background: #bae0ff;
  color: var(--primary-active);
}

.nav-badge.urgent {
  background: var(--bad-soft);
  color: var(--bad);
  border: 1px solid var(--bad-border);
}

.ent-side-footer {
  padding: 11px 14px;
  border-top: 1px solid var(--line-1);
  font-size: 11.5px;
  color: var(--ink-4);
  display: grid;
  gap: 6px;
  background: var(--bg-subtle);
}

.ent-side-company {
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ent-side-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ent-side-links a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ink-4);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.ent-side-links a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* 右侧主工作区（标准中台冷灰 #F0F2F5；使用 clip 保持子级 position: sticky 完整生效） */
.ent-main-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: clip;
  background: var(--bg-canvas);
}

.ent-content {
  flex: 1;
  padding: 18px 22px 40px;
  max-width: 1620px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
}

/* ==================== 2. 政企标准按钮、微圆角标签与面板卡片 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-input);
  background: #ffffff;
  color: var(--ink-1);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.btn .ui-ico {
  vertical-align: 0;
}

.btn:hover {
  background: var(--bg-row-hover);
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.btn:active {
  border-color: var(--primary-active);
  color: var(--primary-active);
}

/* 正统企业科技蓝主按钮 #1677FF */
.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(22, 119, 255, 0.22);
}

.btn.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
}

.btn.primary:active {
  background: var(--primary-active);
  border-color: var(--primary-active);
  color: #ffffff;
}

/* 浅蓝描边操作按钮（用于表内或快捷入口） */
.btn.ghost-primary {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary);
}

.btn.ghost-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* 核销放行与签署通过成功绿按钮 */
.btn.success {
  background: var(--ok);
  border-color: var(--ok);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 180, 42, 0.2);
}

.btn.success:hover {
  background: var(--ok-hover);
  border-color: var(--ok-hover);
  color: #ffffff;
}

.btn.danger {
  background: var(--bad-soft);
  border-color: var(--bad-border);
  color: var(--bad);
}

.btn.danger:hover {
  background: #ffece8;
  border-color: var(--bad);
  color: #cf1322;
}

.btn.danger-fill {
  background: var(--bad);
  border-color: var(--bad);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(245, 63, 63, 0.22);
}

.btn.danger-fill:hover {
  background: #d9363e;
  border-color: #d9363e;
  color: #ffffff;
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--primary);
}

.btn.ghost:hover {
  background: var(--primary-soft);
  border-color: transparent;
  color: var(--primary-active);
}

.btn.xs {
  height: 22px;
  padding: 0 7px;
  font-size: 11px;
  gap: 3px;
  border-radius: var(--radius-sm);
}

.btn.sm {
  height: 26px;
  padding: 0 9px;
  font-size: 12px;
  gap: 4px;
  border-radius: var(--radius-sm);
}

.btn.lg {
  height: 38px;
  padding: 0 20px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.btn:disabled,
.btn.is-loading {
  opacity: 0.58;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.is-loading {
  cursor: wait;
}

@keyframes xsBtnSpin {
  to { transform: rotate(360deg); }
}

.btn.is-loading::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1.75px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: xsBtnSpin 0.65s linear infinite;
  flex-shrink: 0;
}

.chip-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  height: 22px;
  border-radius: var(--radius-xs);
  border: 1px dashed var(--line-strong);
  background: var(--bg-subtle);
  color: var(--ink-2);
  font-size: 11.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.14s ease;
}

.chip-mini:hover {
  border-style: solid;
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.icon-close-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-4);
  transition: all 0.14s ease;
}

.icon-close-btn:hover {
  background: var(--bg-hover);
  color: var(--ink-1);
}

/* 方正微圆角政企状态标签（3px 圆角，严禁 999px 胶囊） */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 7px;
  border-radius: var(--radius-xs);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge.no-dot::before {
  display: none;
}

.b-info { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-border); }
.b-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-border); }
.b-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-border); }
.b-bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-border); }
.b-purple { background: var(--purple-soft); color: var(--purple); border-color: var(--purple-border); }
.b-slate { background: var(--bg-hover); color: var(--ink-2); border-color: var(--line-1); }

/* 页面标题栏与白色数据面板 */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.page-header > div:first-child {
  min-width: 240px;
  flex: 1 1 320px;
}

.page-header h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-1);
  line-height: 1.35;
}

.page-header p {
  color: var(--ink-2);
  font-size: 12.5px;
  margin-top: 4px;
  line-height: 1.5;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
  max-width: 100%;
}

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  margin-bottom: 16px;
  overflow: hidden;
}

.panel-head {
  padding: 11px 16px;
  background: #fafbfd;
  border-bottom: 1px solid var(--line-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* 经典政企中台视觉锚点：面板标题左侧 3px × 14px #1677FF 蓝色竖向指示条 */
.panel-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-1);
  line-height: 1.4;
}

.panel-head h2::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 1px;
  background: var(--primary);
  flex-shrink: 0;
}

.panel-head .sub {
  font-size: 12px;
  color: var(--ink-4);
}

.panel-body {
  padding: 16px;
}

.panel-body h3 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}

.panel-body h3::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 1px;
  background: var(--primary);
  flex-shrink: 0;
}

/* ==================== 3. 政企级 KPI 指标卡与漏斗数据条 ==================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--line-1);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  box-shadow: var(--shadow-xs);
  min-width: 0;
}

.kpi-grid > .kpi-card:nth-child(2) {
  border-top-color: #00b42a;
}

.kpi-grid > .kpi-card:nth-child(3) {
  border-top-color: #ff7d00;
}

.kpi-grid > .kpi-card:nth-child(4) {
  border-top-color: #0958d9;
}

.kpi-card .k-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.kpi-card .k-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-1);
  margin-top: 6px;
  letter-spacing: -0.02em;
  line-height: 1.25;
  white-space: nowrap;
}

.kpi-card .k-sub {
  font-size: 11.5px;
  color: var(--ink-4);
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 企业蓝阶梯漏斗进度条 */
.funnel-row {
  display: grid;
  grid-template-columns: 126px minmax(80px, 1fr) 136px;
  gap: 12px;
  align-items: center;
}

.funnel-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-1);
  white-space: nowrap;
}

.funnel-track {
  height: 9px;
  background: var(--bg-hover);
  border-radius: 2px;
  overflow: hidden;
}

.funnel-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ==================== 4. 筛选工具栏与高密度政企数据表格 ==================== */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--line-1);
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-bar > .filter-group:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.filter-bar > .filter-group:first-child > input[data-filter-inp="1"] {
  flex: 1 1 180px;
  min-width: 160px;
  max-width: 280px;
  width: auto !important;
}

.filter-bar .xw-select:not(.is-compact),
.filter-bar .xw-select.in-filter-bar:not(.is-compact) {
  flex: 0 1 auto;
  min-width: 108px;
  max-width: 168px;
  padding: 0 9px;
}

/* 管理后台全部筛选栏（.filter-bar）输入框、下拉选择器、页签胶囊与搜索/重置按钮严格统一 32px 像素级等高对齐 */
.filter-bar input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]),
.filter-bar .inp:not(textarea),
.filter-bar select,
.filter-bar .sel,
.filter-bar .xw-select,
.filter-bar .xw-select.in-filter-bar,
.filter-bar .btn,
.filter-bar .btn.sm {
  height: 32px !important;
  min-height: 32px !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]):not(#xme-link-inp):not(.xme-doc-title-inp):not(.xme-prop-inp):not(#cmd-input),
select,
textarea:not(.xme-raw-md-ta),
.inp,
.sel {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  font-size: 12.5px;
  color: var(--ink-1);
  max-width: 100%;
  box-sizing: border-box;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]):not(#xme-link-inp):not(.xme-doc-title-inp):not(.xme-prop-inp):not(#cmd-input),
select,
.inp:not(textarea),
.sel {
  height: 36px;
  padding: 0 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

select,
.sel {
  min-height: 36px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]):not(#xme-link-inp):not(.xme-doc-title-inp):not(.xme-prop-inp):not(#cmd-input):hover:not(:disabled),
select:hover:not(:disabled),
textarea:not(.xme-raw-md-ta):hover:not(:disabled),
.inp:hover:not(:disabled),
.sel:hover:not(:disabled),
.field input:hover:not(:disabled),
.field select:hover:not(:disabled),
.field textarea:hover:not(:disabled) {
  border-color: #94a3b8;
}

input::placeholder,
textarea::placeholder,
.inp::placeholder,
.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-4);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]):not(#xme-link-inp):not(.xme-doc-title-inp):not(.xme-prop-inp):not(#cmd-input):focus,
select:focus,
textarea:not(.xme-raw-md-ta):focus,
.inp:focus,
.sel:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.seg-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--bg-hover);
  border: 1px solid var(--line-1);
  padding: 2px;
  border-radius: var(--radius-sm);
  gap: 2px;
  max-width: 100%;
  overflow-x: auto;
}

.seg-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
  transition: all 0.14s ease;
}

.seg-tabs button .ui-ico {
  vertical-align: 0;
}

.seg-tabs button:hover {
  color: var(--primary);
}

.seg-tabs button.on {
  background: #ffffff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 21, 41, 0.08);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* 高密度政企数据表格规范（含右侧操作列 Sticky 防裁剪固定） */
table.ent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

table.ent-table th {
  background: #fafbfd;
  color: var(--ink-1);
  font-weight: 600;
  font-size: 12px;
  text-align: left;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line-1);
  white-space: nowrap;
}

table.ent-table td {
  background: #ffffff;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line-1);
  vertical-align: middle;
  color: var(--ink-2);
}

/* 避免窄视口下正文列被挤压折字 */
table.ent-table td:first-child {
  min-width: 120px;
}

table.ent-table td .cell-main {
  min-width: 104px;
}

table.ent-table tbody tr:last-child td {
  border-bottom: none;
}

/* 行悬停淡科技蓝高亮 #F4F7FB */
table.ent-table tbody tr:hover,
table.ent-table tbody tr:hover td {
  background: #f4f7fb;
}

table.ent-table tbody tr.clickable {
  cursor: pointer;
}

table.ent-table th.r, table.ent-table td.r {
  text-align: right;
  white-space: nowrap;
}

/* 最右侧操作列固定于视口右边缘，彻底杜绝 1100px–1440px 视口下操作按钮被截断 */
table.ent-table thead tr th.r:last-child {
  position: sticky;
  right: 0;
  z-index: 3;
  background: #fafbfd;
  white-space: nowrap;
  box-shadow: -4px 0 8px -4px rgba(15, 23, 42, 0.08);
}

table.ent-table tbody tr td.r:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #ffffff;
  white-space: nowrap;
  box-shadow: -4px 0 8px -4px rgba(15, 23, 42, 0.08);
}

table.ent-table tbody tr:hover td.r:last-child {
  background: #f4f7fb;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.cell-main {
  font-weight: 600;
  color: var(--ink-1);
  line-height: 1.4;
}

.cell-sub {
  font-size: 11.5px;
  color: var(--ink-4);
  margin-top: 2px;
  line-height: 1.4;
}

/* ==================== 5. 可视化阶段看板 (Kanban Board) ==================== */
.kanban-wrap {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
  align-items: flex-start;
}

.kanban-col {
  min-width: 268px;
  width: 268px;
  flex-shrink: 0;
  background: var(--bg-canvas);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 210px);
}

.kanban-col-head {
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line-1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.kanban-col-head b {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-1);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.kanban-col-sum {
  font-size: 11.5px;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}

.kanban-cards {
  padding: 8px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
}

.k-card {
  background: #ffffff;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.k-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.k-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.k-card-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-1);
  margin-bottom: 4px;
}

.k-card-meta {
  font-size: 11.5px;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--line-2);
}

/* ==================== 6. 全屏「项目作战室」与分段式流程轨道 ==================== */
.pipeline-board {
  display: grid;
  grid-template-columns: 0.85fr 1.08fr 1.32fr 1.08fr;
  gap: 10px;
  padding: 14px 16px;
  background: #ffffff;
}

.pipeline-phase {
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pipeline-phase.is-active {
  background: #ffffff;
  border-color: var(--primary-border);
  border-top: 2px solid var(--primary);
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.08);
}

.pipeline-phase.is-done {
  background: #fafcfd;
}

.phase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  white-space: nowrap;
}

.phase-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-1);
}

.phase-idx {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-4);
  background: #ffffff;
  border: 1px solid var(--line-1);
  padding: 0 5px;
  border-radius: var(--radius-xs);
}

.pipeline-phase.is-active .phase-idx {
  background: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary);
}

.pipeline-phase.is-done .phase-idx {
  background: var(--ok-soft);
  border-color: var(--ok-border);
  color: var(--ok);
}

.phase-stat {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.phase-bar {
  height: 3px;
  background: var(--line-1);
  border-radius: 2px;
  overflow: hidden;
}

.phase-bar > i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--ink-4);
  transition: width 0.25s ease;
}

.pipeline-phase.is-done .phase-bar > i {
  background: var(--ok);
}

.pipeline-phase.is-active .phase-bar > i {
  background: var(--primary);
}

.phase-steps {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.pipe-step {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-size: 11.5px;
  color: var(--ink-4);
  background: transparent;
  border: 1px solid transparent;
  white-space: nowrap;
}

.pipe-step .ui-ico {
  vertical-align: 0;
}

.pipe-step.done {
  color: var(--ink-1);
  background: #ffffff;
  border-color: var(--line-1);
}

.pipe-step.done .step-chk {
  color: var(--ok);
  display: inline-flex;
}

.pipe-step.active {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: var(--primary-border);
  font-weight: 600;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
  animation: xsPulse 1.8s infinite;
}

.warroom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

/* 作战室 7 页签导航条 */
.tab-strip {
  display: flex;
  gap: 2px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line-1);
  background: #fafbfd;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab-strip button {
  padding: 11px 11px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.tab-strip button:hover {
  color: var(--primary);
}

.tab-strip button.on {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* 键值对描述列表 */
.kv-list {
  display: grid;
  gap: 8px;
}

.kv-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line-2);
}

.kv-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.kv-item > span:first-child {
  color: var(--ink-4);
  flex-shrink: 0;
  white-space: nowrap;
}

.kv-item > b {
  font-weight: 500;
  color: var(--ink-1);
  text-align: right;
  word-break: break-all;
}

/* 政企标准提示横幅 */
.callout {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  border: 1px solid var(--line-1);
  border-left: 3px solid var(--ink-4);
  background: var(--bg-subtle);
  color: var(--ink-1);
  line-height: 1.6;
}

.callout.info { background: var(--primary-soft); border-color: var(--primary-border); border-left-color: var(--primary); color: #003eb3; }
.callout.warn { background: var(--warn-soft); border-color: var(--warn-border); border-left-color: var(--warn); color: #ad4e00; }
.callout.bad { background: var(--bad-soft); border-color: var(--bad-border); border-left-color: var(--bad); color: #a8071a; }
.callout.ok { background: var(--ok-soft); border-color: var(--ok-border); border-left-color: var(--ok); color: #006622; }

/* 表单排版 */
.form-grid {
  display: grid;
  gap: 13px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.field {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 5px;
  font-size: 12px;
  line-height: 20px;
  font-weight: 500;
  color: var(--ink-1);
}

/* 多列同行单行表单控件基线强制对齐：即使某列标题折行或带右侧辅助胶囊，同行输入框/下拉框/日历框顶底像素 100% 齐平 */
.grid-2:not(:has(textarea)):not(:has(> .field > div:not(.xw-dt):not(.field-ctrl-box):last-child)) > .field,
.grid-3:not(:has(textarea)):not(:has(> .field > div:not(.xw-dt):not(.field-ctrl-box):last-child)) > .field {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.grid-2:not(:has(textarea)):not(:has(> .field > div:not(.xw-dt):not(.field-ctrl-box):last-child)) > .field > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]),
.grid-2:not(:has(textarea)):not(:has(> .field > div:not(.xw-dt):not(.field-ctrl-box):last-child)) > .field > .xw-select,
.grid-2:not(:has(textarea)):not(:has(> .field > div:not(.xw-dt):not(.field-ctrl-box):last-child)) > .field > .xw-dt,
.grid-2:not(:has(textarea)):not(:has(> .field > div:not(.xw-dt):not(.field-ctrl-box):last-child)) > .field > .field-ctrl-box,
.grid-2:not(:has(textarea)):not(:has(> .field > div:not(.xw-dt):not(.field-ctrl-box):last-child)) > .field > select:not(.xw-native-sr),
.grid-3:not(:has(textarea)):not(:has(> .field > div:not(.xw-dt):not(.field-ctrl-box):last-child)) > .field > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="hidden"]),
.grid-3:not(:has(textarea)):not(:has(> .field > div:not(.xw-dt):not(.field-ctrl-box):last-child)) > .field > .xw-select,
.grid-3:not(:has(textarea)):not(:has(> .field > div:not(.xw-dt):not(.field-ctrl-box):last-child)) > .field > .xw-dt,
.grid-3:not(:has(textarea)):not(:has(> .field > div:not(.xw-dt):not(.field-ctrl-box):last-child)) > .field > .field-ctrl-box,
.grid-3:not(:has(textarea)):not(:has(> .field > div:not(.xw-dt):not(.field-ctrl-box):last-child)) > .field > select:not(.xw-native-sr) {
  margin-top: auto;
}

.field input, .field select, .field textarea {
  width: 100%;
  padding: 6px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-1);
  max-width: 100%;
  box-sizing: border-box;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.field .xw-select,
.field .xw-dt {
  width: 100%;
}

.field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.field select {
  height: 36px;
  min-height: 36px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

textarea,
textarea.inp,
.field textarea {
  height: auto;
  min-height: 78px;
  padding: 8px 10px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-y: auto;
  text-overflow: clip;
  resize: vertical;
}

.chk-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-sm);
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.chk-row:hover {
  border-color: var(--primary-border);
  background: var(--bg-row-hover);
}

.chk-row input {
  width: auto;
  margin-top: 3px;
  accent-color: var(--primary);
}

/* 财务双栏金额核对 */
.cmp-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

.cmp-box > div {
  padding: 14px 16px;
}

.cmp-box > div + div {
  border-left: 1px solid var(--line-1);
}

.cmp-box label {
  display: block;
  min-height: 20px;
  font-size: 12px;
  color: var(--ink-2);
}

.cmp-box b {
  display: block;
  font-size: 21px;
  font-weight: 700;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* 流转时间线 */
.timeline {
  display: grid;
  gap: 10px;
}

.tl-row {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  position: relative;
}

.tl-row:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 15px;
  bottom: -10px;
  width: 1px;
  background: var(--line-1);
}

.tl-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--primary);
  margin-top: 4px;
}

.tl-card {
  background: var(--bg-subtle);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
}

.tl-meta {
  font-size: 11.5px;
  color: var(--ink-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

/* ==================== 7. 政企标准模态弹窗与系统轻提示 ==================== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(9, 25, 54, 0.45);
  display: none;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-mask.open {
  display: flex;
}

.sub-modal-mask {
  z-index: 260;
  background: rgba(9, 25, 54, 0.52);
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-1);
  box-shadow: var(--shadow-lg);
  width: 620px;
  max-width: 96vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-box.sm {
  width: 520px;
}

.modal-box.md {
  width: 680px;
}

.modal-box.wide {
  width: 860px;
}

/* 涉及利益/权益/席位/额度/价格变更统一二次确认与防篡改审计留痕弹窗组件 */
.risk-confirm-card {
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  background: #f8fafc;
  padding: 12px 14px;
  display: grid;
  gap: 9px;
}

.risk-confirm-card.tone-warn {
  background: #fffbeb;
  border-color: #fde68a;
}

.risk-confirm-card.tone-danger {
  background: #fef2f2;
  border-color: #fecaca;
}

.risk-confirm-card.tone-ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.risk-kv-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  line-height: 1.5;
}

.risk-kv-row > span {
  color: var(--ink-3);
  flex-shrink: 0;
}

.risk-kv-row > b {
  color: var(--ink-1);
  text-align: right;
  word-break: break-word;
}

.risk-diff-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.risk-diff-before {
  color: var(--ink-3);
  text-decoration: line-through;
}

.risk-diff-arrow {
  color: var(--primary);
  font-weight: 700;
}

.risk-diff-after {
  color: var(--primary);
  font-weight: 700;
}

.risk-confirm-card.tone-danger .risk-diff-arrow,
.risk-confirm-card.tone-danger .risk-diff-after {
  color: var(--bad);
}

.risk-audit-footnote {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed rgba(15, 23, 42, 0.12);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.risk-reason-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.risk-reason-chip {
  appearance: none;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11.5px;
  line-height: 1.5;
  cursor: pointer;
  transition: all 0.12s ease;
}

.risk-reason-chip:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.b-audit-interest {
  background: #fff7e6;
  color: #d46b08;
  border-color: #ffd591;
  font-weight: 600;
}

.modal-head {
  padding: 13px 18px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line-1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.modal-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-1);
}

.modal-head h3::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 1px;
  background: var(--primary);
  flex-shrink: 0;
}

.modal-body {
  padding: 18px 20px;
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  overflow-y: auto;
  display: grid;
  gap: 14px;
}

.modal-foot {
  padding: 11px 18px;
  border-top: 1px solid var(--line-1);
  background: var(--bg-subtle);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 8px;
}

.toast-bar {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #091936;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 420;
  max-width: 440px;
}

.toast-bar.err {
  background: #2a0a0e;
  border-left-color: var(--bad);
}

/* 顶层沉浸式看图与文档灯箱 (#lightbox-mask, z-index: 360) */
.lightbox-mask {
  position: fixed;
  inset: 0;
  z-index: 360;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  flex-direction: column;
  padding: 28px 24px 80px;
  overflow: auto;
  cursor: zoom-out;
}

.lightbox-mask.open {
  display: flex;
}

.lightbox-close-btn {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 366;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, transform 0.15s ease;
}

.lightbox-close-btn:hover {
  background: rgba(245, 63, 63, 0.9);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
}

.lightbox-stage {
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

.lightbox-img {
  display: block;
  max-width: 90vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  cursor: zoom-in;
  user-select: none;
}

.lightbox-img.zoomed {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

.lightbox-pdf {
  width: min(90vw, 1080px);
  height: 82vh;
  border: none;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.lightbox-doc-card {
  width: min(90vw, 460px);
  padding: 28px 24px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink-1);
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  cursor: default;
}

.lightbox-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 366;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 780px);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  color: #ffffff;
  font-size: 12.5px;
  cursor: default;
}

.lightbox-title {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.94);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}

.lightbox-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lightbox-pill-btn:hover {
  background: var(--primary);
  border-color: var(--primary-hover);
  color: #ffffff;
}

/* ==================== 8. 政企级双栏门户登录台 (/sales 未登录态) ==================== */
.auth-portal {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 44% 56%;
  background: var(--bg-canvas);
}

/* 左侧 44% 深海蓝黑 #091936 政企品牌立面 */
.auth-brand-side {
  background-color: #091936;
  background-image:
    radial-gradient(circle at 18% 15%, rgba(22, 119, 255, 0.24) 0%, transparent 52%),
    radial-gradient(circle at 86% 88%, rgba(9, 88, 217, 0.22) 0%, transparent 48%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 28px 28px, 28px 28px;
  color: #ffffff;
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-brand-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.auth-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #4096ff 0%, #1677ff 60%, #0958d9 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 10px rgba(22, 119, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
}

.auth-brand-title {
  font-size: 16.5px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
}

.auth-brand-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 2px;
}

.auth-sec-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background: rgba(22, 119, 255, 0.18);
  border: 1px solid rgba(64, 150, 255, 0.45);
  color: #91caff;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.auth-brand-Main {
  display: grid;
  gap: 16px;
}

.auth-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #69b1ff;
}

.auth-slogan {
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
}

.auth-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.auth-matrix-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.auth-matrix-item {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(145, 202, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  display: grid;
  gap: 6px;
}

.auth-matrix-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-matrix-ico {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: rgba(22, 119, 255, 0.22);
  border: 1px solid rgba(64, 150, 255, 0.35);
  color: #69b1ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-matrix-head b {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.auth-matrix-item p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.55;
}

.auth-brand-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.auth-portal-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-portal-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
}

.auth-portal-links a:hover {
  color: #69b1ff;
  text-decoration: none;
}

.auth-link-sep {
  color: rgba(255, 255, 255, 0.24);
}

/* 右侧 56% #F0F2F5 灰底与纯白 6px 圆角企业登录面板 */
.auth-form-side {
  background: var(--bg-canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
  overflow-y: auto;
}

.auth-form-wrap {
  width: 520px;
  max-width: 100%;
  display: grid;
  gap: 16px;
}

.auth-card {
  background: #ffffff;
  border: 1px solid var(--line-1);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}

.auth-card-head {
  margin-bottom: 16px;
}

.auth-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-card-head h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-1);
}

.auth-card-head p {
  font-size: 12.5px;
  color: var(--ink-4);
  margin-top: 5px;
}

/* 正统政企蓝色底边线切换页签 */
.auth-mode-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line-1);
  margin-bottom: 18px;
}

.auth-mode-tabs button {
  padding: 0 2px 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.auth-mode-tabs button:hover {
  color: var(--primary);
}

.auth-mode-tabs button.on {
  color: var(--primary);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

/* 演示沙盒紧凑岗位体验表格面板 */
.sandbox-panel {
  margin-bottom: 0;
}

.demo-table-scroll {
  max-height: 264px;
  overflow-y: auto;
}

table.demo-role-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 12px;
}

table.demo-role-table td {
  padding: 7px 12px;
}

table.demo-role-table td:first-child {
  min-width: 76px;
}

/* ==================== 9. 正式商业单据 A4 打印样式 (@media print) ==================== */
.print-doc {
  background: #ffffff;
  color: #1d2129;
  padding: 28px 32px;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
}

.print-doc h2 {
  font-size: 20px;
  text-align: center;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.print-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 12.5px;
}

.print-doc th, .print-doc td {
  border: 1px solid #4e5969;
  padding: 8px 10px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.print-doc th {
  background: #f7f8fa;
  font-weight: 600;
}

.print-sign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 28px;
  padding-top: 16px;
}

.print-sign-box {
  border: 1px dashed #86909c;
  border-radius: var(--radius-md);
  padding: 16px;
  min-height: 120px;
}

#print-mount {
  display: none;
}

/* ==================== 9.5 智能字符联想补全菜单 (SmartSuggest) 与付款凭证缩略图 ==================== */
.smart-suggest-menu {
  position: fixed;
  z-index: 9999;
  background: #ffffff;
  border: 1px solid #c9cdd4;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(9, 25, 54, 0.14), 0 2px 6px rgba(9, 25, 54, 0.06);
  max-height: 256px;
  overflow-y: auto;
  padding: 4px;
  display: none;
}

.smart-suggest-menu.open {
  display: block;
}

.ss-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px 5px;
  font-size: 11px;
  color: var(--ink-4);
  border-bottom: 1px solid var(--line-1);
  margin-bottom: 3px;
}

.ss-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12.5px;
  color: var(--ink-1);
  border-left: 3px solid transparent;
  transition: background 0.08s ease, color 0.08s ease;
}

/* 严禁纯 CSS :hover 单独着色，统一由 JS mouseover 与键盘上下键同步单一 .active 强对比高亮 */
.ss-item.active {
  background: #2563eb;
  color: #ffffff;
  border-left-color: #93c5fd;
}

.ss-val {
  font-weight: 600;
  color: var(--ink-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.ss-item.active .ss-val {
  color: #ffffff;
}

.ss-val.mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

.ss-hl {
  background: rgba(22, 119, 255, 0.16);
  color: #0958d9;
  font-weight: 700;
  padding: 0 2px;
  border-radius: 2px;
}

.ss-item.active .ss-hl {
  background: #fde047;
  color: #0f172a;
}

.ss-meta {
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-item.active .ss-meta {
  color: rgba(255, 255, 255, 0.9);
}

.voucher-upload-zone {
  border: 1px dashed #c9cdd4;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  padding: 10px 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.voucher-upload-zone:hover {
  border-color: var(--primary);
  background: #f7faff;
}

.voucher-thumb-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.voucher-thumb-img {
  width: 76px;
  height: 52px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  background: #f2f3f5;
  cursor: zoom-in;
  flex-shrink: 0;
}

.sop-step-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.sop-step-card {
  border: 1px solid #bfd8ff;
  background: #f5f9ff;
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.5;
}

.sop-step-card .sop-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #0958d9;
  background: #e6f4ff;
  padding: 1px 6px;
  border-radius: 3px;
  margin-bottom: 4px;
}

@media (max-width: 1120px) {
  .sop-step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media print {
  #app-root,
  #cust-root,
  #store-root,
  .modal-mask,
  .p-modal-mask,
  .xw-popover,
  #lightbox-mask,
  #toast {
    display: none !important;
  }
  #print-mount, #print-mount * {
    visibility: visible !important;
  }
  #print-mount .copy-btn {
    display: none !important;
  }
  #print-mount {
    display: block !important;
    position: static !important;
    width: 100%;
    background: #ffffff;
  }
  .print-doc {
    border: none;
    padding: 0;
  }
  .print-sign-grid,
  .print-doc tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* ==================== 10. 响应式与分屏窄视口适配 (850px – 1920px，针对 1366/1440 顶栏精细消肿) ==================== */
@media (max-width: 1460px) {
  .ent-topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .topbar-right {
    gap: 6px;
  }
  .cmd-search-btn {
    width: 196px;
  }
  .role-switcher-pill .role-lbl {
    display: none;
  }
  .ent-content {
    padding: 16px 18px 36px;
  }
}

@media (max-width: 1366px) {
  .ent-brand-txt .brand-full {
    display: none;
  }
  .ent-brand-txt .brand-short {
    display: block;
  }
  .cmd-search-btn {
    width: 168px;
    padding: 0 8px;
  }
  .top-env-pill .env-label {
    display: none;
  }
  .top-env-pill {
    padding: 0 7px;
  }
  .chip-act-btn .act-txt {
    display: none;
  }
}

@media (max-width: 1240px) {
  .pipeline-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .warroom-grid {
    grid-template-columns: minmax(0, 1fr) 292px;
  }
}

@media (max-width: 1120px) {
  .ent-body {
    grid-template-columns: 226px minmax(0, 1fr);
  }
  .ent-content {
    padding: 16px 16px 36px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .warroom-grid {
    grid-template-columns: 1fr;
  }
  .ent-topbar .breadcrumb .bc-root,
  .ent-topbar .breadcrumb .bc-sep,
  .cmd-kbd,
  .top-env-pill .env-label {
    display: none;
  }
  .top-env-pill {
    padding: 0 7px;
  }
  .cmd-search-btn {
    width: 164px;
  }
}

@media (max-width: 980px) {
  .auth-portal {
    grid-template-columns: 1fr;
  }
  .auth-brand-side {
    padding: 28px 24px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .role-switcher-pill .role-lbl,
  .chip-act-btn .act-txt {
    display: none;
  }
  .cmd-search-btn {
    width: 138px;
  }
}

@media (max-width: 820px) {
  .ent-body {
    grid-template-columns: 1fr;
  }
  .ent-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line-1);
  }
  .grid-3,
  .pipeline-board,
  .auth-matrix-grid {
    grid-template-columns: 1fr;
  }
  .cmd-search-btn .cmd-text {
    display: none;
  }
  .cmd-search-btn {
    width: 34px;
    justify-content: center;
    padding: 0;
  }
}

/* 行内语义化文字跳转按钮（替代伪协议空链接，兼容严格安全策略与无障碍键盘聚焦） */
.btn-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--primary);
  cursor: pointer;
  text-align: left;
  display: inline;
}
.btn-link:hover {
  text-decoration: underline;
}

/* ==================== v11.0 星枢富文档三栏 Markdown 知识库、智能选闲置派单与错误码诊断 ==================== */
.sel-accent {
  max-width: 240px;
  height: 28px;
  font-size: 12px;
  border-color: var(--primary) !important;
  background: #ffffff !important;
  color: var(--primary) !important;
  font-weight: 500;
}

.danger-zone-box {
  border: 1px solid var(--bad-border);
  background: var(--bad-soft);
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 工程师派单标题行芯片与选择组 + [智能选闲置] 按钮动画 */
.field-head-row {
  min-height: 22px;
  line-height: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
}
.quick-time-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.eng-select-group {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.eng-select-group > select,
.eng-select-group > .xw-select,
.field > select {
  width: 100%;
  min-width: 0;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}
.eng-smart-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid var(--primary-border);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: all 0.14s ease;
}
.eng-smart-chip:hover {
  background: #dcebff;
  border-color: var(--primary);
  color: var(--primary-active);
}
.eng-smart-btn {
  flex-shrink: 0;
  height: 32px;
  padding: 0 10px;
  font-weight: 600;
}
.eng-smart-btn svg,
.eng-smart-chip svg {
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.eng-smart-btn.is-spinning svg,
.eng-smart-chip.is-spinning svg {
  transform: rotate(360deg);
}
@keyframes engPickPulse {
  0% { border-color: var(--ok); box-shadow: 0 0 0 3px rgba(0, 180, 42, 0.24); background-color: #f0fff4; }
  100% { border-color: #cbd5e1; box-shadow: none; background-color: #ffffff; }
}
select.smart-picked-flash,
.xw-select.smart-picked-flash,
.xw-dt.smart-picked-flash {
  animation: engPickPulse 0.9s ease-out;
}
.eng-smart-hint {
  margin-top: 4px;
  font-size: 11.5px;
  color: #067a28;
  line-height: 1.45;
  font-weight: 500;
}

/* 标准 BT-* 错误码胶囊与工单内嵌根因诊断卡 */
.bt-code-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 4px;
  border: 1px solid #91caff;
  background: #e6f4ff;
  color: #0958d9;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.5;
  transition: all 0.14s ease;
}
.bt-code-pill:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  text-decoration: none;
}
.wo-errcode-diag {
  margin: 10px 0 12px;
  padding: 10px 13px;
  border-radius: 6px;
  border: 1px solid #91caff;
  background: linear-gradient(90deg, #f0f7ff 0%, #f8fbff 100%);
}
.wo-errcode-diag-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

/* 星枢富文档 Wiki 三栏阅读工作区 (268px | 1fr | 224px) */
.kb-wiki-layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 224px;
  gap: 14px;
  align-items: start;
  min-height: calc(100vh - 156px);
}
.kb-side-tree {
  background: #ffffff;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  padding: 12px;
  position: sticky;
  top: 64px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
.kb-tree-cat {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-4);
  letter-spacing: 0.4px;
  padding: 8px 6px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kb-tree-item {
  width: 100%;
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  padding: 7px 9px;
  border-radius: 5px;
  cursor: pointer;
  display: block;
  margin-bottom: 2px;
  transition: all 0.13s ease;
}
.kb-tree-item:hover {
  background: var(--bg-row-hover);
}
.kb-tree-item.active {
  background: var(--primary-soft);
  border-color: var(--primary-border);
}
.kb-tree-item-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-1);
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kb-tree-item.active .kb-tree-item-title {
  color: var(--primary);
  font-weight: 600;
}
.kb-tree-item-meta {
  margin-top: 3px;
  font-size: 11px;
  color: var(--ink-4);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

/* 中栏沉浸式文档正文阅读器 */
.kb-doc-pane {
  background: #ffffff;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  padding: 24px 30px 34px;
  min-width: 0;
}
.kb-doc-header {
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line-1);
}
.kb-doc-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--ink-1);
  line-height: 1.38;
  margin: 8px 0 10px;
}
.kb-doc-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-3);
}

/* 右栏大纲 TOC 与文档元信息 */
.kb-toc-pane {
  background: #ffffff;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  position: sticky;
  top: 66px;
  align-self: start;
  max-height: calc(100vh - 82px);
  overflow-y: auto;
}
.kb-toc-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-3);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-2);
}
.kb-toc-link {
  appearance: none;
  border: 0;
  background: none;
  display: block;
  width: 100%;
  text-align: left;
  padding: 4px 6px;
  font-size: 12px;
  color: var(--ink-2);
  border-left: 2px solid var(--line-1);
  cursor: pointer;
  line-height: 1.4;
  transition: all 0.12s ease;
}
.kb-toc-link:hover {
  color: var(--primary);
  border-left-color: var(--primary);
  background: var(--primary-soft);
}
.kb-toc-link.lv-2 { padding-left: 10px; font-weight: 500; }
.kb-toc-link.lv-3 { padding-left: 20px; font-size: 11.5px; color: var(--ink-3); }

/* Markdown 安全渲染富排版 */
.kb-md-body {
  font-size: 13.5px;
  line-height: 1.76;
  color: var(--ink-1);
  word-break: break-word;
}
.kb-md-body h1,
.kb-md-body h2,
.kb-md-body h3,
.kb-md-body h4,
#xme-canvas h1,
#xme-canvas h2,
#xme-canvas h3,
#xme-canvas h4 {
  color: var(--ink-1);
  font-weight: 700;
  line-height: 1.4;
  scroll-margin-top: 164px;
}
.kb-md-body h1 { font-size: 19px; margin: 20px 0 10px; }
.kb-md-body h2 {
  font-size: 16px;
  margin: 22px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-2);
}
.kb-md-body h3 { font-size: 14.5px; margin: 16px 0 8px; }
.kb-md-body h4 { font-size: 13.5px; margin: 12px 0 6px; }
.kb-md-body p { margin: 0 0 11px; }
.kb-md-body ul,
.kb-md-body ol {
  margin: 0 0 12px;
  padding-left: 22px;
}
.kb-md-body li { margin-bottom: 5px; }
.kb-md-body code.kb-inline-code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #f2f4f7;
  border: 1px solid #e4e7ed;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
  color: #c41d7f;
}
.kb-code-block {
  margin: 12px 0 14px;
  border-radius: 6px;
  border: 1px solid #d0d7de;
  background: #f6f8fa;
  overflow: hidden;
}
.kb-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  background: #eaeef2;
  border-bottom: 1px solid #d0d7de;
  font-size: 11px;
  color: var(--ink-3);
  font-family: Consolas, monospace;
}
.kb-code-block pre {
  margin: 0;
  padding: 11px 13px;
  overflow-x: auto;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
  line-height: 1.6;
  color: #1f2328;
}

/* 零 CDN 代码语法高亮色盘（编辑器与三端阅读器共用，严禁改变字重与斜体以确保双层零偏移） */
.hl-cmt { color: #6e7781; }
.hl-str { color: #0a3069; }
.hl-kw { color: #cf222e; }
.hl-attr { color: #0550ae; }
.hl-num { color: #953800; }
.hl-var { color: #8250df; }
.hl-fn { color: #116329; }
.hl-err { color: #d1242f; background: rgba(255, 129, 130, 0.16); border-radius: 2px; }

.kb-callout {
  margin: 12px 0 14px;
  padding: 10px 14px;
  border-radius: 6px;
  border-left: 4px solid var(--primary);
  background: #f0f7ff;
}
.kb-callout-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.kb-callout.tip { border-left-color: #00b42a; background: #f0fff4; }
.kb-callout.tip .kb-callout-title { color: #067a28; }
.kb-callout.note { border-left-color: #1677ff; background: #f0f7ff; }
.kb-callout.note .kb-callout-title { color: #0958d9; }
.kb-callout.important { border-left-color: #722ed1; background: #f9f0ff; }
.kb-callout.important .kb-callout-title { color: #531dab; }
.kb-callout.warning,
.kb-callout.caution { border-left-color: #fa8c16; background: #fff7e6; }
.kb-callout.warning .kb-callout-title,
.kb-callout.caution .kb-callout-title { color: #d46b08; }
.kb-md-table-wrap {
  margin: 12px 0 14px;
  overflow-x: auto;
  border: 1px solid var(--line-1);
  border-radius: 6px;
}
.kb-md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.kb-md-table th {
  background: #f7f8fa;
  font-weight: 600;
  text-align: left;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line-1);
}
.kb-md-table td {
  padding: 8px 11px;
  border-bottom: 1px solid var(--line-2);
}
.kb-md-table tr:last-child td { border-bottom: none; }
.kb-md-fig {
  margin: 14px 0;
  text-align: center;
}
.kb-md-fig img {
  max-width: 100%;
  max-height: 440px;
  border-radius: 6px;
  border: 1px solid var(--line-1);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  cursor: zoom-in;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kb-md-fig img:hover {
  box-shadow: 0 4px 14px rgba(22, 119, 255, 0.16);
}
.kb-md-fig figcaption {
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--ink-4);
}
.kb-md-hr {
  border: 0;
  border-top: 1px solid var(--line-1);
  margin: 16px 0;
}
.kb-md-todo-list {
  list-style: none !important;
  padding-left: 4px !important;
  margin: 0 0 12px;
}
.kb-md-todo-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.kb-md-todo-item input[type="checkbox"] {
  margin-top: 4px;
  accent-color: var(--primary);
}
.kb-md-todo-item.is-done span {
  color: var(--ink-4);
  text-decoration: line-through;
}

/* ==================== 星枢富文档单画布块级所见即所得（Live WYSIWYG）编辑器（零双栏） ==================== */
.kb-editor-layout.xme-workspace {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 96px);
  background: transparent;
  border: none;
  overflow: visible;
}
/* 统一粘性吸顶工具栏外壳（横跨 #xme-mount 全宽，紧贴 50px .ent-topbar 下方，长文档滚动全程常驻） */
.kb-editor-toolbar-card {
  position: sticky;
  top: 50px;
  z-index: 35;
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line-1);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  margin-bottom: 16px;
  overflow: hidden;
}
.xme-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 10px;
  background: transparent;
  border-bottom: 1px solid var(--line-1);
}
.xme-topbar .btn.sm {
  padding: 0 7px;
  gap: 4px;
}
.xme-topbar-left,
.xme-topbar-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.xme-sync-pill {
  font-size: 11.5px;
  color: var(--ink-3);
  padding: 2px 7px;
  border-radius: 999px;
  background: #f2f4f7;
  white-space: nowrap;
}
.xme-format-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 6px 10px;
  background: rgba(248, 250, 252, 0.92);
}
.xme-topbar::-webkit-scrollbar,
.xme-format-bar::-webkit-scrollbar { display: none; }
.xme-fmt-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.xme-fmt-sep {
  width: 1px;
  height: 16px;
  background: var(--line-1);
  margin: 0 2px;
  flex-shrink: 0;
}
.xme-fmt-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  height: 28px;
  padding: 0 5.5px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.12s ease;
}
.xme-fmt-btn:hover {
  background: #eef2f8;
  color: var(--primary);
  border-color: #d6e4ff;
}

.xme-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 226px;
  gap: 18px;
  align-items: start;
}
.xme-sheet {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  padding: 36px 52px 64px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.045);
  min-height: 700px;
}
.xme-doc-title-inp {
  width: 100%;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 4px 0 10px !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: var(--ink-1);
  background: transparent !important;
  border-bottom: 1px solid var(--line-2) !important;
  border-radius: 0 !important;
  height: auto !important;
}
.xme-doc-title-inp::placeholder {
  color: #b8c1cc;
  font-weight: 600;
  font-size: 20px;
}
.xme-props-bar {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line-1);
  font-size: 12px;
}
.xme-prop-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.xme-prop-wide {
  flex: 1 1 310px;
}
.xme-prop-lbl {
  color: var(--ink-3);
  font-weight: 600;
  white-space: nowrap;
}
.xme-prop-sel,
.xme-prop-inp {
  height: 27px !important;
  min-height: 27px !important;
  font-size: 12px !important;
  padding: 0 8px !important;
  border-radius: 5px !important;
  border: 1px solid var(--line-1) !important;
  background: #f8fafc !important;
}
.xme-prop-wide .xme-prop-inp {
  flex: 1;
  min-width: 130px;
}
.xme-prop-pub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-2);
  font-weight: 500;
  user-select: none;
}
.xme-quick-tips {
  margin: 10px 0 18px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #f7f9fc;
  color: var(--ink-3);
  font-size: 11.5px;
}
.xme-quick-tips code {
  padding: 1px 4px;
  border-radius: 3px;
  background: #eaeff7;
  color: var(--primary);
  font-family: Consolas, monospace;
}

.xme-canvas {
  min-height: 480px;
  outline: none;
  font-size: 14.5px;
  line-height: 1.82;
  color: var(--ink-1);
  cursor: text;
}
.xme-canvas.drag-over {
  background: #f0f7ff;
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px var(--primary);
}
.xme-canvas > p:first-child:only-child:empty::before {
  content: "输入正文内容，或输入 / 唤起星枢富文档块命令菜单，输入 ### + 空格秒变标题…";
  color: #b8c1cc;
  pointer-events: none;
}
.xme-canvas h1 { font-size: 22px; margin: 22px 0 10px; }
.xme-canvas h2 { font-size: 18px; margin: 20px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.xme-canvas h3 { font-size: 15.5px; margin: 16px 0 8px; }
.xme-canvas h4 { font-size: 14px; margin: 12px 0 6px; }
.xme-canvas p { margin: 0 0 10px; min-height: 1.6em; }

/* 星枢富文档待办任务块 */
.xme-todo {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 4px 6px;
  margin: 4px 0;
  border-radius: 6px;
  transition: background 0.12s ease;
}
.xme-todo:hover { background: #f8fafc; }
.xme-todo-chk {
  margin-top: 6px;
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--primary);
  flex-shrink: 0;
}
.xme-todo-text {
  flex: 1;
  min-width: 0;
  outline: none;
  min-height: 24px;
}
.xme-todo.is-done .xme-todo-text {
  color: var(--ink-4);
  text-decoration: line-through;
}

/* 星枢富文档高亮提示块与双层实时语法高亮代码块卡片 */
.xme-callout {
  margin: 14px 0;
  padding: 10px 14px 12px;
  border-radius: 8px;
}
.xme-callout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.xme-callout-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}
.xme-callout-actions,
.xme-code-actions,
.xme-table-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.xme-tone-pill,
.xme-mini-btn,
.xme-w-pill {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink-2);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.xme-tone-pill.on,
.xme-w-pill.on {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
}
.xme-mini-btn:hover,
.xme-tone-pill:hover:not(.on),
.xme-w-pill:hover:not(.on) {
  border-color: var(--primary);
  color: var(--primary);
}
.xme-mini-btn.danger:hover {
  border-color: var(--bad);
  color: var(--bad);
}
.xme-callout-body {
  outline: none;
  min-height: 24px;
}
.xme-callout-body p {
  margin: 0 0 4px;
}

.xme-code-card {
  margin: 14px 0;
}
.xme-lang-sel {
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 6px !important;
  font-size: 11px !important;
  border-radius: 4px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  width: auto !important;
}
.xme-code-body {
  position: relative;
  background: #f6f8fa;
  font-family: Consolas, "SFMono-Regular", Menlo, "Microsoft YaHei", monospace;
  font-size: 12.5px;
  line-height: 1.62;
  tab-size: 2;
}
.xme-code-body > .xme-code-hl,
.xme-code-body > .xme-code-pre {
  margin: 0;
  padding: 12px 14px;
  font: inherit;
  line-height: inherit;
  letter-spacing: normal;
  tab-size: 2;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  overflow-wrap: anywhere;
  overflow: hidden;
  box-sizing: border-box;
  border: 0;
}
.xme-code-body > .xme-code-hl {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  color: #1f2328;
  background: transparent;
  overflow: hidden;
}
.xme-code-body > .xme-code-hl span {
  font-weight: normal !important;
  font-style: normal !important;
}
.xme-code-body > .xme-code-pre {
  position: relative;
  z-index: 1;
  min-height: 46px;
  outline: none;
  overflow: hidden;
  background: transparent !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
  caret-color: #0f172a;
}
.xme-code-body > .xme-code-pre::selection {
  background: rgba(37, 99, 235, 0.22);
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* 可视化表格与内联图片块 */
.xme-table-card {
  margin: 14px 0;
  border: 1px solid var(--line-1);
  border-radius: 8px;
  padding: 8px 10px 10px;
  background: #fcfdff;
}
.xme-table-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.xme-edit-table th[contenteditable="true"],
.xme-edit-table td[contenteditable="true"] {
  outline: none;
  min-width: 72px;
}
.xme-edit-table th[contenteditable="true"]:focus,
.xme-edit-table td[contenteditable="true"]:focus {
  box-shadow: inset 0 0 0 1.5px var(--primary);
  background: #f0f7ff;
}

.xme-image-block {
  position: relative;
  margin: 16px auto;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.xme-image-block:hover,
.xme-image-block:focus-within {
  border-color: #bfd7ff;
  background: #f8fbff;
}
.xme-image-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-bottom: 6px;
  opacity: 0.25;
  transition: opacity 0.14s ease;
}
.xme-image-block:hover .xme-image-toolbar,
.xme-image-block:focus-within .xme-image-toolbar {
  opacity: 1;
}
.xme-image-block img {
  cursor: default;
}
.xme-fig-cap {
  outline: none;
  min-height: 20px;
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--ink-3);
  font-size: 12px;
}
.xme-fig-cap:empty::before {
  content: attr(data-placeholder);
  color: #b8c1cc;
}
.xme-upload-placeholder {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px dashed var(--primary);
  background: #f0f7ff;
  color: var(--primary);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.xme-hr-block {
  position: relative;
  padding: 6px 0;
}
.xme-hr-del {
  position: absolute;
  right: 0;
  top: 2px;
  appearance: none;
  border: 1px solid var(--line-1);
  background: #ffffff;
  border-radius: 4px;
  padding: 2px 4px;
  cursor: pointer;
  opacity: 0;
}
.xme-hr-block:hover .xme-hr-del { opacity: 1; }

.xme-toc-rail {
  position: sticky;
  top: 156px;
  background: #ffffff;
  border: 1px solid var(--line-1);
  border-radius: 8px;
  padding: 12px 14px;
  max-height: calc(100vh - 172px);
  overflow-y: auto;
}
.xme-shortcut-card {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--ink-3);
}
.xme-shortcut-card code {
  padding: 0 4px;
  border-radius: 3px;
  background: #f2f4f7;
  color: var(--ink-1);
  font-family: Consolas, monospace;
}

/* 斜杠 / 悬浮菜单 & 划词气泡工具条 & 侧滑源码抽屉（z-index 严格低于模态框 200 与灯箱 360） */
.xme-slash-menu {
  position: fixed;
  z-index: 180;
  width: 288px;
  background: #ffffff;
  border: 1px solid var(--line-1);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  display: none;
  overflow: hidden;
}
.xme-slash-menu.open { display: block; }
.xme-slash-head {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--ink-3);
  background: #f8fafc;
  border-bottom: 1px solid var(--line-2);
}
.xme-slash-list {
  max-height: 236px;
  overflow-y: auto;
  padding: 4px;
}
.xme-slash-item {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
}
.xme-slash-item:hover,
.xme-slash-item.active {
  background: var(--primary-soft);
}
.xme-slash-ico {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #f2f4f7;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.xme-slash-item.active .xme-slash-ico {
  background: var(--primary);
  color: #ffffff;
}
.xme-slash-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.xme-slash-main b { font-size: 12.5px; color: var(--ink-1); }
.xme-slash-main small { font-size: 11px; color: var(--ink-3); }

.xme-bubble-bar {
  position: fixed;
  z-index: 185;
  display: none;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  background: #1d2129;
  color: #ffffff;
  border-radius: 7px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}
.xme-bubble-bar.open { display: inline-flex; }
.xme-bubble-bar > button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #f2f4f7;
  height: 26px;
  min-width: 26px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.xme-bubble-bar > button:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #69b1ff;
}
.xme-bub-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 2px;
}
.xme-link-pop {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
}
.xme-link-pop input {
  width: 175px;
  height: 24px !important;
  min-height: 24px !important;
  font-size: 11.5px !important;
  padding: 0 6px !important;
  border-radius: 4px !important;
  border: 1px solid #4e5969 !important;
  background: #272e3b !important;
  color: #ffffff !important;
}

.xme-src-drawer {
  position: fixed;
  top: 50px;
  right: 0;
  bottom: 0;
  width: min(520px, 92vw);
  background: #ffffff;
  border-left: 1px solid var(--line-1);
  box-shadow: -8px 0 28px rgba(15, 23, 42, 0.12);
  z-index: 95;
  display: none;
  flex-direction: column;
}
.xme-src-drawer.open { display: flex; }
.xme-src-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}
.xme-raw-md-ta {
  flex: 1;
  width: 100%;
  border: none !important;
  outline: none !important;
  padding: 16px !important;
  font-size: 12.5px !important;
  line-height: 1.65 !important;
  resize: none;
}

/* ==================== 全宽分类标准合同模板工作区（去窄弹窗 + 实时 A4 套打） ==================== */
.tpl-workspace {
  padding: 16px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tpl-ws-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-1);
}
.tpl-ws-meta-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}
.tpl-var-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f7f9fc;
  border: 1px solid var(--line-1);
}
.tpl-var-pill {
  appearance: none;
  border: 1px solid #d6e4ff;
  background: #ffffff;
  color: var(--ink-2);
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.12s ease;
}
.tpl-var-pill code {
  color: var(--primary);
  font-family: Consolas, monospace;
  font-weight: 600;
}
.tpl-var-pill:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.tpl-var-pill:hover code { color: #ffffff; }
.tpl-ws-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 16px;
  align-items: start;
}
.tpl-ws-ta {
  width: 100%;
  min-height: 560px;
  padding: 14px 16px !important;
  font-family: Consolas, "Microsoft YaHei", monospace !important;
  font-size: 13px !important;
  line-height: 1.75 !important;
  resize: vertical;
}
.tpl-preview-only-wrap {
  background: #f2f4f7;
  padding: 24px 16px;
  border-radius: 8px;
}
.tpl-a4-sheet {
  max-width: 780px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 34px 42px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.tpl-a4-head {
  text-align: center;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 2px solid #1d2129;
}
.tpl-a4-kicker {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.5px;
}
.tpl-a4-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-1);
  margin: 6px 0 10px;
}
.tpl-a4-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-2);
  text-align: left;
}
.tpl-a4-body {
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-1);
  white-space: pre-wrap;
}
.tpl-var-rendered {
  padding: 1px 5px;
  border-radius: 3px;
  background: #e8f3ff;
  color: #0958d9;
  font-weight: 600;
  border-bottom: 1px dashed #69b1ff;
}

/* ==================== 全站自定义浮层 <select> & <input type="datetime-local|date"> 与分页栏 ==================== */
.xw-native-sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.xw-select,
.xw-dt {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 36px;
  min-height: 36px;
  min-width: 112px;
  max-width: 100%;
  padding: 0 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink-1);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.xw-select:hover:not(.is-disabled),
.xw-dt:hover:not(.is-disabled) {
  border-color: #94a3b8;
}

.xw-select.is-open,
.xw-dt.is-open,
.xw-select:focus-visible,
.xw-dt:focus-visible {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.xw-select.is-disabled,
.xw-dt.is-disabled {
  background: #f8fafc;
  color: var(--ink-4);
  cursor: not-allowed;
  opacity: 0.65;
}

.xw-select.is-placeholder .xw-select-label,
.xw-dt.is-placeholder .xw-dt-label {
  color: var(--ink-3);
}

.xw-select-label,
.xw-dt-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xw-chevron,
.xw-cal-ico {
  flex-shrink: 0;
  color: #64748b;
  transition: transform 0.16s ease, color 0.14s ease;
}

.xw-select.is-open .xw-chevron {
  transform: rotate(180deg);
  color: #2563eb;
}

.xw-dt.is-open .xw-cal-ico {
  color: #2563eb;
}

/* 顶部深色胶囊角色切换器变体 */
.xw-select.is-dark-pill {
  height: 24px;
  min-height: 24px;
  min-width: 84px;
  padding: 0 4px;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 600;
}
.xw-select.is-dark-pill .xw-chevron {
  color: rgba(255, 255, 255, 0.8);
}

/* 紧凑型代码块语言切换 / 编辑器属性变体 */
.xw-select.is-compact {
  height: 26px;
  min-height: 26px;
  min-width: 78px;
  padding: 0 7px;
  font-size: 11.5px;
  border-radius: 5px;
  background: #ffffff;
}

.xw-select.is-accent {
  height: 30px;
  min-height: 30px;
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 500;
}

/* 挂载在 document.body 上的全局浮层菜单 (.xw-popover) */
.xw-popover {
  position: fixed;
  z-index: 9995;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  font-size: 12.5px;
  color: #0f172a;
}

.xw-pop-search-wrap {
  padding: 7px 8px 6px;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}

.xw-pop-search {
  width: 100%;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 9px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  font-size: 12px !important;
  color: #0f172a !important;
}

.xw-pop-search:focus {
  outline: none;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12) !important;
}

.xw-opt-list,
.xw-pop-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
}

/* 全局浮层列表、知识库树、弹窗内容与滚动面板统一纤细滚动条 */
.xw-popover,
.xw-opt-list,
.xw-pop-list,
.kb-side-tree,
.kb-toc-pane,
.xme-toc-rail,
.modal-body,
.nav-scroll,
.table-wrap,
.kb-md-table-wrap,
.kb-code-block pre,
.xme-slash-menu,
.xme-src-drawer {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.xw-popover::-webkit-scrollbar,
.xw-opt-list::-webkit-scrollbar,
.xw-pop-list::-webkit-scrollbar,
.kb-side-tree::-webkit-scrollbar,
.kb-toc-pane::-webkit-scrollbar,
.xme-toc-rail::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.nav-scroll::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.kb-md-table-wrap::-webkit-scrollbar,
.kb-code-block pre::-webkit-scrollbar,
.xme-slash-menu::-webkit-scrollbar,
.xme-src-drawer::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.xw-popover::-webkit-scrollbar-thumb,
.xw-opt-list::-webkit-scrollbar-thumb,
.xw-pop-list::-webkit-scrollbar-thumb,
.kb-side-tree::-webkit-scrollbar-thumb,
.kb-toc-pane::-webkit-scrollbar-thumb,
.xme-toc-rail::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.nav-scroll::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.kb-md-table-wrap::-webkit-scrollbar-thumb,
.kb-code-block pre::-webkit-scrollbar-thumb,
.xme-slash-menu::-webkit-scrollbar-thumb,
.xme-src-drawer::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.xw-popover::-webkit-scrollbar-track,
.xw-opt-list::-webkit-scrollbar-track,
.xw-pop-list::-webkit-scrollbar-track,
.kb-side-tree::-webkit-scrollbar-track,
.kb-toc-pane::-webkit-scrollbar-track,
.xme-toc-rail::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.nav-scroll::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track,
.kb-md-table-wrap::-webkit-scrollbar-track,
.kb-code-block pre::-webkit-scrollbar-track,
.xme-slash-menu::-webkit-scrollbar-track,
.xme-src-drawer::-webkit-scrollbar-track {
  background: transparent;
}

.xw-opt-item {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  color: #1e293b;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.1s ease, color 0.1s ease;
}

.xw-opt-item:hover:not(.is-disabled) {
  background: #f1f5f9;
  color: #0f172a;
}

.xw-opt-item.is-active {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 600;
}

.xw-opt-item.is-disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.xw-opt-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xw-opt-mark {
  flex-shrink: 0;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
}

.xw-opt-empty {
  padding: 12px 10px;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
}

/* 自定义日历与时分选择面板 (.xw-dt-popover) */
.xw-dt-popover {
  width: 288px;
  padding: 10px 12px;
}

.xw-dt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.xw-dt-nav-grp {
  display: inline-flex;
  gap: 2px;
}

.xw-dt-nav {
  appearance: none;
  width: 26px;
  height: 26px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  color: #475569;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.xw-dt-nav:hover {
  border-color: #94a3b8;
  color: #0f172a;
  background: #f8fafc;
}

.xw-dt-ym {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.xw-dt-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
}

.xw-dt-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.xw-dt-day {
  appearance: none;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #1e293b;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.xw-dt-day:hover {
  background: #f1f5f9;
}

.xw-dt-day.is-outside {
  color: #cbd5e1;
}

.xw-dt-day.is-today {
  border-color: #93c5fd;
  color: #2563eb;
  font-weight: 600;
}

.xw-dt-day.is-selected {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  font-weight: 600;
}

.xw-dt-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.xw-dt-time-lbl {
  font-size: 12px;
  color: #475569;
  font-weight: 500;
}

.xw-dt-time-ctrls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.xw-dt-time-sel {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 6px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  background: #f8fafc !important;
  font-size: 12px !important;
  color: #0f172a !important;
}

.xw-dt-colon {
  font-weight: 700;
  color: #64748b;
}

.xw-dt-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.xw-dt-chip {
  appearance: none;
  padding: 2px 8px;
  height: 23px;
  border-radius: 5px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}

.xw-dt-chip:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.xw-dt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.xw-dt-preview {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #475569;
}

.xw-dt-foot-btns {
  display: inline-flex;
  gap: 6px;
}

.xw-dt-btn {
  appearance: none;
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
}

.xw-dt-btn.ghost:hover {
  background: #f1f5f9;
}

.xw-dt-btn.primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.xw-dt-btn.primary:hover {
  background: #1d4ed8;
}

/* 企业级通用数据分页栏 (.ent-pagination) */
.ent-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: #fafbfd;
  border-top: 1px solid var(--line-1);
  font-size: 12px;
  color: var(--ink-3);
}

.ent-pg-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ent-pg-meta .xw-select {
  height: 28px;
  min-height: 28px;
  min-width: 86px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 6px;
}

.ent-pg-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.ent-pg-btn {
  appearance: none;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
}

.ent-pg-btn:hover:not(:disabled):not(.on) {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}

.ent-pg-btn.on {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  font-weight: 600;
}

.ent-pg-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f8fafc;
}

.ent-pg-ellipsis {
  padding: 0 4px;
  color: var(--ink-4);
}

.filter-act-btns {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

@media (max-width: 1440px) {
  .kb-wiki-layout {
    grid-template-columns: 236px minmax(0, 1fr);
  }
  .kb-toc-pane,
  .xme-toc-rail {
    display: none;
  }
  .xme-stage-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .kb-doc-pane {
    padding: 20px 22px 28px;
  }
}
@media (max-width: 1200px) {
  .tpl-ws-grid {
    grid-template-columns: 1fr;
  }
  .xme-sheet {
    padding: 24px 24px 48px;
  }
}
@media (max-width: 820px) {
  .kb-wiki-layout {
    grid-template-columns: 1fr;
  }
  .kb-side-tree {
    position: static;
    max-height: 280px;
  }
}

@media (max-width: 720px) {
  .modal-body .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .kpi-grid,
  .modal-body .grid-2 {
    grid-template-columns: 1fr;
  }
  .modal-foot {
    flex-wrap: wrap;
  }
  .auth-form-side {
    padding: 20px 14px;
  }
  .auth-card {
    padding: 20px 18px;
  }
}
