/* 动态主题系统 */
:root {
    /* 默认主题 - 柔和的深蓝色渐变 */
    --primary-color: linear-gradient(135deg, #3b4bcc 0%, #1a237e 100%);
    --primary-hover: linear-gradient(135deg, #2d3ac2 0%, #0d47a1 100%);
    --secondary-color: linear-gradient(135deg, #5c6bc0 0%, #3949ab 100%);
    --success-color: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    --danger-color: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
    --warning-color: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
    --info-color: linear-gradient(135deg, #26c6da 0%, #00acc1 100%);
    --light-color: #f5f5f5;
    --dark-color: #212121;
    
    /* 组件变量 - 完全覆盖Bootstrap */
    --bs-primary: color-mix(in srgb, var(--primary-color) 70%, white);
    --bs-primary-rgb: 26, 35, 126;
    --bs-primary-hover: color-mix(in srgb, var(--primary-hover) 70%, white);
    --bs-success: color-mix(in srgb, var(--success-color) 70%, white);
    --bs-danger: color-mix(in srgb, var(--danger-color) 70%, white);
    --bs-warning: color-mix(in srgb, var(--warning-color) 70%, white);
    --bs-info: color-mix(in srgb, var(--info-color) 70%, white);
    --bs-light: var(--light-color);
    --bs-dark: var(--dark-color);
    
    /* 主题切换动画 */
    --transition-time: 0.3s;
}

/* 主题切换动画 */
body {
    transition: 
        background-color 0.3s ease,
        color 0.3s ease;
}

/* 主题切换机制 */
body[data-theme] {
    /* 动态主题将覆盖这些变量 */
}

/* 主题切换类 */
.theme-default {
    /* 默认主题使用根变量 */
}

/* 清新绿色主题 - 渐变版 */
.theme-green {
    --primary-color: linear-gradient(135deg, #4ade80 0%, #2b9348 100%);
    --primary-hover: linear-gradient(135deg, #3bd171 0%, #007f5f 100%);
    --secondary-color: linear-gradient(135deg, #a3e635 0%, #80b918 100%);
    --success-color: linear-gradient(135deg, #bef264 0%, #aacc00 100%);
    --danger-color: linear-gradient(135deg, #f87171 0%, #ef233c 100%);
    --warning-color: linear-gradient(135deg, #fcd34d 0%, #ff9e00 100%);
    --info-color: linear-gradient(135deg, #6ee7b7 0%, #38b000 100%);
    --light-color: #f8f9fa;
    --dark-color: #212529;
    
    /* 降低对比度 */
    --bs-primary: color-mix(in srgb, var(--primary-color) 70%, white);
    --bs-primary-hover: color-mix(in srgb, var(--primary-hover) 70%, white);
}

/* 优雅紫色主题 - 渐变版 */
.theme-purple {
    --primary-color: linear-gradient(135deg, #a855f7 0%, #7209b7 100%);
    --primary-hover: linear-gradient(135deg, #9333ea 0%, #560bad 100%);
    --secondary-color: linear-gradient(135deg, #d946ef 0%, #b5179e 100%);
    --success-color: linear-gradient(135deg, #6366f1 0%, #4361ee 100%);
    --danger-color: linear-gradient(135deg, #fb7185 0%, #f72585 100%);
    --warning-color: linear-gradient(135deg, #fbbf24 0%, #f8961e 100%);
    --info-color: linear-gradient(135deg, #22d3ee 0%, #4cc9f0 100%);
    --light-color: #f8f9fa;
    --dark-color: #212529;
    
    /* 降低对比度 */
    --bs-primary: color-mix(in srgb, var(--primary-color) 70%, white);
    --bs-primary-hover: color-mix(in srgb, var(--primary-hover) 70%, white);
}

/* 深色模式 - 渐变版 */
.theme-dark {
    --primary-color: linear-gradient(135deg, #374151 0%, #212529 100%);
    --primary-hover: linear-gradient(135deg, #4b5563 0%, #343a40 100%);
    --secondary-color: linear-gradient(135deg, #6b7280 0%, #495057 100%);
    --success-color: linear-gradient(135deg, #34d399 0%, #20c997 100%);
    --danger-color: linear-gradient(135deg, #f87171 0%, #dc3545 100%);
    --warning-color: linear-gradient(135deg, #fbbf24 0%, #fd7e14 100%);
    --info-color: linear-gradient(135deg, #22d3ee 0%, #0dcaf0 100%);
    --light-color: #f8f9fa;
    --dark-color: #212529;
    
    /* 降低对比度 */
    --bs-primary: color-mix(in srgb, var(--primary-color) 70%, white);
    --bs-primary-hover: color-mix(in srgb, var(--primary-hover) 70%, white);
}

/* 商务蓝主题 - 渐变版 */
.theme-business {
    --primary-color: linear-gradient(135deg, #3b82f6 0%, #1e3a8a 100%);
    --primary-hover: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --secondary-color: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    --success-color: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    --danger-color: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    --warning-color: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --info-color: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    --light-color: #f8f9fa;
    --dark-color: #1e293b;
    
    /* 降低对比度 */
    --bs-primary: color-mix(in srgb, var(--primary-color) 70%, white);
    --bs-primary-hover: color-mix(in srgb, var(--primary-hover) 70%, white);
}

/* 暖橙主题 - 渐变版 */
.theme-orange {
    --primary-color: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    --primary-hover: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
    --secondary-color: linear-gradient(135deg, #fdba74 0%, #f97316 100%);
    --success-color: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    --danger-color: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    --warning-color: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    --info-color: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    --light-color: #f8f9fa;
    --dark-color: #292524;
    
    /* 降低对比度 */
    --bs-primary: color-mix(in srgb, var(--primary-color) 70%, white);
    --bs-primary-hover: color-mix(in srgb, var(--primary-hover) 70%, white);
}

/* 热情红主题 - 渐变版 */
.theme-red {
    --primary-color: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --primary-hover: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    --secondary-color: linear-gradient(135deg, #fca5a5 0%, #ef4444 100%);
    --success-color: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
    --danger-color: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);
    --warning-color: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    --info-color: linear-gradient(135deg, #7dd3fc 0%, #0284c7 100%);
    --light-color: #f8f9fa;
    --dark-color: #1c1917;
    
    /* 降低对比度 */
    --bs-primary: color-mix(in srgb, var(--primary-color) 70%, white);
    --bs-primary-hover: color-mix(in srgb, var(--primary-hover) 70%, white);
}

/* 青瓷主题 - 渐变版 */
.theme-teal {
    --primary-color: linear-gradient(135deg, #2dd4bf 0%, #0d9488 100%);
    --primary-hover: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%);
    --secondary-color: linear-gradient(135deg, #5eead4 0%, #14b8a6 100%);
    --success-color: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    --danger-color: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    --warning-color: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    --info-color: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    --light-color: #f8f9fa;
    --dark-color: #1e293b;
    
    /* 降低对比度 */
    --bs-primary: color-mix(in srgb, var(--primary-color) 70%, white);
    --bs-primary-hover: color-mix(in srgb, var(--primary-hover) 70%, white);
}

/* 浪漫粉主题 - 渐变版 */
.theme-pink {
    --primary-color: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    --primary-hover: linear-gradient(135deg, #db2777 0%, #be185d 100%);
    --secondary-color: linear-gradient(135deg, #f9a8d4 0%, #ec4899 100%);
    --success-color: linear-gradient(135deg, #4ade80 0%, #10b981 100%);
    --danger-color: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    --warning-color: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
    --info-color: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%);
    --light-color: #f8f9fa;
    --dark-color: #1e293b;
    
    /* 降低对比度 */
    --bs-primary: color-mix(in srgb, var(--primary-color) 70%, white);
    --bs-primary-hover: color-mix(in srgb, var(--primary-hover) 70%, white);
}

/* 柔和渐变色主题 */
.theme-soft {
    --primary-color: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 50%, #a5b4fc 100%);
    --primary-hover: linear-gradient(135deg, #d1d8ff 0%, #b8c3fe 50%, #95a5fa 100%);
    --secondary-color: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #bae6fd 100%);
    --success-color: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
    --danger-color: linear-gradient(135deg, #fef2f2 0%, #fee2e2 50%, #fecaca 100%);
    --warning-color: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);
    --info-color: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    
    /* 更柔和的背景色 */
    --bs-body-bg: #f1f5f9;
    --bs-light-rgb: 248, 250, 252;
    
    /* 降低对比度 */
    --bs-primary: color-mix(in srgb, var(--primary-color) 50%, white);
    --bs-primary-hover: color-mix(in srgb, var(--primary-hover) 50%, white);
    
    /* 更柔和的文本颜色 */
    --bs-body-color: #334155;
    --bs-heading-color: #1e293b;
}

/* 应用主题到页面元素 */
:root {
    --bs-primary: var(--primary-color);
    --bs-primary-hover: var(--primary-hover);
}

body {
    background-color: var(--light-color) !important;
    color: var(--dark-color) !important;
}

/* 按钮样式 */
.btn-primary {
    --bs-btn-bg: var(--primary-color) !important;
    --bs-btn-border-color: var(--primary-color) !important;
    --bs-btn-hover-bg: var(--primary-hover) !important;
    --bs-btn-hover-border-color: var(--primary-hover) !important;
    --bs-btn-active-bg: var(--primary-hover) !important;
    --bs-btn-active-border-color: var(--primary-hover) !important;
}

/* 导航栏 */
.navbar.bg-primary {
    --bs-bg-opacity: 1;
    background-color: var(--primary-color) !important;
}

/* 卡片 */
.card-header {
    --bs-bg-opacity: 1;
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* 文本和背景 */
.text-primary {
    --bs-text-opacity: 1;
    color: var(--primary-color) !important;
}

.bg-primary {
    --bs-bg-opacity: 1;
    background-color: var(--primary-color) !important;
}

/* 表单元素 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-color), 0.25);
}

/* 链接 */
a {
    color: var(--primary-color);
}

/* 表格 */
.table-primary {
    --bs-table-bg: var(--primary-color);
    --bs-table-striped-bg: color-mix(in srgb, var(--primary-color) 95%, white);
}

/* 警告框 */
.alert-primary {
    --bs-alert-bg: color-mix(in srgb, var(--primary-color) 15%, white);
    --bs-alert-border-color: var(--primary-color);
    --bs-alert-color: var(--primary-color);
}

/* 分页样式 */
.pagination {
    --bs-pagination-color: var(--dark-color);
    --bs-pagination-bg: var(--light-color);
    --bs-pagination-border-color: #dee2e6;
    --bs-pagination-hover-color: var(--dark-color);
    --bs-pagination-hover-bg: #e9ecef;
    --bs-pagination-hover-border-color: #dee2e6;
    --bs-pagination-focus-color: var(--dark-color);
    --bs-pagination-focus-bg: #e9ecef;
    --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(var(--primary-color), 0.25);
    --bs-pagination-active-color: #fff;
    --bs-pagination-active-bg: var(--primary-color);
    --bs-pagination-active-border-color: var(--primary-color);
    --bs-pagination-disabled-color: #6c757d;
    --bs-pagination-disabled-bg: var(--light-color);
    --bs-pagination-disabled-border-color: #dee2e6;
}


/* 页脚文字样式 */
footer {
    color: white !important;
    position: relative;
    z-index: 1001;
}

footer a {
    color: white !important;
}

footer .text-muted {
    color: rgba(255,255,255,0.7) !important;
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.page-link {
    transition: all var(--transition-time) ease;
}