/**
 * Data Manager UI Styles
 * 数据管理界面样式 - 优化版本
 */

/* 页面基础样式 */
.data-manager-main {
    background: #f8f8f8;
    min-height: 100vh;
    margin-left: 0 !important; /* 覆盖主页面的侧边栏边距 */
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* 防止移动端出现水平滚动条 */
}

.data-manager-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    width: 100%;
    box-sizing: border-box;
}

/* 导入导出区域卡片样式 */
.import-section,
.export-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden; /* 卡片内部禁止横向溢出 */
}

@media (max-width: 768px) {
    .import-section .file-actions {
        display: flex;
        flex-wrap: wrap; /* 按钮在窄屏下自动换行 */
        gap: 10px;
    }
    .import-section .file-actions .btn {
        flex: 1 1 calc(50% - 8px);
        min-width: 140px;
    }
}

@media (max-width: 480px) {
    .import-section .file-actions .btn {
        flex: 1 1 100%; /* 超小屏下单列按钮 */
    }
}
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 20px;
    color: white;
    box-shadow: 0 8px 32px rgba(79, 70, 229, 0.3);
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.page-description {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
}

/* 操作区域 */
.action-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

/* 导入导出区域卡片样式 */
.import-section,
.export-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.import-section:hover,
.export-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.import-section h2,
.export-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 基础样式 - 保留模态框相关 */
.data-manager-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.data-manager-modal.show {
    opacity: 1;
}

.data-manager-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.data-manager-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.data-manager-modal.show .data-manager-content {
    transform: scale(1);
}

/* 头部样式 */
.data-manager-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.data-manager-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.data-manager-icon {
    font-size: 24px;
}

.data-manager-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: #6b7280;
    font-size: 18px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.data-manager-close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* 标签页导航 */
.data-manager-tabs {
    display: flex;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.data-manager-tab {
    flex: 1;
    padding: 16px 20px;
    border: none;
    background: none;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.data-manager-tab:hover {
    background: #f3f4f6;
    color: #374151;
}

.data-manager-tab.active {
    background: #ffffff;
    color: #3b82f6;
    border-bottom: 2px solid #3b82f6;
}

.tab-icon {
    font-size: 16px;
}

/* 主体内容 */
.data-manager-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.data-manager-tab-content {
    display: none;
}

.data-manager-tab-content.active {
    display: block;
}

/* 通用区块样式 */
.export-section,
.import-section,
.backup-section {
    max-width: 100%;
}

.export-section h3,
.import-section h3,
.backup-section h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.section-desc {
    margin: 0 0 24px 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

.export-section h4,
.import-section h4,
.backup-section h4 {
    margin: 24px 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

/* 导出格式选择 */
.format-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.format-option {
    cursor: pointer;
}

.format-option input[type="radio"] {
    display: none;
}

.format-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.format-option:hover .format-card {
    border-color: #d1d5db;
    background: #f9fafb;
}

.format-option input[type="radio"]:checked + .format-card {
    border-color: #3b82f6;
    background: #eff6ff;
}

.format-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.format-info {
    flex: 1;
}

.format-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.format-desc {
    font-size: 12px;
    color: #6b7280;
}

/* 选项组 */
.option-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-option,
.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 8px 0;
}

.checkbox-option input[type="checkbox"],
.radio-option input[type="radio"] {
    display: none;
}

.checkbox-custom,
.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    background: #ffffff;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.checkbox-custom {
    border-radius: 4px;
}

.radio-custom {
    border-radius: 50%;
}

.checkbox-option:hover .checkbox-custom,
.radio-option:hover .radio-custom {
    border-color: #9ca3af;
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom {
    background: #3b82f6;
    border-color: #3b82f6;
    position: relative;
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #3b82f6;
    position: relative;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
}

.option-text {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.option-hint {
    font-size: 12px;
    color: #6b7280;
    margin-left: 4px;
}

.option-content {
    flex: 1;
}

.option-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.option-desc {
    font-size: 12px;
    color: #6b7280;
}

/* 文件拖拽区域 */
.import-area {
    margin-top: 20px;
}

.file-drop-zone {
    border: 2px dashed #d1d5db;
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f9fafb, #ffffff);
    position: relative;
    overflow: hidden;
}

.file-drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(124, 58, 237, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-drop-zone:hover {
    border-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.15);
}

.file-drop-zone:hover::before {
    opacity: 1;
}

.file-drop-zone.drag-over {
    border-color: #4f46e5;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(79, 70, 229, 0.2);
}

.drop-zone-content {
    position: relative;
    z-index: 2;
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.7;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.drop-text {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.drop-subtext {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
}

.file-types {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
}

.file-input {
    display: none;
}

.select-file-btn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.select-file-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
    background: linear-gradient(135deg, #4338ca, #6d28d9);
}

/* 文件信息显示 */
.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.file-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.file-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-name::before {
    content: '📄';
    font-size: 18px;
}

.file-size {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* 通用按钮样式 */
.btn {
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
    background: linear-gradient(135deg, #4338ca, #6d28d9);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.9);
    color: #4f46e5;
    border: 2px solid #4f46e5;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.1);
}

.btn-outline:hover {
    background: #4f46e5 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 导出统计信息 */
.export-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 导出按钮区域 */
.export-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* 导出按钮样式 */
.export-btn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.export-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.export-btn:hover::before {
    left: 100%;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
    background: linear-gradient(135deg, #4338ca, #6d28d9);
}

.export-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

/* JSON导出按钮特定样式 */
.json-btn {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.json-btn:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

/* Excel导出按钮特定样式 */
.excel-btn {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.excel-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

/* 数据预览区域 */
.preview-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 32px;
    transition: all 0.3s ease;
}

.preview-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.preview-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.preview-summary {
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 12px;
    border-left: 4px solid #0ea5e9;
}

.preview-summary p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #0c4a6e;
}

.preview-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* 状态消息 */
.status-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: slideInUp 0.3s ease;
}

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

.status-message.success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.status-message.error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.status-message.info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.status-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.status-text {
    flex: 1;
    font-size: 14px;
}

/* 顶部导航栏优化 */
.top-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-link {
    transition: all 0.3s ease;
    border-radius: 8px;
}

.nav-link:hover {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    transform: translateY(-1px);
}

.nav-link.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .action-section {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .data-manager-container {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 24px 16px;
    }
    
    .page-header h1 {
        font-size: 24px;
        flex-direction: column;
        gap: 8px;
    }
    
    .import-section,
    .export-section {
        padding: 24px 20px;
    }
    
    .file-drop-zone {
        padding: 32px 16px;
    }
    
    .export-stats {
        grid-template-columns: 1fr;
    }
    
    .export-buttons {
        flex-direction: column;
    }
    
    .preview-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .data-manager-container {
        padding: 12px;
    }
    
    .page-header {
        padding: 20px 12px;
        margin-bottom: 24px;
    }
    
    .page-header h1 {
        font-size: 20px;
    }
    
    .import-section,
    .export-section,
    .preview-section {
        padding: 20px 16px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .file-drop-zone {
        padding: 24px 12px;
    }
    
    .upload-icon {
        font-size: 48px;
    }
    
    .drop-text {
        font-size: 16px;
    }
}

.backup-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.backup-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.backup-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.backup-info {
    flex: 1;
}

.backup-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.backup-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: #6b7280;
}

.backup-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.backup-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.empty-icon {
    font-size: 158px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-text {
    font-size: 26px;
    margin-bottom: 4px;
	text-align: center;
	color: #222;
}

.empty-desc {
    font-size: 14px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

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

.btn-primary {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.btn-primary:hover:not(:disabled) {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-outline {
    background: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}

.btn-outline:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    font-size: 14px;
}

.btn-sm .btn-icon {
    font-size: 12px;
}

/* 操作按钮区域 */
.export-actions,
.import-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

/* 底部样式 */
.data-manager-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.footer-info {
    flex: 1;
}

.info-text {
    font-size: 12px;
    color: #6b7280;
}

.footer-actions {
    display: flex;
    gap: 12px;
}

/* 加载遮罩 */
.data-manager-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 12px;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

.loading-text {
    font-size: 14px;
    color: #6b7280;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .data-manager-content {
        width: 95%;
        max-height: 95vh;
        margin: 0;
    }
    
    .data-manager-header {
        padding: 16px 20px;
    }
    
    .data-manager-body {
        padding: 20px;
    }
    
    .data-manager-tabs {
        flex-direction: column;
    }
    
    .data-manager-tab {
        padding: 12px 16px;
    }
    
    .format-options {
        grid-template-columns: 1fr;
    }
    
    .backup-create-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .backup-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .backup-actions {
        justify-content: flex-end;
    }
    
    .backup-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .data-manager-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .footer-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .data-manager-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .data-manager-header h2 {
        font-size: 18px;
    }
    
    .data-manager-body {
        padding: 16px;
    }
    
    .upload-area {
        padding: 30px 16px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .data-manager-content {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .data-manager-header {
        background: #111827;
        border-color: #374151;
    }
    
    .data-manager-header h2 {
        color: #f9fafb;
    }
    
    .data-manager-close {
        color: #9ca3af;
    }
    
    .data-manager-close:hover {
        background: #374151;
        color: #f3f4f6;
    }
    
    .data-manager-tabs {
        background: #111827;
        border-color: #374151;
    }
    
    .data-manager-tab {
        color: #9ca3af;
    }
    
    .data-manager-tab:hover {
        background: #374151;
        color: #f3f4f6;
    }
    
    .data-manager-tab.active {
        background: #1f2937;
        color: #60a5fa;
        border-color: #60a5fa;
    }
    
    .section-desc {
        color: #9ca3af;
    }
    
    .format-card {
        background: #374151;
        border-color: #4b5563;
    }
    
    .format-option:hover .format-card {
        border-color: #6b7280;
        background: #4b5563;
    }
    
    .format-option input[type="radio"]:checked + .format-card {
        border-color: #60a5fa;
        background: #1e3a8a;
    }
    
    .format-name {
        color: #f9fafb;
    }
    
    .format-desc {
        color: #9ca3af;
    }
    
    .checkbox-custom,
    .radio-custom {
        border-color: #6b7280;
        background: #374151;
    }
    
    .checkbox-option input[type="checkbox"]:checked + .checkbox-custom,
    .radio-option input[type="radio"]:checked + .radio-custom {
        background: #60a5fa;
        border-color: #60a5fa;
    }
    
    .option-text {
        color: #f3f4f6;
    }
    
    .option-hint {
        color: #9ca3af;
    }
    
    .option-title {
        color: #f9fafb;
    }
    
    .option-desc {
        color: #9ca3af;
    }
    
    .upload-area {
        background: #374151;
        border-color: #6b7280;
    }
    
    .upload-area:hover {
        border-color: #9ca3af;
        background: #4b5563;
    }
    
    .upload-title {
        color: #f9fafb;
    }
    
    .upload-desc {
        color: #9ca3af;
    }
    
    .file-info {
        background: #374151;
        border-color: #4b5563;
    }
    
    .file-name {
        color: #f9fafb;
    }
    
    .file-size {
        color: #9ca3af;
    }
    
    .import-preview {
        background: #374151;
        border-color: #4b5563;
    }
    
    .preview-stat {
        background: #1f2937;
        border-color: #4b5563;
    }
    
    .stat-label {
        color: #9ca3af;
    }
    
    .stat-value {
        color: #f9fafb;
    }
    
    .backup-create {
        background: #374151;
        border-color: #4b5563;
    }
    
    .backup-desc {
        color: #9ca3af;
    }
    
    .backup-item {
        background: #374151;
        border-color: #4b5563;
    }
    
    .backup-item:hover {
        border-color: #6b7280;
    }
    
    .backup-name {
        color: #f9fafb;
    }
    
    .backup-meta {
        color: #9ca3af;
    }
    
    .btn-outline {
        background: #374151;
        color: #f3f4f6;
        border-color: #6b7280;
    }
    
    .btn-outline:hover:not(:disabled) {
        background: #4b5563;
        border-color: #9ca3af;
    }
    
    .data-manager-footer {
        background: #111827;
        border-color: #374151;
    }
    
    .info-text {
        color: #9ca3af;
    }
    
    .data-manager-loading {
        background: rgba(31, 41, 55, 0.9);
    }
    
    .loading-text {
        color: #9ca3af;
    }
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    .data-manager-modal,
    .data-manager-content,
    .data-manager-tab,
    .format-card,
    .checkbox-custom,
    .radio-custom,
    .upload-area,
    .backup-item,
    .btn {
        transition: none;
    }
    
    .loading-spinner {
        animation: none;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .data-manager-content {
        border: 2px solid #000000;
    }
    
    .format-card,
    .backup-item,
    .file-info,
    .import-preview {
        border-width: 2px;
    }
    
    .btn {
        border-width: 2px;
    }
}

/* 打印样式 */
@media print {
    .data-manager-modal {
        display: none !important;
    }
}

/* 全局样式覆盖 */
body.data-manager-open {
    overflow: hidden;
}
/* note-manager 页面局部样式增强 */
.note-manager-page .page-header h1 {
  font-size: 24px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}
.note-manager-page .page-description {
  color: #6b7280;
  margin-top: 6px;
}

/* 卡片分区语义化：import/export */
.import-section,
.export-section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
}

/* 更清晰的按钮风格 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  background: #f3f4f6;
  color: #111827;
}
.btn:hover { background: #e5e7eb; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-icon { font-size: 14px; }

.btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.btn-primary:hover { background: #1e40af; border-color: #1e40af; }

.btn-secondary { background: #10b981; color: #fff; border-color: #10b981; }
.btn-secondary:hover { background: #059669; border-color: #059669; }

.btn-outline { background: #ffffff; color: #374151; border-color: #d1d5db; }
.btn-outline:hover { background: #f9fafb; }

/* 统计 chips 更紧凑 */
.stat-chip { 
  background: #f3f4f6; 
  border: 1px solid #e5e7eb; 
  padding: 6px 10px; 
  border-radius: 999px; 
  font-size: 13px; 
}

/* 状态消息更明显 */
.status-message {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-message.success { background: #ecfdf5; color: #065f46; }
.status-message.error { background: #fde2e2; color: #7f1d1d; }
.status-message.info { background: #e0f2fe; color: #0c4a6e; }

/* 预览框 */
.preview-box { 
  border: 1px dashed #d1d5db; 
  border-radius: 8px; 
  padding: 10px; 
  background: #fafafa; 
}

/* 移动端优化：按钮换行、容器边距更紧凑，避免遮挡 */
@media (max-width: 600px) {
  .data-manager-container { padding: 10px; }
  .file-actions, .file-info { flex-wrap: wrap; }
  .page-header h1 { font-size: 20px; }
  .section-header h3 { font-size: 16px; }
  .import-section, .export-section { padding: 12px; }
}