/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
    background: var(--gray-100);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--navy);
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: var(--z-sticky);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-base);
}

.sidebar-header {
    padding: var(--space-6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
}

.sidebar-brand span {
    color: var(--red);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-4);
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
    margin-bottom: var(--space-1);
    cursor: pointer;
    text-decoration: none;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

.sidebar-link.active {
    background: var(--red);
    color: var(--white);
}

.sidebar-link .icon {
    font-size: var(--text-lg);
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.sidebar-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.sidebar-user-info span {
    display: block;
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-user-info strong {
    display: block;
    font-size: var(--text-sm);
    color: var(--white);
}

/* Main Content */
.dashboard-main {
    flex: 1;
    margin-left: 280px;
    padding: var(--space-8);
}

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

.dashboard-header h1 {
    font-size: var(--text-2xl);
    margin: 0;
}

.dashboard-header-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

/* Stat Cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 0 0 0 80px;
    opacity: 0.1;
}

.stat-card.navy::after {
    background: var(--navy);
}

.stat-card.red::after {
    background: var(--red);
}

.stat-card.gold::after {
    background: var(--gold);
}

.stat-card.green::after {
    background: var(--success);
}

.stat-icon {
    font-size: 24px;
    margin-bottom: var(--space-3);
}

.stat-value {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
    margin-bottom: var(--space-1);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--gray-500);
}

/* Dashboard Widgets */
.widget {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
}

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

.widget-header h3 {
    font-size: var(--text-lg);
    margin: 0;
}

/* Course Progress Item */
.progress-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--gray-100);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
}

.progress-item img {
    width: 64px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.progress-item-info {
    flex: 1;
}

.progress-item-info h5 {
    font-size: var(--text-sm);
    margin: 0 0 var(--space-1);
}

.progress-item-info span {
    font-size: var(--text-xs);
    color: var(--gray-500);
}

/* Upcoming Class */
.upcoming-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.upcoming-date {
    background: var(--red);
    color: var(--white);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    text-align: center;
    min-width: 50px;
}

.upcoming-date .day {
    font-size: var(--text-xl);
    font-weight: 800;
    display: block;
    line-height: 1;
}

.upcoming-date .month {
    font-size: var(--text-xs);
    text-transform: uppercase;
}

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

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .dashboard-main {
        margin-left: 0;
    }

    .stat-cards {
        grid-template-columns: 1fr;
    }
}