/* ============================================================
   全球贸易 AI 应用平台 - 全局样式
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}
body {
    background: #f0f4fa;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* ===== 侧边栏 ===== */
.sidebar {
    width: 80px;
    background: #0a1628;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0 20px;
    flex-shrink: 0;
    box-shadow: 2px 0 12px rgba(0,0,0,0.2);
    z-index: 10;
    transition: width 0.2s;
}
.sidebar .logo {
    font-size: 28px;
    color: #4fc3f7;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar .logo span { font-size: 16px; font-weight: 700; color: #fff; display: none; }
.sidebar .nav-item {
    position: relative;
    color: #6f8ba6;
    padding: 14px 0;
    text-align: center;
    font-size: 10px;
    cursor: pointer;
    width: 100%;
    border-left: 3px solid transparent;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.sidebar .nav-item i { font-size: 22px; }
/* 侧边栏未读消息数徽标（聊天菜单） */
.nav-badge { position:absolute; top:6px; right:8px; min-width:16px; height:16px; line-height:16px; padding:0 4px; border-radius:8px; background:#e53935; color:#fff; font-size:10px; font-weight:700; text-align:center; }
.sidebar .nav-item.active, .sidebar .nav-item:hover {
    color: #fff;
    border-left-color: #4fc3f7;
    background: rgba(79,195,247,0.06);
}
.sidebar .bottom { margin-top: auto; }
.sidebar .bottom .avatar {
    width: 40px; height: 40px;
    background: #1e3550;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600; color: #fff;
    border: 2px solid #4fc3f7;
}

/* ===== 主区域 ===== */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.topbar {
    background: #fff;
    padding: 14px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e9f2;
    flex-shrink: 0;
}
.topbar .title { font-size: 20px; font-weight: 700; color: #0a1628; }
.topbar .title small { font-weight: 400; font-size: 14px; color: #6a839d; margin-left: 14px; }
.topbar .actions {
    display: flex; gap: 14px; align-items: center;
    color: #4a5f73; font-size: 18px;
}
.topbar-action {
    position: relative; display: flex; align-items: center;
    cursor: pointer; padding: 6px;
    border-radius: 10px; transition: 0.2s;
}
.topbar-action:hover { background: #f0f4fa; color: #0a1628; }
/* 右上角语言选择：地球图标与选择框保持间距，避免连在一起 */
.topbar-action.lang-wrap { gap: 8px; }
/* 界面语言 + 沟通语言的统一入口（原来顶栏是两个并排图标，分不清） */
.topbar-action.ui-lang-wrap { gap: 6px; padding: 6px 10px; }
.topbar-action.ui-lang-wrap select { font-family: inherit; color: #0a1628; }
.ui-lang-label { font-size: 13px; font-weight: 600; color: #1f3347; white-space: nowrap; }
.ui-lang-caret { font-size: 10px; color: #8ba0b6; margin-top: 1px; }
/* 语言面板：绝对定位挂在顶栏下方，不能被 .topbar 的 overflow 裁掉 */
.lang-panel {
    position: absolute; top: calc(100% + 6px); right: 0; width: 268px;
    background: #fff; border: 1px solid #e3ebf3; border-radius: 12px;
    box-shadow: 0 10px 28px rgba(20, 40, 60, .14); z-index: 200;
    padding: 10px; cursor: default; text-align: left;
}
.lang-panel .lp-sec + .lp-sec { margin-top: 10px; padding-top: 10px; border-top: 1px solid #eef3f9; }
.lang-panel .lp-title { font-size: 12px; font-weight: 700; color: #6b8199; margin-bottom: 6px; }
.lang-panel .lp-hint { font-size: 11px; color: #9bb0c4; margin-top: 6px; line-height: 1.5; }
.lang-panel .lp-ui-mount select { width: 100%; }
.topbar .actions i { cursor: pointer; transition: 0.2s; }
.topbar .actions i:hover { color: #0a1628; }
.profile-icon { font-size: 26px; color: #4a5f73; }

/* 顶栏点数徽标 */
.points-wrap { gap: 6px; padding: 6px 12px; background: #fff6e6; border-radius: 20px; }
.points-wrap:hover { background: #ffeecb; }
.points-wrap i { font-size: 17px; }
.points-wrap .points-badge {
    font-size: 14px; font-weight: 800; color: #c8761a; min-width: 18px; text-align: center;
}

/* 铃铛未读徽标 */
.bell-wrap { position: relative; }
.bell-badge {
    position: absolute; top: 2px; right: 2px;
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 50%;
    background: #ff5252; color: #fff; font-size: 10px; font-weight: 700;
    align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff;
}

/* 通知面板 */
.notify-panel, .profile-panel {
    position: absolute; top: calc(100% + 8px); right: 0;
    width: 340px; max-width: 90vw; background: #fff; border-radius: 14px;
    border: 1px solid #e2e9f2; box-shadow: 0 12px 32px rgba(10,22,40,0.14);
    z-index: 200; display: none; overflow: hidden;
    animation: fadeIn 0.2s ease;
}
.notify-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; border-bottom: 1px solid #f0f4fa;
    font-size: 14px; font-weight: 700; color: #0a1628;
}
.notify-readall { font-size: 12px; font-weight: 400; color: #1565c0; cursor: pointer; }
.notify-readall:hover { text-decoration: underline; }
.notify-list { max-height: 360px; overflow-y: auto; }
.notify-item {
    display: flex; gap: 10px; padding: 12px 16px; cursor: pointer;
    border-bottom: 1px solid #f5f8fc; transition: 0.15s;
}
.notify-item:hover { background: #f7fafd; }
.notify-item.read { opacity: 0.6; }
.notify-item > i { font-size: 16px; margin-top: 2px; flex-shrink: 0; }
.notify-content { flex: 1; min-width: 0; }
.notify-title { font-size: 13px; font-weight: 600; color: #0a1628; position: relative; }
.notify-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: #4fc3f7; margin-left: 6px;
}
.notify-desc { font-size: 12px; color: #6a839d; margin-top: 3px; line-height: 1.5; }
.notify-time { font-size: 11px; color: #a9bccd; margin-top: 4px; }

/* 个人中心面板 */
.profile-panel { width: 280px; }
.profile-head {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 16px; border-bottom: 1px solid #f0f4fa;
    background: linear-gradient(135deg, #0a1628, #123a5e); color: #fff;
}
.profile-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(79,195,247,0.25); border: 2px solid #4fc3f7;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.profile-name { font-weight: 700; font-size: 15px; }
.profile-plan { font-size: 12px; color: #9db8d4; margin-top: 2px; }
.profile-stats {
    display: flex; border-bottom: 1px solid #f0f4fa;
}
.profile-stats > div { flex: 1; text-align: center; padding: 14px 0; }
.profile-stats .ps-value { display: block; font-size: 18px; font-weight: 800; color: #0a1628; }
.profile-stats .ps-label { font-size: 11px; color: #7b93ab; }
.profile-menu { padding: 8px 0; }
.profile-menu-item {
    display: flex; align-items: center; gap: 12px; padding: 11px 16px;
    font-size: 14px; color: #1f3347; cursor: pointer; transition: 0.15s;
}
.profile-menu-item:hover { background: #f5f9ff; color: #1565c0; }
.profile-menu-item i { width: 20px; text-align: center; color: #6a839d; }
.profile-menu-item:hover i { color: #1565c0; }

/* ===== 消息中心列表 ===== */
.notify-list-page { display: flex; flex-direction: column; gap: 8px; }
.notify-item { align-items: flex-start; }
.notify-mark {
    flex-shrink: 0; border: 1px solid #4fc3f7; background: #fff; color: #1565c0;
    border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer; transition: 0.15s;
}
.notify-mark:hover { background: #4fc3f7; color: #fff; }

/* ===== 个人中心页面 ===== */
.profile-page { display: flex; justify-content: center; padding-top: 8px; }
.profile-card {
    width: 420px; max-width: 100%; background: #fff; border-radius: 18px; padding: 28px 26px;
    box-shadow: 0 8px 28px rgba(10,22,40,0.08); text-align: center;
}
.profile-avatar-lg { font-size: 64px; color: #4fc3f7; }
.profile-name { font-size: 20px; font-weight: 800; color: #0a1628; margin-top: 6px; }
.profile-role { font-size: 13px; color: #7b93ab; margin-top: 2px; }
.profile-stats { margin-top: 18px; border-top: 1px solid #f0f4fa; border-bottom: 1px solid #f0f4fa; }
.pstat { display: flex; flex-direction: column; gap: 2px; }
.pstat-num { font-size: 18px; font-weight: 800; color: #0a1628; }
.pstat-label { font-size: 11px; color: #7b93ab; }
.profile-actions { display: flex; gap: 10px; margin-top: 18px; }
.profile-btn {
    flex: 1; border: 1px solid #dce6f2; background: #f7fafd; color: #1f3347;
    border-radius: 10px; padding: 10px; font-size: 13px; cursor: pointer; transition: 0.15s;
}
.profile-btn:hover { border-color: #4fc3f7; color: #1565c0; background: #eaf6ff; }
.profile-logout {
    width: 100%; margin-top: 16px; border: none; background: linear-gradient(135deg, #ff7a45, #ff5252);
    color: #fff; border-radius: 10px; padding: 12px; font-size: 15px; font-weight: 700; cursor: pointer; transition: 0.15s;
}
.profile-logout:hover { opacity: 0.92; box-shadow: 0 6px 16px rgba(255,82,82,0.3); }

/* ===== 登录遮罩 ===== */
.login-overlay {
    position: fixed; inset: 0; z-index: 999; display: none;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(10,22,40,0.92), rgba(18,58,94,0.92));
}
.login-box {
    width: 340px; max-width: 90vw; background: #fff; border-radius: 18px; padding: 36px 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35); text-align: center;
}
.login-logo { font-size: 30px; font-weight: 800; color: #0a1628; }
.login-logo i { color: #4fc3f7; margin-right: 8px; }
.login-sub { font-size: 13px; color: #7b93ab; margin-bottom: 22px; }
/* 登录浮层里的界面语言切换器（未登录时顶栏面板被遮罩盖住，这里是唯一入口） */
.login-lang { margin: -6px 0 12px; text-align: center; }
.login-lang select {
    padding: 5px 10px; border-radius: 8px; font-size: 12.5px; cursor: pointer;
    border: 1px solid #d5deea; background: #fff; color: #33475b; outline: none;
}
.login-input {
    width: 100%; box-sizing: border-box; padding: 12px 14px; margin-bottom: 12px;
    border: 1px solid #dce6f2; border-radius: 10px; font-size: 14px; outline: none; transition: 0.15s;
}
.login-input:focus { border-color: #4fc3f7; box-shadow: 0 0 0 3px rgba(79,195,247,0.18); }
.login-btn {
    width: 100%; border: none; background: linear-gradient(135deg, #1565c0, #4fc3f7);
    color: #fff; border-radius: 10px; padding: 13px; font-size: 16px; font-weight: 700; cursor: pointer; transition: 0.15s;
}
.login-btn:hover { opacity: 0.93; }
.login-hint { font-size: 12px; color: #a9bccd; margin-top: 16px; }

.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===== 页面容器 ===== */
.page { display: none; animation: fadeIn 0.3s ease; }
.page.active { display: block; }

/* 页面内区块统一间距：相邻块不连在一起 */
.page > * + * { margin-top: 20px; }
.page > .page-head-row + * { margin-top: 16px; }
.page-head-row {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 10px; margin-bottom: 0;
}
.page-head-title { font-weight: 600; color: #0a1628; font-size: 18px; }
.page-head-actions { display: flex; gap: 8px; align-items: center; }
@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

/* ===== 统计卡片 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}
.stat-card {
    background: #fff; border-radius: 14px; padding: 18px 20px;
    border: 1px solid #e2e9f2; box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    display: flex; align-items: center; gap: 14px;
}
.stat-card .stat-icon {
    width: 46px; height: 46px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.stat-card .stat-icon.blue { background:#e3f0fd; color:#1565c0; }
.stat-card .stat-icon.orange { background:#fff3e0; color:#e65100; }
.stat-card .stat-icon.gray { background:#f0f4fa; color:#6a839d; }
.stat-card .stat-icon.green { background:#e8f5e9; color:#2e7d32; }
.stat-card .stat-icon.teal { background:#e0f2f1; color:#00695c; }
.stat-card .stat-icon.purple { background:#f3e5f5; color:#6a1b9a; }
.stat-card .stat-icon.indigo { background:#e8eaf6; color:#283593; }
.stat-card .stat-icon.cyan { background:#e0f7fa; color:#00838f; }
.stat-card .stat-icon.pink { background:#fce4ec; color:#ad1457; }
.stat-card .stat-icon.gold { background:#fff8e1; color:#f9a825; }
.stat-card .stat-icon.brown { background:#efebe9; color:#5d4037; }
.stat-card .stat-body { min-width: 0; }
.stat-card .value { font-size: 22px; font-weight: 700; color: #0a1628; line-height: 1.2; }
.stat-card .label { font-size: 12px; color: #7b93ab; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 图表卡片 ===== */
.chart-row {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.chart-card {
    background: #fff; border-radius: 14px; border: 1px solid #e2e9f2;
    padding: 18px 20px;
}
.chart-card h3 { font-size: 14px; color: #1f3347; margin-bottom: 14px; }

/* 环形图 */
.chart-donut-wrap { display: flex; justify-content: center; padding: 6px 0 12px; }
.donut {
    width: 150px; height: 150px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.donut-hole {
    width: 96px; height: 96px; border-radius: 50%; background: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.donut-hole .donut-total { font-size: 24px; font-weight: 800; color: #0a1628; }
.donut-hole .donut-label { font-size: 11px; color: #7b93ab; }
.chart-legend { display: flex; flex-direction: column; gap: 6px; }
.legend-item {
    display: flex; align-items: center; gap: 8px; font-size: 13px;
    padding: 3px 0;
}
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend-label { color: #1f3347; flex: 1; }
.legend-value { font-weight: 600; color: #0a1628; }

/* 横向条形图 */
.chart-bars { display: flex; flex-direction: column; gap: 10px; }
.hbar-row { display: flex; align-items: center; gap: 10px; }
.hbar-label { width: 74px; font-size: 13px; color: #1f3347; text-align: right; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { flex: 1; height: 12px; background: #f0f4fa; border-radius: 6px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 6px; transition: width 0.4s ease; min-width: 4px; }
.hbar-value { width: 26px; font-size: 13px; font-weight: 600; color: #0a1628; flex-shrink: 0; text-align: right; }

/* ===== 最近动态 ===== */
.recent-activity {
    background: #fff; border-radius: 14px; border: 1px solid #e2e9f2;
    padding: 18px 24px;
}
.recent-activity h3 { font-size: 15px; color: #1f3347; margin-bottom: 14px; }
.activity-item { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid #f0f4fa; }
.activity-item:last-child { border-bottom: 0; }
.activity-item .icon {
    width: 36px; height: 36px; background: #e9f2fa; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; color: #0a1628;
}
.activity-item .text { flex:1; }
.activity-item .text .title { font-weight: 500; color: #1f3347; }
.activity-item .text .desc { font-size: 13px; color: #6a839d; }
.activity-item .time { font-size: 12px; color: #889fb3; }

/* ===== 聊天工作台 ===== */
/* 聊天页占满视口高度，使底部输入框固定在第一屏、消息区独立滚动 */
#page-chat.active { display: flex; flex-direction: column; height: 100%; }
.chat-layout { display: flex; gap: 20px; height: 100%; min-height: 480px; flex: 1; }
.chat-contacts {
    width: 260px; background: #fff; border-radius: 14px; border: 1px solid #e2e9f2;
    padding: 12px 0; overflow-y: auto; flex-shrink: 0;
}
.chat-contacts .search { padding: 0 16px 12px; border-bottom:1px solid #f0f4fa; }
.chat-contacts .search input {
    width: 100%; padding: 8px 12px; border-radius: 30px; border:1px solid #dce4ed;
    background:#f8fafc; font-size:13px; outline:none;
}
.chat-contacts .search input:focus { border-color:#4fc3f7; }
.contact-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px; cursor: pointer;
    border-left:3px solid transparent; transition:0.15s;
}
.contact-item:hover { background:#f5f9ff; }
.contact-item.active { background:#e8f4fd; border-left-color:#4fc3f7; }
.contact-item .avatar {
    width: 40px; height: 40px; border-radius:50%;
    display: flex; align-items:center; justify-content:center;
    color:#fff; font-weight:600; flex-shrink:0;
}
.contact-item .info { flex:1; min-width:0; }
.contact-item .info .name { font-weight:500; color:#1f3347; }
.contact-item .info .lang { font-size:12px; color:#6f8ba6; }
.contact-item .info .preview { font-size:13px; color:#6a839d; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.contact-item .badge {
    background:#ff5252; color:#fff; border-radius:50%;
    min-width:20px; height:20px; padding:0 5px; font-size:11px; font-weight:600;
    display:flex; align-items:center; justify-content:center; line-height:1;
    flex-shrink:0;
}
/* ---------- 访客会话按渠道分组折叠（2026-10-15）----------
   访客会话量大时把其他类型消息冲出可视区；按渠道收成一行分组头，
   默认折叠，点渠道名展开。 */
.contact-group { border-bottom:1px solid #eef3f9; }
.contact-group-head {
    display:flex; align-items:center; gap:10px; padding:10px 16px; cursor:pointer;
    user-select:none; transition:0.15s;
}
.contact-group-head:hover { background:#f5f9ff; }
.contact-group-head .cg-chev { color:#8aa2b8; font-size:12px; flex-shrink:0; transition:transform .15s; }
.contact-group.open .contact-group-head .cg-chev { transform:rotate(90deg); }
.contact-group-head .cg-ico { color:#2f6bff; font-size:15px; flex-shrink:0; }
.contact-group-head .cg-info { flex:1; min-width:0; }
.contact-group-head .cg-title { font-weight:600; color:#1f3347; font-size:14px; display:flex; align-items:center; gap:6px; }
.contact-group-head .cg-title > span[data-no-i18n] { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.contact-group-head .cg-sub {
    font-size:12px; color:#6a839d; margin-top:2px;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.contact-group-head .badge {
    background:#ff5252; color:#fff; border-radius:50%;
    min-width:20px; height:20px; padding:0 5px; font-size:11px; font-weight:600;
    display:flex; align-items:center; justify-content:center; line-height:1; flex-shrink:0;
}
.contact-group-items { display:none; }
.contact-group.open .contact-group-items { display:block; }
/* 分组内会话行左缩进，体现「隶属于该渠道」的层级 */
.contact-group-items .contact-item { padding-left:36px; }
/* ---------- 渠道表单：多语言文案（按语言一行一个输入框）---------- */
.ch-i18nmap { display:flex; flex-direction:column; gap:6px; }
.ch-i18nmap-row { display:flex; align-items:center; gap:10px; }
.ch-i18nmap-row .ch-i18nmap-code {
    flex:0 0 88px; font-size:12px; color:#5a7390; text-align:right;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.ch-i18nmap-row input { flex:1; min-width:0; }
.ch-i18nmap-empty { font-size:12px; color:#93a7bb; }
.no-trans { color:#ff8a65; font-size:11px; margin-left:6px; }
.email-card {
    background:#f7faff; border:1px solid #e3ecf7; border-radius:10px;
    padding:12px 14px; max-width:580px; line-height:1.6;
}
.email-subject {
    font-weight:700; color:#0a1628; font-size:14px; margin-bottom:6px;
    display:flex; align-items:center; gap:6px; word-break:break-word;
}
.email-subject .fa-envelope { color:#1e88e5; flex-shrink:0; }
.email-body { color:#243b53; font-size:13px; white-space:pre-wrap; word-break:break-word; }
.email-orig {
    margin-top:8px; padding-top:8px; border-top:1px dashed #dfe7f0;
    color:#5b7088; font-size:12px;
}
.email-orig-subject { font-weight:600; margin-bottom:3px; color:#7a8aa0; word-break:break-word; }
.email-orig-body { white-space:pre-wrap; word-break:break-word; }

.chat-window {
    flex:1; background:#fff; border-radius:14px; border:1px solid #e2e9f2;
    display:flex; flex-direction:column; min-width:0;
}
.chat-header { padding:14px 20px; border-bottom:1px solid #f0f4fa; display:flex; justify-content:space-between; align-items:center; }
.chat-header .contact-info { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.chat-header .contact-info .name { font-weight:600; color:#0a1628; }
.chat-header .contact-info .lang {
    font-size:12px; color:#6f8ba6; background:#f0f4fa; padding:2px 12px; border-radius:30px;
}
.chat-header .contact-info .channel-tag {
    font-size:12px; color:#0a558c; background:#e3f0fd; padding:2px 12px; border-radius:30px;
    display:inline-flex; align-items:center; gap:6px;
}
/* 跨租户会话语言选择器 */
.lang-selector {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #5a7390;
    max-width: 100%; white-space: nowrap; flex: 0 0 auto;
}
/* 翻译方向：对方语言 ⇄ 我的语言，两个选择器并排 */
.lang-selector .ls-item { display: inline-flex; align-items: center; gap: 5px; }
.lang-selector .ls-arrow { color: #1565c0; font-size: 11px; opacity: .8; }
.lang-selector label { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.lang-selector .lang-input { min-width: 76px; }
.send-lang-tip {
    padding: 5px 16px 0; font-size: 11.5px; color: #889fb3;
    display: flex; align-items: center; gap: 5px;
}
.send-lang-tip:empty { display: none; }
.lang-selector select {
    border: 1px solid #dce4ed; border-radius: 30px; padding: 5px 10px;
    font-size: 12px; color: #0a1628; background: #f8fafc; outline: none; cursor: pointer;
}
.lang-selector select:focus { border-color: #4fc3f7; }
/* 自动回复设置（聊天头部，我的语言旁） */
.auto-reply-box {
    display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: #5a7390;
    padding: 8px 12px; background: #f6f9ff; border-radius: 14px; border: 1px solid #e8eef7;
    max-width: 420px;
}
.auto-reply-box .ar-row1 { display: flex; align-items: center; gap: 10px; }
.auto-reply-box .ar-toggle {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; flex: none;
}
.auto-reply-box .ar-toggle input[type=checkbox] { display: none; }
.auto-reply-box .ar-slider {
    width: 34px; height: 18px; border-radius: 20px; background: #ccd8e5; position: relative; transition: .2s; flex: none;
}
.auto-reply-box .ar-slider::after {
    content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
    background: #fff; transition: .2s;
}
.auto-reply-box .ar-toggle input:checked + .ar-slider { background: #2f6bff; }
.auto-reply-box .ar-toggle input:checked + .ar-slider::after { left: 18px; }
.auto-reply-box .ar-label { font-weight: 600; color: #0a1628; white-space: nowrap; }
.auto-reply-box .ar-goal {
    flex: 1; min-width: 0; border: 1px solid #dce4ed; border-radius: 10px; padding: 6px 11px;
    font-size: 12.5px; color: #0a1628; background: #fff; outline: none;
}
.auto-reply-box .ar-goal:focus { border-color: #4fc3f7; box-shadow: 0 0 0 2px rgba(79,195,247,.15); }
.auto-reply-box .ar-goal::placeholder { color: #9fb2c8; }
.auto-reply-box .ar-row2 { display: flex; flex-direction: column; align-items: stretch; gap: 7px; }
.auto-reply-box .ar-kb-label { flex: none; display: inline-flex; align-items: center; gap: 5px; color: #5a7390; }
/* 知识库下拉选择器 */
.auto-reply-box .ar-kb-picker { position: relative; }
.auto-reply-box .ar-kb-trigger {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
    border: 1px solid #dce4ed; border-radius: 10px; padding: 7px 11px; font-size: 12.5px;
    color: #5a7390; background: #fff; cursor: pointer; outline: none; text-align: left;
}
.auto-reply-box .ar-kb-trigger:hover { border-color: #4fc3f7; }
.auto-reply-box .ar-kb-trigger i { font-size: 11px; color: #9fb2c8; transition: transform .2s; }
.auto-reply-box .ar-kb-picker.open .ar-kb-trigger i { transform: rotate(180deg); }
.auto-reply-box .ar-kb-dropdown {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 100;
    background: #fff; border: 1px solid #e3eaf3; border-radius: 12px; box-shadow: 0 8px 24px rgba(15,23,42,.12);
    overflow: hidden; display: none;
}
.auto-reply-box .ar-kb-picker.open .ar-kb-dropdown { display: block; }
.auto-reply-box .ar-kb-dd-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; border-bottom: 1px solid #f0f4fa; font-size: 12px; color: #5a7390; background: #f8fafd;
}
.auto-reply-box .ar-kb-dd-list { max-height: 168px; overflow-y: auto; padding: 4px; }
.auto-reply-box .ar-kb-dd-item {
    display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px;
    font-size: 12.5px; color: #0a1628; cursor: pointer; user-select: none;
}
.auto-reply-box .ar-kb-dd-item:hover { background: #f2f7ff; }
.auto-reply-box .ar-kb-dd-item .ck {
    width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid #c7d4e4; flex: none;
    display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; transition: .15s;
}
.auto-reply-box .ar-kb-dd-item.on .ck { background: #2f6bff; border-color: #2f6bff; }
.auto-reply-box .ar-kb-dd-item .ck i { opacity: 0; }
.auto-reply-box .ar-kb-dd-item.on .ck i { opacity: 1; }
.auto-reply-box .ar-kb-dd-empty { padding: 16px; text-align: center; color: #9fb2c8; font-size: 12px; }
.auto-reply-box .ar-kb-clear {
    border: none; background: transparent; color: #2f6bff; font-size: 12px; cursor: pointer; padding: 2px 4px;
}
.auto-reply-box .ar-kb-clear:hover { color: #1d4fd0; text-decoration: underline; }
/* 已选知识库 chips */
.auto-reply-box .ar-kb-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.auto-reply-box .ar-kb-chip {
    display: inline-flex; align-items: center; gap: 5px; background: #e9effa; color: #2f4a75;
    border-radius: 20px; padding: 3px 9px; font-size: 11.5px; max-width: 200px;
}
.auto-reply-box .ar-kb-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auto-reply-box .ar-kb-chip .x { cursor: pointer; color: #7d93b5; font-size: 12px; line-height: 1; }
.auto-reply-box .ar-kb-chip .x:hover { color: #1d4fd0; }
.chat-messages {
    flex:1; overflow-y:auto; padding:16px 20px; display:flex; flex-direction:column; gap:12px;
}
/* 「加载更早的消息」入口（游标分页）。position:sticky 让它滚动时吸附在顶部，
   不用一直往上翻才能找到。 */
.load-more-bar {
    position: sticky; top: -4px; z-index: 2;
    display: flex; justify-content: center; padding: 2px 0 6px;
    background: linear-gradient(#fff 72%, rgba(255,255,255,0));
}
.load-more-btn {
    border: 1px solid #e2e8f0; background: #fff; color: #5b6b82;
    font-size: 12.5px; padding: 6px 14px; border-radius: 999px; cursor: pointer;
    font-family: inherit; display: inline-flex; align-items: center; gap: 6px;
    box-shadow: 0 1px 3px rgba(13,21,38,.06); transition: .16s;
}
.load-more-btn:hover { border-color: #2f6bff; color: #2f6bff; }
.load-more-btn:disabled { opacity: .55; cursor: default; }
.load-more-btn .fa-chevron-up { font-size: 11px; }
.message { max-width:75%; padding:10px 14px; border-radius:16px; position:relative; word-wrap:break-word; }
.message.incoming { align-self:flex-start; background:#f0f4fa; color:#1f3347; }
.message.outgoing { align-self:flex-end; background:#0b1a33; color:#fff; }
.message .msg-original > div { line-height: 1.6; margin-bottom: 2px; }
.message .msg-original > div:last-child { margin-bottom: 0; }
/* 双语消息（incoming）：译文为主、对方原文为辅（小字） */
.message.incoming.has-trans .translation-block { margin-top: 0; background: transparent; border: none; padding: 0; }
.message.incoming.has-trans .translation-head { display: none; }
.message.incoming.has-trans .translation-text { font-size: 14px; line-height: 1.65; color: #1f3347; font-weight: 500; }
.message.incoming.has-trans .msg-original { font-size: 12px; color: #8a9bb0; margin-top: 4px; }
.message .meta { font-size:11px; opacity:0.7; margin-top:4px; display:flex; gap:8px; align-items:center; }
.message .meta .lang-tag { background:rgba(255,255,255,0.2); padding:0 8px; border-radius:12px; }
.message.incoming .meta .lang-tag { background:#d9e3ed; }
.message .msg-time { font-size:10px; opacity:0.55; margin-top:5px; line-height:1; }
.message.incoming .msg-time { text-align:left; }
.message.outgoing .msg-time { text-align:right; }

/* 翻译内容块：完整显示所有翻译 */
.message .translation-block {
    margin-top: 8px; padding: 8px 12px; border-radius: 10px;
    background: #eef6ff; border: 1px solid #d3e6f7; color: #0a558c;
    max-width: 100%;
}
.message.outgoing .translation-block { background: #12314f; border-color: #2c4d70; }
.message.outgoing .translation-block .translation-head { color: #9db8d4; }
.message.outgoing .translation-block .translation-text { color: #bcd7f0; }
.translation-block .translation-head {
    font-size: 11px; color: #6a839d; font-weight: 600; margin-bottom: 4px;
    display: flex; align-items: center; gap: 6px;
}
.translation-block .translation-head i { color: #4fc3f7; }
.translation-block .translation-text {
    font-size: 13px; line-height: 1.6; color: #0a558c; word-break: break-word;
}
.translation-block .translation-text > div { margin-bottom: 2px; }
.translation-block .translation-text > div:last-child { margin-bottom: 0; }
.message .knowledge-badge {
    font-size:11px; background:#e3f0fd; color:#0a558c;
    padding:2px 10px; border-radius:20px; display:inline-block; margin-top:6px;
}
/* 对方正在输入指示 */
.typing {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 3px;
    background: #f0f4fa; color: #6a839d; border-radius: 16px; padding: 10px 14px;
    font-size: 12px;
}
.typing span {
    width: 6px; height: 6px; border-radius: 50%; background: #4fc3f7;
    display: inline-block; animation: typing-bounce 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
}
.chat-input { padding:12px 20px 16px; border-top:1px solid #f0f4fa; display:flex; gap:10px; align-items:center; flex-shrink:0; }
.chat-input .chat-upload {
    width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #6a839d; font-size: 18px; transition: 0.2s; flex-shrink: 0;
    background: #f8fafc; border: 1px solid #dce4ed;
}
.chat-input .chat-upload:hover { color: #0a1628; border-color: #4fc3f7; background: #e8f4fd; }
.chat-input input[type="text"] {
    flex:1; padding:10px 16px; border-radius:30px; border:1px solid #dce4ed;
    outline:none; font-size:14px; background:#f8fafc;
}
.chat-input input[type="text"]:focus { border-color:#4fc3f7; }
.chat-input button {
    background:#0a1628; color:#fff; border:0; border-radius:30px; padding:0 24px;
    font-weight:500; cursor:pointer; transition:0.2s; height: 38px;
}
.chat-input button:hover { background:#1d3a5a; }

/* 聊天附件 */
.chat-img { max-width: 220px; max-height: 180px; border-radius: 10px; display: block; margin-bottom: 6px; cursor: zoom-in; }
.chat-file {
    display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.1);
    padding: 8px 14px; border-radius: 10px; font-size: 13px; color: #fff;
    text-decoration: none; margin-bottom: 6px; max-width: 220px;
}
.message.incoming .chat-file { background: #e3f0fd; color: #0a558c; }
.chat-file i { font-size: 18px; }
.chat-file span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 浏览器自动化 ===== */
.browser-container { display:flex; gap:24px; height:100%; min-height:400px; }
.browser-panel {
    flex:2; background:#fff; border-radius:14px; border:1px solid #e2e9f2; overflow:hidden;
    display:flex; flex-direction:column;
}
.browser-toolbar {
    padding:10px 16px; background:#f8fafc; border-bottom:1px solid #eef3f9;
    display:flex; align-items:center; gap:8px;
}
.browser-toolbar .url-bar {
    flex:1; background:#fff; border:1px solid #dce4ed; border-radius:30px;
    padding:6px 16px; font-size:13px; color:#1f3347;
}
.browser-content {
    flex:1; padding:20px; overflow-y:auto; background:#ffffff;
    background-image: radial-gradient(circle at 10px 10px, #f4f7fc 1px, transparent 1px);
    background-size:20px 20px;
}
.browser-content .mock-page {
    background:#fff; border-radius:12px; padding:24px; border:1px solid #eef3f9;
    max-width:600px; margin:0 auto;
}
.browser-content .mock-page .post-preview {
    background:#f8fafc; padding:16px; border-radius:8px; border-left:4px solid #4fc3f7;
}
.browser-log {
    flex:1; min-width:200px; background:#fff; border-radius:14px; border:1px solid #e2e9f2;
    padding:16px; overflow-y:auto; max-height:400px;
}
.browser-log h4 { font-size:14px; color:#1f3347; margin-bottom:12px; }
.log-item { font-size:13px; padding:6px 0; border-bottom:1px solid #f0f4fa; display:flex; gap:8px; align-items:baseline; }
.log-item .time { color:#889fb3; font-size:11px; width:48px; flex-shrink:0; }
.log-item .icon { color:#4fc3f7; width:18px; }
.log-item .text { color:#1f3347; }
.log-item .highlight { color:#0a558c; font-weight:500; }

/* ===== 商机管理 ===== */
/* 页头行统一布局 */
.page-head-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.page-head-title { font-weight: 600; color: #0a1628; font-size: 18px; }
.page-head-actions { display: flex; gap: 8px; align-items: center; }
.filter-select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    padding: 6px 32px 6px 14px; border-radius: 30px; border: 1px solid #dce4ed;
    font-size: 13px; background-color: #fff; outline: none; color: #1f3347; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%239aa7b5' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 11px;
}
.filter-select::-ms-expand { display: none; }
.filter-select:focus { border-color: #4fc3f7; }

/* 九段跟进法流程引导栏 */
.nine-stage-bar {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px; margin-bottom: 16px;
}
.nine-stage {
    background: #fff; border: 1px solid #e2e9f2; border-radius: 12px;
    padding: 12px 14px; cursor: pointer; transition: 0.2s;
    position: relative;
}
.nine-stage:hover { box-shadow: 0 4px 12px rgba(10,22,40,0.06); }
.nine-stage.active { border-color: #4fc3f7; background: #f0f8ff; }
.nine-stage.selected { border: 2px solid #4fc3f7; background: #e3f0fd; }
.nine-stage.closed { opacity: 0.75; }
.nine-stage .nine-num {
    width: 24px; height: 24px; border-radius: 50%; background: #0a1628; color: #fff;
    font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
    margin-bottom: 8px;
}
.nine-stage.closed .nine-num { background: #78909c; }
.nine-stage .nine-name { font-size: 13px; font-weight: 600; color: #0a1628; }
.nine-stage .nine-count { font-size: 12px; color: #1565c0; margin-top: 2px; font-weight: 600; }
.nine-stage:not(.active) .nine-count { color: #889fb3; }
.nine-stage .nine-desc { font-size: 11px; color: #6a839d; margin-top: 3px; }

/* 商机阶段进度条 */
.stage-progress { width: 90px; height: 5px; background: #f0f4fa; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.stage-progress .sp-fill { display: block; height: 100%; background: #4fc3f7; border-radius: 4px; }

.opp-tip {
    margin-top: 16px; background: #fff8e1; border-radius: 8px; padding: 12px 16px;
    border-left: 4px solid #ffb74d; display: flex; align-items: center; gap: 12px;
    font-size: 14px; color: #1f3347;
}

.opportunity-table-wrap { background:#fff; border-radius:14px; border:1px solid #e2e9f2; overflow-x:auto; }
.opportunity-table { width:100%; border-collapse:collapse; font-size:14px; table-layout:fixed; min-width:980px; }
.opportunity-table th:nth-child(1){width:14%}
.opportunity-table th:nth-child(2){width:11%}
.opportunity-table th:nth-child(3){width:9%}
.opportunity-table th:nth-child(4){width:21%}
.opportunity-table th:nth-child(5){width:9%}
.opportunity-table th:nth-child(6){width:12%}
.opportunity-table th:nth-child(7){width:10%}
.opportunity-table th:nth-child(8){width:14%}
.opportunity-table th {
    background:#f8fafc; padding:14px 18px; text-align:left; font-weight:600; color:#1f3347;
    border-bottom:1px solid #eef3f9; vertical-align:middle;
}
/* 商机列表分页控件 */
.opp-pager { display:flex; align-items:center; gap:8px; padding:12px 4px; flex-wrap:wrap; }
.opp-pager-info { font-size:13px; color:#6a839d; margin-right:8px; }
.opp-page-btn { border:1px solid #dbe4ee; background:#fff; color:#1f3347; padding:5px 14px; border-radius:8px; cursor:pointer; font-size:13px; transition:background .15s, border-color .15s; }
.opp-page-btn:hover:not(:disabled) { background:#f0f6ff; border-color:#4fc3f7; }
.opp-page-btn:disabled { opacity:.45; cursor:not-allowed; }
.opp-page-size { border:1px solid #dbe4ee; border-radius:8px; padding:5px 8px; font-size:13px; background:#fff; color:#1f3347; cursor:pointer; }
.opportunity-table td { padding:14px 18px; border-bottom:1px solid #f0f4fa; color:#1f3347; vertical-align:top; }
.stage-badge { padding:4px 12px; border-radius:30px; font-size:12px; font-weight:500; }
.stage-badge.new { background:#e3f0fd; color:#0a558c; }
.stage-badge.contacted { background:#e8f5e9; color:#1b5e20; }
.stage-badge.qualified { background:#f0f4fa; color:#37474f; }
.stage-badge.proposal { background:#e0f7fa; color:#00695c; }
.stage-badge.negotiation { background:#fff3e0; color:#b76e1b; }
.stage-badge.sampling { background:#f3e5f5; color:#6a1b9a; }
.stage-badge.contract { background:#fce4ec; color:#880e4f; }
.stage-badge.executing { background:#e8eaf6; color:#283593; }
.stage-badge.repeat { background:#fdecea; color:#b71c1c; }
.stage-badge.closed { background:#eceff1; color:#546e7a; }
.btn-approve { background:#0a1628; color:#fff; border:0; padding:4px 14px; border-radius:30px; font-size:12px; cursor:pointer; transition:0.2s; }
.btn-approve:hover { background:#1d3a5a; }
.btn-reject { background:#e53935; color:#fff; border:0; padding:4px 14px; border-radius:30px; font-size:12px; cursor:pointer; margin-left:6px; }
.btn-reject:hover { background:#c62828; }
.btn-view { background:#f0f4fa; color:#0a1628; border:0; padding:4px 14px; border-radius:30px; font-size:12px; cursor:pointer; transition:0.2s; }
.btn-view:hover { background:#dce8f5; }
/* AI 自动推进：手动触发一次分析（自动跟进是消息驱动的，没有新消息时用这个兜底） */
.btn-ai-run { background:linear-gradient(135deg,#2F6BFF,#6f9dff); color:#fff; border:0; padding:4px 12px; border-radius:30px; font-size:12px; cursor:pointer; transition:0.2s; font-family:inherit; }
.btn-ai-run:hover { filter:brightness(1.08); }
.btn-ai-run:disabled { opacity:.6; cursor:wait; }
.opp-actions { display:flex; gap:6px; align-items:center; flex-wrap:nowrap; white-space:nowrap; }
.opp-actions button { flex:0 0 auto; }
.opp-actions .btn-reject { margin-left: 0; }
.opp-content-cell {
    max-width: 340px; vertical-align: top; color: #4a5f73;
    font-size: 13px; line-height: 1.5; word-break: break-word;
}
.opp-main {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.opp-orig {
    font-size: 11px; color: #889fb3; margin-top: 5px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 商机详情弹窗 */
.opp-detail-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.opp-detail-name { font-size: 18px; font-weight: 700; color: #0a1628; }
.opp-detail-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0f4fa; font-size: 14px; }
.opp-detail-row .label { width: 90px; color: #6a839d; flex-shrink: 0; }
.opp-detail-block { margin-top: 14px; }
.opp-detail-block .label { font-size: 13px; color: #6a839d; margin-bottom: 8px; }
.opp-detail-content {
    background: #f8fafc; border-radius: 10px; padding: 14px 16px;
    font-size: 14px; line-height: 1.7; color: #1f3347;
}

/* 跟进记录 */
.btn-add-follow { border:1px solid #4fc3f7; background:#eaf6ff; color:#1565c0; border-radius:8px; padding:4px 10px; font-size:12px; cursor:pointer; }
.btn-add-follow:hover { background:#4fc3f7; color:#fff; }
.follow-field { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
/* 渠道类型：下拉选择（样式与语言选择一致） */
.ch-type-wrap { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.ch-type-ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: #eef4ff; color: #2f6bff; flex: 0 0 auto; }
.ch-type-ico i { font-size: 15px; }
.ch-type-select { flex: 1 1 auto; width: 100%; padding: 8px 34px 8px 12px; border-radius: 9px; border: 1px solid #e1e8f0; background-color: #fff; font-size: 14px; color: #2b3a4a; outline: none; cursor: pointer; transition: all .2s; -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%239aa7b5' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px; }
.ch-type-select::-ms-expand { display: none; }
.ch-type-select:focus { border-color: #4fc3f7; box-shadow: 0 0 0 3px rgba(79,195,247,.15); }

/* 聊天空状态引导卡片（刚注册无会话） */
.chat-onboarding {
    max-width: 460px; margin: 7vh auto 0; padding: 34px 30px; text-align: center;
    background: #fff; border: 1px solid #eef2f7; border-radius: 16px;
    box-shadow: 0 10px 34px rgba(31,51,71,.06);
}
.chat-onboarding .onb-icon {
    width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg,#e3f6ff,#d4ecff); color: #2b8fc7; font-size: 26px;
}
.chat-onboarding h2 { margin: 0 0 8px; font-size: 20px; color: #0a1628; }
.chat-onboarding p { margin: 0 0 22px; color: #6b7c8f; font-size: 14px; line-height: 1.65; }
.chat-onboarding .onb-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.onb-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px;
    border-radius: 30px; font-size: 14px; font-weight: 600; cursor: pointer;
    border: 1px solid transparent; transition: transform .12s, box-shadow .12s, background .12s;
}
.onb-btn:hover { transform: translateY(-1px); }
.onb-btn.onb-primary { background: linear-gradient(135deg,#4fc3f7,#2b9fd4); color: #fff; box-shadow: 0 6px 16px rgba(47,159,212,.28); }
.onb-btn.onb-ghost { background: #fff; color: #2b8fc7; border-color: #cfe8f7; }
.onb-btn.onb-ghost:hover { background: #f2fbff; }
/* 跟进附件上传 */
.follow-upload { display: flex; flex-direction: column; gap: 8px; }
.fu-drop { border: 1.5px dashed #c3d0e0; border-radius: 10px; padding: 16px; text-align: center; color: #6a839d; cursor: pointer; background: #f8fafc; transition: all .15s ease; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; }
.fu-drop i { font-size: 22px; color: #2f6bff; }
.fu-drop:hover { border-color: #2f6bff; background: #eef3ff; }
.fu-drop.drag { border-color: #2f6bff; background: #eef3ff; box-shadow: 0 0 0 2px rgba(47,107,255,.15); }
.fu-list { display: flex; flex-direction: column; gap: 6px; }
.fu-empty { font-size: 12px; color: #aab7c5; padding: 2px 0; }
.fu-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #e3ebf3; border-radius: 8px; background: #fff; font-size: 13px; color: #33475b; }
.fu-item > i { color: #2f6bff; }
.fu-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fu-size { color: #889fb3; font-size: 12px; white-space: nowrap; }
.fu-del { color: #c0ccd8; cursor: pointer; transition: color .15s; }
.fu-del:hover { color: #e53935; }
.follow-field label { width:72px; flex-shrink:0; font-size:13px; color:#6a839d; }
.follow-input { flex:1; padding:7px 10px; border:1px solid #dce6f2; border-radius:8px; font-size:13px; outline:none; box-sizing:border-box; font-family:inherit; }
.follow-input:focus { border-color:#4fc3f7; box-shadow:0 0 0 3px rgba(79,195,247,0.15); }
.follow-item { background:#f8fafc; border-radius:10px; padding:10px 12px; margin-top:8px; border-left:3px solid #4fc3f7; }
.follow-time { font-size:12px; color:#6a839d; margin-bottom:4px; }
.follow-line { font-size:13px; color:#1f3347; line-height:1.6; }
.follow-k { color:#6a839d; font-size:12px; }
.follow-attach { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
.follow-img img { width:64px; height:64px; object-fit:cover; border-radius:8px; border:1px solid #e2e9f2; }
.follow-file { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:#1565c0; background:#fff; border:1px solid #dce6f2; border-radius:8px; padding:5px 10px; }

/* ===== 目标树 ===== */
.tree-container { background:#fff; border-radius:14px; border:1px solid #e2e9f2; padding:20px 24px 24px; overflow:auto; }
.tree-container .tree-header {
    display:flex; justify-content:space-between; align-items:center;
    margin-bottom:18px; border-bottom:1px solid #f0f4fa; padding-bottom:12px;
}
.tree-container .tree-header h3 { font-size:15px; font-weight:600; color:#1f3347; }
.tree-container .tree-header h3 i { color:#4fc3f7; margin-right:8px; }
.tree-container .tree-header .badge { background:#e3f0fd; color:#0a558c; padding:2px 14px; border-radius:30px; font-size:12px; }

.tree-root { padding-left:0; }
.tree-node { position:relative; padding-left:28px; margin-bottom:2px; }
.tree-node::before { content:''; position:absolute; left:12px; top:0; bottom:0; width:2px; background:#dce4ed; }
.tree-node:last-child::before { height:20px; }
.tree-node .node-content {
    display:flex; align-items:center; gap:10px; padding:8px 12px 8px 16px; margin:4px 0;
    border-radius:8px; background:transparent; transition:0.15s; border-left:3px solid transparent; position:relative;
}
.tree-node .node-content::before { content:''; position:absolute; left:-16px; top:50%; width:16px; height:2px; background:#dce4ed; }
.tree-root > .tree-node { padding-left:0; }
.tree-root > .tree-node::before, .tree-root > .tree-node .node-content::before { display:none; }
.tree-node .node-content .icon { width:28px; text-align:center; font-size:16px; flex-shrink:0; }
.tree-node .node-content .info { flex:1; min-width:0; }
.tree-node .node-content .info .name { font-weight:500; color:#1f3347; font-size:14px; }
.tree-node .node-content .info .desc { font-size:12px; color:#6a839d; margin-top:2px; }
.tree-node .node-content .meta { display:flex; gap:8px; align-items:center; flex-shrink:0; font-size:12px; }
.tree-node .node-content .meta .tag { background:#f0f4fa; padding:2px 12px; border-radius:30px; color:#4a5f73; }
.tree-node .node-content .meta .tag.cron { background:#e8f0fe; color:#0a558c; font-family:monospace; }
.tree-node .node-content .meta .status-dot { width:10px; height:10px; border-radius:50%; display:inline-block; }
.status-dot.pending { background:#b0bec5; }
.status-dot.running { background:#1565c0; animation:pulse 1s infinite; }
.status-dot.done { background:#2e7d32; }
.status-dot.failed { background:#c62828; }
.status-dot.paused { background:#ffa726; }
@keyframes pulse { 0%{opacity:0.4;transform:scale(0.9);} 50%{opacity:1;transform:scale(1.2);} 100%{opacity:0.4;transform:scale(0.9);} }
.tree-node .node-content .task-actions { display:inline-flex; gap:6px; margin-left:8px; }
.tree-node .node-content .task-btn {
    border:1px solid #dce6f2; background:#fff; color:#1f3347; border-radius:7px;
    padding:3px 9px; font-size:12px; cursor:pointer; transition:0.15s; white-space:nowrap;
}
.tree-node .node-content .task-btn:hover { border-color:#4fc3f7; color:#1565c0; background:#eaf6ff; }
.tree-node .node-content .task-btn.danger:hover { border-color:#ef5350; color:#c62828; background:#fdecea; }
.tree-node .node-content.level-knowledge { background:#f0f7fe; border-left-color:#4fc3f7; border-radius:10px; font-weight:600; }
.tree-node .node-content.level-goal { border-left-color:#ffb74d; }
.tree-node .node-content.level-subgoal { border-left-color:#81c784; }
.tree-node .node-content.level-task { border-left-color:#90caf9; }
.tree-node .toggle-btn { cursor:pointer; user-select:none; width:20px; text-align:center; color:#6a839d; font-size:12px; }
.tree-node .toggle-btn:hover { color:#0a1628; }
.tree-node .children { padding-left:8px; overflow:hidden; transition:max-height 0.3s ease; }
.tree-node .children.collapsed { max-height:0 !important; }

/* 语言搜索下拉（聊天框"我的语言"） */
.lang-picker { position:relative; display:inline-block; width:140px; flex:0 0 auto; }
.lang-input { width:100%; padding:5px 28px 5px 10px; border:1px solid #dce6f2; border-radius:8px; background:#fff; cursor:pointer; font-size:13px; color:#1f3347; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lang-input::after { content:'\f078'; font-family:'Font Awesome 6 Free'; font-weight:900; position:absolute; right:10px; top:50%; transform:translateY(-50%); font-size:10px; color:#9bb0c4; pointer-events:none; }
.lang-dropdown { position:absolute; top:calc(100% + 4px); left:0; right:0; background:#fff; border:1px solid #e3ebf3; border-radius:10px; box-shadow:0 8px 24px rgba(20,40,60,.12); z-index:50; padding:8px; }
.lang-filter { width:100%; padding:6px 10px; border:1px solid #e3ebf3; border-radius:7px; margin-bottom:6px; font-size:13px; }
.lang-list { max-height:200px; overflow:auto; }
.lang-item { padding:7px 10px; border-radius:7px; cursor:pointer; font-size:14px; color:#1f3347; }
.lang-item:hover { background:#eaf6ff; }
.lang-item.active { background:#e3f2fd; color:#1565c0; font-weight:600; }
.lang-empty { padding:10px; color:#9bb0c4; font-size:13px; text-align:center; }

/* 自动回复 / AI 自动跟进 开关 */
.af-switch { position:relative; display:inline-block; width:42px; height:22px; }
.af-switch input { opacity:0; width:0; height:0; }
.af-slider { position:absolute; inset:0; background:#cfd8e3; border-radius:22px; transition:.2s; cursor:pointer; }
.af-slider::before { content:''; position:absolute; height:16px; width:16px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.2s; }
.af-switch input:checked + .af-slider { background:#4fc3f7; }
.af-switch input:checked + .af-slider::before { transform:translateX(20px); }
.af-cell { text-align:center; vertical-align:middle; }
.ca-switch-row { display:flex; align-items:center; gap:10px; }
.ca-switch-row > span:last-child { color:#6a839d; font-size:13px; }

.empty-state { color:#889fb3; text-align:center; padding:40px 0; }
.empty-state i { font-size:32px; display:block; margin-bottom:12px; color:#dce4ed; }

/* 会员订单分页 */
.pager { display:flex; align-items:center; justify-content:center; gap:14px; padding:14px 0 4px; }
.pg-btn { padding:6px 16px; border:1px solid #d4e0ec; background:#fff; border-radius:20px; cursor:pointer; font-size:13px; color:#2b4f6e; transition:.15s; }
.pg-btn:hover:not([disabled]) { border-color:#4fc3f7; color:#1565c0; }
.pg-btn[disabled] { opacity:.45; cursor:not-allowed; }
.pg-info { font-size:13px; color:#6a839d; }

/* 应用搜索框 */
.app-search-input { flex:1; max-width:280px; padding:8px 14px; border:1px solid #d4e0ec; border-radius:22px; font-size:14px; outline:none; }
.app-search-input:focus { border-color:#4fc3f7; box-shadow:0 0 0 3px rgba(79,195,247,.15); }

/* 待审核徽标 */
.app-pending-badge { display:inline-flex; align-items:center; gap:3px; margin-left:6px; padding:2px 8px; border-radius:12px; font-size:11px; color:#b26a00; background:#fff4e0; border:1px solid #ffe0a3; }
.app-pending-badge.off { color:#7a8a9c; background:#eef2f7; border-color:#dfe6ee; }

/* 审核弹窗条目 */
.rv-item { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border:1px solid #e6edf4; border-radius:10px; margin-bottom:10px; }
.rv-info { display:flex; flex-direction:column; gap:3px; }
.rv-info b { font-size:14px; color:#1f3347; }
.rv-info b i { margin-right:6px; color:#4fc3f7; }
.rv-meta { font-size:12px; color:#9bb0c4; }
.rv-actions { display:flex; gap:8px; }
.rv-approve { padding:6px 14px; border:none; border-radius:18px; background:#4fc3f7; color:#fff; cursor:pointer; font-size:13px; }
.rv-approve:hover { background:#39b3ea; }
.rv-reject { padding:6px 14px; border:1px solid #e0a3a3; border-radius:18px; background:#fff; color:#c62828; cursor:pointer; font-size:13px; }
.rv-reject:hover { background:#fdeaea; }

/* 加载提示 */
.loading { text-align:center; color:#889fb3; padding:30px; font-size:14px; }

/* ===== 渠道配置 ===== */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.channel-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e9f2;
    padding: 18px 20px;
    transition: box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.channel-card:hover { box-shadow: 0 4px 16px rgba(10,22,40,0.06); }
.channel-card.disabled { opacity: 0.65; }
.channel-card .ch-head { display: flex; align-items: center; gap: 12px; }
.channel-card .ch-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 20px; flex-shrink: 0;
}
.channel-card .ch-title { flex: 1; min-width: 0; }
.channel-card .ch-title .name { font-weight: 600; color: #0a1628; font-size: 15px; }
.channel-card .ch-title .type { font-size: 12px; color: #6a839d; }
.channel-card .ch-body { font-size: 13px; color: #1f3347; }
.channel-card .ch-body .desc { color: #6a839d; margin-bottom: 8px; }
.channel-card .ch-config {
    background: #f8fafc; border-radius: 8px; padding: 8px 12px;
    font-size: 12px; color: #4a5f73; font-family: monospace;
    white-space: pre-wrap; word-break: break-all; max-height: 90px; overflow: auto;
}
.channel-card .ch-foot {
    display: flex; align-items: center; justify-content: space-between;
    border-top: 1px solid #f0f4fa; padding-top: 10px;
}
.channel-card .ch-actions { display: flex; gap: 8px; }
.channel-card .ch-actions i {
    cursor: pointer; color: #6a839d; font-size: 14px; transition: 0.2s;
    padding: 4px 6px; border-radius: 6px;
}
.channel-card .ch-actions i:hover { color: #0a1628; background: #f0f4fa; }
.channel-card .ch-actions i.del:hover { color: #e53935; background: #fdecea; }

/* 渠道对接方案 */
.channel-card .ch-guide {
    margin-top: 12px; border: 1px solid #e6eefb; border-radius: 10px;
    background: #f7faff; overflow: hidden;
}
.channel-card .ch-guide > summary {
    cursor: pointer; padding: 10px 14px; font-size: 13px; font-weight: 600; color: #1565c0;
    list-style: none; user-select: none;
}
.channel-card .ch-guide > summary::-webkit-details-marker { display: none; }
.channel-card .ch-guide > summary i { margin-right: 6px; }
.channel-card .guide-body { padding: 0 14px 14px; font-size: 12.5px; color: #1f3347; line-height: 1.7; }
.channel-card .guide-body code {
    background: #eef3fb; padding: 1px 6px; border-radius: 4px; font-size: 12px; color: #0a1628;
}
.webhook-box {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 10px 14px; background: #fff; border-top: 1px dashed #d7e3f4;
}
.webhook-box .wh-label { font-size: 12px; color: #6a839d; }
.webhook-box .wh-url { font-size: 12px; color: #0a1628; word-break: break-all; flex: 1; min-width: 200px; }
.btn-copy {
    border: none; background: #1565c0; color: #fff; font-size: 12px;
    padding: 4px 12px; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.btn-copy:hover { background: #0d47a1; }
/* 渠道配置表单：取色器 + 色值文本框并排；多行/下拉控件沿用表单基础样式 */
.ch-color-row { display: flex; align-items: center; gap: 10px; }
.ch-color-row input[type=color] { width: 46px; height: 34px; padding: 2px; border: 1px solid #d7e3f4; border-radius: 8px; background: #fff; cursor: pointer; }
.ch-color-row .ch-color-text { flex: 1; }
#chConfigFields textarea { width: 100%; border: 1px solid #d7e3f4; border-radius: 8px; padding: 9px 12px; font-size: 13px; font-family: inherit; resize: vertical; }
#chConfigFields select { width: 100%; }
.ch-guide-box { margin-top: 14px; }
.ch-guide-box .guide-title { font-size: 13px; font-weight: 600; color: #1565c0; margin-bottom: 8px; }
.ch-guide-box .guide-body { font-size: 12.5px; color: #1f3347; line-height: 1.7; background: #f7faff; border: 1px solid #e6eefb; border-radius: 8px; padding: 12px 14px; }
.ch-guide-box .guide-body code { background: #eef3fb; padding: 1px 6px; border-radius: 4px; font-size: 12px; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute; inset: 0; border-radius: 30px; cursor: pointer;
    background: #cbd5e1; transition: 0.2s;
}
.switch .slider::before {
    content: ''; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: 0.2s;
}
.switch input:checked + .slider { background: #4fc3f7; }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* ===== 全局自定义弹窗 ===== */
.ui-overlay {
    position: fixed; inset: 0; background: rgba(10,22,40,0.5);
    z-index: 1000; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.ui-overlay.show { opacity: 1; pointer-events: auto; }
.ui-dialog {
    background: #fff; border-radius: 14px; width: 360px; max-width: 90vw;
    padding: 26px 24px 20px; text-align: center;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    transform: scale(0.9); transition: transform 0.2s ease;
}
.ui-overlay.show .ui-dialog { transform: scale(1); }
.ui-dialog-icon {
    width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%;
    font-size: 24px; display: flex; align-items: center; justify-content: center;
}
.ui-dialog-icon.fa-info-circle { background: #e3f0fd; color: #1565c0; }
.ui-dialog-icon.fa-question-circle { background: #fff3e0; color: #f9a825; }
.ui-dialog-icon.fa-check-circle { background: #e8f5e9; color: #2e7d32; }
.ui-dialog-icon.fa-exclamation-circle { background: #fdecea; color: #c62828; }
.ui-dialog-icon.fa-spinner { background: #e3f0fd; color: #1565c0; }
.ui-dialog-title { font-size: 16px; font-weight: 700; color: #0a1628; margin-bottom: 8px; }
.ui-dialog-message {
    font-size: 14px; color: #4a5f73; line-height: 1.6;
    white-space: pre-line; word-break: break-word;
}
.ui-dialog-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.ui-btn {
    padding: 8px 26px; border-radius: 30px; border: 0; font-size: 14px;
    cursor: pointer; font-weight: 500; transition: 0.2s;
}
.ui-btn.primary { background: #0a1628; color: #fff; }
.ui-btn.primary:hover { background: #1d3a5a; }
.ui-btn.default { background: #f0f4fa; color: #4a5f73; }
.ui-btn.default:hover { background: #dce8f5; }

/* ===== 轻量 toast（非阻塞角落提示，区别于 modal 弹窗） ===== */
.ui-toast {
    position: fixed; left: 50%; bottom: 42px; transform: translateX(-50%) translateY(16px);
    background: #0a1628; color: #fff; font-size: 14px; line-height: 1.5;
    padding: 10px 20px; border-radius: 10px; max-width: 82vw; word-break: break-word;
    box-shadow: 0 8px 28px rgba(0,0,0,0.25); z-index: 1100;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.ui-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.ui-toast.err { background: #c62828; }
.ui-toast.ok { background: #2e7d32; }

/* ===== 弹窗 ===== */
.modal-mask {
    position: fixed; inset: 0; background: rgba(10,22,40,0.45);
    z-index: 100; display: flex; align-items: center; justify-content: center;
}
.modal-box {
    background: #fff; border-radius: 14px; width: 460px; max-width: 92vw;
    max-height: 86vh; display: flex; flex-direction: column;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    animation: fadeIn 0.2s ease;
}
.modal-header {
    padding: 16px 20px; border-bottom: 1px solid #f0f4fa;
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { font-size: 16px; color: #0a1628; }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-footer {
    padding: 14px 20px; border-top: 1px solid #f0f4fa;
    display: flex; justify-content: flex-end; gap: 10px;
}
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: #4a5f73; margin-bottom: 6px; }
.form-row input {
    width: 100%; padding: 9px 12px; border-radius: 8px;
    border: 1px solid #dce4ed; font-size: 14px; outline: none; background: #f8fafc;
}
.form-row input:focus { border-color: #4fc3f7; background: #fff; }
.form-row select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    width: 100%; padding: 9px 34px 9px 12px; border-radius: 8px;
    border: 1px solid #dce4ed; font-size: 14px; outline: none; background-color: #f8fafc;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%239aa7b5' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 11px;
    cursor: pointer;
}
.form-row select:focus { border-color: #4fc3f7; background-color: #fff; }
.form-row select::-ms-expand { display: none; }

/* 目标生成-知识库多选列表 */
.gen-kb-list {
    display: flex; flex-direction: column; gap: 6px;
    max-height: 180px; overflow-y: auto;
    border: 1px solid #eef3f9; border-radius: 8px; padding: 8px; background: #f8fafc;
}
.gen-kb-item {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 6px 8px; border-radius: 6px; transition: 0.15s;
}
.gen-kb-item:hover { background: #fff; }
.gen-kb-item input[type=checkbox] { width: auto; margin: 0; flex-shrink: 0; }
.gen-kb-cate { font-size: 11px; padding: 1px 8px; border-radius: 20px; color: #1f3347; flex-shrink: 0; }
.gen-kb-title { font-size: 13px; color: #1f3347; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 会员中心 ===== */
.member-account {
    background: linear-gradient(135deg, #0a1628, #123a5e);
    border-radius: 14px; padding: 22px 26px; color: #fff;
    display: flex; justify-content: space-between; align-items: center;
}
.member-account .ma-info { display: flex; align-items: center; gap: 16px; }
.member-account .ma-avatar {
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(255,183,77,0.2); border: 2px solid #ffb74d;
    display: flex; align-items: center; justify-content: center; font-size: 24px; color: #ffb74d;
}
.member-account .ma-plan { font-size: 20px; font-weight: 700; }
.member-account .ma-sub { font-size: 13px; color: #b9cbe0; margin-top: 4px; }
.member-account .ma-points { text-align: right; }
.member-account .ma-points-label { font-size: 13px; color: #b9cbe0; }
.member-account .ma-points-value {
    font-size: 34px; font-weight: 800; color: #ffd54f; line-height: 1.1;
}

.rules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.rule-item {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    background: #f6f9ff; border: 1px solid #e6eefb; border-radius: 10px;
}
.rule-item .rule-icon { font-size: 22px; }
.rule-item b { font-size: 14px; color: #1f3347; }
.rule-item span { font-size: 12px; color: #6a839d; }

.section-block { background: #fff; border-radius: 14px; border: 1px solid #e2e9f2; padding: 20px 24px; }
.section-block + .section-block { margin-top: 24px; }
.section-block h3 { font-size: 15px; color: #1f3347; margin-bottom: 16px; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.plan-card {
    border: 1px solid #e2e9f2; border-radius: 12px; padding: 20px; position: relative;
    display: flex; flex-direction: column; gap: 10px; transition: 0.2s;
}
.plan-card.highlight { border: 2px solid #ffb74d; box-shadow: 0 4px 16px rgba(255,183,77,0.2); }
.plan-card .plan-flag {
    position: absolute; top: -12px; right: 16px; background: #ffb74d; color: #fff;
    font-size: 12px; padding: 2px 12px; border-radius: 20px; font-weight: 600;
}
.plan-card .plan-name { font-size: 16px; font-weight: 700; color: #0a1628; }
.plan-card .plan-price { font-size: 30px; font-weight: 800; color: #0a1628; }
.plan-card .plan-price .cur { font-size: 16px; vertical-align: 12px; color: #6a839d; }
.plan-card .plan-price .unit { font-size: 13px; font-weight: 400; color: #6a839d; }
.plan-card .plan-desc { font-size: 13px; color: #6a839d; }
.plan-card .plan-points { font-size: 13px; color: #1565c0; }
.plan-card .plan-features { list-style: none; padding: 0; margin: 0; }
.plan-card .plan-features li { font-size: 13px; color: #1f3347; padding: 4px 0; }
.plan-card .plan-features li i { color: #2e7d32; margin-right: 6px; font-size: 12px; }
.btn-plan {
    background: #0a1628; color: #fff; border: 0; padding: 8px 0; border-radius: 30px;
    font-size: 14px; font-weight: 500; cursor: pointer; margin-top: auto; transition: 0.2s;
}
.btn-plan:hover { background: #1d3a5a; }
.btn-plan:disabled { background: #dce4ed; color: #6a839d; cursor: not-allowed; }
.plan-card.highlight .btn-plan { background: #ffb74d; }
.plan-card.highlight .btn-plan:hover { background: #f5a623; }

.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.pkg-card {
    border: 1px solid #e2e9f2; border-radius: 12px; padding: 18px 20px;
    display: flex; flex-direction: column; gap: 6px; transition: 0.2s;
}
.pkg-card:hover { box-shadow: 0 4px 16px rgba(10,22,40,0.06); }
.pkg-card .pkg-points { font-size: 26px; font-weight: 800; color: #0a1628; }
.pkg-card .pkg-points span { font-size: 14px; color: #6a839d; font-weight: 400; }
.pkg-card .pkg-bonus { font-size: 12px; color: #2e7d32; background: #e8f5e9; padding: 2px 10px; border-radius: 20px; width: fit-content; }
.pkg-card .pkg-desc { font-size: 13px; color: #6a839d; }
.pkg-card .pkg-price { font-size: 20px; font-weight: 700; color: #e65100; }
.pkg-card .btn-plan { margin-top: 6px; }

.member-orders-wrap { overflow-x: auto; }
.member-orders { width: 100%; border-collapse: collapse; font-size: 13px; }
.member-orders th {
    background: #f8fafc; padding: 10px 14px; text-align: left; color: #4a5f73;
    border-bottom: 1px solid #eef3f9; font-weight: 600;
}
.member-orders td { padding: 10px 14px; border-bottom: 1px solid #f0f4fa; color: #1f3347; }
.order-type { padding: 2px 10px; border-radius: 20px; font-size: 12px; }
.order-type.subscribe { background: #fff3e0; color: #b76e1b; }
.order-type.points { background: #e3f0fd; color: #0a558c; }

/* ===== 应用模块 ===== */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.app-card {
    background: #fff; border-radius: 14px; border: 1px solid #e2e9f2; padding: 20px;
    display: flex; flex-direction: column; gap: 12px; transition: 0.2s;
}
.app-card:hover { box-shadow: 0 4px 16px rgba(10,22,40,0.06); }
.app-card.disabled { opacity: 0.7; }
.app-card .app-head { display: flex; align-items: center; gap: 12px; }
.app-card .app-icon {
    width: 48px; height: 48px; border-radius: 14px; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.app-card .app-title .name { font-weight: 700; color: #0a1628; font-size: 16px; }
.app-card .app-title .status { font-size: 12px; margin-top: 2px; }
.app-card .app-title .status.on { color: #2e7d32; }
.app-card .app-title .status.off { color: #889fb3; }
.app-card .app-desc { font-size: 13px; color: #6a839d; }
.app-card .app-contact {
    font-size: 13px; color: #1565c0; background: #e3f0fd; padding: 6px 12px;
    border-radius: 8px;
}
.app-card .app-foot { display: flex; align-items: center; gap: 10px; border-top: 1px solid #f0f4fa; padding-top: 12px; }

/* ===== 应用中心 2.0 ===== */
.app-tabs { display: inline-flex; background: #eef3f9; border-radius: 30px; padding: 4px; gap: 4px; }
.app-tab { padding: 6px 18px; border-radius: 30px; font-size:13px; cursor: pointer; color: #5a7390; font-weight: 600; transition: 0.15s; }
.app-tab.active { background: #1565c0; color: #fff; }
.app-card .app-name { font-weight: 700; color: #0a1628; font-size: 16px; }
.app-card .app-owner { font-size: 12px; color: #889fb3; }
.app-card .app-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.app-tag { font-size: 11px; padding: 2px 9px; border-radius: 20px; background: #eef3f9; color: #2e6da4; font-weight: 600; }
.app-visibility { font-size: 11px; padding: 2px 9px; border-radius: 20px; font-weight: 600; }
.app-visibility.public { background: #e6f6ec; color: #2e7d32; }
.app-visibility.private { background: #f0f4fa; color: #889fb3; }
.app-card .app-actions { display: flex; align-items: center; gap: 10px; }
.app-toggle { border: none; background: #eef3f9; color: #1565c0; padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; }
.app-toggle.on { background: #1565c0; color: #fff; }
.app-edit { border: none; background: #f0f4fa; color: #6a839d; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.app-del { border: none; background: #fdeeee; color: #d32f2f; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; transition: background .15s, color .15s; }
.app-del:hover { background: #d32f2f; color: #fff; }
.app-card.market { position: relative; }
.app-card.market.selected { border-color: #1565c0; box-shadow: 0 0 0 2px rgba(21,101,192,0.25); }
.app-card .app-select { position: absolute; top: 14px; right: 14px; }
.app-card .app-select input { width: 18px; height: 18px; cursor: pointer; }
.app-card .app-chat { border: none; background: linear-gradient(135deg, #1565c0, #4fc3f7); color: #fff; padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; }
.cross-tag { font-size: 10px; padding: 1px 7px; border-radius: 10px; background: #fff3e0; color: #e65100; font-weight: 700; vertical-align: middle; }
/* 网站访客：时效性强，置顶并高亮，避免漏掉询盘 */
.visitor-tag { font-size: 10px; padding: 1px 7px; border-radius: 10px; background: #e8f0fe; color: #2f6bff; font-weight: 700; vertical-align: middle; }
.contact-item.is-visitor { background: #f8fbff; border-left: 3px solid #2f6bff; }
.contact-item.is-visitor.active { background: #eef4ff; }

/* 挂件配置页 */
.wg-snippet { background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 12px 14px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.7;
  word-break: break-all; margin: 8px 0; }
.wg-snippet .tag { color: #7dd3fc; }
.wg-snippet .attr { color: #fca5a5; }
.wg-hint { background: #fffbeb; border-left: 3px solid #f59e0b; padding: 10px 14px;
  border-radius: 0 6px 6px 0; font-size: 12.5px; color: #92400e; margin: 10px 0; }
.wg-keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.wg-key-box { border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px; }
.wg-key-box h4 { margin: 0 0 6px; font-size: 13.5px; color: #0f172a; }
.wg-key-box code { display: block; background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 5px; padding: 6px 9px; font-size: 11.5px; margin-top: 6px;
  word-break: break-all; color: #475569; }
.kb-options { max-height: 180px; overflow-y: auto; border: 1px solid #e2e9f2; border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.kb-opt { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: #1f3347; cursor: pointer; }
.kb-opt input { margin-top: 3px; }
.kb-opt .kb-title { font-weight: 600; }
.kb-opt .kb-meta { color: #889fb3; font-size: 12px; }
.kb-tag { font-size: 10px; padding: 1px 6px; border-radius: 10px; background: #eef3f9; color: #2e6da4; }

/* ===== 应用创建/编辑：知识库卡片式选择器 ===== */
.kb-count-hint { font-size: 12px; color: #1565c0; font-weight: 600; margin-left: 6px; }
.kb-pick { max-height: 220px; gap: 8px; padding: 8px; background: #f8fafc; }
.kb-pick .kb-opt {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    border: 1px solid #eef3f9; border-radius: 9px; background: #fff;
    transition: 0.15s;
}
.kb-pick .kb-opt:hover { border-color: #4fc3f7; background: #f0f7fe; }
.kb-pick .kb-opt.selected { border-color: #1565c0; background: #e3f0fd; box-shadow: 0 0 0 2px rgba(21,101,192,0.12); }
.kb-pick .kb-check {
    width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #cbd5e1;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    color: #fff; font-size: 10px; transition: 0.15s; background: #fff;
}
.kb-pick .kb-opt.selected .kb-check { background: #1565c0; border-color: #1565c0; }
.kb-pick .kb-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.kb-pick .kb-title { font-weight: 600; color: #0a1628; font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-pick .kb-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; color: #889fb3; font-size: 11px; }
.kb-cate-badge { font-size: 10px; padding: 1px 8px; border-radius: 20px; font-weight: 600; }
.kb-cate-badge.product { background: #e3f0fd; color: #0a558c; }
.kb-cate-badge.market { background: #fff3e0; color: #b76e1b; }
.kb-cate-badge.customer { background: #e8f5e9; color: #2e7d32; }
.kb-cate-badge.marketing { background: #fce4ec; color: #ad1457; }
.kb-cate-badge.general { background: #f0f4fa; color: #4a5f73; }
.ca-duty-row { display: flex; gap: 8px; align-items: center; }
.ca-duty-row input { flex: 1; }
.ca-radio { display: flex; gap: 16px; font-size: 13px; color: #1f3347; }

/* ===== 创建/编辑应用 模态框美化 ===== */
.app-modal { width: 560px; }
.app-modal .modal-body { padding: 8px 24px 18px; }
/* 应用模态框头部：与全项目统一（白底 + 深色标题） */
.modal-header.app {
    background: #fff; border-bottom: 1px solid #f0f4fa; padding: 16px 20px;
    align-items: flex-start;
}
.modal-header.app h3 { color: #0a1628; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.modal-header.app h3 i { color: #4fc3f7; }
.modal-header.app .modal-sub { font-size: 12px; color: #889fb3; margin-top: 4px; font-weight: 400; }
.modal-header.app .modal-close {
    color: #6a839d; cursor: pointer; font-size: 15px; transition: 0.2s; padding: 4px;
}
.modal-header.app .modal-close:hover { color: #0a1628; }
.app-form-section {
    font-size: 13px; font-weight: 600; color: #1f3347;
    margin: 16px 0 10px; padding-bottom: 6px; border-bottom: 1px solid #f0f4fa;
}
.form-row em.req { color: #e53935; font-style: normal; margin-left: 2px; }
.form-row textarea {
    width: 100%; padding: 9px 12px; border-radius: 8px; border: 1px solid #dce4ed;
    font-size: 14px; outline: none; background: #f8fafc; resize: vertical; font-family: inherit;
}
.form-row textarea:focus { border-color: #4fc3f7; background: #fff; }
.ca-icon-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.ca-icon-item {
    height: 44px; border: 1px solid #e2e9f2; border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
    color: #6a839d; background: #f8fafc; transition: 0.15s;
}
.ca-icon-item:hover { border-color: #4fc3f7; color: #1565c0; background: #fff; }
.ca-icon-item.active {
    border-color: #1565c0; color: #1565c0; background: #e3f0fd;
    box-shadow: 0 0 0 2px rgba(21,101,192,0.15);
}
.ca-recognize {
    background: #4fc3f7; color: #fff; border: 0;
    padding: 8px 16px; border-radius: 30px; font-size: 12px; font-weight: 600;
    cursor: pointer; white-space: nowrap; transition: 0.2s;
}
.ca-recognize:hover { background: #29b6f6; }
.ca-vis-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ca-vis-card {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    border: 1px solid #e2e9f2; border-radius: 10px; cursor: pointer; background: #f8fafc; transition: 0.15s;
}
.ca-vis-card > i { font-size: 18px; color: #889fb3; transition: 0.15s; }
.ca-vis-card .cvc-txt { display: flex; flex-direction: column; gap: 2px; }
.ca-vis-card .cvc-txt b { font-size: 13px; color: #1f3347; }
.ca-vis-card .cvc-txt span { font-size: 11px; color: #889fb3; }
.ca-vis-card:hover { border-color: #4fc3f7; }
.ca-vis-card.active { border-color: #1565c0; background: #e3f0fd; box-shadow: 0 0 0 2px rgba(21,101,192,0.15); }
.ca-vis-card.active > i { color: #1565c0; }
/* 表单里的说明性提示（浅底 + 左侧色条），用于解释容易混淆的成对配置 */
.ca-hint {
    font-size: 12px; line-height: 1.7; color: #6a839d; margin: 0 0 10px;
    background: #f7faff; border-left: 3px solid #4fc3f7; border-radius: 0 6px 6px 0; padding: 8px 12px;
}
.ca-hint b { color: #1565c0; }
.ca-scope-cards { grid-template-columns: repeat(3, 1fr); }
.ca-role {
    display: inline-flex; align-items: center; gap: 5px; margin: 0 12px 4px 0;
    font-size: 13px; color: #1f3347; background: #f0f4fa; padding: 4px 12px; border-radius: 20px; cursor: pointer;
}
.ca-role input { width: auto; margin: 0; }
.kb-empty { color: #889fb3; font-size: 13px; text-align: center; padding: 12px 0; }
.app-modal .modal-footer { padding: 14px 20px; }
.app-modal .modal-footer .btn-approve { padding: 8px 22px; font-size: 13px; }

/* ===== 应用匹配（匹配度 / 业务角色 / 匹配中心 / 一键开启结果） ===== */
.ca-demand-cards { grid-template-columns: repeat(3, 1fr); }
.demand-type-tag { font-size: 11px; padding: 2px 9px; border-radius: 20px; font-weight: 600; }
.demand-type-tag.supply { background: #e8eaf6; color: #3949ab; }
.demand-type-tag.demand { background: #fff3e0; color: #e65100; }
.demand-type-tag.both { background: #e6f6ec; color: #2e7d32; }

.match-badge {
    display: inline-flex; align-items: center; gap: 4px; font-size: 11px;
    padding: 2px 9px; border-radius: 20px; font-weight: 700;
}
.match-badge.high { background: #e6f6ec; color: #2e7d32; }
.match-badge.mid { background: #fff3e0; color: #e65100; }
.match-badge.low { background: #f0f4fa; color: #889fb3; }
.match-badge.none { background: #f6f8fb; color: #b6c4d4; font-weight: 400; }
.app-match-hint {
    font-size: 12px; color: #2e7d32; background: #e6f6ec; padding: 5px 10px;
    border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 一键开启结果弹窗 */
.app-result-modal { width: 560px; }
.app-result-modal .modal-body { padding: 8px 24px 18px; }
.match-result-item {
    border: 1px solid #e2e9f2; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px;
    background: #f8fafc;
}
.match-result-item .mri-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.match-result-item .mri-head b { font-size: 14px; color: #0a1628; }
.match-result-item .mri-body { display: flex; flex-direction: column; gap: 5px; }
.mri-line { font-size: 13px; color: #1f3347; }
.mri-line i { color: #1565c0; margin-right: 5px; font-size: 12px; }
.mri-reasons { color: #889fb3; font-size: 12px; }
.ocr-opened { display: flex; flex-wrap: wrap; gap: 8px; }
.ocr-opened-tag {
    font-size: 12px; background: #e3f0fd; color: #0a558c; padding: 4px 12px;
    border-radius: 20px; display: inline-flex; align-items: center; gap: 5px;
}
.ocr-empty { color: #6a839d; font-size: 13px; margin-bottom: 12px; }

/* 匹配中心 */
.app-match-modal { width: 620px; }
.app-match-modal .modal-body { padding: 8px 24px 18px; }
.amc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 6px; }
.amc-stat {
    background: #f8fafc; border: 1px solid #eef3f9; border-radius: 10px;
    padding: 12px; text-align: center;
}
.amc-stat b { font-size: 22px; color: #1565c0; display: block; }
.amc-stat span { font-size: 12px; color: #6a839d; }
.amc-apps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.amc-app-tag {
    font-size: 12px; background: #eef3f9; color: #1f3347; padding: 4px 12px;
    border-radius: 20px; display: inline-flex; align-items: center; gap: 5px;
}
.amc-records { display: flex; flex-direction: column; gap: 8px; }
.amc-record {
    display: flex; align-items: flex-start; gap: 10px; border: 1px solid #eef3f9;
    border-radius: 10px; padding: 10px 12px; background: #fff;
}
.amc-record-icon {
    width: 30px; height: 30px; border-radius: 50%; background: #e3f0fd; color: #1565c0;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.amc-record-txt { flex: 1; min-width: 0; }
.amc-record-txt b { font-size: 13px; color: #0a1628; }
.amc-record-meta { font-size: 12px; color: #889fb3; margin-top: 2px; }
.amc-record-reasons { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.amc-record-reasons span {
    font-size: 11px; background: #f0f4fa; color: #2e6da4; padding: 1px 8px; border-radius: 10px;
}
.login-tabs { display: inline-flex; background: #eef3f9; border-radius: 30px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.login-tab { padding: 6px 16px; border-radius: 30px; font-size: 13px; cursor: pointer; color: #5a7390; font-weight: 600; }
.login-tab.active { background: #1565c0; color: #fff; }
.login-divider { display: flex; align-items: center; color: #b6c4d4; font-size: 12px; margin: 16px 0 12px; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: #e2e9f2; }
.login-divider span { padding: 0 12px; }
.login-btn.guest { background: #fff; color: #1565c0; border: 1px solid #1565c0; margin-top: 6px; }
.login-msg { font-size: 13px; min-height: 18px; margin-bottom: 4px; }

/* ===== 知识库 ===== */
.kb-toolbar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.kb-card {
    background: #fff; border-radius: 14px; border: 1px solid #e2e9f2; padding: 18px 20px;
    display: flex; flex-direction: column; gap: 10px; transition: 0.2s;
}
.kb-card:hover { box-shadow: 0 4px 16px rgba(10,22,40,0.06); }
.kb-card .kb-head { display: flex; justify-content: space-between; align-items: center; }
.kb-card .kb-cate { font-size: 12px; padding: 2px 12px; border-radius: 20px; font-weight: 600; color: #1f3347; }
.kb-card .kb-src { font-size: 12px; color: #889fb3; }
.kb-card .kb-title { font-weight: 600; color: #0a1628; font-size: 15px; }
.kb-card .kb-content {
    font-size: 13px; color: #1f3347; line-height: 1.6; max-height: 90px; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
}
.kb-card .kb-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.kb-card .kb-tags span {
    font-size: 12px; background: #f0f4fa; color: #4a5f73; padding: 2px 10px; border-radius: 20px;
}
.kb-card .kb-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f0f4fa; padding-top: 10px; }
.kb-card .kb-actions { display: flex; gap: 8px; }
.kb-card .kb-actions i { cursor: pointer; color: #6a839d; padding: 4px 6px; border-radius: 6px; }
.kb-card .kb-actions i:hover { color: #0a1628; background: #f0f4fa; }
.kb-card .kb-actions i.del:hover { color: #e53935; background: #fdecea; }
.kb-attach-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.kb-thumb {
    width: 52px; height: 52px; border-radius: 8px; border: 1px solid #e2e9f2;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: #f8fafc; color: #4a5f73; text-decoration: none; font-size: 20px;
}
.kb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.kb-thumb.kb-file { font-size: 22px; }

/* 知识库弹窗附件 */
.kb-upload-area { display: flex; flex-direction: column; gap: 10px; }
.kb-upload-btn {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    background: #e8f4fd; color: #0a558c; border: 1px dashed #4fc3f7;
    padding: 8px 18px; border-radius: 30px; font-size: 13px; width: fit-content;
    transition: 0.2s;
}
.kb-upload-btn:hover { background: #d7edfb; }
.kb-attach-list { display: flex; flex-direction: column; gap: 6px; max-height: 150px; overflow-y: auto; }
.kb-attach-item {
    display: flex; align-items: center; gap: 10px; background: #f8fafc;
    border: 1px solid #eef3f9; border-radius: 8px; padding: 6px 10px;
}
.kb-attach-img { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; }
.kb-attach-ic { font-size: 18px; color: #4a5f73; width: 30px; text-align: center; }
.kb-attach-name { flex: 1; font-size: 13px; color: #1f3347; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-attach-del { cursor: pointer; color: #889fb3; font-size: 13px; }
.kb-attach-del:hover { color: #e53935; }

@media (max-width: 700px) {
    .channel-grid { grid-template-columns: 1fr; }
    .member-account { flex-direction: column; gap: 14px; align-items: flex-start; }
    .member-account .ma-points { text-align: left; }
}

/* ===== 响应式 ===== */
@media (max-width:1024px) {
    .chart-row { grid-template-columns:1fr; }
    .chat-layout { flex-direction:column; }
    .chat-contacts { width:100%; max-height:200px; }
    .browser-container { flex-direction:column; }
    .browser-log { max-height:200px; }
    .sidebar { width:60px; }
    .sidebar .logo span { display:none; }
}
@media (max-width:600px) {
    .sidebar { width:56px; }
    .content { padding:16px; }
    .topbar { padding:12px 16px; flex-wrap:wrap; }
    .tree-node { padding-left:16px; }
}

/* ========== 集团管理 ========== */
.group-page { padding: 20px; }
.gp-muted { color: var(--muted, #94a3b8); font-size: 12px; font-weight: 400; }
.gp-empty { text-align: center; color: #94a3b8; padding: 28px 0; font-size: 13px; }

/* 卡片 */
.gp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.gp-card { background: #fff; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 14px 16px; }
.gp-card-warn { border-color: #f59e0b; background: #fffbeb; }
.gp-n { font-size: 22px; font-weight: 800; color: #0f172a; line-height: 1.2; }
.gp-l { font-size: 12px; color: #64748b; margin-top: 4px; }

/* 面板 */
.gp-panel { background: #fff; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 16px; margin-bottom: 16px; overflow-x: auto; }
.gp-panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.gp-panel-h h3 { margin: 0; font-size: 15px; color: #0f172a; }
.gp-h-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 表格 */
.gp-panel table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gp-panel th { text-align: left; padding: 8px 10px; color: #64748b; font-weight: 600; font-size: 12px; border-bottom: 1px solid #eef2f7; white-space: nowrap; }
.gp-panel td { padding: 9px 10px; border-bottom: 1px solid #f4f7fb; vertical-align: top; }

/* 按钮 */
.gp-btn { border: 1px solid #d8e0ec; background: #fff; color: #334155; border-radius: 6px; padding: 5px 11px; font-size: 12px; cursor: pointer; transition: .15s; }
.gp-btn:hover { border-color: var(--primary, #2f6bff); color: var(--primary, #2f6bff); }
.gp-btn-primary { background: var(--primary, #2f6bff); border-color: var(--primary, #2f6bff); color: #fff; }
.gp-btn-primary:hover { opacity: .88; color: #fff; }
.gp-act { display: flex; gap: 5px; flex-wrap: wrap; }

/* 透支（已确认允许欠费，负余额要显眼） */
.gp-over { color: #dc2626; font-weight: 700; }

/* 占比条 */
.gp-bar { height: 3px; background: #eef2f7; border-radius: 2px; margin-top: 5px; overflow: hidden; min-width: 60px; }
.gp-bar i { display: block; height: 100%; background: var(--primary, #2f6bff); }

/* 警告区 */
.gp-warn { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }
.gp-issue { font-size: 12.5px; color: #92400e; padding: 3px 0; }

/* 弹窗 */
.gp-modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 900; padding: 24px; }
.gp-modal { background: #fff; border-radius: 12px; width: min(880px, 100%); max-height: 86vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(15,23,42,.24); }
.gp-modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eef2f7; }
.gp-modal-h h3 { margin: 0; font-size: 15px; color: #0f172a; }
.gp-x { font-size: 22px; cursor: pointer; color: #94a3b8; line-height: 1; }
.gp-x:hover { color: #0f172a; }
.gp-modal-b { padding: 18px 20px; overflow-y: auto; }
.gp-modal-b table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gp-modal-b th { text-align: left; padding: 8px 10px; color: #64748b; font-weight: 600; font-size: 12px; border-bottom: 1px solid #eef2f7; }
.gp-modal-b td { padding: 8px 10px; border-bottom: 1px solid #f4f7fb; }

/* 表单 */
.gp-field { margin-bottom: 14px; }
.gp-field label { display: block; font-size: 12.5px; color: #475569; margin-bottom: 5px; }
.gp-field input, .gp-field select { width: 100%; border: 1px solid #d8e0ec; border-radius: 7px; padding: 8px 11px; font-size: 13px; box-sizing: border-box; }
.gp-field input:focus, .gp-field select:focus { outline: none; border-color: var(--primary, #2f6bff); }
.gp-tip { background: #f8fafc; border-left: 3px solid #94a3b8; padding: 9px 12px; font-size: 12px; color: #64748b; border-radius: 0 6px 6px 0; margin: 4px 0 12px; }
.gp-modal-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* 聊天记录（档位3：集团查看子账号聊天原文） */
.gp-msgs { max-height: 460px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.gp-msg { max-width: 78%; background: #f1f5f9; border-radius: 10px; padding: 9px 12px; align-self: flex-start; }
.gp-msg-out { background: #eff6ff; align-self: flex-end; }
.gp-msg-txt { font-size: 13px; color: #0f172a; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.gp-msg-tr { font-size: 12px; color: #64748b; margin-top: 5px; padding-top: 5px; border-top: 1px dashed #cbd5e1; }
.gp-msg-meta { font-size: 11px; color: #94a3b8; margin-top: 4px; }

@media (max-width: 768px) {
    .group-page { padding: 12px; }
    .gp-panel { padding: 12px; }
}
