/* 数据采集页面专用样式 */

/* 页面导航 */
.page-nav {
    background: white;
    border-bottom: 1px solid #E5E7EB;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-back {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-back:hover {
    color: #2D4FCC;
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.status-badge.in-progress {
    background: rgba(29, 64, 175, 0.1);
    color: var(--primary-color);
}

.status-badge.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.progress-text {
    color: #6B7280;
    font-size: 0.9rem;
}

/* 主内容区域 */
.data-collection-main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.collection-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start;
}

/* 左侧字段侧边栏 */
.field-sidebar {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 2rem;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #E5E7EB;
}

.sidebar-header h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.expand-all {
    background: none;
    border: 1px solid var(--primary-light);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.expand-all:hover {
    background: var(--primary-light);
    color: white;
}

/* 字段分类 */
.field-category {
    margin-bottom: 1rem;
    border: 1px solid #E5E7EB;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.field-category.active {
    border-color: var(--primary-color);
}

.category-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #F8FAFC;
    cursor: pointer;
    transition: var(--transition);
}

.category-header:hover {
    background: #F0F4F8;
}

.category-icon {
    font-size: 1.2rem;
    margin-right: 0.75rem;
}

.category-header h4 {
    flex: 1;
    font-size: 1rem;
    color: var(--primary-color);
    margin: 0;
}

.category-arrow {
    color: #6B7280;
    transition: transform 0.3s ease;
}

.field-category.active .category-arrow {
    transform: rotate(90deg);
}

/* 字段列表 */
.field-list {
    background: white;
    max-height: 300px;
    overflow-y: auto;
}

.field-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #F1F5F9;
    transition: var(--transition);
}

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

.field-item:hover {
    background: #F8FAFC;
}

.field-item input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 16px;
    height: 16px;
}

.field-item label {
    flex: 1;
    cursor: pointer;
    font-size: 0.9rem;
}

.field-status {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    background: var(--danger-color);
    color: white;
}

.field-item.required .field-status {
    background: var(--danger-color);
}

/* 右侧内容区域 */
.collection-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 导入区域 */
.import-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.import-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.import-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.import-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border: 2px solid #E5E7EB;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.import-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.import-card .card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.import-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.import-card p {
    color: #6B7280;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.import-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.import-btn:hover {
    background: #2D4FCC;
    transform: scale(1.05);
}

/* 预览区域 */
.preview-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.preview-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.preview-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #E5E7EB;
}

.preview-stats {
    display: flex;
    gap: 2rem;
}

.preview-stats span {
    color: #6B7280;
}

.preview-stats strong {
    color: var(--primary-color);
}

.preview-actions {
    display: flex;
    gap: 1rem;
}

/* 预览表格 */
.preview-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #E5E7EB;
    border-radius: var(--border-radius);
}

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

.preview-table th,
.preview-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

.preview-table th {
    background: #F8FAFC;
    font-weight: 600;
    color: var(--primary-color);
    position: sticky;
    top: 0;
}

.preview-table tr:hover {
    background: #F8FAFC;
}

.status-complete {
    color: var(--success-color);
    font-weight: 500;
}

.status-missing {
    color: var(--danger-color);
    font-weight: 500;
}

/* 缺失数据区域 */
.missing-data-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.missing-data-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.missing-charts {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.chart-container {
    height: 200px;
}

.missing-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.btn-warning:hover {
    background: #D97706;
}

/* 文件上传区域 */
.file-upload-area {
    border: 2px dashed #D1D5DB;
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: #F0F9FF;
}

.upload-placeholder {
    cursor: pointer;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #6B7280;
}

.upload-placeholder div {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.upload-placeholder small {
    color: #6B7280;
}

.upload-progress {
    text-align: center;
}

.upload-progress .progress-bar {
    margin: 1rem auto;
    max-width: 300px;
}

/* 按钮样式 */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.btn-primary:hover {
    background: #2D4FCC;
}

.btn-secondary {
    background: #6B7280;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.btn-secondary:hover {
    background: #4B5563;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .collection-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .field-sidebar {
        position: static;
    }
    
    .import-options {
        grid-template-columns: 1fr;
    }
    
    .missing-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .preview-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .preview-stats {
        justify-content: space-between;
    }
    
    .preview-actions {
        justify-content: center;
    }
}

/* 动画效果 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease;
}

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

.pulse {
    animation: pulse 2s infinite;
}