/* ==================== 基础样式 ==================== */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==================== 登录页（背景渐变 + 中间双卡片） ==================== */
.login-page {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    /* 默认渐变背景，可通过后台修改 */
    background: linear-gradient(135deg, #a8c8f8 0%, #c5d8f5 30%, #f5e8d0 70%, #f5d0a0 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 全屏背景图（后台可换）覆盖在渐变上 */
.login-bg-img {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* 中间双卡片容器 */
.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    max-width: 900px;
    width: 90%;
    min-height: 480px;
}

/* 左侧图片卡 */
.login-left {
    flex: 1;
    position: relative;
    background: #e8f0ff;
    overflow: hidden;
    min-width: 0;
}

.login-left-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 右侧登录表单卡 */
.login-right {
    width: 380px;
    min-width: 380px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
}

.login-form-wrapper {
    width: 100%;
}

.login-form-header {
    margin-bottom: 32px;
}

.login-form-header h1 {
    margin-bottom: 6px;
    line-height: 1.2;
}

.login-form-header p {
    color: #999;
    font-size: 13px;
}

.login-form-header h1 .login-title-main {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #888;
}

.login-form-header h1 .login-title-sub {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin-top: 2px;
}

/* 表单输入框 */
.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-group label {
    display: block;
    color: #555;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 500;
}

.login-form .form-group input[type="text"],
.login-form .form-group input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: #f8f9ff;
    transition: border-color 0.3s, box-shadow 0.3s;
    color: #333;
}

.login-form .form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

/* 密码输入框包装 */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 45px !important;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #bbb;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.password-toggle:hover { color: #667eea; }

/* 记住登录 */
.form-group-inline {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 6px;
}

.checkbox-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #667eea;
    cursor: pointer;
}

.checkbox-label span {
    color: #666;
    font-size: 13px;
}

/* 登录按钮 */
.btn-login {
    width: 100%;
    padding: 13px;
    background: #4a7ff7;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
    letter-spacing: 4px;
}

.btn-login:hover {
    background: #3a6fe7;
    box-shadow: 0 4px 15px rgba(74,127,247,0.4);
    transform: translateY(-1px);
}

.btn-login:active { transform: translateY(0); }

.error-msg {
    color: #e74c3c;
    margin-top: 12px;
    font-size: 13px;
    text-align: center;
    min-height: 18px;
}

/* ==================== 通用按钮 ==================== */
.btn-primary {
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    padding: 8px 20px;
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #f5f5f5;
}

.btn-danger {
    padding: 8px 20px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-text {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 14px;
}

.btn-text:hover {
    text-decoration: underline;
}

.btn-follow {
    font-weight: 700;
    color: #1890ff;
}

/* 褐红色编辑按钮（列表操作列） */
.btn-edit-brown {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 5px 12px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    transition: all 0.3s !important;
}

.btn-edit-brown:hover {
    background: linear-gradient(135deg, #A0522D 0%, #CD853F 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.4);
}

/* 绿色详情按钮（列表操作列） */
.btn-detail-green {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 5px 12px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
}

.btn-detail-green:hover {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.4);
}

/* 正红色签单按钮（列表操作列） */
.btn-sign-red {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 5px 12px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
}

.btn-sign-red:hover {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

/* ==================== 主应用布局 ==================== */
.main-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.top-nav {
    height: 50px;
    background: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-left h2 {
    line-height: 1.2;
}

.nav-left h2 .nav-title-main {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #999;
}

.nav-left h2 .nav-title-sub {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    margin-top: 1px;
}

.user-info {
    color: #999;
    font-size: 13px;
}

.nav-right {
    display: flex;
    gap: 5px;
}

.sidebar {
    width: 200px;
    background: #fff;
    position: fixed;
    top: 50px;
    left: 0;
    bottom: 0;
    border-right: 1px solid #eee;
    overflow-y: auto;
}

.sidebar nav {
    padding: 10px 0;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #f5f5f5;
    color: #667eea;
}

.nav-item.active {
    background: #f0f0ff;
    color: #667eea;
    border-left-color: #667eea;
}

.nav-item i {
    margin-right: 8px;
}

.content {
    margin-left: 200px;
    margin-top: 50px;
    padding: 20px;
    min-height: calc(100vh - 50px);
}

/* ==================== 通用组件 ==================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h3 {
    font-size: 18px;
    color: #333;
}

.search-bar {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.search-bar input,
.search-bar select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
}

.search-bar input[type="text"] {
    min-width: 150px;
}

.data-table {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
}

th:last-child, td:last-child {
    border-right: none;
}

th {
    background: #fafafa;
    font-weight: 500;
    color: #666;
    font-size: 13px;
}

tr:hover {
    background: #fafafa;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 15px;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== 分页工具栏 ==================== */
.pagination-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-top: 15px;
}

.pagination-toolbar .pagination {
    padding: 0;
    margin: 0;
}

.pagination-info {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}

.pagination-info strong {
    color: #333;
    font-weight: 600;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.page-size-wrap {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-size-wrap select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    color: #333;
}

/* 跳转页码 */
.jump-wrap {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.jump-input {
    width: 46px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    color: #333;
}

.jump-btn {
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f5f5f5;
    color: #333;
    font-size: 12px;
    cursor: pointer;
}

.jump-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

/* ==================== 弹窗 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 16px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ==================== 表单 ==================== */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 13px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group textarea {
    min-height: 36px;
    height: auto;
    resize: none;
    overflow: hidden;
    line-height: 1.4;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

/* ==================== Toast ==================== */
.toast {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 10px 25px;
    border-radius: 5px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background: #27ae60;
}

.toast.error {
    background: #e74c3c;
}

/* ==================== 标签 ==================== */
.tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.tag-primary {
    background: #e8e8ff;
    color: #667eea;
}

.tag-success {
    background: #d4edda;
    color: #28a745;
}

.tag-warning {
    background: #fff3cd;
    color: #ffc107;
}

.tag-info {
    background: #d1ecf1;
    color: #17a2b8;
}

/* ==================== 统计卡片 ==================== */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat-card .label {
    color: #999;
    font-size: 13px;
    margin-bottom: 5px;
}

.stat-card .value {
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.stat-card .sub {
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

/* ==================== 工作台统计区域 ==================== */
.dash-section {
    transition: box-shadow 0.2s;
}
.dash-section:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
}
.dash-badge {
    font-weight: bold;
}
.dash-section-header:hover {
    opacity: 0.9;
}
.dash-sub-section {
    transition: background 0.2s;
}
.dash-sub-section:hover {
    background: #fafafa !important;
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state img {
    width: 120px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* ==================== 跟进记录 ==================== */
.follow-list {
    background: #fff;
    border-radius: 8px;
}

.follow-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.follow-item:last-child {
    border-bottom: none;
}

.follow-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
    color: #999;
}

.follow-content {
    color: #333;
    line-height: 1.6;
}

.follow-attachments {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.follow-attachment {
    padding: 5px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 12px;
}

/* ==================== 跟进表单样式 ==================== */

/* 跟进弹窗客户信息 */
.follow-customer-info {
    background: #f0f7ff;
    border: 1px solid #bae7ff;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
}

.follow-customer-info .info-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.follow-customer-info .info-label {
    color: #666;
    font-size: 13px;
    white-space: nowrap;
    min-width: 60px;
}

.follow-customer-info .info-value {
    color: #333;
    font-size: 13px;
    font-weight: 500;
}

.follow-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.follow-section-header h4 {
    margin: 0;
}

.btn-follow {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
}

.btn-follow:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.4);
}

.follow-form .form-group {
    margin-bottom: 12px;
}

.follow-toolbar {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    padding: 6px;
    background: #f5f5f5;
    border-radius: 6px;
}

.btn-toolbar-follow {
    background: #fff;
    border: 1px solid #e8e8e8;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-toolbar-follow:hover {
    border-color: #1890ff;
    background: #e6f7ff;
}

.btn-toolbar-follow.recording {
    background: #ff4d4f;
    border-color: #ff4d4f;
    color: #fff;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.follow-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.follow-textarea:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 表情选择器 */
.emoji-picker {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-height: 180px;
    overflow-y: auto;
}

.emoji-btn {
    background: none;
    border: none;
    font-size: 20px;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.emoji-btn:hover {
    background: #f0f0f0;
}

/* 语音状态 */
.voice-status {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff1f0;
    border: 1px solid #ffccc7;
    border-radius: 4px;
    font-size: 13px;
    color: #ff4d4f;
}

.voice-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ff4d4f;
    border-radius: 50%;
    margin-right: 6px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* 附件列表 */
.attachment-list {
    margin-top: 8px;
}

.attachment-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    margin-bottom: 6px;
}

.attachment-icon {
    font-size: 24px;
    margin-right: 10px;
}

.attachment-info {
    flex: 1;
    min-width: 0;
}

.attachment-name {
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-progress {
    font-size: 12px;
    color: #52c41a;
    margin-top: 2px;
}

.attachment-progress.error {
    color: #ff4d4f;
}

.attachment-remove {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    margin-left: 8px;
}

.attachment-remove:hover {
    color: #ff4d4f;
}

/* 跟进记录附件显示 */
.follow-attachments {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.attachment-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    transition: all 0.2s;
}

.attachment-link:hover {
    background: #e6f7ff;
    border-color: #1890ff;
    color: #1890ff;
}

.attachment-link .att-icon {
    margin-right: 6px;
    font-size: 16px;
}

.attachment-link .att-name {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.att-del-btn {
    margin-left: 8px;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.att-del-btn:hover {
    opacity: 1;
    color: #ff4d4f;
}

/* ==================== 多文件上传样式 ==================== */
.file-field-wrapper {
    padding: 12px;
    border: 1px dashed #d9d9d9;
    border-radius: 8px;
    background: #fafafa;
}

.uploaded-files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.uploaded-file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    transition: all 0.2s;
}

.uploaded-file-item:hover {
    border-color: #1890ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
}

.uploaded-file-item.temp-file {
    opacity: 0.7;
    border-style: dashed;
}

.file-preview-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.file-preview-img:hover {
    transform: scale(1.05);
}

.file-icon-large {
    font-size: 40px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 4px;
}

.uploaded-file-info {
    margin-top: 6px;
    text-align: center;
    width: 100%;
}

.uploaded-file-name {
    font-size: 11px;
    color: #666;
    display: block;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.uploaded-file-name.upload-failed {
    color: #ff4d4f;
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-all;
}

.uploaded-file-actions {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 4px;
}

.file-action-btn {
    font-size: 11px;
    color: #1890ff;
    cursor: pointer;
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s;
}

.file-action-btn:hover {
    background: #e6f7ff;
}

.file-action-delete {
    color: #ff4d4f;
}

.file-action-delete:hover {
    background: #fff1f0;
}

.file-add-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-multiple-input {
    display: none;
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-upload:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.file-hint {
    font-size: 12px;
    color: #999;
}

.file-uploading {
    font-size: 11px;
    color: #1890ff;
}

/* 详情页文件列表样式 */
.detail-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-file-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 12px;
}

.detail-file-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.detail-file-thumb:hover {
    transform: scale(1.1);
}

.detail-file-icon {
    font-size: 20px;
}

.detail-file-name {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #666;
}

.detail-file-link {
    color: #1890ff;
    font-size: 12px;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s;
}

.detail-file-link:hover {
    background: #e6f7ff;
    color: #40a9ff;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    /* ---------- 登录页 ---------- */
    .login-container {
        flex-direction: column;
        width: 92%;
        min-height: unset;
        border-radius: 12px;
    }
    .login-left {
        display: none; /* 手机上隐藏左侧宣传图 */
    }
    .login-right {
        width: 100%;
        min-width: unset;
        padding: 36px 28px 32px;
    }
    .login-form-header h1 .login-title-main { font-size: 12px; }
    .login-form-header h1 .login-title-sub  { font-size: 20px; }

    /* ---------- 顶部导航 ---------- */
    .top-nav {
        padding: 0 14px;
        height: 50px;
    }
    .nav-left h2 .nav-title-main { display: none; }
    .nav-left h2 .nav-title-sub  { font-size: 15px; }
    .user-info { display: none; }      /* 顶部用户名在小屏隐藏 */
    .nav-right .btn-text { padding: 5px 8px; font-size: 13px; }

    /* 汉堡菜单按钮 */
    .hamburger-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px; height: 36px;
        background: none;
        border: none;
        cursor: pointer;
        margin-right: 8px;
        flex-shrink: 0;
    }
    .hamburger-btn span,
    .hamburger-btn span::before,
    .hamburger-btn span::after {
        display: block;
        width: 20px;
        height: 2px;
        background: #667eea;
        border-radius: 2px;
        position: relative;
        transition: all 0.3s;
    }
    .hamburger-btn span::before,
    .hamburger-btn span::after {
        content: '';
        position: absolute;
        left: 0;
    }
    .hamburger-btn span::before { top: -6px; }
    .hamburger-btn span::after  { top:  6px; }

    /* ---------- 侧边栏（抽屉式） ---------- */
    .sidebar {
        display: block !important;
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 240px;
        z-index: 500;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 16px rgba(0,0,0,0.12);
        overflow-y: auto;
    }
    .sidebar.open {
        transform: translateX(0);
    }

    /* 蒙层 */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 499;
    }
    .sidebar-overlay.show { display: block; }

    /* 侧边栏顶部用户信息 */
    .sidebar-user-bar {
        display: flex !important;
        align-items: center;
        padding: 16px 20px 12px;
        border-bottom: 1px solid #eee;
        background: #f8f9ff;
        gap: 10px;
    }
    .sidebar-user-bar .sub-name {
        font-size: 14px;
        font-weight: 600;
        color: #333;
    }
    .sidebar-user-bar .sub-role {
        font-size: 12px;
        color: #999;
    }

    /* ---------- 内容区 ---------- */
    .content {
        margin-left: 0;
        margin-top: 50px;
        padding: 14px 12px;
    }

    /* ---------- 页面标题行 ---------- */
    .page-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    .page-header h3 { font-size: 16px; }

    /* ---------- 搜索栏 ---------- */
    .search-bar {
        padding: 12px;
        gap: 8px;
    }
    .search-bar input,
    .search-bar select {
        flex: 1 1 calc(50% - 4px);
        min-width: 100px;
    }
    .search-bar .btn-primary,
    .search-bar .btn-secondary {
        flex: 1 1 calc(50% - 4px);
    }

    /* ---------- 数据表格 → 手机端卡片模式 ---------- */
    .data-table {
        overflow: visible;
        box-shadow: none;
        background: transparent;
        border: none;
    }
    .data-table table { width: 100%; display: block; }
    .data-table thead { display: none; }
    .data-table tbody { display: block; }

    /* 每个客户 = 一张独立卡片 */
    .data-table tr {
        display: block;
        background: #fff;
        border-radius: 14px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06);
        margin-bottom: 14px;
        padding: 0;
        overflow: hidden;
        border: 1px solid #f0f0f0;
    }

    /* 姓名行 → 卡片渐变色标题 */
    .data-table td[data-col-key="name"] {
        display: block;
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: #fff;
        padding: 14px 16px;
        font-size: 16px;
        font-weight: 700;
        text-align: left;
    }
    .data-table td[data-col-key="name"] a {
        color: #fff !important;
        text-decoration: none !important;
        font-weight: 700;
        font-size: 16px;
    }
    .data-table td[data-col-key="name"]::before { display: none; }

    /* 数据行 ← 标签:值 左右排列，统一左对齐 */
    .data-table td:not([data-col-key="name"]):not([data-col-key="actions"]):not([data-col-key="checkbox"]) {
        display: flex;
        align-items: flex-start;
        padding: 8px 16px;
        font-size: 13px;
        color: #333;
        text-align: left;
        gap: 10px;
        border-bottom: 1px solid #f8f8f8;
        word-break: break-all;
        flex-wrap: wrap;
    }
    .data-table td:not([data-col-key="name"]):not([data-col-key="actions"]):not([data-col-key="checkbox"])::before {
        content: attr(data-label);
        flex-shrink: 0;
        min-width: 56px;
        font-size: 12px;
        color: #999;
        padding-top: 1px;
    }

    /* 隐藏复选框和ID列 */
    .data-table td[data-col-key="checkbox"],
    .data-table td[data-col-key="id"] { display: none !important; }

    /* 空单元格隐藏 */
    .data-table td:empty { display: none; }

    /* 操作按钮行 */
    .data-table td[data-col-key="actions"] {
        display: block;
        padding: 12px 16px;
        background: #fafbfc;
        border-top: 1px solid #eee;
    }
    .data-table td[data-col-key="actions"]::before { display: none; }

    /* 操作按钮重排 */
    .action-btns {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
    }
    .action-btns button,
    .action-btns .btn-text {
        padding: 7px 14px;
        font-size: 12px;
        border-radius: 6px;
        min-height: 34px;
        border: 1px solid #e0e0e0;
        background: #fff;
        color: #555;
        white-space: nowrap;
    }
    .action-btns .btn-detail-green { background: #52c41a; color: #fff; border-color: #52c41a; }
    .action-btns .btn-follow { background: #1890ff; color: #fff; border-color: #1890ff; }
    .action-btns .btn-edit-brown { background: #fa8c16; color: #fff; border-color: #fa8c16; }
    .action-btns .btn-sign-red { background: #ff4d4f; color: #fff; border-color: #ff4d4f; }
    .action-btns .btn-primary { background: #667eea; color: #fff; border-color: #667eea; }

    /* ---------- 分页 ---------- */
    .pagination {
        flex-wrap: wrap;
        padding: 10px 0;
        gap: 4px;
    }
    .pagination button {
        padding: 5px 10px;
        font-size: 12px;
    }

    /* ---------- 分页工具栏 ---------- */
    .pagination-toolbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 12px;
        gap: 10px;
    }
    .pagination-info {
        font-size: 12px;
        white-space: normal;
    }
    .pagination-controls {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }
    .page-size-wrap {
        font-size: 12px;
    }
    .page-size-wrap select {
        font-size: 12px;
        padding: 3px 6px;
    }
    .pagination-toolbar .pagination {
        flex-wrap: wrap;
        gap: 3px;
    }
    .pagination-toolbar .pagination button {
        padding: 4px 8px;
        font-size: 11px;
    }

    .jump-wrap {
        font-size: 12px;
        white-space: nowrap;
    }
    .jump-input {
        width: 36px;
        padding: 3px 4px;
        font-size: 12px;
    }
    .jump-btn {
        padding: 3px 8px;
        font-size: 11px;
    }

    /* ---------- 弹窗 ---------- */
    .modal-box {
        width: 96%;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 10px;
    }
    .modal-header { padding: 14px 16px; }
    .modal-body   { padding: 14px 16px; }
    .modal-footer { padding: 12px 16px; gap: 8px; }
    .modal-footer .btn-primary,
    .modal-footer .btn-secondary {
        flex: 1;
        text-align: center;
        padding: 10px;
    }

    /* ---------- 表单（双列 → 单列） ---------- */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .customer-form-grid .form-row {
        flex-direction: column;
    }
    .form-group { margin-bottom: 14px; }
    .form-group label { font-size: 13px; }
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px !important; /* 防止 iOS 自动放大 */
    }

    /* ---------- 统计卡片 ---------- */
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .stat-card { padding: 14px; }
    .stat-card .value { font-size: 22px; }

    /* ---------- 跟进记录 ---------- */
    .follow-item { padding: 12px; }
    .follow-meta { flex-wrap: wrap; gap: 6px; font-size: 12px; }
    .follow-attachments { flex-wrap: wrap; }
    .attachment-link { max-width: 100%; }
    .attachment-link .att-name { max-width: 120px; }

    /* ---------- 筛选提示 ---------- */
    .filter-hint { font-size: 12px; padding: 8px 12px; }

    /* ---------- 客户详情弹窗 ---------- */
    .detail-grid { grid-template-columns: 1fr !important; }

    /* ---------- 按钮通用 ---------- */
    .btn-primary, .btn-secondary { padding: 8px 14px; }
    .btn-sm { padding: 4px 8px; font-size: 11px; }

    /* ---------- Toast ---------- */
    .toast { top: auto !important; bottom: 20px; left: 5% !important; right: 5% !important; transform: none !important; max-width: 90%; font-size: 13px; padding: 10px 16px; border-radius: 8px; white-space: normal; word-break: break-word; text-align: center; }
}

/* 极小屏幕额外优化（iPhone SE等） */
@media (max-width: 480px) {
    .stats-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card .value { font-size: 20px; }
    .page-header .btn-primary { padding: 7px 12px; font-size: 13px; }
    .search-bar input, .search-bar select {
        flex: 1 1 100%;
    }
    .nav-left h2 .nav-title-sub { font-size: 14px; }
}

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}


/* ==================== 居中查重区域 ==================== */
.dup-center-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    min-height: 400px;
}

.dup-center-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.12);
    padding: 48px 56px;
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.dup-center-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.dup-center-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.dup-center-desc {
    font-size: 14px;
    color: #999;
    margin-bottom: 32px;
}

.dup-center-form {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.dup-center-input {
    flex: 1;
    max-width: 360px;
    height: 48px;
    padding: 0 20px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: all 0.2s;
    text-align: center;
}

.dup-center-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.dup-center-btn {
    height: 48px;
    padding: 0 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.dup-center-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

.dup-center-btn:active {
    transform: translateY(0);
}

.dup-center-result {
    text-align: left;
}

.dup-center-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    margin: 20px auto;
    border-radius: 2px;
}

.dup-center-sep {
    font-size: 22px;
    font-weight: 700;
    color: #aaa;
    padding: 0 8px;
    line-height: 48px;
}

.dup-center-input-sm {
    max-width: 100px !important;
    text-align: center;
}

/* 不重复 */
.dup-center-ok {
    text-align: center;
    padding: 32px 0;
}

.dup-center-ok-icon {
    font-size: 64px;
    margin-bottom: 12px;
}

.dup-center-ok-text {
    font-size: 20px;
    font-weight: 600;
    color: #27ae60;
}

/* 重复 */
.dup-center-warn {
    text-align: center;
    padding: 24px 0 16px;
}

.dup-center-warn-icon {
    font-size: 52px;
    margin-bottom: 8px;
}

.dup-center-warn-text {
    font-size: 20px;
    font-weight: 600;
    color: #e74c3c;
}

.dup-center-result-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dup-center-result-card {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 16px 20px;
    background: #fafafa;
    text-align: left;
}

.dup-center-result-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.dup-center-result-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.dup-center-result-badge {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
}

.dup-center-result-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    font-size: 13px;
    color: #666;
}

.dup-center-result-info span {
    white-space: nowrap;
}

/* 加载中 */
.dup-center-loading {
    text-align: center;
    padding: 24px;
    color: #999;
    font-size: 15px;
}

/* 错误 */
.dup-center-error {
    text-align: center;
    padding: 24px;
    color: #e74c3c;
    font-size: 15px;
}

/* 联系方式标签 */
.dup-center-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #e8f0ff;
    color: #4a7ff7;
    border-radius: 4px;
    font-size: 12px;
    margin: 0 2px;
}

/* ==================== 辅助类 ==================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: #999;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

.action-btns {
    display: flex;
    gap: 5px;
}

/* 筛选结果提示 */
.filter-hint {
    background: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    color: #e74c3c;
    font-size: 13px;
}

/* 多字段输入 */
.multi-field {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.multi-field-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.multi-field-item input {
    width: 130px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.multi-field-item .remove-btn {
    color: #e74c3c;
    cursor: pointer;
    font-size: 16px;
}

/* 客户详情 */
.customer-detail {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 14px;
    border-left: 3px solid #667eea;
    padding-left: 8px;
}

.detail-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row .label {
    width: 100px;
    color: #999;
}

.detail-row .value {
    flex: 1;
}

/* 日志列表 */
.log-item {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.log-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.log-user {
    color: #667eea;
    font-weight: 500;
}

.log-time {
    color: #999;
    font-size: 12px;
}

.log-action {
    color: #333;
}

.log-detail {
    color: #666;
    font-size: 12px;
    background: #f9f9f9;
    padding: 8px;
    border-radius: 4px;
    margin-top: 5px;
}

/* ==================== 签单操作记录 ==================== */
.contract-logs-section {
    margin-top: 20px;
}

.contract-logs-list {
    margin-top: 12px;
}

.contract-log-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.contract-log-item:last-child {
    border-bottom: none;
}

.contract-log-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.contract-log-action {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.contract-log-action.create {
    background: #e6f7e6;
    color: #389e0d;
}

.contract-log-action.update {
    background: #e6f4ff;
    color: #096dd9;
}

.contract-log-action.cancel {
    background: #fff1f0;
    color: #cf1322;
}

.contract-log-user {
    color: #666;
    font-size: 13px;
}

.contract-log-time {
    color: #999;
    font-size: 12px;
    margin-left: auto;
}

.contract-log-changes {
    padding-left: 8px;
    border-left: 2px solid #e8e8e8;
}

.contract-log-change-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    font-size: 13px;
    flex-wrap: wrap;
}

.log-change-field {
    color: #666;
    min-width: 80px;
    font-weight: 500;
}

.log-change-arrow {
    color: #999;
    font-size: 12px;
}

.log-change-old {
    color: #999;
    text-decoration: line-through;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-change-new {
    color: #333;
    font-weight: 500;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 树形组织架构 */
.org-tree {
    padding: 10px;
}

.org-node {
    margin-left: 20px;
    margin-top: 10px;
}

.org-node-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 5px;
    cursor: pointer;
}

.org-node-label:hover {
    background: #e8e8ff;
}

.org-children {
    margin-left: 25px;
    border-left: 1px dashed #ddd;
    padding-left: 10px;
}


/* 必填标记红色 */
.required {
    color: #e74c3c !important;
    font-weight: bold;
    margin-right: 4px;
}

/* 小号红色非加粗必填（用于标签行内） */
.required-small {
    color: #e74c3c;
    font-weight: normal;
    font-size: 12px;
    margin-left: 4px;
}

/* 红色必填全宽提示（独立成行） */
.required-note-full {
    color: #e74c3c;
    font-size: 12px;
    font-weight: normal;
    padding: 6px 0;
}

/* 客户表单两列布局 */
.customer-form-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.customer-form-grid .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.customer-form-grid .form-col {
    flex: 1;
}

.customer-form-grid .form-col-full {
    flex: 1;
}

.customer-form-grid .form-group {
    margin-bottom: 0;
}

.customer-form-grid .form-group label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-size: 13px;
    font-weight: 500;
}

.customer-form-grid .form-group input,
.customer-form-grid .form-group select,
.customer-form-grid .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    background: #fafafa;
}

.customer-form-grid .form-group input:focus,
.customer-form-grid .form-group select:focus,
.customer-form-grid .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.customer-form-grid .form-group textarea {
    min-height: 36px;
    height: auto;
    resize: none;
    overflow: hidden;
    line-height: 1.4;
}

/* 提示文字 */
.customer-form-grid .hint {
    color: #999;
    font-weight: normal;
    font-size: 12px;
}

/* 多字段输入框（新版） */
.multi-field-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.multi-field-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.multi-field-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: #fafafa;
}

.multi-field-row input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove {
    background: #fee;
    color: #e74c3c;
}

.btn-remove:hover {
    background: #fdd;
}


/* ==================== 操作记录弹窗 ==================== */
.log-modal-list {
    max-height: 520px;
    overflow-y: auto;
    padding: 0 4px;
}

/* 旧版单条 item（保留兼容） */
.log-modal-item {
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}
.log-modal-item:last-child {
    border-bottom: none;
}

/* 新版分组卡片 */
.log-modal-group {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.log-modal-group:last-child {
    margin-bottom: 0;
}

.log-modal-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

/* 操作类型徽章 */
.log-action-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.log-action-create {
    background: #e8f5e9;
    color: #27ae60;
    border: 1px solid #a5d6a7;
}
.log-action-edit {
    background: #fff3e0;
    color: #e67e22;
    border: 1px solid #ffcc80;
}
.log-action-follow {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #90caf9;
}
.log-action-status {
    background: #fce4ec;
    color: #c2185b;
    border: 1px solid #f48fb1;
}

/* 下拉选项编辑器 */
.options-editor {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
    background: #fafafa;
    max-height: 300px;
    overflow-y: auto;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: grab;
    transition: box-shadow 0.2s;
}

.option-item:last-child {
    margin-bottom: 0;
}

.option-item:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.option-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.option-drag {
    color: #bbb;
    font-size: 14px;
    cursor: grab;
    user-select: none;
    padding: 0 2px;
}

.option-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.option-input:focus {
    border-color: #667eea;
}

.option-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #666;
}

.option-btn:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #999;
}

.option-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.option-del {
    color: #e74c3c;
    border-color: #f5c6cb;
}

.option-del:hover:not(:disabled) {
    background: #f8d7da;
    border-color: #e74c3c;
}

.log-modal-operator {
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.log-modal-time {
    color: #aaa;
    font-size: 12px;
    margin-left: auto;
}

.log-modal-content {
    font-size: 13px;
    line-height: 2;
    color: #555;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    padding: 2px 0;
    border-top: 1px dashed #f5f5f5;
}
.log-modal-content:first-of-type {
    border-top: none;
}

.log-modal-field {
    color: #667eea;
    font-weight: 600;
    white-space: nowrap;
}
.log-modal-colon {
    color: #aaa;
    margin-right: 4px;
}
.log-modal-arrow {
    color: #bbb;
    font-size: 13px;
    margin: 0 2px;
}

/* 旧版 old/new（保留兼容） */
.log-modal-old {
    color: #e74c3c;
    text-decoration: line-through;
    opacity: 0.7;
}
.log-modal-new {
    color: #27ae60;
    font-weight: 600;
}

/* ---- 字符级差异高亮 ---- */
/* 差异容器 */
.log-diff-block {
    display: inline;
    word-break: break-all;
}
.log-diff-block-old {
    background: #fff5f5;
    border-radius: 3px;
    padding: 0 3px;
}
.log-diff-block-new {
    background: #f0fff4;
    border-radius: 3px;
    padding: 0 3px;
}

/* 相同字符 - 黑色 */
.log-diff-same {
    color: #333;
}

/* 删除部分 - 红色删除线 */
.log-diff-del {
    color: #e74c3c;
    text-decoration: line-through;
    font-weight: 600;
}

/* 新增部分 - 绿色加粗 */
.log-diff-add {
    color: #27ae60;
    font-weight: 700;
}

/* 空值占位 */
.log-diff-empty {
    color: #ccc;
    font-style: italic;
    font-size: 12px;
}




.btn-add-field {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: none;
    border: 1px dashed #ddd;
    border-radius: 6px;
    color: #667eea;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-add-field:hover {
    border-color: #667eea;
    background: #f8f8ff;
}

.btn-add-field span {
    font-weight: bold;
}

/* 列表页标签切换 */
.tab-filter {
    display: flex;
    gap: 0;
    background: #eeeff3;
    padding: 5px;
    border-radius: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tab-filter .tab-item {
    padding: 9px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    user-select: none;
    font-weight: 400;
}

/* ===== 分组底色 ===== */
/* 公海客户 - 浅绿 */
.tab-filter .tab-item[data-group="pool"] {
    background: rgba(76, 175, 80, 0.10);
}
.tab-filter .tab-item[data-group="pool"]:hover {
    color: #43a047;
}
.tab-filter .tab-item[data-group="pool"].active {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(76,175,80,0.3);
}
.tab-filter .tab-item[data-group="pool"].active .count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* 客户状态（跟进/有效/签单/已死）- 浅蓝 */
.tab-filter .tab-item[data-group="status"] {
    background: rgba(33, 150, 243, 0.10);
}
.tab-filter .tab-item[data-group="status"]:hover {
    color: #1976d2;
}
.tab-filter .tab-item[data-group="status"].active {
    background: linear-gradient(135deg, #42a5f5, #1e88e5);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(33,150,243,0.3);
}
.tab-filter .tab-item[data-group="status"].active .count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* 归属（我负责/下属）- 浅粉 */
.tab-filter .tab-item[data-group="owner"] {
    background: rgba(236, 64, 122, 0.10);
}
.tab-filter .tab-item[data-group="owner"]:hover {
    color: #d81b60;
}
.tab-filter .tab-item[data-group="owner"].active {
    background: linear-gradient(135deg, #ec407a, #d81b60);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(236,64,122,0.3);
}
.tab-filter .tab-item[data-group="owner"].active .count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* 时间筛选（今日更新/3天/7天/判死）- 浅琥珀 */
.tab-filter .tab-item[data-group="time"] {
    background: rgba(255, 152, 0, 0.10);
}
.tab-filter .tab-item[data-group="time"]:hover {
    color: #ef6c00;
}
.tab-filter .tab-item[data-group="time"].active {
    background: linear-gradient(135deg, #ffa726, #ef6c00);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(255,152,0,0.3);
}
.tab-filter .tab-item[data-group="time"].active .count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.tab-filter .tab-item:hover {
    color: #5a7ff7;
}

.tab-filter .tab-item.active {
    background: linear-gradient(135deg, #5a7ff7, #7b5af7);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(90,127,247,0.3);
}

.tab-filter .tab-item .count {
    display: inline-block;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background: rgba(0,0,0,0.06);
    border-radius: 10px;
    font-size: 12px;
    padding: 0 6px;
    color: #999;
    font-weight: normal;
}

.tab-filter .tab-item.active .count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* 3天未跟进/7天未跟进：红色数字圆圈 */
.tab-filter .tab-item[data-tab="no_update_3d"] .count,
.tab-filter .tab-item[data-tab="no_update_7d"] .count {
    background: #e74c3c;
    color: #fff;
}
.tab-filter .tab-item[data-tab="no_update_3d"].active .count,
.tab-filter .tab-item[data-tab="no_update_7d"].active .count {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

/* 已死数据子标签 */
.sub-tab-filter {
    display: flex;
    gap: 0;
    background: #eeeff3;
    padding: 4px 4px;
    border-radius: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.sub-tab-filter .sub-tab-item {
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #888;
    transition: all 0.2s;
    border: none;
    background: transparent;
    white-space: nowrap;
    user-select: none;
}

.sub-tab-filter .sub-tab-item:hover {
    color: #5a7ff7;
}

.sub-tab-filter .sub-tab-item.active {
    background: linear-gradient(135deg, #5a7ff7, #7b5af7);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(90,127,247,0.25);
}

/* 筛选条件行 */
.filter-row {
    display: flex;
    gap: 10px;
    background: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-row input,
.filter-row select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    min-width: 140px;
}

.filter-row input:focus,
.filter-row select:focus {
    outline: none;
    border-color: #667eea;
}

.filter-row .filter-label {
    color: #666;
    font-size: 13px;
    min-width: 70px;
}

/* 响应式 */
@media (max-width: 768px) {
    .customer-form-grid .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .customer-form-grid .form-col,
    .customer-form-grid .form-col-full {
        margin-bottom: 15px;
    }
}

/* ==================== 客户操作工具栏 ==================== */
.customer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 12px;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-toolbar span {
    font-size: 13px;
}

.btn-toolbar-primary {
    background: #667eea;
    color: #fff;
}
.btn-toolbar-primary:hover { background: #556cd6; }

.btn-toolbar-success {
    background: #52c41a;
    color: #fff;
}
.btn-toolbar-success:hover { background: #3f9a14; }

.btn-toolbar-info {
    background: #13c2c2;
    color: #fff;
}
.btn-toolbar-info:hover { background: #08a3a3; }

.btn-toolbar-warning {
    background: #fa8c16;
    color: #fff;
}
.btn-toolbar-warning:hover { background: #d46b08; }

.btn-toolbar-danger {
    background: #ff4d4f;
    color: #fff;
}
.btn-toolbar-danger:hover { background: #d9363e; }

.btn-toolbar-secondary {
    background: #f0f0f0;
    color: #666;
}
.btn-toolbar-secondary:hover { background: #e0e0e0; }

.btn-toolbar-settings {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}
.btn-toolbar-settings:hover { background: #bae7ff; }

/* 数据报表表格样式 - 固定列宽 */
.report-table {
    width: auto;
    min-width: 900px;
    table-layout: fixed;
}
.report-table th,
.report-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 表格复选框列 */
.data-table th:first-child,
.data-table td:first-child {
    width: 36px;
    text-align: center;
    padding-left: 12px;
    padding-right: 4px;
}

.data-table input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #667eea;
}

/* ==================== 自定义表头配置 ==================== */

.column-config-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 8px;
}

.column-config-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #fafafa;
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: grab;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.column-config-item:hover {
    background: #f0f5ff;
    border-color: #d6e4ff;
}

.column-config-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.drag-handle {
    color: #bfbfbf;
    font-size: 16px;
    cursor: grab;
    user-select: none;
}

.column-config-check {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    cursor: pointer;
}

.column-config-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

.column-config-check input[type="checkbox"]:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.column-config-width {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #666;
}

.column-config-width input {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

.column-config-width input:focus {
    border-color: #667eea;
    outline: none;
}

.column-config-btns {
    display: flex;
    gap: 4px;
}

.column-config-btns .btn-icon {
    width: 28px;
    height: 28px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.column-config-btns .btn-icon:hover:not(:disabled) {
    background: #f0f5ff;
    border-color: #667eea;
    color: #667eea;
}

.column-config-btns .btn-icon:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 表格内容自动换行 */
.cell-wrap {
    max-width: 200px;
    word-break: break-all;
    white-space: normal !important;
    line-height: 1.5;
}

/* 表格列宽自适应 */
.data-table th,
.data-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table td.cell-wrap {
    white-space: normal;
}

/* 表头排序样式 */
.data-table th.sortable {
    cursor: pointer;
    user-select: none;
}
.data-table th.sortable:hover {
    background: #f5f7ff;
    color: #667eea;
}
.data-table th.sort-active {
    cursor: pointer;
    user-select: none;
    background: #eef0ff;
    color: #667eea;
    font-weight: 600;
}

/* 响应式：小屏幕下表格横向滚动 */
@media (max-width: 1200px) {
    .data-table {
        overflow-x: auto;
    }
    .data-table table {
        min-width: 900px;
    }
}

/* ========== 客户详情 全信息展示 ========== */
/* ===== 客户详情弹窗加宽 ===== */
.modal-box--detail {
    max-width: 860px !important;
    width: 94% !important;
}

/* ===== 客户详情整体容器 ===== */
.customer-detail-full {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ===== 详情标签页导航 ===== */
.detail-tabs-nav {
    display: flex;
    margin-bottom: 14px;
    background: #f5f7ff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0e6ff;
}

.detail-tabs-nav .tab-item {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 500;
    color: #7a7a7a;
    cursor: pointer;
    background: transparent;
    transition: all 0.25s ease;
    position: relative;
}

.detail-tabs-nav .tab-item:hover {
    color: #667eea;
    background: rgba(102,126,234,0.06);
}

.detail-tabs-nav .tab-item.active {
    color: #fff;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ===== tab 内容面板 ===== */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* ===== section 卡片 ===== */
.cdet-section {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #eaecf5;
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(102,126,234,0.06);
}

/* ===== section 标题栏 ===== */
.cdet-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #5a6fd6;
    padding: 10px 16px;
    background: linear-gradient(90deg, #f0f3ff 0%, #f8f9ff 100%);
    border-bottom: 1px solid #e4e8f8;
    display: flex;
    align-items: center;
    gap: 7px;
    letter-spacing: 0.3px;
}

.cdet-section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ===== 条数徽标 ===== */
.cdet-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    padding: 0 6px;
    box-shadow: 0 1px 3px rgba(102,126,234,0.35);
}

/* ===== 两列网格 ===== */
.cdet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

/* ===== 每行数据 ===== */
.cdet-row {
    display: flex;
    align-items: flex-start;
    padding: 9px 16px;
    border-bottom: 1px solid #f2f4fb;
    gap: 10px;
    min-width: 0;
    transition: background 0.15s;
}

.cdet-row:hover {
    background: #fafbff;
}

.cdet-row:last-child {
    border-bottom: none;
}

/* ===== 标签 ===== */
.cdet-label {
    min-width: 74px;
    max-width: 74px;
    color: #9aa3c2;
    font-size: 12px;
    flex-shrink: 0;
    padding-top: 2px;
    line-height: 1.5;
}

/* ===== 值 ===== */
.cdet-value {
    flex: 1;
    color: #2d3461;
    font-size: 13px;
    word-break: break-all;
    min-width: 0;
    line-height: 1.6;
}

/* ===== 操作按钮行 ===== */
.cdet-action-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 4px 4px;
}

/* ===== 文件列表 ===== */
.cdet-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cdet-file-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f5f7ff;
    border-radius: 7px;
    padding: 5px 10px;
    border: 1px solid #e0e6ff;
    transition: box-shadow 0.15s;
}

.cdet-file-item:hover {
    box-shadow: 0 2px 8px rgba(102,126,234,0.15);
}

.cdet-file-thumb {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 5px;
    cursor: zoom-in;
    border: 1px solid #d5dbff;
}

.cdet-file-icon {
    font-size: 20px;
}

.cdet-file-name {
    font-size: 12px;
    color: #555;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cdet-file-link {
    font-size: 12px;
    color: #667eea;
    white-space: nowrap;
    text-decoration: none;
    font-weight: 500;
}

.cdet-file-link:hover {
    color: #4a5bcc;
    text-decoration: underline;
}

/* 跟进弹窗 - 可编辑下拉字段 */
.cdet-row-editable {
    border-left: 3px solid #667eea;
    padding-left: 13px;
    background: #f9faff;
}

.cdet-row-editable:hover {
    background: #eef1ff;
}

.cdet-row-editable .cdet-label {
    min-width: 88px;
    max-width: 88px;
    color: #667eea;
}

.cdet-row-editable .cdet-value {
    flex: 1;
}

.follow-field-select {
    width: 100%;
    max-width: 280px;
    padding: 6px 28px 6px 10px;
    border: 1.5px solid #bcc3f0;
    border-radius: 6px;
    background: #f6f8ff;
    color: #333;
    font-size: 13px;
    appearance: none;
    -webkit-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='M3 4.5l3 3 3-3' stroke='%23667eea' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.follow-field-select:hover {
    border-color: #5a7ff7;
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(90,127,247,0.08);
}

.follow-field-select:focus {
    outline: none;
    border-color: #5a7ff7;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(90,127,247,0.15);
}

/* 跟进弹窗 - 可编辑提示 */
.cdet-hint-editable {
    font-size: 12px;
    color: #e74c3c;
    padding: 6px 0 2px;
    margin-top: -4px;
}





/* ===== 手机端优化（≤768px，位于文件末尾确保优先级） ===== */
@media (max-width: 768px) {

    /* ---------- 标签栏：横向滚动 + 分组间隔线 ---------- */
    .tab-filter {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 6px 4px;
        gap: 3px;
        background: #f5f6fa;
        border-radius: 8px;
        margin-bottom: 10px;
    }
    .tab-filter::-webkit-scrollbar { display: none; }

    .tab-filter .tab-item {
        flex-shrink: 0;
        padding: 7px 12px !important;
        font-size: 12px !important;
        border-radius: 6px !important;
        gap: 4px !important;
    }

    .tab-filter .tab-item .count {
        min-width: 16px;
        height: 16px;
        line-height: 16px;
        font-size: 10px;
        padding: 0 5px;
    }

    /* 分组底色在手机端减淡 */
    .tab-filter .tab-item[data-group="pool"] { background: rgba(76,175,80,0.07) !important; }
    .tab-filter .tab-item[data-group="status"] { background: rgba(33,150,243,0.07) !important; }
    .tab-filter .tab-item[data-group="owner"] { background: rgba(236,64,122,0.07) !important; }
    .tab-filter .tab-item[data-group="time"] { background: rgba(255,152,0,0.07) !important; }

    /* 分组间隔：每组最后一个标签后加竖线 */
    .tab-filter .tab-item[data-tab="public"],
    .tab-filter .tab-item[data-tab="dead"],
    .tab-filter .tab-item[data-tab="subordinate"] {
        margin-right: 10px;
        position: relative;
    }
    .tab-filter .tab-item[data-tab="public"]::after,
    .tab-filter .tab-item[data-tab="dead"]::after,
    .tab-filter .tab-item[data-tab="subordinate"]::after {
        content: '';
        position: absolute;
        right: -7px;
        top: 15%;
        height: 70%;
        width: 2px;
        background: #d0d5e0;
        border-radius: 1px;
    }

    /* ---------- 筛选行：纵向排列 ---------- */
    .filter-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px;
        padding: 10px 12px;
    }
    .filter-row input,
    .filter-row select {
        min-width: unset !important;
        width: 100% !important;
        padding: 9px 12px;
        font-size: 14px;
    }
    .filter-row .btn-add-field {
        width: 100% !important;
        padding: 10px;
    }

    /* ---------- 工具栏：双列网格 ---------- */
    .customer-toolbar {
        flex-direction: column !important;
        gap: 8px;
        padding: 10px 12px;
    }
    .toolbar-left {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        width: 100%;
    }
    .btn-toolbar {
        justify-content: center;
        padding: 9px 8px;
        font-size: 12px;
        border-radius: 8px;
    }
    .btn-toolbar span { font-size: 12px; }

    /* ---------- 卡片间距优化 ---------- */
    .data-table tr {
        margin-bottom: 12px;
    }
    .data-table td[data-col-key="name"] {
        font-size: 15px;
        padding: 12px 14px;
    }
    .data-table td:not([data-col-key="name"]):not([data-col-key="actions"]):not([data-col-key="checkbox"]) {
        padding: 6px 14px;
        font-size: 12px;
    }

    /* ---------- 数据表格 → 手机端横向滚动表格 ---------- */
    .data-table {
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 1px 6px rgba(0,0,0,0.06) !important;
        background: #fff !important;
        border-radius: 10px !important;
        border: 1px solid #eee !important;
    }
    .data-table table {
        min-width: 700px;
        width: max-content;
        border-collapse: collapse;
        table-layout: auto;
        display: table !important;
    }
    .data-table thead { display: table-header-group !important; }
    .data-table tbody { display: table-row-group !important; }
    .data-table tr {
        display: table-row !important;
        margin-bottom: 0 !important;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        overflow: visible !important;
    }
    .data-table th {
        background: #f5f7fa;
        font-size: 11px;
        font-weight: 600;
        color: #555;
        padding: 7px 5px;
        white-space: nowrap;
        text-align: center;
        border-bottom: 2px solid #d0d5e0;
        position: sticky;
        top: 0;
        z-index: 1;
    }
    .data-table td {
        display: table-cell !important;
        padding: 6px 5px;
        font-size: 11px;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100px;
        color: #333;
        background: #fff;
        vertical-align: middle;
        word-break: normal;
    }
    .data-table td::before { display: none !important; content: none !important; }
    .data-table td[data-col-key="name"] {
        background: #fff !important;
        color: #333 !important;
        font-weight: 600;
        font-size: 12px;
        text-align: left;
        padding-left: 8px;
    }
    .data-table td[data-col-key="name"] a { color: #667eea !important; text-decoration: none !important; font-weight: 600; }
    .data-table td[data-col-key="checkbox"] { display: table-cell !important; width: 28px; padding: 2px; }
    .data-table td[data-col-key="id"] { display: table-cell !important; }
    .data-table td:empty { display: table-cell !important; }
    .data-table td[data-col-key="actions"] {
        display: table-cell !important;
        background: #fff !important;
        padding: 5px 3px;
        border-top: none !important;
        white-space: nowrap;
    }
    .data-table td[data-col-key="actions"]::before { display: none !important; }
    .action-btns {
        display: flex;
        flex-wrap: nowrap;
        gap: 2px;
        justify-content: center;
    }
    .action-btns button,
    .action-btns .btn-text {
        padding: 3px 6px;
        font-size: 10px;
        border-radius: 4px;
        min-height: 22px;
        white-space: nowrap;
        border: 1px solid #d9d9d9;
        background: #fafafa;
        color: #555;
    }
    .action-btns .btn-detail-green { background: #52c41a; color: #fff; border-color: #52c41a; }
    .action-btns .btn-follow { background: #1890ff; color: #fff; border-color: #1890ff; }
    .action-btns .btn-edit-brown { background: #fa8c16; color: #fff; border-color: #fa8c16; }
    .action-btns .btn-sign-red { background: #ff4d4f; color: #fff; border-color: #ff4d4f; }
    .action-btns .btn-primary { background: #667eea; color: #fff; border-color: #667eea; }

    /* ---------- 隐藏筛选行、工具栏、底部提示 ---------- */
    .filter-row { display: none !important; }
    .filter-hint { display: none !important; }

    /* ---------- 查重页面手机端优化 ---------- */
    .dup-center-wrap {
        padding: 12px 10px !important;
        align-items: flex-start !important;
    }
    .dup-center-card {
        padding: 16px 14px !important;
        max-width: 100% !important;
        border-radius: 10px !important;
    }
    .dup-center-icon { font-size: 28px !important; margin-bottom: 4px !important; }
    .dup-center-title { font-size: 16px !important; margin-bottom: 2px !important; }
    .dup-center-desc { font-size: 12px !important; margin-bottom: 12px !important; line-height: 1.4 !important; }
    .dup-center-form {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: center !important;
        align-items: center !important;
    }
    .dup-center-input {
        width: 100% !important;
        max-width: 100% !important;
        height: 42px !important;
        font-size: 16px !important;
        padding: 0 14px !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }
    .dup-center-btn {
        height: 42px !important;
        padding: 0 18px !important;
        font-size: 15px !important;
        border-radius: 8px !important;
        width: 100% !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        margin-top: 4px !important;
    }
    .dup-center-divider {
        margin: 14px auto !important;
    }
    .dup-center-input-sm {
        width: 78px !important;
        max-width: 78px !important;
        min-width: 60px !important;
        flex: none !important;
    }
    .dup-center-sep {
        font-size: 18px !important;
        line-height: 42px !important;
        padding: 0 4px !important;
        flex-shrink: 0 !important;
    }
    /* 第二行：前三后四同行，按钮另起一行（按钮width:100%自动换行） */
    .dup-center-form:nth-of-type(2) .dup-center-btn {
        margin-top: 6px !important;
    }
    .dup-center-ok-icon { font-size: 36px !important; }
    .dup-center-ok-text { font-size: 14px !important; }
    .dup-center-warn-icon { font-size: 30px !important; }
    .dup-center-warn-text { font-size: 14px !important; }
    .dup-center-result-card {
        padding: 10px 12px !important;
    }
    .dup-center-result-top {
        flex-wrap: wrap;
        gap: 6px !important;
        font-size: 12px !important;
    }
}

/* ========== 今日数据报备 ========== */
.today-report-super-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}
.today-report-section {
    margin-bottom: 18px;
    padding: 14px 16px;
    background: #f8f9ff;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}
.today-report-title {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
}
.today-report-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}
.today-report-stat {
    font-size: 13px;
    color: #555;
    padding: 3px 10px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e8e8e8;
}
.today-report-stat b {
    color: #333;
}
.today-report-stat.valid {
    border-color: #b7eb8f;
    background: #f6ffed;
}
.today-report-stat.valid b {
    color: #52c41a;
}
.today-report-stat.invalid {
    border-color: #ffd8bf;
    background: #fff7e6;
}
.today-report-stat.invalid b {
    color: #fa8c16;
}
.today-report-stat.pending {
    border-color: #d9d9d9;
    background: #fafafa;
}
.today-report-stat.pending b {
    color: #999;
}
.today-report-detail {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
}
.today-report-detail-title {
    font-size: 12px;
    font-weight: 600;
    color: #999;
    margin-bottom: 6px;
}
.today-report-item {
    font-size: 12px;
    color: #666;
    line-height: 1.8;
    padding: 2px 0;
    border-bottom: 1px dotted #f0f0f0;
}
.today-report-copy-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.today-report-copy-btn:hover {
    opacity: 0.9;
}
.today-report-copy-btn:active {
    opacity: 0.8;
}

/* 超管全部复制按钮 */
.today-report-all-copy {
    display: block;
    width: 100%;
    margin-bottom: 16px;
    padding: 10px 0;
    background: linear-gradient(135deg, #52c41a 0%, #237804 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.today-report-all-copy:hover {
    opacity: 0.9;
}

/* 手机端适配 */
@media (max-width: 768px) {
    .today-report-section {
        padding: 10px 12px;
        margin-bottom: 12px;
    }
    .today-report-stats {
        gap: 8px;
    }
    .today-report-stat {
        font-size: 12px;
        padding: 2px 8px;
    }
    .today-report-item {
        font-size: 11px;
    }
    .today-report-copy-btn {
        font-size: 13px;
        padding: 8px 0;
    }
}

/* ===== 强制录入通知铃铛 ===== */
.notify-bell {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    margin-right: 4px;
    border-radius: 8px;
    color: #666;
    transition: all 0.2s;
}
.notify-bell:hover {
    background: #f0f0f0;
    color: #333;
}
.notify-bell svg {
    width: 22px;
    height: 22px;
}
.notify-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    padding: 0 4px;
    transform: translate(25%, -25%);
}

/* 通知弹窗 */
.notify-popup {
    display: none;
    position: fixed;
    top: 55px;
    right: 80px;
    width: 380px;
    max-height: 480px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 9999;
    overflow: hidden;
}
.notify-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}
.notify-popup-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    padding: 2px 6px;
    border-radius: 4px;
}
.notify-popup-close:hover {
    color: #333;
    background: #f5f5f5;
}
.notify-list {
    max-height: 400px;
    overflow-y: auto;
}
.notify-empty {
    padding: 32px 16px;
    text-align: center;
    color: #999;
    font-size: 13px;
}
.notify-item {
    padding: 14px 16px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.15s;
}
.notify-item:hover {
    background: #f8f9ff;
}
.notify-item.read {
    opacity: 0.6;
}
.notify-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.notify-item-op {
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
}
.notify-item-time {
    font-size: 11px;
    color: #999;
    white-space: pre-line;
    text-align: right;
}
.notify-item-body {
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
}
.notify-item-body b {
    color: #e74c3c;
}
.notify-item-dup {
    font-size: 11px;
    color: #888;
    line-height: 1.4;
}
.notify-popup-footer {
    padding: 10px 16px;
    border-top: 1px solid #eee;
    text-align: center;
}
.notify-popup-footer .btn-sm {
    background: #667eea;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}
.notify-popup-footer .btn-sm:hover {
    background: #5a6fd6;
}
/* 重复客户渠道来源高亮 */
.dup-source-highlight {
    color: #e74c3c;
    background: #fff3cd;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 10px 0;
    font-weight: bold;
    font-size: 14px;
}
