/* ==========================================================================
   全域AI · 企业智能服务平台 —— 管理台样式
   浅色控制台风格：浅蓝底(rgb232,241,255)顶部通栏 + 浅蓝底侧栏 + 浅灰画布 + 白卡片 + 蓝色高亮
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #165dff;
  --primary-hover: #4080ff;
  --primary-dark: #0e42d2;
  --primary-soft: #e8f3ff;
  --bg: #f2f3f5;
  --card: #ffffff;
  --text: #1d2129;
  --text-2: #4e5969;
  --text-3: #86909c;
  --text-4: #c9cdd4;
  --border: #e5e6eb;
  --border-2: #f2f3f5;
  --success: #00b42a;
  --warning: #ff7d00;
  --danger: #f53f3f;
  --purple: #722ed1;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow: 0 1px 2px rgba(29, 33, 41, .04);
  --shadow-lg: 0 6px 24px rgba(29, 33, 41, .12);
  --topbar-h: 70px;              /* TOP 通栏高度（58px 的 1.2 倍） */
  --side-w: 208px;
  --bar-bg: #e8f1ff;              /* 顶部通栏 / 左侧菜单底色 = rgb(232,241,255) */
  --bar-hover: #d9e6ff;           /* 底色上的 hover（比底色再深一档的蓝） */
  --bar-line: rgba(22, 93, 255, .14); /* 底色区域内的分隔线（浅蓝底上不要用中性灰） */
}
html, body { height: 100%; }
body { font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 13px; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); cursor: pointer; text-decoration: none; }

/* ============ 登录页 ============ */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #eef4ff 0%, #f5f7fa 58%, #f2f3f5 100%); position: relative; overflow: hidden; }
.login-wrap::after { content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%; background: rgba(22,93,255,.06); top: -220px; right: -160px; }
.login-wrap::before { content: ""; position: absolute; width: 400px; height: 400px; border-radius: 50%; background: rgba(22,93,255,.045); bottom: -180px; left: -120px; }
.login-box { width: 400px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 34px 32px; box-shadow: 0 8px 32px rgba(29,33,41,.08); position: relative; z-index: 2; }
.login-box h1 { font-size: 19px; text-align: center; margin-bottom: 6px; color: var(--text); font-weight: 600; }
.login-box .sub { text-align: center; color: var(--text-3); font-size: 12.5px; margin-bottom: 24px; }
.tab { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab span { flex: 1; text-align: center; padding: 9px 0; cursor: pointer; color: var(--text-2); font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab span:hover { color: var(--primary); }
.tab span.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.pane { display: none; }
.pane.active { display: block; }
.pane .btn { width: 100%; height: 36px; font-size: 14px; }
.login-box input { height: 36px; }
input, select, textarea { width: 100%; height: 30px; padding: 0 10px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; outline: none; font-family: inherit; background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--text-4); }
input:hover, select:hover, textarea:hover { border-color: #c9cdd4; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(22,93,255,.1); }
textarea { height: auto; padding: 7px 10px; resize: vertical; min-height: 72px; line-height: 1.65; }
select { padding: 0 8px; cursor: pointer; }
.row { display: flex; gap: 10px; }
.row input { margin-bottom: 12px; }
.btn { padding: 0 16px; height: 30px; border: 1px solid var(--primary); border-radius: var(--radius); background: var(--primary); color: #fff; font-size: 13px; cursor: pointer; font-family: inherit; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn:active { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn.ghost:hover { background: var(--primary-soft); }
.btn.grey { background: #fff; color: var(--text-2); border-color: var(--border); }
.btn.grey:hover { background: #f7f8fa; border-color: var(--text-4); color: var(--text); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: #e0332f; border-color: #e0332f; }
.btn.small { width: auto; height: 28px; padding: 0 12px; font-size: 12.5px; }
.btn.mini { width: auto; height: 22px; padding: 0 8px; font-size: 12px; background: transparent; border-color: transparent; color: var(--primary); }
.btn.mini:hover { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.btn.mini.grey { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.mini.grey:hover { background: var(--border-2); color: var(--text); }
.btn.mini.danger, .btn.mini.danger:hover { background: transparent; border-color: transparent; color: var(--danger); }
.btn.mini.danger:hover { background: #ffece8; }
.tip { font-size: 12px; color: var(--text-3); margin-top: 16px; line-height: 1.8; }
.err { color: var(--danger); font-size: 12.5px; margin-bottom: 10px; min-height: 17px; }

/* ============ 应用外壳 ============ */
.app { display: none; height: 100vh; flex-direction: column; overflow: hidden; }
.app.show { display: flex; }
.layout { flex: 1; display: flex; min-height: 0; }

/* 顶栏 */
.topbar { height: var(--topbar-h); flex-shrink: 0; background: var(--bar-bg); border-bottom: 1px solid var(--bar-line); display: flex; align-items: center; gap: 18px; padding: 0 18px; position: relative; z-index: 20; }
.brand { width: var(--side-w); flex-shrink: 0; display: flex; align-items: center; gap: 10px; transition: width .2s ease; }
.brand-mark { width: 31px; height: 31px; border-radius: 8px; background: linear-gradient(135deg, #165dff, #4080ff); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; letter-spacing: .5px; flex-shrink: 0; }
.brand-text { font-size: 17px; font-weight: 600; color: var(--text); line-height: 1.25; }
.brand-text em { font-style: normal; font-size: 15px; color: var(--text-3); display: block; font-weight: 400; }
/* 左上角 LOGO 区域可点击回首页（2026-10-20）：给出指针与悬停反馈 */
.brand { cursor: pointer; }
.brand:hover .brand-text { color: var(--primary); }
.brand:hover .brand-text em { color: var(--primary); opacity: .75; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.gsearch { display: flex; align-items: center; gap: 7px; width: 240px; height: 34px; padding: 0 12px; background: #fff; border: 1px solid var(--bar-line); border-radius: 17px; color: var(--text-3); cursor: text; transition: border-color .15s; }
.gsearch:hover { border-color: rgba(22, 93, 255, .32); }
.gsearch-ico { display: inline-flex; flex-shrink: 0; }
.gsearch input { flex: 1; width: auto; height: 100%; padding: 0; margin: 0; border: none; border-radius: 0; background: transparent; font-size: 14.5px; }
.gsearch input:hover { border: none; }
.gsearch input:focus { border: none; box-shadow: none; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--bar-hover); color: var(--text); }
.user-box { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--text-2); padding-left: 14px; border-left: 1px solid var(--bar-line); }
.avatar { width: 31px; height: 31px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13.5px; text-transform: uppercase; flex-shrink: 0; }
.top-user { color: var(--text-2); white-space: nowrap; }
.logout { color: var(--text-3); font-size: 14.5px; white-space: nowrap; }
.logout:hover { color: var(--danger); }

/* 侧栏 */
.sidebar { width: var(--side-w); flex-shrink: 0; background: var(--bar-bg); border-right: 1px solid var(--bar-line); display: flex; flex-direction: column; overflow: hidden; transition: width .2s ease; }
.nav { flex: 1; overflow-y: auto; padding: 10px 8px 24px; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(29,33,41,.14); border-radius: 3px; }
.nav-ico { display: inline-flex; align-items: center; flex-shrink: 0; }

/* 二级菜单：默认收起，点击一级菜单后下拉展开 */
.nav-item { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: var(--radius); cursor: pointer; font-size: 14.5px; color: var(--text-2); position: relative; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--bar-hover); color: var(--text); }
.nav-item.active { background: #fff; color: var(--primary); font-weight: 500; box-shadow: 0 1px 2px rgba(22, 93, 255, .12); }
.nav-item.active::before { content: ""; position: absolute; left: -8px; top: 50%; transform: translateY(-50%); width: 3px; height: 15px; border-radius: 0 2px 2px 0; background: var(--primary); }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .9; }
.nav-item .badge { margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 8px; background: #fff; color: var(--text-3); }

/* 一级菜单：分组标题，可点击展开；字号与二级菜单保持一致；行高/行间距比二级菜单大一档 */
.nav-group { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; margin-top: 6px; border-radius: var(--radius); cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--text-2); transition: background .15s, color .15s; }
.nav-group:hover { background: var(--bar-hover); color: var(--text); }
.nav-group.open { color: var(--text); }
.nav-group .caret { margin-left: auto; display: inline-flex; opacity: .5; transition: transform .2s, opacity .2s; }
.nav-group:hover .caret { opacity: .8; }
.nav-group.open .caret { transform: rotate(90deg); opacity: .8; }

.nav-sub { display: none; }
.nav-sub.open { display: block; }
/* 二级菜单已去掉图标（2026-10-20）：缩进改为相对一级标题文字再进 12px，避免文字贴到最左边 */
.nav-sub .nav-item { padding-left: 46px; }

/* 侧栏底部：收起菜单按钮（位于侧栏右下角） */
.side-foot { flex-shrink: 0; display: flex; justify-content: flex-end; padding: 8px 10px; border-top: 1px solid var(--bar-line); }
.side-toggle { width: 34px; height: 34px; padding: 0; border: 1px solid var(--bar-line); border-radius: 9px; background: #fff; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.side-toggle:hover { background: var(--primary-soft); border-color: rgba(22, 93, 255, .3); color: var(--primary); }
.side-toggle svg { display: block; }

/* 侧栏收起态：折叠为 56px 图标栏，一级菜单只留图标（悬停显示原生提示） */
.app.collapsed { --side-w: 56px; }
.app.collapsed .brand { justify-content: center; }
.app.collapsed .brand-text { display: none; }
.app.collapsed .nav { padding: 10px 6px 16px; }
.app.collapsed .nav-group { justify-content: center; padding: 0; }
.app.collapsed .nav-group .nav-label,
.app.collapsed .nav-group .caret { display: none; }
.app.collapsed .nav-sub { display: none !important; }
.app.collapsed .side-foot { justify-content: center; padding: 8px 0; }

.body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.main { flex: 1; position: relative; min-height: 0; min-width: 0; }
/* 多标签页：每个打开的页面是 .main 下一个独立绝对定位容器，各自滚动、互不销毁 */
.page { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; padding: 16px; display: none; }
.page.active { display: block; }

/* ============ 通用组件 ============ */
.page-head { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.page-title { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.page-desc { font-size: 12.5px; color: var(--text-3); margin-top: 5px; max-width: 780px; line-height: 1.6; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.page-head h2 { font-size: 16px; font-weight: 600; }
.page-head p { font-size: 12.5px; color: var(--text-3); margin-top: 5px; max-width: 820px; line-height: 1.6; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 12px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat-card .label { color: var(--text-3); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.stat-card .value { font-size: 22px; font-weight: 600; margin-top: 6px; color: var(--text); line-height: 1.1; }
.stat-card .unit { font-size: 12.5px; color: var(--text-3); font-weight: 400; margin-left: 3px; }

.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.panel > h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }
.panel-head h3 { font-size: 14px; font-weight: 600; }
.panel-body { font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.section { margin-bottom: 12px; }
.section > .panel { margin-bottom: 0; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border-2); white-space: nowrap; }
th { color: var(--text-2); font-weight: 500; font-size: 12.5px; background: #f7f8fa; }
tbody tr:hover { background: #f7f8fa; }
tbody tr:last-child td { border-bottom: none; }
td.wrap { white-space: normal; max-width: 320px; }
.cell-actions { display: flex; gap: 6px; flex-wrap: wrap; }
th.op, td.op { width: 1px; text-align: right; white-space: nowrap; }
td.op .btn.mini { margin-left: 6px; }

.tag { padding: 0 8px; height: 20px; line-height: 20px; border-radius: 2px; font-size: 12px; display: inline-block; background: var(--border-2); color: var(--text-2); }
.tag.g { background: #e8ffea; color: var(--success); }
.tag.b { background: var(--primary-soft); color: var(--primary); }
.tag.y { background: #fff7e8; color: var(--warning); }
.tag.r { background: #ffece8; color: var(--danger); }
.tag.p { background: #f5e8ff; color: var(--purple); }
.tag + .tag { margin-left: 4px; }

.empty { color: var(--text-3); text-align: center; padding: 44px 0 40px; font-size: 12.5px; }
.empty::before { content: ""; display: block; width: 96px; height: 72px; margin: 0 auto 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 72'%3E%3Crect x='14' y='6' width='46' height='58' rx='4' fill='%23dbe9ff'/%3E%3Crect x='24' y='14' width='46' height='52' rx='4' fill='%23ffffff' stroke='%23e5e6eb'/%3E%3Crect x='32' y='24' width='30' height='3' rx='1.5' fill='%23e5e6eb'/%3E%3Crect x='32' y='33' width='22' height='3' rx='1.5' fill='%23e5e6eb'/%3E%3Crect x='32' y='42' width='26' height='3' rx='1.5' fill='%23e5e6eb'/%3E%3Ccircle cx='70' cy='52' r='13' fill='%23165dff'/%3E%3Cpath d='M70 45.5v8' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round'/%3E%3Ccircle cx='70' cy='58' r='1.6' fill='%23ffffff'/%3E%3C/svg%3E") center/contain no-repeat; }
.empty-err { color: var(--text-2); }
.muted { color: var(--text-3); font-size: 12.5px; }
.loading { color: var(--text-3); text-align: center; padding: 40px 0; font-size: 12.5px; }
.loading::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--primary-soft); border-top-color: var(--primary); border-radius: 50%; animation: xai-spin .7s linear infinite; }
@keyframes xai-spin { to { transform: rotate(360deg); } }

.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 24px; }
.kv-item { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.kv-item .k { color: var(--text-3); flex-shrink: 0; }
.kv-item .v { color: var(--text); font-weight: 500; text-align: right; word-break: break-all; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 2px 10px; background: var(--primary-soft); color: var(--primary); border-radius: 10px; font-size: 12px; }
.chip .n { font-weight: 700; margin-left: 4px; }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.bar-row .name { width: 110px; flex-shrink: 0; color: var(--text-2); }
.bar-row .track { flex: 1; height: 6px; background: var(--border-2); border-radius: 3px; overflow: hidden; }
.bar-row .fill { height: 100%; background: linear-gradient(90deg, #165dff, #4080ff); border-radius: 3px; }
.bar-row .num { width: 54px; text-align: right; color: var(--text-2); flex-shrink: 0; }
.bars { display: block; }
.bar-name { width: 110px; flex-shrink: 0; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 6px; background: var(--border-2); border-radius: 3px; overflow: hidden; display: block; }
.bar-track > i { display: block; height: 100%; background: linear-gradient(90deg, #165dff, #4080ff); border-radius: 3px; }
/* 数值区原固定 60px：装不下「1286 / 5000 次/月 + 接近上限」时被压成竖排单字，改为自适应不换行 */
.bar-val { margin-left: auto; min-width: 150px; text-align: right; color: var(--text-2); flex-shrink: 0; white-space: nowrap; }
.bar-val .tag { vertical-align: middle; }
.bar-track > i.r { background: #e24b4a; }
.bar-track > i.y { background: #ef9f27; }

/* 执行结果 / AI trace */
.trace { border-left: 2px solid var(--primary-soft); padding-left: 14px; margin-top: 12px; }
.trace-step { position: relative; padding: 8px 0 8px 6px; font-size: 13px; }
.trace-step::before { content: ""; position: absolute; left: -21px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.trace-step .t { color: var(--text-3); font-size: 12px; }
.code { background: #f7f8fa; border: 1px solid var(--border); color: var(--text-2); padding: 12px 14px; border-radius: var(--radius); font-family: Consolas, Menlo, monospace; font-size: 12.5px; line-height: 1.65; overflow-x: auto; white-space: pre-wrap; word-break: break-word; margin-top: 10px; }
.answer { background: #f7f8fa; border: 1px solid var(--border-2); border-radius: var(--radius); padding: 14px; font-size: 13px; line-height: 1.75; white-space: pre-wrap; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.inline-form .fld { margin-bottom: 0; }
.fld { margin-bottom: 12px; }
.fld label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.fld label .req { color: var(--danger); margin-left: 2px; }
.fld input, .fld select, .fld textarea { margin-bottom: 0; }

.search-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.search-row input, .search-row select { margin-bottom: 0; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 4px; }
.btn-row .btn { width: auto; padding: 0 16px; }
.gen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }
.gen-grid .wide { grid-column: 1 / -1; }

/* 建站表单：多选勾选项 / 页面清单（勾选可增减、标题可改） */
.chk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 6px 10px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg-2); }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  color: var(--text-2); white-space: nowrap; }
.chk input { margin: 0; }
.inline-row { display: flex; align-items: center; gap: 8px; font-size: 13px;
  color: var(--text-2); margin-top: 8px; }
.inline-row select { margin: 0; width: auto; min-width: 150px; }
.page-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.page-row .chk { min-width: 132px; }
.page-row code { font-size: 12px; color: var(--text-3); }
.page-row input { margin: 0; flex: 1; }
.page-row .btn { width: auto; padding: 0 12px; }

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.field > span em { color: var(--danger); font-style: normal; }
.field input, .field select, .field textarea { margin-bottom: 0; }
.field .hint { display: block; font-size: 12px; color: var(--text-3); margin-top: 4px; }

.answer-title { font-size: 12.5px; color: var(--text-3); margin-bottom: 8px; font-weight: 600; }
.answer-body { background: #f7f8fa; border: 1px solid var(--border-2); border-radius: var(--radius); padding: 12px 14px; font-family: inherit; font-size: 13px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; margin-bottom: 12px; }
.answer-body.small { font-size: 12.5px; }
.hits { display: flex; flex-direction: column; gap: 10px; }
.hit { border: 1px solid var(--border-2); border-radius: var(--radius); padding: 12px 14px; background: #f7f8fa; }
.hit-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.hit-body { font-size: 12.5px; color: var(--text-2); line-height: 1.7; }

/* ============ 弹窗 ============ */
.modal-mask { display: none; position: fixed; inset: 0; background: rgba(29, 33, 41, .4); align-items: flex-start; justify-content: center; z-index: 99; padding: 60px 16px; overflow-y: auto; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: var(--radius-lg); padding: 20px; width: 560px; max-width: 100%; box-shadow: var(--shadow-lg); animation: pop .18s ease; }
@keyframes pop { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { margin-bottom: 16px; font-size: 15px; font-weight: 600; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.modal-actions .btn { width: auto; padding: 0 20px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { margin-bottom: 0; font-size: 15px; font-weight: 600; }
.modal-close { color: var(--text-3); display: inline-flex; cursor: pointer; }
.modal-close:hover { color: var(--text); }
.modal-body { max-height: 62vh; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.modal-foot .btn { width: auto; padding: 0 20px; }

/* ============ Toast ============ */
.toast-wrap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast { padding: 9px 16px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-lg); font-size: 13px; border: 1px solid var(--border); border-left: 3px solid var(--primary); animation: pop .18s ease; max-width: 480px; }
.toast.ok { border-left-color: var(--success); }
.toast.err { border-left-color: var(--danger); }
.toast.out { opacity: 0; transition: opacity .4s; }

/* ============ 兼容旧类名 ============ */
.login-wrap.hide { display: none; }
/* 已登录刷新时，首屏即隐藏登录页，避免一闪而过 */
html.authed .login-wrap { display: none; }

.crumb { font-size: 14px; font-weight: 600; }
.kv-single { font-size: 13px; padding: 6px 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 12px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.card-label { color: var(--text-3); font-size: 12.5px; }
.card-value { font-size: 21px; font-weight: 600; margin-top: 6px; line-height: 1.15; }
.card-value i { font-size: 12.5px; font-weight: 400; color: var(--text-3); margin-left: 3px; font-style: normal; }
dl.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2px 24px; }
dl.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
dl.kv dt { color: var(--text-3); font-size: 13px; flex-shrink: 0; }
dl.kv dd { font-size: 13px; font-weight: 500; text-align: right; word-break: break-all; }

/* ============ M0 智能工作台组件 ============ */
/* 时间区间 / 分段按钮 */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.seg button { height: 30px; padding: 0 14px; border: none; border-right: 1px solid var(--border); background: #fff; color: var(--text-2); font-size: 13px; font-family: inherit; cursor: pointer; transition: background .15s, color .15s; }
.seg button:last-child { border-right: none; }
.seg button:hover { background: #f7f8fa; color: var(--text); }
.seg button.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.bar-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

/* 驾驶舱 KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(188px, 1fr)); gap: 12px; margin-bottom: 12px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.kpi-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.kpi-head .k-ico { display: inline-flex; color: var(--primary); }
.kpi-val { font-size: 26px; font-weight: 600; line-height: 1.25; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.kpi-val i { font-size: 12.5px; font-style: normal; font-weight: 400; color: var(--text-3); margin-left: 4px; }
.kpi-foot { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.delta { font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }
.delta.flat { color: var(--text-3); }

/* 趋势柱状图 */
.legend { display: flex; gap: 14px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); cursor: pointer; user-select: none; }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.legend span.off { opacity: .38; }
.trend { display: flex; align-items: flex-end; gap: 3px; height: 152px; padding-top: 6px; border-bottom: 1px solid var(--border-2); }
.trend .tc { flex: 1; min-width: 5px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.trend .tc i { display: block; width: 100%; max-width: 20px; min-height: 2px; border-radius: 2px 2px 0 0; }
.trend-x { display: flex; gap: 3px; margin-top: 6px; }
.trend-x span { flex: 1; min-width: 5px; text-align: center; font-size: 11px; color: var(--text-4); white-space: nowrap; }
.trend-x span.hide { visibility: hidden; }

/* 转化漏斗 */
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel-row { display: flex; align-items: center; gap: 10px; }
.funnel-row .f-label { width: 64px; flex-shrink: 0; font-size: 12.5px; color: var(--text-2); }
.funnel-row .f-track { flex: 1; height: 22px; border-radius: var(--radius); background: var(--border-2); overflow: hidden; }
.funnel-row .f-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #4080ff); }
.funnel-row .f-val { width: 78px; text-align: right; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.funnel-row .f-rate { width: 52px; text-align: right; font-size: 12px; color: var(--text-3); }

/* 待办列表 */
.todo-list, .notice-list { display: flex; flex-direction: column; gap: 10px; }
.todo { border: 1px solid var(--border-2); border-left: 3px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; background: #fff; }
.todo.error { border-left-color: var(--danger); }
.todo.warning { border-left-color: var(--warning); }
.todo.info { border-left-color: var(--primary); }
.todo .t-main { flex: 1; min-width: 0; }
.todo .t-title { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.todo .t-meta { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.todo .t-detail { font-size: 12.5px; color: var(--text-2); line-height: 1.65; }
.todo .t-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.todo.done { opacity: .75; }

/* 通知中心 */
.notice { border: 1px solid var(--border-2); border-radius: var(--radius); padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; background: #fff; }
.notice.unread { background: #f5f8ff; border-color: rgba(22, 93, 255, .22); }
.notice .n-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); margin-top: 6px; flex-shrink: 0; }
.notice.unread .n-dot { background: var(--primary); }
.notice .n-main { flex: 1; min-width: 0; }
.notice .n-title { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notice .n-body { font-size: 12.5px; color: var(--text-2); line-height: 1.65; }
.notice .n-time { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* 快捷入口 */
.sc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(198px, 1fr)); gap: 10px; }
.sc-card { border: 1px solid var(--border-2); border-radius: var(--radius); padding: 11px 14px; background: #fff; display: flex; align-items: center; gap: 10px; }
.sc-card .sc-main { flex: 1; min-width: 0; cursor: pointer; }
.sc-card .sc-label { font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.sc-card .sc-group { font-size: 12px; color: var(--text-3); }
.sc-card .sc-ops { display: flex; gap: 2px; }
.sc-group-title { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 14px 0 8px; }
.sc-group-title:first-child { margin-top: 0; }
.sc-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 8px; }
.sc-item { border: 1px dashed var(--border); border-radius: var(--radius); padding: 9px 12px; font-size: 12.5px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fff; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.sc-item:hover { border-color: var(--primary); border-style: solid; background: var(--primary-soft); color: var(--primary); }
.sc-item.on { border-style: solid; border-color: var(--border-2); background: var(--border-2); color: var(--text-3); cursor: default; }
.sc-item.on:hover { background: var(--border-2); color: var(--text-3); border-color: var(--border-2); }

/* 选项卡与统计胶囊 */
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.tabs div { padding-bottom: 10px; font-size: 13.5px; color: var(--text-2); cursor: pointer; position: relative; }
.tabs div:hover { color: var(--primary); }
.tabs div.on { color: var(--primary); font-weight: 600; }
.tabs div.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--primary); }
.tabs div .cnt { font-size: 12px; color: var(--text-3); margin-left: 3px; }
.stat-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { border: 1px solid var(--border); border-radius: 999px; padding: 6px 13px; font-size: 12.5px; color: var(--text-2); background: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, border-color .15s, color .15s; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip b { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.chip.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.chip.on b { color: var(--primary); }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; max-height: 42vh; border-right: none; border-bottom: 1px solid var(--border); }
  .brand { width: auto; }
  .brand-text em { display: none; }
  .topbar { padding: 0 12px; gap: 10px; }
  .gsearch { width: 150px; }
  .top-user { display: none; }
  .stats, .cards { grid-template-columns: repeat(2, 1fr); }
  .page { padding: 12px; }
}

/* ============ M5 作业队列提示条（「作业就位却拨不出去」的原因说明） ============ */
.m5-alert { font-size: 12.5px; line-height: 1.8; border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--border); background: #f7f8fa; color: #4e5969; }
.m5-alert b { color: #1d2129; }
.m5-alert.warn { color: #a8590b; background: #fff8e6; border-color: #ffe1a8; }
.m5-alert.warn b { color: #a8590b; }
.m5-alert.ok { color: #0e7a45; background: #eafaf1; border-color: #b7e8cd; }

/* ============ M5 拨打对象选择器 ============ */
.m5-hidden { display: none !important; }
.m5-pick { max-height: 190px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; margin-bottom: 6px; }
.m5-pick-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px dashed var(--border-2); font-size: 12.5px; cursor: pointer; }
.m5-pick-item:last-child { border-bottom: none; }
.m5-pick-item:hover { background: #f7f8fa; }
.m5-pick-item input[type=checkbox] { width: auto; height: auto; margin: 0; flex: 0 0 auto; }
.m5-pick-item .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m5-pick-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ============ M5 加微待办（任务驱动主动加微，移动端优先） ============ */
.m5w-note { margin-top: 10px; font-size: 12.5px; color: var(--text-3); line-height: 1.8; display: flex; gap: 6px; align-items: flex-start; }
.m5w-note svg { flex: 0 0 auto; margin-top: 2px; color: var(--primary); }
.m5w-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: #fff; }
.m5w-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.m5w-type { font-size: 12px; color: #fff; background: var(--primary); border-radius: 10px; padding: 1px 9px; }
.m5w-acct { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 19px; font-weight: 600; letter-spacing: .4px; word-break: break-all; }
.m5w-mono { font-family: ui-monospace, Consolas, "Courier New", monospace; }
.m5w-steps { background: var(--bar-bg); border: 1px solid #d6e4ff; border-radius: var(--radius); padding: 10px 12px; margin: 12px 0; font-size: 13px; color: #4e5969; line-height: 2; }
/* 只作用于「直接子级」的标题，否则卡片里行内强调的 <b> 会被顶成块级 */
.m5w-steps > b { display: block; color: #1d2129; margin-bottom: 2px; font-weight: 600; }
.m5w-steps .m5w-k { color: var(--primary); font-weight: 600; font-style: normal; }
.m5w-steps span { display: inline-block; width: 17px; height: 17px; line-height: 17px; text-align: center; border-radius: 50%; background: var(--primary); color: #fff; font-size: 11px; margin: 0 3px 0 8px; vertical-align: 1px; }
.m5w-steps span:first-of-type { margin-left: 0; }
.m5w-hint { font-size: 12.5px; color: var(--text-3); line-height: 1.8; margin-top: 10px; }
.m5w-acts, .m5w-res { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.m5w-acts .btn { min-height: 40px; }
.m5w-res .btn { min-height: 44px; flex: 1 1 auto; min-width: 150px; }
.m5w-wait { display: flex; gap: 12px; align-items: center; padding: 18px 16px; border: 1px dashed var(--border); border-radius: var(--radius); background: #fff; }
.m5w-wait-ico { color: var(--primary); flex: 0 0 auto; }
.m5w-wait-t { font-size: 14px; color: #1d2129; }
.m5w-wait-s { font-size: 13px; color: var(--text-3); margin-top: 4px; }
@media (max-width: 640px) {
  .m5w-acct { font-size: 17px; }
  .m5w-res .btn, .m5w-acts .btn { min-width: 100%; }
}

/* ==================== M5 AI话术引擎（.m5v-*） ==================== */
.m5v-legend { font-size: 12.5px; color: var(--text-3); line-height: 1.8; background: #f7f8fa; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; }
.m5v-legend svg, .m5v-note svg, .m5v-warn svg { vertical-align: -2px; margin-right: 4px; }
.m5v-note { font-size: 12.5px; color: var(--text-3); line-height: 1.8; margin-top: 10px; }
.m5v-warn { font-size: 12.5px; color: #a8590b; background: #fff8e6; border: 1px solid #ffe1a8; border-radius: var(--radius); padding: 10px 12px; margin-top: 10px; line-height: 1.8; }
.m5v-bars { margin-top: 12px; }
.m5v-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.m5v-pick select { min-width: 260px; max-width: 100%; height: 34px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: #1d2129; font-size: 13px; }
.m5v-meta { font-size: 12.5px; color: var(--text-3); }
.m5v-grow { flex: 1 1 auto; }
.m5v-desc { font-size: 13px; color: var(--text-2); line-height: 1.8; margin-bottom: 10px; }
.m5v-none { font-size: 12.5px; color: var(--text-3); }
.m5v-key { font-size: 12px; color: var(--text-3); background: #f2f3f5; border-radius: 3px; padding: 1px 6px; }
.m5v-chip { display: inline-block; font-size: 12px; color: #1d2129; background: #f2f3f5; border-radius: 3px; padding: 1px 7px; margin: 0 6px 4px 0; }
.m5v-edge { display: inline-block; font-size: 12px; color: var(--primary); background: #e8f1ff; border-radius: 3px; padding: 1px 7px; margin: 0 6px 4px 0; }
.m5v-nodes { display: flex; flex-direction: column; gap: 10px; }
.m5v-node { border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius); padding: 10px 12px; background: #fff; }
.m5v-node.off { opacity: .55; border-left-color: var(--border); }
.m5v-nhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m5v-nhead code { font-size: 12px; color: var(--text-3); }
.m5v-nhead b { font-size: 14px; color: #1d2129; }
.m5v-reply { font-size: 13px; color: #1d2129; line-height: 1.8; margin-top: 8px; background: #f7f8fa; border-radius: var(--radius); padding: 8px 10px; }
.m5v-prompt { font-size: 12.5px; color: var(--text-3); line-height: 1.8; margin-top: 6px; }
.m5v-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.m5v-lab { font-size: 12.5px; color: var(--text-3); flex: 0 0 auto; }

/* ---------- 试话术：文字对话模拟器 ---------- */
.m5v-simbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.m5v-simbar select { min-width: 220px; height: 34px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; font-size: 13px; color: #1d2129; }
.m5v-simbar input { flex: 1 1 200px; min-width: 160px; height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; color: #1d2129; }
.m5v-chat { height: 380px; overflow-y: auto; background: #f7f8fa; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.m5v-chat.view { height: auto; max-height: 460px; margin-top: 10px; }
.m5v-hint { font-size: 12.5px; color: var(--text-3); line-height: 1.9; }
.m5v-msg { display: flex; flex-direction: column; max-width: 78%; }
.m5v-msg.ai { align-self: flex-start; align-items: flex-start; }
.m5v-msg.me { align-self: flex-end; align-items: flex-end; }
.m5v-bubble { font-size: 13px; line-height: 1.8; padding: 9px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--border); color: #1d2129; word-break: break-word; }
.m5v-msg.me .m5v-bubble { background: var(--primary); border-color: var(--primary); color: #fff; }
.m5v-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; font-size: 12px; color: var(--text-3); }
.m5v-sysline { align-self: center; font-size: 12px; color: var(--text-3); }
.m5v-quick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.m5v-q { border: 1px dashed var(--border); background: #fff; color: var(--text-2); font-size: 12.5px; border-radius: 14px; padding: 4px 11px; cursor: pointer; }
.m5v-q:hover { border-color: var(--primary); color: var(--primary); border-style: solid; }
.m5v-saybar { display: flex; gap: 8px; margin-top: 10px; }
.m5v-saybar input { flex: 1 1 auto; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; color: #1d2129; }
.m5v-info { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 12px; font-size: 12.5px; color: var(--text-3); }
.m5v-end { margin-top: 12px; padding: 12px; border: 1px solid #b7ebc6; background: #f0fff5; border-radius: var(--radius); font-size: 13px; color: #1d2129; line-height: 1.9; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.m5v-sum { flex: 1 1 100%; font-size: 13px; color: var(--text-2); line-height: 1.8; }
@media (max-width: 640px) {
  .m5v-msg { max-width: 92%; }
  .m5v-chat { height: 320px; }
  .m5v-pick select, .m5v-simbar select { min-width: 100%; }
  .m5v-simbar .btn, .m5v-saybar .btn { min-width: 100%; }
}

/* ==================== M5 通话录音转写（.m5r-*） ==================== */
.m5r-ch { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; font-size: 13px; line-height: 1.85; }
.m5r-ch.ok { background: #f0f9eb; border-color: #c6e8c0; color: #2f7a25; }
.m5r-ch.warn { background: #fff7e8; border-color: #ffe0a3; color: #9a6400; }
.m5r-ch.off { background: #f7f8fa; border-color: var(--border); color: var(--text-2); }
.m5r-ch-t { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.m5r-ch-s { font-size: 12.5px; opacity: .85; }
.m5r-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 10px; font-size: 12.5px; color: var(--text-3); line-height: 1.9; }
.m5r-note svg { flex: 0 0 auto; margin-top: 3px; color: var(--primary); }
.m5r-note b { color: #1d2129; font-weight: 600; }
.m5r-code { background: #f2f3f5; border: 1px solid var(--border-2); border-radius: 3px; padding: 0 5px; font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 12px; color: var(--text-2); display: inline-block; margin: 2px 2px 0 0; }
.m5r-drop { border: 1px dashed var(--border); border-radius: var(--radius); background: #fafbfc; padding: 22px 16px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.m5r-drop:hover { border-color: var(--primary); background: var(--primary-soft); }
.m5r-drop-ico { color: var(--primary); margin-bottom: 6px; }
.m5r-drop-t { font-size: 13.5px; color: var(--text); }
.m5r-drop-s { font-size: 12.5px; color: var(--text-3); margin-top: 5px; word-break: break-all; }
.m5r-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 14px; margin-top: 14px; }
.m5r-meta .field { margin-bottom: 12px; }
.m5r-log { margin-top: 10px; font-size: 12.5px; color: var(--text-3); line-height: 1.9; word-break: break-all; }
.m5r-log ul { margin: 4px 0 0 18px; }
.m5r-text { font-size: 13px; line-height: 1.9; white-space: pre-wrap; word-break: break-word; background: #f7f8fa; border: 1px solid var(--border-2); border-radius: var(--radius); padding: 12px 14px; }
.m5r-audio { margin: 12px 0; }
.m5r-audio audio { width: 100%; height: 34px; }
.m5r-file { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 12.5px; word-break: break-all; }
.m5r-kw { height: 30px; width: 220px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; font-family: inherit; color: var(--text); background: #fff; }
.m5r-kw:focus { outline: none; border-color: var(--primary); }
@media (max-width: 640px) {
  .m5r-meta { grid-template-columns: 1fr; }
  .m5r-drop { padding: 16px 12px; }
  .m5r-kw { width: 100%; }
}


/* ===== 三级菜单（出海系统子模块） ===== */
.nav-sub3 { display: none; }
.nav-sub3.open { display: block; }
.nav-item-group { cursor: pointer; }
.nav-item-group .caret-sm {
  margin-left: auto;
  width: 14px; height: 14px;
  transition: transform .15s ease;
  opacity: .6;
}
.nav-item-group.open .caret-sm { transform: rotate(90deg); }
.nav-item-3 {
  /* 三级在二级基础上再缩进 16px，形成清晰层级 */
  padding-left: 62px !important;
  font-size: 13px;
  color: #5b6577;
}
.nav-item-3 .nav-label { font-weight: 400; }
.nav-item-3:hover { background: rgba(22,93,255,.06); color: #165dff; }
.nav-item-3.active {
  color: #165dff;
  background: rgba(22,93,255,.10);
}
.nav-item-group.active > .nav-label { color: #165dff; }

/* ==================== 多标签页（右侧操作区页签） ==================== */
/* 命名用 xtab 前缀：登录框已占用 .tab，避免样式互相污染 */
.xtabbar { height: 38px; flex-shrink: 0; display: flex; align-items: flex-end; gap: 4px; padding: 0 10px; background: #fff; border-bottom: 1px solid var(--border); }
.xtabbar-scroll { flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; gap: 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.xtabbar-scroll::-webkit-scrollbar { height: 0; }
.xtab { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; font-size: 13px; color: var(--text-2); white-space: nowrap; max-width: 176px; cursor: pointer; user-select: none; border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0; margin-bottom: -1px; transition: background .15s, color .15s; }
.xtab:hover { background: var(--bar-bg); color: var(--text); }
.xtab.active { background: #fff; color: var(--primary); font-weight: 500; border-color: var(--border); border-bottom-color: #fff; box-shadow: inset 0 2px 0 var(--primary); }
.xtab-ico { display: inline-flex; flex-shrink: 0; opacity: .85; }
.xtab-label { overflow: hidden; text-overflow: ellipsis; }
.xtab-x { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%; color: var(--text-3); transition: background .15s, color .15s; }
.xtab-x:hover { background: rgba(245, 63, 63, .12); color: var(--danger); }
/* 按住拖动：标签左右排序 / 空白处横向滚动（2026-10-20） */
.xtabbar-scroll { user-select: none; }
.xtab { touch-action: pan-y; }
.xtab.dragging { opacity: .55; cursor: grabbing; }
.xtabbar-scroll.grabbing,
.xtabbar-scroll.dragging-active { cursor: grabbing; }
.xtabbar-ops { position: relative; padding-bottom: 3px; margin-left: auto; }
.xtab-ops-btn { display: inline-flex; align-items: center; justify-content: center; height: 24px; padding: 0 7px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text-2); cursor: pointer; }
.xtab-ops-btn:hover { background: var(--bar-bg); color: var(--text); }
.xtab-ops-menu { position: absolute; right: 0; top: 100%; margin-top: 4px; min-width: 108px; padding: 4px; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg); z-index: 60; display: none; }
.xtab-ops-menu.show { display: block; }
.xtab-ops-menu a { display: block; padding: 7px 12px; font-size: 13px; color: var(--text-2); border-radius: 6px; cursor: pointer; }
.xtab-ops-menu a:hover { background: var(--bar-bg); color: var(--text); }
.xtab-ops-menu a.disabled { color: var(--text-3); pointer-events: none; opacity: .55; }

/* ==================== 忘记密码：两步步骤条 ==================== */
.reset-steps { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 12.5px; color: var(--text-3); }
.reset-steps span { padding: 3px 10px; border-radius: 999px; background: #f2f3f5; }
.reset-steps span.active { background: var(--primary-soft); color: var(--primary); font-weight: 500; }
.reset-steps i { font-style: normal; color: var(--text-3); }


/* ==========================================================================
   角色与权限：权限矩阵编辑器（任务 #8）
   ========================================================================== */
.rb-layout { display: grid; grid-template-columns: 230px 1fr; gap: 12px; align-items: start; }
.rb-role-list { max-height: 520px; overflow: auto; }
.rb-role-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-radius: var(--radius-lg); cursor: pointer; font-size: 13px; color: var(--text-2);
  margin-bottom: 2px; }
.rb-role-item:hover { background: var(--bg); }
.rb-role-item.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.rb-role-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-key { font-size: 11px; color: var(--text-3); font-weight: 400; }
.rb-mod { margin-bottom: 16px; }
.rb-mod-head { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.rb-note { font-size: 12px; color: var(--text-3); line-height: 1.7; padding: 8px 12px;
  background: var(--bg); border-radius: var(--radius-lg); margin-bottom: 10px; }
@media (max-width: 960px) { .rb-layout { grid-template-columns: 1fr; } }

/* ===== M17 角色与权限（批次六）：平台/用户角色分类 + 树形权限矩阵 ===== */
.rb-group { margin-bottom: 10px; }
.rb-group-title { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 6px 10px 4px; letter-spacing: .3px; }
.rb-role-list { max-height: 560px; overflow: auto; }
.rb-role-item { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px; cursor: pointer; transition: background .12s; }
.rb-role-item:hover { background: var(--bg-2); }
.rb-role-item.on { background: #e8f0ff; }
.rb-role-name { flex: 1; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-key { font-size: 11px; color: var(--text-3); }
/* 批次二十五：角色位次上下移动（仅超管可见）。注意不要复用 .rb-arrow —— 那个类是
   一级模块折叠箭头（宽度 14px 居中），会被这里覆盖掉。
   两个箭头**横排一行两列**（左 ↑ 右 ↓），占 ~18px，配合 .rb-layout 加宽到 262px，
   角色名仍完整显示。 */
.rb-move { display: inline-flex; flex-direction: row; align-items: center; gap: 1px;
  flex: 0 0 auto; margin-left: 2px; }
.rb-mv { border: 0; background: transparent; padding: 0 1px; font-size: 10px; line-height: 1.1;
  color: var(--text-3); cursor: pointer; border-radius: 3px; }
.rb-mv:hover:not(:disabled) { color: var(--primary); background: var(--primary-soft); }
.rb-mv:disabled { opacity: .25; cursor: default; }

/* 一级模块：可点击折叠 */
.rb-mod { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; overflow: hidden; background: #fff; }
.rb-mod-off { opacity: .5; }
.rb-mod-head { display: flex; align-items: center; gap: 6px; padding: 9px 12px; font-size: 13px; font-weight: 600; color: var(--text); background: var(--bg-2); cursor: pointer; user-select: none; }
.rb-mod-head.on { background: #eef3fb; }
.rb-arrow { display: inline-block; width: 14px; text-align: center; color: var(--text-3); font-size: 11px; }

/* 二级页面：可点击折叠 */
.rb-sub { margin: 6px 0 6px 14px; border-left: 2px solid var(--border); padding-left: 10px; }
.rb-sub-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.rb-sub-head.on { color: var(--primary); }

/* 权限勾选项：与文字同尺寸的小勾选框 */
.rb-chk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 10px; padding: 10px 12px; }
.rb-chk { font-size: 13px; color: var(--text-2); white-space: nowrap; align-items: center; gap: 6px; }
.rb-chk input[type=checkbox] { width: 14px; height: 14px; margin: 0 2px 0 0; vertical-align: -2px; cursor: pointer; }

/* ===== M17 角色与权限（批次五）：改名框 + A1 灰显 ===== */
.rb-name-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.rb-name-input { flex: 0 1 280px; font-size: 13px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); }
.rb-name-input:focus { outline: none; border-color: var(--primary); }
.rb-chk.rb-nogate { color: var(--text-3); cursor: not-allowed; }
.rb-nogate-note { font-size: 11px; color: var(--text-3); }
.rb-chk.rb-nogate input { opacity: .5; }

/* 加量包卡片（批次十三）：价目按资源分组，客户点「购买」下单 */
.pack-group { margin-bottom: 16px; }
.pack-group-title { font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 8px; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 10px; }
.pack-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.pack-name { font-size: 13px; color: var(--text-2); }
.pack-amount { font-size: 16px; font-weight: 600; color: var(--text); }
.pack-price { font-size: 17px; font-weight: 600; color: var(--primary); }
.pack-dur { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.pack-card .btn { align-self: flex-start; margin-top: auto; }

/* ===== M17 角色与权限（批次十六）：左栏吸顶等高 + 权限点表格化 ===== */
/* 批次二十五：箭头横排后左右少 10px，252 → 262px，保证「平台超级管理员」不被截断 */
.rb-layout { grid-template-columns: 262px minmax(0, 1fr); }
.rb-side { position: sticky; top: 8px; height: calc(100vh - 140px); min-height: 360px;
  margin-bottom: 0; display: flex; flex-direction: column; }
.rb-side .panel-head { flex: 0 0 auto; margin-bottom: 8px; }
.rb-side .rb-role-list { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto;
  margin: 0 -6px; padding: 0 6px; }
.rb-main { margin-bottom: 0; }

/* 角色名称行：强制单行，徽标与类型不参与压缩（原先被 flex 压成竖排） */
.rb-name-row { flex-wrap: nowrap; }
.rb-name-row > * { flex: 0 0 auto; white-space: nowrap; }
.rb-name-row .rb-name-input { flex: 1 1 200px; min-width: 140px; max-width: 340px;
  height: 30px; margin-bottom: 0; }
.rb-name-lab { color: var(--text-2); font-size: 13px; }
/* 批次二十二：只读角色的名称框要一眼看出不可改（浏览器默认禁用态太弱） */
.rb-name-input:disabled { background: var(--bg); color: var(--text-3);
  cursor: not-allowed; border-color: var(--border-2); }

/* 通配权限提示：单行轻提示，替代原灰底说明块 */
.rb-tip { font-size: 12px; color: var(--text-3); padding: 7px 12px; margin-top: 8px;
  background: var(--bg); border-radius: var(--radius); }

/* 批次二十二：角色只读提示条（平台预设 / 自身登录角色 / 受保护角色不可删） */
.rb-lock-bar { display: flex; align-items: center; gap: 7px;
  font-size: 12px; line-height: 1.6; color: var(--text-2);
  padding: 7px 12px; margin-top: 8px;
  background: var(--primary-soft); border: 1px solid var(--bar-line);
  border-radius: var(--radius); }
.rb-lock-bar::before { content: ""; flex: 0 0 auto; width: 6px; height: 6px;
  border-radius: 50%; background: var(--warning); }

/* 权限点表格：一级菜单 | 权限点，二级全部展开不可折叠 */
.rb-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px;
  border: 1px solid var(--border); }
.rb-table thead th { text-align: left; font-weight: 500; font-size: 12px; color: var(--text-3);
  background: #f7f8fa; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.rb-table th.rb-th-mod { width: 148px; }
.rb-table td { padding: 9px 12px; vertical-align: top; white-space: normal;
  border-bottom: 1px solid var(--border-2); }
.rb-table tbody tr:last-child td { border-bottom: none; }
.rb-table td.rb-td-mod { width: 148px; border-right: 1px solid var(--border-2); }
.rb-mod-name { font-size: 13px; font-weight: 600; color: var(--text); }
/* 批次二十一：与一级菜单名左对齐，不再贴表格左边界。
   缩进 = td padding 12 + .rb-mod-head padding 12 + 勾选框 14 + flex gap 6 = 32px */
.rb-mod-meta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; padding-left: 32px; }
.rb-perms { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.rb-chk-static { font-size: 13px; color: var(--text-3); cursor: default; }
.rb-tr-rule td { background: #f5f8ff; }
.rb-rule { font-size: 12px; color: var(--text-3); line-height: 1.65; }
.rb-tr-off .rb-mod-name, .rb-tr-off .rb-perms { opacity: .5; }

/* 批次二十：一级菜单三态全选 + 菜单项独立勾选 */
.rb-mod-head { display: flex; align-items: flex-start; gap: 6px; }
.rb-mod-head input.rb-mod-chk {
  width: 14px; height: 14px; margin: 2px 0 0; flex: 0 0 auto; cursor: pointer;
}
.rb-mod-head .rb-mod-name { flex: 1 1 auto; }
.rb-tr-off .rb-mod-head input.rb-mod-chk { cursor: not-allowed; }
.rb-chk.rb-chk-multi { color: var(--text); }
.rb-chk input[type=checkbox]:indeterminate { opacity: .85; }

@media (max-width: 960px) {
  .rb-layout { grid-template-columns: 1fr; }
  .rb-side { position: static; height: auto; }
  .rb-side .rb-role-list { max-height: 420px; }
}


/* ===== M17 角色与权限（批次十七）：标题 / 角色名称 / 通配提示 合并为一行 ===== */
.rb-head { justify-content: flex-start; flex-wrap: nowrap; align-items: center; gap: 12px; }
.rb-head h3 { flex: 0 0 auto; white-space: nowrap; }
.rb-head .tools { margin-left: auto; flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.rb-head-slot { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; }
/* 名称组：去掉独立行的底色与分隔线，与标题同行垂直居中 */
.rb-head .rb-name-row { padding: 0; border-bottom: none; background: none; gap: 8px; flex: 0 0 auto; }
.rb-head .rb-name-input { flex: 0 0 auto; width: 180px; max-width: 180px; min-width: 0;
  height: 30px; line-height: 18px; padding: 0 8px; margin: 0; box-sizing: border-box; }
/* 通配提示：行内浅色小字，占剩余宽度，不再占独立一行 */
.rb-head .rb-tip { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; background: none;
  border-radius: 0; font-size: 12px; color: var(--text-3); line-height: 20px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1300px) {
  .rb-head { flex-wrap: wrap; }
  .rb-head-slot { flex: 1 1 auto; }
  .rb-head .rb-tip { white-space: normal; }
  /* 窄屏：隐藏辅助说明，保留按钮在第一行 */
  .rb-head .tools .rb-key { display: none; }
}

/* ===== 批次十九：角色左栏搜索（企业可自建角色、角色数可能较多）===== */
.rb-search-wrap { flex: 0 0 auto; padding: 0 12px 8px; }
.rb-search { width: 100%; height: 30px; margin: 0; padding: 0 10px; font-size: 12px;
  box-sizing: border-box; border-radius: 6px; }
.rb-empty { padding: 24px 12px; text-align: center; color: var(--text-3); font-size: 12px; }
/* 搜索后计数条显示「命中 / 总数」 */
#rbRoleCount { white-space: nowrap; }

/* ===== 批次二十七：全模块经营明细（原「BI 数据报表」并入业务驾驶舱） ===== */
.biz-tbl th.num, .biz-tbl td.num { text-align: right; }
.biz-tbl td.num b { font-weight: 600; font-variant-numeric: tabular-nums; }
.biz-tbl td.num small { color: var(--text-3); font-size: 11px; margin-left: 2px; }
.biz-tbl td.biz-mod { font-weight: 500; color: var(--text); }
.biz-tbl td.biz-sub { color: var(--text-2); white-space: normal; min-width: 260px; }
.biz-tip { margin: 0 0 10px; padding: 8px 12px; border-radius: 6px; font-size: 12.5px;
  color: var(--text-2); background: var(--bg-2); border: 1px solid var(--border-2); }

/* ===== M12 出海数据（proscaapp 绿色主题风格） ===== */
.m12-head { display: flex; align-items: center; gap: 12px; margin: 2px 0 8px; flex-wrap: wrap; }
.m12-head h2 { font-size: 20px; font-weight: 700; color: var(--text); }
.m12-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px;
  background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; font-size: 12.5px; }
.m12-sub { color: var(--text-2); font-size: 13px; margin-bottom: 14px; }

.m12-bigtabs { display: inline-flex; margin-bottom: 16px; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 5px; gap: 4px; }
.m12-bigtabs button { display: inline-flex; align-items: center; gap: 7px; padding: 0 42px; height: 40px;
  border: none; background: transparent; border-radius: 9px; font-size: 14px; color: #047857;
  cursor: pointer; font-family: inherit; }
.m12-bigtabs button:hover { background: #ecfdf5; }
.m12-bigtabs button.on { background: #0e9f6e; color: #fff; }

.m12-filtercard { background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px 14px; margin-bottom: 14px; }
.m12-filtercard h3 { font-size: 15px; font-weight: 700; color: var(--text); }
.m12-fsub { color: var(--text-3); font-size: 12.5px; margin: 4px 0 16px; }
.m12-frow { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.m12-fitem { flex: 1 1 190px; min-width: 170px; }
.m12-fitem > .lb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2);
  margin-bottom: 6px; font-weight: 600; }
.m12-fitem .hint { display: block; font-size: 11.5px; color: var(--text-4); margin-top: 5px; line-height: 1.5; }
.m12-fitem input, .m12-fitem select { margin-bottom: 0; height: 34px; }
.m12-ckrow { display: flex; align-items: center; gap: 6px; height: 34px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.m12-ck { width: auto !important; height: auto !important; margin: 0 !important; accent-color: #0e9f6e; }
.m12-btn-query { height: 36px; padding: 0 26px; background: #0e9f6e; border: none; border-radius: 8px;
  color: #fff; font-size: 13.5px; cursor: pointer; margin-top: 22px; font-family: inherit; }
.m12-btn-query:hover { background: #047857; }

.m12-timebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff;
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 18px; margin-bottom: 14px; }
.m12-timebar .lb { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.m12-chip-time { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: #fff;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; font-family: inherit; }
.m12-chip-time:hover { border-color: #a7f3d0; color: #047857; }
.m12-chip-time.on { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.m12-btn-out { height: 32px; padding: 0 16px; border-radius: 8px; border: 1px solid #a7f3d0; background: #fff;
  color: #047857; cursor: pointer; font-size: 12.5px; font-family: inherit; }
.m12-btn-out:hover { background: #ecfdf5; }

.m12-selectall { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.m12-notice { display: flex; align-items: center; gap: 8px; background: #ecfdf5; border: 1px solid #a7f3d0;
  color: #047857; border-radius: 8px; padding: 8px 14px; font-size: 12.5px; margin-bottom: 12px; }

.m12-list { display: flex; flex-direction: column; gap: 10px; }
.m12-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 18px; }
.m12-card:hover { border-color: #a7f3d0; box-shadow: 0 2px 10px rgba(4, 120, 87, .07); }
.m12-avatar { width: 40px; height: 40px; border-radius: 50%; background: #8b5cf6; color: #fff; display: flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.m12-cmain { flex: 1 1 280px; min-width: 0; }
.m12-cname { font-size: 14.5px; font-weight: 700; color: var(--text); display: flex; align-items: center;
  gap: 6px; flex-wrap: wrap; }
.m12-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px;
  background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; white-space: nowrap; }
.m12-chip.grey { background: #f2f3f5; color: var(--text-2); border-color: var(--border); }
.m12-chip.wa { background: #e7f8f1; color: #0e9f6e; border-color: #a7f3d0; }
.m12-cmeta { font-size: 12.5px; color: var(--text-2); margin-top: 5px; word-break: break-all; }
.m12-cmeta a { color: #0e9f6e; }
.m12-cstats { display: flex; gap: 10px; flex-shrink: 0; }
.m12-stat { border: 1px solid var(--border-2); background: #fafbfc; border-radius: 8px; padding: 6px 14px;
  text-align: center; min-width: 92px; }
.m12-stat span { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
.m12-stat b { font-size: 13px; color: var(--text); font-weight: 600; }
.m12-btn-detail { height: 36px; padding: 0 18px; border-radius: 8px; border: none; background: #047857;
  color: #fff; cursor: pointer; font-size: 13px; white-space: nowrap; flex-shrink: 0; font-family: inherit; }
.m12-btn-detail:hover { background: #065f46; }

.m12-empty { background: #fff; border: 1px dashed var(--border); border-radius: 12px; padding: 40px 0;
  text-align: center; color: var(--text-3); font-size: 13px; }
.m12-pg { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.m12-pg > span { color: var(--text-3); font-size: 12.5px; }
.m12-pg .pgs { display: flex; gap: 8px; }
.m12-pgbtn { height: 32px; padding: 0 16px; border-radius: 8px; border: 1px solid #a7f3d0; background: #fff;
  color: #047857; cursor: pointer; font-size: 12.5px; font-family: inherit; }
.m12-pgbtn:hover:not(:disabled) { background: #ecfdf5; }
.m12-pgbtn:disabled { opacity: .4; cursor: not-allowed; }

/* ===== M12 v2：筛选控件 + 国家弹窗 ===== */
.m12-frow .m12-fitem { flex: 1 1 190px; }
.m12-ctlrow { display: flex; gap: 8px; align-items: center; }
.m12-ctlrow select { width: 118px; flex-shrink: 0; margin-bottom: 0; }
.m12-ctlrow input { flex: 1; min-width: 0; margin-bottom: 0; }
.m12-help { color: #0e9f6e; font-size: 12px; cursor: pointer; font-weight: 400; }
.m12-help:hover { text-decoration: underline; }
.m12-ctrybtn { display: flex; align-items: center; gap: 6px; width: 100%; height: 34px; border: 1px solid var(--border);
  border-radius: 4px; background: #fff; padding: 0 10px; font-size: 13px; color: var(--text); cursor: pointer;
  text-align: left; font-family: inherit; }
.m12-ctrybtn:hover { border-color: #a7f3d0; }

.m12-help-body p { margin-bottom: 10px; line-height: 1.7; color: var(--text-2); font-size: 13px; }
.m12-help-body b { color: var(--text); }

/* 国家/地区弹窗 */
.m12-wide { width: 840px !important; max-width: 96vw !important; }
.m12-ct-sub { margin-top: -8px; margin-bottom: 10px; color: var(--text-3); font-size: 12.5px; }
.m12-ct-search input { height: 40px; border-radius: 10px; margin-bottom: 12px; }
.m12-ct-search input:focus { border-color: #0e9f6e; box-shadow: 0 0 0 2px rgba(14, 159, 110, .12); }
.m12-ct-wrap { display: flex; gap: 14px; height: 50vh; min-height: 320px; }
.m12-ct-side { width: 176px; overflow-y: auto; border-right: 1px solid var(--border-2); flex-shrink: 0; padding-right: 6px; }
.m12-ct-g { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: var(--text); }
.m12-ct-g:hover { background: #f7f8fa; }
.m12-ct-g.on { background: #ecfdf5; color: #047857; }
.m12-ct-g i { margin-left: auto; font-style: normal; color: var(--text-4); font-size: 12px; }
.m12-ct-main { flex: 1; overflow-y: auto; min-width: 0; }
.m12-ct-gname { display: flex; justify-content: space-between; align-items: center; font-size: 14px;
  font-weight: 700; margin: 6px 0 10px; color: var(--text); }
.m12-ct-all { color: #0e9f6e; font-size: 12.5px; cursor: pointer; font-weight: 400; }
.m12-ct-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.m12-ct-c { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 10px; font-size: 12.5px; cursor: pointer; color: var(--text); }
.m12-ct-c:hover { border-color: #a7f3d0; background: #f7fdfa; }
.m12-ct-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.m12-ct-tip { margin-right: auto; color: var(--text-3); font-size: 12px; }
.m12-btn-plain { height: 34px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-size: 13px; font-family: inherit; color: var(--text-2); }
.m12-btn-plain:hover { background: #f7f8fa; }
.m12-btn-ok { height: 34px; padding: 0 22px; border-radius: 8px; border: none; background: #0e9f6e;
  color: #fff; cursor: pointer; font-size: 13px; font-family: inherit; }
.m12-btn-ok:hover { background: #047857; }

/* ===== M12 v3：社交标签 / 详情弹窗 / 导入按钮 ===== */
.m12-csoc { margin-top: 6px; }
.m12-soc { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11px; margin-right: 6px; color: #fff; }
.m12-soc.fb { background: #1877f2; }
.m12-soc.ig { background: #c13584; }
.m12-chip.done { background: #f2f3f5; color: var(--text-3); border-color: var(--border); }

.m12-btn-imp { height: 32px; padding: 0 16px; border-radius: 8px; border: none; background: #0e9f6e; color: #fff; cursor: pointer; font-size: 12.5px; font-family: inherit; }
.m12-btn-imp:hover { background: #047857; }

.m12-dmodal { width: 680px !important; max-width: 96vw !important; }
.m12-d-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.m12-d-head .m12-avatar { width: 44px; height: 44px; font-size: 18px; }
.m12-d-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.m12-d-sec { margin-bottom: 16px; }
.m12-d-sec h4 { font-size: 13px; color: var(--text-2); font-weight: 600; margin-bottom: 8px; border-left: 3px solid #0e9f6e; padding-left: 8px; }
.m12-d-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.m12-dkv { background: #fafbfc; border: 1px solid var(--border-2); border-radius: 8px; padding: 8px 12px; }
.m12-dkv span { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
.m12-dkv b { font-size: 13px; color: var(--text); font-weight: 600; word-break: break-all; }
.m12-d-contact div { font-size: 13px; margin-bottom: 4px; color: var(--text-2); word-break: break-all; }
.m12-d-soc { font-size: 13px; margin-bottom: 6px; color: var(--text-2); }
.m12-d-soc b { color: var(--text); margin-right: 6px; }
.m12-d-industry { font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.m12-d-desc { font-size: 13px; line-height: 1.7; color: var(--text-2); max-height: 180px; overflow-y: auto; }
.m12-ctable { width: 100%; border-collapse: collapse; }
.m12-ctable th { text-align: left; font-size: 12px; color: var(--text-3); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.m12-ctable td { text-align: left; font-size: 12.5px; color: var(--text); padding: 6px 8px; border-bottom: 1px solid var(--border-2); word-break: break-all; }

/* ===== M12 v4：翻译按钮 ===== */
.m12-tr { color: #0e9f6e; font-size: 12px; cursor: pointer; font-weight: 400; margin-left: 6px; }
.m12-tr:hover { text-decoration: underline; }
.m12-tr-out { margin-top: 8px; padding: 10px 12px; background: #f7fdfa; border: 1px solid #e5f5ee; border-radius: 8px; }
.m12-tr-out > div { font-size: 13px; line-height: 1.65; color: var(--text-2); margin-bottom: 2px; }
.m12-tr-loading { color: var(--text-3); font-size: 12.5px; }
.m12-tr-err { color: var(--danger); font-size: 12.5px; }

/* ===== M12 v5：详情弹窗更接近原版（加宽 + 交易概览 4 列） ===== */
.m12-dmodal { width: 780px !important; }
.m12-d-grid.m12-d-grid4 { grid-template-columns: repeat(4, 1fr); }
.m12-d-grid4 .m12-dkv b { font-size: 14px; }
.m12-d-sec h4 { display: flex; align-items: center; }

/* ===== M12 v6：展会页胶囊筛选 + 标签 ===== */
.m12-chipgroup { display: flex; flex-wrap: wrap; gap: 6px; }
.m12-pill { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff;
  font-size: 12px; color: var(--text-2); cursor: pointer; font-family: inherit; line-height: 1.5; }
.m12-pill:hover { border-color: #a7f3d0; color: #0e9f6e; }
.m12-pill.on { background: #ecfdf5; border-color: #0e9f6e; color: #047857; font-weight: 600; }

.m12-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; margin-left: 4px; border: 1px solid; }
.m12-tag.green { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.m12-tag.purple { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.m12-tag.grey { background: #f2f3f5; color: #6b7280; border-color: #e5e7eb; }

/* ===== M12 v7：下拉按钮 + 浮层（展会国家/标签） ===== */
.m12-ddbtn { height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: 4px; background: #fff;
  font-size: 13px; color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: space-between;
  gap: 8px; font-family: inherit; min-width: 150px; }
.m12-ddbtn:hover { border-color: #a7f3d0; }
.m12-dd { position: fixed; z-index: 300; background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14); padding: 6px; display: flex; flex-direction: column; max-height: 360px; }
.m12-dd-search input { height: 32px; margin-bottom: 6px; border-radius: 8px; }
.m12-dd-list { overflow-y: auto; max-height: 270px; }
.m12-dd-item { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 6px;
  font-size: 13px; cursor: pointer; color: var(--text); }
.m12-dd-item:hover { background: #f7fdfa; }
.m12-dd-item.on { background: #ecfdf5; color: #047857; font-weight: 600; }
.m12-dd-item i { font-style: normal; color: var(--text-3); font-size: 12px; }
.m12-dd-empty { padding: 12px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.m12-dd-foot { display: flex; gap: 8px; padding-top: 6px; margin-top: 4px; border-top: 1px solid var(--border-2); }
.m12-dd-foot button { flex: 1; height: 30px; border-radius: 6px; border: 1px solid var(--border); background: #fff;
  font-size: 12.5px; cursor: pointer; font-family: inherit; color: var(--text-2); }
.m12-dd-foot .m12-dd-ok { background: #0e9f6e; color: #fff; border: none; }
.m12-dd-foot .m12-dd-ok:hover { background: #047857; }

/* ===== M12 v8：领英详情（LinkedIn 按钮 + EN 标签） ===== */
.m12-d-li { margin-bottom: 14px; }
.m12-btn-li { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 6px;
  background: #0a66c2; color: #fff; font-size: 12.5px; text-decoration: none; }
.m12-btn-li:hover { background: #004182; }
.m12-en { display: inline-block; padding: 0 5px; border-radius: 3px; background: #eef2f6; color: #64748b;
  font-size: 10.5px; margin-right: 4px; }

/* ===== M12 v9：客户管理页 ===== */
.m12-cust-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.m12-cust-head h2 { font-size: 18px; font-weight: 600; margin: 0; }
.m12-cust-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.m12-tool { height: 32px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--border); background: #fff;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; font-family: inherit; }
.m12-tool:hover { background: #f7f8fa; }
.m12-tool.danger { color: #dc2626; border-color: #fecaca; }
.m12-tool.danger:hover { background: #fef2f2; }
.m12-tool.primary { background: #111827; color: #fff; border-color: #111827; }
.m12-tool.primary:hover { background: #374151; }

.m12-cust-bar { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border-2);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; flex-wrap: wrap; }
.m12-cust-search { flex: 1; min-width: 200px; height: 34px; border-radius: 8px; }
.m12-cust-bar select { height: 34px; border-radius: 8px; width: 130px; }
.m12-cust-count { color: var(--text-3); font-size: 12.5px; }

.m12-cust-list { display: flex; flex-direction: column; gap: 10px; }
.m12-cust-item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border-2);
  border-radius: 10px; padding: 12px 14px; }
.m12-cust-item:hover { border-color: #a7f3d0; }
.m12-cust-main { flex: 1; min-width: 0; }
.m12-cust-name { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.m12-cust-meta { font-size: 12.5px; color: var(--text-3); word-break: break-all; }
.m12-cust-ops { display: flex; gap: 6px; flex-shrink: 0; }
.m12-tool-sm { height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--border); background: #fff;
  font-size: 12px; color: var(--text-2); cursor: pointer; font-family: inherit; }
.m12-tool-sm:hover { background: #f7f8fa; }
.m12-tool-sm.danger { color: #dc2626; }

.m12-cust-empty { text-align: center; padding: 60px 20px; color: var(--text-3); font-size: 13px; }
.m12-cempty-icon { font-size: 40px; margin-bottom: 10px; opacity: .5; }

.m12-form { display: flex; flex-direction: column; gap: 10px; }
.m12-frow2 { display: flex; flex-direction: column; gap: 4px; }
.m12-frow2 label { font-size: 12px; color: var(--text-3); }
.m12-frow2 input, .m12-frow2 select, .m12-frow2 textarea { width: 100%; }

/* ===== M12 业务模块样式（仪表板/产品/任务/模板/邮件/发送/分析/地图/AI） ===== */
.m12b-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.m12b-head h2 { font-size: 19px; font-weight: 600; margin: 0 0 4px; }
.m12b-head p { margin: 0; font-size: 13px; color: var(--text-3); }
.m12b-hbtns { display: flex; gap: 8px; flex-wrap: wrap; }

.m12b-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.m12b-stats:has(.m12b-stat:nth-child(5)) { grid-template-columns: repeat(5, 1fr); }
.m12b-stat { background: #fff; border: 1px solid var(--border-2); border-radius: 12px; padding: 14px 16px; }
.m12b-stat span { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.m12b-stat b { font-size: 24px; font-weight: 700; color: var(--text); line-height: 1.2; }
.m12b-stat i { display: block; font-style: normal; font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

.m12b-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.m12b-panel { background: #fff; border: 1px solid var(--border-2); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.m12b-ph { padding: 12px 16px; border-bottom: 1px solid var(--border-2); font-size: 13.5px; font-weight: 600; color: var(--text); }
.m12b-pb { padding: 14px 16px; font-size: 13px; color: var(--text-2); }
.m12b-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--border-2); font-size: 13px; }
.m12b-row:last-child { border-bottom: none; }
.m12b-row i { font-style: normal; color: var(--text-3); font-size: 12px; }

.m12b-bar { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border-2);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; flex-wrap: wrap; }
.m12b-bar .k { flex: 1; min-width: 200px; height: 34px; border-radius: 8px; }
.m12b-bar select { height: 34px; border-radius: 8px; width: 130px; }
.m12b-bar2 { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.m12b-bar2 .k { flex: 1; min-width: 200px; height: 34px; border-radius: 8px; }
.m12b-bar2 select { height: 34px; border-radius: 8px; width: 140px; }
.m12b-tabs { display: inline-flex; gap: 4px; background: #f3f4f6; border-radius: 8px; padding: 3px; }
.m12b-tabs button { border: none; background: transparent; padding: 6px 14px; border-radius: 6px; font-size: 12.5px;
  color: var(--text-2); cursor: pointer; font-family: inherit; }
.m12b-tabs button.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.m12b-body { background: #fff; border: 1px solid var(--border-2); border-radius: 12px; overflow: hidden; }
.m12b-ph2 { padding: 12px 16px; border-bottom: 1px solid var(--border-2); font-size: 13.5px; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; }
.m12b-ph2 .c { font-size: 12px; color: var(--text-3); font-weight: 400; }

.m12b-table-wrap { overflow-x: auto; }
.m12b-table { width: 100%; border-collapse: collapse; }
.m12b-table th { text-align: left; font-size: 12px; color: var(--text-3); font-weight: 600; padding: 10px 12px;
  background: #fafbfc; border-bottom: 1px solid var(--border-2); white-space: nowrap; }
.m12b-table td { padding: 10px 12px; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border-2); vertical-align: top; }
.m12b-table tr:last-child td { border-bottom: none; }
.m12b-table .sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.m12b-empty { padding: 48px 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.m12b-empty .hint { margin-top: 6px; font-size: 12px; color: var(--text-4); }
.m12b-pg { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
  font-size: 12.5px; color: var(--text-3); border-top: 1px solid var(--border-2); }
.m12b-pg .pgs { display: flex; gap: 8px; }

.m12b-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 14px 16px; }
.m12b-tpl, .m12b-agent { border: 1px solid var(--border-2); border-radius: 10px; padding: 12px 14px; background: #fff; }
.m12b-tpl .h, .m12b-agent .h { display: flex; align-items: center; gap: 6px; justify-content: space-between; margin-bottom: 6px; }
.m12b-tpl .h b, .m12b-agent .h b { font-size: 13.5px; }
.m12b-tpl .cat { font-size: 11.5px; color: #0e9f6e; margin-bottom: 6px; }
.m12b-tpl .subj { font-size: 12.5px; color: var(--text); margin-bottom: 4px; }
.m12b-tpl .body { font-size: 12px; color: var(--text-3); line-height: 1.5; margin-bottom: 8px; }
.m12b-tpl .ops, .m12b-agent .ops { display: flex; gap: 6px; flex-wrap: wrap; }
.m12b-agent .sub { font-size: 12.5px; color: var(--text-3); margin-bottom: 4px; }

.m12b-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.m12b-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.m12b-sub { font-size: 12.5px; color: var(--text-3); margin-bottom: 8px; font-weight: 600; }
.m12b-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12.5px; }
.m12b-bar-row span { width: 90px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m12b-bar-row .track { flex: 1; height: 8px; background: #f1f3f5; border-radius: 4px; overflow: hidden; }
.m12b-bar-row .track i { display: block; height: 100%; background: linear-gradient(90deg, #34d399, #0e9f6e); }
.m12b-bar-row b { width: 36px; text-align: right; color: var(--text); }

.m12b-quota { background: #f0fdf4; border: 1px solid #bbf7d0; color: #047857; border-radius: 10px;
  padding: 10px 14px; font-size: 12.5px; margin-bottom: 12px; }
.m12b-quota .warn { color: #b45309; }
.m12b-quota a { color: #0e9f6e; text-decoration: underline; }
.m12b-note { font-size: 12px; color: var(--text-3); background: #fafbfc; border: 1px dashed var(--border);
  border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.m12b-range { height: 34px; border-radius: 8px; width: 130px; }

.m12b-report .score { display: inline-block; background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0;
  border-radius: 999px; padding: 4px 14px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.m12b-report .sum { font-size: 14px; font-weight: 600; margin: 4px 0 14px; color: var(--text); }
.m12b-report h4 { font-size: 12.5px; color: var(--text-3); margin: 12px 0 4px; font-weight: 600; }
.m12b-report p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--text-2); }
.m12b-pre { background: #fafbfc; border: 1px solid var(--border-2); border-radius: 8px; padding: 10px 12px;
  font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; color: var(--text-2); max-height: 300px; overflow-y: auto; }
.m12b-code { background: #fafbfc; border: 1px solid var(--border-2); border-radius: 8px; padding: 8px 10px;
  font-size: 12.5px; color: var(--text); }

@media (max-width: 1100px) {
  .m12b-stats, .m12b-stats:has(.m12b-stat:nth-child(5)) { grid-template-columns: repeat(2, 1fr); }
  .m12b-cols, .m12b-three, .m12b-two { grid-template-columns: 1fr; }
}

/* ===== M12 AI 模块（照 proscaapp 原版） ===== */
.ai-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.ai-head .l { min-width: 0; }
.ai-head .r { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ai-badge { display: inline-flex; align-items: center; gap: 5px; background: #fdf2f8; color: #be185d;
  border: 1px solid #fbcfe8; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; margin-bottom: 8px; }
.ai-badge svg { width: 13px; height: 13px; }
.ai-grad { font-size: 30px; font-weight: 700; margin: 0 0 8px; line-height: 1.2;
  background: linear-gradient(90deg, #6d28d9, #4338ca); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai-grad2 { font-size: 28px; font-weight: 700; margin: 0 0 6px;
  background: linear-gradient(90deg, #6d28d9, #4338ca); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai-head p { margin: 0; font-size: 13px; color: #6b7280; }

.ai-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px solid #e5e7eb; background: #fff; font-size: 13.5px; color: #1f2937; cursor: pointer; font-family: inherit; }
.ai-btn:hover { background: #f9fafb; }
.ai-btn svg { width: 15px; height: 15px; }
.ai-btn-grad { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 8px;
  border: none; background: linear-gradient(90deg, #7c3aed, #4f46e5); color: #fff; font-size: 13.5px;
  cursor: pointer; font-family: inherit; font-weight: 500; }
.ai-btn-grad:hover { filter: brightness(1.08); }
.ai-btn-grad svg { width: 16px; height: 16px; }
.ai-btn-dark { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 16px; border-radius: 8px;
  border: none; background: #111827; color: #fff; font-size: 13px; cursor: pointer; font-family: inherit; }
.ai-btn-sm { height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid #e5e7eb; background: #fff;
  font-size: 12px; color: #374151; cursor: pointer; font-family: inherit; }
.ai-btn-sm.grad { background: linear-gradient(90deg, #7c3aed, #4f46e5); color: #fff; border: none; }
.ai-btn-sm.danger { color: #dc2626; }
.ai-btn.w100 { width: 100%; justify-content: center; }

.ai-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.ai-card-h { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 4px; }
.ai-card-h svg { width: 16px; height: 16px; color: #7c3aed; }
.ai-card-sub { font-size: 12px; color: #6b7280; margin-bottom: 12px; }
.ai-graybox { background: #f9fafb; border: 1px solid #f3f4f6; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.ai-graybox .row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.ai-grayhint { font-size: 11.5px; color: #9ca3af; margin-top: 4px; }
.ai-graylabel { font-size: 12px; color: #6b7280; margin-bottom: 6px; }
.ai-toggle { width: 38px; height: 20px; border-radius: 999px; background: #d1d5db; position: relative; cursor: pointer; transition: .15s; flex: 0 0 auto; }
.ai-toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; }
.ai-toggle.on { background: #111827; }
.ai-toggle.on::after { left: 20px; }
.ai-radio { display: flex; align-items: center; gap: 7px; font-size: 13px; padding: 5px 0; cursor: pointer; }
.ai-radio input { accent-color: #7c3aed; }
.ai-radio em { font-style: normal; color: #9ca3af; font-size: 12px; }
.ai-radio.dis { color: #9ca3af; cursor: not-allowed; }
.ai-notif-foot { display: flex; gap: 8px; margin-top: 4px; }

.ai-quota { background: #f5f3ff; border: 1px solid #ede9fe; color: #5b21b6; border-radius: 10px;
  padding: 9px 14px; font-size: 12.5px; margin-bottom: 12px; }
.ai-quota b { color: #4c1d95; }

.ai-stats { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-bottom: 12px; }
.ai-stat { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px; display: flex; align-items: flex-start; gap: 12px; }
.ai-stat .ic { width: 40px; height: 40px; border-radius: 8px; padding: 8px; color: #fff; flex: 0 0 auto; }
.ai-stat .ic svg { width: 24px; height: 24px; }
.ai-stat .bd { min-width: 0; }
.ai-stat .bd b { display: block; font-size: 22px; font-weight: 700; line-height: 1.15; color: #111827; }
.ai-stat .bd span { display: block; font-size: 12px; color: #6b7280; margin-top: 2px; }
.ai-stat .bd i { display: block; font-style: normal; font-size: 10.5px; color: #9ca3af; margin-top: 1px; }

.ai-chain { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 14px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 12px; }
.ai-chain .t { color: #6b7280; }
.ai-chain .step { background: #f5f3ff; color: #6d28d9; border-radius: 6px; padding: 2px 8px; }
.ai-chain i { color: #d1d5db; font-style: normal; }
.ai-chain .r { margin-left: auto; color: #9ca3af; font-size: 12px; }

.ai-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ai-tabs { display: inline-flex; gap: 2px; background: #f3f4f6; border-radius: 10px; padding: 3px; }
.ai-tabs button { border: none; background: transparent; padding: 7px 16px; border-radius: 8px; font-size: 13px;
  color: #6b7280; cursor: pointer; font-family: inherit; }
.ai-tabs button.on { background: #111827; color: #fff; font-weight: 500; }
.ai-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ai-filters select, .ai-filters input { height: 34px; border-radius: 8px; border: 1px solid #e5e7eb; font-size: 13px; padding: 0 10px; }
.ai-filters input { width: 180px; }

.ai-list { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; }
.ai-empty { padding: 40px 20px; text-align: center; color: #9ca3af; font-size: 13px; }
.ai-empty-box { padding: 44px 20px; text-align: center; }
.ai-empty-box .t { font-size: 14px; color: #374151; font-weight: 600; margin-bottom: 6px; }
.ai-empty-box .s { font-size: 12.5px; color: #9ca3af; }
.ai-tablewrap { overflow-x: auto; }
.ai-table { width: 100%; border-collapse: collapse; }
.ai-table th { text-align: left; font-size: 12px; color: #6b7280; font-weight: 600; padding: 10px 14px; background: #fafafa; border-bottom: 1px solid #f3f4f6; }
.ai-table td { padding: 10px 14px; font-size: 13px; border-bottom: 1px solid #f9fafb; }
.ai-count { padding: 10px 14px; font-size: 12px; color: #9ca3af; border-top: 1px solid #f3f4f6; }
.ai-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; background: #f3f4f6; color: #4b5563; }
.ai-chip.wa { background: #f5f3ff; color: #6d28d9; }

.ai-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; padding: 14px; }
.ai-role { border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px; }
.ai-role .h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ai-role .s { font-size: 12.5px; color: #6b7280; margin-bottom: 4px; }
.ai-role .ops { display: flex; gap: 6px; margin-top: 8px; }

/* 招募弹窗 */
.ai-modal .modal-body { max-height: 76vh; overflow-y: auto; }
.ai-recruit { display: flex; flex-direction: column; gap: 12px; }
.ai-rc-card { display: flex; align-items: center; gap: 12px; background: #f5f3ff; border: 1px solid #ede9fe;
  border-radius: 10px; padding: 12px 14px; }
.ai-rc-card .ic { width: 38px; height: 38px; border-radius: 8px; background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff; padding: 8px; flex: 0 0 auto; }
.ai-rc-card .ic svg { width: 22px; height: 22px; }
.ai-rc-card b { font-size: 14px; display: block; }
.ai-rc-card .s { font-size: 12px; color: #6b7280; }
.ai-rc-card .ai-chip { margin-left: auto; }

.ai-f { display: flex; flex-direction: column; gap: 5px; }
.ai-f label { font-size: 12.5px; color: #374151; font-weight: 500; }
.ai-f label em { color: #dc2626; font-style: normal; }
.ai-f input, .ai-f select, .ai-f textarea { width: 100%; border-radius: 8px; border: 1px solid #e5e7eb; font-size: 13px; padding: 8px 10px; font-family: inherit; }
.ai-f textarea { resize: vertical; }
.ai-hint { font-size: 11.5px; color: #9ca3af; line-height: 1.6; }
.ai-link { font-size: 11.5px; color: #7c3aed; text-decoration: none; margin-left: 6px; }
.ai-sec { border-top: 1px dashed #e5e7eb; padding-top: 12px; }
.ai-sec-t { font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #111827; }
.ai-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.ai-purple { background: #f5f3ff; border: 1px solid #ede9fe; color: #5b21b6; border-radius: 8px;
  padding: 9px 12px; font-size: 11.5px; line-height: 1.7; }
.ai-preview { background: #fafafa; border: 1px solid #f3f4f6; border-radius: 8px; padding: 10px 12px;
  font-size: 12px; color: #4b5563; margin-bottom: 8px; }
.ai-preview .k { color: #9ca3af; font-size: 11.5px; margin-top: 4px; }
.ai-preview .v { color: #111827; }
.ai-ds { background: #fafafa; border: 1px solid #f3f4f6; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.ai-ds .s { font-size: 11.5px; color: #6b7280; margin-top: 4px; }
.ai-cont { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.ai-cb { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; border: 1px solid #e5e7eb;
  border-radius: 999px; padding: 4px 11px; cursor: pointer; color: #374151; }
.ai-cb input { accent-color: #7c3aed; }
.ai-cb.all { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }

/* 背调 */
.ai-steps { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 13px; color: #9ca3af; }
.ai-steps .s { color: #9ca3af; }
.ai-steps .s.on { color: #6d28d9; font-weight: 600; }
.ai-steps i { color: #d1d5db; font-style: normal; }
.ai-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.ai-panel { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; }
.ai-panel-h { padding: 12px 16px; border-bottom: 1px solid #f3f4f6; font-size: 13.5px; font-weight: 600; }
.ai-panel-b { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-flabel { font-size: 12.5px; color: #374151; font-weight: 500; }
.ai-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ai-mode { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 1px solid #e5e7eb;
  border-radius: 10px; background: #fff; padding: 10px 8px; cursor: pointer; font-family: inherit; position: relative; }
.ai-mode svg { width: 18px; height: 18px; color: #6b7280; }
.ai-mode b { font-size: 12.5px; color: #111827; font-weight: 500; }
.ai-mode span { font-size: 11px; color: #9ca3af; }
.ai-mode.on { border-color: #7c3aed; background: #f5f3ff; }
.ai-mode.on svg { color: #7c3aed; }
.ai-collapse { font-size: 12.5px; color: #6d28d9; cursor: pointer; padding: 4px 0; }
.ai-report .score { display: inline-block; background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0;
  border-radius: 999px; padding: 4px 14px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.ai-report .sum { font-size: 14px; font-weight: 600; margin: 0 0 12px; }
.ai-report h4 { font-size: 12.5px; color: #6b7280; margin: 12px 0 4px; }
.ai-report p { margin: 0; font-size: 13px; line-height: 1.7; color: #374151; }
.ai-loading { padding: 40px 20px; text-align: center; color: #6b7280; font-size: 13px; }
.ai-loading .sp { width: 26px; height: 26px; margin: 0 auto 10px; border: 2.5px solid #ede9fe;
  border-top-color: #7c3aed; border-radius: 50%; animation: aiSpin .8s linear infinite; }
@keyframes aiSpin { to { transform: rotate(360deg); } }
.ai-hist { display: flex; flex-direction: column; gap: 8px; }
.ai-hist-item { border: 1px solid #f3f4f6; border-radius: 8px; padding: 10px 12px; }
.ai-hist-item .h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ai-hist-item .s { font-size: 11.5px; color: #9ca3af; margin: 3px 0 6px; }

@media (max-width: 1400px) { .ai-stats { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1000px) {
  .ai-stats { grid-template-columns: repeat(2, 1fr); }
  .ai-two, .ai-grid2 { grid-template-columns: 1fr; }
}

/* 修：radio 与文字被平台全局 label 样式撑开 */
.ai-graybox .ai-radio { display: flex !important; align-items: center !important; justify-content: flex-start !important; gap: 8px !important; width: auto; }
.ai-graybox .ai-radio input[type=radio] { flex: 0 0 auto !important; width: 15px !important; height: 15px !important; margin: 0 !important; }
.ai-graybox .ai-radio span { flex: 0 0 auto !important; }
.ai-graybox .ai-radio em { flex: 0 0 auto !important; }
.ai-graybox .row > span:first-child { flex: 0 0 auto; }


/* ===== 仪表板（照 proscaapp 原版：标签+图标在上、数字在下；活动 2fr + 任务 1fr；重要客户全宽） ===== */
.dash-head { margin-bottom: 18px; }
.dash-head h1 { font-size: 30px; font-weight: 700; margin: 0 0 6px; line-height: 1.2;
  background: linear-gradient(90deg, #6d28d9, #4338ca); -webkit-background-clip: text;
  background-clip: text; color: transparent; display: inline-block; }
.dash-head p { margin: 0; font-size: 13px; color: #6b7280; }

.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.dash-stat { background: #fff; border: 1px solid #e8e9eb; border-radius: 12px; padding: 16px 18px; }
.dash-stat .dtop { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dash-stat .dtop span { font-size: 13px; color: #6b7280; }
.dash-stat .dic { width: 20px; height: 20px; color: #9ca3af; display: inline-flex; flex: 0 0 auto; }
.dash-stat .dic svg { width: 18px; height: 18px; }
.dash-stat b { display: block; font-size: 26px; font-weight: 700; color: #111827; line-height: 1.2; }
.dash-stat i.sub { display: block; font-style: normal; font-size: 11.5px; color: #9ca3af; margin-top: 4px; }

.dash-row2 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; align-items: start; }
.dash-panel { background: #fff; border: 1px solid #e8e9eb; border-radius: 12px; padding: 16px 18px; }
.dash-panel .h { font-size: 14px; font-weight: 600; color: #111827; }
.dash-panel .s { font-size: 12px; color: #9ca3af; margin: 2px 0 12px; }

.dash-act { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #f3f4f6; }
.dash-act:last-child { border-bottom: none; }
.dash-act .av { width: 32px; height: 32px; border-radius: 50%; background: #f3f4f6; color: #6b7280;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.dash-act .av svg { width: 16px; height: 16px; }
.dash-act .mid { flex: 1; min-width: 0; }
.dash-act .t { font-size: 13px; color: #111827; }
.dash-act .c { font-size: 12px; color: #6b7280; margin-top: 1px; }
.dash-act .time { font-size: 12px; color: #9ca3af; flex: 0 0 auto; }

.dash-task { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed #f3f4f6; font-size: 12.5px; }
.dash-task:last-child { border-bottom: none; }
.dash-task .p { background: #f3f4f6; color: #6b7280; border-radius: 4px; padding: 1px 6px; font-size: 11px; flex: 0 0 auto; }
.dash-task .p.hi { background: #fef2f2; color: #dc2626; }
.dash-task .ti { flex: 1; color: #111827; }
.dash-task .d { color: #9ca3af; font-size: 11.5px; flex: 0 0 auto; }

.dash-cust { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #f3f4f6; font-size: 13px; }
.dash-cust:last-child { border-bottom: none; }
.dash-cust .av { width: 32px; height: 32px; border-radius: 50%; background: #f3f4f6; color: #6b7280;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.dash-cust .av svg { width: 16px; height: 16px; }
.dash-cust .mid { flex: 1; min-width: 0; }
.dash-cust .n { font-weight: 500; color: #111827; }
.dash-cust .m { color: #9ca3af; font-size: 12px; margin-top: 1px; }
.dash-link { flex: 0 0 auto; height: 26px; padding: 0 10px; border-radius: 6px; border: 1px solid #e5e7eb;
  background: #fff; color: #6d28d9; font-size: 12px; cursor: pointer; font-family: inherit; }
.dash-link:hover { background: #f5f3ff; border-color: #ddd6fe; }
.dash-empty { color: #9ca3af; font-size: 12.5px; padding: 18px 0; text-align: center; }

@media (max-width: 1100px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-row2 { grid-template-columns: 1fr; }
}

.m12-cust-person { font-size: 12.5px; color: #6b7280; font-weight: 400; margin-left: 6px; }












/* ===== 客户管理（照原版：表格 8 列 + 彩色头像 + 彩色胶囊 + 图标操作） ===== */
.cust-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.cust-head h2 { font-size: 30px; font-weight: 700; margin: 0; color: #0f172b; }
.cust-tools { display: flex; gap: 8px; flex-wrap: wrap; }
/* 严格对照 proscaapp 原版工具栏按钮：字号14/字重500/圆角8/内边距0 12/图标间距8/图标16 */
.cust-tool { height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid #e2e8f0; background: #fff;
  font-size: 14px; font-weight: 500; color: #020618; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-family: inherit; line-height: 1;
  box-shadow: rgba(0,0,0,0.05) 0 1px 2px 0; transition: background-color .15s, color .15s, border-color .15s; }
.cust-tool svg { width: 16px; height: 16px; flex: 0 0 16px; }
.cust-tool:hover { background: #f8fafc; }
/* 批量删除：destructive 幽灵按钮（原版 #e40014 红字 + 浅红边） */
.cust-tool.danger { color: #e40014; border-color: #fecaca; }
.cust-tool.danger:hover { background: #fef2f2; }
/* 添加客户：primary 实心（原版 #0f172b 深底 + 白字，无边框无阴影） */
.cust-tool.dark { background: #0f172b; color: #f8fafc; border-color: #0f172b; box-shadow: none; }
.cust-tool.dark:hover { background: #1e293b; border-color: #1e293b; }

/* 弹窗里的删除（destructive）按钮，与原版删除红一致 */
.m12-btn-danger { height: 34px; padding: 0 18px; border-radius: 8px; border: 1px solid #e40014; background: #e40014; color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; }
.m12-btn-danger:hover { background: #c20010; border-color: #c20010; }
.m12-btn-danger:disabled { background: #fda4af; border-color: #fda4af; cursor: not-allowed; }
.m12-btn-danger svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px; }

/* ===== 批量删除客户弹窗（严格对照原版） ===== */
.cust-bulkdel .modal-head h3 { color: #e40014; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.cust-bulkdel .modal-head h3::before { content: ''; width: 19px; height: 19px; flex: 0 0 19px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e40014' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E") no-repeat center/contain; }
.bd-modes { display: flex; gap: 20px; font-size: 13.5px; color: #0f172b; margin-bottom: 12px; }
.bd-modes label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.bd-modes input[type=radio] { width: 15px; height: 15px; accent-color: #e40014; margin: 0; }
.bd-note { font-size: 13px; color: #334155; line-height: 1.6; margin-bottom: 4px; }
.bd-info { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; }
.bd-info p { margin: 0; font-size: 12.5px; color: #334155; line-height: 1.75; }
.bd-info b { font-weight: 600; color: #0f172b; }
.bd-label { font-size: 12.5px; font-weight: 500; color: #334155; margin: 12px 0 6px; }
.bd-source-btn { height: 36px; min-width: 128px; padding: 0 12px; border-radius: 8px; border: 1px solid #e2e8f0; background: #fff;
  font-size: 13.5px; color: #020618; cursor: pointer; display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; font-family: inherit; }
.bd-chev { width: 14px; height: 14px; color: #8892a6; }
.bd-status-group { border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 6px 14px 10px; margin: 0; min-width: 0; }
.bd-status-group legend { font-size: 11px; color: #8892a6; background: #f1f5f9; border-radius: 4px; padding: 1px 7px; }
.bd-status-item { display: flex; align-items: center; gap: 9px; padding: 5px 0; cursor: pointer; }
.bd-status-item input[type=checkbox] { width: 14px; height: 14px; accent-color: #0f172b; margin: 0; }
.bd-hint { margin-top: 10px; font-size: 12px; color: #64748b; line-height: 1.6; }
.bd-warn { margin-top: 12px; background: #fef2f2; color: #e40014; border-radius: 10px; padding: 11px 14px; font-size: 13px; line-height: 1.5; }
.cust-bulkdel .modal-foot { display: flex; gap: 12px; }
.cust-bulkdel .modal-foot button { flex: 1; height: 40px; padding: 0; font-size: 14px; }
.cust-bulkdel .modal-foot .m12-btn-danger svg { margin: 0 6px 0 0; }

.cust-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; }
.cust-filterbar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; flex-wrap: wrap; }
.cust-search { flex: 1; min-width: 240px; position: relative; }
.cust-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: #9ca3af; }
.cust-search input { width: 100%; height: 36px; border-radius: 8px; border: 1px solid #e5e7eb; padding: 0 12px 0 32px; font-size: 14px; }
.cust-fbtn { height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid #e5e7eb; background: #fff;
  font-size: 12px; color: #374151; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-family: inherit; }
.cust-fbtn svg { width: 13px; height: 13px; color: #6b7280; }
.cust-fbtn:hover { background: #f9fafb; }
.cust-count { margin-left: auto; font-size: 12px; color: #6b7280; }

.cust-tblwrap { overflow-x: auto; }
.cust-table { width: 100%; border-collapse: collapse; }
.cust-table th { text-align: left; font-size: 13px; font-weight: 500; color: #374151; padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.cust-table td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f3f4f6; color: #111827; vertical-align: middle; }
.cust-table tbody tr:hover { background: #fafafa; }
.cust-table .ckcell { width: 36px; }
.cust-table input[type=checkbox] { accent-color: #111827; }
.c-cust { display: flex; align-items: center; gap: 10px; }
.c-av { width: 32px; height: 32px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 600; flex: 0 0 auto; }
.c-name { font-size: 13px; color: #111827; }
.c-pill { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; white-space: nowrap; }
.c-pill.grey { background: #f3f4f6; color: #6b7280; }
.c-pill.blue { background: #eff6ff; color: #1d4ed8; }
.c-pill.green { background: #ecfdf5; color: #047857; }
.c-pill.orange { background: #fff7ed; color: #c2410c; }
.c-pill.purple { background: #f5f3ff; color: #6d28d9; }
.cust-table .muted { color: #6b7280; }
.c-ops { display: flex; gap: 2px; }
.c-op { width: 26px; height: 26px; border: none; background: transparent; color: #6b7280; cursor: pointer;
  border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; }
.c-op svg { width: 14px; height: 14px; }
.c-op:hover { background: #f3f4f6; color: #111827; }
.c-op.danger:hover { background: #fef2f2; color: #dc2626; }

.cust-pg { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
  font-size: 12.5px; color: #6b7280; flex-wrap: wrap; gap: 10px; }
.pg-right { display: flex; align-items: center; gap: 6px; }
.pg-btn { height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid #e5e7eb; background: #fff;
  font-size: 12.5px; color: #374151; cursor: pointer; font-family: inherit; }
.pg-btn:disabled { color: #d1d5db; cursor: not-allowed; }
.pg-num { width: 28px; height: 28px; border-radius: 6px; border: 1px solid #e5e7eb; background: #fff;
  font-size: 12.5px; color: #374151; cursor: pointer; font-family: inherit; }
.pg-num.on { background: #111827; color: #fff; border-color: #111827; }
.pg-jump { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; }
.pg-jump input { width: 48px; height: 28px; border-radius: 6px; border: 1px solid #e5e7eb; text-align: center; font-size: 12.5px; }

.cust-dd { position: fixed; z-index: 300; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12); padding: 4px; }
.cust-dd-item { padding: 7px 12px; border-radius: 6px; font-size: 13px; cursor: pointer; color: #374151; }
.cust-dd-item:hover { background: #f9fafb; }
.cust-dd-item.on { background: #f5f3ff; color: #6d28d9; }
.cust-empty { padding: 40px; text-align: center; color: #9ca3af; font-size: 13px; }

.cust-detail .d-row { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px dashed #f3f4f6; font-size: 13px; }
.cust-detail .k { width: 90px; color: #6b7280; flex: 0 0 auto; }
.cust-detail .v { flex: 1; color: #111827; word-break: break-all; }

/* ===== 群发邮件弹窗（照原版「群发邮件」面板） ===== */
.bm-wrap { min-width: 520px; max-width: 620px; }
.bm-label { font-size: 13px; font-weight: 500; color: #334155; margin: 12px 0 6px; }
.bm-wrap .bm-label:first-child { margin-top: 0; }
.bm-tpl-btn { width: 100%; height: 38px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff;
  display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 14px; color: #020618;
  cursor: pointer; font-family: inherit; }
.bm-tpl-btn:hover { background: #f9fafb; }
.bm-tpl-btn svg { width: 16px; height: 16px; color: #64748b; }
.bm-scope { display: flex; gap: 20px; align-items: center; }
.bm-scope label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #020618; cursor: pointer; }
.bm-scope input { accent-color: #4f46e5; width: 15px; height: 15px; }
.bm-cols { display: flex; gap: 12px; }
.bm-cols > div { flex: 1; min-width: 0; }
.bm-status { min-height: 148px; max-height: 190px; overflow: auto; }
.bm-status legend { font-size: 11.5px; font-weight: 500; color: #94a3b8; padding: 0 2px; }
.bm-nolegend legend { visibility: hidden; height: 0; padding: 0; margin: 0; }
.bm-none { font-size: 12.5px; color: #94a3b8; padding: 6px 2px; }
.bm-pick { max-height: 220px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.bm-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.bm-row:last-child { border-bottom: 0; }
.bm-row:hover { background: #f8fafc; }
.bm-row input { accent-color: #4f46e5; width: 15px; height: 15px; flex: 0 0 auto; }
.bm-rinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bm-rname { font-size: 13.5px; font-weight: 500; color: #020618; }
.bm-rsub { font-size: 12px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-noemail { flex: 0 0 auto; font-size: 11px; font-weight: 600; color: #fff; background: #e40014;
  border-radius: 999px; padding: 2px 8px; }
.bm-empty { padding: 28px; text-align: center; color: #94a3b8; font-size: 13px; }
.bm-form { margin-top: 4px; }

/* 模板子弹窗（独立遮罩，叠加在群发弹窗之上） */
.bm-tplmask { position: fixed; inset: 0; z-index: 400; background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center; }
.bm-tplbox { width: 420px; max-width: calc(100vw - 40px); max-height: 82vh; overflow: auto;
  background: #fff; border-radius: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); padding: 16px; }
.bm-tplhead { display: flex; align-items: center; justify-content: space-between; }
.bm-tplhead h4 { margin: 0; font-size: 16px; font-weight: 600; color: #020618; }
.bm-tplx { border: 0; background: none; font-size: 20px; line-height: 1; color: #94a3b8; cursor: pointer; }
.bm-tplx:hover { color: #020618; }
.bm-tplhint { margin: 6px 0 12px; font-size: 13px; color: #64748b; }
.bm-tplbar { display: flex; gap: 8px; }
.bm-tplsearch { flex: 1; }
.bm-tpltabs { display: flex; border-bottom: 1px solid #e2e8f0; margin-top: 12px; }
.bm-tpltabs button { border: 0; background: none; padding: 8px 14px; font-size: 13.5px; color: #64748b;
  cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit; }
.bm-tpltabs button.on { color: #4f46e5; border-bottom-color: #4f46e5; font-weight: 500; }
.bm-tpllist { min-height: 200px; max-height: 320px; overflow: auto; padding: 6px 0; }
.bm-tplitem { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 8px; cursor: pointer; }
.bm-tplitem:hover { background: #f8fafc; }
.bm-tplname { font-size: 14px; font-weight: 500; color: #020618; }
.bm-tplsub { flex: 1; font-size: 12.5px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-tplcat { font-size: 11px; color: #64748b; background: #f1f5f9; border-radius: 999px; padding: 2px 8px; }
.bm-tplempty { padding: 46px 0; text-align: center; color: #94a3b8; font-size: 13.5px; }
.bm-tplico { font-size: 30px; margin-bottom: 8px; opacity: .55; }
.bm-tplfoot { display: flex; justify-content: flex-end; padding-top: 8px; }

/* ===== 添加客户（combobox 下拉，照原版） ===== */
.cust-combo { width: 100%; height: 38px; padding: 0 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; color: #020618;
  cursor: pointer; font-family: inherit; text-align: left; }
.cust-combo:hover { background: #f9fafb; }
.cust-combo-chev { width: 14px; height: 14px; color: #8892a6; flex: 0 0 14px; }

/* ===== 导入客户弹窗（照原版：下载模板 + 上传） ===== */
.imp-wrap { padding: 2px 0; }
.imp-tip { font-size: 12.5px; color: #64748b; line-height: 1.6; margin-bottom: 14px; }
.imp-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.imp-file { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px dashed #cbd5e1;
  border-radius: 8px; font-size: 13.5px; color: #475569; cursor: pointer; background: #f8fafb; }
.imp-file input[type=file] { display: none; }
.imp-name { margin-top: 12px; font-size: 13px; color: #334155; }

/* ===== 导出客户弹窗（照原版：导出范围 + 每页条数） ===== */
.exp-wrap { padding: 2px 0; min-width: 420px; }

/* ===== 群发邮件：AI邮件生成器（镜像原版） ===== */
.cust-mailgen{max-width:960px !important;}
.cust-mailgen .xmodal-body,.cust-mailgen{max-height:86vh;overflow:auto;}
.mg-wrap{padding:2px;}
.mg-sect{border:1px solid #e2e8f0;border-radius:12px;padding:14px;margin-bottom:14px;background:#fff;}
.mg-lbl{font-size:14px;font-weight:600;color:#0f172b;margin-bottom:10px;display:flex;align-items:center;gap:6px;}
.mg-lbl2{font-size:12px;color:#64748b;margin:10px 0 5px;font-weight:600;}
.mg-sub{font-size:12px;color:#94a3b8;font-weight:400;}
.mg-row2{display:flex;gap:12px;}
.mg-row2>div{flex:1;}
.mg-tabs{display:flex;gap:6px;margin-bottom:10px;background:#f1f5f9;padding:4px;border-radius:10px;width:max-content;}
.mg-tab{border:none;background:transparent;padding:6px 14px;border-radius:8px;font-size:13px;color:#475569;cursor:pointer;}
.mg-tab.on{background:#fff;color:#0f172b;box-shadow:0 1px 2px rgba(15,23,42,.08);font-weight:600;}
.mg-inp{margin-bottom:8px;}
.mg-inp input,.mg-inp textarea{width:100%;border:1px solid #e2e8f0;border-radius:8px;padding:9px 11px;font-size:13px;background:#fff;color:#0f172b;outline:none;font-family:inherit;}
.mg-inp input:focus,.mg-inp textarea:focus{border-color:#0f172b;}
.mg-inp textarea{resize:vertical;min-height:48px;}
.mg-search input{width:100%;border:1px solid #e2e8f0;border-radius:8px;padding:8px 11px;font-size:13px;outline:none;}
.mg-picklist{max-height:220px;overflow:auto;border:1px solid #e2e8f0;border-radius:8px;margin-top:8px;background:#fff;}
.bm-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border-bottom:1px solid #f1f5f9;cursor:pointer;font-size:13px;}
.bm-row:last-child{border-bottom:none;}
.bm-rinfo{display:flex;flex-direction:column;line-height:1.35;}
.bm-rname{font-weight:600;color:#0f172b;}
.bm-rsub{font-size:12px;color:#64748b;}
.bm-noemail{margin-left:auto;font-size:11px;color:#dc2626;background:#fef2f2;padding:2px 8px;border-radius:999px;}
.bm-empty{color:#94a3b8;font-size:13px;text-align:center;padding:18px;}
.mg-file{display:block;border:1px dashed #cbd5e1;border-radius:10px;padding:14px;text-align:center;color:#64748b;font-size:13px;cursor:pointer;background:#f8fafc;}
.mg-file:hover{border-color:#0f172b;color:#0f172b;}
.mg-file input{display:none;}
.mg-filelist{margin-top:10px;}
.mg-fileitem{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;color:#334155;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:7px 10px;margin-bottom:6px;}
.mg-filedel{border:none;background:transparent;color:#dc2626;cursor:pointer;font-size:12px;}
.mg-aistyles{display:flex;gap:10px;}
.mg-aistyle{flex:1;border:1px solid #e2e8f0;border-radius:10px;padding:12px;font-size:13px;cursor:pointer;background:#fff;text-align:center;}
.mg-aistyle b{display:block;color:#0f172b;margin-bottom:4px;}
.mg-aistyle span{font-size:11px;color:#64748b;line-height:1.4;}
.mg-aistyle.on{border-color:#6366f1;background:#eef2ff;box-shadow:0 0 0 2px rgba(99,102,241,.25);}
.mg-aistyle.on b{color:#4338ca;}
.mg-genbtn{width:100%;border:none;border-radius:10px;padding:13px;font-size:15px;font-weight:600;color:#fff;cursor:pointer;background:linear-gradient(90deg,#6366f1,#8b5cf6);margin-top:14px;}
.mg-genbtn:hover{opacity:.94;}
.mg-genbtn:disabled{opacity:.6;cursor:default;}
.mg-linkrow{display:flex;gap:8px;}
.mg-linkrow input{flex:1;border:1px solid #e2e8f0;border-radius:8px;padding:8px 11px;font-size:13px;outline:none;}
.mg-linkbtn{margin-top:8px;width:auto;}

/* ===== 发送按钮：小图标+一键发送+收件人数 ===== */
.cust-mailgen .m12-btn-ok svg{width:15px;height:15px;flex:none;}
.mg-sendnum{background:rgba(255,255,255,.28);border-radius:999px;min-width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;padding:0 6px;line-height:1;}

/* ===== 群发邮件弹窗：1:1 镜像原版 proscaapp ===== */
.bgm-modal .xmodal-box,.bgm-modal{max-width:640px !important;}
.bgm-wrap{padding:2px;}
.bgm-lbl{font-size:14px;font-weight:600;color:#0f172b;margin:16px 0 8px;}
.bgm-wrap>.bgm-lbl:first-child{margin-top:2px;}
.bgm-lbl2{font-size:12px;color:#64748b;font-weight:600;margin:10px 0 6px;}
.bgm-tplbtn{width:100%;display:flex;align-items:center;gap:8px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;padding:10px 12px;font-size:13px;color:#64748b;cursor:pointer;}
.bgm-tplbtn:hover{border-color:#94a3b8;color:#0f172b;}
.bgm-tplico{font-size:14px;}
.bgm-ranges{display:flex;gap:22px;align-items:center;}
.bgm-radio{display:inline-flex;align-items:center;gap:7px;font-size:13px;color:#0f172b;cursor:pointer;}
.bgm-radio input{accent-color:#2563eb;width:15px;height:15px;}
.bgm-filter{background:#f8fafc;border:1px solid #eef2f7;border-radius:10px;padding:12px 14px;margin-top:4px;}
.bgm-tip{font-size:12px;color:#94a3b8;line-height:1.6;margin-bottom:4px;}
.bgm-filter .cust-combo{width:100%;}
.bgm-cols{display:flex;gap:12px;}
.bgm-cols>div{flex:1;min-width:0;}
.bgm-checkcard{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:8px 10px;max-height:150px;overflow:auto;}
.bgm-checkrow{display:flex;align-items:center;gap:8px;padding:5px 2px;font-size:13px;color:#0f172b;cursor:pointer;}
.bgm-checkrow input{accent-color:#2563eb;width:14px;height:14px;flex:none;}
.bgm-tagpill{display:inline-block;color:#fff;font-size:11px;font-weight:600;border-radius:999px;padding:2px 10px;line-height:1.5;}
.bgm-list{background:#fff;border:1px solid #e2e8f0;border-radius:10px;max-height:300px;overflow:auto;}
.bgm-row{display:flex;align-items:center;gap:12px;padding:11px 14px;border-bottom:1px solid #f1f5f9;cursor:pointer;}
.bgm-row:last-child{border-bottom:none;}
.bgm-row:hover{background:#f8fafc;}
.bgm-circle{appearance:none;-webkit-appearance:none;width:18px;height:18px;border:2px solid #cbd5e1;border-radius:50%;flex:none;cursor:pointer;margin:0;position:relative;background:#fff;}
.bgm-circle:checked{border-color:#2563eb;}
.bgm-circle:checked::after{content:'';position:absolute;left:3px;top:3px;width:8px;height:8px;border-radius:50%;background:#2563eb;}
.bgm-rinfo{display:flex;flex-direction:column;line-height:1.4;min-width:0;}
.bgm-rname{font-size:14px;font-weight:600;color:#0f172b;}
.bgm-rsub{font-size:12px;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.bgm-noemail{margin-left:auto;flex:none;background:#dc2626;color:#fff;font-size:11px;font-weight:600;border-radius:999px;padding:3px 10px;}
.bgm-sendbtn{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 18px;border:none;border-radius:8px;background:#0f172b;color:#fff;font-size:14px;font-weight:600;cursor:pointer;}
.bgm-sendbtn:hover{background:#1e293b;}
.bgm-sendbtn:disabled{opacity:.6;cursor:default;}
.bgm-sendbtn svg{width:15px;height:15px;flex:none;}

/* ===== N14 · M3 运行参数页（M17-m3settings） ===== */
.m3s-name{font-weight:600;font-size:13.5px;color:var(--text);}
.m3s-impact{color:var(--text-3);font-size:12px;line-height:1.55;margin-top:3px;max-width:430px;}
.m3s-key{color:var(--text-4);font-family:ui-monospace,Menlo,monospace;font-size:11px;margin-top:3px;}
.m3s-warn{color:var(--warning);font-size:12px;margin-top:4px;line-height:1.5;}
.m3s-note{font-size:13px;line-height:2;color:var(--text-2);}
.m3s-note b{color:var(--text);}
.m3s-input{width:72px;}
.m3s-switch{display:inline-flex;align-items:center;gap:6px;font-size:13px;cursor:pointer;color:var(--text-2);}
.m3s-switch input{cursor:pointer;}

/* ===== 客户详情全屏面板（P1） ===== */
.cdp-mask{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(15,23,42,.42);z-index:9000;display:flex;justify-content:flex-end;opacity:0;transition:opacity .2s}
.cdp-mask.show{opacity:1}
.cdp{width:920px;max-width:97vw;height:100%;background:#fff;box-shadow:-12px 0 48px rgba(15,23,42,.2);display:flex;flex-direction:column;transform:translateX(28px);transition:transform .22s ease;overflow:hidden}
.cdp-mask.show .cdp{transform:none}
.cdp-loading{padding:80px;text-align:center;color:#94a3b8;font-size:14px}
.cdp-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:22px 28px 0}
.cdp-id{display:flex;gap:14px;align-items:center;min-width:0}
.cdp-av{width:46px;height:46px;border-radius:14px;color:#fff;font-weight:700;font-size:19px;display:flex;align-items:center;justify-content:center;flex:none}
.cdp-tit h3{margin:0 0 4px;font-size:18px;color:#0f172a;display:flex;align-items:center;gap:8px;font-weight:600}
.cdp-tit p{margin:0;font-size:12.5px;color:#64748b}
.cdp-acts{display:flex;align-items:center;gap:8px;flex:none}
.cdp-btn{height:34px;padding:0 14px;border:1px solid #e2e8f0;background:#fff;border-radius:9px;font-size:13px;color:#334155;cursor:pointer;display:inline-flex;align-items:center;gap:6px;white-space:nowrap;flex:none}
.cdp-btn:hover{background:#f8fafc}
.cdp-btn.primary{background:#4f46e5;border-color:#4f46e5;color:#fff}
.cdp-btn.primary:hover{background:#4338ca}
.cdp-x{width:34px;height:34px;border:none;background:#f1f5f9;border-radius:9px;font-size:20px;line-height:1;color:#64748b;cursor:pointer;margin-left:4px}
.cdp-x:hover{background:#e2e8f0;color:#0f172a}
.cdp-tagbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:16px 28px 0}
.cdp-taglb{font-size:12px;color:#94a3b8;margin-right:2px}
.cdp-tag{height:28px;padding:0 12px;border-radius:999px;border:1px solid #e2e8f0;background:#fff;font-size:12.5px;color:#475569;cursor:pointer}
.cdp-tag:hover{border-color:#c7d2fe;color:#4f46e5}
.cdp-tag.on{background:#eef2ff;border-color:#c7d2fe;color:#4f46e5;font-weight:600}
.cdp-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;padding:18px 28px 0}
.cdp-stat{background:#f8fafc;border:1px solid #eef2f7;border-radius:12px;padding:14px 16px}
.cdp-stat span{display:block;font-size:12px;color:#64748b;margin-bottom:6px}
.cdp-stat b{font-size:22px;color:#0f172a;font-weight:600}
.cdp-tabs{display:flex;gap:26px;padding:18px 28px 0;border-bottom:1px solid #eef2f7;margin-top:6px}
.cdp-tab{background:none;border:none;padding:0 0 12px;font-size:14px;color:#64748b;cursor:pointer;position:relative}
.cdp-tab.on{color:#4f46e5;font-weight:600}
.cdp-tab.on:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:#4f46e5;border-radius:2px}
.cdp-body{flex:1;overflow:auto;padding:20px 28px 32px}
.cdp-grid{display:grid;grid-template-columns:1fr 1fr;gap:2px 32px}
.cdp-row{display:flex;gap:14px;padding:10px 0;border-bottom:1px dashed #f1f5f9;font-size:13px}
.cdp-row span{width:76px;color:#94a3b8;flex:none}
.cdp-row b{color:#1e293b;font-weight:500;word-break:break-all}
.cdp-empty{color:#94a3b8;font-size:13px;padding:36px 0;text-align:center}
.cdp-tl{display:flex;gap:12px;padding:6px 0 18px}
.cdp-tl i{width:9px;height:9px;border-radius:50%;background:#cbd5e1;margin-top:6px;flex:none}
.cdp-tl.send i{background:#6366f1}
.cdp-tl.open i{background:#0ea5e9}
.cdp-tl.reply i{background:#16a34a}
.cdp-tl.create i{background:#f59e0b}
.cdp-tl p{margin:0 0 4px;font-size:13.5px;color:#0f172a;font-weight:500}
.cdp-tl p em{font-style:normal;font-size:12px;color:#94a3b8;margin-left:8px;font-weight:400}
.cdp-tl span{font-size:12.5px;color:#64748b}
.cdp-tip{border-radius:11px;padding:14px 16px;margin-bottom:10px;border:1px solid #eef2f7;background:#f8fafc}
.cdp-tip b{display:block;font-size:13.5px;color:#0f172a;margin-bottom:5px}
.cdp-tip p{margin:0;font-size:12.5px;color:#64748b;line-height:1.65}
.cdp-tip.high{border-color:#fecaca;background:#fef2f2}
.cdp-tip.high b{color:#b91c1c}
.cdp-tip.medium{border-color:#fde68a;background:#fffbeb}
.cdp-tip.medium b{color:#b45309}
.cdp-tip.low{border-color:#dbeafe;background:#eff6ff}
.cdp-tip.low b{color:#1d4ed8}

/* ===== 侧栏徽章 & WA 占位页（P1） ===== */
.nav-badge{margin-left:6px;font-size:10.5px;line-height:16px;padding:0 6px;border-radius:999px;background:#eef2ff;color:#4f46e5;border:1px solid #c7d2fe;flex:none}
.wa-wrap{max-width:560px;margin:48px auto;background:#fff;border:1px solid #eef2f7;border-radius:16px;padding:44px 40px;text-align:center}
.wa-ico{width:64px;height:64px;border-radius:20px;background:#eff6ff;color:#2563eb;display:flex;align-items:center;justify-content:center;margin:0 auto 18px}
.wa-ico svg{width:32px;height:32px}
.wa-wrap h2{margin:0 0 10px;font-size:20px;color:#0f172a;font-weight:600}
.wa-wrap p{margin:0 auto 18px;font-size:13.5px;color:#64748b;line-height:1.75;max-width:420px}
.wa-tag{display:inline-block;font-size:12px;padding:3px 12px;border-radius:999px;background:#fffbeb;border:1px solid #fde68a;color:#b45309}
.wa-note{margin-top:20px;font-size:12.5px;color:#4f46e5;background:#eef2ff;border:1px solid #c7d2fe;border-radius:10px;padding:10px 14px;display:inline-block}

.nav-item .nav-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.nav-item .badge{margin-left:auto;flex:none;font-size:9px;line-height:15px;padding:0 5px;border-radius:7px}

/* ===== 邮件发送页（P1） ===== */
.mail-styles{display:flex;gap:8px;flex-wrap:wrap}
.mail-style{height:30px;padding:0 12px;border:1px solid #e2e8f0;background:#fff;border-radius:999px;font-size:12.5px;color:#475569;cursor:pointer}
.mail-style:hover{border-color:#c7d2fe;color:#4f46e5}
.mail-style.on{background:#eef2ff;border-color:#c7d2fe;color:#4f46e5;font-weight:600}
.mail-acts{display:flex;gap:10px;margin-bottom:10px;flex-wrap:wrap}
.m12b-ph .ph-sub{font-weight:400;font-size:11.5px;color:#94a3b8;margin-left:6px}
.m12b-hint{margin:8px 0 0;font-size:12px;color:#94a3b8}

/* ===== 数据分析页签（P1） ===== */
.an-tabs{margin:14px 0 4px}


/* ===== P1-6 展会采购商：邮箱 MX 验证 ===== */
.mx-pill{display:inline-block;margin-left:6px;padding:0 7px;border-radius:9px;font-size:11px;
  font-weight:600;line-height:17px;vertical-align:middle;background:#e8f7ee;color:#0f9d58;
  border:1px solid #cdebd9;white-space:nowrap}
.mx-pill.bad{background:#fdecea;color:#d93025;border-color:#f7d0cb}
.m12-quota{color:#e8830c;font-size:13px;font-weight:600;white-space:nowrap}
.m12-btn-verify{border:1px solid #f0b429;background:#fffaf0;color:#c77700;border-radius:8px;
  padding:0 12px;height:32px;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;
  display:inline-flex;align-items:center}
.m12-btn-verify:hover{background:#fff3d6}
.m12-btn-verify:disabled{opacity:.6;cursor:default}
.m12-btn-verify.sm{height:28px;padding:0 10px;font-size:12px}
.m12-d-mxbox{display:flex;align-items:center;gap:8px;background:#fffaf0;border:1px solid #fbe3b3;
  border-radius:8px;padding:7px 10px}
.m12-mx-note{flex:1;color:#a35b00;font-size:12px;line-height:1.5}
.m12-stat b .mx-pill{font-weight:600}


/* ===== P1-7 默认发件邮箱未配置提示条 ===== */
.ai-mailbar{display:flex;align-items:center;gap:16px;background:#fffbf2;border:1px solid #f5e3bd;
  border-radius:12px;padding:18px 22px;margin:14px 0}
.ai-mailbar .txt{flex:1;color:#4b4235;font-size:14px;line-height:1.7}
.ai-mailbar-btn{flex:none;background:#fff;border:1px solid #e9d7ab;color:#8a6a1f;border-radius:8px;
  height:34px;padding:0 16px;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap}
.ai-mailbar-btn:hover{background:#fff6e2}
.mailcfg .ml-hint{color:#8a8377;font-size:13px;line-height:1.7;margin-bottom:12px}
.mailcfg .ml-grid{display:grid;grid-template-columns:2fr 1fr;gap:12px}
.mailcfg .ml-tip{margin-top:10px;background:#f7f8fa;border-radius:8px;padding:10px 12px;
  color:#8a8377;font-size:12px;line-height:1.7}
.mailcfg .ai-f label em{color:#e5484d;font-style:normal;margin-left:2px}


/* ==================== P2 外观对齐（2026-10-30） ==================== */
/* P2-6 仪表板主标题：原版是深色实心字，去掉紫色渐变与 -webkit-text-fill */
.dash-head h1{
  background:none !important;
  -webkit-background-clip:border-box !important;
  background-clip:border-box !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  font-size:31px;
  letter-spacing:-.3px;
}

/* P2-1 侧栏分组小标题：原版「线索中心 / 转化工具 / 账户与系统」灰色小字，
   与三级菜单同一缩进（62px），字号更小、不可点 */
.nav-sep{
  height:28px;display:flex;align-items:center;
  padding-left:62px;padding-right:12px;
  font-size:11.5px;color:#a6b0c0;letter-spacing:.6px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  user-select:none;
}
.app.collapsed .nav-sep{display:none}

/* P2-1 徽章：New = 紫底白字胶囊；即将上线 = 纯橙色文字（与原版一致） */
.nav-item .badge.badge-new{
  background:#7c3aed;color:#fff;font-weight:600;padding:0 6px;
}
.nav-item .badge.badge-soon{
  background:transparent;color:#f59e0b;font-weight:600;padding:0;
}

/* P2-1 顶栏扩展入口：仅 AI跨境出海（M12-*）页面显示 */
.topbar-ext{display:none;align-items:center;gap:8px;margin-right:12px}
body.m12-scope .topbar-ext{display:flex}
.tb-btn{
  display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 13px;
  border-radius:999px;border:1px solid #e5e7eb;background:#fff;color:#374151;
  font-size:13px;line-height:1;cursor:pointer;font-family:inherit;white-space:nowrap;
  transition:all .15s ease;
}
.tb-btn:hover{border-color:#c7d2fe;color:#4f46e5;background:#faf9ff}
.tb-btn svg{width:14px;height:14px;flex:none}
.tb-btn.primary{background:linear-gradient(90deg,#7c3aed,#4f46e5);border-color:transparent;color:#fff;font-weight:600}
.tb-btn.primary:hover{background:linear-gradient(90deg,#7c3aed,#4f46e5);color:#fff;opacity:.94}
.tb-btn.plan{background:#f5f0ff;border-color:#e9d5ff;color:#7c3aed;font-weight:600}
.tb-btn.plan:hover{background:#f0e8ff;color:#6d28d9}

/* P2-1 客服悬浮球 + 客服卡 */
.cs-fab{
  display:none;position:fixed;right:26px;bottom:92px;width:52px;height:52px;
  border-radius:50%;background:linear-gradient(135deg,#7c3aed,#4f46e5);color:#fff;
  align-items:center;justify-content:center;cursor:pointer;
  box-shadow:0 10px 24px rgba(79,70,229,.34);z-index:900;
  transition:transform .15s ease;
}
.cs-fab:hover{transform:translateY(-2px)}
body.m12-scope .cs-fab{display:flex}
.cs-fab svg{width:24px;height:24px}
.cs-card{
  display:none;position:fixed;right:26px;bottom:156px;width:268px;background:#fff;
  border:1px solid #eef0f4;border-radius:14px;
  box-shadow:0 20px 48px rgba(15,23,42,.18);z-index:901;overflow:hidden;
}
.cs-card.show{display:block}
.cs-card-h{
  display:flex;align-items:center;justify-content:space-between;
  padding:13px 15px;font-size:14px;font-weight:600;color:#111827;
  background:linear-gradient(90deg,#faf7ff,#f4f2ff);border-bottom:1px solid #f0eef8;
}
.cs-card-h .cs-x{cursor:pointer;color:#9aa4b2;font-size:18px;line-height:1;padding:0 2px}
.cs-card-h .cs-x:hover{color:#4f46e5}
.cs-card-b{padding:6px 15px 12px}
.cs-row{display:flex;flex-direction:column;gap:2px;padding:9px 0;border-bottom:1px dashed #f1f3f7}
.cs-row:last-child{border-bottom:none}
.cs-row b{font-size:12px;color:#8b95a5;font-weight:400}
.cs-row span{font-size:13.5px;color:#111827}
.cs-card-f{padding:0 15px 15px}
.cs-card-f button{
  width:100%;height:36px;border-radius:9px;border:none;cursor:pointer;font-family:inherit;
  background:linear-gradient(90deg,#7c3aed,#4f46e5);color:#fff;font-size:13.5px;font-weight:600;
}
/* 顶栏变窄时优先隐藏文字入口，避免挤压搜索框 */
@media (max-width:1280px){body.m12-scope .tb-btn .tb-tx{display:none}body.m12-scope .tb-btn{padding:0 10px}}

/* ===== P2-3 列表行结构对齐原版（海关 5.5 / 展会 6.4 / 领英 8.4） ===== */
/* 头像：原版是青绿圆角方块，不是紫色圆形 */
.m12-avatar{
  border-radius:11px !important;
  background:linear-gradient(135deg,#2dd4bf,#0d9488) !important;
  color:#fff;
}
/* 三个指标：原版合并进一个带边框的盒子，指标间用细分隔线，底部一行灰字提示 */
.m12-cstats{
  display:flex;flex-direction:column;flex-shrink:0;
  border:1px solid #e6f4ef;background:#fbfefd;border-radius:10px;overflow:hidden;
}
.m12-cs-row{display:flex;align-items:stretch}
.m12-cstats .m12-stat{
  border:none;border-right:1px solid #eef6f3;background:transparent;border-radius:0;
  padding:8px 15px;min-width:96px;text-align:center;
}
.m12-cstats .m12-stat:last-child{border-right:none}
.m12-cstats .m12-stat span{font-size:11px;color:#8a9a95;margin-bottom:3px;display:block}
.m12-cstats .m12-stat b{font-size:13.5px;color:#111827;font-weight:700}
.m12-cs-hint{
  font-size:11px;color:#9aa8a3;text-align:center;line-height:1.6;
  padding:5px 12px 7px;border-top:1px dashed #eef6f3;
}
/* 详情按钮：原版主色 #0d9488 */
.m12-btn-detail{background:#0d9488 !important}
.m12-btn-detail:hover{background:#0f766e !important}

/* P2-3 详情按钮内的小眼睛图标 */
.m12-btn-detail{display:inline-flex;align-items:center;gap:6px;justify-content:center}
.m12-bd-ico{display:inline-flex;width:14px;height:14px}
.m12-bd-ico svg{width:14px;height:14px}

/* ===== P2-7 邮件指标卡：补彩色图标 + 底部进度条（原版 11.2） ===== */
.m12b-stat.p2i{padding:16px 18px 18px;position:relative}
.m12b-stat.p2i .m12b-stat-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.m12b-stat.p2i .m12b-stat-top > span{display:block;font-size:13px;color:#6b7280;margin:0}
.m12b-stat.p2i .m12b-stat-ic{display:inline-flex;width:18px;height:18px;flex:none;color:#9ca3af}
.m12b-stat.p2i .m12b-stat-ic svg{width:18px;height:18px}
.m12b-stat.p2i.c-blue   .m12b-stat-ic{color:#3b82f6}
.m12b-stat.p2i.c-green  .m12b-stat-ic{color:#10b981}
.m12b-stat.p2i.c-orange .m12b-stat-ic{color:#f59e0b}
.m12b-stat.p2i.c-purple .m12b-stat-ic{color:#8b5cf6}
.m12b-stat.p2i b{font-size:27px}
.m12b-stat.p2i i.m12b-unit{display:inline-block;font-style:normal;font-size:13px;color:#9ca3af;margin:0 0 0 6px}
.m12b-stat.p2i .m12b-bar{margin-top:13px;height:5px;border-radius:3px;background:#f1f2f4;overflow:hidden}
.m12b-stat.p2i .m12b-bar i{display:block;height:100%;border-radius:3px;background:#3b82f6;margin:0}
.m12b-stat.p2i.c-blue   .m12b-bar i{background:#3b82f6}
.m12b-stat.p2i.c-green  .m12b-bar i{background:#10b981}
.m12b-stat.p2i.c-orange .m12b-bar i{background:#f59e0b}
.m12b-stat.p2i.c-purple .m12b-bar i{background:#8b5cf6}

/* ===== P2-5 仪表板卡片尺寸/字号/内边距整体加一档（原版 2.7） ===== */
.dash-stats{gap:16px;margin-bottom:16px}
.dash-row2{gap:16px}
.dash-stat{padding:22px 22px 20px;border-radius:14px;border-color:#e9ebee}
.dash-stat .dtop{margin-bottom:12px}
.dash-stat .dtop span{font-size:14.5px;color:#4b5563}
.dash-stat .dic{width:22px;height:22px}
.dash-stat .dic svg{width:20px;height:20px}
.dash-stat b{font-size:34px;letter-spacing:-.5px}
.dash-stat i.sub{font-size:12px;margin-top:6px}
.dash-panel{padding:22px;border-radius:14px;border-color:#e9ebee;margin-top:16px}
.dash-panel .h{font-size:16px}
.dash-panel .s{font-size:12.5px;margin:4px 0 14px}

/* ===== P2-2 各页主色对齐原版（原版：海关=青绿，展会/领英=蓝） ===== */
.m12-scope-linkedin .m12-btn-query{background:#2563eb}
.m12-scope-linkedin .m12-btn-query:hover{background:#1d4ed8}
.m12-scope-linkedin .m12-bigtabs button.on{background:#2563eb;color:#fff;border-color:#2563eb}
.m12-scope-linkedin .m12-chip{background:#eff6ff;color:#2563eb;border-color:#bfdbfe}
.m12-scope-linkedin .m12-chip.grey{background:#f3f4f6;color:#4b5563;border-color:#e5e7eb}
.m12-scope-linkedin .m12-btn-detail{background:#2563eb !important}
.m12-scope-linkedin .m12-btn-detail:hover{background:#1d4ed8 !important}
.m12-scope-linkedin .m12-btn-imp{background:#2563eb;border-color:#2563eb}
.m12-scope-exhibitions .m12-btn-imp{background:#3b82f6;border-color:#3b82f6}
.m12-scope-exhibitions .m12-btn-detail{background:#3b82f6 !important}
.m12-scope-exhibitions .m12-btn-detail:hover{background:#2563eb !important}

/* 5.5 海关列表行首用序号（原版是 1/2/3 的方块），字号略小一点更协调 */
.m12-avatar.m12-avatar-num{font-size:15px;font-weight:700;letter-spacing:0}

/* 8.1 领英「采购商/供应商」移入筛选卡内部，做成小胶囊 */
.m12-scope-linkedin .m12-bigtabs{
  display:inline-flex;gap:0;border:1px solid #e5e7eb;border-radius:999px;
  padding:3px;background:#f8fafc;margin:0 0 14px;
}
.m12-scope-linkedin .m12-bigtabs button{
  height:30px;padding:0 18px;border-radius:999px;border:none;background:transparent;
  color:#4b5563;font-size:13px;cursor:pointer;font-family:inherit;
}
.m12-scope-linkedin .m12-bigtabs button.on{background:#2563eb;color:#fff;font-weight:600}

/* ===== P2-7 / 15.3 指标卡：图标 + 高度对齐原版 ===== */
.m12b-stat.p2i{display:flex;flex-direction:column;min-height:126px}
.m12b-stat.p2i b{margin-top:auto}
.m12b-stat.p2i.c-red .m12b-stat-ic{color:#dc2626}

/* 15.4 面板标题副标题 */
.m12b-ph2 .s{font-size:12px;color:#9aa4b2;font-weight:400;margin-top:3px}

/* 搜索栏并入卡片内部（原版把搜索/筛选放在「任务列表」卡里） */
.m12b-body .m12b-bar-in{
  background:transparent;border:none;border-radius:0;margin:0;
  padding:12px 16px;border-bottom:1px solid var(--border-2);
}

/* ===== P2-2 背调页（原版 4.1~4.4） ===== */
/* 4.1 整行大分段控件：发起背调 / 历史记录 */
.bg-seg{
  display:flex;width:100%;background:#fff;border:1px solid #e8e9eb;border-radius:16px;
  padding:5px;gap:5px;margin:12px 0 14px;
}
.bg-seg button{
  flex:1;height:46px;border-radius:12px;border:none;background:transparent;cursor:pointer;
  font-family:inherit;font-size:15px;color:#4b5563;display:inline-flex;align-items:center;
  justify-content:center;gap:8px;
}
.bg-seg button svg{width:18px;height:18px}
.bg-seg button.on{
  background:linear-gradient(90deg,#7c3aed,#4f46e5);color:#fff;font-weight:600;
  box-shadow:0 4px 12px rgba(109,40,217,.25);
}
/* 4.2 第 2 步整行铺在下面（原版单列） */
.ai-two-one{grid-template-columns:1fr !important}
/* 4.3 查询方式改成小胶囊 */
.ai-two-one .ai-modes{display:flex;gap:10px;flex-wrap:wrap}
.ai-two-one .ai-mode{
  width:auto;flex:none;flex-direction:row;gap:8px;padding:0 16px;height:42px;
  align-items:center;justify-content:flex-start;
}
.ai-two-one .ai-mode b{font-size:13.5px;margin:0}
.ai-two-one .ai-mode span{margin:0;font-size:12px;color:#9aa4b2}
/* 4.4 开始背调按钮与输入框同一行，按钮靠右 */
.bg-row{display:flex;gap:10px;align-items:center}
.bg-row input{flex:1;min-width:0}
.bg-row .ai-btn-grad{width:auto !important;flex:none;padding:0 22px;height:44px}

/* 邮件状态：失败 */
.em-st-fail{background:#fee2e2;color:#b91c1c;border-color:#fecaca}
.em-st-open{background:#dcfce7;color:#15803d;border-color:#bbf7d0}

/* ===== M12 智能体 · 定时自动运行 ===== */
.ai-sched .ai-card-h { margin-bottom: 2px; }
.sched-badge { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: #f3f4f6; color: #6b7280; }
.sched-badge.on { background: #ecfdf5; color: #047857; }
.sched-acts { margin-left: auto; display: flex; gap: 8px; }
.sched-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 10px 0 8px; }
.sched-item { background: #f9fafb; border: 1px solid #f3f4f6; border-radius: 8px; padding: 8px 10px; min-width: 0; }
.sched-item span { display: block; font-size: 11.5px; color: #9ca3af; }
.sched-item b { display: block; font-size: 13px; color: #111827; margin-top: 2px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-last { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #6b7280;
  border-top: 1px dashed #f0f0f0; padding-top: 8px; }
.sl-tag { background: #eef2ff; color: #4338ca; border-radius: 5px; padding: 1px 7px; font-size: 11px; flex: 0 0 auto; }
.sl-tag.auto { background: #f5f3ff; color: #6d28d9; }
.sl-time { color: #9ca3af; flex: 0 0 auto; }
.sl-msg { color: #374151; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.schedcfg .sc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; background: #f9fafb; border: 1px solid #f3f4f6; border-radius: 10px; margin-bottom: 10px; }
.schedcfg .sc-row .l { min-width: 0; }
.schedcfg .sc-row .l b { display: block; font-size: 13px; color: #111827; font-weight: 600; }
.schedcfg .sc-row .l span { display: block; font-size: 11.5px; color: #9ca3af; margin-top: 2px; }
.schedcfg .sc-sec { margin-bottom: 12px; }
.schedcfg .sc-sec > label { display: block; font-size: 12.5px; color: #374151; font-weight: 600; margin-bottom: 7px; }
.schedcfg .sc-sec > label em { font-style: normal; font-weight: 400; color: #9ca3af; margin-left: 6px; font-size: 11.5px; }
.sc-times { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sc-slot { display: inline-flex; align-items: center; gap: 4px; background: #f5f3ff;
  border: 1px solid #ede9fe; border-radius: 8px; padding: 3px 6px; }
.sc-slot input[type=time] { border: none; background: transparent; font-size: 13px; color: #4c1d95;
  font-family: inherit; width: 94px; outline: none; }
.sc-slot b { cursor: pointer; color: #a78bfa; font-weight: 400; padding: 0 3px; }
.sc-slot b:hover { color: #dc2626; }
.sc-add { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px dashed #d1d5db;
  background: #fff; color: #6b7280; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.sc-quick { margin-top: 8px; font-size: 11.5px; color: #9ca3af; }
.sc-quick button { background: none; border: none; color: #7c3aed; cursor: pointer; font-size: 11.5px;
  padding: 0 4px; font-family: inherit; }
.sc-quick button:hover { text-decoration: underline; }
.sc-days { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-day { padding: 5px 12px; border-radius: 8px; border: 1px solid #e5e7eb; font-size: 12.5px;
  color: #6b7280; cursor: pointer; user-select: none; }
.sc-day.on { background: #111827; border-color: #111827; color: #fff; }
.sc-hint { font-size: 11.5px; color: #9ca3af; margin-top: 6px; }
.sc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.sc-unit { display: flex; align-items: center; gap: 6px; }
.sc-unit input { flex: 0 0 96px; }
.sc-unit em { font-style: normal; font-size: 12px; color: #9ca3af; flex: 0 0 auto; }
.sc-agents { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sc-agent { display: flex; align-items: center; gap: 8px; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 7px 10px; font-size: 12.5px; cursor: pointer; }
.sc-agent.on { border-color: #a78bfa; background: #faf5ff; }
.sc-agent.dis { opacity: .55; cursor: not-allowed; }
.sc-agent input { accent-color: #7c3aed; flex: 0 0 auto; }
.sc-agent span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-agent em { font-style: normal; font-size: 11px; color: #9ca3af; flex: 0 0 auto; max-width: 40%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-note { background: #f7f8fa; border-radius: 8px; padding: 9px 12px; font-size: 11.5px;
  color: #8a8377; line-height: 1.7; }

/* ---- 界面多语言（#51）：英文比中文长，给按钮和菜单留出余量 ---- */
.lang-btn{font-size:12px;letter-spacing:0;opacity:.85;padding:1px 6px;border-radius:4px;
  border:1px solid rgba(255,255,255,.25);line-height:16px}
.lang-btn:hover{opacity:1}
html[data-ui-lang="en"] .nav a{letter-spacing:0}
html[data-ui-lang="en"] .brand-text em{display:inline-block;max-width:340px;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
html[data-ui-lang="en"] .tb-btn .tb-tx{white-space:nowrap}

/* 英文比中文长 30–50%，顶栏右侧是唯一会横向挤爆的地方：
   账号名不能被压缩、按钮文字缩小一档、搜索框限宽，其余布局交给 flex。 */
html[data-ui-lang="en"] .user-box{flex-shrink:0}
html[data-ui-lang="en"] .topbar-right{gap:10px}
html[data-ui-lang="en"] .topbar-ext .tb-btn .tb-tx{font-size:12.5px}
html[data-ui-lang="en"] .gsearch{max-width:190px}
html[data-ui-lang="en"] .logout{font-size:13.5px}
html[data-ui-lang="en"] .nav a{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* 登录页的语言开关：未登录时顶栏不显示，没有它就切不回来 */
.lang-float{position:fixed;right:26px;top:22px;z-index:50;font-size:13px;color:#4e5969;
  padding:3px 10px;border-radius:6px;background:rgba(255,255,255,.85);border:1px solid #dcdfe6;
  cursor:pointer;line-height:18px}
.lang-float:hover{color:#0b5cff;border-color:#0b5cff}
.login-wrap .lang-float{display:inline-block}

/* 英文标签页（工作台的多页签）：中文 13px/176px 够用，英文标题长 30–50% 会被 ellipsis
   吃掉，而页签栏本身是横向滚动的，放宽宽度不会挤坏布局。 */
html[data-ui-lang="en"] .xtab{max-width:340px}
html[data-ui-lang="en"] .xtab-label{font-size:12.5px}
/* 顶栏中间那格是「当前页名」，中文固定 110px 刚好，英文写不下（Company data lookup）。
   给英文放宽到 210px 并压缩搜索框，比让它显示成 'Company data …' 好。 */
html[data-ui-lang="en"] .bar-name{width:210px}
html[data-ui-lang="en"] .gsearch{max-width:170px}
