/* ========================================
   专业版样式表 (Professional Style)
   ======================================== */

:root {
    --primary-color: #2c3e50;      /* 深蓝灰色 - 沉稳专业 */
    --primary-light: #34495e;
    --accent-color: #3498db;       /* 亮蓝色 - 强调色 */
    --success-color: #27ae60;      /* 绿色 - 成功状态 */
    --warning-color: #f39c12;      /* 橙色 - 警告状态 */
    --danger-color: #c0392b;       /* 红色 - 错误状态 */
    --bg-color: #f5f7fa;           /* 浅灰背景 */
    --card-bg: #ffffff;            /* 卡片背景 */
    --text-main: #2c3e50;          /* 主要文字 */
    --text-secondary: #7f8c8d;     /* 次要文字 */
    --border-color: #e0e0e0;       /* 边框颜色 */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    min-height: 100vh;
    line-height: 1.6;
    color: var(--text-main);
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background-color: #ecf0f1;
}

.login-card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-color);
}

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

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

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

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-main);
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
    background: #fff;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.btn-login:hover {
    background-color: var(--primary-light);
}

.error-message {
    background: #fdeaea;
    color: var(--danger-color);
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 13px;
    border: 1px solid #fadbd8;
}

.success-message {
    background: #eafaf1;
    color: var(--success-color);
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 13px;
    border: 1px solid #d5f5e3;
}

.support-info {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 12px;
}

/* 主页面样式 */
.main-container {
    background-color: var(--bg-color);
}

.header {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    margin-bottom: 20px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.content-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.filter-card {
    background: var(--card-bg);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 500;
    color: var(--text-main);
    font-size: 14px;
}

.date-input {
    padding: 8px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    font-size: 14px;
    min-width: 150px;
}

.btn {
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #fff;
    border-color: #dcdcdc;
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: #f8f9fa;
    border-color: #c0c0c0;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #219150;
}

.notice-text {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid var(--accent-color);
}

.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.alert-danger {
    background: #fdeaea;
    color: var(--danger-color);
    border: 1px solid #fadbd8;
}

/* 表格样式 */
.table-card {
    background: var(--card-bg);
    border-radius: 6px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.data-table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
}

.data-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid var(--border-color);
}

.data-table thead th {
    padding: 12px 10px;
    font-weight: 600;
    text-align: left;
    color: var(--text-main);
    white-space: nowrap;
}

.data-table tbody tr {
    border-bottom: 1px solid #eee;
}

.data-table tbody tr:hover {
    background-color: #f1f4f6;
}

.data-table tbody td {
    padding: 10px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 列宽控制 */
.data-table th:nth-child(1), .data-table td:nth-child(1) { width: 50px; text-align: center; } /* 序号 */
.data-table th:nth-child(2), .data-table td:nth-child(2) { width: 20%; } /* 公司 */
.data-table th:nth-child(3), .data-table td:nth-child(3) { width: 80px; text-align: center; } /* 搜索 */
.data-table th:nth-child(4), .data-table td:nth-child(4) { width: 10%; } /* 联系人 */
.data-table th:nth-child(5), .data-table td:nth-child(5) { width: 12%; } /* 旺旺 */
.data-table th:nth-child(6), .data-table td:nth-child(6) { width: 12%; } /* 电话 */
.data-table th:nth-child(7), .data-table td:nth-child(7) { width: 15%; } /* 邮箱 */
.data-table th:nth-child(8), .data-table td:nth-child(8) { width: 15%; } /* 简介 */
.data-table th:nth-child(9), .data-table td:nth-child(9) { width: 10%; } /* 所在地 */
.data-table th:nth-child(10), .data-table td:nth-child(10) { width: 100px; } /* 日期 */

.data-table a {
    color: var(--accent-color);
    text-decoration: none;
}

.data-table a:hover {
    text-decoration: underline;
}

.row-number {
    color: var(--text-secondary);
    font-family: monospace;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 加载遮罩 */
.loading-overlay {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(2px);
}

.loading-content {
    box-shadow: var(--shadow-md) !important;
    border: 1px solid var(--border-color);
}

.loading-spinner {
    border-top-color: var(--accent-color) !important;
}

/* 手机端卡片风格表格 */
.data-table-card-wrapper {
    display: none;
}

.data-table-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.data-table-card-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.data-table-card-row:last-child {
    border-bottom: none;
}

.data-table-card-label {
    font-weight: 600;
    color: var(--text-main);
    font-size: 13px;
    min-width: 80px;
    flex-shrink: 0;
}

.data-table-card-value {
    color: #555;
    font-size: 13px;
    text-align: right;
    flex: 1;
    word-break: break-word;
    margin-left: 10px;
}

.data-table-card-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* 响应式 */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
    }
    
    .data-table-wrapper {
        display: none;
    }
    
    .data-table-card-wrapper {
        display: block;
    }
    
    .header-content {
        padding: 0 15px;
    }
    
    .content-wrapper {
        padding: 0 15px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .page-subtitle {
        font-size: 12px;
    }
    
    .table-card {
        padding: 15px;
    }
    
    .filter-card {
        padding: 15px;
    }
    
    .data-table thead th {
        padding: 10px 6px;
        font-size: 12px;
    }
    
    .data-table tbody td {
        padding: 8px 6px;
        font-size: 12px;
    }
}

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

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

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

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