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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    color: #1f2937;
    line-height: 1.6;
    min-height: 100vh;
}

/* 扩大容器宽度，减少边距 */
.container {
    max-width: 98%;
    width: 98%;
    margin: 0 auto;
    padding: 12px 16px;
}

/* 导航栏 - 现代化设计 */
.navbar {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    color: white;
    padding: 0.75rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-menu a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(99, 102, 241, 0.3);
    color: white;
    transform: translateY(-1px);
}

.nav-user {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
}

/* 页面标题 */
.page-header {
    margin-bottom: 12px;
}

.page-header h2 {
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 700;
}

/* 筛选区域 - 更紧凑的设计 */
.filter-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: center;
}

.filter-section .btn {
    margin-left: 0;
}

/* 筛选表单行 - 横向排列 */
.filter-section .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: flex-end;
    width: 100%;
}

/* 筛选条件组 - 标签和输入框在同一行 */
.filter-section .form-group {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}

.filter-section .form-group label {
    display: inline;
    margin-bottom: 0;
    white-space: nowrap;
    font-size: 13px;
}

/* 筛选输入框更紧凑 */
.filter-section .form-control,
.filter-section select.form-control {
    padding: 6px 10px;
    font-size: 13px;
    min-height: auto;
    height: 32px;
}

.filter-section input[type="date"].form-control {
    padding: 4px 8px;
    font-size: 13px;
    height: 32px;
}

/* 批量操作区域 */
.batch-action-section {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    padding: 10px 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.selected-count {
    margin-left: auto;
    color: #6b7280;
    font-weight: 500;
    font-size: 13px;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 6px;
}

/* 登录页 - 全新设计 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 70px);
    position: relative;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 420px;
    width: 100%;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-title {
    text-align: center;
    margin-bottom: 28px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 24px;
    font-weight: 700;
}

.login-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    border-left: 4px solid #ef4444;
}

.login-form .form-group {
    margin-bottom: 18px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.login-form input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    font-size: 14px;
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn-block {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
}

/* 复选框样式 */
.row-checkbox,
#selectAll {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.filter-select,
textarea.filter-select,
input[type="date"].filter-select {
    padding: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    min-width: 120px;
    transition: all 0.3s;
}

.filter-select:focus,
textarea.filter-select:focus,
input[type="date"].filter-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 按钮 - 现代化设计 */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-tiny {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* 表格容器 - 优化展示区域 */
.table-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    overflow-x: auto;
    position: relative;
}

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

/* 可调整列宽的表头 */
.data-table thead th {
    position: relative;
    user-select: none;
}

/* 列宽调整手柄 - 默认显示竖线 */
.resizable-handle {
    position: absolute;
    right: -3px;
    top: 10%;
    bottom: 10%;
    width: 2px;
    cursor: col-resize;
    background: #e5e7eb;
    transition: all 0.2s;
    z-index: 10;
    border-radius: 1px;
    opacity: 0.6;
}

/* 鼠标悬停和拖动时的效果 */
.resizable-handle:hover,
.resizable-handle.active {
    background: #6366f1;
    width: 3px;
    right: -4px;
    top: 0;
    bottom: 0;
    opacity: 1;
}

/* 调整时的遮罩层 */
.resize-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 9999;
    display: none;
    cursor: col-resize;
}

.resize-overlay.active {
    display: block;
}

.data-table thead {
    background: linear-gradient(90deg, #f8f9ff 0%, #faf5ff 100%);
}

.data-table th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    color: #4b5563;
    border-bottom: 2px solid rgba(99, 102, 241, 0.1);
    font-size: 13px;
}

/* ===== 列宽设置 - 让内容列更宽 ===== */
/* 以下规则已禁用，避免与customer_comments.html冲突 */
/* 各个页面使用独立的ID选择器设置列宽 */

/* 评论数据页面 (comments.html, self_comments.html) */
/* 允许手动拖动列宽 */
#selfCommentsTable,
#commentsTable {
    width: 100% !important;
    table-layout: fixed !important;
}

#commentsTable {
    min-width: 100%;
}

/* ===== customer_comments.html 客户在投笔记评论 ===== */
/* 文本溢出处理 - 所有列统一应用 */
#commentsTable th,
#commentsTable td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 使用百分比宽度，让列宽按容器宽度比例分配 */
/* 第1列: 复选框 */
#commentsTable th:nth-child(1),
#commentsTable td:nth-child(1) {
    width: 2.5% !important;
}

/* 第2列: 评论序号 */
#commentsTable th:nth-child(2),
#commentsTable td:nth-child(2) {
    width: 5% !important;
}

/* 第3列: 客户名称 */
#commentsTable th:nth-child(3),
#commentsTable td:nth-child(3) {
    width: 10% !important;
}

/* 第4列: 笔记链接 */
#commentsTable th:nth-child(4),
#commentsTable td:nth-child(4) {
    width: 16% !important;
}

/* 第5列: 评论内容 */
#commentsTable th:nth-child(5),
#commentsTable td:nth-child(5) {
    width: 25% !important;
}

/* 第6列: 用户昵称 */
#commentsTable th:nth-child(6),
#commentsTable td:nth-child(6) {
    width: 9% !important;
}

/* 第7列: 发布时间 */
#commentsTable th:nth-child(7),
#commentsTable td:nth-child(7) {
    width: 11% !important;
}

/* 第8列: AI测评 */
#commentsTable th:nth-child(8),
#commentsTable td:nth-child(8) {
    width: 9% !important;
}

/* 第9列: 操作 */
#commentsTable th:nth-child(9),
#commentsTable td:nth-child(9) {
    width: 14% !important;
}

/* 操作列允许换行（按钮） */
#commentsTable td:nth-child(9) {
    white-space: normal;
}

/* ===== self_comments.html 自投评论 ===== */
/* 第3列: 品牌 - 窄 */
#selfCommentsTable th:nth-child(3),
#selfCommentsTable td:nth-child(3) {
    width: 60px;
    min-width: 55px;
    max-width: 80px;
}

/* 第4列: 笔记链接 - 适中 */
#selfCommentsTable th:nth-child(4),
#selfCommentsTable td:nth-child(4) {
    width: 150px;
    min-width: 130px;
    max-width: 200px;
}

/* 第5列: 评论内容 - 宽 */
#selfCommentsTable th:nth-child(5),
#selfCommentsTable td:nth-child(5) {
    width: 400px;
    min-width: 300px;
}

/* 第6列: 用户名 - 窄 */
#selfCommentsTable th:nth-child(6),
#selfCommentsTable td:nth-child(6) {
    width: 70px;
    min-width: 60px;
}

/* 第7列: 子评论 - 适中 */
#selfCommentsTable th:nth-child(7),
#selfCommentsTable td:nth-child(7) {
    width: 150px;
    min-width: 120px;
}

/* 第8列: 发布时间 - 宽度足够完整显示 */
#selfCommentsTable th:nth-child(8),
#selfCommentsTable td:nth-child(8) {
    width: 160px;
    min-width: 155px;
    white-space: nowrap;
}

/* 第9列: AI测评 - 窄 */
#selfCommentsTable th:nth-child(9),
#selfCommentsTable td:nth-child(9) {
    width: 55px;
    min-width: 50px;
}

/* 第10列: 操作 - 固定，确保按钮不被挤压 */
#selfCommentsTable th:nth-child(10),
#selfCommentsTable td:nth-child(10) {
    width: 130px;
    min-width: 125px;
    max-width: 150px;
}

/* ===== comments.html 已废弃，以下规则已删除 ===== */

/* ===== 客户笔记页面 (customer_notes.html) - #notesTable ===== */
/* 文本溢出处理 - 所有列统一应用 */
#notesTable th,
#notesTable td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 12px 16px;
}

/* 使用固定表格布局，确保列宽一致 */
#notesTable {
    table-layout: fixed !important;
}

/* 第1列: 任务名称 */
#notesTable th:nth-child(1),
#notesTable td:nth-child(1) {
    width: 80px !important;
    max-width: 80px !important;
}

/* 第2列: 账户名称 */
#notesTable th:nth-child(2),
#notesTable td:nth-child(2) {
    width: 120px !important;
    max-width: 120px !important;
}

/* 第3列: 笔记ID */
#notesTable th:nth-child(3),
#notesTable td:nth-child(3) {
    width: 105px !important;
    max-width: 105px !important;
}

/* 第4列: 链接 */
#notesTable th:nth-child(4),
#notesTable td:nth-child(4) {
    width: 60px !important;
    max-width: 60px !important;
    min-width: 60px !important;
}

/* 第5列: 达人昵称 */
#notesTable th:nth-child(5),
#notesTable td:nth-child(5) {
    width: 100px !important;
    max-width: 100px !important;
}

/* 第6列: 发布时间 */
#notesTable th:nth-child(6),
#notesTable td:nth-child(6) {
    width: 100px !important;
    max-width: 100px !important;
}

/* 第7列: 曝光量 */
#notesTable th:nth-child(7),
#notesTable td:nth-child(7) {
    width: 80px !important;
    max-width: 80px !important;
    text-align: center;
}

/* 第8列: 阅读量 */
#notesTable th:nth-child(8),
#notesTable td:nth-child(8) {
    width: 80px !important;
    max-width: 80px !important;
    text-align: center;
}

/* 第9列: 评论总数 */
#notesTable th:nth-child(9),
#notesTable td:nth-child(9) {
    width: 105px !important;
    max-width: 105px !important;
    text-align: center;
}

/* 第10列: 好评数 */
#notesTable th:nth-child(10),
#notesTable td:nth-child(10) {
    width: 70px !important;
    max-width: 70px !important;
    text-align: center;
}

/* 第11列: 中评数 */
#notesTable th:nth-child(11),
#notesTable td:nth-child(11) {
    width: 70px !important;
    max-width: 70px !important;
    text-align: center;
}

/* 第12列: 负评数 */
#notesTable th:nth-child(12),
#notesTable td:nth-child(12) {
    width: 95px !important;
    max-width: 95px !important;
    text-align: center;
}

/* 第13列: 更新日期 */
#notesTable th:nth-child(13),
#notesTable td:nth-child(13) {
    width: 140px !important;
    max-width: 140px !important;
}

/* 第14列: AI解读 */
#notesTable th:nth-child(14),
#notesTable td:nth-child(14) {
    width: 160px !important;
    max-width: 160px !important;
}

/* AI解读结果样式 */
.ai-result {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 4px;
    padding: 8px;
    color: #166534;
    line-height: 1.4;
}

/* AI解读列按钮样式 */
#notesTable .btn-ai-result {
    background: #ef4444;
    color: white;
    border: none;
}

#notesTable .btn-ai-result:hover {
    background: #dc2626;
}

#notesTable .btn-ai-analyze {
    background: #6366f1;
    color: white;
    border: none;
}

#notesTable .btn-ai-analyze:hover {
    background: #4f46e5;
}

/* AI解读进度条 */
.ai-progress-bar {
    width: 60px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
}

.ai-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 3px;
    animation: ai-progress 1.5s ease-in-out infinite;
}

@keyframes ai-progress {
    0% {
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
    }
}

/* AI解读失败按钮 */
#notesTable .btn-ai-fail {
    background: #9ca3af;
    color: white;
    border: none;
}

#notesTable .btn-ai-fail:hover {
    background: #6b7280;
}

/* 可排序表头样式 */
#notesTable th[onclick] {
    user-select: none;
}

#notesTable th[onclick]:hover {
    background: #f3f4f6;
}

/* 排序箭头容器 */
#notesTable .sort-arrows {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-left: 4px;
}

/* 排序箭头 */
#notesTable .sort-arrow {
    font-size: 9px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 0.8;
    padding: 0;
    display: block;
}

/* 激活状态的排序箭头 */
#notesTable .sort-arrow.active {
    color: #ef4444;
    font-weight: bold;
}

/* ===== 上传客户聚光ID页面 (upload_customer_juguang.html) - #customerTable ===== */
/* 让表格自适应内容 */
#customerTable {
    table-layout: auto !important;
}

#customerTable th,
#customerTable td {
    padding: 12px 16px;
}

/* ID */
#customerTable th:nth-child(1),
#customerTable td:nth-child(1) {
    width: 60px !important;
    text-align: center;
}

/* 账号名称 */
#customerTable th:nth-child(2),
#customerTable td:nth-child(2) {
    min-width: 150px;
    max-width: 300px;
}

/* 创建时间 */
#customerTable th:nth-child(3),
#customerTable td:nth-child(3) {
    width: 170px !important;
    white-space: nowrap;
}

/* 最后同步时间 */
#customerTable th:nth-child(4),
#customerTable td:nth-child(4) {
    width: 170px !important;
    white-space: nowrap;
}

/* 操作 */
#customerTable th:nth-child(5),
#customerTable td:nth-child(5) {
    width: 150px !important;
    text-align: center;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(227, 227, 233, 0.6);
    font-size: 14px;
}

.data-table td:last-child {
    border-right: none;
}

.data-table th:last-child {
    border-right: none;
}

.data-table tbody tr {
    transition: all 0.2s;
}

.data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.03);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* 笔记链接单元格 */
.note-url-cell {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-url-cell a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.note-url-cell a:hover {
    text-decoration: underline;
}

/* 结束监控日期输入框 */
.end-date-input {
    padding: 8px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    max-width: 200px;
    transition: all 0.3s;
}

.end-date-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 小按钮 */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* AI状态标签 */
.ai-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ai-badge-0 {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #4b5563;
}

.ai-badge-1 {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.ai-badge-2 {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.ai-badge-3 {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

/* 操作按钮 */
.action-btn {
    padding: 6px 12px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 6px;
    font-weight: 500;
    transition: all 0.3s;
}

.action-btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-1px);
}

/* AI测评下拉框 */
.ai-select {
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    width: 100%;
    box-sizing: border-box;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.ai-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 提交按钮 */
.btn-submit {
    padding: 6px 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 删除按钮 */
.btn-delete {
    padding: 6px 12px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-delete:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
}

.btn-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 分页 */
.pagination {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 8px 14px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 14px;
}

.pagination button:hover:not(:disabled) {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-color: #6366f1;
    transform: translateY(-1px);
}

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

.pagination .page-info {
    padding: 8px 16px;
    color: #6b7280;
    font-weight: 500;
    font-size: 14px;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-size: 14px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 28px;
    border: none;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close {
    color: #9ca3af;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #1f2937;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #1f2937;
    font-size: 20px;
}

.detail-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(227, 227, 233, 0.6);
}

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

.detail-label {
    font-weight: 600;
    color: #6366f1;
    margin-bottom: 6px;
    font-size: 14px;
}

.detail-value {
    color: #4b5563;
    word-break: break-word;
    line-height: 1.7;
}

.detail-value a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.detail-value a:hover {
    text-decoration: underline;
}

/* 文本截断 */
.text-truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px 12px;
    }

    .navbar .container {
        flex-direction: column;
        gap: 12px;
        padding: 0 16px;
    }

    .nav-menu {
        gap: 4px;
        justify-content: center;
    }

    .nav-menu a {
        font-size: 13px;
        padding: 6px 10px;
    }

    .filter-section {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }

    .filter-section .form-row {
        flex-direction: column;
        gap: 8px;
    }

    .filter-section .form-group {
        width: 100%;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-section .btn {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }
}

/* 上传页面样式 */
.upload-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
}

.upload-container {
    display: flex;
    flex-direction: column;
}

.upload-tip {
    background: linear-gradient(135deg, #eff6ff 0%, #fef3c7 100%);
    padding: 16px 20px;
    border-radius: 10px;
    border-left: 4px solid #3b82f6;
    margin-bottom: 20px;
}

.upload-tip h3 {
    margin-bottom: 8px;
    color: #1e3a8a;
    font-size: 15px;
}

.upload-tip p {
    margin-bottom: 6px;
    color: #374151;
    font-size: 14px;
}

.tip-warning {
    color: #dc2626 !important;
    font-weight: 600;
    margin-top: 8px !important;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-control.input-large {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.3s;
}

.form-control.input_large:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-large {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 500;
}

.upload-box {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.required {
    color: #ef4444;
}

/* 表单提示文字 */
.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #6b7280;
}

.form-hint-success {
    color: #059669;
}

/* textarea 样式 */
textarea.form-control {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    line-height: 1.5;
}

.upload-result {
    margin-top: 24px;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9ff 0%, #faf5ff 100%);
    border-radius: 10px;
    border-left: 4px solid #6366f1;
}

.upload-result.success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left-color: #10b981;
    color: #065f46;
}

.upload-result.error {
    background: linear-gradient(135deg, #fef3c7 0%, #fee2e2 100%);
    border-left-color: #ef4444;
    color: #991b1b;
}

.upload-result h3 {
    margin-bottom: 12px;
    color: #1f2937;
    font-size: 18px;
}

.success-message {
    color: #059669;
    font-weight: 600;
    margin-bottom: 10px;
}

.error-details {
    margin-top: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
}

.error-details ul {
    margin-top: 8px;
    padding-left: 20px;
}

.error-details li {
    margin-bottom: 4px;
    word-break: break-all;
    color: #92400e;
    font-size: 13px;
}

/* 笔记图片缩略图与预览 */
.note-image-wrapper {
    position: relative;
    display: inline-block;
}

.note-image-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid rgba(227, 227, 233, 0.6);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: all 0.3s;
}

.note-image-thumb:hover {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    /* 不使用 transform 和 filter，避免影响 fixed 定位的子元素 */
}

.note-image-preview {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    background: white;
    z-index: 2000;
    padding: 8px;
    /* 确保完全相对于视口定位 */
    right: auto;
    bottom: auto;
    margin: 0;
    /* 移除可能影响定位的属性 */
    will-change: auto;
    /* 确保在body层级，不受父元素影响 */
    position: fixed !important;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4f46e5 0%, #7c3aed 100%);
}


/* ==================== 客户相关页面样式 ==================== */

/* 导航分隔线 */
.nav-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 8px;
}

/* 上传客户聚光ID页面 */
.upload-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.upload-tip {
    background: linear-gradient(135deg, #eff6ff 0%, #fef3c7 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}

.upload-tip h3 {
    margin-bottom: 12px;
    color: #1e3a8a;
    font-size: 16px;
}

.upload-tip p {
    margin-bottom: 10px;
    color: #374151;
    font-size: 14px;
}

.upload-tip ul {
    margin-left: 20px;
    margin-top: 10px;
}

.upload-tip li {
    margin-bottom: 6px;
    color: #374151;
    font-size: 14px;
}

.tip-warning {
    color: #dc2626 !important;
    font-weight: 600;
    margin-top: 12px !important;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.file-drop-zone {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.file-drop-zone:hover,
.file-drop-zone.drag-over {
    border-color: #6366f1;
    background: linear-gradient(135deg, #f8f9ff 0%, #faf5ff 100%);
}

.file-input {
    display: none;
}

.button-group {
    display: flex;
    gap: 12px;
}

.upload-progress {
    margin-top: 10px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    color: #6b7280;
}

.upload-result.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left-color: #10b981;
    color: #065f46;
}

.upload-result.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left-color: #ef4444;
    color: #991b1b;
}

/* 客户列表区域 */
.customer-list-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.list-header h3 {
    color: #1f2937;
    font-size: 18px;
}

/* 表格区域 */
.table-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.table-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-title span {
    color: #1f2937;
    font-weight: 600;
    font-size: 16px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-sync {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

/* 封面图样式 */
.cover-image {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.cover-image:hover {
    transform: scale(1.1);
}

/* 详情弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header h3 {
    color: #1f2937;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.modal-body {
    padding: 20px;
    max-height: calc(80vh - 120px);
    overflow-y: auto;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table th,
.detail-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.detail-table th {
    background: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    font-size: 13px;
    width: 120px;
}

.detail-table td {
    color: #1f2937;
    word-break: break-word;
}

/* 状态标签 */
.status-active,
.status-inactive {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.status-inactive {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}
