/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* 卡片样式 */
.glass-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.glass-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.header-content h1 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.header-content h1 i {
    margin-right: 10px;
    color: #ffd700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #333;
}

.logout-btn {
    color: #333;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.back-btn {
    color: #333;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* 搜索区域 */
.search-section {
    margin: 20px 0;
    padding: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
    font-size: 16px;
    color: #333;
}

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

.search-box button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.search-box button:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.reset-btn {
    background: #ff6b6b !important;
}

.reset-btn:hover {
    background: #ff5252 !important;
}

.filter-box select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
    font-size: 16px;
    cursor: pointer;
    color: #333;
}

.filter-box select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 添加数据区域 */
.add-data-section {
    margin: 20px 0;
    padding: 20px;
    text-align: center;
}

.add-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 数据列表 */
.data-list {
    margin: 20px 0;
    padding: 20px;
}

/* 数据列表导航栏 */
.data-header-nav {
    display: flex;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.nav-item {
    flex: 1;
    text-align: center;
}

.customer-col {
    flex: 1.5;
    text-align: left;
}

.status-col {
    flex: 1;
}

.salesman-col {
    flex: 1;
}

.time-col {
    flex: 2;
}

.data-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    border-left: 4px solid #667eea;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.data-item .customer-name {
    flex: 1.5;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-item .status-badge {
    flex: 1;
    text-align: center;
}

.data-item .salesman-info {
    flex: 1;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.data-item .time-info {
    flex: 2;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.data-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

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

.customer-name {
    font-weight: 600;
    font-size: 18px;
    color: #333;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-chatting { background: #e3f2fd; color: #1976d2; }
.status-success { background: #e8f5e8; color: #388e3c; }
.status-deleted { background: #ffebee; color: #d32f2f; }
.status-ignored { background: #fff3e0; color: #f57c00; }
.status-competitor { background: #f3e5f5; color: #7b1fa2; }
.status-fake { background: #fff8e1; color: #fbc02d; }
.status-warning { background: #fff8e1; color: #fbc02d; }

.data-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.data-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 加载指示器 */
.loading-indicator, .no-more-data {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-size: 14px;
}

.loading-indicator i {
    margin-right: 8px;
    color: #667eea;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

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

.modal-header h2 {
    color: #333;
    font-size: 1.5rem;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
    padding: 0 20px;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

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

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 20px;
    border-top: 1px solid #eee;
}

.submit-btn, .cancel-btn {
    min-width: 100px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-content: center;
    flex-shrink: 0;
}

.submit-btn {
    background: #667eea;
    color: white;
}

.submit-btn:hover {
    background: #5a6fd8;
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
}

.cancel-btn:hover {
    background: #e0e0e0;
}

/* 登录页面样式 */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    padding: 40px;
    text-align: center;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.login-header {
    margin-bottom: 30px;
}

.login-header i {
    font-size: 3rem;
    color: #ffd700;
    margin-bottom: 15px;
}

.login-header h1 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-header p {
    color: #6c757d;
    font-size: 1rem;
}

.error-message {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-form label {
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.login-form input {
    width: 100%;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
    font-size: 16px;
    color: #333;
}

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

.login-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

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

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-link {
    color: #667eea;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.admin-link:hover {
    color: #5a6fd8;
    background: #e9ecef;
    border-color: #adb5bd;
}

/* 详情页面样式 */
.detail-container {
    margin: 20px 0;
}

.detail-card {
    padding: 30px;
}

.detail-header {
    margin-bottom: 30px;
    text-align: center;
}

.detail-header h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 0;
}

.detail-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-row {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.detail-label {
    flex: 0 0 120px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-value {
    flex: 1;
    color: #666;
}

/* 详情弹窗中的状态标签样式 */
.detail-value .status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 8px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 10px 15px;
    }
    
    .header-content h1 {
        font-size: 1.2rem;
    }
    
    .user-info {
        gap: 10px;
    }
    
    .logout-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    /* 搜索区域优化 */
    .search-section {
        margin: 15px 0;
        padding: 15px;
    }
    
    .search-box {
        flex-direction: row;
        gap: 8px;
        margin-bottom: 12px;
        align-items: center;
    }
    
    .search-box input {
        flex: 1;
        padding: 8px 10px;
        font-size: 13px;
        min-width: 0;
    }
    
    .search-box button {
        padding: 8px 12px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .filter-box {
        display: flex;
        gap: 8px;
        align-items: center;
    }
    
    .filter-box select {
        flex: 1;
        padding: 8px 10px;
        font-size: 13px;
        min-width: 0;
    }
    
         /* 移动端搜索框内的状态选择器 */
     .search-box select {
         flex: 1;
         padding: 8px 10px;
         font-size: 13px;
         min-width: 0;
         border: 1px solid #dee2e6;
         border-radius: 8px;
         background: white;
         cursor: pointer;
         color: #333;
     }
    
    /* 添加数据区域优化 */
    .add-data-section {
        margin: 15px 0;
        padding: 15px;
    }
    
    .add-btn {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    /* 数据列表优化 */
    .data-list {
        margin: 15px 0;
        padding: 15px;
    }
    
    .data-item {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .data-header {
        margin-bottom: 8px;
    }
    
    .customer-name {
        font-size: 16px;
    }
    
    .status-badge {
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .data-info {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        font-size: 13px;
    }
    
    .data-info span {
        gap: 4px;
    }
    
         /* 移动端导航栏 */
     .data-header-nav {
         padding: 8px 12px;
         font-size: 12px;
         margin-bottom: 10px;
     }
     
     /* 移动端数据项单行显示 */
     .data-item {
         display: flex;
         align-items: center;
         gap: 4px;
         padding: 8px 12px;
         margin-bottom: 8px;
         min-width: 0;
     }
     
     .data-item .customer-name {
         flex: 1.5;
         font-size: 14px;
         min-width: 0;
         overflow: hidden;
         text-overflow: ellipsis;
         white-space: nowrap;
     }
     
     .data-item .status-badge {
         flex: 1;
         font-size: 10px;
         padding: 2px 4px;
     }
     
     .data-item .salesman-info {
         flex: 1;
         font-size: 11px;
     }
     
     .data-item .time-info {
         flex: 2;
         font-size: 11px;
     }
    
    /* 加载指示器优化 */
    .loading-indicator, .no-more-data {
        padding: 15px;
        font-size: 13px;
    }
    
    /* 模态框优化 */
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .form-group {
        margin-bottom: 15px;
        padding: 0 15px;
    }
    
    .form-group label {
        margin-bottom: 6px;
        font-size: 14px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 8px;
        padding: 15px;
        align-items: center;
    }
    
    .submit-btn, .cancel-btn {
        padding: 10px;
        font-size: 14px;
    }
    
    /* 详情页面优化 */
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }
    
    .detail-label {
        flex: none;
        font-size: 14px;
    }
    
    .detail-value {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .header-content {
        padding: 8px 10px;
    }
    
    .header-content h1 {
        font-size: 1.1rem;
    }
    
         /* 搜索区域进一步优化 */
     .search-section {
         margin: 10px 0;
         padding: 12px;
     }
     
     .search-box {
         gap: 6px;
         margin-bottom: 10px;
     }
     
     .search-box input {
         padding: 6px 8px;
         font-size: 12px;
     }
     
     .search-box button {
         padding: 6px 10px;
         font-size: 12px;
     }
     
     .filter-box {
         gap: 6px;
     }
     
     .filter-box select {
         padding: 6px 8px;
         font-size: 12px;
     }
     
     .search-box select {
         padding: 6px 8px;
         font-size: 12px;
     }
    
    /* 添加数据区域进一步优化 */
    .add-data-section {
        margin: 10px 0;
        padding: 12px;
    }
    
    .add-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    /* 数据列表进一步优化 */
    .data-list {
        margin: 10px 0;
        padding: 12px;
    }
    
         .data-header-nav {
         padding: 6px 10px;
         font-size: 11px;
         margin-bottom: 8px;
     }
     
     .data-item {
         padding: 6px 10px;
         margin-bottom: 6px;
         gap: 3px;
         min-width: 0;
     }
     
     .data-item .customer-name {
         font-size: 13px;
         min-width: 0;
         overflow: hidden;
         text-overflow: ellipsis;
         white-space: nowrap;
     }
     
     .data-item .status-badge {
         font-size: 9px;
         padding: 1px 3px;
     }
     
     .data-item .salesman-info {
         font-size: 10px;
     }
     
     .data-item .time-info {
         font-size: 10px;
     }
    
    /* 登录页面优化 */
    .login-card {
        padding: 25px 15px;
    }
    
    .login-header h1 {
        font-size: 1.3rem;
    }
    
    .login-form input {
        padding: 12px;
        font-size: 14px;
    }
    
    .login-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    /* 详情页面进一步优化 */
    .detail-card {
        padding: 15px;
    }
    
    .detail-header h2 {
        font-size: 1.3rem;
    }
    
    .detail-row {
        padding: 10px;
    }
    
    .detail-label {
        font-size: 13px;
    }
    
    .detail-value {
        font-size: 13px;
    }
} 