/* 后台管理系统样式 */

/* CSS变量定义 - 气泡工坊马卡龙主题 */
:root {
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* 马卡龙配色主题 */
    --primary-mint: #4ECDC4;
    --accent-purple: #9C27B0;
    --soft-pink: #FFB6C1;
    --warm-orange: #FFA07A;
    --light-yellow: #FFEB9C;
    --sage-green: #9CAF88;
    --lavender: #DDA0DD;
    --sky-blue: #87CEEB;
    
    /* 文字颜色 */
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-muted: #95a5a6;
    --text-white: #ffffff;
    
    /* 背景色 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fffe;
    --bg-tertiary: #f5f7fa;
    --bg-muted: #ecf0f1;
    
    /* 灰度色系 */
    --gray-50: #f8f9fa;
    --gray-100: #e9ecef;
    --gray-200: #dee2e6;
    --gray-300: #ced4da;
    --gray-400: #adb5bd;
    --gray-500: #6c757d;
    --gray-600: #495057;
    --gray-700: #343a40;
    --gray-800: #212529;
    --gray-900: #1a1a1a;
    
    /* 状态色 */
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
    
    /* 阴影效果 */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    
    /* 边框半径 */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    
    /* 过渡效果 */
    --transition-fast: all 0.15s ease;
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* 间距系统 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 24px;
    --space-3xl: 32px;
    --space-4xl: 48px;
}

/* 重置管理后台的body样式 */
.admin-body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 全局样式重置 */
* {
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

/* ==================== 侧边栏 ==================== */
.admin-sidebar {
    width: 260px;
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(78, 205, 196, 0.1);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    
    /* 添加玻璃态效果 */
    background: rgba(255, 255, 255, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-sidebar.collapsed {
    transform: translateX(-260px);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 24px;
    color: var(--accent-purple);
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-toggle {
    display: none;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
}

.sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--gray-600);
    margin: 4px 0;
    transition: 0.3s;
}

/* 导航区域 */
.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 30px;
}

.nav-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding: 0 20px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-xl);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    gap: var(--space-md);
    border-radius: var(--radius-lg);
    margin: var(--space-xs) var(--space-md);
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(78, 205, 196, 0.1), transparent);
    transition: left 0.6s ease;
}

.nav-item:hover {
    background: rgba(78, 205, 196, 0.08);
    color: var(--text-primary);
    transform: translateX(4px);
}

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

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-mint), var(--accent-purple)) !important;
    color: white !important;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.nav-item.active:hover {
    background: linear-gradient(135deg, var(--primary-mint), var(--accent-purple)) !important;
    color: white !important;
    transform: translateX(0);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-purple);
}

.nav-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
    color: var(--text-secondary);
    transition: var(--transition);
    flex-shrink: 0;
}

.nav-item:hover .nav-icon {
    transform: scale(1.1);
    color: var(--primary-mint);
}

.nav-item.active .nav-icon {
    transform: scale(1.05);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    color: white;
}

.nav-text {
    font-size: 14px;
    font-weight: 500;
}


.nav-tag {
    background: #ffeee1;
    color: #ff7a18;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
}

.nav-badge {
    background: var(--accent-purple);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

/* 侧边栏底部 */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.admin-details {
    flex: 1;
}

.admin-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.admin-role {
    font-size: 12px;
    color: var(--text-secondary);
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: var(--gray-50);
    color: var(--text-primary);
}

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

/* 管理员操作按钮 */
.admin-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.admin-action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.logout-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* ==================== 主内容区 ==================== */
.admin-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition);
    background: transparent;
    width: calc(100% - 260px);
    overflow-x: auto;
    padding: 0;
}

/* 仪表盘页面已在上方定义，此处不再重复 */

/* 顶部栏 */
.admin-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0 var(--space-3xl);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    margin: var(--space-lg);
    border-radius: var(--radius-xl);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-menu-btn {
    display: none;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--gray-600);
    transition: 0.3s;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.header-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.header-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-purple);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* 内容区域 */
.admin-content {
    flex: 1;
    padding: 0;
    background: var(--gray-50);
    min-height: calc(100vh - 80px);
    width: 100%;
}

/* 仪表盘页面已在上方定义，此处不再重复 */

.page-content {
    max-width: 100%;
    margin: 0;
    width: 100%;
}

/* 仪表盘页面：使用类似queue-management的布局样式 */
#page-dashboard {
    max-width: 100%;
    margin: 0;
    padding: var(--space-2xl);
    width: 100%;
}

#page-dashboard .dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
    padding: 0;
}

@media (max-width: 1400px) {
    #page-dashboard .dashboard-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    #page-dashboard .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    #page-dashboard .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

#page-dashboard .stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    border: 1px solid rgba(78, 205, 196, 0.1);
    min-width: 0;
    position: relative;
    overflow: hidden;
}

#page-dashboard .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-mint), var(--accent-purple));
    opacity: 0;
    transition: var(--transition);
}

#page-dashboard .stat-card:hover::before {
    opacity: 1;
}

#page-dashboard .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#page-dashboard .stat-icon {
    font-size: 36px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-mint), var(--accent-purple));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.2);
    transition: var(--transition);
    flex-shrink: 0;
}

#page-dashboard .stat-card:hover .stat-icon {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 16px rgba(78, 205, 196, 0.4);
}

#page-dashboard .stat-info {
    flex: 1;
    text-align: left;
}

#page-dashboard .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.2;
}

#page-dashboard .stat-label {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 4px;
    font-weight: 500;
}

#page-dashboard .stat-change {
    font-size: 12px;
    color: var(--gray-500);
}

#page-dashboard .stat-change.positive {
    color: var(--success);
}

#page-dashboard .dashboard-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

#page-dashboard .chart-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

#page-dashboard .dashboard-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

#page-dashboard .detail-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

#page-dashboard .dashboard-recent {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

#page-dashboard .recent-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* 用户管理页面：拉宽显示，支持更多列 */
#page-users {
    max-width: 100% !important; /* 移除宽度限制，使用全宽 */
    margin: 0 !important;
    padding: 30px 20px !important; /* 保留上下内边距，减少左右内边距 */
    width: 100% !important;
}

/* 用户管理页面：移除内层page-content的宽度限制 */
#page-users .page-content {
    max-width: 100% !important; /* 移除宽度限制 */
    margin: 0 !important; /* 移除外边距 */
    padding: 0 !important; /* 移除内边距，让表格容器占满 */
    width: 100% !important;
}

/* 用户管理页面：表格容器支持横向滚动 */
#page-users .table-container {
    overflow-x: auto; /* 添加横向滚动条 */
    overflow-y: visible;
    -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
    max-width: 100%; /* 确保不超出容器 */
    margin: 0; /* 移除外边距 */
    position: relative; /* 为滚动条定位 */
}

/* 用户管理页面：表格最小宽度，确保所有列都能显示 */
#page-users .data-table {
    min-width: 2200px; /* 设置最小宽度，确保所有列都能完整显示（增加了QQ号和修改后的昵称列） */
    width: max-content; /* 根据内容自动调整宽度 */
    table-layout: auto; /* 自动列宽，根据内容调整 */
}

/* 用户管理页面：QQ号和修改后的昵称列样式 */
#page-users .user-qq-cell {
    min-width: 120px;
    font-family: monospace; /* 使用等宽字体，方便复制 */
}

#page-users .user-modified-nickname-cell {
    min-width: 150px;
}

/* ==================== 仪表盘样式 ==================== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-4xl);
    padding: var(--space-lg);
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.1), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.stat-card:hover::after {
    width: 300px;
    height: 300px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-mint), var(--accent-purple));
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: rgba(78, 205, 196, 0.3);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    font-size: 48px;
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary-mint), var(--accent-purple));
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    color: white;
    box-shadow: var(--shadow-md);
    position: relative;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

.stat-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-mint), var(--accent-purple), var(--soft-pink));
    border-radius: var(--radius-2xl);
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover .stat-icon::after {
    opacity: 0.3;
}

.stat-info {
    width: 100%;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-mint), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-change {
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
}

.stat-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

/* 图表区域 */
.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.chart-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.chart-period {
    padding: 6px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 12px;
    background: white;
    cursor: pointer;
}

.chart-content {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    border: 2px dashed var(--gray-300);
    position: relative;
    overflow: hidden;
}

.chart-content::before {
    content: "📊 图表数据加载中...";
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.chart-content canvas {
    width: 100% !important;
    height: 100% !important;
}

/* 最近活动 */
.dashboard-recent {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.recent-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.recent-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.recent-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px 0;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.recent-item:hover {
    background: var(--gray-100);
}

.recent-icon {
    font-size: 20px;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recent-info {
    flex: 1;
}

.recent-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.recent-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.recent-time {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ==================== 通知弹窗 ==================== */
.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    z-index: 10001;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close-btn {
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background: var(--gray-100);
}

.modal-body {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.notification-item:hover {
    background: var(--gray-100);
}

.notification-icon {
    font-size: 20px;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.notification-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-time {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ==================== 加载状态 ==================== */
.page-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .admin-main {
        margin-left: 0;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    #page-dashboard {
        padding: 15px;
    }
    
    #page-dashboard .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin-bottom: 20px;
    }
    
    #page-dashboard .stat-card {
        padding: 16px;
    }
    
    #page-dashboard .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 32px;
        margin-bottom: 12px;
    }
    
    #page-dashboard .stat-number {
        font-size: 1.5rem;
    }
    
    #page-dashboard .dashboard-charts {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    #page-dashboard .dashboard-details {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    #page-dashboard .dashboard-recent {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .dashboard-charts {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .chart-content {
        height: 250px;
    }
    
    .dashboard-recent {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 20px;
    }
    
    .admin-header {
        padding: 0 20px;
    }
    
    .header-stats {
        display: none;
    }
    
    #page-dashboard {
        padding: 15px;
    }
    
    #page-dashboard .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 16px;
    }
    
    #page-dashboard .stat-card {
        padding: 16px;
    }
    
    #page-dashboard .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    #page-dashboard .stat-number {
        font-size: 1.5rem;
    }
    
    #page-dashboard .dashboard-charts {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    #page-dashboard .dashboard-details {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    #page-dashboard .dashboard-recent {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .chart-card {
        padding: 20px;
    }
    
    .recent-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .admin-content {
        padding: 15px;
    }
    
    .admin-header {
        padding: 0 15px;
        height: 60px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    #page-dashboard {
        padding: 12px;
    }
    
    #page-dashboard .dashboard-stats {
        gap: 10px;
        margin-bottom: 12px;
    }
    
    #page-dashboard .stat-card {
        padding: 12px;
    }
    
    #page-dashboard .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    #page-dashboard .stat-number {
        font-size: 1.25rem;
    }
    
    #page-dashboard .stat-label {
        font-size: 12px;
    }
    
    #page-dashboard .dashboard-charts,
    #page-dashboard .dashboard-details,
    #page-dashboard .dashboard-recent {
        gap: 10px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .stat-number {
        font-size: 24px;
    }
}

/* 新增统计模块样式 */
.dashboard-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.detail-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.detail-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.detail-card h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
}

/* 工具排行榜样式 */
.tool-ranking {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.ranking-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.ranking-number {
    width: 32px;
    height: 32px;
    background: #4ECDC4;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-right: 12px;
}

.ranking-info {
    flex: 1;
}

.ranking-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.ranking-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #64748b;
}

.ranking-stats span {
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
}

.ranking-time {
    font-size: 12px;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
}

/* 交易统计样式 */
.transaction-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.transaction-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.transaction-type {
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}

.transaction-count {
    font-size: 14px;
    color: #64748b;
    margin-right: 16px;
}

.transaction-amount {
    font-weight: 600;
    color: #059669;
    font-size: 16px;
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: visible; /* 改为visible，让内容可以完整显示 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    table-layout: auto; /* 自动列宽，根据内容调整 */
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap; /* 默认不换行，保持单行显示 */
    word-break: keep-all; /* 保持单词完整 */
    overflow: visible; /* 允许内容溢出显示 */
    text-overflow: clip; /* 不截断，完整显示 */
}

/* 用户管理表格特殊样式：完整显示内容，方便复制 */
#page-users .data-table th,
#page-users .data-table td {
    white-space: nowrap; /* 不换行，保持单行显示，通过横向滚动查看 */
    word-break: keep-all; /* 保持单词完整 */
    max-width: none; /* 不限制最大宽度 */
    overflow: visible; /* 允许内容完整显示 */
    text-overflow: ellipsis; /* 如果内容太长，显示省略号（但通过横向滚动可以查看完整内容） */
    padding: 12px 20px; /* 增加内边距，让内容更易读 */
}

/* 特定列的最小宽度设置，确保内容可读 */
#page-users .user-id-cell {
    min-width: 200px;
    font-family: monospace; /* 使用等宽字体，方便复制 */
}

#page-users .user-nickname-cell {
    min-width: 120px;
}

#page-users .user-openid-cell {
    min-width: 150px;
    font-family: monospace; /* 使用等宽字体，方便复制 */
}

#page-users .user-birthday-cell {
    min-width: 100px;
    font-family: monospace; /* 使用等宽字体，方便复制 */
}

#page-users .user-guardian-cell {
    min-width: 150px;
}

#page-users .user-verified-time-cell,
#page-users .user-created-time-cell,
#page-users .user-login-time-cell {
    min-width: 140px;
    font-family: monospace; /* 使用等宽字体，方便复制 */
}

.data-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    position: sticky; /* 表头固定 */
    top: 0;
    z-index: 10;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-mint), var(--accent-purple));
    color: white;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.btn-primary::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-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    border: 1px solid rgba(78, 205, 196, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(78, 205, 196, 0.1);
    border-color: var(--primary-mint);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

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

.btn-success:hover {
    background: #218838;
}

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

.btn-warning:hover {
    background: #e0a800;
}

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

/* 状态标签 */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-pending {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.status-active {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
}

.status-inactive {
    background: rgba(108, 117, 125, 0.1);
    color: #495057;
}

.status-completed {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
}

.status-cancelled {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
}

/* 优先级标签 */
.priority-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.priority-urgent {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
}

.priority-high {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.priority-normal {
    background: rgba(23, 162, 184, 0.1);
    color: #0c5460;
}

.priority-low {
    background: rgba(108, 117, 125, 0.1);
    color: #495057;
}

/* 置顶标签 */
.featured-badge {
    background: var(--accent-purple);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
}

/* 页面头部 */
.page-header {
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.page-header p {
    color: var(--text-secondary);
    margin: 0;
}

/* 页面操作按钮 */
.page-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.page-actions .btn {
    min-width: 120px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

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

/* 筛选器 */
.filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-row {
    display: flex;
    gap: 16px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.filter-input {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

/* 表格容器 */
.table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}


/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 20px;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pagination-info {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.page-btn, .page-number {
    padding: 8px 16px;
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 40px;
    text-align: center;
}

.page-btn:hover:not(:disabled), .page-number:hover:not(.active) {
    background: linear-gradient(135deg, var(--primary-mint), var(--accent-purple));
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

.page-number.active {
    background: linear-gradient(135deg, var(--primary-mint), var(--accent-purple));
    color: white;
    border-color: transparent;
    font-weight: 600;
}

.page-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--gray-100);
    color: var(--gray-400);
}

.page-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--gray-100);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .dashboard-details {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .detail-card {
        padding: 20px;
    }
    
    .ranking-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .ranking-number {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .transaction-count {
        margin-right: 0;
    }
}

/* ==================== 年龄保护相关样式 ==================== */

/* OpenID单元格样式 */
.openid-cell {
    font-family: monospace;
    font-size: 12px;
    color: #666;
}

/* 年龄分组标签 */
.age-bucket-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.age-child, .age-U8, .age-8-15 {
    background: #e3f2fd;
    color: #1976d2;
}

.age-teen, .age-16-17 {
    background: #fff3e0;
    color: #f57c00;
}

.age-adult, .age-18+ {
    background: #e8f5e8;
    color: #388e3c;
}

.age-unknown {
    background: #f5f5f5;
    color: #666;
}

/* 未成年人标签 */
.minor-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.minor-yes {
    background: #ffebee;
    color: #d32f2f;
}

.minor-no {
    background: #e8f5e8;
    color: #388e3c;
}

/* 年龄验证状态标签 */
.verification-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.verification-badge.verified {
    background: #e8f5e8;
    color: #388e3c;
}

.verification-badge.unverified {
    background: #fff3e0;
    color: #f57c00;
}

/* 统计卡片样式 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 12px;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-icon {
        font-size: 24px;
        width: 40px;
        height: 40px;
    }
    
    .stat-number {
        font-size: 20px;
    }
}
