/**
 * 主题颜色 CSS 变量
 * 用于支持动态主题颜色切换
 */

:root {
    /* 默认主题色（蓝色） */
    --theme-primary: #4379EE;
    --theme-primary-dark: #2a5fd6;
    --theme-primary-light: #5c8af1;
    
    /* 渐变色 */
    --theme-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 使用主题色的组件 */
.btn-primary {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--theme-primary-dark) !important;
    border-color: var(--theme-primary-dark) !important;
}

.badge-primary {
    background-color: var(--theme-primary) !important;
}

.text-primary {
    color: var(--theme-primary) !important;
}

.bg-primary {
    background-color: var(--theme-primary) !important;
}

/* 链接颜色 */
a {
    color: var(--theme-primary);
}

a:hover {
    color: var(--theme-primary-dark);
}

/* 导航栏激活状态 */
.navbar-custom .nav-link.active,
.navbar-custom .nav-link:hover {
    color: var(--theme-primary) !important;
}

/* 侧边栏激活状态 */
#sidebar-menu a.active,
#sidebar-menu a:hover {
    color: var(--theme-primary) !important;
}

#sidebar-menu > ul > li > a.active {
    color: var(--theme-primary) !important;
}

/* 进度条 */
.progress-bar {
    background-color: var(--theme-primary) !important;
}

/* 分页 */
.pagination .page-item.active .page-link {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
}

/* 表单焦点 */
.form-control:focus,
.custom-select:focus {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(67, 121, 238, 0.25) !important;
}

/* 复选框和单选框 */
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
}

/* 下拉菜单激活 */
.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--theme-primary) !important;
}

/* 表格边框 */
.table thead th {
    border-bottom: 2px solid var(--theme-primary) !important;
}

/* 标签页 */
.nav-tabs .nav-link.active,
.nav-tabs .nav-link:hover {
    border-color: var(--theme-primary) !important;
    color: var(--theme-primary) !important;
}

/* 模态框头部 */
.modal-header {
    border-bottom: 2px solid var(--theme-primary) !important;
}

/* 警告框 */
.alert-primary {
    background-color: rgba(67, 121, 238, 0.1) !important;
    border-color: var(--theme-primary) !important;
    color: var(--theme-primary) !important;
}

/* 时间轴 */
.timeline-item:before {
    border-left: 2px solid var(--theme-primary) !important;
}

.timeline-item .timeline-badge {
    background-color: var(--theme-primary) !important;
}

/* 卡片边框顶部 */
.card-primary {
    border-top: 3px solid var(--theme-primary) !important;
}

/* 按钮组 */
.btn-group-vertical > .btn-primary:not(:last-child),
.btn-group > .btn-primary:not(:last-child) {
    border-right-color: var(--theme-primary-dark) !important;
}

/* 自定义滚动条 */
::-webkit-scrollbar-thumb {
    background-color: var(--theme-primary-light) !important;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--theme-primary) !important;
}
