/* Student portal — extends mg-dashboard + shared portal tiles */

.mg-student-portal {
    --portal-ink: #14213d;
    --portal-muted: #6b7280;
    --portal-line: #e7ecf3;
    --portal-brand: #0d6efd;
    --portal-brand-2: #6c63ff;
    --portal-radius: 20px;
}

/* ── Homework priority banner ── */
.mg-student-homework-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    border-radius: 16px;
    border: 1px solid rgba(220, 53, 69, 0.22);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.07), rgba(253, 126, 20, 0.05));
    font-size: 1.5rem;
    color: #495057;
    margin-bottom: 1.15rem;
    line-height: 1.5;
}

.mg-student-homework-alert-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
    flex-shrink: 0;
}

.mg-student-homework-alert strong {
    color: #b02a37;
}

/* ── Class cards ── */
.mg-student-class-grid {
    display: grid;
    gap: 0.85rem;
}

.mg-student-class-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.16);
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 60%, #f5f3ff 100%);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.mg-student-class-card:hover {
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.28);
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.1);
}

.mg-student-class-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.mg-student-class-icon {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.22);
}

.mg-student-class-code {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--portal-ink);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.mg-student-class-course {
    display: block;
    font-size: 1.25rem;
    color: var(--portal-muted);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mg-student-class-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.mg-student-class-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.95rem;
    border-radius: 12px;
    font-size: 1.35rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(13, 110, 253, 0.2);
    background: #fff;
    color: var(--portal-brand);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.mg-student-class-btn:hover {
    color: #0a58ca;
    background: rgba(13, 110, 253, 0.06);
    border-color: rgba(13, 110, 253, 0.35);
    transform: translateY(-1px);
}

.mg-student-class-btn--primary {
    background: var(--portal-brand);
    border-color: var(--portal-brand);
    color: #fff;
}

.mg-student-class-btn--primary:hover {
    background: #0b5ed7;
    border-color: #0b5ed7;
    color: #fff;
}

/* ── Empty states ── */
.mg-student-empty {
    text-align: center;
    padding: 2rem 1.25rem;
    border: 2px dashed rgba(99, 102, 241, 0.2);
    border-radius: var(--portal-radius);
    color: var(--portal-muted);
    font-size: 1.5rem;
    line-height: 1.5;
}

.mg-student-empty i {
    display: block;
    font-size: 2rem;
    color: var(--portal-brand-2);
    margin-bottom: 0.65rem;
}

/* ── Compact profile sidebar ── */
.mg-student-portal .mg-portal-tile-grid--sidebar {
    grid-template-columns: 1fr;
}

.mg-student-profile-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mg-student-profile-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--portal-line);
    font-size: 1.4rem;
}

.mg-student-profile-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.mg-student-profile-list .profile-label {
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--portal-muted);
    flex-shrink: 0;
}

.mg-student-profile-list .profile-value {
    text-align: right;
    color: var(--portal-ink);
    font-weight: 600;
}

@media (max-width: 575px) {
    .mg-student-class-card {
        flex-direction: column;
        align-items: stretch;
    }

    .mg-student-class-actions {
        width: 100%;
    }

    .mg-student-class-btn {
        flex: 1;
        justify-content: center;
    }
}
