/* 策马CRM - 样式表 */
:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --success: #0d904f;
    --warning: #e6a817;
    --danger: #d93025;
    --bg: #f5f6fa;
    --card: #ffffff;
    --text: #202124;
    --text-secondary: #5f6368;
    --border: #e0e0e0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --radius: 8px;
}

/* 全局快速搜索：桌面 Ctrl+K，统一跳转客户列表 */
.global-search-trigger { display:inline-flex; align-items:center; gap:5px; min-height:32px; padding:5px 10px; border:1px solid var(--line-soft,#e8ebf1); border-radius:8px; background:#fff; color:var(--ink-600,#667085); font:inherit; font-size:12px; font-weight:700; cursor:pointer; }
.global-search-trigger:hover { border-color:var(--active-brand,#4d5bc7); color:var(--active-brand-strong,#3d4aa9); }
.global-search-overlay { position:fixed; inset:0; z-index:1200; display:flex; align-items:flex-start; justify-content:center; padding:14vh 18px 18px; background:rgba(23,32,51,.38); backdrop-filter:blur(3px); }
.global-search-overlay[hidden] { display:none; }
.global-search-dialog { width:min(620px,100%); padding:16px; border:1px solid var(--line-soft,#e8ebf1); border-radius:15px; background:#fff; box-shadow:0 24px 70px rgba(23,32,51,.22); }
.global-search-title { margin-bottom:9px; color:var(--ink-800,#344054); font-size:14px; font-weight:800; }
.global-search-form { display:flex; gap:8px; }
.global-search-form input { flex:1; min-width:0; min-height:44px; padding:9px 12px; border:1px solid #dfe3ea; border-radius:9px; color:var(--ink-800,#344054); font:inherit; font-size:16px; }
.global-search-hint { margin-top:8px; color:var(--ink-500,#98a2b3); font-size:11px; }
@media (max-width:768px) {
    .global-search-trigger { display:none; }
    .global-search-overlay { padding:9vh 12px 12px; }
    .global-search-form { display:grid; grid-template-columns:1fr; }
    .global-search-form .btn { width:100%; justify-content:center; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    user-select: text;
    -webkit-user-select: text;
    overflow-x: hidden;   /* 兜底：禁止页面横向滚动（左滑） */
}

/* 水印层 */
.watermark {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;   /* 裁切超出的水印文字，避免撑出横向滚动（左滑） */
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 100px,
        rgba(0,0,0,0.015) 100px,
        rgba(0,0,0,0.015) 200px
    );
}
.watermark::after {
    content: attr(data-text);
    position: absolute;   /* 相对 .watermark，配合 overflow:hidden 裁切，防止横向溢出 */
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 60px;
    color: rgba(0,0,0,0.03);
    white-space: nowrap;
    letter-spacing: 40px;
}

/* 顶部导航 */
.navbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.navbar-nav {
    display: flex;
    gap: 4px;
}
.navbar-nav a {
    padding: 8px 16px;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}
.navbar-nav a:hover, .navbar-nav a.active {
    background: #e8f0fe;
    color: var(--primary);
}
.navbar-info {
    color: var(--text-secondary);
    font-size: 13px;
}

/* 主容器 */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* 卡片 */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}
.card-header {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 统计卡片 */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    text-align: center;
}
.stat-card.clickable {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.stat-card .stat-num {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}
.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}
.stat-card.warning .stat-num { color: var(--warning); }
.stat-card.success .stat-num { color: var(--success); }
.stat-card.danger .stat-num { color: var(--danger); }

/* 时间维度切换（日/周/月） */
.period-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.period-tab {
    padding: 8px 22px;
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.15s;
}
.period-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.period-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 600;
}

/* 统计卡片内按客服上下排列 */
.stat-card .stat-agent-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 14px;
    text-align: left;
}
.stat-card .stat-agent-name {
    color: var(--text-secondary);
}
.stat-card .stat-num-sm {
    font-weight: 700;
    color: var(--primary);
    font-size: 18px;
}
.stat-card .stat-agent-total {
    border-top: 1px solid var(--border);
    margin-top: 6px;
    padding-top: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}
.stat-card .stat-agent-total .stat-num-sm {
    font-size: 16px;
}
.stat-card .stat-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
    font-weight: 600;
    text-align: left;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.search-bar input, .search-bar select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: var(--text);
}
.search-bar input { flex: 1; min-width: 200px; }
.search-bar select { min-width: 120px; }

/* 按钮 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-outline { background: white; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg); }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-xs { padding: 2px 8px; font-size: 12px; border-radius: 4px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
}
table th, table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--text-secondary);
    position: sticky;
    top: 0;
}
table tbody tr:hover { background: #f8f9ff; }
table tbody tr { cursor: pointer; }

/* 级别标签 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.badge-default { background: #f1f3f4; color: #999; }

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;   /* 按钮多时自动换行，杜绝横向溢出（左滑） */
}
.pagination button {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 13px;
}
.pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* 详情页 */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}
.detail-item {
    padding: 8px 0;
}
.detail-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}
.detail-value {
    font-size: 15px;
    font-weight: 500;
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* 跟进时间线 */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}
.timeline-item {
    position: relative;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 16px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid white;
}
.timeline-time {
    font-size: 12px;
    color: var(--text-secondary);
}
.timeline-content {
    margin-top: 4px;
    font-size: 14px;
    white-space: pre-wrap;   /* 保留跟进内容里的换行（AI质检多行结果），否则多行会挤成一行 */
    word-break: break-word;
}
.timeline-status {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 12px;
    background: #e8f0fe;
    color: var(--primary);
    margin-right: 8px;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    min-width: 400px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}
.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}
.form-group textarea { min-height: 80px; resize: vertical; }

/* 提示信息 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}
.empty-state .icon { font-size: 48px; margin-bottom: 16px; }

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    animation: slideIn 0.3s ease;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 底部 Tab 导航（仅移动端显示） */
.bottom-tabbar {
    display: none;
}

/* 直拨按钮（仅移动端显示，点号码直接用本机 SIM 卡拨打） */
.direct-call {
    display: none;
}

/* 响应式 */
@media (max-width: 768px) {
    .main-container { padding: 12px 12px 64px; }  /* 底部留出 Tab 栏高度，避免内容被遮挡 */
    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px 10px; }
    .stat-card .stat-num { font-size: 28px; }

    /* 顶部导航：隐藏横向链接，只留品牌 + 用户信息 */
    .navbar { padding: 0 12px; height: 50px; }
    .navbar-nav { display: none; }
    .navbar-brand { font-size: 16px; }
    .navbar-info { font-size: 12px; }

    /* 底部 Tab 栏 */
    .bottom-tabbar {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 44px;
        background: var(--card);
        border-top: 1px solid var(--border);
        z-index: 200;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .bottom-tabbar a {
        flex: 1;
        min-width: 0;   /* 防止内容撑开导致溢出，保证各 Tab 等宽 */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        font-size: 10px;
        color: var(--text-secondary);
        text-decoration: none;
    }
    .bottom-tabbar a .tab-icon { font-size: 16px; line-height: 1; }
    .bottom-tabbar a.active { color: var(--primary); font-weight: 600; }

    /* 移动端显示直拨按钮 */
    .direct-call { display: inline-flex; }

    /* 详情页两列 → 单列 */
    .detail-cols { grid-template-columns: 1fr !important; gap: 12px; }
    /* 仪表盘图表区（级别分布 + 最近跟进）两列 → 单列 */
    .normal-charts { grid-template-columns: 1fr !important; }

    /* 卡片头部：标题与右侧按钮组（未评估/未成交/级别）可换行，避免挤压 */
    .card-header { flex-wrap: wrap; row-gap: 8px; }
    /* 客户信息字段强制单列、收紧间距 */
    .detail-grid { grid-template-columns: 1fr !important; gap: 8px; }
    /* 彻底禁止横向溢出：grid/flex 子项可收缩，长文本换行不撑开 */
    .detail-cols > *, .detail-grid > *, .detail-item { min-width: 0 !important; max-width: 100% !important; }
    .card { max-width: 100% !important; }
    #customer-info, #phone-list, #detail-app { min-width: 0; }

    /* 卡片内边距收紧 */
    .card { padding: 14px; }

    /* 模态框：手机全宽居中，避免溢出 */
    .modal { min-width: 0; width: 92vw; max-width: 92vw; padding: 18px 16px; }
    .modal-title { font-size: 16px; }

    /* 触控友好：输入控件 ≥ 40px 高、16px 字（防 iOS 聚焦自动放大） */
    .btn { min-height: 40px; }
    .form-group input, .form-group select, .form-group textarea { font-size: 16px; }
    .form-group textarea { min-height: 90px; }
    .search-bar input, .search-bar select { min-height: 40px; font-size: 16px; }

    /* 搜索栏在手机上纵向堆叠，输入框占满 */
    .search-bar { flex-direction: column; align-items: stretch; }
    .search-bar input, .search-bar select { width: 100%; min-width: 0; }

    /* Toast 居中偏上，避免被底部 Tab 挡住 */
    .toast { top: 12px; right: 12px; left: 12px; text-align: center; }
}

/* ========================================================================
   2026 UI refresh
   只覆盖视觉层，不改变页面逻辑和接口。
   ======================================================================== */
:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-soft: #eef2ff;
    --success: #0f9f6e;
    --warning: #d97706;
    --danger: #dc4a4a;
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #182230;
    --text-secondary: #667085;
    --muted: #98a2b3;
    --border: #e5e9f2;
    --shadow: 0 2px 10px rgba(16, 24, 40, .05);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, .09);
    --radius: 14px;
}

html { background: var(--bg); }
body {
    background:
        radial-gradient(circle at 8% -10%, rgba(79,70,229,.07), transparent 30%),
        var(--bg);
    color: var(--text);
    font-size: 14px;
    letter-spacing: .01em;
}

/* 顶部导航：从单薄的白条改为有层级的工作台顶栏 */
.navbar {
    height: 64px;
    padding: 0 30px;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid rgba(229,233,242,.9);
    box-shadow: 0 1px 0 rgba(16,24,40,.02), 0 4px 16px rgba(16,24,40,.04);
    backdrop-filter: blur(16px);
}
.navbar-brand {
    color: var(--primary);
    font-size: 17px;
    letter-spacing: .02em;
    white-space: nowrap;
}
.sales-shell .navbar-brand { color: #ea6a19; }
.navbar-brand span:first-child {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary-soft);
    font-size: 19px !important;
}
.sales-shell .navbar-brand span:first-child { background: #fff1e8; }
.navbar-nav { gap: 3px; align-items: center; }
.navbar-nav a {
    padding: 9px 12px;
    border-radius: 9px;
    color: #667085;
    font-size: 13px;
    font-weight: 600;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.navbar-nav a:hover { transform: translateY(-1px); background: #f2f4f8; color: var(--text); }
.navbar-nav a.active { background: var(--primary-soft); color: var(--primary); }
.sales-shell .navbar-nav a.active { background: #fff1e8; color: #d95d10; }
.navbar-info { color: var(--text-secondary); font-size: 12px; white-space: nowrap; }
.navbar-info a { font-weight: 600; }
.sales-shell .btn-primary { background: #ea6a19; box-shadow: 0 3px 8px rgba(234,106,25,.18); }
.sales-shell .btn-primary:hover { background: #c94f0d; }

.main-container { max-width: 1480px; padding: 30px 30px 48px; }

/* 页面分段按钮 */
.period-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 22px;
    background: rgba(255,255,255,.82);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.period-tab {
    min-width: 72px;
    padding: 8px 15px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
}
.period-tab:hover { background: #f2f4f8; border-color: transparent; color: var(--text); }
.period-tab.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 3px 8px rgba(79,70,229,.22);
}
.sales-shell .period-tab.active { background: #ea6a19; box-shadow: 0 3px 8px rgba(234,106,25,.22); }

/* 卡片与统计模块 */
.card, .stat-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.card { padding: 22px; margin-bottom: 20px; }
.card:hover { box-shadow: var(--shadow-lg); }
.card-header {
    margin-bottom: 18px;
    color: #344054;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .015em;
}
.stats-row { gap: 16px; margin-bottom: 24px; }
.stat-card {
    position: relative;
    min-height: 112px;
    padding: 18px 20px;
    overflow: hidden;
    text-align: left;
    background: linear-gradient(145deg, #fff 0%, #fbfcff 100%);
}
.stat-card::after {
    content: '';
    position: absolute;
    right: -24px;
    top: -28px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: rgba(79,70,229,.055);
}
.sales-shell .stat-card::after { background: rgba(234,106,25,.06); }
.stat-card.clickable:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #cfd5ff; }
.stat-card .stat-num { position: relative; z-index: 1; font-size: 32px; line-height: 1.15; color: var(--primary); letter-spacing: -.03em; }
.sales-shell .stat-card .stat-num, .sales-shell .stat-num-sm { color: #d95d10; }
.stat-card .stat-label { position: relative; z-index: 1; margin-top: 8px; color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.stat-card .stat-sub { position: relative; z-index: 1; color: var(--muted); }
.stat-card .stat-agent-row { position: relative; z-index: 1; padding: 4px 0; }
.stat-card .stat-agent-total { border-top-color: var(--border); }

/* 输入区与按钮 */
.search-bar { gap: 10px; margin-bottom: 18px; }
.search-bar input, .search-bar select,
.form-group input, .form-group select, .form-group textarea {
    min-height: 40px;
    border: 1px solid #d9deea;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 2px rgba(16,24,40,.02);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.search-bar input:focus, .search-bar select:focus,
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #818cf8;
    box-shadow: 0 0 0 4px rgba(79,70,229,.11);
}
.btn { min-height: 40px; padding: 9px 15px; border-radius: 10px; font-weight: 700; }
.btn-primary { background: var(--primary); box-shadow: 0 3px 8px rgba(79,70,229,.18); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); }
.btn-outline { border: 1px solid #d9deea; background: #fff; color: #475467; }
.btn-outline:hover { background: #f8f9fc; border-color: #bfc7d8; }
.btn-sm { min-height: 34px; padding: 7px 11px; border-radius: 8px; }
.btn-xs { min-height: 28px; padding: 4px 9px; border-radius: 7px; }

/* 表格：更像工作台，降低横线噪音 */
.table-wrap { border: 1px solid var(--border); border-radius: 12px; background: #fff; }
table { border-collapse: separate; border-spacing: 0; }
table th, table td { padding: 13px 14px; border-bottom: 1px solid #edf0f5; }
table th { background: #f8f9fc; color: #667085; font-size: 12px; letter-spacing: .03em; }
table thead tr:first-child th:first-child { border-top-left-radius: 11px; }
table thead tr:first-child th:last-child { border-top-right-radius: 11px; }
table tbody tr { transition: background .15s ease; }
table tbody tr:hover { background: #f7f8ff; }
table tbody tr:last-child td { border-bottom: 0; }
.pagination button { min-height: 34px; border-radius: 8px; border-color: #d9deea; }
.pagination button.active { background: var(--primary); }

/* 详情信息 */
.detail-item { padding: 12px 14px; border: 1px solid #edf0f5; border-radius: 11px; background: #fafbfe; }
.detail-label { color: #98a2b3; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.detail-value { margin-top: 3px; color: #344054; font-size: 14px; }
.timeline { padding-left: 28px; }
.timeline::before { left: 10px; background: #dfe3ef; }
.timeline-item { padding: 16px 0; }
.timeline-item::before { left: -24px; top: 20px; width: 11px; height: 11px; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

/* 标签、弹窗、提示 */
.badge { padding: 4px 9px; border-radius: 8px; font-size: 11px; letter-spacing: .02em; }
.modal-overlay { background: rgba(15,23,42,.46); backdrop-filter: blur(3px); }
.modal { border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 70px rgba(16,24,40,.22); }
.toast { border-radius: 10px; box-shadow: var(--shadow-lg); }

/* 底部移动导航 */
.bottom-tabbar { height: 58px; border-top-color: var(--border); box-shadow: 0 -5px 18px rgba(16,24,40,.08); }
.bottom-tabbar a { gap: 3px; font-weight: 600; }
.bottom-tabbar a .tab-icon { font-size: 18px; }

/* 登录页保持品牌一致，但降低旧式强渐变的刺眼感 */
.login-page { background: radial-gradient(circle at 15% 0%, #818cf8 0%, transparent 34%), linear-gradient(135deg, #4338ca 0%, #1e1b4b 100%); }
.login-box { border: 1px solid rgba(255,255,255,.75); border-radius: 18px; box-shadow: 0 24px 70px rgba(15,23,42,.28); }
.login-box h1 { color: var(--primary); }

/* 门户页与工作台共用同一套品牌语言 */
.portal-page {
    background:
        radial-gradient(circle at 15% 0%, rgba(129,140,248,.9), transparent 35%),
        linear-gradient(135deg, #4338ca 0%, #1e1b4b 100%);
}
.portal-card { border: 1px solid rgba(255,255,255,.72); box-shadow: 0 18px 48px rgba(15,23,42,.24); }
.portal-card.receive h2 { color: var(--primary); }
.portal-card.receive .enter { background: var(--primary); }
.portal-card.buy h2 { color: #ea6a19; }
.portal-card.buy .enter { background: #ea6a19; }

@media (max-width: 900px) {
    .navbar { padding: 0 18px; }
    .navbar-nav a { padding-left: 9px; padding-right: 9px; }
    .navbar-info span:first-child { display: none; }
    .main-container { padding: 22px 18px 42px; }
}

@media (max-width: 768px) {
    .navbar { height: 56px; }
    .navbar-brand { font-size: 15px; }
    .navbar-brand span:first-child { width: 30px; height: 30px; }
    .main-container { padding: 18px 12px 82px; }
    .period-tabs { display: flex; width: 100%; margin-bottom: 16px; }
    .period-tab { flex: 1; min-width: 0; padding: 8px 7px; }
    .card { padding: 16px; border-radius: 14px; }
    .stat-card { min-height: 96px; padding: 15px; }
    .stat-card .stat-num { font-size: 27px; }
    table th, table td { padding: 11px 10px; }
    .table-wrap { border-radius: 10px; }
}

/* ========================================================================
   2026 UI polish
   第二轮视觉精修：降低饱和度，统一品牌色与层级，保留业务逻辑不变。
   ======================================================================== */
:root {
    --ink-950: #172033;
    --ink-800: #273247;
    --ink-600: #596579;
    --ink-500: #778397;
    --line-soft: #e8ebf1;
    --surface: #ffffff;
    --canvas: #f6f7f9;
    --brand: #4d5bc7;
    --brand-strong: #3d4aa9;
    --brand-soft: #eef0ff;
    --brand-wash: #fafaff;
    --sales-brand: #b56b45;
    --sales-strong: #945236;
    --sales-soft: #fbf0ea;
    --focus-ring: rgba(77, 91, 199, .16);
    --elevation-1: 0 1px 2px rgba(23, 32, 51, .03), 0 5px 16px rgba(23, 32, 51, .035);
    --elevation-2: 0 14px 34px rgba(23, 32, 51, .09);
}

body.receive-shell,
body.sales-shell {
    --active-brand: var(--brand);
    --active-brand-strong: var(--brand-strong);
    --active-brand-soft: var(--brand-soft);
    --active-brand-wash: var(--brand-wash);
    background: var(--canvas);
    color: var(--ink-800);
    font-size: 14px;
    letter-spacing: 0;
}

body.sales-shell {
    --active-brand: var(--sales-brand);
    --active-brand-strong: var(--sales-strong);
    --active-brand-soft: var(--sales-soft);
    --active-brand-wash: #fffaf7;
    --focus-ring: rgba(181, 107, 69, .16);
}

body.receive-shell::before,
body.sales-shell::before {
    content: '';
    position: fixed;
    inset: 0 0 auto;
    height: 240px;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, var(--active-brand-wash), rgba(246,247,249,0));
}

.navbar {
    height: 68px;
    padding: 0 32px;
    background: rgba(255,255,255,.88);
    border-bottom: 1px solid rgba(232,235,241,.92);
    box-shadow: 0 1px 0 rgba(23,32,51,.02);
    backdrop-filter: blur(18px);
}
.navbar-brand { color: var(--active-brand); font-size: 16px; font-weight: 750; letter-spacing: -.01em; }
.navbar-brand span:first-child {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--active-brand-soft);
    color: var(--active-brand);
    font-size: 18px !important;
}
.navbar-nav { gap: 5px; }
.navbar-nav a {
    padding: 9px 11px;
    border-radius: 9px;
    color: var(--ink-600);
    font-size: 13px;
    font-weight: 650;
}
.navbar-nav a:hover { background: #f4f5f8; color: var(--ink-950); transform: none; }
.navbar-nav a.active { background: var(--active-brand-soft); color: var(--active-brand-strong); }
.navbar-info { color: var(--ink-500); }
.navbar-info a { color: var(--active-brand) !important; }
.navbar-info a:last-child { color: #b25757 !important; }

.main-container { max-width: 1500px; padding: 32px 32px 52px; }
.period-tabs {
    gap: 2px;
    padding: 4px;
    background: rgba(255,255,255,.78);
    border: 1px solid var(--line-soft);
    border-radius: 11px;
    box-shadow: var(--elevation-1);
}
.period-tab { min-width: 74px; padding: 8px 15px; border-radius: 8px; color: var(--ink-600); }
.period-tab:hover { background: #f5f6f8; color: var(--ink-950); }
.period-tab.active {
    background: var(--active-brand);
    box-shadow: 0 4px 10px color-mix(in srgb, var(--active-brand) 22%, transparent);
}

.card,
.stat-card {
    border: 1px solid var(--line-soft);
    border-radius: 15px;
    box-shadow: var(--elevation-1);
}
.card { padding: 23px; margin-bottom: 22px; background: rgba(255,255,255,.94); }
.card:hover { box-shadow: var(--elevation-2); }
.card-header { margin-bottom: 19px; color: var(--ink-800); font-size: 15px; font-weight: 720; }
.stats-row { gap: 14px; margin-bottom: 25px; }
.stat-card {
    min-height: 116px;
    padding: 19px 20px;
    background: linear-gradient(145deg, #fff 0%, var(--active-brand-wash) 100%);
}
.stat-card::after { background: color-mix(in srgb, var(--active-brand) 7%, transparent); }
.stat-card.clickable:hover { border-color: color-mix(in srgb, var(--active-brand) 35%, var(--line-soft)); }
.stat-card .stat-num { color: var(--active-brand); font-weight: 720; }
.stat-card .stat-label { color: var(--ink-600); font-weight: 650; }
.stat-card .stat-sub { color: var(--ink-500); }

.search-bar { gap: 10px; margin-bottom: 19px; }
.search-bar input, .search-bar select,
.form-group input, .form-group select, .form-group textarea {
    min-height: 41px;
    border: 1px solid #dfe3ea;
    border-radius: 9px;
    background: #fff;
    color: var(--ink-800);
}
.search-bar input::placeholder, .form-group input::placeholder, .form-group textarea::placeholder { color: #a3adbb; }
.search-bar input:focus, .search-bar select:focus,
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--active-brand);
    box-shadow: 0 0 0 4px var(--focus-ring);
}
.btn { min-height: 41px; padding: 9px 16px; border-radius: 9px; font-weight: 700; }
.btn-primary { background: var(--active-brand); box-shadow: 0 4px 9px color-mix(in srgb, var(--active-brand) 18%, transparent); }
.btn-primary:hover { background: var(--active-brand-strong); }
.btn-outline { border-color: #dfe3ea; color: var(--ink-600); }
.btn-outline:hover { border-color: #c8ced9; background: #f8f9fb; color: var(--ink-800); }
.btn-sm { min-height: 35px; padding: 7px 11px; }

.table-wrap { overflow: hidden; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); box-shadow: var(--elevation-1); }
table th, table td { padding: 13px 15px; border-bottom-color: #eef0f4; }
table th { background: #fafbfc; color: var(--ink-500); font-size: 11px; font-weight: 750; letter-spacing: .045em; }
table tbody tr:hover { background: var(--active-brand-wash); }
.pagination button { border-color: #dfe3ea; color: var(--ink-600); }
.pagination button.active { background: var(--active-brand); border-color: var(--active-brand); }

.detail-item { padding: 13px 14px; border: 1px solid #edf0f4; background: #fbfcfd; }
.detail-label { color: var(--ink-500); font-size: 11px; }
.detail-value { color: var(--ink-800); }
.timeline::before { background: #e2e6ed; }
.timeline-item::before { background: var(--active-brand); box-shadow: 0 0 0 4px var(--active-brand-soft); }
.badge { border-radius: 7px; font-weight: 700; }
.modal-overlay { background: rgba(23,32,51,.42); }
.modal { border: 1px solid var(--line-soft); border-radius: 15px; box-shadow: 0 24px 70px rgba(23,32,51,.2); }
.toast { border-radius: 9px; box-shadow: var(--elevation-2); }

.bottom-tabbar { height: 60px; border-top-color: var(--line-soft); }
.bottom-tabbar a.active { color: var(--active-brand) !important; }

.login-page,
.portal-page {
    background: radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--brand) 72%, white), transparent 35%), linear-gradient(135deg, #4d5bc7 0%, #242b5e 100%);
}
.login-box, .portal-card { border: 1px solid rgba(255,255,255,.74); border-radius: 16px; box-shadow: 0 24px 70px rgba(23,32,51,.25); }
.login-box h1 { color: var(--brand-strong); }
.portal-card.receive h2 { color: var(--brand-strong); }
.portal-card.receive .enter { background: var(--brand); }
.portal-card.buy h2 { color: var(--sales-strong); }
.portal-card.buy .enter { background: var(--sales-brand); }

@media (max-width: 900px) {
    .navbar { padding: 0 18px; }
    .main-container { padding: 24px 18px 46px; }
}
@media (max-width: 768px) {
    .navbar { height: 58px; }
    .main-container { padding: 19px 12px 84px; }
    .card { padding: 17px; border-radius: 13px; }
    .stat-card { min-height: 98px; padding: 16px; }
}

/* 登录按钮独立兜底，避免工作台主题变量影响未带 shell 类的登录页 */
.login-box .login-submit {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
    padding: 11px 16px;
    border: 0;
    border-radius: 9px;
    background: #4d5bc7 !important;
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    opacity: 1 !important;
    visibility: visible !important;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.login-box .login-submit:hover { background: #3d4aa9 !important; }
.login-box .login-submit:active { transform: translateY(1px); }

/* 销售端新线索提醒控件 */
.lead-notify-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 5px 9px;
    border: 1px solid #ead8ce;
    border-radius: 8px;
    background: #fffaf7;
    color: var(--sales-strong);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.lead-notify-toggle:hover { background: var(--sales-soft); }
.lead-notify-toggle.is-muted { border-color: #e1e5eb; background: #f8f9fb; color: var(--ink-500); }
.lead-notify-badge {
    display: inline-grid;
    place-items: center;
    min-width: 19px;
    height: 19px;
    margin-left: -6px;
    border-radius: 99px;
    background: #bd5f45;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}
.lead-notify-badge[hidden] { display: none; }
.workspace-switch {
    display: none;
    align-items: center;
    gap: 4px;
    min-height: 30px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--primary) !important;
    background: var(--primary-soft);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
    box-shadow: 0 2px 7px rgba(28, 39, 65, .08);
}
.workspace-switch-icon { font-size: 15px; line-height: 1; opacity: .82; }
.mobile-workspace-switch { margin-left: auto; }
.sales-workspace-switch {
    color: var(--sales-strong) !important;
    background: var(--sales-soft);
    border-color: #ead8ce;
}
@media (max-width: 768px) {
    .lead-notify-toggle { min-height: 30px; padding: 4px 7px; font-size: 11px; }
    .lead-notify-toggle #lead-notify-label { display: none; }
    .lead-notify-badge { margin-left: -4px; }
    .mobile-workspace-switch { display: inline-flex; }
}

/* 业务关系、漏斗和 AI 审核共用的小型信息组件 */
.dashboard-card-hint, .muted-text { color: var(--ink-500, #98a2b3); font-size: 11px; font-weight: 500; }
.sales-funnel { display: grid; gap: 10px; padding: 4px 2px; }
.sales-funnel-row { display: grid; grid-template-columns: 72px minmax(0,1fr) 42px; align-items: center; gap: 10px; color: var(--ink-600, #667085); font-size: 12px; }
.sales-funnel-row b { color: var(--ink-800, #344054); text-align: right; }
.sales-funnel-track { height: 10px; overflow: hidden; border-radius: 999px; background: #f0f2f5; }
.sales-funnel-track i { display: block; height: 100%; border-radius: inherit; min-width: 0; }
.receive-funnel { display: grid; gap: 9px; padding: 2px 2px 0; }
.receive-funnel-row { display: grid; grid-template-columns: 82px minmax(0,1fr) 38px; align-items: center; gap: 10px; color: var(--ink-600, #667085); font-size: 12px; }
.receive-funnel-label { white-space: nowrap; }
.receive-funnel-track { height: 10px; overflow: hidden; border-radius: 999px; background: #f0f2f5; }
.receive-funnel-bar { height: 100%; min-width: 0; border-radius: inherit; transition: width .25s ease; }
.receive-funnel-value { color: var(--ink-800, #344054); text-align: right; }
.receive-funnel-total { margin-top: 2px; color: var(--ink-500, #98a2b3); font-size: 11px; text-align: right; }
.bulk-action-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line-soft, #edf0f5); border-radius: 9px; background: #fafbfc; }
.bulk-action-bar select { min-width: 140px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.bulk-count { color: var(--ink-600, #667085); font-size: 12px; font-weight: 650; }
.select-cell { width: 34px; text-align: center; }
.customer-select { width: 16px; height: 16px; accent-color: var(--active-brand, #4d5bc7); }
.related-customers-card { overflow: hidden; }
.related-customer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; color: var(--ink-700, #475467); text-decoration: none; border-bottom: 1px solid var(--line-soft, #edf0f5); }
.related-customer-row:last-child { border-bottom: 0; }
.related-customer-row b { display: block; color: var(--ink-900, #1d2939); font-size: 13px; }
.related-customer-row small { display: block; margin-top: 3px; color: var(--ink-500, #98a2b3); font-size: 11px; }
.related-customer-row > span:last-child { flex: 0 0 auto; color: var(--active-brand-strong, #4d5bc7); font-size: 12px; font-weight: 700; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.page-heading h1 { margin: 0; color: var(--ink-900, #1d2939); font-size: 22px; }
.page-heading p { margin: 5px 0 0; color: var(--ink-500, #98a2b3); font-size: 12px; }
.qc-review-list { display: grid; gap: 12px; }
.qc-review-item { padding: 14px; border: 1px solid var(--line-soft, #edf0f5); border-radius: 12px; background: #fff; }
.qc-review-head, .qc-review-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qc-review-meta { margin-left: 8px; color: var(--ink-500, #98a2b3); font-size: 11px; }
.qc-score { color: var(--active-brand-strong, #4d5bc7); font-size: 18px; font-weight: 800; }
.qc-review-summary { margin-top: 8px; color: var(--ink-700, #475467); line-height: 1.6; }
.qc-review-dims { margin-top: 6px; color: var(--ink-500, #98a2b3); font-size: 11px; }
.qc-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.qc-review-grid > div { padding: 8px 10px; border-radius: 8px; background: #f8f9fb; }
.qc-review-grid span, .qc-review-grid b { display: block; }
.qc-review-grid span { color: var(--ink-500, #98a2b3); font-size: 11px; }
.qc-review-grid b { margin-top: 3px; color: var(--ink-700, #475467); font-size: 12px; font-weight: 600; white-space: pre-wrap; }
.qc-review-actions { justify-content: flex-start; margin-top: 12px; }
.qc-customer-item { position: relative; padding: 12px; border: 1px solid var(--line-soft, #edf0f5); border-radius: 10px; background: #fbfcff; }
.qc-customer-item + .qc-customer-item { margin-top: 9px; }
.qc-customer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qc-customer-score { position: absolute; top: 10px; right: 12px; color: var(--active-brand-strong, #4d5bc7); font-size: 20px; font-weight: 800; }
.qc-customer-score small { margin-left: 2px; font-size: 11px; font-weight: 600; }
.qc-customer-summary { margin-top: 10px; padding-right: 42px; color: var(--ink-700, #475467); line-height: 1.55; }
.qc-customer-dims { margin-top: 6px; color: var(--ink-500, #98a2b3); font-size: 11px; }
.qc-customer-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; margin-top: 10px; }
.qc-customer-grid > div { padding: 7px 8px; border-radius: 7px; background: #f2f4f9; }
.qc-dual-report .qc-customer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qc-customer-grid span, .qc-customer-grid b { display: block; }
.qc-customer-grid span { color: var(--ink-500, #98a2b3); font-size: 10px; }
.qc-customer-grid b { margin-top: 3px; color: var(--ink-700, #475467); font-size: 11px; font-weight: 600; white-space: pre-wrap; }
.qc-status-pill { padding: 3px 7px; border-radius: 999px; background: #eef1f6; color: var(--ink-600, #667085); font-size: 10px; white-space: nowrap; }
.qc-status-pill.pending { background: #fff4d6; color: #9a6700; }
.qc-status-pill.approved { background: #e9f8ef; color: #21845a; }
.qc-status-pill.rejected { background: #f1f3f5; color: #777; }
.qc-dual-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 10px; }
.qc-dual-report { min-width: 0; padding: 11px; border: 1px solid #e4e8f0; border-radius: 10px; background: #fff; }
.qc-dual-report:first-child { border-top: 3px solid #6574d8; }
.qc-dual-report:last-child { border-top: 3px solid #eaa15b; }
.qc-dual-report-title { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--ink-800, #344054); }
.qc-dual-report-title > span:not(.qc-score) { color:var(--ink-500, #98a2b3); font-size:11px; }
.qc-dual-empty { background:#fafbfc; }
.qc-vote-summary { margin-top: 10px; color: var(--ink-500, #98a2b3); font-size: 11px; }
.qc-vote-box { margin-top: 10px; padding: 10px; border-radius: 9px; background: #f7f8fc; }
.qc-vote-title { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--ink-700, #475467); font-size:12px; font-weight:700; }
.qc-vote-title span { color:var(--ink-500, #98a2b3); font-size:10px; font-weight:500; }
.qc-vote-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.qc-vote-btn { padding:5px 9px; border:1px solid #d9deea; border-radius:7px; background:#fff; color:var(--ink-600, #667085); font-size:11px; cursor:pointer; }
.qc-vote-btn:hover, .qc-vote-btn.selected { border-color:var(--active-brand, #4d5bc7); background:var(--active-brand-wash, #eef1ff); color:var(--active-brand-strong, #4d5bc7); font-weight:700; }
.qc-recording-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid var(--line-soft, #edf0f5); }
.qc-recording-row:last-child { border-bottom:0; }
.qc-recording-row > div { min-width:0; }
.qc-recording-row b, .qc-recording-row small { display:block; }
.qc-recording-row b { color:var(--ink-700, #475467); font-size:12px; }
.qc-recording-row small { margin-top:3px; color:var(--ink-500, #98a2b3); font-size:10px; }
.qc-recording-row audio { width: min(320px, 48%); height: 34px; }
.crm-audio-player { display:flex; align-items:center; gap:9px; width:min(360px, 52%); min-width:0; padding:9px 10px; border:1px solid #e5e9f1; border-radius:12px; background:linear-gradient(135deg,#fbfcff,#f4f6fb); box-shadow:0 3px 12px rgba(31,41,55,.06); }
.crm-audio-source { display:none !important; }
.crm-audio-play, .crm-audio-mute { flex:0 0 auto; width:31px; height:31px; padding:0; border:0; border-radius:50%; background:var(--active-brand,#4d5bc7); color:#fff; font-size:13px; line-height:31px; text-align:center; cursor:pointer; }
.crm-audio-play:active { transform:scale(.95); }
.crm-audio-mute { width:27px; height:27px; background:#e9edf6; color:var(--ink-600,#667085); font-size:14px; line-height:27px; }
.crm-audio-main { flex:1; min-width:0; }
.crm-audio-top { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:5px; color:var(--ink-500,#98a2b3); font-size:10px; }
.crm-audio-top b { color:var(--ink-700,#475467); font-size:11px; }
.crm-audio-top i, .crm-audio-top em { font-style:normal; color:var(--ink-600,#667085); font-variant-numeric:tabular-nums; }
.crm-audio-progress { display:block; width:100%; height:4px; margin:0; accent-color:var(--active-brand,#4d5bc7); cursor:pointer; }
.qc-recording-missing { color:var(--ink-500, #98a2b3); font-size:11px; }
@media (max-width: 768px) {
    .page-heading { align-items: flex-start; margin-bottom: 12px; }
    .page-heading h1 { font-size: 18px; }
    .page-heading p { max-width: 230px; line-height: 1.5; }
    .dashboard-card-hint { font-size: 10px; }
    .sales-funnel-row { grid-template-columns: 62px minmax(0,1fr) 34px; gap: 7px; }
    .receive-funnel-row { grid-template-columns: 76px minmax(0,1fr) 32px; gap: 7px; }
    .related-customer-row { padding: 9px 0; }
    .qc-review-grid { grid-template-columns: 1fr; }
    .qc-review-meta { display: block; margin: 4px 0 0; }
    .qc-review-item { padding: 12px; }
    .qc-customer-grid { grid-template-columns: 1fr; }
    .qc-customer-item { padding: 11px; }
    .qc-dual-grid { grid-template-columns: 1fr; gap: 8px; }
    .qc-dual-report .qc-customer-grid { grid-template-columns: 1fr; }
    .qc-vote-title { align-items:flex-start; flex-direction:column; }
    .qc-vote-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
    .qc-vote-btn { width:100%; }
    .qc-recording-row { align-items:flex-start; flex-direction:column; gap:7px; }
    .qc-recording-row audio { width:100%; }
    .crm-audio-player { width:100%; padding:9px 10px; }
    .crm-audio-play { width:34px; height:34px; line-height:34px; }
}

/* 移动端旧导航规则会隐藏 navbar-info 的第一个 span，恢复提醒铃铛图标 */
@media (max-width: 900px) {
    .navbar-info .lead-notify-toggle > span:first-child { display: inline !important; }
}
@media (max-width: 768px) {
    .lead-notify-toggle { min-width: 32px; justify-content: center; }
}

/* 首页看板：压缩首屏信息密度，手机端不再上下滚动查看首页模块 */
.dashboard-page .period-tabs { margin-bottom: 12px; }
.dashboard-page .stats-row { margin-bottom: 14px; }
.dashboard-page .dashboard-chart-card { min-height: 196px; margin-bottom: 14px; }
.dashboard-page .dashboard-quick-card { margin-bottom: 0; }
.dashboard-page .dashboard-note { display: none; }
.dashboard-status {
    min-height: 0;
    margin: -4px 0 10px;
    color: var(--ink-500, #778397);
    font-size: 12px;
}
.dashboard-status.is-loading { min-height: 18px; }
.dashboard-status.is-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #f2c7c7;
    border-radius: 9px;
    background: #fff8f8;
    color: #b42318;
}
.dashboard-status.is-error .btn { flex: 0 0 auto; }

/* 收车首页级别图：桌面保留原柱状图，手机使用独立的固定数字区布局 */
.receive-dashboard #level-chart { display: block !important; }
.receive-dashboard .level-chart-desktop {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    height: 100%;
}
.receive-dashboard .level-chart-mobile { display: none; }

@media (max-width: 768px) {
    body.dashboard-shell { overflow-y: hidden; height: 100svh; }
    .dashboard-page {
        height: calc(100svh - 58px - 60px);
        min-height: 0;
        overflow: hidden;
    }
    .dashboard-page .period-tabs { margin-bottom: 8px; }
    .dashboard-page .stats-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 7px;
        margin-bottom: 8px;
    }
    .dashboard-page .stat-card {
        min-width: 0;
        min-height: 76px;
        padding: 9px 6px;
        border-radius: 10px;
    }
    .dashboard-page .stat-card .stat-num { font-size: 22px; line-height: 1.05; }
    .dashboard-page .stat-card .stat-label {
        margin-top: 4px;
        font-size: 10px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .dashboard-page .stat-card .stat-sub {
        margin-top: 3px;
        padding-top: 3px;
        font-size: 9px;
        line-height: 1.15;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .dashboard-page .stat-card .stat-agent-row {
        min-width: 0;
        gap: 2px;
        padding: 1px 0;
        font-size: 10px;
        line-height: 1.15;
    }
    .dashboard-page .stat-card .stat-agent-name {
        min-width: 0;
        max-width: 42px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .dashboard-page .stat-card .stat-num-sm { font-size: 12px; }
    .dashboard-page .stat-card .stat-agent-total {
        margin-top: 3px;
        padding-top: 3px;
        font-size: 9px;
    }
    .dashboard-page .stat-card .stat-agent-total .stat-num-sm { font-size: 11px; }
    .dashboard-page .dashboard-charts {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        margin-bottom: 8px;
    }
    .dashboard-page .dashboard-chart-card {
        min-width: 0;
        height: 184px;
        min-height: 0;
        margin-bottom: 0;
        padding: 11px 9px;
        overflow: hidden;
    }
    .dashboard-page .dashboard-chart-card .card-header {
        margin-bottom: 6px;
        font-size: 12px;
        white-space: nowrap;
    }
    .receive-dashboard #level-chart {
        height: 132px !important;
        gap: 2px !important;
        padding: 3px 0 !important;
        overflow: hidden;
    }
    .receive-dashboard #level-chart > .level-chart-column {
        height: 120px !important;
        grid-template-rows: 16px 1fr 14px !important;
    }
    .receive-dashboard .level-chart-value {
        height: 16px !important;
        line-height: 16px !important;
        font-size: 10px !important;
    }
    .receive-dashboard .level-chart-bar-area { margin: 0 !important; }
    .receive-dashboard .level-chart-label {
        height: 14px !important;
        line-height: 14px !important;
        font-size: 8px !important;
    }
    .receive-dashboard .level-chart-desktop { display: none !important; }
    .receive-dashboard .level-chart-mobile {
        display: flex !important;
        align-items: stretch;
        gap: 2px;
        width: 100%;
        height: 100%;
    }
    .receive-dashboard .level-chart-mobile-column {
        flex: 1;
        min-width: 0;
        height: 100%;
        display: grid;
        grid-template-rows: 16px 1fr 14px;
        text-align: center;
        cursor: pointer;
        overflow: hidden;
    }
    .receive-dashboard .level-chart-mobile-value {
        width: 100%;
        height: 16px;
        line-height: 16px;
        padding: 0 1px;
        font-size: 8px;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        letter-spacing: -0.45px;
    }
    .receive-dashboard .level-chart-mobile-bar-area {
        height: 100%;
        display: flex;
        align-items: flex-end;
        justify-content: center;
    }
    .receive-dashboard .level-chart-mobile-bar {
        width: calc(100% - 4px);
        max-width: 22px;
        min-height: 3px;
        border-radius: 3px 3px 0 0;
    }
    .receive-dashboard .level-chart-mobile-label {
        height: 14px;
        line-height: 14px;
        color: #5f6368;
        font-size: 8px;
        white-space: nowrap;
    }
    .receive-dashboard #recent-followups {
        max-height: 132px !important;
        overflow: hidden !important;
    }
    .receive-dashboard #recent-followups > div {
        padding: 4px 0 !important;
        font-size: 10px !important;
        line-height: 1.25;
    }
    .sales-dashboard #level-chart,
    .sales-dashboard #source-chart {
        max-height: 136px;
        overflow: hidden;
        padding: 2px 0 !important;
    }
    .sales-dashboard #level-chart > div,
    .sales-dashboard #source-chart > div {
        gap: 4px !important;
        margin-bottom: 5px !important;
        font-size: 10px !important;
    }
    .sales-dashboard #level-chart > div > span:first-child { width: 28px !important; }
    .sales-dashboard #source-chart > div > span:first-child {
        width: 62px !important;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 10px !important;
    }
    .dashboard-page .dashboard-quick-card { display: none; }
    .dashboard-page .dashboard-history-card {
        height: calc(100% - 4px);
        margin-bottom: 0;
        padding: 12px;
        overflow: hidden;
    }
    .dashboard-page .dashboard-history-card .card-header { margin-bottom: 8px; }
.dashboard-page .dashboard-history-card .table-wrap {
        max-height: calc(100% - 46px) !important;
        overflow: auto;
    }
}

/* 质检整改闭环 */
.qc-feedback-filter-card { margin-bottom: 14px; }
.qc-feedback-filter-card .text-filter-reset.active {
    color: var(--primary, #4d5bc7);
    font-weight: 700;
}
.qc-feedback-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}
.qc-feedback-item:first-child { padding-top: 0; }
.qc-feedback-item:last-child { border-bottom: 0; padding-bottom: 0; }
.qc-feedback-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.qc-feedback-customer {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text, #203b5b);
    text-decoration: none;
    font-weight: 700;
}
.qc-feedback-customer span { color: var(--primary, #4d5bc7); font-size: 12px; font-weight: 600; }
.qc-feedback-meta-row { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-top:10px; }
.qc-feedback-status, .qc-feedback-severity, .qc-feedback-tag, .qc-feedback-due, .qc-feedback-source {
    display:inline-flex; align-items:center; min-height:24px; padding:2px 8px; border-radius:999px; font-size:12px;
}
.qc-feedback-status { background:#eef1f5; color:#5e6b7c; font-weight:700; }
.qc-feedback-status.pending { background:#fff4df; color:#a35c00; }
.qc-feedback-status.read, .qc-feedback-status.reworking { background:#e8f1ff; color:#2662ad; }
.qc-feedback-status.reviewing { background:#eee9ff; color:#6341a4; }
.qc-feedback-status.closed { background:#e5f6ec; color:#247044; }
.qc-feedback-severity.pass { background:#edf7ef; color:#2f7d48; }
.qc-feedback-severity.improve { background:#fff4df; color:#a35c00; }
.qc-feedback-severity.urgent { background:#ffebeb; color:#b33b3b; }
.qc-feedback-tag { background:#f0f3f8; color:#526477; }
.qc-feedback-due { background:#fff7e8; color:#9a6214; }
.qc-feedback-source { margin-left:auto; background:#f7f8fa; color:#778497; }
.qc-feedback-label { margin-top:14px; color:var(--text-secondary, #718096); font-size:12px; font-weight:700; }
.qc-feedback-message { margin-top:8px; padding:10px 12px; background:#f8faff; border-left:3px solid #7186db; border-radius:0 8px 8px 0; }
.qc-feedback-message b { color:var(--text, #203b5b); font-size:13px; }
.qc-feedback-message span { margin-left:8px; color:#98a2b3; font-size:11px; }
.qc-feedback-message p { margin:5px 0 0; color:var(--text, #36485c); line-height:1.6; white-space:pre-wrap; }
.qc-feedback-response { margin-top:12px; padding:12px; background:#fbfcff; border:1px solid #e3e8f3; border-radius:10px; }
.qc-feedback-response textarea { width:100%; min-height:72px; resize:vertical; margin-bottom:8px; }
.qc-feedback-response-preview { margin-top:10px; padding:10px 12px; background:#f4fbf6; border-radius:8px; color:#356344; line-height:1.6; white-space:pre-wrap; }
.qc-feedback-delete-btn { color:#b33b3b; border-color:#e2a2a2; margin-top:10px; }
.qc-feedback-item.reviewing { background:linear-gradient(90deg, rgba(238,233,255,.35), transparent); }
.qc-feedback-item.pending { background:linear-gradient(90deg, rgba(255,244,223,.35), transparent); }

@media (max-width: 640px) {
    .qc-feedback-head { gap:8px; }
    .qc-feedback-head .qc-review-meta { line-height:1.45; }
    .qc-feedback-source { margin-left:0; }
    .qc-feedback-filter-card .text-filter-row { gap:12px; }
    .qc-feedback-filter-card .text-filter-reset { padding:5px 0; }
}

/* ==================== 2026 商务后台统一主题 ==================== */
:root {
    --primary: #245b9b;
    --primary-dark: #1b4678;
    --primary-soft: #e8f0f8;
    --success: #16805b;
    --warning: #b7791f;
    --danger: #bd4b4b;
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #102a43;
    --text-secondary: #60748a;
    --border: #d5e2ef;
    --shadow: 0 8px 24px rgba(16, 42, 67, .07);
    --shadow-lg: 0 16px 36px rgba(16, 42, 67, .12);
    --radius: 14px;
}

body {
    background: #f4f7fb;
    color: #102a43;
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

.navbar {
    min-height: 62px;
    background: rgba(255, 255, 255, .96);
    border-bottom-color: #d5e2ef;
    box-shadow: 0 2px 14px rgba(16, 42, 67, .06);
    backdrop-filter: blur(12px);
}

.navbar-brand,
.sales-shell .navbar-brand {
    color: #1b4678;
}

.navbar-nav a:hover,
.navbar-nav a.active,
.sales-shell .navbar-nav a.active {
    background: #e8f0f8;
    color: #245b9b;
}

.main-container {
    max-width: 1500px;
    padding: 28px 30px 52px;
}

.card,
.stat-card {
    border: 1px solid #d5e2ef;
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 24px rgba(16, 42, 67, .07);
}

.card:hover,
.stat-card.clickable:hover {
    border-color: #b8cee3;
    box-shadow: 0 16px 36px rgba(16, 42, 67, .12);
}

.card-header {
    color: #1b4678;
    font-weight: 750;
}

.stat-card .stat-num,
.sales-shell .stat-card .stat-num,
.sales-shell .stat-num-sm {
    color: #245b9b;
}

.btn-primary,
.sales-shell .btn-primary {
    background: #245b9b;
    box-shadow: 0 4px 10px rgba(36, 91, 155, .18);
}

.btn-primary:hover,
.sales-shell .btn-primary:hover {
    background: #1b4678;
}

.btn-success { background: #16805b; }
.btn-warning { background: #b7791f; }

.btn-outline {
    border-color: #cbdbea;
    color: #35536f;
    background: #fff;
}

.btn-outline:hover {
    border-color: #8fb0cf;
    background: #f4f8fc;
    color: #1b4678;
}

.table-wrap {
    border: 1px solid #d5e2ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 42, 67, .07);
}

table th {
    background: #f4f8fc;
    color: #35536f;
    font-weight: 750;
}

table td { border-bottom-color: #e8f0f8; }

.form-group input,
.form-group select,
.form-group textarea {
    border-color: #cbdbea;
    border-radius: 10px;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2f80ed;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, .14);
}

.pagination button.active {
    background: #245b9b;
    border-color: #245b9b;
}

.badge,
.qc-status-pill,
.qc-feedback-status,
.qc-feedback-severity,
.qc-feedback-tag,
.qc-feedback-due,
.qc-feedback-source {
    border-radius: 999px;
}

.workspace-switch {
    border-color: #cbdbea;
    color: #245b9b;
    background: #f4f8fc;
}

.workspace-switch:hover {
    border-color: #8fb0cf;
    background: #e8f0f8;
}

/* 跟进列表：固定姓名与操作区宽度，避免微信按钮随姓名长度乱跑 */
.followup-customer-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 168px;
}

.followup-customer-name {
    display: inline-block;
    flex: 0 0 4em;
    width: 4em;
    overflow: hidden;
    white-space: nowrap;
}

.followup-customer-action {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    flex: 0 0 100px;
    width: 100px;
    min-height: 24px;
}

.followup-customer-action .btn.btn-xs {
    min-width: 42px;
    min-height: 24px !important;
    height: 24px;
    padding: 1px 4px !important;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
    line-height: 1.1;
}

/* 全局按钮密度：统一减少标准按钮上下留白 */
.btn {
    min-height: 34px;
    padding: 6px 12px;
}

.btn-sm {
    min-height: 30px;
    padding: 5px 9px;
}

.btn-xs {
    min-height: 24px;
    padding: 2px 6px;
}

.wechat-status-disabled {
    background: #e5e7eb !important;
    color: #6b7280 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    pointer-events: none;
    opacity: .9;
}

.wechat-status-readonly {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border: 1px solid #d1d5db !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.wechat-status-admin-editable {
    background: #fff7e6 !important;
    color: #a45b00 !important;
    border: 1px solid #f3c98b !important;
    cursor: pointer !important;
}

.call-button-icon {
    color: #b42318;
    font-family: "Segoe UI Symbol", "Microsoft YaHei", sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    display: inline-block;
}

.contact-action-btn {
    width: 48px;
    min-width: 48px;
    height: 24px !important;
    min-height: 24px !important;
    padding: 1px 3px !important;
    justify-content: center;
    gap: 2px !important;
    line-height: 1.1;
    text-decoration: none !important;
}

.contact-action-btn,
.contact-action-btn:hover,
.contact-action-btn:focus,
.contact-action-btn:active,
.contact-action-btn * {
    text-decoration: none !important;
}

.contact-action-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
}

.call-active {
    background: #e65100 !important;
    color: #fff !important;
}

.call-tone-0 {
    background: #e8f1ff !important;
    border-color: #c7daf7 !important;
    color: #245b9b !important;
}

.call-tone-1 {
    background: #e8f7ef !important;
    border-color: #b8e0c8 !important;
    color: #16734b !important;
}

.call-tone-2 {
    background: #fff4e5 !important;
    border-color: #f3c98b !important;
    color: #a45b00 !important;
}

.call-tone-3 {
    background: #fdecec !important;
    border-color: #efb5b5 !important;
    color: #b42318 !important;
}

/* 跟进时间线紧凑布局：减少空白，保证较长内容仍能自然换行 */
.timeline {
    padding-left: 24px;
}

.timeline::before {
    left: 8px;
}

.timeline-item {
    padding: 8px 0;
    border-bottom: 1px solid #e8f0f8;
}

.timeline-item::before {
    left: -20px;
    top: 13px;
    width: 9px;
    height: 9px;
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.timeline-time {
    font-size: 11px;
    line-height: 1.25;
}

.timeline-head {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
    line-height: 1.3;
}

.timeline-head .timeline-time {
    flex: 0 0 auto;
    white-space: nowrap;
}

.timeline-follow-type {
    flex: 0 0 auto;
    color: #999;
    font-size: 11px;
    white-space: nowrap;
}

.timeline-content {
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.45;
}

.timeline-content > div {
    margin-top: 2px !important;
}

.timeline-content .btn.btn-xs {
    min-height: 24px;
    padding: 2px 6px !important;
    margin-left: 3px !important;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .timeline {
        padding-left: 22px;
    }

    .timeline::before {
        left: 7px;
    }

    .timeline-item {
        padding: 7px 0;
    }

    .timeline-item::before {
        left: -19px;
        top: 12px;
        width: 8px;
        height: 8px;
    }

    .timeline-content {
        font-size: 13px;
        line-height: 1.4;
    }
}

/* 跟进历史最终紧凑覆盖：短内容不再被拉成大块空白 */
.followup-history-inline .timeline-item,
#followup-list .timeline-item {
    min-height: 0 !important;
    height: auto !important;
    padding: 5px 0 !important;
}

.followup-history-inline .timeline-item::before,
#followup-list .timeline-item::before {
    top: 10px !important;
}

.followup-history-inline .timeline-head,
#followup-list .timeline-head {
    gap: 4px !important;
    line-height: 1.2 !important;
}

.followup-history-inline .timeline-content,
#followup-list .timeline-content {
    margin-top: 1px !important;
    line-height: 1.3 !important;
}

.followup-history-inline .timeline-content > div,
#followup-list .timeline-content > div {
    margin-top: 0 !important;
}

/* 手机端最终布局保护：允许页面完整滚动，避免首页和筛选栏被裁切 */
@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        min-width: 0;
    }

    body.dashboard-shell {
        height: auto !important;
        min-height: 100vh;
        min-height: 100svh;
        overflow-y: auto !important;
    }

    .dashboard-page {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    .dashboard-page .stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .dashboard-page .stat-card {
        min-width: 0;
        min-height: 0;
        padding: 12px 10px;
        overflow: visible;
    }

    .dashboard-page .stat-card .stat-label,
    .dashboard-page .stat-card .stat-sub {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .dashboard-page .stat-card .stat-agent-name {
        max-width: none;
    }

    .dashboard-page .dashboard-charts {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .dashboard-page .dashboard-chart-card {
        height: auto;
        min-height: 0;
        margin-bottom: 0;
        overflow: visible;
    }

    .dashboard-page .dashboard-history-card {
        height: auto;
        overflow: visible;
    }

    .dashboard-page .dashboard-history-card .table-wrap {
        max-height: 60vh !important;
        overflow: auto !important;
    }

    .dashboard-page .dashboard-quick-card {
        display: block;
    }

    .dashboard-page .receive-funnel-row,
    .dashboard-page .sales-funnel-row {
        grid-template-columns: minmax(58px, auto) minmax(0, 1fr) 36px;
        gap: 6px;
    }

    .navbar,
    .navbar-brand,
    .navbar-info {
        min-width: 0;
    }

    .navbar-info {
        display: flex;
        align-items: center;
        gap: 4px;
        overflow: hidden;
    }

    .navbar-info > span#current-user {
        max-width: 64px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .navbar-info > span[style*="margin"] {
        display: none;
    }

    .navbar-info > a {
        margin-left: 2px;
        font-size: 11px !important;
    }

    .mobile-workspace-switch {
        flex: 0 0 auto;
    }

    .list-toolbar-card .search-bar {
        flex-wrap: wrap !important;
        overflow: visible !important;
    }

    .list-toolbar-card .search-bar input {
        flex: 1 1 100% !important;
        width: 100%;
        min-width: 0 !important;
    }

    .list-toolbar-card .search-bar select {
        flex: 1 1 calc(50% - 4px) !important;
        min-width: 0 !important;
    }

    .list-toolbar-card .search-bar .btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .list-toolbar-card .filter-buttons {
        flex-wrap: wrap !important;
        overflow: visible !important;
    }

    .list-toolbar-card .filter-toggle {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
    }

    /* 看板重点车型：手机端改为上下两行，避免“总/已/待”被挤成半行 */
    .focus-followup-row {
        grid-template-columns: 1fr !important;
        gap: 2px !important;
        padding: 6px 0 !important;
        border-bottom: 1px solid var(--line-soft, #edf0f5);
    }
    .focus-followup-row:last-child { border-bottom: 0; }
    .focus-followup-row > span:first-child {
        font-size: 13px !important;
        font-weight: 650;
    }
    .focus-followup-row > span:last-child {
        justify-content: flex-start !important;
        gap: 8px !important;
        font-size: 13px !important;
        line-height: 1.45 !important;
    }

    /* 底部导航保持固定入口；其余功能统一收进“更多”，不再依赖横向滑动 */
    .bottom-tabbar {
        justify-content: stretch;
        overflow: hidden;
    }
    .bottom-tabbar a {
        flex: 1 1 0;
        min-width: 0;
        padding-left: 2px;
        padding-right: 2px;
        white-space: nowrap;
    }
    .bottom-tabbar .mobile-more-trigger {
        flex: 1 1 0;
        min-width: 0;
        border: 0;
        background: transparent;
        color: var(--text-secondary);
        font: inherit;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        padding: 0 2px;
        cursor: pointer;
    }
    .bottom-tabbar .mobile-more-trigger[aria-expanded="true"] { color: var(--primary); font-weight: 600; }
    .bottom-tabbar a span:last-child {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 两端移动客户卡片的操作按钮统一占满一行，避免和电话号码挤在一起 */
    .crm-mobile-card-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 9px;
    }
    .crm-mobile-card-actions .btn {
        flex: 1 1 calc(50% - 3px);
        min-width: 0;
        justify-content: center;
    }
}

.mobile-more-menu {
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(23, 32, 51, .18);
}
.mobile-more-panel {
    position: absolute;
    right: 10px;
    bottom: 62px;
    width: min(250px, calc(100vw - 20px));
    padding: 10px;
    border: 1px solid var(--line-soft, #e8ebf1);
    border-radius: 14px;
    background: var(--surface, #fff);
    box-shadow: var(--elevation-2, 0 14px 34px rgba(23,32,51,.16));
}
.mobile-more-title {
    padding: 5px 10px 8px;
    color: var(--ink-500, #778397);
    font-size: 12px;
    font-weight: 700;
}
.mobile-more-panel a {
    display: block;
    padding: 11px 10px;
    border-radius: 9px;
    color: var(--ink-800, #273247);
    text-decoration: none;
    font-size: 14px;
}
.mobile-more-panel a:active,
.mobile-more-panel a:hover { background: var(--active-brand-soft, #eef0ff); color: var(--active-brand-strong, #3d4aa9); }
.page-status { color: var(--ink-500, #778397); font-size: 12px; font-weight: 500; }
.page-status:not(:empty) { color: var(--danger, #dc4a4a); }
.detail-secondary-sections { display: grid; gap: 10px; margin-top: 18px; }
.detail-secondary-section { border: 1px solid var(--line-soft, #e8ebf1); border-radius: 12px; background: var(--surface, #fff); box-shadow: var(--elevation-1, 0 1px 2px rgba(23,32,51,.03)); overflow: hidden; }
.detail-secondary-section summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 0 15px; color: var(--ink-800, #273247); cursor: pointer; list-style: none; font-weight: 700; }
.detail-secondary-section summary::-webkit-details-marker { display: none; }
.detail-secondary-section summary::after { content: '＋'; color: var(--ink-500, #778397); font-size: 18px; font-weight: 400; }
.detail-secondary-section[open] summary::after { content: '−'; }
.detail-secondary-section summary > span:last-child { color: var(--ink-500, #778397); font-size: 12px; font-weight: 500; }
.detail-secondary-section summary a { color: var(--active-brand, #4d5bc7); text-decoration: none; }
.detail-secondary-body { padding: 0 15px 15px; border-top: 1px solid var(--line-soft, #e8ebf1); }
.detail-edit-actions .btn:disabled { cursor: wait; opacity: .68; }
.stats-mobile-list { display: none; }
.stats-mobile-card { padding: 13px; border: 1px solid var(--line-soft, #e8ebf1); border-radius: 12px; background: var(--surface, #fff); box-shadow: var(--elevation-1, 0 1px 2px rgba(23,32,51,.03)); }
.stats-mobile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stats-mobile-head a { color: var(--active-brand, #4d5bc7); text-decoration: none; }
.stats-mobile-head b { color: var(--success, #0f9f6e); font-size: 13px; }
.stats-mobile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; color: var(--ink-500, #778397); font-size: 12px; }
.stats-mobile-grid b { color: var(--ink-800, #273247); font-size: 14px; }
.stats-period-actions { display: flex; gap: 6px; align-items: flex-end; flex-wrap: wrap; }
.call-stats-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.call-stats-filters .form-group { flex: 1 1 150px; min-width: 140px; }
.call-stats-filters .form-group select,
.call-stats-filters .form-group input { width: 100%; }
.stats-period-actions .btn.active { background: var(--active-brand); border-color: var(--active-brand); color: #fff; }
@media (max-width: 768px) {
    .detail-edit-actions { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px !important; }
    .detail-edit-actions .btn { min-height: 40px; width: 100%; justify-content: center; }
    .call-stats-table-wrap { display: none; }
    .stats-mobile-list { display: grid; gap: 9px; margin-top: 12px; }
    .stats-period-actions { width: 100%; }
    .stats-period-actions .btn { flex: 1 1 0; }
    .call-stats-page .call-summary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
    .call-stats-page .call-summary-row .stat-card:last-child { grid-column: 1 / -1; }
    .call-stats-card { margin-top: 0 !important; padding: 14px !important; }
    .call-stats-card .card-header { display: block; margin-bottom: 14px; line-height: 1.45; }
    .call-stats-card .card-header #stats-status { display: block; margin-top: 5px; }
    .call-stats-filters { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px !important; align-items: stretch !important; }
    .call-stats-filters .form-group { min-width: 0; width: auto; }
    .call-stats-filters .form-group label { display: block; margin-bottom: 5px; font-size: 12px; }
    .call-stats-filters .form-group select,
    .call-stats-filters .form-group input { width: 100%; min-height: 42px; }
    .call-stats-filters .stats-period-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; width: 100%; }
    .call-stats-filters .stats-period-actions .btn { min-height: 42px; padding: 7px 4px; }
    .call-stats-card .stats-mobile-list { margin-top: 10px; }
    .call-stats-card .stats-mobile-card { padding: 12px; }
    .watermark::after { font-size: 38px; color: rgba(0,0,0,0.022); letter-spacing: 24px; }
}

/* 顶部导航收敛：主任务保留在导航栏，低频功能放入“更多”菜单。 */
.navbar { gap: 10px; }
.navbar-brand { flex: 0 0 auto; }
.global-search-trigger { flex: 0 0 auto; }
.navbar-nav { flex: 1 1 auto; min-width: 0; justify-content: center; align-items: center; }
.navbar-more { position: relative; flex: 0 0 auto; }
.navbar-more > summary { display: flex; align-items: center; gap: 4px; padding: 9px 11px; border-radius: 9px; color: var(--ink-600); font-size: 13px; font-weight: 650; cursor: pointer; list-style: none; white-space: nowrap; }
.navbar-more > summary::-webkit-details-marker { display: none; }
.navbar-more > summary::after { content: '⌄'; color: var(--ink-500); font-size: 12px; }
.navbar-more > summary:hover,
.navbar-more > summary.active,
.navbar-more[open] > summary { background: var(--active-brand-soft); color: var(--active-brand-strong); }
.navbar-more-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 300; display: grid; min-width: 148px; padding: 6px; border: 1px solid var(--line-soft); border-radius: 11px; background: rgba(255,255,255,.98); box-shadow: 0 14px 32px rgba(23,32,51,.14); }
.navbar-more-menu a { display: block; padding: 8px 10px; border-radius: 7px; color: var(--ink-600); font-size: 12px; white-space: nowrap; text-decoration: none; }
.navbar-more-menu a:hover,
.navbar-more-menu a.active { background: var(--active-brand-soft); color: var(--active-brand-strong); }
.sales-shell .navbar-more > summary.active,
.sales-shell .navbar-more[open] > summary,
.sales-shell .navbar-more-menu a:hover,
.sales-shell .navbar-more-menu a.active { background: #fff1e8; color: var(--sales-strong); }
@media (max-width: 1180px) and (min-width: 769px) {
    .navbar { padding-left: 18px; padding-right: 18px; gap: 6px; }
    .navbar-nav { gap: 2px; }
    .navbar-nav > a { padding-left: 8px; padding-right: 8px; font-size: 12px; }
    .navbar-info > span#current-user { max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 768px) {
    .navbar-more { display: none; }
}
