.auth-container,
body.auth-page .container {
    margin-top: 64px;
}

.student-nav,
.navbar {
    padding: 18px 28px;
}

body.student-page:not(.auth-page) {
    background: #2f4563;
    color: #102033;
    min-height: 100vh;
}

.navbar {
    background: #243b57;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    width: 100%;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
    position: relative;
    z-index: 1000;
}

.navbar .nav-left,
.navbar .logo,
.navbar .logo img {
    flex: 0 0 auto;
}

.navbar img.logo,
.navbar .logo img {
    max-height: 64px;
    width: auto;
    max-width: min(180px, 100%);
    display: block;
    object-fit: contain;
}

.navbar .nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    flex-wrap: wrap;
    min-width: 0;
}

.navbar nav {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.navbar a {
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

.navbar a:hover {
    color: #cfe0ff;
}

.account-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: 100%;
    z-index: 50;
}

.navbar .account-dropdown {
    overflow: visible;
}

.account-trigger.profile,
button.account-trigger {
    width: auto;
    min-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    padding: 11px 18px;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: none;
    white-space: nowrap;
    max-width: min(260px, 100%);
}

.account-trigger.profile:hover,
.account-trigger.profile:focus {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.account-trigger:focus-visible {
    outline: 3px solid rgba(207, 224, 255, 0.85);
    outline-offset: 2px;
}

.account-trigger span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-chevron {
    font-size: 11px;
    line-height: 1;
    opacity: 0.82;
}

.account-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 150px;
    padding: 6px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
    display: none;
    z-index: 1000;
}

.account-dropdown.open .account-menu {
    display: grid;
}

.nav-right .account-menu a,
.navbar .account-menu a,
.account-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.25;
    white-space: nowrap;
}

.nav-right .account-menu a:hover,
.navbar .account-menu a:hover,
.account-menu a:hover,
.nav-right .account-menu a:focus,
.navbar .account-menu a:focus,
.account-menu a:focus,
.nav-right .account-menu a.active,
.navbar .account-menu a.active,
.account-menu a.active {
    background: var(--color-info-bg);
    color: var(--color-info);
    outline: none;
}

.hero {
    margin-bottom: var(--space-6);
}

.exam-card,
.subject-item {
    min-width: 0;
}

@media (max-width: 768px) {
    .hero h1,
    .page-title {
        font-size: 28px;
    }

    .account-dropdown {
        justify-content: center;
    }

    .account-menu {
        right: 0;
        transform: none;
        max-width: calc(100vw - 32px);
    }
}
