:root {
    --primary: #4f46e5; /* Индиго */
    --primary-hover: #4338ca;
    --bg-body: #f3f4f6;
    --text-main: #111827;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
/* Subject icon palette from the student tests page. */
.subject-tone-gold { --subject-icon-bg: #fff7e6; --subject-icon-color: #ac6d0a; }
.subject-tone-mint { --subject-icon-bg: #e7f8f0; --subject-icon-color: #108b61; }
.subject-tone-violet { --subject-icon-bg: #f0ebff; --subject-icon-color: #634abe; }
.subject-tone-green { --subject-icon-bg: #eef8e8; --subject-icon-color: #4e8428; }
.subject-tone-blue { --subject-icon-bg: #e8f4ff; --subject-icon-color: #2870ac; }
.subject-tone-coral { --subject-icon-bg: #fff0ea; --subject-icon-color: #bf583b; }
.subject-tone-indigo { --subject-icon-bg: #edf1ff; --subject-icon-color: #3d4dbf; }
.subject-tone-cyan { --subject-icon-bg: #e6fffb; --subject-icon-color: #097c73; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
}

html {
    scrollbar-gutter: stable;
    overflow-y: scroll;
}

html.modal-open {
    padding-right: 0 !important;
    overflow-y: scroll !important;
}

body.modal-open {
    padding-right: 0 !important;
}

body.modal-open .navbar,
body.modal-open .sticky-top,
body.modal-open .fixed-top,
body.modal-open .fixed-bottom {
    padding-right: 0 !important;
    margin-right: 0 !important;
}

/* --- Навигация --- */
.navbar {
    background: #ffffff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 0.8rem 1rem;
}
.navbar-brand {
    font-weight: 700;
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    gap: 10px;
}
.navbar-brand img {
    border: 2px solid var(--primary);
    padding: 2px;
}

/* --- Карточки --- */
.card {
    border: none;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-hover);
}

/* --- Кнопки --- */
.btn {
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* --- Прогресс бар --- */
.progress {
    background-color: #e5e7eb;
    border-radius: 100px;
    height: 8px;
    overflow: hidden;
}
.progress-bar {
    background-color: var(--primary);
    border-radius: 100px;
}

/* --- Вход (Login) --- */
.login-bg {
    background: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 100%);
    min-height: 100vh;
}
.login-card {
    border-radius: 24px;
    padding: 2rem;
}

@media (max-width: 576px) {
    .login-card {
        padding: 1.25rem;
        border-radius: 18px;
    }
    .login-card h3 {
        font-size: 1.35rem;
    }
    .login-card img {
        width: 64px;
        height: 64px;
    }
}

/* --- Таблицы --- */
.table thead th {
    background-color: #f9fafb;
    color: #6b7280;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e5e7eb;
}

/* ========================================================================== 
   SIGMA student UI
   Общая визуальная система пользовательской части. Страничные CSS-файлы
   отвечают только за уникальные схемы экранов; базовые компоненты живут здесь.
   ========================================================================== */
/* Shared application styles. */
:root {
    --ui-primary: #5146e5;
    --ui-primary-hover: #4338ca;
    --ui-primary-soft: #eeecff;
    --ui-accent: #16a6e0;
    --ui-success: #16a36a;
    --ui-warning: #f59e0b;
    --ui-danger: #e5484d;
    --ui-canvas: #f6f7fb;
    --ui-surface: #ffffff;
    --ui-surface-muted: #f8fafc;
    --ui-border: #e5e7eb;
    --ui-border-strong: #d8dce5;
    --ui-text: #242735;
    --ui-text-muted: #6f7688;
    --ui-text-soft: #9aa1b1;
    --ui-radius-sm: 10px;
    --ui-radius-md: 16px;
    --ui-radius-lg: 22px;
    --ui-shadow-sm: 0 1px 2px rgba(22, 28, 45, .04), 0 6px 18px rgba(22, 28, 45, .04);
    --ui-shadow-md: 0 14px 38px rgba(22, 28, 45, .08);
    --ui-content: 1180px;
    --ui-page-gutter: 24px;
    --ui-bottom-space: 32px;
    --ui-sidebar-width: 258px;
    --ui-aside-width: 278px;
    --ui-layout-gap: 18px;
}

html {
    max-width: 100%;
    overflow-x: hidden;
}

body.student-ui {
    background: var(--ui-canvas);
    color: var(--ui-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 0 0 var(--ui-bottom-space) !important;
}

body.student-ui:has(.student-navigation) {
    padding-left: var(--ui-sidebar-width) !important;
}

body.student-ui *,
body.student-ui *::before,
body.student-ui *::after {
    box-sizing: border-box;
}

/* Верхняя шапка в пользовательской части упразднена. Правило страхует старые
   шаблоны на время миграции и не затрагивает админскую/учительскую часть. */
body.student-ui > .navbar,
body.student-ui > header.navbar,
body.student-ui > nav.navbar {
    display: none !important;
}

.student-shell,
body.student-ui .page-shell,
body.student-ui .history-shell,
body.student-ui .result-shell,
body.student-ui .career-shell,
body.student-ui .test-shell,
body.student-ui .admission-shell,
body.student-ui .profile-shell,
body.student-ui .avatar-editor-page,
body.student-ui .module-content-wrapper {
    margin-left: auto;
    margin-right: auto;
    max-width: var(--ui-content);
    padding-left: var(--ui-page-gutter);
    padding-right: var(--ui-page-gutter);
    width: 100%;
}

body.student-ui .student-shell,
body.student-ui .page-shell,
body.student-ui .history-shell,
body.student-ui .result-shell,
body.student-ui .career-shell,
body.student-ui .test-shell,
body.student-ui .admission-shell,
body.student-ui .profile-shell,
body.student-ui .avatar-editor-page,
body.student-ui .module-content-wrapper {
    padding-top: 26px;
}

/*
 * Единая двухколоночная сетка пользовательской части.
 * Все страницы с дополнительной правой колонкой используют одну ширину
 * основного контента, один отступ и общий адаптивный порог.
 */
body.student-ui .student-page-layout {
    align-items: start;
    display: grid;
    gap: var(--ui-layout-gap);
    grid-template-columns: minmax(0, 1fr) var(--ui-aside-width);
    min-width: 0;
    width: 100%;
}

body.student-ui .student-page-main,
body.student-ui .student-page-aside {
    min-width: 0;
}

.ui-page-heading {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 0 0 22px;
}

.ui-page-heading__copy {
    min-width: 0;
}

.ui-page-eyebrow {
    color: var(--ui-primary);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    margin: 0 0 5px;
    text-transform: uppercase;
}

.ui-page-title {
    color: var(--ui-text);
    font-size: clamp(1.55rem, 2.6vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.15;
    margin-top: 0;
}

body.student-ui h1:not([class]) {
    color: var(--ui-text);
}

.ui-page-subtitle {
    color: var(--ui-text-muted);
    font-size: .96rem;
    margin: 7px 0 0;
    max-width: 720px;
}

.ui-card,
body.student-ui .card,
body.student-ui .panel,
body.student-ui .settings-card,
body.student-ui .stat-card {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow-sm);
}

body.student-ui .card {
    overflow: hidden;
}

body.student-ui .card:hover {
    box-shadow: var(--ui-shadow-sm);
    transform: none;
}

.ui-card__body {
    padding: 22px;
}

body.student-ui .btn,
.ui-button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 12px;
    display: inline-flex;
    font-size: .91rem;
    font-weight: 750;
    gap: 8px;
    justify-content: center;
    line-height: 1.2;
    min-height: 42px;
    padding: 10px 17px;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

body.student-ui .btn:active,
.ui-button:active {
    transform: translateY(1px);
}

body.student-ui .btn-primary,
.ui-button--primary {
    background: var(--ui-primary);
    border-color: var(--ui-primary);
    color: #fff;
}

body.student-ui .btn-primary:hover,
.ui-button--primary:hover {
    background: var(--ui-primary-hover);
    border-color: var(--ui-primary-hover);
    color: #fff;
}

.ui-button--secondary {
    background: #fff;
    border-color: var(--ui-border-strong);
    color: var(--ui-text);
}

.ui-button--secondary:hover {
    background: var(--ui-surface-muted);
    color: var(--ui-primary);
}

body.student-ui input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body.student-ui select,
body.student-ui textarea,
.ui-field {
    background: #fff;
    border: 1px solid var(--ui-border-strong);
    border-radius: 12px;
    color: var(--ui-text);
    font: inherit;
    min-height: 44px;
    max-width: 100%;
    padding: 10px 13px;
    width: 100%;
}

body.student-ui textarea {
    min-height: 110px;
    resize: vertical;
}

body.student-ui input:focus,
body.student-ui select:focus,
body.student-ui textarea:focus,
.ui-field:focus {
    border-color: var(--ui-primary);
    box-shadow: 0 0 0 3px rgba(81, 70, 229, .13);
    outline: 0;
}

body.student-ui label {
    color: var(--ui-text);
    font-size: .86rem;
    font-weight: 700;
}

.ui-alert,
body.student-ui .alert {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    margin-bottom: 16px;
    padding: 14px 16px;
}

body.student-ui .table-responsive,
.ui-table-wrap {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.student-ui table {
    border-collapse: collapse;
    margin: 0;
    min-width: 640px;
    width: 100%;
}

body.student-ui table th,
body.student-ui table td {
    border-bottom: 1px solid var(--ui-border);
    padding: 13px 15px;
    text-align: left;
    vertical-align: middle;
}

body.student-ui table th {
    background: var(--ui-surface-muted);
    color: var(--ui-text-muted);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.ui-layer { position: relative; z-index: 1; }
.ui-leading-tight { line-height: 1.15; }
.ui-leading-relaxed { line-height: 1.6; }
.ui-clickable { cursor: pointer; }
.ui-hidden { display: none !important; }
.ui-grow { flex-grow: 1; }
.ui-no-shrink { flex-shrink: 0; }
.ui-text-xs { font-size: .67rem !important; letter-spacing: .04em; }
.ui-text-lg-icon { font-size: 3rem !important; }
.ui-empty-icon { font-size: 5rem !important; }
.ui-copy-narrow { line-height: 1.5; margin-left: auto; margin-right: auto; max-width: 320px; }
.ui-copy-medium { max-width: 400px; }
.ui-file-name { max-width: 200px; }
.ui-square-button { height: 32px; width: 32px; }
.ui-modal-rounded { border-radius: 22px !important; overflow: hidden; }
.ui-modal-icon {
    align-items: center;
    background: var(--ui-primary-soft);
    border-radius: 18px;
    color: var(--ui-primary);
    display: inline-flex;
    font-size: 1.7rem;
    height: 58px;
    justify-content: center;
    width: 58px;
}
.ui-modal-icon--warning { background: #fff7ed; color: #c2410c; }
.ui-modal-icon--large { border-radius: 20px; font-size: 2rem; height: 68px; width: 68px; }
.ui-gradient-button { background: linear-gradient(135deg, #4f46e5, #7c3aed 52%, #2563eb) !important; }
.ui-option-select { flex-shrink: 0; width: 70px !important; }
.ui-support-link { color: var(--ui-primary); }
.ui-progress-height { height: 8px !important; }
.ui-test-warning-icon { font-size: 4.5rem; }
.ui-alert-icon { font-size: 3rem; }
.ui-flex-fill { flex: 1 1 auto; }

.student-test-toolbar {
    align-items: center;
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    box-shadow: var(--ui-shadow-sm);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 26px auto 20px;
    max-width: var(--ui-content);
    padding: 12px 16px;
    width: calc(100% - (var(--ui-page-gutter) * 2));
}

.student-test-toolbar__progress {
    flex: 1 1 280px;
    min-width: 0;
}

.ui-progress,
body.student-ui .progress {
    background: #e9ebf2;
    border-radius: 999px;
    height: 9px;
    overflow: hidden;
}

.ui-progress__bar,
body.student-ui .progress-bar,
[data-progress] {
    background: var(--ui-primary);
    border-radius: inherit;
    height: 100%;
    width: var(--ui-progress, 0%);
}

/* Shared daily plan/streak presentation after the old header was removed. */
.student-header-actions {
    align-items: center;
    display: flex;
    gap: .55rem;
}

.student-streak-pill {
    align-items: center;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    color: #ea580c;
    display: inline-flex;
    flex-shrink: 0;
    font-size: .82rem;
    font-weight: 800;
    gap: .25rem;
    min-height: 34px;
    padding: 0 .68rem;
    text-decoration: none;
}

.student-streak-pill.off {
    background: var(--ui-surface-muted);
    border-color: var(--ui-border);
    color: var(--ui-text-soft);
}

/* Persistent student navigation: desktop sidebar, mobile bottom bar. */
.student-navigation {
    background: #fff;
    border-right: 1px solid var(--ui-border);
    bottom: 0;
    box-shadow: 10px 0 36px rgba(52, 48, 104, .035);
    display: flex;
    flex-direction: column;
    left: 0;
    padding: 26px 18px;
    position: fixed;
    top: 0;
    width: var(--ui-sidebar-width);
    z-index: 1050;
}

.student-navigation-profile {
    align-items: center;
    background:
        radial-gradient(circle at 92% 0, rgba(114, 97, 255, .16), transparent 42%),
        linear-gradient(145deg, #f8f8ff 0%, #f3f5ff 100%);
    border: 1px solid #e5e4ff;
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(73, 63, 171, .08);
    color: var(--ui-text);
    display: flex;
    gap: 11px;
    margin: 0 0 26px;
    min-height: 86px;
    padding: 11px;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.student-navigation-profile:hover {
    border-color: #cac6ff;
    box-shadow: 0 14px 32px rgba(73, 63, 171, .13);
    color: var(--ui-text);
    transform: translateY(-2px);
}

.student-navigation-avatar {
    background: #eceaff;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 7px 18px rgba(74, 65, 166, .17);
    display: block;
    flex: 0 0 58px;
    height: 58px;
    overflow: visible;
    position: relative;
    width: 58px;
}

.student-navigation-avatar-stage,
.student-navigation-avatar-stage .sigma-editor-character {
    border-radius: 50%;
    display: block;
    height: 100%;
    overflow: hidden;
    width: 100%;
}

.sigma-avatar-editor-stage .editor-avatar-layer.hidden {
    display: none;
}

/* Prominent avatars have a quiet idle motion; catalog thumbnails stay static. */
.sigma-avatar-alive .sigma-editor-character {
    animation: sigma-avatar-idle 5.2s ease-in-out infinite;
    transform-box: fill-box;
    /* Низ персонажа остаётся приклеенным к рамке во время покачивания. */
    transform-origin: 50% 100%;
    will-change: transform;
}

.sigma-avatar-blink {
    opacity: 0;
    pointer-events: none;
}

.sigma-avatar-blink.is-blinking {
    opacity: 1;
}

@keyframes sigma-avatar-idle {
    0%, 100% { transform: scale(1.004) skewX(0); }
    28% { transform: scale(1.009, 1.006) skewX(-0.2deg); }
    62% { transform: scale(1.012, 1.009) skewX(0.18deg); }
    82% { transform: scale(1.007, 1.005) skewX(0.06deg); }
}

@media (prefers-reduced-motion: reduce) {
    .sigma-avatar-alive .sigma-editor-character {
        animation-duration: 8.5s;
    }
}

.student-navigation-avatar-fallback {
    align-items: center;
    background: linear-gradient(145deg, #7165ec, #5548dc);
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-size: 1.32rem;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.student-navigation-avatar-level {
    align-items: center;
    background: #5548dd;
    border: 2px solid #fff;
    border-radius: 999px;
    bottom: -3px;
    box-shadow: 0 4px 10px rgba(81, 70, 229, .24);
    color: #fff;
    display: flex;
    font-size: .62rem;
    height: 22px;
    justify-content: center;
    min-width: 22px;
    padding: 0 5px;
    position: absolute;
    right: -3px;
}

.student-navigation-profile-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.student-navigation-profile-heading,
.student-navigation-profile-meta {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-width: 0;
}

body.student-ui .student-navigation-profile-name {
    display: block;
    font-size: .9rem;
    line-height: 1.2;
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-navigation-coins {
    align-items: center;
    background: #fff8df;
    border: 1px solid #f6df8d;
    border-radius: 999px;
    color: #966300;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .68rem;
    gap: 4px;
    line-height: 1;
    min-height: 24px;
    padding: 0 7px;
}

.student-navigation-coins i {
    color: #e6a200;
    font-size: .76rem;
}

.student-navigation-profile-meta {
    color: var(--ui-text-muted);
    font-size: .64rem;
    gap: 7px;
    margin-top: 7px;
}

.student-navigation-profile-meta span {
    align-items: center;
    display: inline-flex;
    gap: 2px;
    min-width: 0;
    white-space: nowrap;
}

.student-navigation-profile-meta i {
    color: #715fec;
    font-size: .72rem;
}

.student-navigation-profile-progress {
    background: rgba(104, 91, 225, .12);
    border-radius: 999px;
    display: block;
    height: 5px;
    margin-top: 7px;
    overflow: hidden;
    width: 100%;
}

.student-navigation-profile-progress > span {
    background: linear-gradient(90deg, #7668ed, #5548da);
    border-radius: inherit;
    display: block;
    height: 100%;
    width: var(--ui-progress, 0);
}

.student-navigation-menu {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.student-nav-item {
    --nav-icon: #7e8597;
    --nav-icon-bg: #f2f4f8;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 16px;
    color: var(--ui-text-muted);
    display: flex;
    font-size: .95rem;
    font-weight: 700;
    gap: 13px;
    justify-content: flex-start;
    min-height: 58px;
    min-width: 0;
    padding: 9px 11px;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.student-nav-item i {
    align-items: center;
    background: var(--nav-icon-bg);
    border-radius: 12px;
    color: var(--nav-icon);
    display: inline-flex;
    flex: 0 0 38px;
    font-size: 1.13rem;
    height: 38px;
    justify-content: center;
    line-height: 1;
    text-align: center;
    transition: background .18s ease, color .18s ease, transform .18s ease;
    width: 38px;
}

.student-nav-item--home {
    --nav-icon: #ef8b2c;
    --nav-icon-bg: #fff3e5;
}

.student-nav-item--courses {
    --nav-icon: #6557e8;
    --nav-icon-bg: #efedff;
}

.student-nav-item--tests {
    --nav-icon: #2aa7db;
    --nav-icon-bg: #e9f8ff;
}

.student-nav-item--leaderboard {
    --nav-icon: #e7a317;
    --nav-icon-bg: #fff6da;
}

.student-nav-item--career {
    --nav-icon: #22a77a;
    --nav-icon-bg: #e8f9f3;
}

.student-nav-item--profile {
    --nav-icon: #ad65dd;
    --nav-icon-bg: #f7ecff;
}

.student-nav-item:hover {
    background: #fafaff;
    border-color: #ecebf7;
    color: var(--ui-text);
    transform: translateX(3px);
}

.student-nav-item:hover i {
    transform: scale(1.06);
}

.student-nav-item.active {
    background: #efefff;
    border-color: #cfccff;
    box-shadow: 0 6px 18px rgba(81, 70, 229, .09);
    color: #4c42d5;
}

.student-nav-item.active i {
    background: var(--ui-primary);
    box-shadow: 0 6px 14px rgba(81, 70, 229, .22);
    color: #fff;
}

.student-nav-item--leaderboard.active i {
    background: var(--ui-primary);
    box-shadow: 0 6px 14px rgba(81, 70, 229, .22);
    color: #fff;
}

/* Спокойная типографика пользовательской части. Страничные стили раньше
   задавали насыщенность вплоть до 950, из-за чего интерфейс выглядел тяжелее
   карточек профориентации. Здесь фиксируется единая, более мягкая иерархия. */
body.student-ui {
    --ui-text: #172033;
    --ui-text-muted: #647084;
    --ui-text-soft: #929bad;
    font-synthesis: none;
    font-weight: 400;
    letter-spacing: -.006em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.student-ui * {
    font-weight: 400 !important;
}

body.student-ui :is(h1, h2, h3, h4, h5, h6),
body.student-ui :is([class*="title"]:not([class*="subtitle"]), [class*="heading"], [class*="-name"], [class*="-value"]) {
    font-weight: 650 !important;
    letter-spacing: -.022em;
}

body.student-ui :is(strong, b, .fw-bold, .fw-bolder, .fw-semibold),
body.student-ui :is([class*="eyebrow"], [class*="badge"], [class*="chip"], [class*="pill"], [class*="number"], [class*="counter"], .courses-page-kicker) {
    font-weight: 600 !important;
}

body.student-ui :is(button, .btn, .ui-button, [role="button"], .student-nav-item) {
    font-weight: 600 !important;
}

body.student-ui :is(label, .fw-medium),
body.student-ui table th {
    font-weight: 500 !important;
}

body.student-ui :is(p, li, td, dd, small, .small, .text-muted) {
    letter-spacing: 0;
}

@media (max-width: 991.98px) {
    :root {
        --ui-bottom-space: 90px;
    }

    body.student-ui:has(.student-navigation) {
        padding-left: 0 !important;
    }

    .student-navigation {
        align-items: center;
        background: rgba(255, 255, 255, .97);
        border: 1px solid rgba(226, 229, 236, .95);
        border-bottom: 0;
        border-radius: 20px 20px 0 0;
        bottom: 0;
        box-shadow: 0 -10px 36px rgba(22, 28, 45, .08);
        flex-direction: row;
        left: 50%;
        max-width: 760px;
        padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
        right: auto;
        top: auto;
        transform: translateX(-50%);
        width: calc(100% - 24px);
    }

    .student-navigation-profile {
        display: none;
    }

    .student-navigation-menu {
        flex-direction: row;
        gap: 8px;
        width: 100%;
    }

    .student-nav-item {
        flex: 1 1 0;
        font-size: .82rem;
        gap: 7px;
        justify-content: center;
        min-height: 44px;
        padding: 8px 6px;
    }

    .student-nav-item i,
    .student-nav-item.active i {
        background: transparent;
        border-radius: 0;
        box-shadow: none;
        color: var(--ui-text-soft);
        display: block;
        flex: 0 0 24px;
        height: auto;
        width: auto;
    }

    .student-nav-item.active i {
        color: var(--ui-primary);
    }

    .student-nav-item--leaderboard i {
        color: var(--ui-text-soft);
    }

    .student-nav-item--leaderboard.active i {
        color: var(--ui-primary);
    }

    .student-nav-item:hover {
        transform: none;
    }

    .student-nav-item:hover i {
        transform: none;
    }
}

@media (max-width: 1199.98px) {
    body.student-ui .student-page-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    body.student-ui .student-page-aside {
        position: static;
    }
}

@media (max-width: 767.98px) {
    html {
        overflow-y: auto !important;
        scrollbar-gutter: auto !important;
    }

    :root {
        --ui-page-gutter: 16px;
        --ui-bottom-space: 90px;
    }

    body.student-ui .student-shell,
    body.student-ui .page-shell,
    body.student-ui .history-shell,
    body.student-ui .result-shell,
    body.student-ui .career-shell,
    body.student-ui .test-shell,
    body.student-ui .admission-shell,
    body.student-ui .profile-shell,
    body.student-ui .avatar-editor-page,
    body.student-ui .module-content-wrapper {
        padding-top: 16px;
    }

    .ui-page-heading,
    .student-test-toolbar {
        align-items: stretch;
        flex-direction: column;
        margin-top: 16px;
    }

    .student-test-toolbar__progress {
        flex-basis: auto;
    }

    .ui-card__body {
        padding: 17px;
    }

    .student-navigation {
        border-radius: 16px 16px 0 0;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        width: 100%;
    }

    .student-navigation-menu {
        gap: 2px;
    }

    .student-nav-item {
        flex: 1 1 0;
        flex-direction: column;
        font-size: .58rem;
        gap: 3px;
        line-height: 1.1;
        padding: 5px 2px;
    }

    .student-nav-item i {
        font-size: 1.18rem;
    }
}

@media (max-width: 479.98px) {
    :root {
        --ui-page-gutter: 12px;
    }

    .ui-page-heading {
        margin-bottom: 16px;
    }

    body.student-ui .btn,
    .ui-button {
        min-height: 40px;
        padding-left: 14px;
        padding-right: 14px;
    }

    body.student-ui table {
        min-width: 560px;
    }
}
