/* 自定义样式 */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: 600;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* 按钮样式 */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

/* 表格样式 */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: var(--dark-color);
    background-color: var(--light-color);
}

.table td {
    vertical-align: middle;
}

/* 表单样式 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* 徽章样式 */
.badge {
    font-size: 0.75em;
    font-weight: 600;
}

/* 统计卡片样式 */
.card.bg-primary,
.card.bg-success,
.card.bg-info,
.card.bg-warning {
    border: none;
}

.card.bg-primary .card-title,
.card.bg-success .card-title,
.card.bg-info .card-title,
.card.bg-warning .card-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card.bg-primary h2,
.card.bg-success h2,
.card.bg-info h2,
.card.bg-warning h2 {
    font-weight: 700;
    margin-bottom: 0;
}

/* 模态框样式 */
.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    background-color: var(--light-color);
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.125);
    background-color: var(--light-color);
}

/* Toast样式 */
.toast {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.toast-header {
    background-color: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn {
        font-size: 0.875rem;
    }
}

/* 加载动画 */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

/* 下拉菜单样式 */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item:hover {
    background-color: var(--light-color);
}

/* 分页样式 */
.pagination {
    margin-bottom: 0;
}

.page-link {
    border: none;
    color: var(--primary-color);
}

.page-link:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

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

/* 警告框样式 */
.alert {
    border: none;
    border-radius: 0.375rem;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* 自定义滚动条 */
.table-responsive::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* 状态指示器 */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-active {
    background-color: var(--success-color);
}

.status-inactive {
    background-color: var(--secondary-color);
}

.status-expired {
    background-color: var(--danger-color);
}

/* 代码块样式 */
.code-block {
    background-color: var(--light-color);
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.375rem;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
}

/* 图标样式 */
.bi {
    vertical-align: middle;
}

.display-4 {
    font-size: 3rem;
}

/* 自定义按钮组 */
.btn-group-vertical .btn {
    border-radius: 0;
}

.btn-group-vertical .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
}

.btn-group-vertical .btn:last-child {
    border-bottom-left-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* 进度条样式 */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
}

.progress-bar {
    background-color: var(--primary-color);
}

/* 列表组样式 */
.list-group-item {
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

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

/* 面包屑导航 */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: var(--secondary-color);
}

/* 标签页样式 */
.nav-tabs {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.nav-tabs .nav-link {
    border: none;
    color: var(--secondary-color);
    border-bottom: 2px solid transparent;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: transparent;
    border-bottom-color: var(--primary-color);
}

/* 折叠面板样式 */
.accordion-button {
    background-color: #fff;
    border: none;
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    background-color: var(--light-color);
    color: var(--dark-color);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.125);
}

/* 工具类 */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.user-select-none {
    user-select: none;
}

/* 打印样式 */
@media print {
    .navbar,
    .btn,
    .modal,
    .toast-container {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .table {
        border: 1px solid #000 !important;
    }
    
    .table th,
    .table td {
        border: 1px solid #000 !important;
    }
}

/* 导航药丸样式 */
.nav-pills-container {
    display: flex;
    background: #f8f9fa;
    border-radius: 50px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.nav-pill {
    position: relative;
    border: none;
    background: transparent;
    padding: 12px 24px;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-width: 120px;
    overflow: hidden;
}

.nav-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-pill-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.nav-pill i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.nav-pill span {
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-pill-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.nav-pill.active .nav-pill-indicator {
    transform: scaleX(1);
}

.nav-pill.active .nav-pill-content {
    color: white;
}

.nav-pill.active i {
    transform: scale(1.1);
}

.nav-pill.active span {
    transform: translateX(2px);
}

/* 用户管理按钮特殊样式 */
.nav-pill[onclick*="UserManagement"] .nav-pill-indicator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 卡密管理按钮特殊样式 */
.nav-pill[onclick*="CardManagement"] .nav-pill-indicator {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

/* 按钮点击动效 */
.nav-pill:active {
    transform: translateY(0) scale(0.95);
}

/* 涟漪效果 */
.nav-pill {
    position: relative;
    overflow: hidden;
}

.nav-pill::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 3;
}

.nav-pill:active::before {
    width: 300px;
    height: 300px;
}

/* 悬停时的微妙光效 */
.nav-pill::after {
    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;
    z-index: 3;
}

.nav-pill:hover::after {
    left: 100%;
}

/* 管理区域切换动效 */
#userManagementSection,
#cardManagementSection {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateX(0);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .nav-pills-container {
        padding: 3px;
    }
    
    .nav-pill {
        padding: 10px 20px;
        min-width: 100px;
    }
    
    .nav-pill span {
        font-size: 0.85rem;
    }
    
    .nav-pill i {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .nav-pill {
        padding: 8px 16px;
        min-width: 80px;
    }
    
    .nav-pill span {
        font-size: 0.8rem;
    }
}

/* 新增样式 - 管理后台增强设计 */

/* 渐变背景卡片头部 */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}

/* 统计卡片样式 */
.card.border-0.bg-light {
    transition: all 0.3s ease;
    border-radius: 12px !important;
}

.card.border-0.bg-light:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card.border-0.bg-light .display-6 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* 表格增强样式 */
.table-dark th {
    background-color: #343a40 !important;
    color: white !important;
    font-weight: 600;
    border: none;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* 复选框样式 */
.form-check-input {
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
    transform: scale(1.1);
}

/* 搜索框样式 */
.input-group-text {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

.input-group .form-control:focus + .input-group-text {
    border-color: #0d6efd;
    color: #0d6efd;
}

/* 批量操作卡片 */
.card.border-warning {
    border-width: 2px !important;
    border-style: solid !important;
    background-color: #fff3cd;
}

.card.border-warning .card-title {
    color: #856404;
    font-weight: 600;
}

/* 用户信息展示样式 */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.user-details h6 {
    margin-bottom: 2px;
    font-weight: 600;
}

.user-details small {
    color: #6c757d;
}

/* 角色标签样式 */
.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-super-admin {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.role-admin {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

.role-user {
    background: linear-gradient(135deg, #a8e6cf, #88d8c0);
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(168, 230, 207, 0.3);
}

/* 卡密信息样式 */
.card-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-code {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.card-type-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.card-type-2h {
    background-color: #e3f2fd;
    color: #1976d2;
}

.card-type-month {
    background-color: #e8f5e8;
    color: #388e3c;
}

.card-type-year {
    background-color: #fff3e0;
    color: #f57c00;
}

/* 状态指示器增强 */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-unused {
    background-color: #e8f5e8;
    color: #388e3c;
}

.status-used {
    background-color: #ffebee;
    color: #d32f2f;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
}

/* 使用统计样式 */
.usage-stats {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.usage-item {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    font-size: 0.8rem;
}

.usage-label {
    color: #6c757d;
}

.usage-value {
    font-weight: 600;
    color: #495057;
}

/* 操作按钮组样式 */
.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.btn-action {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 时间显示样式 */
.time-display {
    font-size: 0.8rem;
    color: #6c757d;
}

.time-display i {
    margin-right: 4px;
}

/* 进度条样式 */
.progress-sm {
    height: 4px;
    border-radius: 2px;
}

/* 动画效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-up {
    animation: slideInUp 0.3s ease-out;
}

/* 加载状态样式 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.empty-state p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* 响应式表格调整 */
@media (max-width: 768px) {
    .user-info,
    .card-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 3px;
    }
    
    .btn-action {
        width: 100%;
        text-align: center;
    }
    
    .usage-stats {
        font-size: 0.75rem;
    }
}

/* 打印样式增强 */
@media print {
    .card.border-0.bg-light {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
    
    .table-dark th {
        background-color: #f8f9fa !important;
        color: #495057 !important;
    }
    
    .btn-action {
        border: 1px solid #dee2e6 !important;
        background-color: #f8f9fa !important;
        color: #495057 !important;
    }
}

/* 新增样式 - 优化后的管理后台设计 */

/* 卡片头部装饰 */
.header-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: skewX(-15deg);
    pointer-events: none;
}

.header-icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
}

/* 统计卡片样式 */
.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--card-color), var(--card-color-light));
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.stat-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--card-color), var(--card-color-light));
    color: white;
}

.stat-card-content {
    position: relative;
}

.stat-card-label {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--card-color);
}

.stat-card-subtitle {
    color: #6c757d;
    font-size: 0.8rem;
    font-weight: 500;
}

.stat-card-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* 统计卡片颜色主题 */
.stat-card-primary {
    --card-color: #0d6efd;
    --card-color-light: #3d8bfd;
}

.stat-card-success {
    --card-color: #198754;
    --card-color-light: #2ea043;
}

.stat-card-warning {
    --card-color: #ffc107;
    --card-color-light: #ffca2c;
}

.stat-card-info {
    --card-color: #0dcaf0;
    --card-color-light: #31d2f2;
}

.stat-card-secondary {
    --card-color: #6c757d;
    --card-color-light: #7c8288;
}

.stat-card-danger {
    --card-color: #dc3545;
    --card-color-light: #e35d6a;
}

/* 搜索和筛选区域 */
.search-filter-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 2;
}

.search-input {
    padding-left: 40px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.custom-select {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.custom-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* 表格容器 */
.table-container {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.custom-table {
    margin-bottom: 0;
}

.table-header {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    color: white;
    border: none;
}

.table-header th {
    border: none;
    padding: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkbox-column {
    width: 50px;
    text-align: center;
}

/* 自定义复选框 */
.custom-checkbox {
    position: relative;
    display: inline-block;
}

.custom-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.custom-checkbox label {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.custom-checkbox input[type="checkbox"]:checked + label {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* 批量操作卡片 */
.bulk-actions-card {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.2);
}

.bulk-actions-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #856404;
    font-weight: 600;
    font-size: 1rem;
}

.bulk-actions-content {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* 自定义分页 */
.custom-pagination {
    margin-bottom: 0;
}

.custom-pagination .page-link {
    border: none;
    color: var(--primary-color);
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.custom-pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.custom-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), #3d8bfd);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.custom-pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: transparent;
    cursor: not-allowed;
}

/* 按钮样式增强 */
.btn.rounded-pill {
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn.rounded-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn.rounded-pill:active {
    transform: translateY(0);
}

/* 表格行悬停效果 */
.custom-table tbody tr {
    transition: all 0.3s ease;
}

.custom-table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .stat-card-value {
        font-size: 1.5rem;
    }
    
    .search-filter-section {
        padding: 1rem;
    }
    
    .bulk-actions-content {
        flex-direction: column;
    }
    
    .bulk-actions-content .btn {
        width: 100%;
    }
    
    .header-icon-wrapper {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* 动画效果 */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stat-card {
    animation: fadeInScale 0.6s ease-out;
}

.search-filter-section {
    animation: slideInFromTop 0.6s ease-out;
}

/* 加载状态 */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* 空状态样式增强 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
    color: var(--primary-color);
}

.empty-state h5 {
    margin-bottom: 0.75rem;
    color: #495057;
    font-weight: 600;
}

.empty-state p {
    margin-bottom: 0;
    font-size: 1rem;
    opacity: 0.8;
}

/* 工具提示增强 */
.tooltip {
    font-size: 0.875rem;
    font-weight: 500;
}

.tooltip-inner {
    background-color: #343a40;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

/* 滚动条美化 */
.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0d6efd, #3d8bfd);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0b5ed7, #2d7bfd);
}

/* 新增样式 - 头部导航栏和统计概览优化 */

/* 自定义导航栏 */
.custom-navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: relative;
    overflow: visible;
    z-index: 1030;
}

.custom-navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    pointer-events: none;
}

/* 品牌标识 */
.custom-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.custom-brand:hover {
    color: white;
    transform: translateY(-2px);
}

.brand-icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* 导航链接 */
.custom-nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.75rem 1.25rem !important;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.custom-nav-link::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;
}

.custom-nav-link:hover::before {
    left: 100%;
}

.custom-nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-link-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link-content i {
    font-size: 1.1rem;
}

/* 用户下拉菜单 */
.custom-user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1000;
}

.custom-user-dropdown:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.username {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-badge {
    background: linear-gradient(135deg, #ffc107, #ffca2c);
    color: #000;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-dropdown {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.5rem;
    z-index: 1050 !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    min-width: 200px;
    margin-top: 0.5rem;
}

.custom-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.custom-dropdown .dropdown-item {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    color: #333;
    text-decoration: none;
}

.custom-dropdown .dropdown-item:hover {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    transform: translateX(5px);
    color: #333;
    text-decoration: none;
}

.custom-dropdown .dropdown-item i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

/* 自定义切换按钮 */
.custom-toggler {
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.custom-toggler:focus {
    box-shadow: none;
}

/* 统计概览卡片 */
.overview-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.overview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--card-primary), var(--card-secondary));
}

.overview-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.overview-card-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.overview-card-info {
    flex: 1;
}

.overview-card-title {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.overview-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--card-primary);
    line-height: 1;
}

.overview-card-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.overview-card-trend i {
    color: #28a745;
    font-size: 0.7rem;
}

.overview-card-trend span {
    color: #28a745;
}

.overview-card-trend small {
    color: #6c757d;
    font-weight: 400;
}

.overview-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--card-primary), var(--card-secondary));
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.overview-card-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--card-primary), var(--card-secondary));
    border-radius: 50%;
    opacity: 0.1;
    z-index: 1;
}

/* 统计卡片颜色主题 */
.overview-card-primary {
    --card-primary: #0d6efd;
    --card-secondary: #3d8bfd;
}

.overview-card-success {
    --card-primary: #198754;
    --card-secondary: #2ea043;
}

.overview-card-info {
    --card-primary: #0dcaf0;
    --card-secondary: #31d2f2;
}

.overview-card-warning {
    --card-primary: #ffc107;
    --card-secondary: #ffca2c;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .brand-title {
        font-size: 1.2rem;
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
    }
    
    .brand-icon-wrapper {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .overview-card {
        padding: 1.5rem;
    }
    
    .overview-card-value {
        font-size: 2rem;
    }
    
    .overview-card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .custom-user-dropdown {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .user-info {
        align-items: center;
    }
}

@media (max-width: 576px) {
    .custom-brand {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .brand-text {
        align-items: center;
    }
    
    .overview-card-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .overview-card-icon {
        align-self: center;
    }
}

/* 确保下拉菜单正确显示 */
.navbar-nav .dropdown {
    position: relative;
}

.navbar-nav .dropdown-menu {
    z-index: 1050 !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    margin-top: 0.5rem !important;
}

/* 修复可能的Bootstrap冲突 */
.dropdown-menu.show {
    display: block !important;
    z-index: 1050 !important;
}

/* 确保下拉菜单在移动端也能正确显示 */
@media (max-width: 991.98px) {
    .custom-dropdown {
        position: static !important;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
        margin-top: 0;
        border-radius: 8px;
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .custom-dropdown::before {
        display: none;
    }
    
    .custom-dropdown .dropdown-item {
        color: white;
        border-radius: 6px;
        margin: 0.25rem 0;
    }
    
    .custom-dropdown .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.2);
        color: white;
    }
}
