/* ============================================================
   SaaS 管理端样式
   设计令牌：科技蓝主色 + 单一浅色主题
   间距遵循 8/12/16 网格；卡片圆角 12px；控件圆角 8px
   ============================================================ */
:root{
  color-scheme:light;
  /* 主题取自 RPA 自动化配置工具（127.0.0.1:8770）：科技蓝 + slate 中性色 */
  --bg-app:#f4f6fb;
  --bg-base:#ffffff;
  --bg-sub:#f1f5f9;
  --bg-hover:#f8fafd;
  --bg-active:#e9f1fe;
  --text-1:#0f172a;
  --text-2:#334155;
  --text-3:#64748b;
  --border-1:#e3e8f0;      /* 卡片 / 控件外框 */
  --border-2:#d5dde9;      /* 需要更强的控件描边、虚线、分隔 */
  --border-soft:#eef2f8;   /* 列表行、区块内部细分隔 */
  --brand:#006fef;
  --brand-hover:#0059c4;
  --brand-active:#004ba8;
  --brand-surface:#e9f1fe;
  --brand-line:#bcd8fd;
  --on-brand:#ffffff;
  --ok:#16a34a;      --ok-surface:#e7f6ec;
  --warn:#b45309;    --warn-surface:#fef3e2;
  --err:#e5484d;     --err-surface:#fdecec;
  --info:#006fef;    --info-surface:#e9f1fe;
  --r-sm:8px; --r-md:12px;
  --shadow-1:0 1px 2px rgba(15,23,42,.05),0 6px 18px rgba(15,23,42,.05);
  --shadow-2:0 12px 32px rgba(15,23,42,.16);
  /* 面板层级：底板浅灰 → 面板白 + 轻投影 → 面板头浅蓝，形成三层视觉关系 */
  --bg-tint:#f5f9ff;
  --bg-sunken:#f7f9fd;
  --bg-th:#f7f9fd;
  --shadow-panel:0 1px 2px rgba(15,23,42,.05),0 6px 18px rgba(15,23,42,.05);
  --font:"Microsoft YaHei UI","Microsoft YaHei",-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif;
  --mono:"SFMono-Regular",Consolas,"Liberation Mono",monospace;
}

*{box-sizing:border-box}
[hidden]{display:none !important}
/* 应用外壳固定为 100vh，滚动只发生在 .body 与各页面内部滚动区；
   html/body 禁止滚动，避免滚轮滚动到内容末尾后整页（含页脚）被向上推开、下方露出空白 */
html,body{height:100%;overflow:hidden;overscroll-behavior:none}
body{margin:0;font-family:var(--font);background:var(--bg-app);color:var(--text-1);font-size:13px;
  line-height:1.6;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:var(--border-2);border-radius:8px;border:2px solid transparent;background-clip:content-box}

/* ---------------- 登录 ---------------- */
/* 登录页占满视口，窗口过矮时在自身内部滚动（body 已禁止滚动） */
.login-wrap{height:100%;min-height:100%;overflow-y:auto;display:flex}
.login-brand{flex:1;background:var(--brand);position:relative;overflow:hidden;
  color:#fff;padding:56px 64px;display:flex;flex-direction:column;justify-content:center;gap:22px}
/* 背景支持纯色 / 图片 / 视频：视频与图片铺满，文字层压在遮罩之上保证可读 */
.login-brand>.mark,.login-brand>h1,.login-brand>p,.login-brand>ul{position:relative;z-index:1}
.login-brand .login-bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
  z-index:0;pointer-events:none}
.login-brand.has-media::before{content:"";position:absolute;inset:0;z-index:0;
  background:linear-gradient(135deg,rgba(3,24,58,.62),rgba(3,40,96,.34))}
.login-brand .mark{width:56px;height:56px;border-radius:16px;background:rgba(255,255,255,.16);
  display:flex;align-items:center;justify-content:center;font-weight:800;font-size:20px;letter-spacing:1px;overflow:hidden}
.login-brand .mark img{width:100%;height:100%;object-fit:contain}
.login-brand h1{margin:0;font-size:30px;font-weight:800;letter-spacing:.5px}
.login-brand p{margin:0;max-width:460px;line-height:1.8;color:rgba(255,255,255,.88);font-size:14px}
.login-brand ul{margin:8px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:12px}
.login-brand li{display:flex;align-items:center;gap:10px;font-size:13.5px;color:rgba(255,255,255,.92)}
.login-brand li::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--brand-line);flex:0 0 6px}
.login-panel{width:460px;flex:0 0 460px;background:var(--bg-base);display:flex;align-items:center;justify-content:center;padding:32px}
.login-card{width:100%;max-width:352px}
.login-card h2{margin:0 0 6px;font-size:21px;font-weight:700}
.login-card .sub{margin:0 0 22px;color:var(--text-3);font-size:13px}
.tabs{display:flex;gap:22px;border-bottom:1px solid var(--border-1);margin-bottom:20px}
.tab{padding:10px 2px;font-size:13.5px;font-weight:600;color:var(--text-3);cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px}
.tab:hover{color:var(--text-1)}
.tab.is-active{color:var(--brand);border-bottom-color:var(--brand)}
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.field label{font-size:12px;font-weight:600;color:var(--text-1)}
.field .row{display:flex;gap:8px}
.hint{color:var(--text-3);font-size:12px;margin-top:2px}
/* 登录页异常提醒：常驻一行，便于用户对照原因修改输入 */
.hint.is-err{color:var(--err)}
.hint.is-warn{color:var(--warn)}
.login-foot{margin-top:16px;color:var(--text-3);font-size:12px;text-align:center}
@media(max-width:900px){
  .login-brand{display:none}
  .login-panel{width:100%;flex:1;padding:24px}
}

/* ---------------- 通用控件 ---------------- */
.input,select.input,textarea.input{
  height:34px;border:1px solid var(--border-1);border-radius:var(--r-sm);padding:0 11px;
  background:var(--bg-base);color:var(--text-1);font-size:13px;font-family:inherit;width:100%;outline:none;transition:border-color .15s,box-shadow .15s}
textarea.input{height:auto;padding:8px 11px;line-height:1.6;resize:vertical}
.input:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-surface)}
.input::placeholder{color:var(--text-3)}
select.input{cursor:pointer;appearance:none;padding-right:28px;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 9px center}
.input[disabled],.input:disabled{background:var(--bg-sub);color:var(--text-3);cursor:not-allowed}

/* ---------------- 自绘下拉（替代原生 select 弹层） ---------------- */
.sel-wrap{position:relative;display:inline-block;vertical-align:middle;min-width:0;max-width:100%}
.sel-wrap > .sel-native{position:absolute;left:0;top:0;width:100% !important;height:100% !important;
  opacity:0;pointer-events:none;border:0;padding:0}
.sel-btn{position:relative;display:flex;align-items:center;width:100%;height:34px;padding:0 30px 0 11px;
  border:1px solid var(--border-1);border-radius:var(--r-sm);background:var(--bg-base);color:var(--text-1);
  font-size:13px;font-family:inherit;line-height:1;text-align:left;cursor:pointer;outline:none;
  transition:border-color .15s,box-shadow .15s}
.sel-btn:hover{border-color:var(--brand)}
.sel-btn .txt{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sel-btn .chev{position:absolute;right:11px;top:50%;width:7px;height:7px;margin-top:-5px;
  border-right:1.5px solid var(--text-3);border-bottom:1.5px solid var(--text-3);
  transform:rotate(45deg);transition:transform .16s,border-color .15s}
.sel-wrap.is-open .sel-btn{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-surface)}
.sel-wrap.is-open .sel-btn .chev{transform:rotate(-135deg);margin-top:-1px;border-color:var(--brand)}
.sel-wrap.is-disabled .sel-btn{background:var(--bg-sub);color:var(--text-3);border-color:var(--border-1);
  cursor:not-allowed}
.sel-wrap.is-disabled .sel-btn:hover{border-color:var(--border-1)}

/* 分页器「每页条数」用的紧凑尺寸，与分页按钮同高 */
.sel-wrap--sm .sel-btn{height:30px;border-radius:6px;font-size:12.5px;padding:0 24px 0 8px}
.sel-wrap--sm .sel-btn .chev{right:9px;width:6px;height:6px;margin-top:-4px}

.sel-pop{position:fixed;z-index:85;padding:4px;background:var(--bg-base);border:1px solid var(--border-1);
  border-radius:var(--r-sm);box-shadow:var(--shadow-2);max-height:280px;overflow-y:auto;
  animation:sel-in .12s ease}
@keyframes sel-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.sel-opt{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:6px;font-size:13px;
  color:var(--text-2);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  transition:background .12s,color .12s}
.sel-opt:hover{background:var(--bg-hover);color:var(--text-1)}
.sel-opt.is-sel{background:var(--brand-surface);color:var(--brand);font-weight:600}
.sel-opt.is-sel::after{content:"";flex:0 0 auto;margin-left:auto;width:9px;height:5px;
  border-left:1.8px solid currentColor;border-bottom:1.8px solid currentColor;transform:rotate(-45deg)}
.sel-opt.is-disabled{opacity:.45;cursor:not-allowed}

.btn{height:34px;padding:0 16px;border-radius:var(--r-sm);border:1px solid transparent;cursor:pointer;
  font-size:12.5px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:6px;
  font-family:inherit;transition:background .15s,border-color .15s,color .15s;white-space:nowrap}
.btn-primary{background:var(--brand);color:var(--on-brand)}
.btn-primary:hover{background:var(--brand-hover)}
.btn-primary:active{background:var(--brand-active)}
.btn-ghost{background:var(--bg-base);border-color:var(--border-1);color:var(--text-2)}
.btn-ghost:hover{border-color:var(--brand);color:var(--brand);background:var(--brand-surface)}
.btn-subtle{background:var(--bg-sub);border-color:var(--border-1);color:var(--text-2)}
.btn-subtle:hover{background:var(--bg-hover)}
.btn-danger{background:var(--bg-base);border-color:#f4c7c8;color:var(--err)}
.btn-danger:hover{background:var(--err);border-color:var(--err);color:#fff}
.btn-sm{height:30px;padding:0 12px;font-size:12px}
.btn-block{width:100%}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn-link{background:none;border:none;color:var(--brand);cursor:pointer;font-size:13px;font-weight:600;padding:0;font-family:inherit}
.btn-link:hover{text-decoration:underline}
.btn-link.danger{color:var(--err)}

.pill{height:24px;padding:0 10px;border-radius:999px;font-size:12px;display:inline-flex;align-items:center;gap:6px;font-weight:600}
.pill::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;flex:0 0 7px}
.pill-ok{background:var(--ok-surface);color:var(--ok)}
.pill-warn{background:var(--warn-surface);color:var(--warn)}
.pill-err{background:var(--err-surface);color:var(--err)}
.pill-info{background:var(--info-surface);color:var(--info)}
.pill-neutral{background:var(--bg-sub);color:var(--text-3)}
.tag{display:inline-flex;align-items:center;height:20px;padding:0 7px;border-radius:5px;background:var(--bg-sub);
  color:var(--text-3);font-size:11px;font-weight:600;cursor:help}
.tag-brand{background:var(--brand-surface);color:var(--brand)}
/* 会话列表类型标签：对齐企微，名称后的小号浅色标签，仅外部/微信标注 */
.conv-tag{display:inline-flex;align-items:center;height:16px;padding:0 4px;border-radius:3px;
  font-size:10.5px;font-weight:500;line-height:1;letter-spacing:.2px;flex:0 0 auto;cursor:default}
.conv-tag.is-ext{background:var(--ok-surface);color:var(--ok)}
.conv-tag.is-wx{background:#e4f6f5;color:#0d9488}
/* AI 托管状态标签：与详情页头部按钮同一套配色 */
.conv-tag.is-ai{background:var(--brand-surface);color:var(--brand)}
.conv-tag.is-human{background:var(--warn-surface);color:var(--warn)}
.conv-tag.is-closed{background:var(--bg-sub);color:var(--text-3)}

/* ---------------- 控制台布局（顶部菜单） ---------------- */
.shell{display:flex;flex-direction:column;height:100vh;overflow:hidden;background:var(--bg-app)}

.topbar{flex:0 0 52px;height:52px;background:var(--bg-base);border-bottom:1px solid var(--border-1);
  display:flex;align-items:center;gap:14px;padding:0 18px;position:relative;z-index:40}
.brand{display:flex;align-items:center;gap:9px;flex:0 0 auto;white-space:nowrap}
.brand .mark{width:28px;height:28px;border-radius:8px;background:var(--brand);color:#fff;
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:11px;letter-spacing:.5px;flex:0 0 28px;overflow:hidden}
.brand .mark img{width:100%;height:100%;object-fit:contain}
.brand .mark.has-logo{background:transparent;border-radius:6px}
.brand .name{font-size:15px;font-weight:700;color:var(--text-1);letter-spacing:.2px}
.brand-tag{height:22px;padding:0 8px;border:1px solid var(--border-1);border-radius:999px;background:var(--bg-sub);
  color:var(--text-3);font-size:11.5px;font-weight:600;display:inline-flex;align-items:center;white-space:nowrap}

/* 顶部一级菜单：固定单行；超出可视宽度时整体折叠进「更多」 */
.topnav{display:flex;align-items:center;gap:2px;flex:1;min-width:0;height:100%;overflow:visible}
.tn-group{position:relative;flex:0 0 auto;display:flex;align-items:center;height:100%}
.tn-item{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 12px;margin:0;border:0;
  background:transparent;border-radius:var(--r-sm);color:var(--text-2);font-size:13px;font-family:inherit;
  line-height:1;cursor:pointer;white-space:nowrap;transition:background .15s,color .15s}
.tn-item:hover{background:var(--bg-hover);color:var(--text-1)}
.tn-item svg{width:15px;height:15px;flex:0 0 15px;stroke:currentColor;fill:none;stroke-width:1.7;
  stroke-linecap:round;stroke-linejoin:round}
.tn-item.is-active,.tn-group.is-active > .tn-toggle{background:var(--brand-surface);color:var(--brand);font-weight:600}
.tn-group.open > .tn-toggle{background:var(--bg-hover)}
.tn-caret{display:inline-block;width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;
  border-top:5px solid currentColor;flex:0 0 auto;transition:transform .16s}
.tn-group.open .tn-caret{transform:rotate(180deg)}
.tn-menu{position:absolute;left:0;top:100%;min-width:190px;padding:6px;display:none;z-index:70;
  background:var(--bg-base);border:1px solid var(--border-1);border-radius:var(--r-md);box-shadow:var(--shadow-2);
  max-height:min(70vh,520px);overflow-y:auto}
.tn-group.open > .tn-menu{display:block}
.tn-more > .tn-menu{left:auto;right:0}
.tn-link{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:var(--r-sm);color:var(--text-2);
  font-size:13px;cursor:pointer;white-space:nowrap}
.tn-link:hover{background:var(--bg-hover);color:var(--text-1)}
.tn-link.is-active{background:var(--bg-active);color:var(--brand);font-weight:600}
.tn-link svg{width:16px;height:16px;flex:0 0 16px;stroke:currentColor;fill:none;stroke-width:1.7;
  stroke-linecap:round;stroke-linejoin:round}

.topbar-right{display:flex;align-items:center;gap:9px;margin-left:auto;flex:0 0 auto}
.topbar-right .avatar{width:28px;height:28px;border-radius:50%;background:var(--brand-surface);color:var(--brand);
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:12px;flex:0 0 28px}
.topbar-right .who{display:flex;align-items:center;max-width:280px;white-space:nowrap;line-height:1}
.topbar-right .who strong{font-size:13px;font-weight:600;color:var(--text-1);
  overflow:hidden;text-overflow:ellipsis;max-width:150px}
.topbar-right .who span{font-size:11.5px;color:var(--text-3);padding-left:8px;margin-left:8px;
  border-left:1px solid var(--border-1);overflow:hidden;text-overflow:ellipsis;max-width:120px}
.topbar-right .btn-link{color:var(--text-3);font-weight:500;padding:0 2px}
.topbar-right .btn-link:hover{color:var(--brand);text-decoration:none}

.main{flex:1;display:flex;flex-direction:column;overflow:hidden;min-width:0}

/* 代理端品牌头像预览（品牌与绑定弹窗） */
.bd-avt{width:48px;height:48px;border-radius:10px;flex:0 0 48px;overflow:hidden;
  background:var(--brand-surface);color:var(--brand);display:flex;align-items:center;
  justify-content:center;font-weight:700;font-size:13px;border:1px solid var(--border-1)}
.bd-avt img{width:100%;height:100%;object-fit:cover;display:block}
.bd-avt .bd-ph{font-size:12px}

.main{flex:1;display:flex;flex-direction:column;overflow:hidden;min-width:0}
.head{height:64px;flex:0 0 64px;background:var(--bg-base);border-bottom:1px solid var(--border-1);
  display:flex;align-items:center;justify-content:space-between;padding:0 24px;gap:16px}
.head h1{margin:0;font-size:20px;font-weight:700;line-height:1.25;letter-spacing:.2px}
.head .desc{color:var(--text-3);font-size:12.5px;margin-top:2px}
.head-left{min-width:0}
.head-right{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.head-extra{display:flex;align-items:center;gap:10px;min-width:0}
.head-extra:empty{display:none}
.head-extra .conv-toolbar{margin:0;flex-wrap:nowrap}
.head-extra .conv-toolbar .search,
.head-extra .conv-toolbar .search:hover,
.head-extra .conv-toolbar .search:focus-within{width:220px}
@media(max-width:1080px){
  .head{height:auto;flex-basis:auto;flex-wrap:wrap;padding:10px 16px;gap:10px}
  .head-right{width:100%;justify-content:flex-end}
  .head-extra{overflow-x:auto;padding-bottom:2px}
  .head-extra .conv-toolbar .search,
  .head-extra .conv-toolbar .search:hover,
  .head-extra .conv-toolbar .search:focus-within{width:180px}
}
.body{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:20px 24px 28px}

/* ---------------- 卡片 / 指标 ---------------- */
.card{background:var(--bg-base);border:1px solid var(--border-1);border-radius:var(--r-md);padding:16px;
  box-shadow:var(--shadow-panel)}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}
.card-head h3{margin:0;font-size:14px;font-weight:600;line-height:1.4}
.grid{display:grid;gap:16px}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:1180px){.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-2{grid-template-columns:1fr}}
.kpi{display:flex;flex-direction:column;gap:4px}
.kpi .n{font-size:26px;font-weight:800;letter-spacing:-.5px}
.kpi .l{color:var(--text-3);font-size:12.5px}
.kpi .m{color:var(--text-3);font-size:12px}

/* ---------------- 知识库：使用说明 · 运作机制 ---------------- */
.kb-guide{margin-bottom:12px;padding:14px 16px}
.kb-guide .card-head{margin-bottom:12px}
.kb-guide.is-collapsed .card-head{margin-bottom:0}
.kb-guide.is-collapsed .kb-guide-grid,.kb-guide.is-collapsed .kb-guide-foot{display:none}
.kb-guide-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.kb-guide-col{padding:0 18px;border-left:1px solid var(--border-soft);min-width:0}
.kb-guide-col:first-child{padding-left:0;border-left:none}
.kb-guide-col:last-child{padding-right:0}
.kb-guide-col h4{display:flex;align-items:center;gap:7px;margin:0 0 9px;
  font-size:12.5px;font-weight:600;color:var(--text-1)}
.kb-guide-col h4::before{content:"";width:3px;height:12px;border-radius:2px;background:var(--brand)}
.kb-guide-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:7px}
.kb-guide-list li{display:flex;gap:7px;font-size:12px;line-height:1.65;color:var(--text-3)}
.kb-guide-list li b{color:var(--text-1);font-weight:600}
.kb-guide-list .n{flex:0 0 16px;width:16px;height:16px;margin-top:2px;border-radius:50%;
  background:var(--brand-surface);color:var(--brand);font-size:11px;font-weight:700;
  display:flex;align-items:center;justify-content:center}
.kb-guide-list .k{flex:0 0 auto;color:var(--text-2);font-weight:600}
.kb-guide-foot{margin-top:11px;padding-top:9px;border-top:1px dashed var(--border-soft);
  font-size:12px;color:var(--text-3)}
@media(max-width:1080px){
  .kb-guide-grid{grid-template-columns:1fr;gap:14px}
  .kb-guide-col{padding:0;border-left:none}
  .kb-guide-col + .kb-guide-col{padding-top:12px;border-top:1px solid var(--border-soft)}
}

/* ---------------- 工具条 ---------------- */
.toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.toolbar .sep{width:1px;height:18px;background:var(--border-1)}
.toolbar .grow{flex:1}
.search{position:relative;width:210px;transition:width .18s ease}
.search:hover,.search:focus-within{width:288px}
.search .input{padding-left:30px}
.search svg{position:absolute;left:9px;top:50%;transform:translateY(-50%);width:15px;height:15px;
  stroke:var(--text-3);fill:none;stroke-width:1.8}

/* ---------------- 表格 ---------------- */
.table-wrap{background:var(--bg-base);border:1px solid var(--border-1);border-radius:var(--r-md);overflow:hidden}
.table-scroll{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:13px;table-layout:fixed}
th,td{text-align:left;padding:11px 14px;border-bottom:1px solid var(--border-soft);vertical-align:middle;overflow:hidden;text-overflow:ellipsis}
th{background:var(--bg-th);color:var(--text-3);font-weight:600;font-size:11.5px;letter-spacing:.2px;
  white-space:nowrap;position:sticky;top:0;z-index:1;border-bottom:1px solid var(--border-1)}
td{color:var(--text-2)}
tr:last-child td{border-bottom:none}
tbody tr:hover td{background:var(--bg-hover)}
td.strong{color:var(--text-1);font-weight:600}
td.num,th.num{text-align:right;font-family:var(--mono);white-space:nowrap}
td.ops{white-space:nowrap;text-align:right}
td.ops .btn-link{margin-left:12px}
td.ops .btn-link:first-child{margin-left:0}
.mono{font-family:var(--mono);font-size:12px}
/* 审计详情列：单行截断，完整内容走详情抽屉 */
td.au-detail{max-width:420px;white-space:nowrap}
.empty{padding:44px 16px;text-align:center;color:var(--text-3);font-size:13px}
.empty strong{display:block;color:var(--text-2);margin-bottom:6px;font-size:14px}

/* ---------------- 分页 ---------------- */
.pager{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  padding:11px 14px;border-top:1px solid var(--border-soft);background:#fbfcfe}
.pager .info{color:var(--text-3);font-size:12.5px}
.pager .ctrl{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.pager button{min-width:30px;height:30px;padding:0 8px;border:1px solid var(--border-1);background:var(--bg-base);
  color:var(--text-2);border-radius:6px;cursor:pointer;font-size:12.5px;font-family:inherit;transition:all .15s}
.pager button:hover:not(:disabled){border-color:var(--brand);color:var(--brand)}
.pager button.is-active{background:var(--brand);border-color:var(--brand);color:#fff;font-weight:700}
.pager button:disabled{opacity:.45;cursor:not-allowed}
.pager .size{display:flex;align-items:center;gap:6px;color:var(--text-3);font-size:12.5px}
.pager .size select{height:30px;border:1px solid var(--border-1);border-radius:6px;background:var(--bg-base);
  color:var(--text-1);font-size:12.5px;padding:0 6px;cursor:pointer;font-family:inherit}
.pager .jump{display:flex;align-items:center;gap:6px;color:var(--text-3);font-size:12.5px}
.pager .jump input{width:52px;height:30px;text-align:center;border:1px solid var(--border-1);border-radius:6px;
  background:var(--bg-base);color:var(--text-1);font-size:12.5px;font-family:var(--mono)}
.pager .dots{color:var(--text-3);padding:0 2px}

/* ---------------- 组织树 ---------------- */
.tree{font-size:13.5px}
.tree-row{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:var(--r-sm);cursor:default}
.tree-row:hover{background:var(--bg-hover)}
.tree-row.is-active{background:var(--bg-active)}
.tree-row .caret{width:18px;height:18px;flex:0 0 18px;display:flex;align-items:center;justify-content:center;
  cursor:pointer;color:var(--text-3);transition:transform .15s}
.tree-row .caret.open{transform:rotate(90deg)}
.tree-row .caret.leaf{visibility:hidden}
.tree-row .nm{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text-1);font-weight:600}
.tree-row .meta{color:var(--text-3);font-size:12px;font-family:var(--mono)}
.tree-row .ops{display:flex;gap:10px;opacity:0;transition:opacity .15s}
.tree-row:hover .ops{opacity:1}
.tree-children{margin-left:18px;border-left:1px dashed var(--border-1);padding-left:4px}

/* ---------------- 弹窗 ---------------- */
.mask{position:fixed;inset:0;background:rgba(15,23,42,.42);display:flex;align-items:flex-start;
  justify-content:center;padding:56px 16px;z-index:60;overflow-y:auto}
.modal{background:var(--bg-base);border-radius:var(--r-md);box-shadow:var(--shadow-2);width:560px;max-width:100%;
  display:flex;flex-direction:column;max-height:calc(100vh - 96px)}
.modal.wide{width:760px}
.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 20px 12px}
.modal-head h3{margin:0;font-size:16px;font-weight:700}
.modal-head .sub{color:var(--text-3);font-size:12.5px;margin-top:4px}
.modal-body{padding:4px 20px 8px;overflow-y:auto;flex:1}
.modal-foot{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:14px 20px 18px;
  border-top:1px solid var(--border-soft);margin-top:8px}
.x-close{width:30px;height:30px;border-radius:8px;border:none;background:transparent;cursor:pointer;
  color:var(--text-3);font-size:18px;line-height:1;display:flex;align-items:center;justify-content:center}
.x-close:hover{background:var(--bg-hover);color:var(--text-1)}

.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
.form-grid .span2{grid-column:span 2}
@media(max-width:620px){.form-grid{grid-template-columns:1fr}.form-grid .span2{grid-column:span 1}}
.req::after{content:"*";color:var(--err);margin-left:3px}

.check-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 14px;
  border:1px solid var(--border-1);border-radius:var(--r-sm);padding:12px;background:var(--bg-sub);max-height:280px;overflow-y:auto}
.check{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-2);cursor:pointer;padding:3px 0}
.check input{width:15px;height:15px;accent-color:var(--brand);cursor:pointer;margin:0}
.check:hover{color:var(--text-1)}
.perm-group{margin-bottom:10px}
.perm-group .gh{display:flex;align-items:center;gap:8px;font-size:12.5px;font-weight:700;color:var(--text-2);
  margin:0 0 6px;padding-bottom:4px;border-bottom:1px solid var(--border-1)}
.perm-group .gh .btn-link{margin-left:auto;font-size:12px}
.radio-row{display:flex;gap:18px;flex-wrap:wrap;padding:2px 0}
.radio{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--text-2);cursor:pointer}
.radio input{accent-color:var(--brand);cursor:pointer;margin:0}

.picker{display:flex;gap:10px}
.picker .pool,.picker .picked{border:1px solid var(--border-1);border-radius:var(--r-sm);flex:1;min-height:180px;
  max-height:220px;overflow-y:auto;padding:6px;background:var(--bg-sub)}
.picker .item{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:6px;font-size:13px;cursor:pointer;color:var(--text-2)}
.picker .item:hover{background:var(--bg-hover);color:var(--text-1)}
.picker .item .mono{font-size:11.5px}
.picker .mid{display:flex;flex-direction:column;justify-content:center;gap:8px}
.picker .ph{color:var(--text-3);font-size:12.5px;text-align:center;padding:14px 0}

/* ---------------- 提示 / 通知 ---------------- */
.toasts{position:fixed;right:16px;bottom:16px;z-index:90;display:flex;flex-direction:column;gap:10px;max-width:380px}
.toast{background:var(--bg-base);border:1px solid var(--border-1);border-left:3px solid var(--info);
  border-radius:var(--r-sm);box-shadow:var(--shadow-1);padding:12px 14px;display:flex;gap:10px;align-items:flex-start;
  animation:toast-in .22s ease}
.toast.ok{border-left-color:var(--ok)}
.toast.err{border-left-color:var(--err)}
.toast.warn{border-left-color:var(--warn)}
.toast .t{font-size:13px;font-weight:600;color:var(--text-1)}
.toast .m{font-size:12.5px;color:var(--text-2);margin-top:3px;line-height:1.6;word-break:break-word}
.toast .close{margin-left:auto;background:none;border:none;color:var(--text-3);cursor:pointer;font-size:15px;line-height:1}
@keyframes toast-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

.tip{position:relative;display:inline-flex}
.tip::after{content:attr(data-tip);position:absolute;left:50%;bottom:calc(100% + 7px);transform:translateX(-50%);
  background:#0f172a;color:#fff;font-size:12px;font-weight:400;line-height:1.5;padding:6px 9px;border-radius:6px;
  white-space:pre;opacity:0;pointer-events:none;transition:opacity .15s;z-index:70;box-shadow:var(--shadow-1)}
.tip:hover::after{opacity:1}

.skeleton{height:13px;border-radius:6px;background:linear-gradient(90deg,var(--bg-sub) 25%,var(--bg-hover) 37%,var(--bg-sub) 63%);
  background-size:400% 100%;animation:sk 1.3s ease infinite}
@keyframes sk{0%{background-position:100% 50%}100%{background-position:0 50%}}

.spin{width:15px;height:15px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;
  animation:sp .7s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}

.inline-note{display:flex;gap:8px;align-items:flex-start;background:var(--brand-surface);border-radius:var(--r-sm);
  padding:10px 12px;font-size:12.5px;color:var(--text-2);line-height:1.7;margin-bottom:14px}
.inline-note svg{width:15px;height:15px;flex:0 0 15px;margin-top:2px;stroke:var(--brand);fill:none;stroke-width:1.8}
.kv{display:flex;gap:8px;font-size:13px;color:var(--text-2);padding:5px 0}
.kv .k{color:var(--text-3);width:78px;flex:0 0 78px}
.kv .v{word-break:break-all}
.token-box{display:flex;gap:8px;align-items:center;background:var(--bg-sub);border:1px solid var(--border-1);
  border-radius:var(--r-sm);padding:8px 10px;font-family:var(--mono);font-size:12px;color:var(--text-2);word-break:break-all}

/* ---------------- 会话（只读） ---------------- */
.conv-layout{display:grid;grid-template-columns:minmax(0,392px) minmax(0,1fr);gap:16px;
  height:calc(100vh - 168px);min-height:480px}
@media(max-width:1080px){.conv-layout{grid-template-columns:1fr;height:auto}}
/* 宽屏下会话页占满可视区高度，滚动只发生在会话列表与消息区内部，
   避免出现页面级（外部）滚动条 */
@media(min-width:1081px){
  .body:has(> .conv-layout){overflow:hidden}
  .body:has(> .conv-layout) > .conv-layout{height:100%;min-height:0}
}
/* 列表 / 消息区的滚动条收窄为细条，低调不抢视觉 */
.conv-rows,.conv-msgs{scrollbar-width:thin;scrollbar-color:var(--border-2) transparent}
.conv-rows::-webkit-scrollbar,.conv-msgs::-webkit-scrollbar{width:6px;height:6px}
.conv-rows::-webkit-scrollbar-track,.conv-msgs::-webkit-scrollbar-track{background:transparent}
.conv-rows::-webkit-scrollbar-thumb,.conv-msgs::-webkit-scrollbar-thumb{
  background:var(--border-2);border:0;border-radius:6px}
.conv-list,.conv-main{display:flex;flex-direction:column;background:var(--bg-base);
  border:1px solid var(--border-1);border-radius:var(--r-md);box-shadow:var(--shadow-panel);
  overflow:hidden;min-height:0}
.conv-list .card-head,.conv-main .card-head{padding:0 14px;min-height:54px;margin:0;
  background:var(--bg-base);border-bottom:1px solid var(--border-soft);
  display:flex;align-items:center;justify-content:space-between;gap:10px}
.conv-list .card-head h3,.conv-main .card-head h3{margin:0;display:flex;align-items:center;gap:8px;
  font-size:14px;font-weight:600;color:var(--text-1);white-space:nowrap}
.conv-list .card-head h3::before,.conv-main .card-head h3::before{content:"";width:3px;height:14px;
  border-radius:2px;background:var(--brand);flex:0 0 3px}
/* 列表信息切换：仅外部 + 消息 / 统计 */
.conv-list .card-head .cv-head-ops{display:inline-flex;align-items:center;gap:10px;min-width:0}
.cv-chk{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:var(--text-3);
  white-space:nowrap;cursor:pointer;user-select:none;transition:color .15s}
.cv-chk:hover{color:var(--text-1)}
.cv-chk input{width:14px;height:14px;margin:0;accent-color:var(--brand);cursor:pointer}
.conv-list .card-head .seg{display:inline-flex;align-items:center;gap:2px;padding:2px;
  border-radius:6px;background:var(--bg-sub);border:1px solid var(--border-soft)}
.seg .seg-btn{height:24px;padding:0 10px;border:0;border-radius:4px;background:transparent;
  color:var(--text-3);font-size:12px;font-family:inherit;cursor:pointer;transition:background .15s,color .15s}
.seg .seg-btn:hover{color:var(--text-1)}
.seg .seg-btn.is-on{background:var(--bg-base);color:var(--brand);font-weight:600;
  box-shadow:0 1px 2px rgba(15,23,42,.08)}
.conv-main .card-head .hint{margin-top:2px;font-size:12px;color:var(--text-3);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* 详情头部右侧：托管按钮 + 正文检索，同组靠右排布 */
.cv-head-right{display:flex;align-items:center;gap:10px;min-width:0;flex:0 0 auto}
.cv-host{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto}
.cv-host .btn{height:26px;padding:0 9px;border-radius:5px;font-size:12px}
.cv-host .btn.is-on{background:var(--brand);border-color:var(--brand);color:#fff}
.cv-host .btn.is-on:hover{background:var(--brand-strong,var(--brand));color:#fff}
.cv-host-note{font-size:11.5px;color:var(--text-3);max-width:200px;margin-left:2px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cv-host-note.is-err{color:var(--err)}
/* 托管的数字员工：胶囊只露头像 + 名称（过长省略）+ 状态点，悬停出名片 */
.cv-emp{position:relative;display:inline-flex;align-items:center;gap:6px;height:26px;
  margin-left:5px;padding:0 9px 0 3px;border-radius:999px;cursor:default;flex:0 0 auto;
  border:1px solid var(--brand-line);background:var(--brand-surface);outline:none;
  transition:background .15s,border-color .15s}
.cv-emp:hover,.cv-emp:focus-visible{background:#dfeaff;border-color:var(--brand)}
.cv-emp-av{width:20px;height:20px;border-radius:50%;overflow:hidden;display:block;flex:0 0 20px;
  background:var(--bg-sub)}
.cv-emp-av img{width:100%;height:100%;object-fit:cover;display:block}
.cv-emp-av img.is-logo{object-fit:contain;padding:2px;background:var(--bg-base)}
.cv-emp-nm{font-size:12px;font-weight:600;color:var(--brand);max-width:104px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cv-emp-dot{width:5px;height:5px;border-radius:50%;background:var(--ok);flex:0 0 5px}
.cv-emp.is-err{border-color:#f0b4b6;background:var(--err-surface)}
.cv-emp.is-err .cv-emp-nm{color:var(--err)}
.cv-emp.is-err .cv-emp-dot{background:var(--err)}
/* 悬停名片：头像 + 完整名称 + 托管状态 + 一句话描述 */
.cv-emp-card{position:absolute;right:0;top:calc(100% + 9px);z-index:40;width:250px;
  padding:12px 13px;border-radius:10px;background:var(--bg-base);border:1px solid var(--border-1);
  box-shadow:0 14px 34px rgba(16,24,40,.16);text-align:left;font-weight:400;white-space:normal;
  cursor:default;opacity:0;visibility:hidden;transform:translateY(-4px);pointer-events:none;
  transition:opacity .16s,transform .16s,visibility .16s}
.cv-emp-card::after{content:"";position:absolute;right:18px;top:-5px;width:9px;height:9px;
  background:var(--bg-base);border-left:1px solid var(--border-1);border-top:1px solid var(--border-1);
  transform:rotate(45deg)}
.cv-emp:hover .cv-emp-card,.cv-emp:focus-visible .cv-emp-card{
  opacity:1;visibility:visible;transform:translateY(0)}
.cv-emp-hd{display:flex;align-items:center;gap:9px;margin-bottom:8px}
.cv-emp-av.is-lg{width:32px;height:32px;flex:0 0 32px}
.cv-emp-txt{min-width:0}
.cv-emp-txt b{display:block;font-size:13px;font-weight:700;color:var(--text-1);line-height:1.35;
  white-space:normal;word-break:break-word}
.cv-emp-txt .st{display:inline-flex;align-items:center;gap:4px;margin-top:2px;
  font-size:11px;color:var(--ok)}
.cv-emp-txt .st::before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}
.cv-emp.is-err .cv-emp-txt .st{color:var(--err)}
.cv-emp-desc{margin:0;font-size:12px;line-height:1.7;color:var(--text-2)}
.cv-emp-err{margin:8px 0 0;padding-top:8px;border-top:1px dashed var(--border-1);
  font-size:11.5px;line-height:1.6;color:var(--err)}
/* AI 托管弹窗里的知识库多选 */
.kb-pick{display:flex;flex-direction:column;gap:6px;max-height:342px;overflow-y:auto}
.kb-pick-row{display:flex;align-items:flex-start;gap:9px;padding:9px 11px;cursor:pointer;
  border:1px solid var(--border-soft);border-radius:var(--r-sm);transition:background .15s,border-color .15s}
.kb-pick-row:hover{background:var(--bg-sub);border-color:var(--border-2)}
.kb-pick-row:has(input:checked){background:var(--brand-surface);border-color:var(--brand)}
.kb-pick-row input{width:15px;height:15px;margin:2px 0 0;accent-color:var(--brand);cursor:pointer;flex:0 0 15px}
.kb-pick-main{display:flex;flex-direction:column;gap:2px;min-width:0}
.kb-pick-name{font-size:13px;font-weight:500;color:var(--text-1)}
.emp-model{margin-left:6px;font-size:11px;font-weight:400;color:var(--text-3)}
.kb-pick-sub{font-size:12px;color:var(--text-3);line-height:1.6}
.kb-pick-tip{margin-top:10px;font-size:12px;color:var(--text-3);line-height:1.7}
/* 顶部筛选条：靠右放置，代理端 + 类型 + 会话检索 */
.conv-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:10px;
  margin-bottom:12px;flex-wrap:wrap}
.conv-toolbar .search{width:210px}
/* 会话类型多选下拉：勾选框 + 选中高亮，点选不收起弹层 */
.ms-wrap{flex:0 0 auto}
.ms-pop{padding:4px}
.ms-opt .box{width:14px;height:14px;flex:0 0 14px;border:1px solid var(--border-2);border-radius:3px;
  background:var(--bg-base);display:inline-flex;align-items:center;justify-content:center;
  transition:background .12s,border-color .12s}
.ms-opt.is-on .box{background:var(--brand);border-color:var(--brand)}
.ms-opt.is-on .box::after{content:"";width:7px;height:4px;margin-top:-1px;
  border-left:1.6px solid #fff;border-bottom:1.6px solid #fff;transform:rotate(-45deg)}
.ms-opt.is-on{background:var(--brand-surface);color:var(--text-1)}
.ms-opt .lb{min-width:0;overflow:hidden;text-overflow:ellipsis}
.conv-rows{flex:1;overflow-y:auto;min-height:0}
.conv-row{display:flex;gap:11px;padding:12px 14px;border-bottom:1px solid var(--border-soft);cursor:pointer;
  transition:background .15s}
.conv-row:hover{background:var(--bg-hover)}
.conv-row.is-active{background:var(--bg-active);box-shadow:inset 3px 0 0 var(--brand)}
/* 企微头像：图片覆盖在首字占位上，加载失败时自动露出占位 */
.conv-row .avt{position:relative;width:34px;height:34px;border-radius:9px;flex:0 0 34px;overflow:hidden;
  background:var(--brand-surface);color:var(--brand);display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:700}
.conv-row .avt.grp{background:var(--warn-surface);color:var(--warn)}
.conv-row .avt > img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.conv-row .avt-grid{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:1fr;align-items:stretch;justify-items:stretch;gap:1px;background:var(--border-1)}
.conv-row .avt-grid.g2{grid-template-rows:1fr}
.conv-row .avt-grid .avt-cell{position:relative;overflow:hidden;background:var(--bg-sub)}
.conv-row .avt-grid .avt-cell img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.conv-row .ct{flex:1;min-width:0}
.conv-row .t{display:flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;color:var(--text-1);
  white-space:nowrap;overflow:hidden}
.conv-row .t .tt{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conv-row .s{display:flex;align-items:center;gap:6px;margin-top:4px;color:var(--text-3);font-size:11.5px;
  white-space:nowrap;overflow:hidden;font-variant-numeric:tabular-nums}
.conv-row .s > span + span::before{content:"·";margin-right:6px;color:var(--border-2)}
/* 第二行统一用正文字体，数字只做等宽对齐，避免中文回退到别的字体 */
.conv-row .s .num{flex:0 0 auto}
.conv-row .s .prev{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conv-row .s .time{margin-left:auto;flex:0 0 auto}
.conv-row .s .time::before{content:none;margin:0}
/* 代理心跳呼吸点：绿=在线 / 黄=代理掉线 / 红=企微掉线，移入由 title 显示状态名 */
.conv-row .s .agent,#cvMeta .agent{display:inline-flex;align-items:center;min-width:0}
.hb{position:relative;display:inline-flex;width:8px;height:8px;flex:0 0 8px;margin-right:5px}
.hb i{display:block;width:8px;height:8px;border-radius:50%;background:currentColor}
.hb::after{content:"";position:absolute;inset:0;border:1.5px solid currentColor;border-radius:50%;
  animation:hb-ring 1.8s ease-out infinite}
.hb-ok{color:#22b573}
.hb-warn{color:#f0a020}
.hb-err{color:#e5484d}
@keyframes hb-ring{
  0%{transform:scale(.7);opacity:.6}
  70%{transform:scale(2.1);opacity:0}
  100%{transform:scale(2.1);opacity:0}
}
@media (prefers-reduced-motion:reduce){.hb::after{animation:none;opacity:.25}}
/* 代理名称：点击进入代理端列表 */
.agent-link{border:0;background:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;
  max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.agent-link:hover{color:var(--brand);text-decoration:underline}
.conv-pager .pager{padding:8px 12px}
/* 人工回复输入区：仅授权用户可见，固定在看板底部 */
.conv-reply{flex:0 0 auto;display:flex;flex-direction:column;gap:6px;padding:10px 14px;
  border-top:1px solid var(--border-1);background:var(--bg-base)}
.conv-reply textarea{min-height:56px;max-height:140px;resize:vertical}
.conv-reply .rp-bar{display:flex;align-items:center;justify-content:space-between;gap:10px}
.conv-reply .rp-hint{font-size:12px;color:var(--text-3)}
.tag-pending{background:var(--warn-surface);color:var(--warn)}
.tag-pending.is-err{background:var(--err-surface,#fde8e8);color:var(--err)}
/* 待发送气泡上的撤回入口：代理端领取前可撤回 */
.rp-withdraw{border:0;background:none;padding:0;cursor:pointer;font:inherit;font-size:12px;
  color:var(--brand);text-decoration:underline;text-underline-offset:2px}
.rp-withdraw:hover{color:var(--brand-strong,var(--brand))}
/* 回复栏出现时，回底按钮上移，避免压在输入框上 */
.conv-main:has(.conv-reply:not([hidden])) .cv-jump{bottom:16px}

/* 会话主体：消息区 + 右侧会话工具栏（工具栏收起后只剩 44px 图标栏） */
.cv-stage{position:relative;flex:1;display:flex;min-width:0;min-height:0}
.cv-stage > .conv-msgs{flex:1;min-width:0}

/* ---------- 会话工具栏：分区 + 淡分隔线，无卡片外框 ---------- */
.cv-tools{width:292px;flex:0 0 292px;align-self:stretch;display:flex;flex-direction:column;
  border-left:1px solid var(--border-soft);background:#fcfdff;overflow:hidden;
  transition:width .2s ease,flex-basis .2s ease}
.cv-tools.is-collapsed{width:44px;flex-basis:44px}
.cv-tools-hd{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;
  gap:8px;height:40px;padding:0 6px 0 16px}
.cv-tools-hd b{font-size:12px;font-weight:600;color:var(--text-3);letter-spacing:.3px}
.cv-tools-toggle{width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;
  border:0;border-radius:6px;background:transparent;color:#94a3b8;cursor:pointer}
.cv-tools-toggle:hover{background:var(--brand-surface);color:var(--brand)}
.cv-tools-toggle svg{display:block;width:14px;height:14px;fill:none;stroke:currentColor;
  stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s ease}
.cv-tools-body{flex:1 1 auto;overflow-y:auto;padding:0 16px 14px;
  scrollbar-width:thin;scrollbar-color:var(--border-2) transparent}
.cv-tools-body::-webkit-scrollbar{width:6px}
.cv-tools-body::-webkit-scrollbar-thumb{background:var(--border-2);border-radius:3px}
.cv-tools.is-collapsed .cv-tools-body,
.cv-tools.is-collapsed .cv-tools-hd b{display:none}
.cv-tools.is-collapsed .cv-tools-hd{height:auto;justify-content:center;padding:0;margin-top:10px}
.cv-tools.is-collapsed .cv-tools-toggle svg{transform:rotate(180deg)}
.cv-tools-empty{padding:16px 0;font-size:12px;color:#94a3b8;line-height:1.8}

/* 收起后的图标栏 + 数量 / 等级角标 */
.cv-tools-rail{display:none;flex:0 0 auto;flex-direction:column;align-items:center;gap:10px;
  padding:10px 0}
.cv-tools.is-collapsed .cv-tools-rail{display:flex}
.cv-rail-btn{position:relative;width:28px;height:28px;display:flex;align-items:center;
  justify-content:center;border:0;border-radius:7px;background:transparent;color:var(--text-3);
  cursor:pointer}
.cv-rail-btn:hover{background:var(--brand-surface);color:var(--brand)}
.cv-rail-btn svg{display:block;width:16px;height:16px;fill:none;stroke:currentColor;
  stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.cv-rail-cnt{position:absolute;top:-1px;right:-2px;min-width:13px;height:13px;padding:0 3px;
  border-radius:999px;background:#94a3b8;color:#fff;font-size:9px;font-weight:700;
  display:flex;align-items:center;justify-content:center;border:1.5px solid #fcfdff}
.cv-rail-cnt.hot{background:var(--warn)}

/* 分区（SOP / 高价值线索 / 用户画像） */
.cv-sec{padding:12px 0 13px;border-top:1px solid var(--border-soft)}
.cv-sec:first-child{border-top:0;padding-top:4px}
.cv-sec-hd{display:flex;align-items:baseline;gap:8px;margin-bottom:8px}
.cv-sec-hd b{font-size:12px;font-weight:600;color:var(--text-2)}
.cv-sec-meta{margin-left:auto;font-size:11px;font-weight:400;color:#94a3b8}
.cv-sec-meta.is-hot{color:var(--warn);font-weight:600}
.cv-sec-tip{font-size:11.5px;color:#94a3b8;line-height:1.7}

/* SOP：一行一条，无内框 */
.cv-sop{position:relative;padding:5px 6px 6px;margin:0 -6px;border-radius:6px}
.cv-sop:hover{background:#f7f9fc}
.cv-sop-line{display:flex;align-items:center;gap:7px;min-width:0}
.cv-dot{width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:var(--brand)}
.cv-dot.is-run{box-shadow:0 0 0 3px rgba(0,111,239,.10)}
.cv-dot.is-done{background:var(--ok)}
.cv-dot.is-pause{background:#cbd5e1;box-shadow:none}
.cv-sop-name{flex:1 1 auto;min-width:0;font-size:12px;color:var(--text-1);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cv-sop-step{flex:0 0 auto;font-size:11px;color:#94a3b8;font-variant-numeric:tabular-nums}
.cv-sop-step b{color:var(--text-2);font-weight:600}
.cv-sop-more{flex:0 0 18px;width:18px;height:18px;display:flex;align-items:center;
  justify-content:center;border:0;border-radius:4px;background:transparent;
  color:#94a3b8;cursor:pointer;padding:0}
.cv-sop-more:hover{background:#eef2f7;color:var(--text-2)}
.cv-sop-more svg{display:block;width:14px;height:14px;fill:currentColor}
.cv-sop-bar{height:2px;margin:5px 0 0 13px;border-radius:1px;background:#edf1f6;overflow:hidden}
.cv-sop-bar i{display:block;height:100%;border-radius:1px;background:var(--brand)}
.cv-sop-bar i.is-done{background:var(--ok)}
.cv-sop-bar i.is-pause{background:#cbd5e1}
/* 已取消：整行降权，操作仍保持温和品牌蓝 */
.cv-sop.is-cancel .cv-sop-name{color:var(--text-3)}
.cv-sop.is-cancel .cv-sop-step b{color:var(--text-3)}
.cv-sop.is-cancel .cv-sop-bar i{background:#cbd5e1}
.cv-sop-menu{display:none;position:absolute;right:4px;top:26px;z-index:6;min-width:100px;
  padding:3px;background:var(--bg-base);border:1px solid var(--border-1);border-radius:8px;
  box-shadow:0 8px 22px rgba(15,23,42,.10)}
.cv-sop.is-open .cv-sop-menu{display:block}
.cv-sop-menu button{display:block;width:100%;height:26px;padding:0 8px;border:0;
  border-radius:5px;background:transparent;color:var(--text-2);font-family:inherit;
  font-size:12px;text-align:left;cursor:pointer}
.cv-sop-menu button:hover{background:#f5f7fb}
/* 行内二次确认：轻量提示条，不用弹窗 */
.cv-sop-cfm{display:flex;align-items:center;gap:8px;margin-top:6px;padding:6px 8px;
  border-radius:6px;background:var(--brand-surface);font-size:11px;color:var(--text-3);line-height:1.5}
.cv-sop-cfm .cfm-txt{flex:1 1 auto;min-width:0}
.cv-sop-cfm .cv-lnk{flex:0 0 auto}
.cv-sop-foot{margin-top:8px}
.cv-sop-foot .cv-lnk{display:inline-flex;align-items:center;gap:4px;font-size:11.5px}
.cv-sop-foot .cv-lnk svg{width:12px;height:12px;fill:none;stroke:currentColor;
  stroke-width:2;stroke-linecap:round}

/* 文字链接：工具栏内所有次要操作统一用它（取消类同样用品牌蓝） */
.cv-lnk{height:20px;padding:0;border:0;background:transparent;color:var(--brand);
  font-family:inherit;font-size:11px;white-space:nowrap;cursor:pointer}
.cv-lnk:hover{text-decoration:underline;text-underline-offset:2px}
.cv-lnk.go{font-weight:600}

/* 高价值线索 */
.cv-kv{display:flex;align-items:baseline;justify-content:space-between;gap:10px;
  font-size:12px;line-height:1.95}
.cv-kv .k{flex:0 0 auto;color:#94a3b8}
.cv-kv .v{color:var(--text-2);text-align:right}
.cv-kv .v.is-strong{color:var(--text-1);font-weight:600;font-variant-numeric:tabular-nums}
.cv-act-row{display:flex;align-items:center;gap:12px;margin-top:7px}

/* 用户画像 */
.cv-quote{margin:0;padding-left:9px;border-left:2px solid var(--brand-line);
  font-size:12px;line-height:1.8;color:var(--text-2)}
.cv-quote.is-empty{color:#94a3b8}
.cv-sec-ft{display:flex;align-items:center;justify-content:space-between;gap:8px;
  margin-top:8px;font-size:11px;color:#94a3b8}

/* 预留位：一行文字，不做卡片 */
.cv-more-tool{display:flex;align-items:center;gap:4px;width:100%;padding:8px 0 0;border:0;
  border-top:1px dashed var(--border-1);background:transparent;color:#94a3b8;
  font-family:inherit;font-size:11px;cursor:pointer}
.cv-more-tool:hover{color:var(--brand)}

/* SOP 步骤弹窗 */
.cv-steps{display:flex;flex-direction:column;gap:10px;max-height:52vh;overflow-y:auto}
.cv-step{display:flex;align-items:flex-start;gap:10px}
.cv-step-day{flex:0 0 58px;padding-top:1px;font-size:11px;color:#94a3b8;
  font-variant-numeric:tabular-nums}
.cv-step-main{min-width:0}
.cv-step-main b{display:block;font-size:12.5px;color:var(--text-1);font-weight:600}
.cv-step-main p{margin:2px 0 0;font-size:11.5px;color:var(--text-3);line-height:1.7}

.conv-msgs{flex:1;overflow-y:auto;padding:16px 18px;background:var(--bg-sunken);min-height:0}
/* 未选会话时把空状态垂直居中，避免大面积空白堆在上方 */
.conv-msgs:has(> .empty){display:flex;align-items:center;justify-content:center}
.conv-msgs > .empty{padding:40px 24px;max-width:440px;margin:24px auto 0;background:var(--bg-base);
  border:1px dashed var(--border-2);border-radius:var(--r-md)}
.conv-msgs:has(> .empty) > .empty{margin:0;width:min(440px,100%)}
/* 消息区滚轮连续滑动后浮出的回顶 / 回底圆形按钮（白底 + 浅蓝描边 + 蓝色箭头） */
.conv-main{position:relative}
.cv-jump{position:absolute;right:16px;top:16px;bottom:16px;width:40px;pointer-events:none;z-index:8}
.cv-jump .jump-btn{position:absolute;left:0;width:40px;height:40px;padding:0;border-radius:50%;
  display:flex;align-items:center;justify-content:center;background:var(--bg-base);
  border:1px solid var(--brand-line);color:var(--brand);box-shadow:0 2px 10px rgba(15,23,42,.10);
  cursor:pointer;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(6px);
  transition:opacity .18s,transform .18s,visibility .18s,background .15s,color .15s,border-color .15s}
#cvJumpTop{top:0}
#cvJumpBot{bottom:0}
.cv-jump .jump-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round}
.cv-jump.is-show .jump-btn{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0)}
.cv-jump.at-top #cvJumpTop,.cv-jump.at-bottom #cvJumpBot{opacity:0;visibility:hidden;pointer-events:none}
.cv-jump .jump-btn:hover{background:var(--brand);border-color:var(--brand);color:#fff}
.cv-jump .jump-btn:active{transform:scale(.94)}
@media (prefers-reduced-motion:reduce){.cv-jump .jump-btn{transition:none}}
/* 回顶 / 回底按钮：跟着消息区右边缘走，避让会话工具栏宽度 */
.cv-jump{right:calc(292px + 12px)}
.cv-stage:has(.cv-tools.is-collapsed) .cv-jump{right:calc(44px + 12px)}
@media(max-width:1080px){
  .cv-tools{display:none}
  .cv-jump{right:12px}
}
.msg{display:flex;gap:9px;margin-bottom:14px;max-width:100%}
.msg .av{position:relative;width:30px;height:30px;border-radius:8px;flex:0 0 30px;display:flex;align-items:center;justify-content:center;
  font-size:11px;font-weight:700;background:var(--brand-surface);color:var(--brand);overflow:hidden}
.msg .av > img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.msg.ext .av{background:var(--warn-surface);color:var(--warn)}
/* 系统/应用头像：对齐企微官方应用图标，彩色圆角底 + 白色实心图形 */
.msg .av.app-ic,.conv-row .avt.app-ic{color:#fff;background:var(--app-tone,#2b7cff);border-radius:8px}
.conv-row .avt.app-ic{border-radius:9px}
.msg .av.app-ic svg,.conv-row .avt.app-ic svg{display:block;width:100%;height:100%}
.app-ic.t-blue{--app-tone:#2b7cff}
.app-ic.t-amber{--app-tone:#fbc224}
.app-ic.t-green{--app-tone:#2db755}
/* 文件传输助手图标自带绿色圆角底，容器不再叠底色 */
.app-ic.t-plain{--app-tone:transparent}
.app-ic.t-red{--app-tone:#ff6a3d}
.app-ic.t-teal{--app-tone:#0fa8a0}
.app-ic.t-slate{--app-tone:#8b95a7}
/* 企业微信团队是白底彩色 logo，需要描边区分于页面底色 */
.app-ic.t-white{--app-tone:#fff;box-shadow:inset 0 0 0 1px rgba(15,23,42,.12)}
.msg .wrap{min-width:0;max-width:min(720px,78%)}
.msg .meta{display:flex;align-items:center;gap:7px;margin-bottom:4px;color:var(--text-3);font-size:11.5px}
/* 发送者昵称与时间同字号、同字重、同颜色，只靠分隔线区分 */
.msg .meta .nm{font-weight:400}
.msg .meta .sep{width:1px;height:10px;background:var(--border-2);flex:0 0 1px}
.msg .meta .time{font-variant-numeric:tabular-nums}
.msg .bubble{display:inline-block;max-width:100%;background:var(--bg-base);border:1px solid var(--border-1);
  border-radius:10px;padding:9px 12px;
  font-size:13px;line-height:1.7;color:var(--text-1);word-break:break-word;white-space:pre-wrap}
.msg.self{flex-direction:row-reverse}
.msg.self .wrap{display:flex;flex-direction:column;align-items:flex-end}
/* 自身气泡的元信息行靠右；空间不足时换行，避免「撤回」被挤出可视区 */
.msg.self .meta{flex-wrap:wrap;justify-content:flex-end;row-gap:2px}
.msg.self .bubble{background:var(--brand-surface);border-color:transparent;color:var(--text-1)}
/* 文本消息内的 Markdown 渲染：段落、标题、列表、引用、代码 */
.msg .bubble .md-p{margin:0 0 8px}
.msg .bubble .md-h{margin:0 0 8px;font-weight:700;line-height:1.45}
.msg .bubble .md-h1{font-size:17px}
.msg .bubble .md-h2{font-size:16px}
.msg .bubble .md-h3{font-size:15px}
.msg .bubble .md-h4{font-size:14px}
.msg .bubble ul,.msg .bubble ol{margin:0 0 8px;padding-left:20px}
.msg .bubble ul{list-style:disc}
.msg .bubble ol{list-style:decimal}
.msg .bubble li{margin:3px 0;line-height:1.7}
.msg .bubble li:last-child{margin-bottom:0}
.msg .bubble blockquote{margin:0 0 8px;padding:2px 0 2px 10px;border-left:3px solid var(--border-2);
  color:var(--text-2)}
.msg .bubble .md-code{margin:0 0 8px;padding:8px 10px;background:var(--bg-sub);border-radius:6px;
  overflow-x:auto;white-space:pre;font-size:12.5px;line-height:1.6}
.msg .bubble code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.msg .bubble .md-code code{padding:0;background:none}
.msg .bubble :not(pre)>code{padding:1px 5px;background:var(--bg-sub);border-radius:4px;font-size:12.5px}
.msg .bubble .md-hr{margin:10px 0;border:0;border-top:1px dashed var(--border-1)}
/* Markdown 表格：单元格内正常换行，宽表在气泡内横向滚动 */
.msg .bubble .md-table-wrap{margin:0 0 8px;max-width:100%;overflow-x:auto}
.msg .bubble .md-table{width:100%;border-collapse:collapse;font-size:12.5px;line-height:1.6}
.msg .bubble .md-table th,.msg .bubble .md-table td{padding:6px 9px;border:1px solid var(--border-soft);
  text-align:left;vertical-align:top;white-space:normal}
.msg .bubble .md-table th{background:var(--bg-sub);font-weight:600;color:var(--text-2);white-space:nowrap}
.msg .bubble a{color:var(--brand);text-decoration:none}
.msg .bubble a:hover{text-decoration:underline}
.msg .bubble strong{font-weight:600}
.msg .bubble> :last-child{margin-bottom:0}
/* AI 托管来源标签：与「已拦截」等状态标签同位置，暖色区分于普通标签 */
.tag-ai{background:var(--warn-surface);color:var(--warn)}
/* 下发回复未送达 / 重发按钮 */
.tag-unsent{background:var(--err-surface);color:var(--err)}
.msg-resend{padding:0 2px;border:0;background:none;color:var(--brand);font-size:11.5px;
  line-height:1.4;cursor:pointer}
.msg-resend:hover{text-decoration:underline}
.msg-resend:disabled{color:var(--text-3);cursor:default;text-decoration:none}
/* 旧版思考过程只有模型英文推理原文，无工具/知识库调用记录 */
.think-legacy{margin-left:6px;padding:0 5px;border-radius:4px;background:var(--bg-sub);
  color:var(--text-3);font-size:10.5px;font-weight:400}
/* 托管消息的思考过程：标题栏可点击，展开后按 Markdown 展示模型思考 */
.msg-think{margin-top:6px;width:100%;max-width:100%;border:1px dashed var(--border-1);
  border-radius:8px;background:var(--bg-base);overflow:hidden}
.msg.self .msg-think{align-self:stretch}
.think-hd{display:flex;align-items:center;gap:5px;width:100%;padding:6px 9px;border:0;
  background:none;color:var(--text-3);font-size:11.5px;line-height:1.4;cursor:pointer;text-align:left}
.think-hd:hover{color:var(--text-2);background:var(--bg-sub)}
.think-chev{width:12px;height:12px;flex:0 0 12px;fill:none;stroke:currentColor;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round;transition:transform .15s ease}
.msg-think.is-open .think-chev{transform:rotate(90deg)}
.think-none{color:var(--text-3);opacity:.8}
.think-bd{display:none;max-height:340px;overflow:auto;padding:6px 10px 10px;
  border-top:1px solid var(--border-soft);font-size:12.5px;line-height:1.7;color:var(--text-2);
  word-break:break-word}
.msg-think.is-open .think-bd{display:block}
.msg-think .md-p{margin:0 0 6px}
.msg-think .md-h{margin:8px 0 6px;font-weight:700;line-height:1.45;color:var(--text-1)}
.msg-think .md-h1{font-size:15px}
.msg-think .md-h2{font-size:14.5px}
.msg-think .md-h3{font-size:13.5px}
.msg-think .md-h4{font-size:13px}
.msg-think ul,.msg-think ol{margin:0 0 6px;padding-left:18px}
.msg-think ul{list-style:disc}
.msg-think ol{list-style:decimal}
.msg-think li{margin:2px 0;line-height:1.65}
.msg-think blockquote{margin:0 0 6px;padding:2px 0 2px 9px;border-left:3px solid var(--border-2);
  color:var(--text-2)}
.msg-think .md-code{margin:0 0 6px;padding:7px 9px;background:var(--bg-sub);border-radius:6px;
  overflow-x:auto;white-space:pre;font-size:11.5px;line-height:1.6}
.msg-think code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.msg-think :not(pre)>code{padding:1px 5px;background:var(--bg-sub);border-radius:4px;font-size:11.5px}
.msg-think .md-hr{margin:8px 0;border:0;border-top:1px dashed var(--border-1)}
.msg-think .md-table-wrap{margin:0 0 6px;max-width:100%;overflow-x:auto}
.msg-think .md-table{width:100%;border-collapse:collapse;font-size:11.5px;line-height:1.6}
.msg-think .md-table th,.msg-think .md-table td{padding:5px 8px;border:1px solid var(--border-soft);
  text-align:left;vertical-align:top;white-space:normal}
.msg-think .md-table th{background:var(--bg-sub);font-weight:600;color:var(--text-2);white-space:nowrap}
.msg-think a{color:var(--brand);text-decoration:none}
.msg-think a:hover{text-decoration:underline}
/* 系统/事件提示：对齐企微——中性灰、居中、时间在上，正文与时间留出呼吸间距 */
.msg-sys{display:flex;flex-direction:column;align-items:center;gap:10px;margin:6px 0 20px;padding:0}
.msg-sys.is-next{margin-top:0}
.msg-sys .sys-time{color:#a6a6a6;font-size:12px;line-height:1.4;letter-spacing:0}
.msg-sys .txt{max-width:min(660px,90%);text-align:center;color:#9b9b9b;font-size:12px;
  line-height:1.6;white-space:pre-wrap;word-break:break-word}
.msg-sys .sys-act{color:#1a6ff5;font-weight:400;cursor:default;text-decoration:underline;
  text-underline-offset:2px}
.msg-sys .sys-act:hover{color:#0d5fd6}
.msg-sys .sys-name{font-weight:400;color:inherit}
/* 登录操作通知：企微风格独立卡片，替代居中提示文本 */
.msg-notice{width:100%;max-width:520px;margin:0 auto 14px;padding:14px 16px 0;background:var(--bg-base);
  border:1px solid var(--border-1);border-radius:10px;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.msg-notice.nt-plain{padding-bottom:14px}
.msg-notice .nt-head{display:flex;align-items:baseline;gap:10px;margin-bottom:8px}
.msg-notice .nt-title{flex:1;min-width:0;font-size:14px;font-weight:600;color:var(--text-1);line-height:1.5}
.msg-notice .nt-time{flex:0 0 auto;font-size:11.5px;color:var(--text-3);font-variant-numeric:tabular-nums}
.msg-notice .nt-lead{margin:0 0 9px;font-size:13px;line-height:1.7;color:var(--text-2)}
.msg-notice .nt-rows{display:flex;flex-direction:column;gap:4px;margin-bottom:10px}
.msg-notice .nt-row{display:flex;gap:8px;font-size:12.5px;line-height:1.7}
.msg-notice .nt-row .k{flex:0 0 auto;color:var(--text-3)}
.msg-notice .nt-row .v{min-width:0;color:var(--text-1);word-break:break-word}
.msg-notice .nt-note{margin:0 0 12px;font-size:12.5px;line-height:1.7;color:var(--text-3)}
.msg-notice .nt-foot{display:flex;align-items:center;justify-content:space-between;margin:0 -16px;
  padding:10px 16px;border-top:1px solid var(--border-1);border-radius:0 0 10px 10px;
  font-size:12.5px;font-weight:600;color:var(--brand);text-decoration:none}
.msg-notice .nt-foot:hover{background:var(--brand-surface)}
.msg-notice .nt-foot svg{width:12px;height:12px;flex:0 0 auto}
/* 「邀请你加入群聊」：企微卡片，右侧群成员头像拼图 */
.join-card{display:flex;align-items:center;gap:12px;width:min(420px,100%);padding:12px 14px;
  background:var(--bg-base);border:1px solid var(--border-1);border-radius:10px;text-decoration:none;
  box-shadow:0 1px 2px rgba(15,23,42,.04);transition:border-color .15s,box-shadow .15s}
.join-card:hover{border-color:var(--brand);box-shadow:0 2px 10px rgba(15,23,42,.08)}
.join-card .jc-main{flex:1;min-width:0;display:block}
.join-card .jc-title{display:block;margin-bottom:3px;font-size:14px;font-weight:600;
  color:var(--text-1);line-height:1.5}
.join-card .jc-desc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  font-size:12.5px;line-height:1.65;color:var(--text-3)}
.join-card .jc-avt{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:1fr;gap:2px;
  flex:0 0 60px;width:60px;height:60px;border-radius:6px;overflow:hidden;background:var(--border-1)}
.join-card .jc-avt.g1{grid-template-columns:1fr}
.join-card .jc-avt.g3 .jc-cell:first-child{grid-row:span 2}
.join-card .jc-avt .jc-cell{position:relative;overflow:hidden;background:var(--bg-sub)}
.join-card .jc-avt .jc-cell img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.join-card .jc-avt.jc-fb{display:flex;align-items:center;justify-content:center;
  background:var(--brand-surface);color:var(--brand)}
.join-card .jc-avt.jc-fb svg{width:28px;height:28px;fill:none;stroke:currentColor;
  stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
/* 链接消息：对齐企微官方卡片，封面大图在上，标题与摘要在下，整卡约 300px 宽 */
.link-card{display:block;width:300px;max-width:100%;background:var(--bg-base);
  border:1px solid var(--border-1);border-radius:8px;overflow:hidden;text-decoration:none;
  box-shadow:0 1px 3px rgba(15,23,42,.06);transition:border-color .15s,box-shadow .15s}
.link-card:hover{border-color:var(--border-2);box-shadow:0 4px 14px rgba(15,23,42,.1)}
.link-card .lc-cover{display:block;width:100%;aspect-ratio:2/1;background:var(--bg-sub);overflow:hidden}
.link-card .lc-cover img{display:block;width:100%;height:100%;object-fit:cover}
.link-card .lc-body{display:block;padding:10px 12px 11px}
.link-card .lc-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  font-size:14px;font-weight:600;line-height:1.5;color:var(--text-1);word-break:break-word}
.link-card .lc-desc{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
  margin-top:4px;font-size:12.5px;line-height:1.6;color:var(--text-3);word-break:break-word}
/* 应用卡片（客户联系等）：灰色应用名头部 + 图标粗体正文 + 分隔线 + 提示与按钮，对齐企微原生卡片 */
.msg-card{width:min(340px,100%);background:var(--bg-base);border:1px solid var(--border-1);border-radius:8px;
  overflow:hidden;box-shadow:0 1px 3px rgba(15,23,42,.06)}
.msg-card .mc-head{padding:8px 12px;background:var(--bg-sub);color:var(--text-3);font-size:12px;
  line-height:1.5;border-bottom:1px solid var(--border-1)}
.msg-card .mc-body{display:flex;align-items:flex-start;gap:10px;padding:14px 14px 12px}
.msg-card .mc-icon{flex:0 0 36px;width:36px;height:36px;border-radius:8px;object-fit:cover;background:var(--bg-sub)}
.msg-card .mc-title{flex:1;min-width:0;font-size:14px;line-height:1.65;color:var(--text-1);word-break:break-word}
.msg-card .mc-foot{display:flex;align-items:center;gap:10px;padding:10px 14px;border-top:1px solid var(--border-soft)}
.msg-card .mc-tips{flex:1;min-width:0;color:var(--text-3);font-size:12px;line-height:1.5;word-break:break-word}
.msg-card .mc-btn{flex:0 0 auto;display:inline-flex;align-items:center;height:28px;padding:0 12px;
  border:1px solid var(--brand);border-radius:6px;color:var(--brand);font-size:12.5px;line-height:1;
  text-decoration:none;background:transparent;transition:background .15s,color .15s}
.msg-card .mc-btn:hover{background:var(--brand-surface)}
.msg-card .mc-btn.is-static{color:var(--text-3);border-color:var(--border-2);cursor:default}
.msg-card .mc-btn.is-static:hover{background:transparent}
.msg .bubble .mtag{display:inline-flex;align-items:center;height:19px;padding:0 6px;border-radius:5px;
  background:var(--bg-sub);color:var(--text-3);font-size:11px;font-weight:600;margin-right:6px}
.msg .bubble .blocked{color:var(--err);font-size:11.5px;font-weight:600;margin-left:6px}
.conv-more{display:flex;justify-content:center;padding:2px 0 14px}

/* ---------------- 图片 / 文件 / 语音消息 ---------------- */
.msg .msg-img{display:block;max-width:min(280px,100%);border:1px solid var(--border-1);
  border-radius:10px;overflow:hidden;background:var(--bg-base);line-height:0;
  transition:border-color .15s,box-shadow .15s}
.msg .msg-img:hover{border-color:var(--brand);box-shadow:0 2px 10px rgba(15,23,42,.08)}
.msg .msg-img img{display:block;max-width:100%;max-height:260px;object-fit:cover}
.msg .msg-emo{display:block;max-width:120px;max-height:120px}
/* 内置表情：纯表情消息放大展示，与文字混排时按行内小表情 */
.msg .msg-emo-big{font-size:36px;line-height:1.1;padding:1px 2px;user-select:none;
  font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif}
.msg .bubble .wx-emo{font-size:17px;line-height:1;vertical-align:-2px;
  font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif}
.msg .msg-emo-wrap{display:inline-flex;align-items:center}
.msg .msg-emo-wrap .msg-emo + .msg-emo-big,
.msg .msg-emo-wrap .msg-emo + .msg-emo-fb{display:none}
.msg .msg-emo-fb{font-size:12px;color:var(--text-3)}
.msg .msg-file{display:flex;align-items:center;gap:10px;width:min(380px,100%);padding:10px 12px;
  background:var(--bg-base);border:1px solid var(--border-1);border-radius:10px;
  box-shadow:0 1px 2px rgba(15,23,42,.04);transition:border-color .15s,box-shadow .15s}
.msg .msg-file:hover{border-color:var(--brand);box-shadow:0 2px 10px rgba(15,23,42,.08)}
.msg-file .mf-ico{flex:0 0 34px;width:34px;height:34px;border-radius:8px;background:var(--brand-surface);
  color:var(--brand);display:flex;align-items:center;justify-content:center}
.msg-file .mf-ico svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;
  stroke-linecap:round;stroke-linejoin:round}
.msg-file .mf-main{flex:1;min-width:0}
.msg-file .mf-name{display:block;font-size:13px;font-weight:600;color:var(--text-1);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.msg-file .mf-sub{display:block;margin-top:2px;font-size:11.5px;color:var(--text-3)}
.msg-file .mf-acts{flex:0 0 auto;display:flex;gap:6px}
.mf-btn{display:inline-flex;align-items:center;height:28px;padding:0 10px;border-radius:6px;
  border:1px solid var(--border-2);background:var(--bg-base);color:var(--text-2);font-size:12px;
  font-weight:600;cursor:pointer;text-decoration:none;white-space:nowrap;
  transition:border-color .15s,color .15s,background .15s}
.mf-btn:hover{border-color:var(--brand);color:var(--brand)}
.mf-btn.is-primary{background:var(--brand);border-color:var(--brand);color:#fff}
.mf-btn.is-primary:hover{background:var(--brand-strong,#0059c8);border-color:var(--brand-strong,#0059c8);
  color:#fff}
.msg .msg-voice{display:flex;flex-direction:column;gap:6px;max-width:min(360px,100%)}
.msg-voice .mv-bar{display:inline-flex;align-items:center;gap:7px;align-self:flex-start;height:34px;
  padding:0 12px;border-radius:10px;background:var(--bg-base);border:1px solid var(--border-1);
  color:var(--text-2)}
.msg-voice .mv-bar svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;
  stroke-linecap:round}
.msg-voice .mv-sec{font-size:12px;color:var(--text-3);font-variant-numeric:tabular-nums}
.msg-voice .mv-text{padding:8px 12px;background:var(--bg-base);border:1px solid var(--border-1);
  border-radius:10px;font-size:13px;line-height:1.7;color:var(--text-1);
  white-space:pre-wrap;word-break:break-word}
.msg-voice .mv-note{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;color:var(--text-3)}
.msg-voice .mv-note svg{width:12px;height:12px;fill:none;stroke:var(--ok);stroke-width:2.2;
  stroke-linecap:round;stroke-linejoin:round}
.msg-voice .mv-note.is-muted{color:var(--text-3);opacity:.8}
.msg.self .msg-voice .mv-bar{align-self:flex-end}

/* 附件预览弹层 */
.media-view{position:fixed;inset:0;z-index:120;display:flex;align-items:center;justify-content:center;
  padding:32px;background:rgba(15,23,42,.62);animation:mv-fade .16s ease}
@keyframes mv-fade{from{opacity:0}to{opacity:1}}
.media-view .mv-box{display:flex;flex-direction:column;width:min(920px,100%);max-height:100%;
  background:var(--bg-base);border-radius:12px;overflow:hidden;
  box-shadow:0 24px 64px rgba(15,23,42,.32)}
.media-view .mv-head{display:flex;align-items:center;gap:12px;padding:12px 16px;
  border-bottom:1px solid var(--border-1)}
.media-view .mv-title{flex:1;min-width:0;font-size:13.5px;font-weight:600;color:var(--text-1);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.media-view .mv-tools{flex:0 0 auto;display:flex;gap:8px}
.media-view .mv-body{flex:1;min-height:0;overflow:auto;display:flex;align-items:center;
  justify-content:center;padding:16px;background:var(--bg-sunken)}
.media-view .mv-body img{display:block;max-width:100%;max-height:72vh;border-radius:6px}
.media-view .mv-body pre{margin:0;width:100%;font-family:var(--mono);font-size:12.5px;line-height:1.7;
  white-space:pre-wrap;word-break:break-word;color:var(--text-1)}
.media-view .mv-hint{color:var(--text-3);font-size:13px;padding:24px}

/* ---------------- 抽屉（代理详情） ---------------- */
.drawer-mask{position:fixed;inset:0;background:rgba(15,23,42,.4);z-index:80;display:flex;justify-content:flex-end}
.drawer{width:760px;max-width:100%;height:100%;background:var(--bg-base);display:flex;flex-direction:column;
  box-shadow:-16px 0 40px rgba(15,23,42,.18);animation:drawer-in .22s ease}
@keyframes drawer-in{from{transform:translateX(24px);opacity:.6}to{transform:none;opacity:1}}
.drawer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 20px 12px;
  border-bottom:1px solid var(--border-soft)}
.drawer-head h3{margin:0;font-size:16px;font-weight:700}
.drawer-head .sub{color:var(--text-3);font-size:12.5px;margin-top:4px}
.drawer-tabs{display:flex;gap:20px;padding:0 20px;border-bottom:1px solid var(--border-1)}
.drawer-tab{padding:11px 2px;font-size:13.5px;font-weight:600;color:var(--text-3);cursor:pointer;
  border-bottom:2px solid transparent;margin-bottom:-1px}
.drawer-tab:hover{color:var(--text-1)}
.drawer-tab.is-active{color:var(--brand);border-bottom-color:var(--brand)}
.drawer-body{flex:1;overflow-y:auto;padding:16px 20px 24px;min-height:0}
.drawer-foot{padding:12px 20px;border-top:1px solid var(--border-soft);display:flex;justify-content:flex-end;gap:8px}

.shot-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.shot-stage{border:1px solid var(--border-1);border-radius:var(--r-sm);background:var(--bg-sub);overflow:hidden;
  display:flex;align-items:center;justify-content:center;min-height:220px}
.shot-stage img{max-width:100%;display:block}
.shot-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}
.shot-thumb{border:1px solid var(--border-1);border-radius:var(--r-sm);overflow:hidden;cursor:pointer;
  background:var(--bg-sub);position:relative}
.shot-thumb.is-active{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-surface)}
.shot-thumb img{width:100%;height:78px;object-fit:cover;display:block}
.shot-thumb .tm{position:absolute;left:0;right:0;bottom:0;padding:3px 6px;background:rgba(15,23,42,.55);
  color:#fff;font-size:10.5px;font-family:var(--mono)}

/* ---------------- 版本 ---------------- */
.rel-file{display:flex;align-items:center;gap:8px;border:1px dashed var(--border-2);border-radius:var(--r-sm);
  padding:10px 12px;background:var(--bg-sub);font-size:12.5px;color:var(--text-3)}
.rel-file .nm{color:var(--text-1);font-weight:600;font-family:var(--mono);font-size:12px}
.steps{display:flex;flex-direction:column;gap:0}
.step{display:flex;gap:10px;padding:9px 0;border-bottom:1px solid var(--border-soft)}
.step:last-child{border-bottom:none}
.step .dot{width:8px;height:8px;border-radius:50%;background:var(--border-2);margin-top:6px;flex:0 0 8px}
.step.ok .dot{background:var(--ok)}
.step.err .dot{background:var(--err)}
.step.run .dot{background:var(--brand)}
.step .txt{flex:1;min-width:0;font-size:12.5px;color:var(--text-2)}
.step .txt strong{display:block;color:var(--text-1);font-size:13px}
.step .tm{color:var(--text-3);font-size:11.5px;font-family:var(--mono);white-space:nowrap}

/* ---------------- 建设中占位 ---------------- */
.placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
  min-height:340px;text-align:center;color:var(--text-3)}
.placeholder .ph-ic{width:56px;height:56px;border-radius:16px;background:var(--brand-surface);color:var(--brand);
  display:flex;align-items:center;justify-content:center}
.placeholder .ph-ic svg{width:26px;height:26px;stroke:currentColor;fill:none;stroke-width:1.6;
  stroke-linecap:round;stroke-linejoin:round}
.placeholder h3{margin:0;font-size:15px;color:var(--text-1)}
.placeholder p{margin:0;font-size:13px;line-height:1.8;max-width:420px}

/* ---------------- 权限管理（组织 + 用户） ---------------- */
.pill-brand{background:var(--brand-surface);color:var(--brand)}
.perm-bar{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:14px}
.perm-bar .tabs{border-bottom:1px solid var(--border-1);margin-bottom:0;gap:22px}
.perm-bar .tab{padding:9px 2px;font-size:13.5px}
.perm-bar .toolbar{padding-bottom:7px}
.grid--perm{display:grid;grid-template-columns:288px minmax(0,1fr);gap:16px;align-items:stretch}
.grid--perm > .panel{min-height:0}
/* 左树/右表底部对齐：左侧内容区占满剩余高度，底注贴底；右侧按表格高度自然撑开 */
.grid--perm > .panel:first-child > .panel-body{flex:1;min-height:0}

/* 双栏面板：标题行 + 内容 + 底注，避免卡片内再套卡片 */
.panel{background:var(--bg-base);border:1px solid var(--border-1);border-radius:var(--r-md);
  box-shadow:var(--shadow-panel);overflow:hidden;display:flex;flex-direction:column;min-width:0}
.panel-head{display:flex;align-items:center;gap:10px;min-height:52px;padding:0 16px;
  background:var(--bg-base);border-bottom:1px solid var(--border-soft)}
.panel-head h3{margin:0;display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600;
  line-height:1.4;white-space:nowrap;color:var(--text-1)}
.panel-head h3::before{content:"";width:3px;height:14px;border-radius:2px;background:var(--brand);flex:0 0 3px}
.panel-meta{font-size:12px;color:var(--text-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}
.panel-head .toolbar{margin-left:auto;flex-wrap:nowrap}
.panel-body{padding:8px;min-width:0}
.panel-body.is-flush{padding:0}
.panel-body.is-scroll{max-height:calc(100vh - 268px);overflow-y:auto}
.panel-foot{padding:10px 16px;border-top:1px solid var(--border-soft);font-size:12px;color:var(--text-3);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.panel .search{width:200px}
.panel .search:hover,.panel .search:focus-within{width:240px}
.panel .pager{padding:10px 16px}

/* 组织树：行高固定，操作按钮悬停出现，标题不换行 */
.org-tree{display:flex;flex-direction:column;min-width:0}
.org-row{height:34px;padding:0 8px;gap:6px;border-radius:var(--r-sm);cursor:pointer}
.org-row .caret{width:16px;height:16px;flex:0 0 16px}
.org-row .caret svg{width:11px;height:11px}
.org-row .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:13px;font-weight:500;color:var(--text-1)}
.org-row.is-active .nm{color:var(--brand);font-weight:600}
.org-row__count{font-size:12px;color:var(--text-3);white-space:nowrap;font-family:var(--mono)}
.org-row__ops{display:flex;gap:2px;opacity:0;transition:opacity .15s}
.org-row:hover .org-row__ops,.org-row.is-active .org-row__ops{opacity:1}
.mini-btn{width:22px;height:22px;padding:0;border:0;background:transparent;border-radius:6px;
  color:var(--text-3);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.mini-btn svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}
.mini-btn:hover{background:var(--bg-hover);color:var(--text-1)}
.mini-btn.danger:hover{background:var(--err-surface);color:var(--err)}

/* 表格行内图标操作 */
.icon-btn{width:26px;height:26px;flex:0 0 26px;padding:0;border:0;background:transparent;border-radius:6px;
  color:var(--text-3);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;
  transition:background .15s,color .15s}
.icon-btn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.7;
  stroke-linecap:round;stroke-linejoin:round}
.icon-btn:hover{background:var(--bg-hover);color:var(--brand)}
.icon-btn.danger:hover{background:var(--err-surface);color:var(--err)}
.perm-ops{display:flex;align-items:center;justify-content:flex-end;gap:2px}
.perm-ops .btn-link{margin:0;font-size:12.5px}
/* 行内操作统一用中文文字按钮，避免只有图标难以辨认 */
.perm-ops .op-text{height:26px;padding:0 6px;border:0;border-radius:6px;background:transparent;
  color:var(--text-2);font-size:12px;line-height:26px;font-family:inherit;cursor:pointer;
  white-space:nowrap;transition:background .15s,color .15s}
.perm-ops .op-text:hover{background:var(--brand-surface);color:var(--brand)}
.perm-ops .op-text.danger:hover{background:var(--err-surface);color:var(--err)}
.perm-table{min-width:924px}
.perm-table td{white-space:nowrap}

.switch{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;color:var(--text-3);
  cursor:pointer;white-space:nowrap}
.switch input{position:absolute;opacity:0;pointer-events:none}
.switch i{width:32px;height:18px;border-radius:999px;background:var(--border-2);position:relative;
  transition:background .15s}
.switch i::after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;
  background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.25);transition:left .15s}
.switch input:checked+i{background:var(--brand)}
.switch input:checked+i::after{left:16px}

/* 数据权限规则 */
.perm-preview{display:grid;grid-template-columns:264px minmax(0,1fr);min-height:460px}
.perm-preview__side{padding:12px;border-right:1px solid var(--border-1);
  display:flex;flex-direction:column;gap:10px;min-width:0}
.perm-preview__side .search,.perm-preview__side .search:hover,.perm-preview__side .search:focus-within{width:100%}
.perm-preview__list{display:flex;flex-direction:column;min-width:0;max-height:520px;overflow-y:auto}
.perm-preview__main{padding:16px 20px;min-width:0}
.perm-node{display:flex;align-items:center;gap:8px;height:32px;padding:0 8px;border-radius:var(--r-sm);
  font-size:13px;cursor:pointer;min-width:0}
.perm-node:hover{background:var(--bg-hover)}
.perm-node .dot{width:7px;height:7px;border-radius:50%;background:var(--border-2);flex:0 0 7px}
.perm-node .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-1)}
.perm-node .mk{font-size:12px;color:var(--text-3);white-space:nowrap}
.perm-node.is-active{background:var(--bg-active)}
.perm-node.is-active .nm{color:var(--brand);font-weight:600}
.perm-node.is-visible .dot{background:var(--ok)}
.perm-node.is-hidden{opacity:.45}
.perm-node.is-hidden .dot{background:var(--border-2)}
.perm-node.is-static{cursor:default}
.perm-node.is-static:hover{background:transparent}

.perm-id{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.perm-id__name{font-size:16px;font-weight:600;line-height:1.3}
.perm-id__meta{font-size:12.5px;color:var(--text-3);margin-top:4px}
.perm-stats{display:grid;grid-template-columns:repeat(2,minmax(0,220px));gap:10px;margin:14px 0 4px}
.perm-stat{border:1px solid var(--border-1);border-radius:var(--r-sm);padding:10px 12px;background:var(--bg-sub)}
.perm-stat .k{font-size:12px;color:var(--text-3)}
.perm-stat .v{font-size:20px;font-weight:700;line-height:1.25;margin-top:2px}
.perm-stat .v i{font-size:12px;font-style:normal;font-weight:500;color:var(--text-3);margin-left:2px}
.perm-sec{margin-top:18px}
.perm-sec__head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.perm-sec__head h4{margin:0;font-size:12.5px;font-weight:600;color:var(--text-2)}
.perm-sec__head span{font-size:12px;color:var(--text-3)}
.perm-agents{display:flex;flex-wrap:wrap;gap:6px}

@media (max-width:1180px){
  .grid--perm{grid-template-columns:minmax(0,1fr)}
  .perm-preview{grid-template-columns:minmax(0,1fr)}
  .perm-preview__side{border-right:0;border-bottom:1px solid var(--border-1)}
}

/* ---------------- 全站页脚 ---------------- */
.site-foot{flex:0 0 auto;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;
  padding:10px 24px;background:var(--bg-base);border-top:1px solid var(--border-1);
  color:var(--text-3);font-size:12px;line-height:1.6}
.site-foot a{color:var(--text-3)}
.site-foot a:hover{color:var(--brand)}
.foot-sep{width:1px;height:11px;background:var(--border-2);flex:0 0 1px}
.login-site-foot{margin-top:16px;padding:12px 0 0;background:transparent;border-top:1px solid var(--border-soft);
  font-size:11.5px;gap:8px}

/* ---------------- 设置页 ---------------- */
.set-layout{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:16px;align-items:start}
.set-layout .panel{min-width:0}
.set-layout .panel-body{padding:16px}
.set-layout .field{margin-bottom:18px}
.set-layout .field:last-of-type{margin-bottom:12px}
.set-layout .field .row .input{flex:1;min-width:0}
.foot-preview{display:flex;flex-direction:column;justify-content:center;min-height:104px;padding:18px 12px;
  background:var(--bg-sunken);border:1px dashed var(--border-2);border-radius:var(--r-sm)}
.foot-preview .site-foot{padding:0;background:transparent;border-top:0;font-size:11.5px;gap:8px}
.foot-empty{color:var(--text-3);font-size:12px;text-align:center;line-height:1.7}
@media (max-width:1180px){
  .set-layout{grid-template-columns:minmax(0,1fr)}
}

/* 设置页一级分类（品牌信息 / 页脚信息），沿用全局 .tab 外观 */
.set-tabs{display:flex;gap:22px;border-bottom:1px solid var(--border-1);margin-bottom:16px}

/* 品牌表单：Logo / 浏览器图标上传、背景选择 */
.brand-row{display:flex;align-items:center;gap:14px}
.brand-thumb{width:56px;height:56px;flex:0 0 56px;border-radius:14px;border:1px dashed var(--border-2);
  background:var(--bg-sub);display:flex;align-items:center;justify-content:center;overflow:hidden;
  font-weight:800;font-size:18px;color:var(--brand)}
.brand-thumb.is-favicon{width:40px;height:40px;flex:0 0 40px;border-radius:10px;font-size:14px}
.brand-thumb img{width:100%;height:100%;object-fit:contain}
.brand-ops{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.brand-ops .file-name{font-size:12px;color:var(--text-3);max-width:200px;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.bg-picks{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.bg-pick{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:999px;
  border:1px solid var(--border-1);font-size:12.5px;color:var(--text-2);cursor:pointer;user-select:none}
.bg-pick:hover{border-color:var(--brand-line);color:var(--text-1)}
.bg-pick input{position:absolute;opacity:0;pointer-events:none}
.bg-pick.is-on{background:var(--brand-surface);border-color:var(--brand-line);color:var(--brand);font-weight:600}
.bg-pick .dot{width:12px;height:12px;border-radius:50%;border:1px solid var(--border-2);flex:0 0 12px}

/* 登录页预览：左侧品牌区 + 右侧登录卡片 */
.login-preview{position:relative;display:flex;min-height:356px;border-radius:var(--r-md);overflow:hidden;
  background:var(--brand);color:#fff;border:1px solid var(--border-1)}
.login-preview .login-preview__bg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0}
.login-preview.has-media::before{content:"";position:absolute;inset:0;z-index:0;
  background:linear-gradient(135deg,rgba(3,24,58,.62),rgba(3,40,96,.34))}
.login-preview__brand{position:relative;z-index:1;flex:1;min-width:0;padding:20px 18px;
  display:flex;flex-direction:column;justify-content:center;gap:10px}
.login-preview__brand .mark{width:38px;height:38px;border-radius:11px;background:rgba(255,255,255,.16);
  display:flex;align-items:center;justify-content:center;font-weight:800;font-size:14px;overflow:hidden}
.login-preview__brand .mark img{width:100%;height:100%;object-fit:contain}
.login-preview__brand h1{margin:0;font-size:16px;font-weight:800;line-height:1.4}
.login-preview__brand p{margin:0;font-size:11px;line-height:1.7;color:rgba(255,255,255,.88)}
.login-preview__brand ul{margin:2px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px;
  font-size:10.5px;color:rgba(255,255,255,.92)}
.login-preview__brand li{display:flex;align-items:center;gap:6px}
.login-preview__brand li::before{content:"";width:4px;height:4px;border-radius:50%;
  background:var(--brand-line);flex:0 0 4px}
.login-preview__panel{position:relative;z-index:1;width:46%;flex:0 0 46%;background:var(--bg-base);
  color:var(--text-1);padding:18px 14px;display:flex;flex-direction:column;justify-content:center;gap:5px}
.login-preview__panel h2{margin:0;font-size:13px;font-weight:700}
.login-preview__panel .sub{margin:0;font-size:10px;color:var(--text-3)}

/* ---------------- P2：模型 / 知识库 / Skill / 智能体 ---------------- */
.code-box{margin:0;padding:10px 12px;background:var(--bg-sunken);border:1px solid var(--border-soft);
  border-radius:var(--r-sm);font-family:var(--mono);font-size:12px;line-height:1.65;color:var(--text-2);
  white-space:pre-wrap;word-break:break-all;max-height:240px;overflow:auto}
.drawer.is-wide{width:1000px}

/* 用量：每日 token 柱状 */
.md-bars{display:flex;align-items:flex-end;gap:8px;height:168px;padding:14px 14px 0;
  border-bottom:1px solid var(--border-soft)}
.md-bar{position:relative;flex:1;min-width:10px;height:100%;padding-bottom:20px;
  display:flex;flex-direction:column;justify-content:flex-end}
.md-bar i{display:block;width:100%;max-width:26px;margin:0 auto;background:var(--brand);
  border-radius:4px 4px 0 0;min-height:3px;transition:opacity .15s}
.md-bar:hover i{opacity:.75}
.md-bar span{position:absolute;left:0;right:0;bottom:2px;text-align:center;font-size:10.5px;
  color:var(--text-3);white-space:nowrap;overflow:hidden}

/* 账号授权：左侧模型列表 / 右侧授权明细 */
.grant-list{display:flex;flex-direction:column;gap:6px}
.grant-item{display:block;width:100%;text-align:left;padding:9px 10px;background:var(--bg-base);
  border:1px solid var(--border-soft);border-radius:var(--r-sm);cursor:pointer;font-family:inherit;
  transition:border-color .15s,background .15s}
.grant-item:hover{border-color:var(--brand-line)}
.grant-item.is-on{border-color:var(--brand);background:var(--brand-surface)}
.grant-item .gi-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.grant-item .gi-top strong{font-size:13px;font-weight:600;color:var(--text-1);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.grant-item .gi-sub{display:block;margin-top:4px;font-size:12px;color:var(--text-3);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.grant-form-block{margin-top:16px;padding-top:14px;border-top:1px solid var(--border-soft)}
.grant-form-block h4{margin:0 0 10px;font-size:13px;font-weight:600;color:var(--text-1)}
.grant-form{display:grid;grid-template-columns:1.1fr .8fr .8fr 1fr auto;gap:12px;align-items:end}
@media (max-width:1080px){.grant-form{grid-template-columns:1fr 1fr}}

/* 模型编辑弹框：渠道卡片 / 接入方式 / ep- 前缀 / 摘要 / 就地帮助 */
.mdx-sec{margin-bottom:14px}
.mdx-label{display:flex;align-items:center;gap:6px;margin-bottom:6px;
  font-size:12.5px;font-weight:600;color:var(--text-2)}
.mdx-q{width:14px;height:14px;flex:0 0 14px;border-radius:50%;border:1px solid var(--border-2);
  color:var(--text-3);font-size:9px;display:inline-flex;align-items:center;justify-content:center;cursor:help}
.mdx-ch-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.mdx-ch{display:flex;gap:10px;align-items:flex-start;width:100%;text-align:left;padding:10px 12px;
  border:1px solid var(--border-1);border-radius:var(--r-sm);background:var(--bg-base);
  cursor:pointer;font-family:inherit;transition:border-color .15s,background .15s}
.mdx-ch:hover{border-color:var(--brand-line)}
.mdx-ch.is-on{border-color:var(--brand);background:var(--brand-surface)}
.mdx-ch .ico{width:28px;height:28px;flex:0 0 28px;border-radius:8px;border:1px solid var(--border-soft);
  background:var(--bg-sub);color:var(--text-2);display:flex;align-items:center;justify-content:center}
.mdx-ch.is-on .ico{background:var(--bg-base);border-color:var(--brand-line);color:var(--brand)}
.mdx-ch .ico svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round}
.mdx-ch .nm{display:block;font-size:13px;font-weight:600;color:var(--text-1);line-height:1.4}
.mdx-ch .ds{display:block;margin-top:2px;font-size:12px;color:var(--text-3);line-height:1.5}
.mdx-seg{display:inline-flex;gap:2px;padding:2px;border-radius:var(--r-sm);
  background:var(--bg-sub);border:1px solid var(--border-soft)}
.mdx-seg button{height:28px;padding:0 12px;border:0;border-radius:6px;background:transparent;
  color:var(--text-2);font-size:12px;font-weight:600;font-family:inherit;cursor:pointer}
.mdx-seg button.is-on{background:var(--bg-base);color:var(--brand);box-shadow:0 1px 2px rgba(17,24,39,.08)}
.mdx-pfx{display:flex;align-items:stretch;border:1px solid var(--border-1);border-radius:var(--r-sm);
  background:var(--bg-base);overflow:hidden}
.mdx-pfx:focus-within{border-color:var(--brand);box-shadow:0 0 0 3px rgba(0,111,239,.12)}
.mdx-pfx.is-bad{border-color:var(--err);box-shadow:0 0 0 3px rgba(217,48,54,.10)}
.mdx-pfx .p{display:flex;align-items:center;padding:0 10px;border-right:1px solid var(--border-1);
  background:var(--bg-sub);font-family:var(--mono);font-size:12px;color:var(--text-2);white-space:nowrap}
.mdx-pfx .input{border:0;border-radius:0;box-shadow:none!important;flex:1;min-width:0}
.mdx-sum{display:grid;gap:7px;padding:9px 11px;border:1px solid var(--border-soft);
  border-radius:var(--r-sm);background:var(--bg-sub)}
.mdx-sum .r{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.mdx-sum .k{font-size:12px;color:var(--text-3);min-width:40px}
.mdx-chip{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 8px;border-radius:6px;
  background:var(--bg-base);border:1px solid var(--border-soft);font-size:12px;color:var(--text-2)}
.mdx-chip b{font-weight:600;color:var(--text-1)}
.mdx-chip.is-brand{background:var(--brand-surface);border-color:var(--brand-line);color:var(--brand)}
.mdx-chip.is-brand b{color:var(--brand)}
.mdx-help{padding:11px 12px;border:1px solid var(--brand-line);border-radius:var(--r-sm);
  background:var(--bg-base)}
.mdx-help .t{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:var(--brand)}
.mdx-help .t svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.9}
.mdx-help ol{margin:8px 0 0;padding:0;list-style:none;display:grid;gap:7px}
.mdx-help li{display:flex;gap:8px;align-items:flex-start;font-size:12px;color:var(--text-2);line-height:1.65}
.mdx-help .n{width:16px;height:16px;flex:0 0 16px;margin-top:1px;border-radius:50%;
  border:1px solid var(--brand-line);background:var(--bg-base);color:var(--brand);
  display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700}
.mdx-help a{color:var(--brand);font-weight:600;text-decoration:none}
.mdx-help a:hover{text-decoration:underline}
.mdx-code{font-family:var(--mono);font-size:11.5px;background:var(--bg-sub);border:1px solid var(--border-soft);
  border-radius:4px;padding:1px 5px;color:var(--text-2)}
.mdx-err{display:none;margin-top:6px;font-size:12px;line-height:1.6;color:var(--err)}
.mdx-err.is-on{display:block}
.mdx-adv{border:1px solid var(--border-soft);border-radius:var(--r-sm);background:var(--bg-base)}
.mdx-adv summary{list-style:none;cursor:pointer;padding:9px 12px;font-size:12px;font-weight:600;
  color:var(--text-2);display:flex;align-items:center;gap:8px;user-select:none}
.mdx-adv summary::-webkit-details-marker{display:none}
.mdx-adv summary .arw{color:var(--text-3);font-size:10px;transition:transform .18s}
.mdx-adv[open] summary .arw{transform:rotate(90deg)}
.mdx-adv .adv-body{display:grid;grid-template-columns:1fr 1fr;gap:0 14px;padding:2px 12px 12px}
@media (max-width:620px){.mdx-ch-grid{grid-template-columns:1fr}
  .mdx-adv .adv-body{grid-template-columns:1fr}}

/* 使用密钥：可关键词搜索的下拉（复用 .sel-btn / .sel-pop 外观） */
.mdx-keywrap{width:100%}
.mdx-keypop{padding:6px;max-height:none;overflow:visible}
.mdx-keysearch{margin:0 0 6px}
.mdx-keysearch .input{height:30px;font-size:12.5px}
.mdx-keylist{max-height:212px;overflow-y:auto}
.mdx-keypop .sel-opt{white-space:normal}
.mdx-keypop .sel-opt .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mdx-keypop .sel-opt .meta{flex:0 0 auto;color:var(--text-3);font-size:12px}
.mdx-keypop .sel-opt.mdx-keynew .nm{color:var(--brand)}
.mdx-keynone{padding:9px 10px;font-size:12px;color:var(--text-3)}

/* 知识库：分块预览 */
.kb-chunk{margin-bottom:8px;padding:8px 10px;background:var(--bg-base);
  border:1px solid var(--border-soft);border-radius:var(--r-sm)}
.kb-chunk:last-child{margin-bottom:0}
.kb-chunk-h{margin-bottom:4px;font-size:11.5px;font-weight:600;color:var(--text-3)}
.kb-chunk-b{font-size:12.5px;line-height:1.75;color:var(--text-2);
  white-space:pre-wrap;word-break:break-all;max-height:170px;overflow:auto}

/* 运营中心：左（会话 + 定时报告）/ 中（对话）/ 右（经营概览 + 群清单） */
.cp-work{display:grid;grid-template-columns:264px minmax(0,1fr) 344px;gap:14px;
  height:calc(100vh - 196px);min-height:540px}
.cp-side,.cp-main,.cp-pod{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.cp-side .panel-head,.cp-main .panel-head,.cp-pod .panel-head{flex:0 0 auto;
  border-bottom:1px solid var(--border-soft)}
.cp-search{flex:0 0 auto;padding:10px 12px;border-bottom:1px solid var(--border-soft)}
.cp-search .input{height:32px;font-size:12px}
.cp-sessions{flex:1;min-height:0;overflow-y:auto;padding:0}
.cp-sess{position:relative;padding:9px 12px 10px;border-bottom:1px solid var(--border-soft);cursor:pointer;
  transition:background .15s}
.cp-sess:hover{background:var(--bg-hover)}
.cp-sess.is-active{background:var(--bg-active);box-shadow:inset 3px 0 0 var(--brand)}
/* 行内操作：悬停才出现，避免列表显得嘈杂 */
.cp-sess-ops{position:absolute;right:6px;top:6px;display:flex;gap:2px;opacity:0;transition:.15s}
.cp-sess:hover .cp-sess-ops,.cp-sess.is-active .cp-sess-ops{opacity:1}
.cp-sess-ops button{width:22px;height:22px;padding:0;border:0;border-radius:5px;background:var(--bg-base);
  color:var(--text-3);cursor:pointer;display:flex;align-items:center;justify-content:center}
.cp-sess-ops button:hover{background:var(--bg-sub);color:var(--brand)}
.cp-sess-ops button[data-act="del"]:hover{color:var(--err)}
.cp-sess-ops svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.7}
.cp-sess-t{display:flex;align-items:center;gap:5px;font-size:12.5px;font-weight:600;color:var(--text-1);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cp-sess-pin{display:inline-flex;flex:0 0 auto;width:12px;height:12px;color:var(--brand)}
.cp-sess-pin svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:1.8}
.cp-sess-t .tag{flex:0 0 auto;height:17px;padding:0 6px;font-size:10.5px}
.cp-sess-p{margin-top:3px;font-size:11.5px;color:var(--text-3);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cp-sess-m{display:flex;justify-content:space-between;gap:8px;margin-top:5px;
  font-size:11px;color:var(--text-3)}
.cp-chat{flex:1;min-height:0;overflow-y:auto;padding:16px 18px;background:var(--bg-sunken)}
.cp-chat:has(> .cp-welcome){display:flex;align-items:center;justify-content:center}
.cp-welcome{width:min(560px,100%);padding:24px;text-align:center;background:var(--bg-base);
  border:1px solid var(--border-1);border-radius:var(--r-md)}
.cp-welcome-ic{width:46px;height:46px;margin:0 auto 12px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;background:var(--brand-surface);color:var(--brand)}
.cp-welcome-ic svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.8}
.cp-welcome strong{display:block;margin-bottom:6px;font-size:15px}
.cp-welcome p{margin:0 0 14px;font-size:12.5px;line-height:1.75;color:var(--text-3)}
.cp-sugs{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.cp-composer .cp-sugs{justify-content:flex-start;margin-bottom:8px}
.cp-sug{padding:6px 12px;border:1px solid var(--border-1);border-radius:999px;background:var(--bg-base);
  color:var(--text-2);font-size:12px;font-family:inherit;cursor:pointer;transition:.15s}
.cp-sug:hover{border-color:var(--brand);color:var(--brand);background:var(--brand-surface)}
.cp-composer{flex:0 0 auto;padding:12px 16px 14px;background:var(--bg-base);
  border-top:1px solid var(--border-soft)}
.cp-composer textarea{resize:none}
.cp-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}
.cp-msg .wrap{max-width:min(760px,86%)}
/* 回复正文是 Markdown 渲染后的结构，气泡内按普通排版而非保留原始换行 */
.cp-msg .bubble{white-space:normal}
/* 单条消息删除：悬停消息时出现 */
.cp-msg .meta .cp-msg-del{width:20px;height:20px;margin-left:2px;padding:0;border:0;background:transparent;
  color:var(--text-3);cursor:pointer;opacity:0;transition:.15s;
  display:inline-flex;align-items:center;justify-content:center}
.cp-msg-del svg{width:12.5px;height:12.5px;stroke:currentColor;fill:none;stroke-width:1.7}
.cp-msg:hover .cp-msg-del{opacity:1}
.cp-msg-del:hover{color:var(--err)}
.cp-pending{display:inline-flex;align-items:center;gap:8px;color:var(--text-3)}
.cp-pending i{width:12px;height:12px;border-radius:50%;border:2px solid var(--brand-line);
  border-top-color:var(--brand);animation:cp-spin .8s linear infinite}
@keyframes cp-spin{to{transform:rotate(360deg)}}
.cp-steps{margin-top:8px;background:var(--bg-base);border:1px solid var(--border-1);
  border-radius:var(--r-sm);overflow:hidden}
.cp-steps summary{display:flex;align-items:center;gap:8px;padding:7px 12px;
  font-size:12px;color:var(--text-2);cursor:pointer;user-select:none}
.cp-steps[open] summary{border-bottom:1px solid var(--border-soft)}
.cp-step-list{padding:8px 12px 10px}
.cp-step{padding:8px 0;border-bottom:1px dashed var(--border-soft)}
.cp-step:last-child{border-bottom:0}
.cp-step-h{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.cp-step-n{width:18px;height:18px;border-radius:50%;background:var(--bg-sub);color:var(--text-3);
  font-size:11px;display:flex;align-items:center;justify-content:center}
.cp-step-k{margin:6px 0 4px;font-size:11px;color:var(--text-3)}
.cp-step-out{max-height:200px}
.cp-refs{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px}
.cp-refs-h{font-size:11px;color:var(--text-3)}
.cp-ref{padding:2px 8px;border-radius:5px;background:var(--bg-sub);color:var(--text-3);font-size:11px}

/* 定时报告：左栏卡片（开关 + 频率 + 一句话说明），点击卡片弹出历次报告 */
.cp-sched{flex:0 0 auto;max-height:48%;display:flex;flex-direction:column;
  border-top:1px solid var(--border-1);background:var(--bg-sunken)}
.cp-sched-h{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;
  padding:9px 12px 7px;font-size:12px;font-weight:600;color:var(--text-2)}
.cp-sched-h .btn-link{font-size:11.5px}
.cp-sched-list{flex:1;min-height:0;overflow-y:auto;padding:0 10px 10px;
  display:flex;flex-direction:column;gap:7px}
.cp-sched-empty{padding:2px 12px 12px;font-size:11px;line-height:1.7;color:var(--text-3)}
.cp-sched-card{padding:9px 11px;border:1px solid var(--border-soft);border-radius:var(--r-sm);
  background:var(--bg-base);cursor:pointer;transition:.15s}
.cp-sched-card:hover{border-color:var(--brand-line);box-shadow:0 1px 6px rgba(0,111,239,.08)}
.cp-sched-card.is-off .cp-sched-name{color:var(--text-3)}
.cp-sched-t{display:flex;align-items:center;gap:6px}
.cp-sched-name{flex:1;min-width:0;font-size:12.5px;font-weight:600;color:var(--text-1);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cp-sched-sw{flex:0 0 auto;margin-left:auto;gap:0}
.cp-sched-f{display:flex;align-items:center;gap:6px;margin-top:3px;
  font-size:11px;line-height:1.55;color:var(--text-3)}
.cp-sched-f i{width:1px;height:9px;background:var(--border-1)}
.cp-sched-d{margin-top:4px;font-size:11px;line-height:1.6;color:var(--text-2);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cp-sched-ops{display:flex;flex-wrap:wrap;gap:2px 9px;margin-top:6px;
  opacity:0;transition:opacity .15s}
.cp-sched-card:hover .cp-sched-ops,.cp-sched-card:focus-within .cp-sched-ops{opacity:1}
@media (hover:none){.cp-sched-ops{opacity:1}}
.cp-sched-ops button{border:0;background:none;padding:0;color:var(--brand);font-size:11px;
  font-family:inherit;cursor:pointer}
.cp-sched-ops button:hover{text-decoration:underline}
.cp-sched-ops button.danger{color:var(--err)}
.cp-sched-ops button:disabled{opacity:.5;cursor:not-allowed;text-decoration:none}

/* 报告弹框：历次生成记录 */
.cp-rpt{display:flex;flex-direction:column;gap:6px;max-height:52vh;overflow-y:auto;padding:2px}
.cp-rpt-empty{padding:26px 8px;text-align:center;font-size:12px;line-height:1.9;color:var(--text-3)}
.cp-rpt-row{display:flex;align-items:center;gap:10px;width:100%;padding:9px 11px;
  border:1px solid var(--border-soft);border-radius:var(--r-sm);background:var(--bg-base);
  cursor:pointer;text-align:left;font-family:inherit;transition:.15s}
.cp-rpt-row:hover{border-color:var(--brand-line);background:var(--bg-hover);
  box-shadow:0 1px 6px rgba(0,111,239,.08)}
.cp-rpt-ic{flex:0 0 auto;width:28px;height:28px;border-radius:7px;background:var(--brand-surface);
  color:var(--brand);display:flex;align-items:center;justify-content:center}
.cp-rpt-ic svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8}
.cp-rpt-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.cp-rpt-main .t{font-size:12.5px;font-weight:600;color:var(--text-1);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cp-rpt-main .p{font-size:11.5px;color:var(--text-3);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cp-rpt-meta{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:2px;
  font-size:11px;color:var(--text-3);white-space:nowrap}
.cp-rpt-meta em{font-style:normal;color:var(--err);font-weight:600}

/* 报告详情页 */
.cp-report{display:flex;flex-direction:column;height:calc(100vh - 196px);min-height:520px}
.cp-report-hd{flex:0 0 auto;display:flex;align-items:center;gap:12px;padding:12px 16px;
  border-bottom:1px solid var(--border-1)}
.cp-report-title{flex:1;min-width:0}
.cp-report-title h3{margin:0;font-size:15px;font-weight:700;color:var(--text-1);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cp-report-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:3px;
  font-size:11px;color:var(--text-3)}
.cp-report-meta i{width:1px;height:9px;background:var(--border-1)}
.cp-report-meta em{font-style:normal;color:var(--err);font-weight:600}
.cp-report-body{flex:1;min-height:0;overflow-y:auto;width:100%;max-width:860px;margin:0 auto;
  padding:20px 28px 36px;font-size:13px;line-height:1.8;color:var(--text-2)}
.cp-report-err{padding:10px 12px;border:1px solid var(--err-line,rgba(229,72,77,.35));
  border-radius:var(--r-sm);background:rgba(229,72,77,.06);color:var(--err);font-size:12px}
.cp-report-body .md-p{margin:0 0 10px}
.cp-report-body .md-h{margin:18px 0 8px;font-weight:700;line-height:1.45;color:var(--text-1)}
.cp-report-body .md-h1{font-size:18px}
.cp-report-body .md-h2{font-size:16px}
.cp-report-body .md-h3{font-size:14.5px}
.cp-report-body .md-h4{font-size:13.5px}
.cp-report-body ul,.cp-report-body ol{margin:0 0 10px;padding-left:22px}
.cp-report-body ul{list-style:disc}
.cp-report-body ol{list-style:decimal}
.cp-report-body li{margin:4px 0}
.cp-report-body blockquote{margin:0 0 10px;padding:4px 0 4px 12px;
  border-left:3px solid var(--brand-line);color:var(--text-2);background:var(--brand-surface)}
.cp-report-body .md-code{margin:0 0 10px;padding:10px 12px;background:var(--bg-sub);
  border-radius:6px;overflow-x:auto;white-space:pre;font-size:12.5px;line-height:1.6}
.cp-report-body code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.cp-report-body :not(pre)>code{padding:1px 5px;background:var(--bg-sub);border-radius:4px}
.cp-report-body .md-hr{margin:14px 0;border:0;border-top:1px dashed var(--border-1)}
.cp-report-body .md-table-wrap{margin:0 0 12px;max-width:100%;overflow-x:auto}
.cp-report-body .md-table{width:100%;border-collapse:collapse;font-size:12.5px;line-height:1.6}
.cp-report-body .md-table th,.cp-report-body .md-table td{padding:6px 9px;
  border:1px solid var(--border-soft);text-align:left;vertical-align:top;white-space:normal}
.cp-report-body .md-table th{background:var(--bg-sub);font-weight:600;color:var(--text-2);
  white-space:nowrap}
.cp-report-body a{color:var(--brand);text-decoration:none}
.cp-report-body a:hover{text-decoration:underline}

/* 右栏：经营概览 + 群清单 */
.cp-pod-ctl{flex:0 0 auto;display:flex;gap:6px;padding:10px 12px;
  border-bottom:1px solid var(--border-soft)}
.cp-pod-ctl .input{flex:1;min-width:0;height:30px;font-size:11.5px;padding:0 6px}
.cp-pod-body{flex:1;min-height:0;overflow-y:auto}
.cp-kpis{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px}
.cp-kpi{padding:9px 11px;border:1px solid var(--border-soft);border-radius:var(--r-sm);
  background:var(--bg-base);cursor:default}
.cp-kpi-h{display:flex;align-items:center;gap:6px}
.cp-kpi-ic{flex:0 0 auto;width:22px;height:22px;border-radius:6px;background:var(--brand-surface);
  color:var(--brand);display:flex;align-items:center;justify-content:center}
.cp-kpi-ic svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.8}
.cp-kpi .l{min-width:0;font-size:11.5px;color:var(--text-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cp-kpi .n{margin-top:5px;font-size:21px;font-weight:800;letter-spacing:-.5px;color:var(--text-1);line-height:1.2}
.cp-kpi .n i{margin-left:3px;font-size:11px;font-weight:600;font-style:normal;color:var(--text-3)}
.cp-kpi .m{margin-top:2px;font-size:11px;color:var(--text-3);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* 可跳转卡片（如「新增商机」进入获客模块）：仅这类卡片给手型与悬浮反馈 */
.cp-kpi.is-click{cursor:pointer;transition:border-color .15s,box-shadow .15s,background .15s}
.cp-kpi.is-click:hover{border-color:var(--brand-line);background:var(--bg-tint);
  box-shadow:0 2px 10px rgba(0,111,239,.10)}
/* 四维配色：与 demo 一致（蓝 / 橙 / 绿 / 红），图标底色跟随数字色系 */
.cp-kpi.tone-blue .n{color:#006fef}
.cp-kpi.tone-blue .cp-kpi-ic{background:#e8f1ff;color:#006fef}
.cp-kpi.tone-orange .n{color:#f08a24}
.cp-kpi.tone-orange .cp-kpi-ic{background:#fff3e4;color:#f08a24}
.cp-kpi.tone-green .n{color:#12a150}
.cp-kpi.tone-green .cp-kpi-ic{background:#e8f8ee;color:#12a150}
.cp-kpi.tone-red .n{color:#e5484d}
.cp-kpi.tone-red .cp-kpi-ic{background:#fdecec;color:#e5484d}
.cp-src{margin:0 12px 10px;padding:6px 9px;border-radius:var(--r-sm);background:var(--brand-surface);
  color:var(--brand);font-size:11px;line-height:1.6}
.cp-groups-h{display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:9px 12px 6px;font-size:12px;font-weight:600;color:var(--text-2)}
.cp-groups-sub{font-size:10.5px;font-weight:400;color:var(--text-3)}
/* 外部会话切换：群聊 / 单聊 两段式 */
.cp-seg{display:flex;gap:2px;margin:0 12px 8px;padding:2px;background:var(--bg-hover);
  border-radius:var(--r-sm)}
.cp-seg button{flex:1;height:24px;border:0;background:transparent;border-radius:6px;
  font-family:inherit;font-size:11px;color:var(--text-3);cursor:pointer;transition:.15s}
.cp-seg button:hover{color:var(--brand)}
.cp-seg button.is-on{background:var(--bg-base);color:var(--brand);font-weight:600;
  box-shadow:0 1px 2px rgba(15,23,42,.08)}
.cp-groups{display:flex;flex-direction:column;gap:6px;padding:0 12px 12px}
.cp-group{padding:7px 10px;border:1px solid var(--border-soft);border-radius:var(--r-sm);
  background:var(--bg-base);transition:.15s}
.cp-group:hover{border-color:var(--brand-line);background:var(--bg-hover)}
.cp-group-t{display:flex;align-items:center;gap:6px}
.cp-group-t .name{flex:1;min-width:0;font-size:12px;font-weight:600;color:var(--text-1);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cp-group .pill{flex:0 0 auto;height:18px;padding:0 6px;font-size:10.5px;font-weight:600}
.cp-group-m{display:flex;align-items:center;gap:6px;margin-top:3px;font-size:11px;color:var(--text-3)}
.cp-group-m i{width:1px;height:10px;background:var(--border-1)}
.cp-act{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:600}
.cp-act::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.75}
.cp-act-high{color:var(--ok)}
.cp-act-mid{color:var(--warn)}
.cp-act-low{color:var(--brand)}
.cp-act-none{color:var(--text-3)}

/* 生成中：按钮内转圈 */
.cp-spin{display:inline-block;width:12px;height:12px;margin-right:6px;vertical-align:-1px;
  border-radius:50%;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;
  animation:cp-spin .7s linear infinite}

@media (max-width:1500px){
  .cp-work{grid-template-columns:240px minmax(0,1fr) 316px}
}
@media (max-width:1240px){
  .cp-work{grid-template-columns:232px minmax(0,1fr) 300px;gap:12px}
  .cp-kpis{grid-template-columns:1fr}
}
@media (max-width:1080px){
  .cp-work{grid-template-columns:1fr;height:auto;min-height:0}
  .cp-side{max-height:420px}
  .cp-main{height:calc(100vh - 196px);min-height:480px}
  .cp-pod{max-height:520px}
}

/* ---------------- 数字员工：竖向卡片 ---------------- */
.emp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:14px}
.emp-card{display:flex;flex-direction:column;gap:11px;padding:15px;background:var(--bg-base);
  border:1px solid var(--border-1);border-radius:var(--r-md);
  transition:border-color .18s,box-shadow .18s,transform .18s}
.emp-card:hover{border-color:var(--brand-line);box-shadow:0 8px 24px rgba(15,23,42,.09);
  transform:translateY(-2px)}
.emp-card.is-off{background:var(--bg-hover)}
.emp-card.is-off .emp-av{filter:grayscale(.7);opacity:.85}
.emp-hd{display:flex;gap:11px;align-items:flex-start}
.emp-av{flex:0 0 auto;width:52px;height:52px;border-radius:50%;overflow:hidden;
  border:1px solid var(--border-soft);background:var(--bg-sub);
  display:flex;align-items:center;justify-content:center}
.emp-av img{width:100%;height:100%;object-fit:cover;display:block}
.emp-av.is-logo img{object-fit:contain;padding:9px;background:var(--bg-base)}
.emp-id{flex:1;min-width:0}
.emp-nm{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.emp-nm b{min-width:0;font-size:14px;font-weight:700;color:var(--text-1);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.emp-nm .pill{flex:0 0 auto;height:18px;padding:0 7px;font-size:10.5px}
.emp-desc{margin-top:4px;min-height:34px;font-size:12px;line-height:1.6;color:var(--text-3);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.emp-tags{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-height:20px}
.emp-tags .tag{height:20px;padding:0 8px;border-radius:5px;font-size:11px}
.emp-meta{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;padding:9px 11px;
  background:var(--bg-hover);border:1px solid var(--border-soft);border-radius:var(--r-sm)}
.emp-meta div{min-width:0;line-height:1.5}
.emp-meta span{display:block;font-size:11px;color:var(--text-3)}
.emp-meta b{display:block;font-size:12px;font-weight:600;color:var(--text-1);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.emp-stats{display:grid;grid-template-columns:repeat(4,1fr);overflow:hidden;
  border:1px solid var(--border-soft);border-radius:var(--r-sm);background:var(--bg-base)}
.emp-stats div{padding:7px 4px;text-align:center;border-right:1px solid var(--border-soft)}
.emp-stats div:last-child{border-right:0}
.emp-stats b{display:block;font-size:15px;font-weight:700;line-height:1.25;color:var(--text-1)}
.emp-stats b.blue{color:var(--brand)}
.emp-stats span{display:block;margin-top:1px;font-size:11px;color:var(--text-3);white-space:nowrap}
.emp-ft{display:flex;align-items:center;gap:6px;margin-top:auto;padding-top:11px;
  border-top:1px solid var(--border-soft)}
.emp-ft .grow{flex:1}
.emp-ft .mini-btn{width:28px;height:28px;border:1px solid var(--border-1);border-radius:var(--r-sm)}
.emp-ft .mini-btn:hover{border-color:var(--brand)}
@media (max-width:720px){
  .emp-grid{grid-template-columns:1fr}
}
/* 版本页 · 升级机制卡片 */
.rel-mech{margin-top:20px;padding-top:16px;border-top:1px dashed var(--border-1)}
.rel-mech-hd{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap;margin-bottom:11px}
.rel-mech-hd b{font-size:13px;font-weight:700;color:var(--text-1)}
.rel-flow{display:grid;grid-template-columns:repeat(auto-fit,minmax(232px,1fr));gap:12px}
.rel-step{display:flex;flex-direction:column;gap:8px;padding:13px 14px;background:var(--bg-base);
  border:1px solid var(--border-1);border-radius:var(--r-md);transition:border-color .15s,box-shadow .15s}
.rel-step:hover{border-color:var(--brand-line);box-shadow:0 8px 24px rgba(15,23,42,.07)}
.rel-nm{display:flex;align-items:center;gap:8px}
.rel-nm b{font-size:12.5px;font-weight:700;color:var(--text-1)}
.rel-no{flex:0 0 20px;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;
  border-radius:6px;border:1px solid var(--brand-line);background:var(--brand-surface);
  color:var(--brand);font-size:11px;font-weight:700}
.rel-d{font-size:12px;line-height:1.65;color:var(--text-3)}
/* 版本卡：整卡可点，hover 抬升比通用卡片更明显 */
.emp-card.rel-ver{cursor:pointer;outline:none}
.emp-card.rel-ver:hover{border-color:var(--brand);box-shadow:0 16px 36px rgba(15,23,42,.16);
  transform:translateY(-3px)}
.emp-card.rel-ver:focus-visible{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-line)}
/* 版本覆盖：堆叠进度条 + 图例 */
.rel-cov{display:flex;flex-direction:column;gap:8px;padding:10px 11px;
  border:1px solid var(--border-soft);border-radius:var(--r-sm);background:var(--bg-hover)}
.rel-cov-hd{display:flex;align-items:baseline;justify-content:space-between;gap:8px;
  font-size:11px;color:var(--text-3)}
.rel-cov-hd b{font-size:13px;font-weight:700;color:var(--text-1)}
.rel-cov-more{flex:0 0 auto;font-size:11px;font-weight:600;color:var(--brand)}
.rel-bar{display:flex;height:8px;border-radius:999px;overflow:hidden;background:var(--bg-sub);
  box-shadow:inset 0 0 0 1px var(--border-soft)}
.rel-bar.is-lg{height:10px}
.rel-bar .seg{height:100%;transition:width .35s ease}
.rel-bar .seg+.seg{box-shadow:1px 0 0 rgba(255,255,255,.75)}
.rel-bar .seg.ok{background:linear-gradient(90deg,#3ecf7a,#16a34a)}
.rel-bar .seg.run{background:repeating-linear-gradient(45deg,var(--brand) 0 7px,#4c9bff 7px 14px);
  background-size:20px 20px;animation:rel-run 1s linear infinite}
.rel-bar .seg.err{background:linear-gradient(90deg,#f4737a,#e5484d)}
.rel-bar .seg.mute{background:var(--border-2)}
@keyframes rel-run{to{background-position:20px 0}}
.rel-legend{display:flex;flex-wrap:wrap;gap:3px 12px;font-size:11px;color:var(--text-3)}
.rel-legend span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.rel-legend i{width:8px;height:8px;border-radius:2px;display:inline-block}
.rel-legend i.ok{background:var(--ok)}
.rel-legend i.run{background:var(--brand)}
.rel-legend i.err{background:var(--err)}
.rel-legend i.mute{background:var(--border-2)}
/* 覆盖详情抽屉 */
.drawer-body .rel-cov-hd{margin-bottom:7px}
.rel-cov-sum{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:12px}
.rel-cov-sum>div{padding:9px 10px;border:1px solid var(--border-soft);
  border-radius:var(--r-sm);background:var(--bg-hover)}
.rel-cov-sum b{display:block;font-size:18px;font-weight:700;line-height:1.2;color:var(--text-1)}
.rel-cov-sum span{display:block;margin-top:1px;font-size:11px;color:var(--text-3);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rel-cov-sum .ok b{color:var(--ok)}
.rel-cov-sum .run b{color:var(--brand)}
.rel-cov-sum .err b{color:var(--err)}
.rel-cov-sum .mute b{color:var(--text-3)}
.rel-cov-grp{margin-top:16px}
.rel-cov-grp-hd{display:flex;align-items:center;gap:8px;margin-bottom:7px;
  font-size:12px;font-weight:700;color:var(--text-1)}
.rel-cov-grp-hd .pill{height:18px;padding:0 7px;font-size:10.5px}
.rel-cov-row{display:flex;align-items:center;gap:10px;padding:8px 10px;
  background:var(--bg-base);border:1px solid var(--border-soft);border-radius:var(--r-sm)}
.rel-cov-row+.rel-cov-row{margin-top:6px}
.rel-cov-row .nm{flex:1;min-width:0}
.rel-cov-row .nm b{display:block;font-size:12.5px;font-weight:600;color:var(--text-1);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rel-cov-row .nm b .mono{font-weight:400;font-size:11px;color:var(--text-3)}
.rel-cov-row .nm span{display:block;font-size:11px;color:var(--text-3);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rel-cov-row .nm span.err{color:var(--err)}
.rel-cov-row>.mono{flex:0 0 auto;font-size:11.5px;color:var(--text-2)}
.rel-cov-row .pill{flex:0 0 auto}
@media (max-width:720px){
  .rel-flow{grid-template-columns:1fr}
  .rel-cov-sum{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* 数字员工：头像选择器 */
.av-pick{display:flex;gap:12px;align-items:center}
.av-cur{flex:0 0 auto;width:60px;height:60px;border-radius:50%;overflow:hidden;
  border:1px solid var(--border-1);background:var(--bg-sub);
  display:flex;align-items:center;justify-content:center}
.av-cur img{width:100%;height:100%;object-fit:cover;display:block}
.av-cur.is-logo img{object-fit:contain;padding:10px;background:var(--bg-base)}
.av-ops{flex:1;min-width:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.av-list{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.av-item{width:44px;height:44px;padding:0;border-radius:50%;overflow:hidden;cursor:pointer;
  border:2px solid transparent;background:var(--bg-sub);transition:.15s}
.av-item img{width:100%;height:100%;object-fit:cover;display:block}
.av-item:hover{border-color:var(--brand-line)}
.av-item.is-on{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-surface)}

/* ---------------- 会话运营简报（右栏点群聊后弹出） ---------------- */
.cp-group.is-click{cursor:pointer}
.rpt-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11.5px;color:var(--text-3)}
.rpt-meta i{width:1px;height:10px;background:var(--border-1)}
.rpt-gen{margin-top:5px;font-size:11px;color:var(--text-3)}
.rpt-loading{display:flex;align-items:center;gap:10px;padding:28px 4px;
  color:var(--text-3);font-size:12.5px}
.rpt-spin{flex:0 0 auto;width:14px;height:14px;border-radius:50%;
  border:2px solid var(--border-1);border-top-color:var(--brand);
  animation:cp-spin .7s linear infinite}
.rpt-warn{margin-top:10px;padding:9px 11px;border-radius:var(--r-sm);
  background:var(--warn-surface);color:var(--warn);font-size:12px;line-height:1.6}
.rpt-err{padding:24px 4px;font-size:12.5px;line-height:1.7;color:var(--text-2)}
.rpt-err b{display:block;margin-bottom:6px;font-size:13px;color:var(--err)}
.rpt-err p{margin:0 0 6px}
.rpt-sec{margin-top:16px}
.rpt-sec-h{display:flex;align-items:center;justify-content:space-between;gap:8px;
  margin-bottom:8px;padding-bottom:6px;border-bottom:1px solid var(--border-soft)}
.rpt-sec-h b{font-size:13px;font-weight:700;color:var(--text-1)}
.rpt-sec-x,.rpt-note{font-size:11px;color:var(--text-3)}
.rpt-summary{padding:11px 12px;border-radius:var(--r-sm);background:var(--brand-surface);
  color:var(--text-2);font-size:12.5px;line-height:1.75}
.rpt-chips{display:flex;flex-wrap:wrap;gap:6px}
.rpt-chip{height:22px;padding:0 9px;border-radius:5px;background:var(--bg-sub);
  color:var(--text-2);font-size:11.5px;display:inline-flex;align-items:center}
.rpt-evs{list-style:none;margin:0;padding:0 0 0 12px;border-left:2px solid var(--border-soft)}
.rpt-ev{position:relative;padding:0 0 12px 12px}
.rpt-ev:last-child{padding-bottom:0}
.rpt-ev::before{content:"";position:absolute;left:-6px;top:4px;width:8px;height:8px;
  border-radius:50%;background:var(--bg-base);border:2px solid var(--brand-line)}
.rpt-ev-h{display:flex;align-items:baseline;gap:8px}
.rpt-ev-h b{font-size:12.5px;color:var(--text-1);font-weight:600}
.rpt-ev-h .mono{font-size:11px;color:var(--text-3)}
.rpt-ev-b{margin-top:3px;font-size:12px;line-height:1.7;color:var(--text-2)}
.rpt-ev-b em{font-style:normal;font-weight:600;color:var(--brand)}
.rpt-hls{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.rpt-hl{display:flex;gap:9px;padding:9px 11px;border:1px solid var(--border-soft);
  border-radius:var(--r-sm);background:var(--bg-base)}
.rpt-hl-b{min-width:0;flex:1}
.rpt-hl-t{font-size:12.5px;font-weight:600;color:var(--text-1)}
.rpt-hl-d{margin-top:2px;font-size:12px;line-height:1.7;color:var(--text-2)}
.rpt-hl-m{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-top:5px;
  font-size:11px;color:var(--text-3)}
.rpt-hl-m span{color:var(--text-2);font-weight:600}
.rpt-hl-m q{font-style:normal;color:var(--text-3)}
.rpt-lv{flex:0 0 auto;width:20px;height:20px;border-radius:5px;font-size:11px;
  font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.rpt-lv.lv-high{background:var(--ok-surface);color:var(--ok)}
.rpt-lv.lv-mid{background:var(--warn-surface);color:var(--warn)}
.rpt-lv.lv-low{background:var(--bg-sub);color:var(--text-3)}
.rpt-acts{margin:0;padding-left:18px;font-size:12px;line-height:1.8;color:var(--text-2)}
.rpt-raw{margin:0;padding:10px 12px;border-radius:var(--r-sm);background:var(--bg-sub);
  font-size:11.5px;line-height:1.7;color:var(--text-2);white-space:pre-wrap;word-break:break-word}

/* 运营中心：助手头像用数字员工形象 */
.cp-msg .av.is-img{border-radius:50%;background:var(--bg-sub);
  box-shadow:inset 0 0 0 1px var(--border-soft)}
.cp-msg .av.is-img > img{border-radius:50%;object-fit:cover}

/* 运营中心：对话后常驻的推荐问题条 + 换一批 */
.cp-sugbar{display:none;align-items:center;gap:10px;padding:0 16px 8px;background:var(--bg-base)}
.cp-sugbar.is-on{display:flex}
.cp-sug-row{display:flex;gap:8px;flex:1 1 auto;min-width:0;overflow-x:auto;
  scrollbar-width:none;-ms-overflow-style:none;padding-bottom:2px}
.cp-sug-row::-webkit-scrollbar{display:none}
.cp-sug-row .cp-sug{flex:0 0 auto;white-space:nowrap}
.cp-sug-refresh{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;
  height:30px;padding:0 12px;border:1px solid var(--border-1);border-radius:999px;
  background:var(--bg-base);color:var(--text-2);font-size:12px;line-height:1;cursor:pointer;
  transition:border-color .15s,color .15s,background .15s}
.cp-sug-refresh:hover:not([disabled]){border-color:var(--brand);color:var(--brand);
  background:var(--brand-surface)}
.cp-sug-refresh[disabled]{opacity:.65;cursor:default}
.cp-sug-refresh svg{width:13px;height:13px}
.cp-sug-refresh.is-load svg{animation:cp-spin .8s linear infinite}
@keyframes cp-spin{to{transform:rotate(360deg)}}

/* ---------------- 代理端卡片视图 ---------------- */
.ag-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.ag-card{background:var(--bg-base);border:1px solid var(--border-1);border-radius:var(--r-md);
  box-shadow:var(--shadow-1);overflow:hidden;display:flex;flex-direction:column;max-width:760px;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.ag-card:hover{transform:translateY(-2px);border-color:var(--brand-line);
  box-shadow:0 2px 4px rgba(15,23,42,.05),0 14px 32px rgba(15,23,42,.10)}
.ag-card.is-dim{opacity:.94}

/* 远程桌面截图区 */
.ag-shot{position:relative;aspect-ratio:16/10;background:#0f172a;overflow:hidden;cursor:pointer}
.ag-shot.is-empty{cursor:default}
.ag-shot.is-empty.is-clickable{cursor:pointer}
.ag-img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s ease,opacity .2s}
.ag-shot:not(.is-empty):hover .ag-img{transform:scale(1.02)}
.ag-img.is-fail{opacity:0}
.ag-shot .ag-bg{filter:grayscale(1) blur(1.5px) brightness(.75);transform:scale(1.04)}
.ag-badges{position:absolute;left:10px;right:10px;top:10px;display:flex;align-items:center;
  gap:8px;justify-content:space-between;pointer-events:none;z-index:2}
.ag-badges .pill{height:22px;padding:0 8px;font-size:11px;font-weight:600;
  box-shadow:0 1px 4px rgba(15,23,42,.18)}
.ag-badge-r{display:flex;align-items:center;gap:6px}
.ag-fs{pointer-events:auto;width:26px;height:26px;padding:0;border-radius:7px;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid rgba(255,255,255,.24);background:rgba(15,23,42,.5);color:#fff;
  backdrop-filter:blur(4px);transition:background .15s,border-color .15s}
.ag-fs:hover{background:rgba(0,111,239,.88);border-color:rgba(0,111,239,.9)}
.ag-fs svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}
.ag-time{font-size:11px;color:#fff;background:rgba(15,23,42,.55);padding:2px 7px;
  border-radius:999px;white-space:nowrap;backdrop-filter:blur(4px)}
.ag-mask{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:6px;color:#fff;background:rgba(9,17,32,.52);
  opacity:0;transition:opacity .18s ease;text-align:center;pointer-events:none;z-index:1}
.ag-shot:hover .ag-mask{opacity:1}
.ag-mask svg{width:22px;height:22px;fill:none;stroke:#fff;stroke-width:2}
.ag-mask span{font-size:12px}
.ag-mask .s{font-size:11px;opacity:.72}
.ag-loading{position:absolute;inset:0;display:none;flex-direction:column;align-items:center;
  justify-content:center;gap:8px;color:#fff;background:rgba(9,17,32,.66);font-size:12px;
  pointer-events:none;z-index:3}
.ag-shot.is-loading .ag-mask{opacity:0}
.ag-shot.is-loading .ag-loading{display:flex}
.ag-spin{width:18px;height:18px;border-radius:50%;border:2px solid rgba(255,255,255,.3);
  border-top-color:#fff;animation:ag-spin .8s linear infinite}
@keyframes ag-spin{to{transform:rotate(360deg)}}

/* 离线 / 停用：默认底图 + 异常蒙层 */
.ag-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  flex-direction:column;gap:8px;text-align:center;padding:0 16px;pointer-events:none;
  background:rgba(15,23,42,.58);z-index:1}
.ag-overlay.off{background:rgba(12,20,36,.62);box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}
.ag-overlay.dis{background:rgba(24,30,42,.68)}
.ag-overlay .ico{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;
  justify-content:center;background:rgba(255,255,255,.12)}
.ag-overlay.off .ico{background:rgba(255,184,0,.16)}
.ag-overlay svg{width:18px;height:18px;fill:none;stroke:#fff;stroke-width:2}
.ag-overlay.off svg{stroke:#ffc247}
.ag-overlay .t{font-size:12.5px;color:#fff;font-weight:600;letter-spacing:.2px}
.ag-overlay .s{font-size:11px;color:rgba(255,255,255,.66)}

/* 卡片正文 */
.ag-body{padding:12px 14px 10px;display:flex;flex-direction:column;gap:6px}
.ag-name{display:flex;align-items:center;gap:8px;min-width:0}
.ag-name strong{font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;min-width:0}
.ag-no{margin-left:auto;flex:0 0 auto;font-size:11px;color:var(--text-3)}
.ag-meta{display:flex;align-items:center;gap:8px;color:var(--text-2);flex-wrap:wrap;font-size:12px}
.ag-org{height:20px;padding:0 7px;border-radius:5px;background:var(--bg-sub);color:#3b6ea8;
  font-size:11px;display:inline-flex;align-items:center;max-width:190px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ag-sep{width:1px;height:10px;background:var(--border-1);display:inline-block;flex:0 0 1px}
.ag-sub{display:flex;align-items:center;gap:8px;color:var(--text-3);font-size:11px;flex-wrap:wrap}

/* 卡片底栏：单行 + 竖线分隔 + 右侧状态 */
.ag-foot{border-top:1px solid var(--border-soft);margin-top:auto;padding:8px 14px;
  display:flex;align-items:center;gap:10px;flex-wrap:nowrap;overflow:hidden}
.ag-foot .btn-link{font-size:12px;font-weight:500;color:var(--text-2);white-space:nowrap}
.ag-foot .btn-link:hover{color:var(--brand);text-decoration:none}
.ag-foot .btn-link.danger:hover{color:var(--err)}
.ag-foot-state{margin-left:auto;flex:0 0 auto;font-size:11px;color:var(--text-3);white-space:nowrap}
.ag-foot-state .ag-ok{color:var(--ok)}
.ag-foot-state .ag-warn{color:var(--warn)}
.ag-summary{padding:14px 2px 0;font-size:12px;color:var(--text-3)}

/* 远程桌面全屏查看 */
.ag-viewer{position:fixed;inset:0;z-index:120;display:flex;align-items:center;justify-content:center;
  padding:56px 40px 32px;background:rgba(8,14,26,.92);backdrop-filter:blur(2px)}
.ag-viewer-bar{position:absolute;left:0;right:0;top:0;height:48px;display:flex;align-items:center;
  gap:10px;padding:0 16px;font-size:13px;color:#e2e8f2;background:rgba(8,14,26,.72);z-index:2}
.ag-viewer-bar .mono{font-size:11px;color:rgba(255,255,255,.55)}
.ag-viewer-bar .ag-sep{background:rgba(255,255,255,.22)}
.ag-viewer-zoom{font-size:11px;color:rgba(255,255,255,.62);margin-left:auto;min-width:40px;
  text-align:right;font-variant-numeric:tabular-nums}
.ag-viewer-close{margin-left:8px;width:30px;height:30px;padding:0;border-radius:8px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  border:1px solid rgba(255,255,255,.18);background:transparent;color:#fff}
.ag-viewer-close:hover{background:rgba(255,255,255,.12)}
.ag-viewer-close svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
.ag-viewer-img{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;
  background:#000;box-shadow:0 24px 64px rgba(0,0,0,.5);cursor:zoom-in;will-change:transform;
  user-select:none;touch-action:none}
.ag-viewer-img.is-zoom{cursor:grab}
.ag-viewer-img.is-drag{cursor:grabbing}

@media (max-width:1280px){
  .ag-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:1000px){
  .ag-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:760px){
  .ag-grid{grid-template-columns:1fr}
  .ag-foot{flex-wrap:wrap;row-gap:4px}
  .ag-foot-state{margin-left:0}
}

/* ============================================================
   角色管理 · 权限配置弹框（两页签 / 五选数据权限 / 菜单级权限树）
   ============================================================ */
.modal.role-modal{width:900px}
.input[readonly]{background:var(--bg-sub);color:var(--text-3);cursor:default}
.role-tabs{display:flex;gap:22px;border-bottom:1px solid var(--border-1);margin:4px 0 16px;position:relative}
.role-tabs .tab{background:none;border:0;border-bottom:2px solid transparent;margin-bottom:-1px;
  padding:9px 2px;font-size:13.5px;font-weight:600;color:var(--text-3);cursor:pointer;font-family:inherit}
.role-tabs .tab:hover{color:var(--text-1)}
.role-tabs .tab.is-active{color:var(--brand);border-bottom-color:var(--brand)}

.role-adv{margin:2px 0 4px;padding:8px 10px;border:1px dashed var(--border-2);border-radius:var(--r-sm);
  background:var(--bg-sunken)}
.role-adv .adv-caret{display:inline-block;margin-left:6px;font-size:10px;color:var(--text-3)}
.role-adv #advBody{margin-top:10px;padding-top:10px;border-top:1px solid var(--border-soft)}
.role-adv .field{margin-bottom:8px}

.role-sec{margin-top:16px}
.role-sec-hd{display:flex;align-items:baseline;gap:10px;margin-bottom:8px}
.role-sec-hd b{font-size:13px;color:var(--text-1)}
.role-sec-hd .hint{font-size:11.5px}
.role-sec-hd .rt-cnt-live{margin-left:auto;font-size:12px;color:var(--brand);font-weight:600}

.scope-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.scope-card{border:1px solid var(--border-1);border-radius:10px;padding:9px 10px;cursor:pointer;
  background:var(--bg-base);transition:border-color .15s,background .15s,box-shadow .15s;position:relative;min-width:0}
.scope-card:hover{border-color:var(--brand-line);background:var(--bg-hover)}
.scope-card.on{border-color:var(--brand);background:var(--brand-surface);
  box-shadow:0 0 0 1px var(--brand) inset}
.scope-card.dis{opacity:.42;cursor:not-allowed}
.scope-card .row{display:flex;align-items:center;gap:7px}
.scope-card .nm{font-weight:600;font-size:12.5px;color:var(--text-1);white-space:nowrap}
.scope-card .eg{font-size:11px;color:var(--text-3);margin-top:4px;line-height:1.5}
.scope-card .cbx{width:13px;height:13px;border:1.5px solid var(--border-2);border-radius:4px;
  flex:none;position:relative;background:#fff}
.scope-card.on .cbx{background:var(--brand);border-color:var(--brand)}
.scope-card.on .cbx::after{content:"";position:absolute;left:3px;top:0;width:4px;height:8px;
  border:2px solid #fff;border-top:0;border-left:0;transform:rotate(42deg)}

.org-pick{margin-top:10px;border:1px solid var(--border-1);border-radius:var(--r-sm);
  background:var(--bg-sub);padding:10px 12px}
.org-pick .check-list{background:var(--bg-base);border-color:var(--border-soft)}

.rt-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.rt{border:1px solid var(--border-1);border-radius:var(--r-sm);max-height:260px;overflow-y:auto;
  background:var(--bg-base)}
.rt-grp{display:flex;align-items:center;gap:8px;padding:7px 10px;background:var(--bg-sub);
  border-bottom:1px solid var(--border-soft);position:sticky;top:0;z-index:1}
.rt-grp .rt-name{font-size:12.5px;font-weight:700;color:var(--text-2)}
.rt-grp .rt-cnt{margin-left:auto;font-size:11.5px;color:var(--text-3);font-weight:400}
.rt-caret{background:none;border:0;padding:0 2px;width:16px;cursor:pointer;color:var(--text-3);
  font-size:10px;line-height:1;font-family:inherit}
.rt-check{display:flex;align-items:center}
.rt-check input,.rt-page input{width:14px;height:14px;accent-color:var(--brand);cursor:pointer;margin:0}
.rt-pages{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px 10px;
  padding:8px 12px 10px 30px;border-bottom:1px solid var(--border-soft)}
.rt-pages:last-child{border-bottom:0}
.rt-page{display:flex;align-items:center;gap:7px;font-size:12.5px;color:var(--text-2);
  cursor:pointer;padding:3px 0;min-width:0;white-space:nowrap}
.rt-page:hover{color:var(--text-1)}
.rt .ph{padding:18px;text-align:center;color:var(--text-3);font-size:12.5px}

.picker-labels{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:6px;
  font-size:12px;color:var(--text-3);font-weight:600}
.picker-labels span:last-child{padding-left:2px}
#rtabUsers .picker .pool,#rtabUsers .picker .picked{max-height:260px}

/* ============================================================
   用户画像（P3）
   ============================================================ */
.pf-wrap{display:grid;grid-template-columns:320px minmax(0,1fr);gap:14px;align-items:start}
.pf-side,.pf-main{min-width:0}
.pf-side{display:flex;flex-direction:column;max-height:calc(100vh - 210px)}
/* 详情面板整体限制在一屏高：头部/页签固定，内容区内部滚动且不显示滚动条 */
.pf-main{max-height:calc(100vh - 210px)}
.pf-main .pf-head,.pf-main .pf-tabs{flex:0 0 auto}
/* 患者列表：对齐参考站的分隔线列表（圆形蓝头像、两行元信息、无时间） */
.pf-list{flex:1;min-height:0;overflow-y:auto;padding:0;
  scrollbar-width:none;-ms-overflow-style:none}
.pf-list::-webkit-scrollbar{display:none}
.pf-row{position:relative;display:flex;align-items:center;gap:12px;padding:12px 16px;cursor:pointer;
  border-bottom:1px solid var(--border-1);transition:background .16s}
.pf-row:last-child{border-bottom:0}
.pf-row:hover{background:var(--bg-hover)}
.pf-row.is-on{background:var(--brand-surface)}
.pf-av{flex:0 0 34px;width:34px;height:34px;border-radius:50%;background:var(--brand);color:#fff;
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:12px;overflow:hidden}
.pf-av.big{flex:0 0 52px;width:52px;height:52px;border-radius:14px;font-size:20px;
  background:var(--brand);color:#fff}
.pf-av img{width:100%;height:100%;object-fit:cover}
.pf-row-main{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px}
.pf-row-top{display:flex;align-items:center;gap:8px;min-width:0}
.pf-row-top b{font-size:13.5px;font-weight:600;color:var(--text-1);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pf-row-sub{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--text-3);font-size:11.5px;line-height:1.5}
.pf-sep{width:1px;height:11px;background:var(--border-2);flex:0 0 1px}
.pf-risk{display:inline-flex;align-items:center;padding:4px 8px;border-radius:6px;font-size:11.5px;
  font-weight:600;line-height:1;white-space:nowrap;flex:0 0 auto}
.pf-risk.is-danger{background:var(--err-surface);color:var(--err)}
.pf-risk.is-warn{background:var(--warn-surface);color:var(--warn)}
.pf-risk.is-ok{background:var(--ok-surface);color:var(--ok)}
.pf-risk.is-info{background:var(--info-surface);color:var(--info)}
.pf-risk.is-neutral{background:var(--bg-sub);color:var(--text-3)}
/* 参考站列表头不带左侧竖条，标题更小、更轻 */
.pf-side .panel-head h3{font-size:13.5px;font-weight:650}
.pf-side .panel-head h3::before{display:none}
/* 列表分页压缩成一行，单页时由脚本直接不渲染 */
.pf-side .pager{padding:6px 12px;font-size:12px}
.pf-side .pager button{min-width:26px;height:26px}
.pf-empty{padding:36px 16px;text-align:center;color:var(--text-3);font-size:12.5px}

.pf-head{display:flex;flex-wrap:wrap;gap:16px;padding:16px;border-bottom:1px solid var(--border-soft);align-items:flex-start}
.pf-head-main{flex:1 1 260px;min-width:220px;display:flex;flex-direction:column;gap:7px}
.pf-name{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:17px;font-weight:700;color:var(--text-1)}
.pf-meta{display:flex;align-items:center;flex-wrap:wrap;gap:7px 8px;color:var(--text-3);font-size:12px}
.pf-msep{width:1px;height:11px;background:var(--border-2);flex:0 0 1px}
.pf-meta .pf-mk{color:var(--text-3);font-size:11.5px}
.pf-meta .pf-mv{color:var(--text-2);font-weight:500}
.pf-tags{display:flex;flex-wrap:wrap;gap:6px}
.pf-tags .tag{height:auto;padding:4px 8px;border-radius:6px;font-size:11.5px;line-height:1.2}
/* 右上角只保留主诊断与所属代理端：标签在上、值在下，右对齐 */
.pf-aside{flex:0 0 216px;display:flex;flex-direction:column;gap:7px;padding-left:14px;
  border-left:1px solid var(--border-soft);text-align:right;align-items:flex-end}
.pf-aside div{display:flex;flex-direction:column;gap:2px;min-width:0;align-items:flex-end}
.pf-aside span{color:var(--text-3);font-size:11.5px;white-space:nowrap}
.pf-aside b{font-size:13px;font-weight:600;color:var(--text-1);word-break:break-all}
.pf-aside .main b{font-size:13.5px;font-weight:700}

.pf-tabs{display:flex;gap:4px;padding:5px 16px 0;border-bottom:1px solid var(--border-1);flex-wrap:nowrap;
  overflow-x:auto;scrollbar-width:none}
.pf-tabs::-webkit-scrollbar{height:0}
.pf-tab{flex:0 0 auto;background:none;border:0;border-bottom:2px solid transparent;margin-bottom:-1px;padding:9px 14px;
  font-size:13px;font-weight:500;color:var(--text-3);cursor:pointer;font-family:inherit;transition:color .12s}
.pf-tab:hover{color:var(--text-1)}
.pf-tab.is-active{color:var(--brand);border-bottom-color:var(--brand);font-weight:650}

.pf-body{flex:1 1 auto;min-height:0;padding:16px;overflow-y:auto;
  scrollbar-width:none;-ms-overflow-style:none}
.pf-body::-webkit-scrollbar{display:none}
/* 对话历史用浅灰蓝底把消息区与白色详情区分割开，气泡不再与背景糊在一起 */
.pf-body.is-chat{background:var(--bg-sunken);padding:16px}
.pf-sec-hd{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}
.pf-sec-hd .hint{margin-right:auto}
.pf-hintbox{display:flex;align-items:flex-start;gap:8px;padding:10px 12px;margin-bottom:12px;border-radius:8px;
  background:var(--brand-surface);border:0;color:var(--brand);font-size:12px;line-height:1.65}
.pf-hintbox svg{width:13px;height:13px;flex:0 0 13px;margin-top:2px;color:var(--brand)}
.pf-hintbox svg,.pf-op svg,.pf-ref svg{fill:none;stroke:currentColor;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round}
/* 字段型栏目：标签在左、值在右的紧凑行，宽屏自动增加到三列 */
.pf-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px 12px}
.pf-kv{display:flex;flex-direction:row;align-items:baseline;gap:10px;padding:7px 10px;border:1px solid var(--border-soft);
  border-radius:9px;background:var(--bg-sunken);min-width:0}
.pf-kv.span2{grid-column:1 / -1;flex-direction:column;align-items:stretch;gap:4px}
.pf-kv span{flex:0 0 74px;color:var(--text-3);font-size:12.5px;line-height:1.6}
.pf-kv b{flex:1;min-width:0;font-size:13px;font-weight:500;color:var(--text-1);white-space:pre-wrap;word-break:break-word}
.pf-cell-lg{white-space:pre-wrap;max-width:340px;word-break:break-word}
.check-list.inline{display:flex;flex-wrap:wrap;gap:6px 14px;max-height:none;border:0;padding:0;background:none}

.pf-table-wrap{border:1px solid var(--border-1);border-radius:10px;overflow:auto;max-height:440px;background:var(--bg-base)}
.pf-table{width:100%;border-collapse:separate;border-spacing:0;table-layout:auto;min-width:860px}
.pf-table th{position:sticky;top:0;z-index:2;background:var(--bg-th);color:var(--text-3);
  font-size:12px;font-weight:600;text-align:left;padding:10px 14px;border-bottom:1px solid var(--border-1);white-space:nowrap}
.pf-table td{padding:12px 14px;border-bottom:1px solid var(--border-soft);color:var(--text-2);font-size:13px;vertical-align:top}
.pf-table tbody tr:last-child td{border-bottom:0}
.pf-table tbody tr:hover td{background:var(--bg-hover)}
.pf-table td.ops,.pf-table th.ops{position:sticky;right:0;background:var(--bg-base);box-shadow:-10px 0 14px -10px rgba(15,23,42,.18)}
.pf-table th.ops{background:var(--bg-th)}
.pf-rowops{display:flex;align-items:center;gap:4px;justify-content:flex-end}
.pf-op{display:inline-flex;align-items:center;gap:4px;height:26px;padding:0 7px;border:0;border-radius:6px;
  background:transparent;color:var(--text-2);font-size:12px;cursor:pointer;font-family:inherit;white-space:nowrap}
.pf-op svg{width:12px;height:12px}
.pf-op:hover{background:var(--brand-surface);color:var(--brand)}
.pf-op.danger:hover{background:var(--err-surface);color:var(--err)}

/* 对话历史：会话切换条（单聊 / 群聊分开查看），固定在滚动区域顶部 */
.pf-conv-switch{position:sticky;top:-16px;z-index:6;display:flex;gap:8px;overflow-x:auto;
  padding:12px 0 10px;margin:-16px 0 10px;background:var(--bg-sunken);
  border-bottom:1px solid var(--border-soft);scrollbar-width:none}
.pf-conv-switch::-webkit-scrollbar{display:none}
.pf-conv-chip{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-start;gap:2px;
  max-width:220px;padding:8px 12px;border:1px solid var(--border-1);border-radius:9px;
  background:var(--bg-base);cursor:pointer;font-family:inherit;text-align:left;transition:.15s}
.pf-conv-chip .nm{max-width:200px;font-size:12.5px;font-weight:600;color:var(--text-1);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pf-conv-chip .meta{font-size:11px;color:var(--text-3)}
.pf-conv-chip:hover{border-color:var(--brand-line);background:var(--brand-surface)}
.pf-conv-chip.is-on{border-color:var(--brand);background:var(--brand-surface);box-shadow:0 0 0 2px var(--brand-line)}
.pf-conv-chip.is-on .nm{color:var(--brand)}
/* 对话历史：对齐参考站的圆形头像、11px 元信息、13.5px 气泡 */
.pf-chat{display:flex;flex-direction:column;gap:14px}
.pf-chat .msg{gap:10px;margin-bottom:0;width:100%;max-width:100%}
.pf-chat .msg .av{position:relative;width:32px;height:32px;flex:0 0 32px;border-radius:50%;
  font-size:12px;font-weight:700;background:var(--brand);color:#fff}
.pf-chat .msg.ext .av{background:var(--brand);color:#fff}
.pf-chat .msg.self .av{background:var(--ok);color:#fff}
.pf-chat .msg .wrap{max-width:min(640px,82%)}
.pf-chat .msg .meta{font-size:11px;gap:8px;margin-bottom:5px}
.pf-chat .msg .meta .nm{font-weight:600;color:var(--text-2)}
.pf-chat .msg .bubble{font-size:13.5px;line-height:1.7;padding:10px 14px;border-radius:12px;
  border:1px solid var(--border-1);background:var(--bg-base);color:var(--text-1)}
.pf-chat .msg.self .bubble{background:var(--brand-surface);border-color:transparent}
.pf-chat .msg.is-hl .bubble{box-shadow:0 0 0 3px var(--brand-line);border-color:var(--brand)}
.pf-chat-loading{padding:30px;text-align:center;color:var(--text-3);font-size:12.5px}
.pf-more{text-align:center;padding:6px 0 2px}
.pf-ref{background:none;border:0;padding:0;color:var(--brand);font-size:11.5px;cursor:pointer;font-family:inherit}
.pf-ref:hover{text-decoration:underline}
.pf-ref::before{content:"↩ ";color:var(--text-3)}

.pf-opp{padding:6px 0}
/* AI 汇总：左侧叙述大卡片 + 右侧「关键信息 / 风险 / 建议」三张小卡片 */
.pf-ai-layout{display:grid;grid-template-columns:minmax(0,1fr) 322px;gap:16px;align-items:start}
.pf-ai-narr{border:1px solid var(--border-1);border-radius:10px;background:var(--bg-base);padding:18px 20px;min-width:0;box-shadow:var(--shadow-1)}
.pf-ai-narr h4{margin:0 0 8px;font-size:14.5px;font-weight:700;color:var(--text-1)}
.pf-ai-narr p.pf-ai-txt{margin:0 0 10px}
.pf-ai-narr p.pf-ai-txt:last-child{margin-bottom:0}
.pf-ai-txt{font-size:13px;line-height:1.85;color:var(--text-2)}
.pf-ai-side{display:flex;flex-direction:column;gap:12px;min-width:0}
.pf-ai-card{border:1px solid var(--border-1);border-radius:10px;background:var(--bg-base);padding:12px 14px;min-width:0;box-shadow:var(--shadow-1)}
.pf-ai-card-hd{display:flex;align-items:center;gap:6px;margin-bottom:9px;
  font-size:12.5px;font-weight:700;color:var(--text-1)}
.pf-ai-ico{display:inline-flex;align-items:center;justify-content:center;flex:0 0 13px;color:var(--text-1)}
.pf-ai-ico svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round}
.pf-ai-bullets{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}
.pf-ai-bullets li{position:relative;padding-left:12px;font-size:12.5px;line-height:1.65;color:var(--text-2)}
.pf-ai-bullets li::before{content:"";position:absolute;left:2px;top:7px;width:4px;height:4px;
  border-radius:50%;background:var(--text-3);opacity:.55}
.pf-ai-risks{display:flex;flex-direction:column;gap:7px}
.pf-ai-risk{display:flex;align-items:flex-start;gap:6px;font-size:12.5px;line-height:1.65;color:var(--text-2)}
.pf-ai-risk .pf-risk{padding:2px 6px;border-radius:4px;font-size:10.5px;line-height:1.4;margin-top:1px}
.pf-ai-sug{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:7px}
.pf-ai-sug li{display:flex;align-items:flex-start;gap:7px;font-size:12.5px;line-height:1.65;color:var(--text-2)}
.pf-ai-sug .no{flex:0 0 15px;height:15px;margin-top:1px;border-radius:4px;background:var(--brand);
  color:#fff;font-size:10.5px;font-weight:700;display:flex;align-items:center;justify-content:center}
.pf-ai-none{font-size:12.5px;color:var(--text-3)}
.pf-ai-foot{margin-top:12px;text-align:right;font-size:11.5px;color:var(--text-3)}

/* AI 汇总：左列主体（患者概况 + 变化对照） */
.pf-ai-main{display:flex;flex-direction:column;gap:16px;min-width:0}
/* 变化对照卡片：浅蓝底与白底叙述卡形成层次 */
.pf-ai-card.pf-ai-changes{background:var(--brand-surface);border-color:var(--brand-line)}
ul.pf-ai-changes{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:9px}
ul.pf-ai-changes li{display:flex;align-items:flex-start;gap:6px;font-size:12.5px;line-height:1.65;color:var(--text-2)}
ul.pf-ai-changes li .t{flex:1;min-width:0}
.pf-ai-arrow{flex:0 0 auto;color:var(--brand);font-weight:700;margin-top:1px}
/* 引用上标：小圆角徽标，点击回原始消息 */
.pf-ai-ref{appearance:none;display:inline-flex;align-items:center;justify-content:center;min-width:15px;height:15px;
  padding:0 4px;margin-left:3px;border-radius:8px;border:1px solid var(--brand-line);background:var(--brand-surface);
  color:var(--brand);font-size:10px;font-weight:700;line-height:1;cursor:pointer;vertical-align:1px;
  font-family:var(--mono);transition:background .12s,color .12s,border-color .12s}
.pf-ai-ref:hover{background:var(--brand);border-color:var(--brand);color:#fff}
/* 引用原文：可收起面板，浅灰底 */
.pf-ai-cites{margin-top:16px;border:1px solid var(--border-1);border-radius:10px;background:var(--bg-sunken);overflow:hidden}
.pf-ai-cites summary{display:flex;align-items:center;gap:7px;padding:11px 14px;cursor:pointer;list-style:none;
  font-size:12.5px;font-weight:600;color:var(--text-1);user-select:none}
.pf-ai-cites summary::-webkit-details-marker{display:none}
.pf-ai-cites summary .pf-ai-ico{color:var(--brand)}
.pf-ai-cites ol{margin:0;padding:0 8px 8px;list-style:none;display:flex;flex-direction:column;gap:2px}
.pf-ai-cite{display:flex;align-items:flex-start;gap:8px;width:100%;padding:8px 9px;border:0;border-radius:8px;
  background:transparent;cursor:pointer;font-family:inherit;text-align:left;transition:background .12s}
.pf-ai-cite:hover{background:var(--bg-base)}
.pf-ai-cite .no{flex:0 0 18px;height:18px;border-radius:50%;background:var(--brand);color:#fff;
  font-size:10.5px;font-weight:700;display:flex;align-items:center;justify-content:center;margin-top:1px}
.pf-ai-cite .meta{flex:0 0 auto;font-size:11px;color:var(--text-3);padding-top:1px;white-space:nowrap}
.pf-ai-cite .txt{flex:1;min-width:0;font-size:12.5px;color:var(--text-2);line-height:1.6}

@media (max-width:1180px){
  .pf-wrap{grid-template-columns:278px minmax(0,1fr)}
}
@media (max-width:1080px){
  /* 标题行换行后高度变大，相应减少面板的可视高度 */
  .pf-side,.pf-main{max-height:calc(100vh - 260px)}
  /* 右侧三张小卡片在窄屏折到叙述卡片下方 */
  .pf-ai-layout{grid-template-columns:1fr}
}
@media (max-width:960px){
  .pf-wrap{grid-template-columns:1fr}
  .pf-side{max-height:none}
  .pf-main{max-height:none}
  .pf-list{max-height:300px}
  .pf-aside{flex:1 1 100%;flex-direction:row;flex-wrap:wrap;gap:8px 20px;padding:10px 0 0;
    border-left:0;border-top:1px solid var(--border-soft);text-align:left;align-items:flex-start}
  .pf-aside div{flex:0 0 auto;align-items:flex-start;text-align:left}
  .pf-body{max-height:none;overflow:visible}
}
@media (max-width:560px){
  .pf-head{padding:14px;gap:12px}
  .pf-av.big{width:48px;height:48px;flex-basis:48px;border-radius:14px;font-size:19px}
  .pf-grid{grid-template-columns:1fr}
  .pf-aside{flex-wrap:wrap;gap:14px 20px}
  .pf-tabs{padding:10px 14px 0}
  .pf-body{padding:14px}
}

/* 系统设置 · 画像字段 */
.pf-set-grid{display:grid;grid-template-columns:300px minmax(0,1fr);gap:12px;align-items:start}
.pf-set-list{display:flex;flex-direction:column;gap:6px}
.pf-set-row{padding:9px 10px;border:1px solid var(--border-1);border-radius:8px;cursor:pointer;background:var(--bg-base);
  transition:border-color .12s,background .12s}
.pf-set-row:hover{background:var(--bg-hover)}
.pf-set-row.is-on{border-color:var(--brand);background:var(--brand-surface)}
.pf-set-row .hd{display:flex;align-items:center;gap:6px}
.pf-set-row .hd b{font-size:12.5px;color:var(--text-1);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pf-set-row .ft{display:flex;gap:8px;align-items:center;color:var(--text-3);font-size:11px;margin-top:4px}
.pf-set-ops{display:flex;gap:2px}
.pf-set-ops .mini-btn{width:24px;height:24px}
.pf-set-hint{font-size:11.5px;color:var(--text-3);margin-top:6px}
.pf-ai-setting{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:12px;
  padding:12px 14px;border:1px solid var(--border-1);border-radius:10px;background:var(--bg-sunken)}
.pf-ai-setting .fld{display:flex;align-items:center;gap:8px}
.pf-ai-setting .fld label{font-size:12px;color:var(--text-2);white-space:nowrap}
.pf-ai-setting .fld .input{width:88px;height:30px}
/* AI 汇总生成机制说明：设置页用 <b> 标题常显；画像页用 <details> 可收起 */
.pf-ai-rule{margin-bottom:12px;padding:12px 14px;border:1px solid var(--border-1);
  border-radius:10px;background:var(--bg-sunken)}
.pf-ai-rule b,.pf-ai-rule>summary{display:block;margin-bottom:6px;font-size:12.5px;color:var(--text-1)}
.pf-ai-rule>summary{cursor:pointer;font-weight:600}
.pf-ai-rule:not([open])>summary{margin-bottom:0}
.pf-ai-rule ul{margin:0;padding-left:16px;display:flex;flex-direction:column;gap:4px}
.pf-ai-rule li{font-size:12px;line-height:1.75;color:var(--text-2)}
.pf-ai-rule em{font-style:normal;font-weight:600;color:var(--brand)}

/* ============================================================
   获客线索（#/acquisition，页面键 lead）
   ============================================================ */
/* 表格内紧凑小按钮（22px），用于行内操作 */
.btn-xs{height:22px;padding:0 9px;font-size:11.5px;border-radius:6px;font-weight:600}
.lead-op + .lead-op{margin-left:6px}
.lead-kpi .kpi .n{font-size:24px}
/* 表格内姓名链接 */
.lnk{color:var(--brand);font-weight:600;cursor:pointer}
.lnk:hover{text-decoration:underline}

/* 页面骨架直接沿用画像页的 .pf-* 双栏与头部/页签样式，这里只补充获客特有部分 */

/* 头像按意向等级着色：A 绿 / B 橙 / C 灰（放在 .pf-av.big 之后以覆盖品牌色） */
.pf-av.lg-a{background:var(--ok-surface);color:var(--ok)}
.pf-av.lg-b{background:var(--warn-surface);color:var(--warn)}
.pf-av.lg-c{background:var(--bg-sub);color:var(--text-3)}
/* 列表右侧意向评分：数字大、单位小，颜色随等级 */
.lead-score{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;
  line-height:1.15;font-variant-numeric:tabular-nums}
.lead-score b{font-size:17px;font-weight:700;color:var(--brand)}
.lead-score.lg-a b{color:var(--ok)}
.lead-score.lg-b b{color:var(--warn)}
.lead-score.lg-c b{color:var(--text-3)}
.lead-score span{font-size:10.5px;color:var(--text-3)}
/* 详情头部右上角的操作按钮组：状态流转 + 指派 */
.lead-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto;flex-wrap:wrap;padding-top:2px}
.lead-actions .hint{font-size:12px;color:var(--text-3);white-space:nowrap}

/* 商机提醒卡 */
.reminder-card{border:1px solid var(--brand-line);border-radius:10px;background:var(--brand-surface);padding:12px 14px}
.rem-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.rem-row{display:flex;gap:10px;padding:6px 0;border-top:1px dashed var(--brand-line);font-size:12.5px;line-height:1.7}
.rem-row:first-of-type{border-top:0;padding-top:2px}
.rem-row label{flex:0 0 88px;color:var(--text-3);font-size:12px}
.rem-row div{flex:1;min-width:0;color:var(--text-2)}

/* 病程时间线 / 操作记录 */
.timeline{position:relative;padding:2px 0 2px 8px}
.tl-item{position:relative;display:flex;gap:12px;padding:0 0 16px}
.tl-item:last-child{padding-bottom:0}
.tl-item::before{content:"";position:absolute;left:5px;top:14px;bottom:0;width:2px;background:var(--border-1)}
.tl-item:last-child::before{display:none}
.tl-dot{position:relative;flex:0 0 12px;width:12px;height:12px;margin-top:3px;border-radius:50%;
  background:var(--brand-surface);border:2px solid var(--brand);z-index:1}
.tl-body{flex:1;min-width:0}
.tl-time{font-size:11.5px;color:var(--text-3);margin-bottom:3px}
.tl-text{font-size:12.5px;color:var(--text-2);line-height:1.7}

/* AI 识别摘要：概述 / 变化对照 / 出处 */
.sum-overview{font-size:13px;line-height:1.8;color:var(--text-2);background:var(--bg-sunken);
  border:1px solid var(--border-1);border-radius:10px;padding:12px 14px}
.sum-title{margin:14px 0 8px;font-size:12.5px;font-weight:600;color:var(--text-1)}
.change-list{display:flex;flex-direction:column;gap:8px}
.change-item{position:relative;padding:9px 12px 9px 26px;border:1px solid var(--brand-line);
  border-radius:8px;background:var(--brand-surface);font-size:12.5px;line-height:1.7;color:var(--text-2)}
.change-item::before{content:"→";position:absolute;left:10px;top:8px;color:var(--brand);font-weight:700}
.cite-item{display:flex;gap:8px;padding:7px 10px;border-bottom:1px dashed var(--border-soft);
  font-size:12px;line-height:1.7;color:var(--text-3)}
.cite-item:last-child{border-bottom:0}
.cite-item .mono{color:var(--text-3);white-space:nowrap}

/* 原文出处：可点击，点击弹框定位聊天原文 */
.cite-item{cursor:pointer;position:relative;padding-right:70px}
.cite-item:hover{background:var(--bg-hover)}
.cite-item::after{content:"查看原文 ›";position:absolute;right:10px;top:8px;font-size:11px;
  font-weight:600;color:var(--brand);opacity:0;transition:opacity .12s}
.cite-item:hover::after{opacity:1}

/* 原文弹框：会话标题 / 消息上下文列表 */
.cite-loading{display:flex;align-items:center;gap:8px;color:var(--text-3);font-size:13px;padding:12px 0}
.cite-conv{font-size:12px;color:var(--text-3);margin-bottom:8px;padding:6px 10px;
  background:var(--bg-sunken);border-radius:8px}
.cite-list{display:flex;flex-direction:column;gap:8px;max-height:52vh;overflow-y:auto;padding-right:2px}
.cite-msg{position:relative;border:1px solid var(--border-1);border-radius:10px;padding:9px 12px;
  background:var(--bg-base)}
.cite-msg-head{display:flex;align-items:center;gap:8px;margin-bottom:4px}
.cite-msg-head b{font-size:12.5px;color:var(--text-1)}
.cite-msg-head .mono{font-size:11px;color:var(--text-3)}
.cite-msg-body{font-size:13px;line-height:1.75;color:var(--text-2);white-space:pre-wrap;word-break:break-word}
.cite-msg.is-target{border-color:var(--brand);background:var(--brand-surface);box-shadow:0 0 0 3px var(--brand-line)}

/* ============================================================
   运营 SOP：左侧计划列表 + 右侧节点时间线
   ============================================================ */
.sop-grid{display:grid;grid-template-columns:minmax(0,340px) minmax(0,1fr);gap:14px;align-items:start}
@media (max-width:980px){.sop-grid{grid-template-columns:minmax(0,1fr)}}
.sop-side{display:flex;flex-direction:column;max-height:calc(100vh - 210px)}
.sop-side .pf-list{flex:1;min-height:0;overflow-y:auto;border-top:1px solid var(--border-soft)}
.sop-main{min-width:0}
.sop-head{display:flex;align-items:flex-start;gap:14px;padding:14px 16px;
  border-bottom:1px solid var(--border-soft);background:var(--bg-tint)}
.sop-head-main{min-width:0;flex:1}
.sop-head h3{margin:0;font-size:15px;font-weight:650;color:var(--text-1);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sop-sub{font-size:12px;color:var(--text-3);margin-top:3px;line-height:1.6;
  overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;
  -webkit-box-orient:vertical}
.sop-ops{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;flex:0 0 auto}
.sop-body{padding:16px;max-height:calc(100vh - 330px);overflow-y:auto}
.sop-timeline{position:relative;padding-left:22px}
.sop-timeline::before{content:"";position:absolute;left:5px;top:8px;bottom:8px;width:2px;
  background:var(--border-1)}
.sop-step{position:relative;padding-bottom:18px}
.sop-step:last-child{padding-bottom:0}
.sop-step::before{content:"";position:absolute;left:-22px;top:5px;width:12px;height:12px;
  border-radius:50%;background:var(--brand);box-shadow:0 0 0 3px var(--bg-base)}
.sop-step__head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sop-step__day{font-size:11.5px;font-weight:700;color:var(--brand);background:var(--brand-surface);
  padding:2px 8px;border-radius:var(--r-sm);flex:0 0 auto}
.sop-step__title{font-size:13.5px;font-weight:600;color:var(--text-1);flex:1 1 auto;min-width:0;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sop-step__ops{display:flex;gap:10px;flex:0 0 auto;margin-left:auto}
.sop-step__meta{display:flex;align-items:center;gap:8px;font-size:11.5px;color:var(--text-3);
  margin-top:6px;flex-wrap:wrap}
.sop-side .pf-row-top svg{width:14px;height:14px;flex:0 0 14px;fill:none;stroke:currentColor;
  stroke-width:1.8;color:var(--brand)}
.sop-step__meta svg{width:13px;height:13px;flex:0 0 13px;fill:none;stroke:currentColor;
  stroke-width:1.8}
.sop-step__script{margin-top:8px;padding:10px 12px;border:1px solid var(--border-1);
  border-radius:var(--r-sm);background:var(--bg-sunken);color:var(--text-2);
  font-size:12.5px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
.sep-v{width:1px;height:11px;background:var(--border-2);display:inline-block;flex:0 0 1px}
.req{color:var(--err);font-weight:600}

/* ---------------- 合规规则 ---------------- */
/* 四级预警：红 / 橙 / 黄 / 蓝，色值与预警模块保持一致 */
.cmp-lv{height:22px;padding:0 9px;border-radius:999px;font-size:11.5px;font-weight:600;
  display:inline-flex;align-items:center;gap:6px;white-space:nowrap;max-width:100%;
  overflow:hidden;text-overflow:ellipsis}
.cmp-lv::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;flex:0 0 6px}
.cmp-lv-red{background:var(--err-surface);color:var(--err)}
.cmp-lv-orange{background:#fdf1e5;color:#c2620b}
.cmp-lv-yellow{background:var(--warn-surface);color:var(--warn)}
.cmp-lv-blue{background:var(--info-surface);color:var(--info)}
/* 匹配正则 chip：等宽字体 + 单行截断，多条时折行 */
.cmp-pats{display:flex;flex-wrap:wrap;gap:4px;max-height:60px;overflow:hidden}
.cmp-pat{font-family:var(--mono);font-size:11px;line-height:1.7;padding:0 7px;border-radius:5px;
  background:var(--bg-sub);color:var(--text-2);border:1px solid var(--border-soft);
  white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}

/* ---------------- 预警工单 ---------------- */
.esc-row{cursor:pointer}
.esc-rule{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.esc-code{font-size:11px;color:var(--text-3);overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap}
.esc-excerpt{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;color:var(--text-2);line-height:1.6;max-height:44px}
.esc-conv{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.esc-elapsed{font-size:11px;color:var(--text-3);white-space:nowrap}
.esc-elapsed.is-over{color:var(--err);font-weight:600}
.esc-elapsed.is-done{color:var(--ok)}
.esc-detail .esc-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.esc-sla{margin-left:auto;font-size:12px;color:var(--text-3)}
.esc-quote{border:1px solid var(--border-1);border-radius:var(--r-sm);
  background:var(--bg-sunken);padding:12px 14px;margin-bottom:12px}
.esc-quote-t{font-size:11.5px;font-weight:600;color:var(--text-3);margin-bottom:6px}
.esc-quote-c{color:var(--text-1);line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.esc-warn{margin:2px 0 6px;padding:9px 12px;border-radius:var(--r-sm);
  background:var(--warn-surface);color:var(--warn);font-size:12.5px;line-height:1.7}
/* 指派后的通知内容：按渠道分行展示 */
.esc-notify{display:flex;flex-direction:column;gap:12px}
.esc-note{border:1px solid var(--border-1);border-radius:var(--r-sm);overflow:hidden}
.esc-note-h{display:flex;align-items:center;gap:10px;padding:9px 12px;
  background:var(--bg-sub);border-bottom:1px solid var(--border-soft)}
.esc-note pre{margin:0;padding:12px;font-family:var(--font);font-size:12.5px;
  line-height:1.8;color:var(--text-2);white-space:pre-wrap;overflow-wrap:anywhere}

/* ---------------- 坐席 ---------------- */
.op-ch{margin-right:4px}
.op-ch:last-child{margin-right:0}
.op-email{font-size:11.5px;color:var(--text-3);overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap}
.op-sw{margin-top:8px}

/* ---------------- 监督模型 ---------------- */
/* 会话列表徽标：监督模型最终驳回 */
.conv-tag.is-review{background:var(--err-surface);color:var(--err)}
/* 会话消息区顶部提示条：审核未通过，点击查看原因 */
.cv-review{display:flex;align-items:center;gap:10px;margin:10px 0 12px;padding:10px 12px;
  border:1px solid var(--err);border-radius:var(--r-sm);background:var(--err-surface);
  cursor:pointer;transition:box-shadow .12s}
.cv-review:hover{box-shadow:0 0 0 3px rgba(220,38,38,.12)}
.cv-review-ic{flex:0 0 20px;width:20px;height:20px;border-radius:50%;background:var(--err);
  color:#fff;font-weight:700;font-size:12px;display:flex;align-items:center;justify-content:center}
.cv-review-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.cv-review-tx b{font-size:12.5px;color:var(--err);font-weight:600}
.cv-review-tx span{font-size:11.5px;color:var(--text-3);overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap}
.cv-review-more{flex:0 0 auto;font-size:12px;font-weight:600;color:var(--err)}
/* 审核详情 / 监督日志详情 */
.rv-detail{display:flex;flex-direction:column;gap:2px}
.rv-row{display:flex;gap:12px;padding:9px 0;border-bottom:1px dashed var(--border-soft);
  font-size:12.5px;line-height:1.75}
.rv-row:last-child{border-bottom:0}
.rv-row label{flex:0 0 92px;color:var(--text-3);font-size:12px}
.rv-row div{flex:1;min-width:0;color:var(--text-1);white-space:pre-wrap;overflow-wrap:anywhere}
/* 审核结论与风险等级 */
.rv-v{height:22px;padding:0 9px;border-radius:999px;font-size:11.5px;font-weight:600;
  display:inline-flex;align-items:center;white-space:nowrap}
.rv-v-pass{background:var(--ok-surface);color:var(--ok)}
.rv-v-reject{background:var(--err-surface);color:var(--err)}
.rv-v-error{background:var(--warn-surface);color:var(--warn)}
.rv-risk{font-size:11.5px;font-weight:600;white-space:nowrap}
.rv-risk-high{color:var(--err)}
.rv-risk-medium{color:var(--warn)}
.rv-risk-low{color:var(--text-3)}
/* 日志筛选条与「加载更多」 */
.rv-filter{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 14px;
  border-bottom:1px solid var(--border-soft);background:var(--bg-tint)}
.rv-filter .input{height:30px}
.rv-more{display:flex;justify-content:center;padding:10px 14px}
.rv-more:empty{display:none}
tr.is-on td{background:var(--brand-surface)}

