/* ═══════════════════════════════════════════════════════════════════
   SaaS 控制面 · 设计系统（奢侈亮蓝 · 简约 · 2K）
   配色纪律：主色 3 种（奢侈亮蓝 / 白 / 灰），成功·危险·琥珀仅作状态色；
   图标一律 SVG（无 emoji）；默认适配 2K，超 2K 内容限宽 1600px 居中。
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. 设计令牌 ─────────────────────────────────────────────────── */
:root {
  /* 商业运营化（2026-09-29）：与门户同规格——深商务蓝主色、功能色降饱和、
     圆角收敛（14→10）、阴影扁平化（描边优先） */
  --brand: #1e40af;
  --brand-strong: #1e3a8a;
  --brand-deep: #172554;
  --brand-weak: #eef2fb;
  --brand-weak-2: #f5f7fa;
  --brand-grad: linear-gradient(135deg, #1e40af 0%, #3b5fd0 100%);
  --success: #15803d;
  --success-weak: #f0fdf4;
  --danger: #b91c1c;
  --danger-weak: #fef2f2;
  --warn: #b45309;
  --warn-weak: #fffbeb;
  --info: #0e7490;
  --info-weak: #ecfeff;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --border: #e3e8ef;
  --border-strong: #cdd5e0;
  --text: #1a2332;
  --muted: #5c6b80;
  --muted-2: #98a5bd;
  --radius: 10px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, .08);
  --shadow-lg: 0 10px 32px rgba(15, 23, 42, .12);
  --ring: 0 0 0 3px rgba(30, 64, 175, .14);
  --font: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
html[data-theme='dark'] {
  --brand: #7fa5ff;
  --brand-strong: #9db8ff;
  --brand-deep: #5b8cff;
  /* 高级灰暗色系：中性灰底 + 蓝色品牌强调（原深蓝底全部去蓝转灰） */
  --brand-weak: #26282d;
  --brand-weak-2: #1f2124;
  --brand-grad: linear-gradient(135deg, #4f7dff 0%, #7fa5ff 100%);
  --success: #4ade80;
  --success-weak: #212621;
  --danger: #f87171;
  --danger-weak: #2b2223;
  --warn: #fbbf24;
  --warn-weak: #26231c;
  --info: #60a5fa;
  --info-weak: #222428;
  --bg: #161719;
  --surface: #1e1f22;
  --surface-2: #242629;
  --border: #303236;
  --border-strong: #43464c;
  --text: #e8e9eb;
  --muted: #9b9ea4;
  --muted-2: #6c6f75;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 2px 10px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .5);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .6);
  --ring: 0 0 0 3px rgba(127, 165, 255, .22);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background .25s, color .25s;
}

/* 滚动条（WebKit 细滚动） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }
::-webkit-scrollbar-track { background: transparent; }

/* ── 2. 图标 ─────────────────────────────────────────────────────── */
.icon { width: 16px; height: 16px; fill: currentColor; flex: none; }
.icon.lg { width: 20px; height: 20px; }
.icon.xl { width: 24px; height: 24px; }

/* ── 3. 顶栏 ─────────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}
.topbar-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; letter-spacing: .01em; }
.topbar-title .brand-mark {
  --logo-main: #FFFFFF; --logo-mid: #C6CDD5; --logo-fog: #8E959E; --logo-cap: #C8102E;
  width: 30px; height: 30px; border-radius: 9px; background: #0F2038;
  display: inline-flex; align-items: center; justify-content: center;
}
html[data-theme='dark'] .topbar-title .brand-mark { background: transparent; }
.topbar-title .brand-mark .icon { width: 17px; height: 17px; }
.topbar-title .brand-mark .brand-logo { display: block; width: 26px; height: 26px; }
.topbar-sub { color: var(--muted); font-weight: 400; font-size: 12px; padding-left: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.mode-badge {
  font-size: 12px; color: var(--brand); background: var(--brand-weak);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  border-radius: 999px; padding: 3px 12px; font-weight: 500;
}
.icon-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  cursor: pointer; transition: all .15s ease;
}
.icon-button:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-weak); transform: translateY(-1px); }

/* ── 4. 布局 / 侧栏 ──────────────────────────────────────────────── */
.layout { display: flex; min-height: calc(100vh - 56px); }
.sidebar {
  width: 208px; flex: none; padding: 14px 10px;
  border-right: 1px solid var(--border); background: var(--surface);
  position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto;
}
.nav-group {
  font-size: 11px; color: var(--muted-2); padding: 16px 12px 6px;
  letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
}
.nav-group:first-child { padding-top: 4px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; margin-bottom: 2px;
  border: none; border-radius: var(--radius-sm);
  background: none; color: var(--muted);
  font-size: 13.5px; cursor: pointer; text-align: left;
  transition: all .15s ease;
}
.nav-item .icon { width: 17px; height: 17px; }
.nav-item:hover { color: var(--text); background: var(--surface-2); }
.nav-item.active {
  color: var(--brand); background: var(--brand-weak); font-weight: 600;
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 4px 4px 0; background: var(--brand-grad);
}

.content { flex: 1; padding: 24px 28px; min-width: 0; }

/* ── 5. 视图头 ───────────────────────────────────────────────────── */
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.view-head h1 { font-size: 20px; margin: 0; font-weight: 700; letter-spacing: .01em; display: flex; align-items: center; gap: 10px; }
.view-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.view-head .actions { display: flex; gap: 10px; }
.view-head .sub-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

/* ── 6. 统计卡 ───────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stat::after {
  content: ''; position: absolute; top: 0; left: 20px; right: 20px; height: 2px;
  background: var(--brand-grad); border-radius: 0 0 4px 4px;
  opacity: 0; transition: opacity .18s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.stat:hover::after { opacity: 1; }
.stat .label { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 25px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .value.accent { color: var(--brand); }
.stat .value.success { color: var(--success); }
.stat .value.danger { color: var(--danger); }
.stat .sub { font-size: 12px; color: var(--muted-2); margin-top: 2px; }
/* 带图标的统计卡 */
.stat-icon {
  position: absolute; right: 16px; top: 16px;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--brand-weak); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  transition: all .18s ease;
}
.stat-icon .icon { width: 19px; height: 19px; }
.stat:hover .stat-icon { background: var(--brand-grad); color: #fff; box-shadow: 0 4px 10px rgba(30, 64, 175, .3); }
.stat-icon.success { background: var(--success-weak); color: var(--success); }
.stat:hover .stat-icon.success { background: var(--success); color: #fff; }
.stat-icon.danger { background: var(--danger-weak); color: var(--danger); }
.stat:hover .stat-icon.danger { background: var(--danger); color: #fff; }
.stat-icon.warn { background: var(--warn-weak); color: var(--warn); }
.stat:hover .stat-icon.warn { background: var(--warn); color: #fff; }
.stat-icon.ghost { background: var(--surface-2); color: var(--muted); }

/* ── 7. 表格 ─────────────────────────────────────────────────────── */
.table-wrap {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; min-width: 600px; }
thead th {
  padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600;
  color: var(--muted); background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap; letter-spacing: .02em;
}
tbody td { padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: var(--brand-weak-2); }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .mono { font-size: 12px; }
td.channels-cell { min-width: 200px; }
td .btn { vertical-align: middle; }
td:has(> button.btn) { white-space: nowrap; }
td button.btn { margin: 2px 6px 2px 0; }
td button.btn:last-child { margin-right: 0; }

/* ── 8. 标签 / 徽章（软底胶囊） ──────────────────────────────────── */
.tag {
  display: inline-block; font-size: 11.5px; border-radius: 999px; padding: 2px 10px;
  border: 1px solid var(--border); color: var(--muted); background: var(--surface-2);
  margin: 1px 4px 1px 0; white-space: nowrap; font-weight: 500;
  transition: all .15s ease;
}
.tag.brand { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 22%, transparent); background: var(--brand-weak); }
.tag.success { color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); background: var(--success-weak); }
.tag.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); background: var(--danger-weak); }
.tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 28%, transparent); background: var(--warn-weak); }
.tag.dim { color: var(--muted); border-color: var(--border); background: transparent; }
.tag.pill-lg { font-size: 12.5px; padding: 4px 14px; }
td .tag { vertical-align: middle; }

/* ── 9. 按钮 ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 8px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 13px; cursor: pointer; font-weight: 500;
  transition: all .15s ease; box-shadow: var(--shadow-sm);
}
.btn .icon { width: 14px; height: 14px; }
.btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: var(--brand-grad); border-color: transparent; color: #fff;
  box-shadow: 0 3px 10px rgba(30, 64, 175, .3);
}
.btn.primary:hover { filter: brightness(1.06); color: #fff; box-shadow: 0 5px 16px rgba(30, 64, 175, .4); }
.btn.primary:disabled { background: var(--muted-2); box-shadow: none; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: var(--brand-weak); color: var(--brand); border-color: transparent; }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: var(--surface); }
.btn.danger:hover { background: var(--danger-weak); border-color: var(--danger); color: var(--danger); }
.btn.small { padding: 5px 12px; font-size: 12.5px; border-radius: 8px; }
.btn.small .icon { width: 13px; height: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── 10. 表单 ────────────────────────────────────────────────────── */
.form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.form-card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.form-card h3 .icon { color: var(--brand); }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field input, .field select:not([multiple]) {
  height: 36px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px;
  box-sizing: border-box; min-width: 0; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.field select[multiple] {
  padding: 8px; border-radius: var(--radius-sm); min-height: 90px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px;
  box-sizing: border-box; width: 100%;
}
.field select[multiple] option { padding: 4px 8px; border-radius: 6px; }
.field select[multiple] option:checked { background: var(--brand-weak); color: var(--brand); }
.field input:focus, .field select:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.field input::placeholder { color: var(--muted-2); }
.field textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 13px; font-family: var(--font-mono);
  resize: vertical; min-height: 80px; transition: border-color .15s, box-shadow .15s;
}
.field textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.field .hint { font-size: 11.5px; color: var(--muted-2); line-height: 1.5; }
.check-group { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 6px 0; }
.check-group label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text); white-space: nowrap; cursor: pointer;
  padding: 3px 8px; margin: 0; border-radius: 8px; transition: background .15s;
}
.check-group label:hover { background: var(--surface-2); }
.check-group input { width: 15px; height: 15px; accent-color: var(--brand); margin: 0; cursor: pointer; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }

/* ── 11. 提示条（视图内联静态说明） ──────────────────────────────── */
.notice {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text); margin: 0 0 14px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.notice.error { color: var(--danger); background: var(--danger-weak); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.notice.success { color: var(--success); background: var(--success-weak); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.notice.warn { color: var(--warn); background: var(--warn-weak); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
/* 空提示条不渲染（避免空盒子残留，如登录页旧的无用错误位） */
.notice:empty { display: none; }

/* ── 11b. 悬浮提示（右下角 toast，动态 notice() 用；不占页面布局） ── */
#saas-toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 300;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 48px));
}
.saas-toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-md); font-size: 13px; color: var(--text);
  animation: toast-in .25s ease; max-width: 100%;
}
.saas-toast .icon { width: 16px; height: 16px; flex: none; }
.saas-toast.success { color: var(--success); background: var(--success-weak); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.saas-toast.error { color: var(--danger); background: var(--danger-weak); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.saas-toast.warn { color: var(--warn); background: var(--warn-weak); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.saas-toast.out { opacity: 0; transform: translateY(6px); transition: opacity .3s ease, transform .3s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 768px) {
  #saas-toast { right: 12px; bottom: 12px; left: 12px; align-items: stretch; }
  .saas-toast { justify-content: center; }
}

/* ── 12. 密钥揭示 ────────────────────────────────────────────────── */
.key-reveal-label { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.key-reveal {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px dashed var(--brand);
  border-radius: var(--radius-sm); background: var(--brand-weak-2);
}
.key-reveal code {
  flex: 1; font-family: var(--font-mono);
  font-size: 13px; word-break: break-all; user-select: all; color: var(--text);
}
.mono { font-family: var(--font-mono); font-size: 12px; }
.dim { color: var(--muted); }
.muted { color: var(--muted); }

/* ── 13. 空状态 / 加载 ───────────────────────────────────────────── */
.empty { padding: 40px 24px; text-align: center; color: var(--muted); font-size: 13px; }
.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 48px 24px; text-align: center;
}
.empty-state .es-icon {
  width: 56px; height: 56px; border-radius: 18px;
  background: var(--brand-weak); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.empty-state .es-icon .icon { width: 26px; height: 26px; }
.empty-state .es-title { font-size: 14px; font-weight: 600; color: var(--text); }
.empty-state .es-desc { font-size: 12.5px; color: var(--muted); max-width: 360px; line-height: 1.6; }

/* ── 14. 编辑态 ──────────────────────────────────────────────────── */
.edit-inline { display: flex; gap: 8px; align-items: center; }
.edit-inline input {
  width: 120px; height: 30px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 12.5px;
}

/* ── 15. 登录页 ──────────────────────────────────────────────────── */
/* 登录态（.auth-view 由 showLogin 加在 #view 上）：内容区零内边距，登录背景撑满可视区 */
.content.auth-view {
  padding: 0;
  display: flex;
  align-items: stretch;
}
.content.auth-view .login-wrap {
  flex: 1;
  min-height: 0;
  width: 100%;
  margin: 0;
}
.login-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  /* 纯背景色（移除径向渐变光晕：左侧蓝晕与右下角紫蓝色光斑） */
  background: var(--bg);
}
.login-card {
  width: 340px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 32px 28px;
  box-shadow: var(--shadow-lg);
  animation: modal-in .3s ease;
}
.login-card .login-logo {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 15px; background: var(--brand-grad); color: #fff;
  box-shadow: 0 6px 16px rgba(30, 64, 175, .35);
}
.login-card .login-logo .icon { width: 26px; height: 26px; }
.login-card h1 { font-size: 17px; text-align: center; margin: 0 0 4px; font-weight: 700; }
.login-card p.sub { text-align: center; color: var(--muted); font-size: 12px; margin: 0 0 20px; }
.login-card .field { margin-bottom: 14px; }
.login-card input { width: 100%; }
.login-card .btn { width: 100%; justify-content: center; padding: 10px 16px; }

/* ── 16. 图表 ────────────────────────────────────────────────────── */
.bars {
  display: flex; align-items: flex-end; gap: 6px;
  height: 150px; padding: 14px 6px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow-x: auto; box-shadow: var(--shadow-sm);
}
.bar-col { flex: 1 0 26px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.bar {
  width: 100%; max-width: 30px; border-radius: 5px 5px 0 0;
  background: var(--brand-grad); min-height: 2px;
  transition: filter .15s ease;
}
.bar-col:hover .bar { filter: brightness(1.1); }
.bar-label { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.trend-title { font-size: 13px; color: var(--muted); margin: 20px 0 10px; font-weight: 500; }

/* SVG 面积图 */
.chart-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.chart-card .chart-title { font-size: 13px; font-weight: 600; color: var(--text); margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.chart-card .chart-title .icon { color: var(--brand); }
.chart-card .chart-sub { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.chart-area { width: 100%; height: auto; display: block; }
.chart-area .grid-line { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-area .area-fill { fill: url(#areaGrad); }
.chart-area .line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-area .dot { fill: var(--surface); stroke: var(--brand); stroke-width: 2.5; }
.chart-area .dot:hover { fill: var(--brand); }
.chart-area .axis-label { font-size: 10.5px; fill: var(--muted); }
.chart-area .axis-value { font-size: 10.5px; fill: var(--muted); text-anchor: end; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.chart-legend .lg-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.chart-legend .lg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* 环形图 */
.donut-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; min-width: 180px; }
.donut-legend .dl-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.donut-legend .dl-row .dl-color { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-legend .dl-row .dl-name { color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend .dl-row .dl-val { color: var(--muted); font-variant-numeric: tabular-nums; }
.donut-legend .dl-row .dl-pct { color: var(--brand); font-weight: 600; width: 44px; text-align: right; font-variant-numeric: tabular-nums; }

/* ── 17. 弹窗 ────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(13, 25, 51, .45);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 48px 16px 16px; overflow-y: auto;
  animation: fade-in .18s ease;
}
html[data-theme='dark'] .modal-overlay { background: rgba(0, 0, 0, .6); }
.modal {
  width: 520px; max-width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-lg);
  animation: modal-in .22s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.modal-head h3 .icon { color: var(--brand); width: 18px; height: 18px; }
.modal-body { padding: 18px 20px; max-height: min(70vh, 640px); overflow-y: auto; }
/* 表单内嵌错误条：服务端校验失败时显示，不关窗 */
.modal-banner {
  margin: 0; padding: 10px 20px;
  background: var(--danger-weak); color: var(--danger);
  border-bottom: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
  font-size: 13px; line-height: 1.5;
}
.modal-banner[hidden] { display: none; }
/* 必填项视觉提示：标签前红色星号 */
.required-mark::before {
  content: '*'; color: var(--danger); margin-right: 3px; font-weight: 700;
}
/* 字段级错误：input 红边 + 下方错误文案 */
.field input.field-invalid, .field select.field-invalid, .field textarea.field-invalid {
  border-color: var(--danger); box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 18%, transparent);
}
.field-error-msg {
  margin-top: 4px; font-size: 12px; color: var(--danger); line-height: 1.4;
}
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--border);
  background: var(--surface-2); border-radius: 0 0 16px 16px;
}
.modal .form-row { margin-bottom: 12px; }
.modal .form-row:last-child { margin-bottom: 0; }
.modal .field { flex: 1; min-width: 140px; }

/* ── 18. 右开抽屉 ────────────────────────────────────────────────── */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(13, 25, 51, .35);
  backdrop-filter: blur(3px);
  display: flex; justify-content: flex-end;
  animation: fade-in .18s ease;
}
html[data-theme='dark'] .drawer-overlay { background: rgba(0, 0, 0, .55); }
.drawer {
  width: 520px; max-width: 94vw; height: 100%;
  background: var(--surface); border-left: 1px solid var(--border);
  border-radius: 16px 0 0 16px;
  box-shadow: -14px 0 40px rgba(23, 43, 99, .18);
  display: flex; flex-direction: column;
  animation: drawer-in .22s ease;
}
@keyframes drawer-in { from { transform: translateX(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.drawer-head h3 { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.drawer-head h3 .icon { color: var(--brand); }
.drawer-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.drawer-body dl { margin: 0; }
.drawer-body dt { font-size: 12px; color: var(--muted); margin-top: 14px; font-weight: 500; }
.drawer-body dt:first-child { margin-top: 0; }
.drawer-body dd { margin: 4px 0 0; font-size: 13px; word-break: break-all; }

/* ── 19. 分页 ────────────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 14px 16px; font-size: 13px; color: var(--muted);
  border-top: 1px solid var(--border); flex-wrap: wrap;
}
.pagination .page-info { margin-right: auto; }
.pagination button { min-width: 30px; }
.page-size { height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 8px; font-size: 12.5px; }
.page-size-label { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }

/* ── 20. 页签（胶囊） ────────────────────────────────────────────── */
.tabbar {
  display: flex; gap: 6px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 4px;
  margin-bottom: 16px; width: fit-content; max-width: 100%;
}
.tab {
  background: none; border: none; padding: 7px 16px; font-size: 13px; cursor: pointer;
  color: var(--muted); border-radius: 8px; font-weight: 500;
  transition: all .18s ease; white-space: nowrap;
}
.tab:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.tab.active {
  color: var(--brand); background: var(--surface);
  box-shadow: 0 2px 8px rgba(23, 43, 99, .10);
  font-weight: 600;
  border: 1px solid var(--border);
}
.tabpane { display: none; }
.tabpane.active { display: block; }

/* ── 21. 胶囊开关 ────────────────────────────────────────────────── */
.switch {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none; -webkit-user-select: none;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  position: relative; width: 38px; height: 22px; flex: none;
  background: var(--border-strong); border-radius: 999px;
  transition: background .2s ease;
}
.switch .track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}
.switch input:checked + .track { background: var(--brand-grad); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }
.switch .switch-label { font-size: 13px; color: var(--text); }
/* 双态文字：勾选时显示 .on，未勾选显示 .off；用 :has() 兼容嵌套结构 */
.switch .switch-on, .switch .switch-off { font-size: 13px; color: var(--text); }
.switch .switch-on { color: var(--brand); font-weight: 500; }
.switch .switch-off { color: var(--muted); }
.switch:has(input:checked) .switch-off { display: none; }
.switch:not(:has(input:checked)) .switch-on { display: none; }
.switch.disabled { opacity: .5; cursor: not-allowed; }
/* 紧凑开关：行内表单（如 trial-policy / trial-application modal）整行布局 */
.switch.compact .track { width: 32px; height: 18px; }
.switch.compact .track::after { top: 3px; left: 3px; width: 12px; height: 12px; }
.switch.compact input:checked + .track::after { transform: translateX(14px); }

/* ── 22. 任务会话（员工级审计） ──────────────────────────────────── */
.task-chat summary { cursor: pointer; color: var(--brand); font-size: 12.5px; user-select: none; font-weight: 500; }
.task-msgs { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.task-msg { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.55; }
.task-msg .task-role {
  flex: none; border-radius: 6px; padding: 1px 8px; font-size: 11px; align-self: flex-start; font-weight: 600;
}
.task-msg.user .task-role { color: var(--brand); background: var(--brand-weak); }
.task-msg.assistant .task-role { color: var(--success); background: var(--success-weak); }
.task-msg .task-text {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; white-space: pre-wrap; word-break: break-word; min-width: 0;
}

/* ── 23. 审计行（时间线） ────────────────────────────────────────── */
.audit-row {
  border-left: 3px solid var(--border-strong);
  margin: 0 0 8px; padding: 8px 12px; border-radius: 8px;
  background: var(--surface-2);
  font-size: 12.5px; line-height: 1.55;
  transition: background .15s ease;
}
.audit-row:hover { background: var(--brand-weak-2); }
.audit-row.input { border-left-color: var(--brand); background: var(--brand-weak); }
.audit-row.output { border-left-color: var(--success); background: var(--success-weak); }
.audit-row.tool { border-left-color: var(--warn); background: var(--warn-weak); }
.audit-row.tool.error { border-left-color: var(--danger); background: var(--danger-weak); }
.audit-row.approval { border-left-color: #bc4c00; background: rgba(188, 76, 0, .06); }
.audit-row.request { border-left-color: #8250df; background: rgba(130, 80, 223, .06); }
.audit-row.boundary { border-left-style: dashed; }
.audit-row.chunk { opacity: .7; }
.audit-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.audit-time { color: var(--muted); font-size: 11px; }
.audit-text { white-space: pre-wrap; word-break: break-word; }
.audit-preview { white-space: pre-wrap; word-break: break-word; }
.audit-expand { color: var(--brand); margin-left: 6px; font-size: 11px; cursor: pointer; }
.audit-pre {
  background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px; margin: 6px 0 0;
  font-family: var(--font-mono); font-size: 11px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow-y: auto;
}
.audit-detail summary { cursor: pointer; list-style: none; }
.audit-detail summary::before { content: ''; }
.audit-more-wrap { text-align: center; padding: 10px 0; }
.audit-body { padding: 2px 0; }

/* 审计筛选条（胶囊按钮组） */
.audit-filter-bar { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; flex-wrap: wrap; }
.audit-filter-label { font-size: 12px; color: var(--muted); margin-right: 4px; font-weight: 500; }
.audit-filter {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  padding: 5px 14px; border-radius: 999px; font-size: 12.5px; cursor: pointer;
  transition: all .15s ease;
}
.audit-filter:hover { border-color: var(--brand); color: var(--brand); }
.audit-filter.active {
  background: var(--brand-grad); border-color: transparent; color: #fff; font-weight: 500;
  box-shadow: 0 3px 8px rgba(30, 64, 175, .3);
}
.audit-filter.active:hover { color: #fff; }

/* ── 24. 设置页 ──────────────────────────────────────────────────── */
.settings-stack { display: flex; flex-direction: column; gap: 18px; max-width: 880px; }
.settings-section-title {
  font-size: 12px; font-weight: 600; color: var(--muted);
  margin: 14px 0 8px; letter-spacing: .06em; text-transform: uppercase;
}
.settings-section-title:first-child { margin-top: 0; }

/* ── 25. 租户档案卡（详情页头部） ────────────────────────────────── */
.profile-card {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.profile-avatar {
  width: 52px; height: 52px; border-radius: 15px; flex: none;
  background: var(--brand-grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  box-shadow: 0 6px 14px rgba(30, 64, 175, .3);
}
.profile-main { min-width: 0; }
.profile-name { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-id { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.profile-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.profile-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── 26. 通用动画 ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── 27. 2K / 大屏自适应（超 2K 内容限宽 1600 居中） ─────────────── */
@media (min-width: 1920px) {
  .content { max-width: 1600px; margin: 0 auto; padding: 28px 40px; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
  .stat .value { font-size: 28px; }
  th, td { padding: 13px 18px; }
  .view-head h1 { font-size: 22px; }
}
@media (min-width: 1600px) and (max-width: 1919px) {
  .stats { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  th, td { padding: 12px 16px; }
}

/* ── 28. 响应式 ──────────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .content { padding: 20px 20px; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
@media (max-width: 1024px) {
  .sidebar { width: 172px; }
  .content { padding: 16px; }
  th, td { padding: 9px 12px; font-size: 12.5px; }
  .view-head h1 { font-size: 18px; }
  .stat .value { font-size: 22px; }
}
@media (max-width: 768px) {
  .layout { display: block; }
  .sidebar {
    position: sticky; top: 56px; z-index: 40;
    width: 100%; height: 48px; display: flex; align-items: center;
    padding: 0 10px; gap: 2px; border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
  }
  .nav-group { display: none; }
  .nav-item {
    flex: none; width: 46px; justify-content: center; padding: 9px 0;
    font-size: 0; border-radius: var(--radius-xs);
  }
  .nav-item .icon { width: 19px; height: 19px; }
  .content { padding: 12px; max-width: none; }
  .form-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .form-row .field { width: 100%; }
  .form-card, .panel { padding: 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 14px 16px; }
  .stat .value { font-size: 20px; }
  .stat-icon { width: 32px; height: 32px; }
  .modal { width: 100% !important; height: 100%; max-height: 100%; border-radius: 0; }
  .modal-body { max-height: none; overflow-y: auto; }
  .modal-foot { border-radius: 0; }
  .view-head { align-items: flex-start; }
  .view-head .actions { width: 100%; }
  .pagination { flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
  .pagination .page-info { width: 100%; margin-bottom: 4px; }
  .tabbar { overflow-x: auto; white-space: nowrap; flex-wrap: nowrap; width: 100%; }
  .profile-actions { margin-left: 0; width: 100%; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat .value { font-size: 18px; }
  .stat-icon { display: none; }
  .topbar-sub { display: none; }
}

/* ── 29. 登录卡片窄屏 ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .login-card { padding: 24px 20px; width: min(92vw, 340px); }
  .grid { grid-template-columns: 1fr; }
}

/* ── 30. 会话 AI 研判卡 ──────────────────────────────────────────── */
.analysis-card {
  background: var(--bg-card, var(--surface));
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm, none);
}
.analysis-card.analysis-empty { padding: 20px; }
.analysis-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 12px;
}
.analysis-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; color: var(--brand);
}
.analysis-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.analysis-empty-body p { margin: 6px 0; line-height: 1.7; }
.analysis-empty-body .btn { margin-top: 10px; }
.analysis-overview {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 10px;
  background: var(--bg-weak, rgba(127,165,255,.08));
  margin-bottom: 14px;
}
.analysis-composite { font-size: 14px; }
.analysis-composite b { font-size: 22px; color: var(--brand); margin: 0 2px; }
.analysis-summary { flex: 1 1 260px; font-size: 13.5px; color: var(--text, inherit); line-height: 1.6; }
.analysis-goal, .analysis-status-note { width: 100%; font-size: 13px; color: var(--muted); }
.analysis-dims { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.analysis-dim-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.analysis-dim-name { font-size: 13.5px; font-weight: 700; min-width: 88px; }
.analysis-dim-hint { font-size: 12px; color: var(--muted-2); flex: 1; }
.analysis-dim-score { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.analysis-bar {
  height: 7px; border-radius: 4px; background: var(--border-weak, rgba(127,127,127,.18));
  overflow: hidden;
}
.analysis-bar-fill { height: 100%; border-radius: 4px; transition: width .4s ease; }
.analysis-dim-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.analysis-evidence { margin-top: 8px; font-size: 12.5px; }
.analysis-evidence summary { cursor: pointer; color: var(--brand); user-select: none; }
.analysis-evidence ul { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.analysis-evidence li { color: var(--muted); line-height: 1.6; border-left: 2px solid var(--border-strong); padding-left: 8px; }
.analysis-timing {
  border-top: 1px dashed var(--border-strong); padding-top: 12px; margin-bottom: 12px;
}
.analysis-timing-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.analysis-timing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 18px; }
.analysis-timing-item { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.analysis-timing-label { color: var(--muted-2); }
.analysis-timing-value { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.analysis-timing-note {
  font-size: 13px; color: var(--muted); background: var(--bg-weak, rgba(127,165,255,.08));
  border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.7;
}
.analysis-manager {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13.5px; font-weight: 600; line-height: 1.7;
  background: var(--warn-weak, rgba(247,144,9,.12)); border: 1px solid var(--warn-weak);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 12px;
}
.analysis-manager .icon { flex-shrink: 0; margin-top: 2px; }
.analysis-suggestions { margin-bottom: 12px; }
.analysis-suggest-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.analysis-suggestions ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.analysis-suggestions li { font-size: 13px; line-height: 1.6; color: var(--text, inherit); }
.analysis-disclaimer { font-size: 12px; color: var(--muted-2); border-top: 1px dashed var(--border-strong); padding-top: 10px; }

/* ── 31. 员工研判（聚合） ────────────────────────────────────────── */
.card-list { display: flex; flex-direction: column; gap: 12px; }
.employee-card {
  background: var(--bg-card, var(--surface));
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 16px 18px;
}
.employee-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.employee-identity { display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.employee-name { font-size: 16px; font-weight: 800; }
.employee-metrics { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.employee-status { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.employee-dims { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; margin-top: 12px; }
.analysis-mini-dim { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.analysis-mini-label { min-width: 66px; color: var(--muted-2); }
.analysis-mini-dim .analysis-bar { flex: 1; height: 6px; }
.analysis-mini-dim b { min-width: 26px; text-align: right; font-variant-numeric: tabular-nums; }

/* ── 令牌「可见模型」列：单行预览 + 悬浮完整列表 ───────────────────
   行内只渲染固定数量 chip + "+N" 汇总（不换行，行高可控）；完整列表经
   bindKeyActions 弹出 body 级固定定位浮层（表格容器 overflow 会裁剪单元格内浮层）。 */
.kv-models { display: inline-flex; align-items: center; gap: 6px; max-width: 320px;
  white-space: nowrap; overflow: hidden; cursor: default; vertical-align: middle; }
.kv-models .tag { flex: none; }
.kv-models-more { flex: none; font-size: 11.5px; font-weight: 600; color: var(--brand); }
.kv-models:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
#kv-models-pop { position: fixed; z-index: 90; display: none; max-width: 520px; max-height: 300px;
  overflow: auto; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-xs);
  background: var(--surface); box-shadow: var(--shadow-lg); }
#kv-models-pop.on { display: block; }
/* 别名等长文本列：单行省略（title 悬浮看全文），防止表格挤压时行高失控 */
.cell-ellipsis { display: inline-block; max-width: 260px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }

/* ── 商务风格（2026-09-29 商业运营化改造，与门户同规格） ─────────────
   令牌层已整体转深商务蓝（#1e40af）+ 圆角收敛 + 阴影扁平；此处做组件级收尾：
   标签方角化、品牌标与分组标签收敛。深色主题沿用高级灰 + 亮蓝 accent 不变。 */
.tag { border-radius: 5px; }
.mode-badge { border-radius: 6px; font-weight: 600; letter-spacing: .02em; }
.topbar-title .brand-mark { border-radius: 7px; }
.nav-group { letter-spacing: .1em; font-size: 10.5px; }
thead th { letter-spacing: .04em; }
