/* ==========================================================
   WuWoBot SaaS · 双后台共享设计系统（浅色）
   ========================================================== */
:root {
  --brand: #4f6ef7;
  --brand-dark: #3b56d6;
  --brand-soft: #eef2ff;
  --ink: #1b2130;
  --ink-2: #4a5468;
  --ink-3: #8590a5;
  --line: #e7eaf2;
  --bg: #f5f7fb;
  --card: #ffffff;
  --ok: #18a058;
  --warn: #e6a23c;
  --danger: #d93a3a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 60, .04), 0 8px 24px rgba(20, 30, 60, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
.muted { color: var(--ink-3); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.w100 { width: 100%; }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; }
.login-brand {
  position: relative; overflow: hidden; color: #fff; padding: 56px 56px 48px;
  background: radial-gradient(120% 120% at 10% 0%, #5b7cff 0%, #3b56d6 45%, #25349b 100%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-brand::after {
  content: ""; position: absolute; width: 560px; height: 560px; right: -180px; bottom: -220px;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 65%); border-radius: 50%;
}
.login-brand::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 44px 44px;
}
.brand-logo { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; letter-spacing: .3px; position: relative; z-index: 1; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 18px; backdrop-filter: blur(6px); }
.login-title { font-size: 34px; line-height: 1.28; font-weight: 700; margin: 0 0 16px; position: relative; z-index: 1; }
.login-sub { color: rgba(255,255,255,.82); font-size: 15px; line-height: 1.9; max-width: 460px; position: relative; z-index: 1; }
.login-points { display: grid; gap: 12px; margin-top: 28px; position: relative; z-index: 1; }
.login-points div { display: flex; gap: 10px; align-items: center; color: rgba(255,255,255,.9); font-size: 14px; }
.dot-ok { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 11px; }
.login-form-wrap { display: grid; place-items: center; padding: 40px; }
.login-form { width: 100%; max-width: 380px; }
.login-form h2 { margin: 0 0 6px; font-size: 24px; }
.login-form .hint { color: var(--ink-3); margin-bottom: 28px; font-size: 13px; }
.demo-tip { background: var(--brand-soft); border: 1px solid #dfe6ff; color: #3b56d6; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.8; margin-top: 18px; }

/* ---------- 主框架 ---------- */
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar-head { padding: 20px 18px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.sidebar-head .mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #5b7cff, #3b56d6); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.sidebar-head .name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.sidebar-head .sub { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.nav { padding: 12px 10px; overflow: auto; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: var(--ink-2); cursor: pointer; font-size: 13.5px; margin-bottom: 2px; transition: .15s;
}
.nav-item:hover { background: #f6f8ff; color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.nav-item .ico { width: 20px; text-align: center; font-size: 15px; }
.sidebar-foot { padding: 14px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 62px; background: rgba(255,255,255,.86); backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 10;
}
.page-title { font-size: 16px; font-weight: 600; }
.crumb { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.content { padding: 22px 24px 40px; }

/* ---------- 卡片 / 指标 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.card-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi .label { font-size: 12.5px; color: var(--ink-3); }
.kpi .value { font-size: 26px; font-weight: 700; margin-top: 8px; letter-spacing: -.5px; }
.kpi .sub { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.kpi .accent { position: absolute; right: -18px; top: -18px; width: 76px; height: 76px; border-radius: 50%; background: var(--brand-soft); opacity: .85; }
.kpi .accent.ok { background: #e8f8ef; } .kpi .accent.warn { background: #fdf3e3; } .kpi .accent.danger { background: #fdecec; }
.usage-bar { height: 8px; background: #eef1f7; border-radius: 999px; overflow: hidden; margin-top: 10px; }
.usage-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #6d86ff, #4f6ef7); border-radius: 999px; }
.usage-bar > i.warn { background: linear-gradient(90deg, #f2b04a, #e6a23c); }
.usage-bar > i.danger { background: linear-gradient(90deg, #ef6b6b, #d93a3a); }

/* ---------- 迷你图表 ---------- */
.spark { display: flex; align-items: flex-end; gap: 10px; height: 132px; padding: 6px 4px 0; }
.spark .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.spark .bar { width: 60%; max-width: 30px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #8fa4ff, #4f6ef7); min-height: 3px; transition: .3s; position: relative; }
.spark .bar:hover { filter: brightness(1.05); }
.spark .day { font-size: 11px; color: var(--ink-3); }
.spark .val { font-size: 11px; color: var(--ink-2); }

/* ---------- 表格微调 ---------- */
.el-table { --el-table-border-color: var(--line); border-radius: 12px; }
.el-table th.el-table__cell { background: #fafbfe !important; color: var(--ink-2); font-weight: 600; }
.el-table td.el-table__cell { padding: 9px 0; }
.el-table .cell { line-height: 1.6; }
.el-table__row:hover > td.el-table__cell { background: #fafbff !important; }
.el-dialog { border-radius: 16px; }
.el-dialog__header { border-bottom: 1px solid var(--line); margin-right: 0; padding-bottom: 16px; }
.el-drawer__header { margin-bottom: 0; padding-bottom: 16px; border-bottom: 1px solid var(--line); }

/* ---------- 列表行内操作按钮 ---------- */
.row-actions { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.row-actions.right { justify-content: flex-end; }
.ra {
  display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 9px; border-radius: 8px;
  border: 1px solid transparent; background: transparent;
  color: var(--ink-2); font-size: 12.5px; line-height: 1;
  font-family: inherit; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.ra .ra-i { display: inline-flex; }
.ra .ra-i svg { display: block; opacity: .8; }
.ra:hover { background: #f2f5ff; color: var(--brand-dark); border-color: #e4eaff; }
.ra:hover .ra-i svg { opacity: 1; }
.ra:active { transform: translateY(.5px); }
.ra.primary { color: var(--brand-dark); background: var(--brand-soft); border-color: #e2e9ff; font-weight: 500; }
.ra.primary:hover { background: #e2eaff; border-color: #d3ddff; box-shadow: 0 2px 8px rgba(79,110,247,.14); }
.ra.danger { color: #bf3b3b; }
.ra.danger:hover { background: #fdeeee; border-color: #f7dada; color: #a82f2f; }
.ra.ok { color: #0f7a45; }
.ra.ok:hover { background: #eafaf1; border-color: #d3f0e0; color: #0b6a3b; }
.ra.ghost { color: var(--ink-3); }
.ra.ghost:hover { color: var(--brand-dark); }
.ra[disabled] { opacity: .4; cursor: not-allowed; background: transparent; border-color: transparent; color: var(--ink-3); }
.ra-divider { width: 1px; height: 14px; background: var(--line); margin: 0 2px; }
.tag-soft { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 8px; border-radius: 6px; background: #f2f4f9; color: var(--ink-2); }
.tag-soft.brand { background: var(--brand-soft); color: var(--brand-dark); }
.tag-soft.ok { background: #e8f8ef; color: #0f7a45; }
.tag-soft.warn { background: #fdf3e3; color: #a06a10; }
.tag-soft.danger { background: #fdecec; color: #b02a2a; }
.empty-box { padding: 40px 0; text-align: center; color: var(--ink-3); }
.kv { display: grid; grid-template-columns: 110px 1fr; row-gap: 12px; column-gap: 12px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink); word-break: break-all; }
.tip-box { background: #fffaf0; border: 1px solid #ffe9c2; color: #8a5a00; border-radius: 10px; padding: 12px 14px; font-size: 12.5px; line-height: 1.8; }
.chat-line { display: flex; gap: 10px; margin-bottom: 14px; }
.chat-bubble { padding: 10px 14px; border-radius: 12px; max-width: 78%; line-height: 1.75; font-size: 13px; white-space: pre-wrap; }
.chat-bubble.user { background: var(--brand-soft); color: #25349b; }
.chat-bubble.bot { background: #f6f7fb; color: var(--ink); }
.chat-meta { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.code-block { background: #0f1424; color: #d7e0f4; border-radius: 10px; padding: 14px 16px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; }
.role-badge { font-size: 11px; padding: 1px 7px; border-radius: 5px; background: #eef1f7; color: var(--ink-2); }
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; } .login-brand { display: none; }
  .layout { grid-template-columns: 1fr; } .sidebar { display: none; }
}

/* ---------- Token 加油包 ---------- */
.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); gap: 16px; }
.pack {
  position: relative; padding: 18px 16px 16px; border: 1px solid var(--line); border-radius: 16px;
  background: #fff; transition: .18s ease; display: flex; flex-direction: column; overflow: hidden;
  min-height: 250px;
}
.pack::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #dbe3ff, #eef2ff);
}
.pack.best::before { background: linear-gradient(90deg, #5b7cff, #93aaff); }
.pack.best { border-color: #dde5ff; box-shadow: 0 10px 26px rgba(79, 110, 247, .12); }
.pack:hover { transform: translateY(-2px); border-color: #c9d4ff; box-shadow: 0 12px 28px rgba(79, 110, 247, .14); }
.pack-flag {
  font-size: 10.5px; font-weight: 600; color: #fff; white-space: nowrap;
  background: linear-gradient(135deg, #5b7cff, #3b56d6);
  border-radius: 999px; padding: 2px 9px; line-height: 1.6;
}
.pack-head { display: flex; align-items: center; gap: 6px; min-height: 20px; }
.pack-head .tag-soft { white-space: nowrap; flex: 0 0 auto; }
.pack-name { font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pack-main { margin-top: 10px; display: flex; align-items: baseline; gap: 5px; }
.pack-main b { font-size: 26px; font-weight: 700; letter-spacing: -.8px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pack-main span { font-size: 11.5px; color: var(--ink-3); }
.pack-price-row { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.pack-price { font-size: 17px; font-weight: 700; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.pack-price small { font-size: 12px; font-weight: 600; margin-right: 1px; }
.pack-spec {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #f8faff;
  display: flex; flex-direction: column; gap: 7px; font-size: 12px;
}
.pack-spec > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pack-spec span { color: var(--ink-3); }
.pack-spec b { color: var(--ink-2); font-weight: 600; }
.pack-spec b.plus { color: var(--ok); }
.pack-desc { font-size: 11.5px; color: var(--ink-3); margin: 10px 0 14px; line-height: 1.6; }
.pack-btn { width: 100%; justify-content: center; }
.pack > .pack-btn { margin-top: auto; }

/* ---------- 收银台 ---------- */
.pay-dialog .el-dialog__body { padding-top: 6px; }
.pay-head { display: flex; align-items: center; gap: 10px; }
.pay-head-title { font-size: 16px; font-weight: 700; }
.pay-body { padding-bottom: 4px; }
.pay-summary { text-align: center; }
.pay-title { font-size: 13px; color: var(--ink-2); }
.pay-amount { font-size: 34px; font-weight: 700; letter-spacing: -.8px; margin: 6px 0 4px; }
.pay-amount small { font-size: 18px; font-weight: 600; margin-right: 2px; }
.pay-no { font-size: 11.5px; color: var(--ink-3); cursor: pointer; display: inline-block; }
.pay-no:hover { color: var(--brand); }
.pay-tabs { display: flex; gap: 8px; margin: 16px 0 14px; }
.pay-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 0; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  font-size: 13px; color: var(--ink-2); background: #fff; transition: .15s;
  user-select: none;
}
.pay-tab:hover { border-color: #c9d4ff; }
.pay-tab.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.pay-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pay-dot.wx { background: #09bb07; }
.pay-dot.ali { background: #1677ff; }

.qr-wrap {
  width: 216px; height: 216px; margin: 0 auto; padding: 10px; position: relative;
  border: 1px solid var(--line); border-radius: 16px; background: #fff;
  box-shadow: 0 6px 20px rgba(27, 33, 48, .06);
}
.qr-svg { width: 100%; height: 100%; }
.qr-svg svg { width: 100%; height: 100%; display: block; }
.qr-mask {
  position: absolute; inset: 0; border-radius: 16px; background: rgba(255, 255, 255, .95);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.qr-mask .big { font-size: 15px; font-weight: 600; color: var(--ink); }
.qr-mask .ok-ico {
  width: 52px; height: 52px; border-radius: 50%; background: #e8f8ef; color: var(--ok);
  display: grid; place-items: center;
}
.pay-status { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.pay-status.ok { color: var(--ok); font-weight: 500; }
.spinner {
  width: 13px; height: 13px; border: 2px solid #dfe4f0; border-top-color: var(--brand);
  border-radius: 50%; display: inline-block; animation: pay-spin .8s linear infinite;
}
@keyframes pay-spin { to { transform: rotate(360deg); } }
.pay-hint { text-align: center; font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }
.pay-hint b { color: var(--ink-2); }
.pay-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.pay-actions .el-button { margin-left: 0 !important; }
.sandbox-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding: 9px 12px; border-radius: 10px;
  background: #fff8ea; border: 1px solid #f6e3bd; font-size: 12px; color: #8a6512;
}
.pay-foot { text-align: center; font-size: 11.5px; color: #a2aabd; margin-top: 14px; }

/* ---------- 表单说明 / 推荐值 ---------- */
.field-hint {
  flex-basis: 100%; width: 100%;
  font-size: 12px; line-height: 1.7; color: var(--ink-3); margin-top: 4px;
}
.field-hint b { color: var(--ink-2); font-weight: 600; }
.rec-tag {
  display: inline-block; margin-right: 4px; padding: 0 6px; border-radius: 5px;
  font-size: 11px; line-height: 17px; color: #4a63c8; background: #eef2ff; font-weight: 500;
}
.tag-soft.clickable { cursor: pointer; }
.tag-soft.clickable:hover { filter: brightness(.96); }

/* ---------- 知识库空态拖拽上传 ---------- */
.kb-drop { padding: 18px 16px 22px; }
.kb-drop .el-upload { width: 100%; }
.kb-drop .el-upload-dragger {
  width: 100%; padding: 26px 18px; border-radius: 14px;
  border: 1.5px dashed #d3ddfb; background: linear-gradient(180deg, #fbfcff, #f6f8ff);
}
.kb-drop .el-upload-dragger:hover { border-color: var(--brand); background: #f4f7ff; }
.kb-drop-in { display: block; }
.kb-drop-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 14px; margin-bottom: 10px;
  background: #eef2ff; color: var(--brand);
}
.kb-drop-t { font-size: 14px; font-weight: 600; color: var(--ink); }
.kb-drop-s { font-size: 12px; line-height: 1.8; color: var(--ink-3); margin-top: 4px; }
.kb-drop-s.muted { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); }

/* ---------- 问号说明气泡 ---------- */
.qa-dot {
  width: 30px; height: 30px; padding: 0; justify-content: center; flex: 0 0 auto;
  border-radius: 50%; border-color: var(--line); color: var(--ink-3);
}
.qa-dot:hover { color: var(--brand-dark); border-color: #d3ddff; }
.kb-tip { font-size: 12.5px; line-height: 1.75; color: var(--ink-2); }
.kb-tip-h {
  display: flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 13px; color: var(--ink); margin-bottom: 8px;
}
.kb-tip-h svg { color: var(--brand); }
.kb-tip ul { margin: 0; padding-left: 16px; }
.kb-tip li { margin-bottom: 5px; }
.kb-tip li::marker { color: var(--brand); }
.kb-tip b { color: var(--ink); font-weight: 600; }
.kb-tip code {
  padding: 1px 5px; border-radius: 4px; background: #f1f4fb;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; color: #3d4a6b;
}
.kb-tip-rec {
  display: inline-block; margin-left: 2px; padding: 0 5px; border-radius: 4px;
  font-size: 11px; line-height: 16px; color: #0f7a45; background: #eafaf1;
}
.kb-tip-f {
  margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--ink-3);
}
.kb-tip-pop.el-popover.el-popper { padding: 12px 14px; border-radius: 12px; }

/* ---------- 机器人类型选择 ---------- */
.type-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.type-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer;
  background: #fff; transition: .16s ease;
}
.type-card:hover { border-color: #c9d4ff; }
.type-card.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 6px 16px rgba(79,110,247,.1); }
.tc-top { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; }
.tc-ico { display: inline-flex; color: var(--brand); }
.tc-desc { font-size: 12px; color: var(--ink-3); line-height: 1.65; margin-top: 6px; }

/* ---------- 计费方式卡片 ---------- */
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-card {
  position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  background: #fff; cursor: pointer; transition: .16s ease;
}
.mode-card:hover { border-color: #c9d4ff; }
.mode-card.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 6px 18px rgba(79,110,247,.1); }
.mode-card .mc-radio {
  position: absolute; right: 14px; top: 15px; width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid #cfd6e4; background: #fff; transition: .16s;
}
.mode-card.active .mc-radio { border: 4.5px solid var(--brand); }
.mode-card .mc-top { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; padding-right: 26px; }
.mode-card .mc-ico {
  width: 20px; height: 20px; border-radius: 6px; display: inline-grid; place-items: center;
  background: #eef2ff; color: var(--brand); font-size: 11px; font-weight: 700;
}
.mode-card .mc-desc { font-size: 12.5px; color: var(--ink-3); line-height: 1.75; margin-top: 8px; }
.mode-card.active .mc-desc { color: var(--ink-2); }

/* ---------- 分段区块 ---------- */
.sec { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; overflow: hidden; }
.sec-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; background: #fbfcff; border-bottom: 1px solid var(--line);
}
.sec-head h4 { margin: 0; font-size: 13.5px; font-weight: 600; }
.sec-head .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.6; }
.sec-body { padding: 14px 14px 4px; }

/* ---------- API 行 ---------- */
.api-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: #fff;
  transition: .15s;
}
.api-row.off { background: #fafbfd; }
.api-meta { min-width: 150px; flex-shrink: 0; }
.api-name { font-size: 13px; font-weight: 600; }
.api-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.api-key { flex: 1; min-width: 180px; }

.copy-line { display: flex; align-items: center; gap: 8px; width: 100%; flex-wrap: nowrap; }
.copy-line .mono {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; color: var(--ink-2); background: #f6f8fc; border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px;
}

/* ---------- 企微统计 / 步骤 ---------- */
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-stats > div {
  background: #fbfcff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.ms-n { font-size: 20px; font-weight: 700; letter-spacing: -.4px; }
.ms-l { font-size: 11.5px; color: var(--ink-3); }
.steps { margin: 0; padding-left: 18px; font-size: 12.8px; color: var(--ink-2); line-height: 2; }
.steps li::marker { color: var(--brand); font-weight: 600; }
.steps b { color: var(--ink); }

/* ---------- 知识库列表描述 ---------- */
.nav-desc {
  font-size: 11.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- 侧栏二级菜单 ---------- */
.nav-group { margin-bottom: 2px; }
.nav-parent { position: relative; }
.nav-caret {
  margin-left: auto; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; opacity: .5; transition: transform .18s ease;
}
.nav-caret.open { transform: rotate(180deg); }
.nav-sub-wrap { padding: 2px 0 4px 0; }
.nav-sub {
  padding: 8px 12px 8px 42px; border-radius: 8px; font-size: 13px; color: var(--ink-2);
  cursor: pointer; position: relative; transition: .15s;
}
.nav-sub:hover { background: #f6f8ff; color: var(--ink); }
.nav-sub.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.nav-sub.active::before {
  content: ''; position: absolute; left: 26px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--brand-dark);
}

/* ---------- 套餐与账单 ---------- */
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; margin-bottom: 12px; }
.block-head > span { flex: 1 1 auto; min-width: 0; text-align: right; line-height: 1.6; font-size: 12px; }
.block-head h3 { margin: 0; font-size: 15px; font-weight: 600; }

.notice {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid #ffe0b2; background: linear-gradient(90deg, #fffaf0, #fffdf8); color: #8a5a00;
  margin-bottom: 16px; font-size: 13px;
}
.notice.danger { border-color: #f6cfcf; background: linear-gradient(90deg, #fff5f5, #fffafa); color: #a33; }
.notice-ico { flex: 0 0 auto; display: grid; place-items: center; }
.notice-body { flex: 1; min-width: 0; line-height: 1.7; }
.notice-body b { display: block; font-size: 13.5px; }
.notice-body div { font-size: 12.5px; opacity: .85; }

.bill-hero { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: stretch; }
@media (max-width: 1100px) { .bill-hero { grid-template-columns: 1fr; } }

.wallet {
  position: relative; overflow: hidden; padding: 18px 20px; border-radius: 14px; color: #fff;
  display: flex; flex-direction: column;
  background: linear-gradient(135deg, #4f6ef7 0%, #3b56d6 55%, #2f46bd 100%);
  box-shadow: 0 10px 26px rgba(59, 86, 214, .22);
}
.wallet::after {
  content: ''; position: absolute; right: -40px; top: -50px; width: 170px; height: 170px;
  border-radius: 50%; background: rgba(255, 255, 255, .12);
}
.wallet-top { display: flex; align-items: center; justify-content: space-between; }
.wallet-label { font-size: 12.5px; opacity: .85; }
.wallet-top .tag-soft { background: rgba(255,255,255,.2); color: #fff; }
.wallet-num { font-size: 34px; font-weight: 700; letter-spacing: -1px; margin: 10px 0 6px; }
.wallet-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; opacity: .82; line-height: 1.7; position: relative; }
.wallet-warn { color: #ffe1a8; }
.wallet-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 16px; position: relative; }
.wallet-actions .ra { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.28); color: #fff; }
.wallet-actions .ra:hover { background: rgba(255,255,255,.26); }
.wallet-actions .ra.primary { background: #fff; border-color: #fff; color: #3b56d6; font-weight: 600; }
.wallet-actions .ra.primary:hover { background: #f2f5ff; }

.cur-plan { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.cur-plan-label { font-size: 12px; color: var(--ink-3); }
.cur-plan-name { font-size: 19px; font-weight: 700; margin-top: 4px; }
.cur-plan-days { text-align: right; line-height: 1.4; }
.cur-plan-days b { font-size: 24px; color: var(--brand-dark); letter-spacing: -.5px; }
.cur-plan-days span { font-size: 12px; color: var(--ink-3); margin-left: 3px; }
.cur-plan-usage { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin-top: 18px; }
@media (max-width: 1280px) { .cur-plan-usage { grid-template-columns: 1fr; } }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.plan-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 18px 16px; display: flex; flex-direction: column; transition: .18s ease; overflow: hidden;
}
.plan-card:hover { border-color: #c9d4ff; box-shadow: 0 10px 24px rgba(79, 110, 247, .1); transform: translateY(-2px); }
.plan-card.current { border-color: #b9c8ff; background: linear-gradient(180deg, #f7f9ff 0%, #fff 55%); }
.plan-card.best { border-color: #f0c37c; box-shadow: 0 8px 22px rgba(230, 162, 60, .12); }
.plan-ribbon {
  position: absolute; top: 0; right: 0; padding: 3px 12px; font-size: 11px; font-weight: 600;
  background: var(--brand); color: #fff; border-bottom-left-radius: 10px;
}
.plan-ribbon.best { background: linear-gradient(135deg, #f2a93b, #e08e1a); }
.plan-name { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.plan-price { font-size: 30px; font-weight: 700; letter-spacing: -1px; line-height: 1.1; }
.plan-price small { font-size: 15px; font-weight: 600; margin-right: 2px; }
.plan-unit { font-size: 13px; font-weight: 400; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.plan-monthly { font-size: 12px; color: var(--brand-dark); margin-top: 4px; }
.plan-grant {
  font-size: 12.5px; color: var(--ink-2); margin-top: 10px; padding: 6px 10px;
  background: #f6f8ff; border-radius: 8px;
}
.plan-grant b { color: var(--brand-dark); }
.plan-feat { list-style: none; margin: 12px 0 16px; padding: 0; flex: 1; }
.plan-feat li { display: flex; gap: 8px; font-size: 12.5px; color: var(--ink-2); line-height: 1.9; }
.plan-feat .tick { color: var(--ok); font-weight: 700; }
.plan-btn { width: 100%; justify-content: center; height: 34px; margin-top: auto; }

/* 购买主按钮：实心渐变，和页面其他「软按钮」区分开 */
.cta {
  background: linear-gradient(135deg, #5b7cff, #3b56d6); color: #fff; border-color: transparent;
  font-weight: 600; height: 32px; padding: 0 16px;
}
.cta:hover { background: linear-gradient(135deg, #4f6ef7, #3348cf); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(59, 86, 214, .26); }
.cta:active { transform: translateY(.5px); }

.pack-save { font-size: 11px; font-weight: 600; color: #2a7a4c; background: #e9f8ef; border-radius: 6px; padding: 2px 7px; }

/* 分区节奏：套餐 / 加油包 统一 28px 上间距 */
.bill-sec { margin-top: 28px; }
.bill-sec .block-head { margin-bottom: 14px; }

/* ---------- 账单报表：左栏二级菜单 + 右栏内容 ---------- */
.bills-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 980px) { .bills-layout { grid-template-columns: 1fr; } }
.bills-side { position: sticky; top: 78px; }
.bills-side-list { padding: 8px; }
.bills-side-list .nav-item { align-items: flex-start; padding: 11px 12px; }
.bills-side-list .nav-item .ico { margin-top: 1px; }
.bills-side-foot {
  padding: 10px 16px 14px; font-size: 11.5px; color: var(--ink-3);
  border-top: 1px solid #f4f6fa; line-height: 1.6;
}
.bills-main { min-width: 0; }

/* ---------- 分段切换（今日 / 近 14 天、按额度 / 按笔数） ---------- */
.seg {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px;
  background: #f3f5fa; flex: 0 0 auto;
}
.seg-i {
  padding: 4px 11px; border-radius: 7px; font-size: 12px; color: var(--ink-3);
  cursor: pointer; transition: .15s ease; white-space: nowrap; line-height: 1.5;
}
.seg-i:hover { color: var(--ink-2); }
.seg-i.active { background: #fff; color: var(--brand-dark); font-weight: 600; box-shadow: 0 1px 3px rgba(30, 45, 90, .1); }
.seg.sm .seg-i { padding: 3px 9px; font-size: 11.5px; }
.chart-src { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.chart-src code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;
  background: #f3f5fa; border-radius: 4px; padding: 1px 5px; color: var(--ink-2);
}

/* ---------- 流水图表 ---------- */
.chart-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 1080px) { .chart-row { grid-template-columns: 1fr; } }
.chart-main, .chart-side { display: flex; flex-direction: column; }
.chart-main .card-pad { display: flex; flex-direction: column; flex: 1; }
.chart-main .card-head, .chart-side .card-head { align-items: flex-start; }
.chart-legend { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.dot-line { width: 14px; height: 2px; border-radius: 2px; background: #4f6ef7; display: inline-block; }

.trend-figures { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 6px; }
.trend-figures > div { display: flex; flex-direction: column; gap: 3px; }
.tf-label { font-size: 11.5px; color: var(--ink-3); }
.trend-figures b { font-size: 18px; font-weight: 700; letter-spacing: -.3px; color: var(--ink); font-variant-numeric: tabular-nums; }

.trend-wrap { position: relative; margin-top: 4px; }
.trend-svg { display: block; width: 100%; height: 168px; }
/* 热区：每个数据点一个竖条，悬停显示真实数值 */
.trend-hits { position: absolute; inset: 0 0 22px 0; pointer-events: none; }
.trend-hits span {
  position: absolute; top: 0; bottom: 0; width: 16px; transform: translateX(-50%);
  pointer-events: auto; cursor: crosshair;
}
.trend-tip {
  position: absolute; top: 2px; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; white-space: nowrap;
  background: #1f2a44; color: #fff; border-radius: 8px; font-size: 11.5px; line-height: 1.5;
  box-shadow: 0 6px 18px rgba(20, 30, 60, .22); pointer-events: none;
}
.trend-tip b { font-size: 12px; font-weight: 600; }
.trend-tip span { color: #cdd8f7; font-variant-numeric: tabular-nums; }
.trend-tip i { font-style: normal; color: #9fb0d8; font-size: 11px; }
.trend-tip::after {
  content: ''; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px;
  background: #1f2a44; transform: translateX(-50%) rotate(45deg);
}
.trend-tip.tp-start { transform: translateX(0); }
.trend-tip.tp-start::after { left: 16px; }
.trend-tip.tp-end { transform: translateX(-100%); }
.trend-tip.tp-end::after { left: calc(100% - 16px); }
.trend-days {
  position: relative; height: 15px; margin-top: 6px;
  font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.trend-days span { position: absolute; top: 0; white-space: nowrap; }
.chart-empty { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.chart-meta { margin-top: 10px; font-size: 11.5px; color: var(--ink-3); }
.chart-meta b { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-foot {
  margin-top: auto; padding-top: 12px; font-size: 11px; line-height: 1.7; color: var(--ink-3);
  border-top: 1px dashed #eef1f7;
}

.ring-wrap { display: flex; justify-content: center; padding: 6px 0 14px; }
.ring {
  width: 132px; height: 132px; border-radius: 50%; position: relative;
  display: grid; place-items: center;
}
.ring-hole {
  width: 88px; height: 88px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; align-content: center; gap: 2px;
  box-shadow: inset 0 0 0 1px #f0f2f8;
}
.ring-hole b { font-size: 17px; font-weight: 700; letter-spacing: -.4px; color: var(--ink); }
.ring-hole span { font-size: 10.5px; color: var(--ink-3); }
.ring-legend { display: flex; flex-direction: column; gap: 2px; }
.ring-note { margin-top: 10px; font-size: 11px; color: var(--ink-3); line-height: 1.6; }
.rl-row { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 5px 2px; border-bottom: 1px solid #f5f7fb; }
.rl-row:last-child { border-bottom: 0; }
.rl-dot { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 8px; }
.rl-name { flex: 1; min-width: 0; color: var(--ink-2); }
.rl-cnt { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.rl-pct { width: 38px; text-align: right; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- 企业微信：企业 ID 单行 ---------- */
.corp-field { display: flex; align-items: center; gap: 12px; }
.corp-label { flex: 0 0 auto; font-size: 13px; color: var(--ink-2); }
.corp-row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.corp-row .el-input { flex: 1; min-width: 0; }
.corp-row .el-button { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 720px) {
  .corp-field { flex-wrap: wrap; }
  .corp-label { flex: 0 0 100%; }
}

.field-label { font-size: 12.5px; color: var(--ink-2); margin: 16px 0 8px; }
.month-picks { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.month-pick {
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px;
  cursor: pointer; color: var(--ink-2); transition: .15s;
}
.month-pick:hover { border-color: #c9d4ff; color: var(--brand-dark); }
.month-pick.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.buy-plan {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: 12px; background: #f7f9ff; border: 1px solid #e6ecff;
}
.buy-plan-name { font-size: 14.5px; font-weight: 600; }
.buy-plan-price { font-size: 20px; font-weight: 700; color: var(--brand-dark); white-space: nowrap; }
.buy-plan-price span { font-size: 12px; font-weight: 400; color: var(--ink-3); }
.buy-kv { grid-template-columns: 88px 1fr !important; font-size: 13px; margin-top: 16px; }
.buy-kv dd { margin: 0; }
.buy-total { font-size: 22px; font-weight: 700; color: var(--ink); }

.pill-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; color: var(--ink-2);
  background: #f5f7fb; cursor: pointer; transition: .15s; border: 1px solid transparent;
}
.pill:hover { background: #eef2fb; color: var(--ink); }
.pill.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; border-color: #d5ddff; }
.pill em { font-style: normal; margin-left: 5px; font-size: 11px; opacity: .7; }

.amt { color: var(--ink); font-variant-numeric: tabular-nums; }
.amt.plus { color: var(--ok); }
.order-title { font-weight: 600; font-size: 13.5px; }

/* ==========================================================
   对话日志 · 客服运营（双栏二级菜单 / 看板 / 质检 / 告警）
   ========================================================== */
.logs-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1080px) { .logs-layout { grid-template-columns: 1fr; } }
.logs-side { position: sticky; top: 78px; }
.logs-side-list { padding: 8px; }
.logs-side-list .nav-item { align-items: flex-start; padding: 11px 12px; }
.logs-side-list .nav-item .ico { margin-top: 1px; }
.logs-nav-t { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.logs-badge {
  font-size: 10.5px; font-weight: 700; line-height: 1; padding: 3px 5px; border-radius: 999px;
  background: #fdecec; color: var(--danger);
}
.logs-side-foot {
  padding: 10px 16px 14px; font-size: 11.5px; color: var(--ink-3);
  border-top: 1px solid #f4f6fa; line-height: 1.6;
}
.logs-main { min-width: 0; }

/* 筛选栏：一行排布，窄屏自动换行 */
.conv-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 0; }
.conv-cust { display: flex; align-items: center; gap: 9px; min-width: 0; }
.conv-avatar {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: var(--brand-soft); color: var(--brand-dark);
}
.danger { color: var(--danger); } .ok { color: var(--ok); } .warn { color: var(--warn); }

/* 质检分：进度条 + 数字 */
.score-wrap { display: inline-flex; align-items: center; gap: 7px; }
.score-bar { width: 44px; height: 5px; border-radius: 3px; background: #eef1f7; overflow: hidden; display: inline-block; }
.score-bar i { display: block; height: 100%; border-radius: 3px; background: var(--ok); }
.score-bar i.warn { background: var(--warn); }
.score-bar i.danger { background: var(--danger); }

/* 可点击 KPI（质检命中筛选） */
.kpi-click { cursor: pointer; transition: .15s ease; }
.kpi-click:hover { border-color: #cfd9ff; transform: translateY(-1px); }
.kpi-on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 110, 247, .1); }
.kpi .value.danger { color: var(--danger); } .kpi .value.warn { color: var(--warn); }
.up { color: var(--danger); } .down { color: var(--ok); }

/* 图例补充 */
.dot-bar { width: 9px; height: 9px; border-radius: 2px; background: #8fa4ff; display: inline-block; margin-right: 5px; }
.dot-line.warn { background: var(--warn); }
.risk-bars { margin-top: 14px; border-top: 1px solid #f4f6fa; padding-top: 12px; display: grid; gap: 8px; }
.risk-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 34px; align-items: center; gap: 8px; font-size: 12px; }
.risk-name { color: var(--ink-2); white-space: nowrap; }
.risk-track { height: 6px; border-radius: 4px; background: #f1f3f9; overflow: hidden; display: block; }
.risk-track i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }
.risk-track i.danger { background: var(--danger); } .risk-track i.warn { background: var(--warn); } .risk-track i.ok { background: var(--ok); }
.risk-cnt { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Top 问题类型横条 */
.hbar-row { display: grid; grid-template-columns: 78px minmax(0, 1fr) 34px 92px; align-items: center; gap: 9px; padding: 5px 0; font-size: 12.5px; }
.hbar-name { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 8px; border-radius: 5px; background: #f2f4fa; overflow: hidden; }
.hbar-track i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #8ba1ff, #4f6ef7); }
.hbar-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.hbar-rate { text-align: right; font-size: 11.5px; }

/* 关键词云 */
.kw-cloud { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; min-height: 74px; }
.kw { line-height: 1.4; font-weight: 500; display: inline-flex; align-items: baseline; gap: 3px; }
.kw em { font-style: normal; font-size: 10px; color: var(--ink-3); font-weight: 400; }

/* 相似问题聚类 */
.cluster { padding: 10px 0; border-bottom: 1px dashed #f0f2f8; }
.cluster:last-of-type { border-bottom: 0; }
.cluster-top { display: flex; align-items: center; gap: 10px; }
.cluster-idx {
  width: 22px; height: 22px; border-radius: 7px; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-dark); font-size: 11.5px; font-weight: 700;
}
.cluster-t { font-weight: 500; font-size: 13px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 排行榜 */
.rank-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed #f2f4f9; font-size: 12.5px; }
.rank-row:last-of-type { border-bottom: 0; }
.rank-idx {
  width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; flex: 0 0 auto;
  background: #f3f5fa; color: var(--ink-3); font-size: 11px; font-weight: 700;
}
.rank-idx.top { background: var(--brand-soft); color: var(--brand-dark); }
.rank-name { min-width: 62px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-main { color: var(--ink-2); white-space: nowrap; }
.rank-sub { margin-left: auto; color: var(--ink-3); white-space: nowrap; font-size: 11.5px; }
.rank-sub + .rank-sub { margin-left: 10px; }

/* ---------- 会话详情抽屉 ---------- */
.cd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cd-who { display: flex; align-items: center; gap: 10px; }
.cd-avatar {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #eef3ff, #dfe8ff); color: var(--brand-dark); font-weight: 700;
}
.cd-summary {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #f8faff;
  border: 1px solid #e9eeff; display: grid; gap: 9px; font-size: 13px; line-height: 1.7;
}
.cd-label { font-size: 11.5px; color: var(--ink-3); margin-bottom: 3px; }
.cd-kv { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--ink-3); padding-top: 4px; border-top: 1px dashed #e4eaff; }
.cd-kv b { color: var(--ink-2); font-weight: 600; }
.cd-chat { max-height: calc(100vh - 330px); overflow-y: auto; padding-right: 4px; }
.tl-item { padding: 9px 0; display: flex; flex-direction: column; gap: 4px; }
.tl-item.user { align-items: flex-end; }
.tl-item.key .tl-bubble { box-shadow: 0 0 0 2px rgba(79, 110, 247, .16); }
.tl-item.sens .tl-bubble { box-shadow: 0 0 0 2px rgba(217, 58, 58, .2); }
.tl-who { font-size: 11.5px; color: var(--ink-3); }
.tl-bubble {
  max-width: 86%; padding: 9px 13px; border-radius: 11px; background: #f6f7fb;
  font-size: 13px; line-height: 1.75; white-space: pre-wrap; word-break: break-word;
}
.tl-item.user .tl-bubble { background: #eef2ff; color: #26337f; }
.tl-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11px; color: var(--ink-3); }
.tl-meta .tag-soft { font-size: 10.5px; padding: 1px 6px; }
.tl-gap { text-align: center; font-size: 11.5px; color: var(--ink-3); margin: 6px 0; }
.tl-gap::before, .tl-gap::after { content: ''; display: inline-block; width: 26px; height: 1px; background: #eceff6; vertical-align: middle; margin: 0 8px; }
.tl-gap.slow { color: var(--danger); }
.tl-gap.slow::before, .tl-gap.slow::after { background: #f6d7d7; }

.cd-form, .cd-side-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid #f2f4f9; }
.cd-side-block:first-of-type { border-top: 0; }
.cd-rel, .cd-alert, .cd-review {
  display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px dashed #f2f4f9; font-size: 12.5px;
}
.cd-rel { cursor: pointer; }
.cd-rel:hover .cd-rel-t { color: var(--brand-dark); }
.cd-rel-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-review { flex-wrap: wrap; }
.cd-qa { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 4px 0 8px; }
.cd-qa-score b { font-size: 34px; letter-spacing: -1px; display: block; line-height: 1.2; }
.cd-hits { font-size: 12px; color: var(--ink-2); margin-top: 7px; line-height: 1.7; }

/* ---------- 告警列表 ---------- */
.alert-list { padding: 0 16px; }
.alert-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid #f4f6fa;
}
.alert-row:last-child { border-bottom: 0; }
.alert-lv {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: #f2f4fa; color: var(--ink-3);
}
.alert-lv.high { background: #fdecec; color: var(--danger); }
.alert-lv.mid { background: #fdf3e3; color: #b57513; }
.alert-lv.low { background: #eef7f1; color: #2a7a4c; }
.alert-main { flex: 1; min-width: 0; }
.alert-title { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.alert-desc { font-size: 12.5px; color: var(--ink-2); margin: 3px 0 4px; line-height: 1.65; }
.seg-dot {
  display: inline-block; min-width: 15px; height: 15px; line-height: 15px; padding: 0 4px; margin-left: 5px;
  border-radius: 999px; background: #fdecec; color: var(--danger); font-size: 10px; text-align: center;
}
.logs-badge { margin-left: 6px; }

/* 看板 5 个 KPI 一行排开，窄屏退化为 3 / 2 列 */
.kpi-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1420px) { .kpi-grid.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1080px) { .kpi-grid.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi-grid.five .kpi { padding: 14px 16px; }
.kpi-grid.five .kpi .value { font-size: 24px; }

/* 表格内文字：单行省略，避免列被内容撑开 */
.conv-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-sub { font-size: 11.5px; white-space: nowrap; }
.conv-issue { font-size: 12.5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-owner { font-size: 12.5px; white-space: nowrap; }

/* 质检分胶囊：比细进度条更容易一眼读出高低 */
.score-chip {
  display: inline-block; min-width: 36px; padding: 2px 7px; border-radius: 7px;
  font-size: 12px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums;
  background: #f3f5fa; color: var(--ink-2);
}
.score-chip.ok { background: #e9f8ef; color: #1a7a46; }
.score-chip.warn { background: #fdf3e3; color: #a9701a; }
.score-chip.danger { background: #fdecec; color: #c33; }

/* 质检中心 6 个命中卡 */
.kpi-grid.six { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1420px) { .kpi-grid.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .kpi-grid.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi-grid.six .kpi { padding: 12px 14px; }
.kpi-grid.six .kpi .value { font-size: 22px; margin-top: 6px; }
.kpi-grid.six .kpi .sub { font-size: 11.5px; }

/* 排行榜数值间距 */
.rank-sub { margin-left: 12px; }
.rank-sub:first-of-type { margin-left: auto; }
.kw-cloud { line-height: 1.7; }
.tag-soft { white-space: nowrap; }

/* 关键词卡：词云固定可视高度，说明文字贴底，避免与左侧卡片等高时留白 */
.kw-card .card-pad { display: flex; flex-direction: column; height: calc(100% - 52px); }
.kw-cloud { min-height: 118px; align-content: flex-start; }
.cd-qa { grid-template-columns: 148px minmax(0, 1fr); gap: 12px; }
.cd-alert { align-items: flex-start; }
.cd-alert .tag-soft { margin-top: 1px; }
.cd-alert .ra { height: 24px; }
