﻿.dashboard {
    padding: 4px 0;
}

.dashboard-header {
    margin-bottom: 20px;
}

.dashboard-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: #1a202c;
}

.dashboard-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: #a0aec0;
    margin-left: auto;
}

/* 统计卡片（神经波形风格） */
.dashboard-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    transition: all 0.3s ease;
}

    .dashboard-stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #4299e1, #63b3ed, #90cdf4, #63b3ed, #4299e1);
        background-size: 200% 100%;
        animation: card-bar-shimmer 3s ease-in-out infinite;
    }

@keyframes card-bar-shimmer {
    0%, 100% {
        background-position: 0% 0;
    }

    50% {
        background-position: 100% 0;
    }
}

.dashboard-stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(90deg, transparent 0%, transparent 40%, rgba(99,179,237,0.04) 40%, rgba(99,179,237,0.08) 60%, transparent 60%, transparent 100%);
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20'%3E%3Cpath d='M0,10 L10,10 L12,4 L16,18 L20,6 L24,14 L28,10 L40,10 L42,3 L46,17 L50,5 L54,15 L58,10 L70,10 L72,6 L76,16 L80,8 L84,14 L88,10 L100,10 L102,4 L106,18 L110,6 L114,16 L118,10 L130,10 L132,5 L136,15 L140,7 L144,13 L148,10 L160,10 L162,3 L166,17 L170,5 L174,15 L178,10 L190,10 L192,6 L196,14 L200,10' fill='none' stroke='%2363b3ed' stroke-width='1.5' opacity='0.15'/%3E%3C/svg%3E");
    mask-size: 400% 100%;
    mask-repeat: repeat-x;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20'%3E%3Cpath d='M0,10 L10,10 L12,4 L16,18 L20,6 L24,14 L28,10 L40,10 L42,3 L46,17 L50,5 L54,15 L58,10 L70,10 L72,6 L76,16 L80,8 L84,14 L88,10 L100,10 L102,4 L106,18 L110,6 L114,16 L118,10 L130,10 L132,5 L136,15 L140,7 L144,13 L148,10 L160,10 L162,3 L166,17 L170,5 L174,15 L178,10 L190,10 L192,6 L196,14 L200,10' fill='none' stroke='%2363b3ed' stroke-width='1.5' opacity='0.15'/%3E%3C/svg%3E");
    -webkit-mask-repeat: repeat-x;
    animation: eeg-scroll 4s linear infinite;
    pointer-events: none;
}

@keyframes eeg-scroll {
    0% {
        mask-position: 0 0;
    }

    100% {
        mask-position: -200px 0;
    }
}

.dashboard-stat-card:hover {
    box-shadow: 0 4px 24px rgba(66,153,225,0.12);
    border-color: #90cdf4;
    transform: translateY(-2px);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

    .stat-icon::after {
        content: '';
        position: absolute;
        inset: -2px;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.3);
        opacity: 0;
        transition: opacity 0.3s;
    }

.dashboard-stat-card:hover .stat-icon::after {
    opacity: 1;
}

.stat-icon-blue {
    background: linear-gradient(135deg, #ebf8ff, #bee3f8);
    color: #2b6cb0;
}

.stat-icon-indigo {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #4f46e5;
}

.stat-icon-teal {
    background: linear-gradient(135deg, #e6fffa, #b2f5ea);
    color: #2c7a7b;
}

.stat-icon-red {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.stat-content {
    flex: 1;
    min-width: 0;
    position: relative;
}

.stat-number {
    font-size: 26px;
    font-weight: 800;
    color: #1a202c;
    line-height: 1.2;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

    .stat-number::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, #4299e1, transparent);
        transition: width 0.3s ease;
    }

.dashboard-stat-card:hover .stat-number::after {
    width: 100%;
}

/* EEG 波形装饰 */
.stat-eeg-wave {
    width: 60px;
    height: 28px;
    flex-shrink: 0;
    margin-left: auto;
    opacity: 0.2;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dashboard-stat-card:hover .stat-eeg-wave {
    opacity: 0.5;
    transform: scaleX(1.05);
}

.stat-label {
    font-size: 12px;
    color: #718096;
    margin-top: 2px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* 图表卡片 */
.dashboard-chart-card {
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    height: 100%;
}

.chart-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.chart-header-sub {
    font-size: 12px;
    font-weight: 400;
    color: #a0aec0;
    margin-left: 8px;
}

/* 9列区域：两图并排 */
.chart-row-9 {
    display: flex;
    gap: 16px;
    height: 100%;
}

.flex-chart {
    flex: 1;
    min-width: 0;
}

/* 3列侧栏 */
.sidebar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.sidebar-section-card {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.sidebar-placeholder {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 待办事项 */
.todo-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    transition: background 0.2s;
}

    .todo-item:hover {
        background: #f1f5f9;
    }

.todo-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.todo-icon-blue {
    background: #ebf8ff;
    color: #2b6cb0;
}

.todo-icon-amber {
    background: #fffbeb;
    color: #b45309;
}

.todo-icon-green {
    background: #f0fff4;
    color: #276749;
}

.todo-icon-purple {
    background: #faf5ff;
    color: #6b46c1;
}

.todo-content {
    flex: 1;
    min-width: 0;
}

.todo-count {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.2;
}

.todo-label {
    font-size: 11px;
    color: #718096;
    margin-top: 1px;
}

/* 排行榜 */
.rank-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #f8fafc;
    transition: background 0.2s;
}

    .rank-item:hover {
        background: #f1f5f9;
    }

.rank-number {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

    .rank-number.rank-gold {
        background: linear-gradient(135deg, #f59e0b, #d97706);
    }

    .rank-number.rank-silver {
        background: linear-gradient(135deg, #9ca3af, #6b7280);
    }

    .rank-number.rank-bronze {
        background: linear-gradient(135deg, #d97706, #92400e);
    }

    .rank-number.rank-normal {
        background: #e2e8f0;
        color: #64748b;
    }

.rank-name {
    flex: 1;
    font-size: 12px;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-count {
    font-size: 13px;
    font-weight: 700;
    color: #4a5568;
    flex-shrink: 0;
}

.rank-empty {
    text-align: center;
    color: #a0aec0;
    font-size: 13px;
    padding: 20px 0;
}
