/* 仪表盘专用样式 */
.dashboard {
    background-color: #f0f2f5;
    color: #333;
}

.dashboard .page-header {
    margin-bottom: 30px;
}

.dashboard .live-badge {
    display: inline-block;
    background: #ff4757;
    color: white;
    font-size: 14px;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 10px;
    animation: pulse 1.5s infinite;
}
.chart .error {
    color: #ff4d4f;
    text-align: center;
    padding: 20px;
    font-size: 16px;
}
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.dashboard .subtitle {
    color: #666;
    font-size: 16px;
    margin-top: 5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #3498db, #2ecc71);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
}

.stat-label {
    color: #7f8c8d;
    font-size: 14px;
    margin: 5px 0;
}

.stat-trend {
    font-size: 14px;
}

.stat-trend.up {
    color: #2ecc71;
}

.stat-trend.down {
    color: #e74c3c;
}

.chart-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-container {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.chart-container.wide {
    flex: 2;
}

.chart-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
}

.chart {
    width: 100%;
    height: 300px;
}

.realtime-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.realtime-feed {
    height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
}

.realtime-item {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
}

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

.realtime-item .time {
    color: #7f8c8d;
    margin-right: 10px;
}

.realtime-item .user {
    font-weight: bold;
    color: #3498db;
}

.realtime-item .action {
    color: #2c3e50;
}
/* 添加到现有的CSS中 */
.realtime-item.register {
    border-left: 3px solid #2ecc71;
    padding-left: 8px;
}

.realtime-item.purchase {
    border-left: 3px solid #e74c3c;
    padding-left: 8px;
}

.realtime-item.signup {
    border-left: 3px solid #3498db;
    padding-left: 8px;
}

.realtime-item.comment, 
.realtime-item.share {
    border-left: 3px solid #f39c12;
    padding-left: 8px;
}

.realtime-item.view {
    border-left: 3px solid #9b59b6;
    padding-left: 8px;
}

.realtime-feed::-webkit-scrollbar {
    width: 6px;
}

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

.realtime-feed::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.realtime-feed::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

#user-map-chart {
    width: 100%;
    height: 500px; /* 或者根据您的布局需要调整 */
    min-height: 400px;
}