/* Каркас приложения, сайдбар, карточки курсов, каталог */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 260px;
    background: var(--primary);
    color: white;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    padding: 0 20px 25px;
    text-align: center;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

    .logo i {
        color: var(--yellow);
        margin-right: 8px;
    }

.sidebar-role {
    text-align: center;
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    padding: 12px 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-item {
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: 0.3s;
    opacity: 0.8;
    user-select: none;
}

    .nav-item:hover, .nav-item.active {
        background: rgba(255,255,255,0.1);
        opacity: 1;
        border-left: 4px solid var(--yellow);
        padding-left: 21px;
    }

.main {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
}

.view {
    display: none;
}

    .view.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }

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

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: 0.2s;
}

    .user-profile:hover {
        background: rgba(23,64,194,0.08);
    }

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

    .avatar.admin {
        background: #b8860b;
    }

    .avatar.teacher {
        background: var(--green);
    }

.section-title {
    margin-bottom: 20px;
    font-size: 20px;
    color: var(--primary);
}

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

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: #eef2ff;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-info h3 {
    margin: 0 0 5px 0;
    font-size: 24px;
    color: var(--primary);
}

.stat-info p {
    margin: 0;
    color: #777;
    font-size: 14px;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.course-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: 0.3s;
    cursor: pointer;
}

    .course-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 25px rgba(0,0,0,0.1);
    }

.course-img {
    height: 160px;
    background: #cbd5e1;
    position: relative;
}

    .course-img::after {
        content: '\f144';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 40px;
        color: rgba(255,255,255,0.8);
        background: rgba(4,18,106,0.4);
    }

    .course-img.external {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }

        .course-img.external::after {
            content: '\f35d';
            background: rgba(30,41,59,0.55);
            font-size: 36px;
        }

.course-content {
    padding: 20px;
}

    .course-content h3 {
        margin: 0 0 10px 0;
        font-size: 16px;
    }

.progress-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    margin-top: 15px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--yellow);
    transition: width 0.4s ease;
}

.search-bar {
    display: flex;
    align-items: center;
    background: white;
    padding: 10px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    gap: 10px;
}

    .search-bar i {
        color: #999;
    }

    .search-bar input {
        flex: 1;
        border: none;
        outline: none;
        font-family: inherit;
        font-size: 14px;
        background: transparent;
    }

.empty-state {
    background: white;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    color: #777;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

    .empty-state i {
        font-size: 42px;
        color: #cbd5e1;
        margin-bottom: 12px;
        display: block;
    }

a.course-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ==================== Alpha 0.8: статусы ДЗ ==================== */
.hw-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .hw-badge.none {
        background: #f1f5f9;
        color: #64748b;
    }

    .hw-badge.pending {
        background: #fff7e0;
        color: #b8860b;
    }

    .hw-badge.approved {
        background: #e8f5e9;
        color: var(--green);
    }

    .hw-badge.rejected {
        background: #fef2f2;
        color: var(--red);
    }
