body.student-portal-body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(255, 232, 204, 0.75), transparent 28%),
        linear-gradient(180deg, #f8f0e6 0%, #f5ede4 44%, #f3e8de 100%);
    color: #2c1d17;
    font-family: 'Times New Roman', Times, serif !important;
}

.student-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 26px;
    background: linear-gradient(90deg, #6f1521 0%, #b63a2a 100%);
    box-shadow: 0 14px 30px rgba(91, 28, 23, 0.15);
}

.student-topbar-logo img,
.student-mobile-logo {
    width: 92px;
    height: auto;
}

.student-topnav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.student-topnav-link,
.student-mobile-link {
    text-decoration: none;
    color: #4b2b23;
    background: rgba(255, 247, 240, 0.92);
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 16px;
    border: 1px solid rgba(132, 65, 37, 0.12);
}

.student-topnav-link.active,
.student-mobile-link.active {
    background: linear-gradient(135deg, #7d1823 0%, #d24a30 100%);
    color: #fff;
}

.student-mobile-link {
    display: block;
    margin-bottom: 10px;
}

.student-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 26px;
    padding: 18px 28px 34px;
}

.student-sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.student-profile-card,
.student-nav-card,
.student-content-panel,
.student-hero-card,
.student-stat-card,
.student-list-card,
.student-empty-card {
    background: rgba(255, 252, 248, 0.92);
    border-radius: 24px;
    border: 1px solid rgba(132, 70, 40, 0.08);
    box-shadow: 0 18px 42px rgba(94, 52, 31, 0.08);
}

.student-profile-card {
    padding: 28px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 251, 246, 0.96) 0%, rgba(249, 240, 231, 0.96) 100%);
}

.student-profile-card img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 16px;
}

.student-profile-card h3 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
}

.student-profile-card p {
    margin: 0;
    color: #686868;
    word-break: break-word;
}

.student-mini-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.student-mini-stats div {
    background: linear-gradient(180deg, #fff8f1 0%, #f8ede2 100%);
    border-radius: 16px;
    padding: 18px 12px;
    border: 1px solid rgba(156, 93, 58, 0.08);
}

.student-mini-stats strong {
    display: block;
    font-size: 28px;
}

.student-mini-stats span {
    color: #555;
}

.student-nav-card {
    padding: 26px;
    background: linear-gradient(180deg, rgba(255, 251, 247, 0.96) 0%, rgba(249, 242, 235, 0.96) 100%);
}

.student-nav-card h5 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
}

.student-nav-card a {
    display: block;
    text-decoration: none;
    color: #38211a;
    margin-bottom: 10px;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.student-nav-card a.active,
.student-nav-card a:hover,
.student-nav-card .logout-link {
    color: #8e1d21;
    background: rgba(196, 84, 52, 0.08);
    transform: translateX(2px);
}

.student-nav-card .logout-link {
    margin-top: 28px;
    font-weight: 700;
}

.student-main-panel {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.student-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 220px;
    gap: 20px;
    padding: 30px;
    background: linear-gradient(135deg, #6a1520 0%, #b3392f 50%, #e28a47 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.student-hero-card::before,
.student-hero-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.18;
}

.student-hero-card::before {
    width: 220px;
    height: 220px;
    top: -90px;
    right: -70px;
    background: #fff4dd;
}

.student-hero-card::after {
    width: 150px;
    height: 150px;
    left: -55px;
    bottom: -70px;
    background: #ffd9bd;
}

.student-hero-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(255, 248, 240, 0.16);
    border: 1px solid rgba(255, 242, 233, 0.18);
}

.student-hero-card h1 {
    margin: 0 0 10px;
    font-size: 36px;
    position: relative;
    z-index: 1;
}

.student-hero-card p {
    margin: 0;
    font-size: 17px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.student-hero-card img {
    width: 100%;
    max-width: 220px;
    justify-self: end;
    align-self: center;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 16px 22px rgba(77, 16, 16, 0.2));
}

.student-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.student-stat-card {
    padding: 22px;
    position: relative;
    overflow: hidden;
}

.student-stat-card span {
    display: block;
    color: #7a6254;
    margin-bottom: 10px;
    font-size: 14px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.student-stat-card strong {
    display: block;
    font-size: 32px;
    color: #6d1d1f;
}

.student-stat-card::after {
    content: "";
    position: absolute;
    inset: auto 18px 0 18px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #761a23 0%, #d26f35 100%);
}

.student-section-title {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 700;
    color: #6f1c20;
}

.student-list-card,
.student-content-panel,
.student-empty-card {
    padding: 24px;
}

.student-list-card + .student-list-card {
    margin-top: 16px;
}

.student-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
}

.student-row h4 {
    margin: 0 0 10px;
    font-size: 22px;
    color: #5f1f1c;
}

.student-row p {
    margin: 0 0 8px;
    color: #4f372d;
}

.student-status {
    font-size: 18px;
    margin-bottom: 16px;
}

.student-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f8e3d9;
    color: #9a2b22;
    font-size: 14px;
    font-weight: 700;
}

.student-btn,
.student-btn-outline,
.student-btn-muted {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 16px;
    font-weight: 700;
}

.student-btn {
    background: linear-gradient(135deg, #7c1622 0%, #d14d32 100%);
    color: #fff;
    box-shadow: 0 12px 22px rgba(167, 61, 43, 0.2);
}

.student-btn-outline {
    background: rgba(255, 248, 242, 0.9);
    color: #8b231f;
    border: 1px solid rgba(139, 35, 31, 0.22);
}

.student-btn-muted {
    background: #efe4d8;
    color: #5c4538;
}

.student-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.student-course-grid,
.student-video-grid,
.student-pdf-grid {
    display: grid;
    gap: 18px;
}

.student-course-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.student-video-grid,
.student-pdf-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.student-course-card,
.student-video-card,
.student-pdf-card {
    background: linear-gradient(180deg, rgba(255, 249, 243, 0.98) 0%, rgba(252, 241, 231, 0.96) 100%);
    border-radius: 22px;
    padding: 24px;
    border: 1px solid rgba(154, 99, 68, 0.08);
    box-shadow: 0 16px 32px rgba(93, 58, 38, 0.06);
}

.student-course-card h4,
.student-video-card h4,
.student-pdf-card h4 {
    margin: 0 0 12px;
    font-size: 24px;
}

.student-course-card p,
.student-video-card p,
.student-pdf-card p {
    margin: 0 0 10px;
}

.student-progress {
    margin-top: 16px;
}

.student-progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #eadccf;
    overflow: hidden;
}

.student-progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #7c1822 0%, #dc8a3c 100%);
}

.student-progress small {
    display: block;
    margin-top: 8px;
    color: #555;
}

.student-video-frame {
    width: 100%;
    height: 220px;
    border: 0;
    border-radius: 16px;
    background: #000;
    margin-bottom: 14px;
}

.student-auth-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #f4f6ff;
}

.student-auth-panel {
    width: min(560px, 100%);
}

.student-auth-brand {
    text-align: center;
    margin-bottom: 26px;
}

.student-auth-brand h1 {
    margin: 0 0 22px;
    color: #1f2f73;
    font-size: 32px;
    font-weight: 700;
}

.student-auth-brand img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.student-auth-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 52px rgba(54, 86, 165, 0.18);
    padding: 27px 26px;
    width: 79%;
    margin: auto;
}

.student-auth-card label {
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
    font-size: 20px;
}

.student-auth-card .form-control {
    min-height: 40px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid #c9cedc;
    padding: 14px 18px;
    font-size: 14px;
    box-shadow: none;
}

.student-auth-card .form-control:focus {
    border-color: #243476;
    box-shadow: 0 0 0 0.15rem rgba(36, 52, 118, 0.12);
}

.student-auth-submit {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    background: #243476;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.student-auth-submit:hover {
    background: #1d2b63;
}

.student-auth-switch {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 16px;
}

.student-auth-switch a {
    color: #243476;
    font-weight: 700;
    text-decoration: none;
}

.student-alert {
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.student-alert.error {
    background: #ffe5e7;
    color: #a8141c;
}

.student-alert.success {
    background: #e5f7ea;
    color: #16733a;
}

.student-footer-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(90deg, #451218 0%, #7a231d 100%);
    color: #fff;
    padding: 18px 28px;
}

.student-footer-bar span {
    color: #ffb275;
}

.student-dashboard-page .student-dashboard-panel {
    background: linear-gradient(180deg, rgba(255, 252, 248, 0.96) 0%, rgba(250, 240, 230, 0.94) 100%);
}

.student-dashboard-stats .student-stat-card:nth-child(1),
.student-dashboard-panel .student-summary-grid .student-stat-card:nth-child(1) {
    background: linear-gradient(180deg, #fff6ee 0%, #fde9da 100%);
}

.student-dashboard-stats .student-stat-card:nth-child(2),
.student-dashboard-panel .student-summary-grid .student-stat-card:nth-child(2) {
    background: linear-gradient(180deg, #fff8f0 0%, #fbe3cf 100%);
}

.student-dashboard-stats .student-stat-card:nth-child(3),
.student-dashboard-panel .student-summary-grid .student-stat-card:nth-child(3) {
    background: linear-gradient(180deg, #fff7f3 0%, #f9e2dc 100%);
}

.student-dashboard-stats .student-stat-card:nth-child(4),
.student-dashboard-panel .student-summary-grid .student-stat-card:nth-child(4) {
    background: linear-gradient(180deg, #fff9f4 0%, #fcebd8 100%);
}

@media (max-width: 1199px) {
    .student-shell {
        grid-template-columns: 1fr;
    }

    .student-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .student-shell {
        padding: 16px;
    }

    .student-topbar {
        padding: 10px 16px;
    }

    .student-hero-card {
        grid-template-columns: 1fr;
    }

    .student-hero-card img {
        justify-self: start;
        max-width: 160px;
    }

    .student-summary-grid {
        grid-template-columns: 1fr;
    }

    .student-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .student-footer-bar {
        flex-direction: column;
        text-align: center;
    }

    .student-auth-brand h1 {
        font-size: 30px;
    }

    .student-auth-card {
        padding: 26px 22px;
    }
}
