/* 全局样式 */
body {
    background-color: #f8f9fa;
}

/* 上传区域样式 */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background-color: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}

.upload-area.dragover {
    border-color: #0d6efd;
    background-color: #e7f3ff;
}

.upload-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.upload-content h6 {
    color: #495057;
    margin-bottom: 0.5rem;
}

/* 統計樣式 */
.stat-item {
    padding: 10px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-value {
    font-weight: 600;
}

/* 进度条样式 */
.progress {
    height: 8px;
    border-radius: 4px;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 8px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 8px 8px 0 0 !important;
}

/* 按钮样式 */
.btn {
    border-radius: 6px;
    font-weight: 500;
}

/* 徽章样式 */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
}

/* 狀態顏色 */
.status-parsing {
    background-color: #ffc107 !important;
}

.status-completed {
    background-color: #198754 !important;
}

.status-processing {
    background-color: #0d6efd !important;
}

.status-error {
    background-color: #dc3545 !important;
}

.status-cancelled {
    background-color: #6c757d !important;
}

/* 通知样式 */
.toast {
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.toast-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* 表格样式 */
.table {
    font-size: 0.875rem;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
}

/* 錯誤樣式 */
.error-item {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.error-item .error-field {
    font-weight: 600;
    color: #842029;
}

.error-item .error-message {
    color: #721c24;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* 成功样式 */
.success-item {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

/* 警告样式 */
.warning-item {
    background-color: #fff3cd;
    border: 1px solid #ffecb3;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

/* 載入動畫 */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .upload-area {
        padding: 20px 10px;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* 隐藏元素 */
.d-none {
    display: none !important;
}

/* 文本省略 */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 链接样式 */
a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 分页样式 */
.pagination {
    justify-content: center;
}

.page-link {
    border-radius: 6px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* 模态框样式 */
.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #f0f0f0;
}

.modal-footer {
    border-top: 1px solid #f0f0f0;
}