/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.dashboard-header h1 {
    font-size: 1.75rem;
}

.export-buttons {
    display: flex;
    gap: var(--space-sm);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: white;
}

.stat-card-info {
    display: flex;
    flex-direction: column;
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Dashboard Row */
.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

/* Readiness Card */
.readiness-card {
    text-align: center;
}

.readiness-circle {
    position: relative;
    width: 180px;
    height: 180px;
    margin: var(--space-lg) auto;
}

.readiness-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.readiness-circle circle {
    fill: none;
    stroke-width: 10;
}

.readiness-circle .bg {
    stroke: var(--bg-secondary);
}

.readiness-circle .progress {
    stroke: var(--accent-green);
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1s ease;
}

.readiness-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-green);
}

.readiness-label {
    color: var(--text-secondary);
    margin-top: var(--space-sm);
}

/* Chart Card */
.chart-card {
    padding: var(--space-lg);
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 200px;
    padding-top: var(--space-md);
    border-bottom: 2px solid var(--border-color);
}

.bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    flex: 1;
}

.bar {
    width: 30px;
    background: var(--gradient-level);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: height 0.5s ease;
    min-height: 4px;
}

.bar-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.bar-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Topics Progress */
.topics-card {
    margin-bottom: var(--space-xl);
}

.topics-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.topic-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.topic-name {
    flex: 1;
    font-weight: 500;
    min-width: 200px;
}

.topic-bar {
    flex: 2;
    height: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.topic-bar-fill {
    height: 100%;
    background: var(--gradient-xp);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.topic-percent {
    width: 50px;
    text-align: right;
    font-weight: 600;
    color: var(--accent-green);
}

/* Weak Topics */
.weak-topics-card {
    margin-bottom: var(--space-xl);
}

.weak-topics-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-md);
}

.weak-topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-red);
}

.weak-topic-name {
    font-weight: 500;
}

.weak-topic-score {
    font-weight: 600;
    color: var(--accent-red);
}

/* Dashboard Bottom Row */
.dashboard-bottom-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

/* Exam Countdown */
.exam-countdown-card {
    text-align: center;
}

.exam-countdown {
    padding: var(--space-lg);
}

.countdown-date {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-blue);
    margin-bottom: var(--space-xs);
}

.countdown-name {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.countdown-days {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.countdown-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.countdown-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: var(--space-sm);
}

.countdown-progress {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-lg);
}

.countdown-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green) 0%, var(--accent-blue) 50%, var(--accent-purple) 100%);
    border-radius: var(--radius-full);
    transition: width 1s ease;
}

.countdown-btn {
    width: 100%;
    justify-content: center;
    gap: var(--space-sm);
}

/* Urgency colors based on days remaining */
.countdown-number.urgent {
    background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-orange) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.countdown-number.warning {
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-yellow) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

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

    .dashboard-row {
        grid-template-columns: 1fr;
    }

    .dashboard-bottom-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .export-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .topic-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .topic-name {
        min-width: auto;
    }

    .topic-bar {
        width: 100%;
    }
}
