/* Подключение шрифтов MonaspaceNeon */
@font-face {
    font-family: 'MonaspaceNeon';
    src: url('/font/MonaspaceNeon-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MonaspaceNeon';
    src: url('/font/MonaspaceNeon-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MonaspaceNeon';
    src: url('/font/MonaspaceNeon-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MonaspaceNeon';
    src: url('/font/MonaspaceNeon-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'MonaspaceNeon';
    src: url('/font/MonaspaceNeon-ExtraBold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Базовые размеры - все в пикселях для консистентности */
    --base-font-size: 16px; /* Базовый размер шрифта */
    --rem-base: 16px; /* Базовое значение для rem (1rem = 16px) */
    
    --page-bg: #02040c;
    --page-gradient: radial-gradient(140% 120% at 15% 20%, rgba(0, 255, 213, 0.15), transparent 60%),
        radial-gradient(130% 150% at 80% 0%, rgba(31, 123, 255, 0.18), transparent 60%);
    --surface-1: rgba(8, 10, 18, 0.94);
    --surface-2: rgba(15, 17, 28, 0.9);
    --surface-3: rgba(22, 25, 38, 0.78);
    --stroke-1: rgba(255, 255, 255, 0.08);
    --stroke-2: rgba(255, 255, 255, 0.16);
    --text-primary: #f7fbff;
    --text-muted: rgba(247, 251, 255, 0.6);
    --accent-1: #00ffd5;
    --accent-1-strong: #00c6ad;
    --accent-2: #1f7bff;
    --accent-2-strong: #1760d8;
    --accent-3: #ff67ff;
    --success: #00feca;
    --warning: #ffd45c;
    --danger: #ff6c91;
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --shadow-soft: 0 30px 120px rgba(0, 0, 0, 0.45);
    --shadow-accent: 0 18px 60px rgba(0, 198, 164, 0.4);
    --font-base: 'MonaspaceNeon', 'Courier New', monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Явно задаем базовый размер шрифта для консистентности между окружениями */
/* КРИТИЧЕСКИ ВАЖНО: эти правила должны быть первыми после :root, чтобы переопределить любые другие стили */
html {
    font-size: 16px !important; /* Базовый размер - 1rem = 16px, !important для гарантии */
    -webkit-text-size-adjust: 100% !important; /* Отключаем авто-масштабирование в Safari/iOS */
    -moz-text-size-adjust: 100% !important; /* Отключаем авто-масштабирование в Firefox */
    text-size-adjust: 100% !important; /* Стандартное свойство для отключения авто-масштабирования */
}

body {
    font-family: var(--font-base);
    font-size: 16px !important; /* Явно задаем размер в пикселях, чтобы не зависеть от настроек браузера */
    margin: 0;
    min-height: 100vh;
    background-color: var(--page-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    padding-bottom: 4rem;
    position: relative;
    /* Дополнительные гарантии консистентности */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.icon-slot { /* Слот в правой части навигации */
    display: flex; /* Центрируем иконку по горизонтали */
    align-items: center; /* Выравниваем иконку по вертикали */
    justify-content: center; /* Держим иконку по центру контейнера */
}

.brand-icon { /* Базовый стиль навигационной иконки */
    width: 40px; /* Делаем иконку крупнее */
    height: 40px; /* Сохраняем пропорции по высоте */
    object-fit: contain; /* Не искажаем оригинальное изображение */
    display: block; /* Убираем лишние отступы как у inline-элемента */
}

.brand-icon.brand-icon--students { /* Отдельный размер для иконки раздела Ученики */
    width: 44px; /* Чуть шире для выделения основного раздела */
    height: 44px; /* Синхронно увеличиваем высоту */
}

.nav-link-content { /* Обертка для иконки и подписи в ссылках */
    display: flex; /* Ставим иконку и текст в одну строку */
    align-items: center; /* Выравниваем по вертикали */
    gap: 0.45rem; /* Добавляем воздух между иконкой и текстом */
}

.nav-link-icon { /* Настройки мини-иконки внутри ссылок */
    width: 20px; /* Чуть больше стандартного 18px для читаемости */
    height: 20px; /* Держим квадратную форму */
    object-fit: contain; /* Сохраняем пропорции исходного PNG */
    display: block; /* Убираем влияние baseline */
}

.nav-link-icon:not(img) { /* Стили для не-изображений (эмодзи, иконки) */
    width: auto;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
}

.nav-link-label { /* Текстовая часть ссылки */
    display: inline-block; /* Гарантируем корректные отступы */
    line-height: 1.1; /* Компактное вертикальное выравнивание */
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body::before {
    background: var(--page-gradient);
    opacity: 0.85;
}

body::after {
    background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 180px 180px;
    opacity: 0.18;
}

.app-shell,
.container {
    width: min(1480px, calc(100% - 4rem));
    max-width: 1480px !important; /* КРИТИЧЕСКИ ВАЖНО: фиксируем максимальную ширину для консистентности */
    margin: 0 auto;
    padding-top: 0;
    position: relative;
    z-index: 1;
    /* Гарантируем одинаковую ширину независимо от размера окна */
    box-sizing: border-box;
}

.glass-panel {
    background: var(--surface-1);
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.glass-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(0, 255, 213, 0.18), rgba(31, 123, 255, 0.12));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* Глобально: не подсвечиваем большие секции при hover.
   Если когда-то понадобится подсветка для отдельной панели — добавь класс .panel-hover */
.glass-panel:hover::after {
    opacity: 0;
}

.glass-panel.panel-hover:hover::after {
    opacity: 1;
}

.nav-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.8rem;
    padding: 1.2rem 1.8rem;
    background: #0f111c !important;
    background-image: none !important;
    backdrop-filter: none !important;
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke-1);
    box-shadow: var(--shadow-soft);
    margin-bottom: 2.8rem;
    width: min(1480px, calc(100% - 4rem));
    max-width: 1480px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.user-profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 255, 213, 0.25), rgba(31, 123, 255, 0.25));
    border: 2px solid rgba(0, 255, 213, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-1);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.user-profile-avatar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 255, 213, 0.3), rgba(31, 123, 255, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-profile-avatar:hover {
    transform: scale(1.05);
    border-color: var(--accent-1);
    box-shadow: 0 0 20px rgba(0, 255, 213, 0.4);
}

.user-profile-avatar:hover::before {
    opacity: 1;
}

.user-profile-avatar:active {
    transform: scale(0.98);
}

.user-profile-avatar.creator {
    background: linear-gradient(135deg, rgba(255, 103, 255, 0.25), rgba(31, 123, 255, 0.25));
    border-color: rgba(255, 103, 255, 0.5);
    color: var(--accent-3);
}

.user-profile-avatar.creator:hover {
    border-color: var(--accent-3);
    box-shadow: 0 0 20px rgba(255, 103, 255, 0.4);
}

.brand-mark {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    border: none;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.brand-caption {
    font-size: 1.05rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Контейнер выпадающего меню */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-trigger {
    cursor: pointer;
}

/* Само меню */
.nav-dropdown-content {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    min-width: 220px;
    background: var(--surface-2);
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    padding: 0.75rem;
}

/* Показываем при ховере */
.nav-dropdown:hover .nav-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Треугольник сверху меню */
.nav-dropdown-content::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 10px;
    height: 10px;
    background: var(--surface-2);
    border-left: 1px solid var(--stroke-1);
    border-top: 1px solid var(--stroke-1);
    transform: rotate(45deg);
}

/* Пункты внутри выпадающего меню */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    font-weight: 600;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background: var(--surface-3);
    color: var(--accent-1);
    padding-left: 1.25rem;
}

.dropdown-item.active {
    background: var(--surface-3);
    color: var(--accent-1);
}

/* Специальный стиль для Профиля и его выпадающего меню */
.nav-user-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: 1.5rem;
}

.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-dropdown-content {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    min-width: 180px;
    background: var(--surface-2);
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    padding: 0.5rem;
}

.profile-dropdown:hover .profile-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Треугольник для профиля */
.profile-dropdown-content::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 15px;
    width: 10px;
    height: 10px;
    background: var(--surface-2);
    border-left: 1px solid var(--stroke-1);
    border-top: 1px solid var(--stroke-1);
    transform: rotate(45deg);
}

.profile-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-item:hover {
    background: var(--surface-3);
    color: var(--accent-1);
}

.profile-item img {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.profile-item:hover img {
    opacity: 1;
}

.nav-icon-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--stroke-1);
    border-radius: 12px;
    transition: all 0.2s;
    color: var(--text-muted);
    text-decoration: none;
}

.nav-icon-btn:hover {
    border-color: var(--accent-1);
    background: var(--surface-3);
    color: var(--accent-1);
    transform: translateY(-1px);
}

.nav-icon-btn.active {
    border-color: var(--accent-1);
    background: var(--surface-3);
    color: var(--accent-1);
}

.nav-icon-btn img {
    width: 20px;
    height: 20px;
}

/* --- PROFILE PAGE & ROLE THEMES --- */

/* Creator (Aggressive Red) Theme Variables */
.profile-theme--creator {
    --role-accent: #ff3c5f;
    --role-accent-soft: rgba(255, 60, 95, 0.15);
    --role-accent-glow: rgba(255, 60, 95, 0.4);
    --role-bg-gradient: radial-gradient(140% 120% at 15% 20%, rgba(255, 60, 95, 0.2), transparent 60%),
                        radial-gradient(130% 150% at 80% 0%, rgba(255, 100, 100, 0.1), transparent 60%);
}

.profile-page-wrapper {
    min-height: 100vh;
    padding: 1.5rem 2rem 4rem 2rem;
    transition: background 0.5s ease;
}

.profile-theme--creator.profile-page-wrapper {
    background: var(--page-bg) var(--role-bg-gradient) !important;
}

.profile-header {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 2.5rem;
    margin-bottom: 3rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--stroke-1);
}

.profile-avatar-container {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.profile-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 40px;
    background: var(--surface-2);
    border: 2px solid var(--stroke-1);
    display: grid;
    place-items: center;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-muted);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.profile-theme--creator .profile-avatar-placeholder {
    border-color: var(--role-accent);
    color: var(--role-accent);
    box-shadow: 0 0 40px var(--role-accent-soft);
}

.profile-info-main {
    flex-grow: 1;
}

.profile-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    border: 1px solid transparent;
}

.profile-theme--creator .profile-role-badge {
    background: var(--role-accent-soft);
    border-color: var(--role-accent);
    color: var(--role-accent);
}

.profile-username {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    margin: 0 0 0.5rem 0;
    letter-spacing: -1.5px;
    color: var(--text-primary);
}

.profile-theme--creator .profile-username {
    text-shadow: 0 0 25px var(--role-accent-glow);
}

.profile-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 2rem;
}

.profile-card {
    background: var(--surface-1);
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(20px);
}

.profile-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.profile-details-list {
    display: grid;
    gap: 1.25rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--stroke-1);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 700;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-action-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

@media (max-width: 900px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

.nav-link {
    padding: 0.65rem 1.3rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-muted);
    border: 1px solid transparent;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: all 0.25s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    border-color: var(--stroke-2);
    background: rgba(255, 255, 255, 0.02);
}

.nav-link.active {
    color: #001b18;
    border-color: rgba(0, 198, 164, 0.7);
    background: linear-gradient(120deg, rgba(0, 198, 164, 0.6), rgba(23, 96, 216, 0.45));
    box-shadow: var(--shadow-accent);
}

.nav-link.active:hover {
    box-shadow: 0 16px 50px rgba(0, 198, 164, 0.45);
    transform: translateY(-1px);
}

.neo-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.25s ease;
}

/* Иконки внутри кнопок: используем flex-gap, не margin-right (иначе “отлипают” в гриде) */
.neo-button .ui-icon,
.neo-button .ui-icon--sm,
.neo-button .ui-icon--md,
.neo-button .ui-icon--only {
    margin-right: 0;
}

.neo-button.accent {
    background: linear-gradient(120deg, rgba(0, 198, 164, 0.92), rgba(23, 96, 216, 0.9));
    border-color: rgba(0, 198, 164, 0.45);
    color: #001b18;
    box-shadow: var(--shadow-accent);
}

.neo-button.accent:hover {
    filter: brightness(0.92);
    color: #f5fffb;
}

.neo-button.ghost {
    border-color: var(--stroke-1);
    color: var(--text-muted);
    background: transparent;
}

.neo-button.outline {
    border-color: rgba(255, 255, 255, 0.18);
    background: transparent;
}

.neo-button.danger {
    background: linear-gradient(120deg, #ff6b6b, var(--danger));
    border-color: rgba(255, 107, 107, 0.4);
    color: #2c0707;
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.2);
}

.neo-button.danger:hover {
    filter: brightness(0.95);
    color: #ffeef3;
}

.neo-button:hover {
    transform: translateY(-2px);
    color: #fff;
}

.neo-button:not(.accent):not(.danger):hover {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
    border-color: rgba(0, 198, 164, 0.25);
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.35em;
    font-size: 0.76rem;
    color: var(--text-muted);
    margin: 0 0 0.6rem 0;
}

.hero-title {
    font-size: clamp(2.2rem, 3vw, 3.3rem);
    margin: 0;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    color: var(--text-muted);
    margin: 0.8rem 0 0;
    line-height: 1.6;
}

.hero-actions {
    margin-top: 1.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.hero-pane {
    display: grid;
    gap: 1rem;
}

.hero-metric {
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.4rem;
    background: var(--surface-2);
}

.hero-metric-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    letter-spacing: 0.22em;
}

.hero-metric-value {
    font-size: 2.4rem;
    font-weight: 600;
    margin: 0.35rem 0 0;
}

.filters-panel {
    margin-bottom: 2rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.neo-field {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-start;
}

.neo-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    display: block;
    width: 100%;
    font-weight: 600;
}

.neo-input,
.neo-select {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--stroke-1);
    background: var(--surface-2);
    color: var(--text-primary);
    padding: 1rem 1.2rem;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-base);
}

.neo-input:hover,
.neo-select:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--surface-1);
}

.neo-input:focus,
.neo-select:focus {
    outline: none;
    border-color: rgba(0, 255, 213, 0.7);
    box-shadow: 0 0 0 4px rgba(0, 255, 213, 0.2);
    background: var(--surface-1);
}

.neo-input::placeholder,
.neo-select::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.neo-textarea {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--stroke-1);
    background: var(--surface-2);
    color: var(--text-primary);
    padding: 1rem 1.2rem;
    font-size: 1rem;
    font-family: var(--font-base);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    resize: vertical;
    min-height: 150px;
    line-height: 1.6;
}

.neo-textarea:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--surface-1);
}

.neo-textarea:focus {
    outline: none;
    border-color: rgba(0, 255, 213, 0.7);
    box-shadow: 0 0 0 4px rgba(0, 255, 213, 0.2);
    background: var(--surface-1);
}

.neo-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Upload Area - Premium Minimalism */
.upload-area {
    border: 2px dashed var(--stroke-1);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    background: var(--surface-2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: rgba(0, 255, 213, 0.5);
    background: var(--surface-1);
}

.upload-area.dragover {
    border-color: var(--accent-1);
    background: rgba(0, 255, 213, 0.1);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.upload-text {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Info Box - Premium Minimalism */
.info-box {
    background: rgba(31, 123, 255, 0.12);
    border-left: 3px solid var(--accent-2);
    border-radius: var(--radius-md);
    padding: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--accent-2);
    line-height: 1.7;
}

.info-box strong {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 1.05rem;
}

.info-box code {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2em 0.5em;
    border-radius: var(--radius-sm);
    font-family: var(--font-base);
    font-size: 0.9em;
    color: var(--accent-2);
}

.info-box pre {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(31, 123, 255, 0.3);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 0.8rem;
    overflow-x: auto;
    font-size: 0.85em;
    line-height: 1.6;
}

.filters-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--stroke-1);
    background: linear-gradient(150deg, rgba(8, 10, 18, 0.96), rgba(19, 22, 36, 0.9));
    padding: 1.5rem 1.6rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(0, 255, 213, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 255, 213, 0.15);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card strong {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, var(--text-primary), rgba(247, 251, 255, 0.85));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.stat-card span {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 500;
}

.students-panel {
    margin-bottom: 2.5rem;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.8rem;
}

.panel-head h2 {
    margin: 0.2rem 0 0;
    font-size: 1.7rem;
}

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

/* Гарантируем правильное отображение на десктопе */
@media (min-width: 769px) {
    .students-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
        gap: 1.5rem !important;
    }
}

/* Убеждаемся, что красная тема не влияет на grid учеников */
body.creator-theme-active .students-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 1.5rem !important;
}

.student-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke-1);
    background: linear-gradient(160deg, rgba(10, 10, 18, 0.98), rgba(20, 20, 32, 0.92));
    padding: 1.8rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.student-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 255, 213, 0.08), rgba(31, 123, 255, 0.05));
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.student-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 255, 213, 0.6);
    box-shadow: 0 20px 60px rgba(0, 255, 213, 0.25), 0 0 0 1px rgba(0, 255, 213, 0.1);
}

.student-card:hover::after {
    opacity: 1;
}

.student-card.active-student {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 2px rgba(0, 255, 213, 0.2), 0 12px 40px rgba(0, 255, 213, 0.2);
}

.student-card__head {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.student-avatar {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(0, 255, 213, 0.95), rgba(31, 123, 255, 0.9));
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 255, 213, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.student-card:hover .student-avatar {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 255, 213, 0.4);
}

.student-name {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.student-meta {
    font-size: 0.86rem;
    color: var(--text-muted);
}

.student-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    border: 1px solid var(--stroke-1);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.student-tag.student-class { /* Индивидуальный стиль для бейджа класса */
    border-color: var(--accent-2); /* Делаем акцент цветом границы */
    color: var(--accent-2); /* Красим текст в цвет акцента */
    background: rgba(31, 123, 255, 0.12); /* Добавляем легкий фон для заметности */
}

.student-insights {
    display: grid;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.student-insights > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.student-insights > div:last-child {
    border-bottom: none;
}

.student-insights span {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.student-card--cta {
    align-items: center;
    justify-content: center;
    text-align: center;
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.22);
}
.student-card--cta .hero-subtitle {
    color: var(--text-muted);
}

/* Стили для архивных учеников */
.student-card--archived {
    opacity: 0.7;
    border-color: rgba(255, 255, 255, 0.1);
    background: linear-gradient(160deg, rgba(8, 8, 15, 0.85), rgba(15, 15, 25, 0.75));
}

.student-card--archived:hover {
    opacity: 0.85;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.student-avatar--archived {
    background: linear-gradient(120deg, rgba(100, 100, 120, 0.6), rgba(80, 80, 100, 0.5));
    opacity: 0.6;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--stroke-1);
    background: var(--surface-2);
    color: var(--text-muted);
}

.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    align-items: center;
}

.ui-icon { /* Унифицированная inline-иконка для кнопок/лейблов по проекту */
    width: 18px; /* Базовый размер */
    height: 18px; /* Базовый размер */
    margin-right: 0.4rem; /* Отступ справа от иконки до текста */
    vertical-align: middle; /* Ровняем по baseline текста */
    object-fit: contain; /* Не искажаем PNG */
    display: inline-block; /* Стабильная геометрия */
}

.ui-icon--sm { /* Компактный вариант */
    width: 16px; /* Чуть меньше */
    height: 16px; /* Чуть меньше */
    margin-right: 0.35rem; /* Чуть меньше отступ */
}

.ui-icon--md { /* Чуть крупнее для hero-кнопок */
    width: 20px; /* Крупнее */
    height: 20px; /* Крупнее */
    margin-right: 0.5rem; /* Чуть больше отступ */
}

.ui-icon--only { /* Для icon-only кнопок */
    margin-right: 0; /* Убираем отступ */
}

.pagination-btn {
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--stroke-1);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.pagination-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pagination span {
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.now-playing-pill {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.8rem 2rem;
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(0, 198, 164, 0.95), rgba(23, 96, 216, 0.95));
    color: #001b18;
    font-weight: 600;
    letter-spacing: 0.08em;
    box-shadow: 0 18px 60px rgba(0, 198, 164, 0.4);
    cursor: pointer;
    z-index: 9;
}

.now-playing-panel {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    width: min(420px, calc(100% - 2rem));
    background: var(--surface-2);
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke-1);
    padding: 1.2rem 1.4rem;
    box-shadow: var(--shadow-soft);
    display: none;
    z-index: 9;
}

.now-playing-panel.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

.alert {
    padding: 1.1rem 1.3rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--accent-1);
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.04);
}

.alert-success { border-color: var(--success); color: var(--success); }
.alert-danger { border-color: var(--danger); color: var(--danger); }
.alert-warning { border-color: var(--warning); color: var(--warning); }
.alert-info { border-color: var(--accent-1); color: var(--accent-1); }

.field-error {
    margin-top: 0.5em;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 108, 145, 0.12);
    border-left: 3px solid var(--danger);
    color: var(--danger);
    font-size: 0.9em;
    font-weight: 500;
}

.task,
.task-card {
    background: linear-gradient(160deg, rgba(10, 10, 18, 0.98), rgba(20, 20, 32, 0.92));
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke-1);
    padding: 2.2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-soft);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.task::after,
.task-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 255, 213, 0.08), rgba(31, 123, 255, 0.05));
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.task:hover,
.task-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 255, 213, 0.6);
    box-shadow: 0 20px 60px rgba(0, 255, 213, 0.25), 0 0 0 1px rgba(0, 255, 213, 0.1);
}

.task:hover::after,
.task-card:hover::after {
    opacity: 1;
}

.task-card.autocheck-correct {
    border: 2px solid var(--success);
    background: linear-gradient(160deg, rgba(16, 185, 129, 0.15), rgba(10, 10, 18, 0.95));
}

.task-card.autocheck-correct::after {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
}

.task-card.autocheck-incorrect {
    border: 2px solid var(--danger);
    background: linear-gradient(160deg, rgba(239, 68, 68, 0.15), rgba(10, 10, 18, 0.95));
}

.task-card.autocheck-incorrect::after {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
}

.task-header {
    border-bottom: 1px solid var(--stroke-1);
    padding-bottom: 1.2rem;
    margin-bottom: 1.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.task-header input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-1);
}

.task-header label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 1.1rem;
}

.task-header a {
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.25s ease;
}

.task-header a:hover {
    color: var(--accent-2-strong);
}

.task-content {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1.05rem;
}

.task-content p {
    margin-bottom: 1rem;
}

.task-content p:last-child {
    margin-bottom: 0;
}

.task-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    border-top: 1px solid var(--stroke-1);
    padding-top: 1.5rem;
}

.task-actions .neo-button {
    transition: all 0.25s ease;
}

.task-actions .neo-button:hover {
    transform: translateY(-2px);
}

.btn {
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-accept { background: linear-gradient(120deg, var(--accent-1), var(--success)); color: #011510; }
.btn-skip { background: linear-gradient(120deg, #f6ad55, var(--warning)); color: #1c0f02; }
.btn-blacklist { background: linear-gradient(120deg, #ff6b6b, var(--danger)); color: #190005; }

.select-all,
.filter-section {
    background: var(--surface-1);
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke-1);
    padding: 1.5rem;
}

.attached-files {
    background: var(--surface-1);
    border-radius: var(--radius-lg);
    border: 1px solid var(--stroke-1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.attached-files h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.file-list li {
    margin: 0;
}

.file-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--stroke-1);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--text-primary);
    background: var(--surface-2);
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.file-link:hover {
    transform: translateY(-1px);
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: var(--surface-1);
    box-shadow: var(--shadow-soft);
}

/* Template Cards - Premium Minimalism */
.template-card {
    background: linear-gradient(160deg, rgba(10, 10, 18, 0.98), rgba(20, 20, 32, 0.92));
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.template-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 255, 213, 0.08), rgba(31, 123, 255, 0.05));
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.template-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 255, 213, 0.6);
    box-shadow: 0 20px 60px rgba(0, 255, 213, 0.25), 0 0 0 1px rgba(0, 255, 213, 0.1);
}

.template-card:hover::after {
    opacity: 1;
}

.template-card h3 {
    margin: 0 0 0.6rem 0;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--text-primary);
}

.template-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9em;
    line-height: 1.6;
}

.template-card .template-badges {
    display: flex;
    gap: 0.6rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.template-card .template-badge {
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.template-card .template-badge--category {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-1-strong));
    color: rgba(0, 0, 0, 0.9);
    box-shadow: 0 4px 12px rgba(0, 255, 213, 0.3);
}

.template-card .template-badge--count {
    background: var(--surface-3);
    color: var(--text-muted);
    border: 1px solid var(--stroke-1);
}

.template-card .template-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.2rem;
    width: 100%;
}

.template-card .template-actions .neo-button {
    flex: 1 1 0%;
    min-width: 0;
    text-align: center;
    padding: 0.9rem 0.8rem;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.template-card .template-actions .neo-button:hover {
    transform: translateY(-2px);
}

/* Filter Select - Premium Style */
.filter-select {
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.25s ease;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: rgba(0, 255, 213, 0.6);
    box-shadow: 0 0 0 3px rgba(0, 255, 213, 0.25);
    background: var(--surface-1);
}

.filter-select:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--surface-1);
}

/* Form Sections - Premium Minimalism */
.form-section {
    background: var(--surface-1);
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-section:hover::before {
    opacity: 0.5;
}

.form-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.8rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--stroke-1);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.8rem;
    align-items: start;
}

.form-grid.form-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.form-grid .neo-field {
    display: flex;
    flex-direction: column;
}

.form-grid.form-grid-compact .neo-label {
    min-height: 2.8em;
    display: flex;
    align-items: flex-start;
}

.form-grid-full {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--stroke-1);
}

.form-actions .neo-button {
    min-width: 120px;
}

/* Statistics - Premium Minimalism */
.stat-edit-item {
    display: grid;
    grid-template-columns: 140px 1fr 1fr auto;
    gap: 1.2rem;
    align-items: center;
    padding: 1.4rem;
    background: var(--surface-2);
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.stat-edit-item:hover {
    border-color: rgba(0, 255, 213, 0.4);
    background: var(--surface-1);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 255, 213, 0.15);
}

.stat-edit-item strong {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.stat-edit-item .stat-input-correct,
.stat-edit-item .stat-input-incorrect {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-sm);
    background: var(--surface-1);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.stat-edit-item .stat-input-correct:focus,
.stat-edit-item .stat-input-incorrect:focus {
    outline: none;
    border-color: rgba(0, 255, 213, 0.7);
    box-shadow: 0 0 0 3px rgba(0, 255, 213, 0.2);
}

.stat-edit-item .stat-save-btn {
    white-space: nowrap;
    transition: all 0.25s ease;
}

.stat-edit-item .stat-save-btn:hover {
    transform: translateY(-2px);
}

/* Plans Content - Premium Minimalism */
.plans-content {
    color: var(--text-primary);
    line-height: 1.9;
    font-size: 1.05rem;
}

.plans-content h1 {
    color: var(--text-primary);
    border-bottom: 2px solid var(--stroke-1);
    padding-bottom: 0.8rem;
    margin-bottom: 2rem;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.plans-content h2 {
    color: var(--accent-1);
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    font-size: 1.9rem;
    font-weight: 700;
    border-left: 4px solid var(--accent-1);
    padding-left: 0.8rem;
    letter-spacing: -0.01em;
}

.plans-content h3 {
    color: var(--accent-2);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.plans-content h4 {
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.plans-content code {
    background: var(--surface-2);
    padding: 0.2em 0.5em;
    border-radius: var(--radius-sm);
    font-family: var(--font-base);
    font-size: 0.9em;
    border: 1px solid var(--stroke-1);
    color: var(--accent-1);
}

.plans-content pre {
    background: var(--surface-2);
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.plans-content pre code {
    background: transparent;
    padding: 0;
    border: none;
    color: var(--text-primary);
}

/* Admin Cards - Premium Minimalism */
.admin-card {
    padding: 1.4rem;
    background: var(--surface-2);
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.admin-card:hover {
    border-color: rgba(0, 255, 213, 0.4);
    background: var(--surface-1);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 255, 213, 0.15);
}

.admin-item {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-sm);
    background: var(--surface-3);
    transition: all 0.25s ease;
}

.admin-item:hover {
    border-color: rgba(0, 255, 213, 0.4);
    background: var(--surface-2);
}

.admin-item-name {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.admin-item-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.admin-item-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Audit Table - Premium Minimalism */
.audit-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-2);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--stroke-1);
}

.audit-table th {
    background: var(--surface-3);
    padding: 1.2rem 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid var(--stroke-2);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.audit-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--stroke-1);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.audit-table tr:last-child td {
    border-bottom: none;
}

.audit-table tr:hover {
    background: var(--surface-1);
}

.audit-table tr:hover td {
    color: var(--text-primary);
}

/* Status Badges - Premium Minimalism */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.status-success {
    background: rgba(0, 254, 202, 0.2);
    color: var(--success);
    border: 1px solid rgba(0, 254, 202, 0.3);
}

.status-error {
    background: rgba(255, 108, 145, 0.2);
    color: var(--danger);
    border: 1px solid rgba(255, 108, 145, 0.3);
}

.status-warning {
    background: rgba(255, 212, 92, 0.2);
    color: var(--warning);
    border: 1px solid rgba(255, 212, 92, 0.3);
}

.status-info {
    background: rgba(31, 123, 255, 0.2);
    color: var(--accent-2);
    border: 1px solid rgba(31, 123, 255, 0.3);
}

/* Audit Stats - Premium Minimalism */
.audit-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.audit-stat-card {
    background: var(--surface-2);
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-md);
    padding: 1.4rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.audit-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.audit-stat-card:hover {
    border-color: rgba(0, 255, 213, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 255, 213, 0.15);
}

.audit-stat-card:hover::before {
    opacity: 1;
}

.audit-stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-1);
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
}

.audit-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.neo-checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.neo-checkbox-input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-1-strong);
}

.generator-hero {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr);
    gap: 1.5rem;
    align-items: start;
}

.generator-hero p {
    margin: 0.9rem 0 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.generator-context {
    border-radius: var(--radius-md);
    border: 1px solid var(--stroke-1);
    background: var(--surface-2);
    padding: 1.4rem;
    display: grid;
    gap: 0.9rem;
}

.generator-context .hero-eyebrow {
    margin-bottom: 0.2rem;
}

.generator-mode {
    margin-top: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--stroke-1);
    padding: 1.4rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.generator-mode__icon {
    font-size: 2rem;
    line-height: 1;
}

.generator-mode__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.generator-mode__hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.35rem;
}

.generator-mode--homework {
    background: linear-gradient(135deg, rgba(23, 96, 216, 0.2), rgba(0, 198, 164, 0.12));
    border-color: rgba(23, 96, 216, 0.4);
}

.generator-mode--classwork {
    background: linear-gradient(135deg, rgba(0, 198, 164, 0.25), rgba(255, 212, 92, 0.12));
    border-color: rgba(0, 198, 164, 0.45);
}

.generator-layout {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.generator-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.generator-panel h2,
.generator-panel h3 {
    margin: 0 0 1.1rem 0;
    font-size: 1.35rem;
}

.generator-panel p {
    margin: 0 0 1.4rem 0;
    color: var(--text-muted);
}

.generator-form-grid {
    display: grid;
    gap: 1rem;
}

.generator-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.generator-actions .neo-button {
    flex: 1 1 220px;
    justify-content: flex-start;
}

.generator-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.generator-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.generator-links .neo-button {
    flex: 1 1 240px;
    justify-content: flex-start;
}

.generator-reset {
    border-top: 1px solid var(--stroke-1);
    padding-top: 1.3rem;
    margin-top: 1.3rem;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-1), var(--accent-2));
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-1), var(--accent-3));
}

.accepted-badge,
.skipped-badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 0.7rem;
    letter-spacing: 0.05em;
}

.accepted-badge {
    background: linear-gradient(120deg, var(--accent-1), var(--success));
    color: #01221a;
}

.skipped-badge {
    background: linear-gradient(120deg, var(--warning), #ffb347);
    color: #211102;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ============================================ */

/* Мобильное меню (бургер) */
.mobile-menu-toggle {
    display: none; /* Скрыто по умолчанию */
    background: transparent;
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-sm);
    padding: 0.6rem;
    cursor: pointer;
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    transition: all 0.25s ease;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 4, 12, 0.95);
    backdrop-filter: blur(10px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: var(--surface-2);
    border-left: 1px solid var(--stroke-1);
    z-index: 999;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--stroke-1);
}

.mobile-menu-close {
    background: transparent;
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.25s ease;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.05);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-muted);
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--text-primary);
    border-color: var(--stroke-2);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-nav-link.active {
    border-color: rgba(0, 198, 164, 0.7);
    background: linear-gradient(120deg, rgba(0, 198, 164, 0.15), rgba(23, 96, 216, 0.1));
}

.mobile-nav-link-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Медиа-запросы для мобильных устройств */
@media (max-width: 768px) {
    /* Базовые отступы и размеры */
    .app-shell,
    .container {
        width: calc(100% - 2rem) !important;
        max-width: 1480px !important; /* КРИТИЧЕСКИ ВАЖНО: фиксируем максимальную ширину даже на мобильных */
        padding-top: 0;
    }

    body {
        padding-bottom: 2rem;
    }

    /* Навигация - мобильное меню */
    .nav-primary {
        flex-wrap: wrap;
        padding: 1rem 1.2rem;
        gap: 1rem;
        margin-bottom: 1.5rem;
        width: calc(100% - 2rem);
        max-width: 1480px;
        margin-left: auto;
        margin-right: auto;
    }

    .nav-brand {
        flex: 1;
        min-width: 0;
    }

    .brand-mark {
        width: 56px;
        height: 56px;
        font-size: 0.65rem;
    }

    .user-profile-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .brand-caption {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-links {
        display: none; /* Скрываем обычное меню на мобильных */
    }

    .nav-actions {
        display: none; /* Скрываем иконку справа на мобильных */
    }

    .mobile-menu-toggle {
        display: flex; /* Показываем бургер-меню */
    }

    /* Glass panels */
    .glass-panel {
        padding: 1.5rem 1.2rem;
        border-radius: var(--radius-md);
    }

    /* Hero секции */
    .dashboard-hero {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .hero-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .neo-button {
        width: 100%;
        justify-content: center;
    }

    .hero-pane {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .hero-metric {
        padding: 1rem;
    }

    .hero-metric-value {
        font-size: 2rem;
    }

    /* Фильтры и формы */
    .filters-grid {
        grid-template-columns: 1fr;
    }

    .filters-actions {
        flex-direction: column;
    }

    .filters-actions .neo-button {
        width: 100%;
    }
} /* Закрываем media query 768px */

/* --- USER PROFILE REDESIGN (DESKTOP & GLOBAL) --- */

/* Цветовые темы ролей */
.theme-creator {
    --accent-color: #ff2e2e;
    --accent-glow: rgba(255, 46, 46, 0.5);
    --accent-bg: rgba(255, 46, 46, 0.1);
}

.theme-student {
    --accent-color: #00c6a4;
    --accent-glow: rgba(0, 198, 164, 0.5);
    --accent-bg: rgba(0, 198, 164, 0.1);
}

.theme-tutor {
    --accent-color: #1f7bff;
    --accent-glow: rgba(31, 123, 255, 0.45);
    --accent-bg: rgba(31, 123, 255, 0.12);
}

.theme-parent {
    --accent-color: #b14dff;
    --accent-glow: rgba(177, 77, 255, 0.35);
    --accent-bg: rgba(177, 77, 255, 0.12);
}

.theme-admin {
    --accent-color: #ffb020;
    --accent-glow: rgba(255, 176, 32, 0.35);
    --accent-bg: rgba(255, 176, 32, 0.12);
}

/* Контейнер профиля */
.profile-container {
    max-width: 1480px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

/* Карточка "Паспорт" */
.profile-card {
    background: var(--surface-1);
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-soft);
}

/* “Вау” обводка и глубина */
.profile-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.14),
        rgba(255,255,255,0.04),
        rgba(0,0,0,0.0)
    );
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.9;
}

/* .profile-card::after {
    content: '';
    position: absolute;
    inset: -30px;
    background: radial-gradient(circle at 15% 30%, var(--accent-glow, rgba(0,198,164,0.35)) 0%, transparent 55%),
                radial-gradient(circle at 85% 10%, rgba(255,255,255,0.06) 0%, transparent 55%),
                radial-gradient(circle at 70% 95%, rgba(31,123,255,0.18) 0%, transparent 55%);
    filter: blur(18px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
} */

/* Обложка */
.profile-cover {
    height: 200px;
    width: 100%;
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
    position: relative;
    overflow: hidden;
}

.profile-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(255,255,255,0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255,255,255,0.03) 0%, transparent 20%);
    z-index: 1;
}

.profile-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 28%, var(--accent-bg, rgba(0,198,164,0.12)) 0%, transparent 55%),
        radial-gradient(circle at 72% 18%, rgba(31,123,255,0.16) 0%, transparent 55%),
        linear-gradient(120deg, rgba(255,255,255,0.03), rgba(255,255,255,0.0));
    opacity: 1;
    z-index: 1;
}

/* Специфика для Creator */
.theme-creator .profile-cover {
    background: linear-gradient(135deg, #2c0707, #1a0505);
}
.theme-creator .profile-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 46, 46, 0.03),
        rgba(255, 46, 46, 0.03) 10px,
        transparent 10px,
        transparent 20px
    );
}

/* Блок с аватаром и инфо */
.profile-header {
    padding: 0 2.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: -60px; /* Наезжаем на обложку */
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.profile-identity {
    display: flex;
    align-items: flex-end;
    gap: 2rem;
}

.profile-avatar-wrapper {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--surface-1); /* Цвет фона страницы для обводки */
    padding: 6px; /* Толщина обводки */
    flex-shrink: 0;
}

.profile-avatar-big {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-muted);
    border: 2px solid var(--stroke-2);
    overflow: hidden;
    position: relative;
}

.profile-avatar-big img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Подсветка аватара для Creator */
.theme-creator .profile-avatar-big {
    border-color: #ff2e2e;
    color: #ff2e2e;
    box-shadow: 0 0 30px rgba(255, 46, 46, 0.15);
}

.profile-info h1 {
    font-size: 2.2rem;
    margin: 0;
    line-height: 1.1;
    margin-bottom: 0.4rem;
}

.profile-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--surface-3);
    color: var(--text-muted);
    border: 1px solid var(--stroke-2);
}

.theme-creator .profile-role-badge {
    background: rgba(255, 46, 46, 0.1);
    color: #ff2e2e;
    border-color: rgba(255, 46, 46, 0.3);
    box-shadow: 0 0 15px rgba(255, 46, 46, 0.1);
}

/* Секции профиля */
.profile-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* Выпадающие секции (используем в профилях и комнатах) */
.profile-details > summary {
    cursor: pointer;
    font-weight: 900;
    color: var(--text-primary);
    list-style: none;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.profile-details > summary::-webkit-details-marker { display: none; }
.profile-details > summary::before {
    content: '▸';
    color: var(--text-muted);
    transform: translateY(-1px);
}
.profile-details[open] > summary::before { content: '▾'; }
.profile-details-body { margin-top: .9rem; }

.profile-section {
    background: var(--surface-1);
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.profile-section h3 {
    margin: 0 0 1.25rem 0;
    font-size: 1.1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-section h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--stroke-1);
}

/* Поля данных */
.data-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--stroke-1);
}

.data-row:last-child {
    border-bottom: none;
}

.data-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.data-value {
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace; /* Технический шрифт */
}

/* Адаптив */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: -50px;
    }
    
    .profile-identity {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .profile-content-grid {
        grid-template-columns: 1fr;
    }

    /* Статистика */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card strong {
        font-size: 1.6rem;
    }

    .stat-card span {
        font-size: 0.75rem;
    }

    /* Карточки учеников */
    .students-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .student-card {
        padding: 1.2rem;
    }

    .student-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .student-name {
        font-size: 1.1rem;
    }

    /* Панели */
    .panel-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .panel-head h2 {
        font-size: 1.4rem;
    }

    .panel-head .hero-actions {
        width: 100%;
    }

    .panel-head .hero-actions .neo-button {
        width: 100%;
    }

    /* Кнопки */
    .neo-button {
        padding: 0.9rem 1.3rem;
        font-size: 0.95rem;
        min-height: 44px; /* Touch-friendly размер */
    }

    /* Генератор */
    .generator-hero {
        grid-template-columns: 1fr;
    }

    .generator-grid {
        grid-template-columns: 1fr;
    }

    .generator-actions .neo-button {
        flex: 1 1 100%;
    }

    .generator-links .neo-button {
        flex: 1 1 100%;
    }

    /* Задания */
    .task {
        padding: 1.5rem 1.2rem;
        margin-bottom: 1.5rem;
    }

    .task-actions {
        flex-direction: column;
    }

    .task-actions .neo-button,
    .task-actions .btn {
        width: 100%;
        min-height: 44px;
    }

    /* Формы */
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 1.5rem 1.2rem;
    }

    /* Пагинация */
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .pagination-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
        min-height: 44px;
    }

    /* Now playing pill */
    .now-playing-pill {
        top: 16px;
        padding: 0.7rem 1.5rem;
        font-size: 0.85rem;
        max-width: calc(100% - 2rem);
    }

    .now-playing-panel {
        top: 70px;
        width: calc(100% - 2rem);
        padding: 1rem 1.2rem;
    }

    /* Eyebrow и заголовки */
    .hero-eyebrow {
        font-size: 0.7rem;
    }

    /* Отступы для секций */
    section {
        margin-top: 1.5rem;
    }

    section:first-of-type {
        margin-top: 0;
    }
}

/* Медиа-запросы для очень маленьких экранов */
@media (max-width: 480px) {
    .app-shell,
    .container {
        width: calc(100% - 1rem);
        padding-top: 1rem;
    }

    .nav-primary {
        padding: 0.8rem 1rem;
    }

    .glass-panel {
        padding: 1.2rem 1rem;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

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

    .brand-caption {
        display: none; /* Скрываем текст логотипа на очень маленьких экранах */
    }

    .mobile-menu {
        width: 100vw;
    }
}

/* Адаптация таблиц для мобильных */
@media (max-width: 768px) {
    /* Таблицы становятся карточками на мобильных */
    .testers-table,
    .audit-table {
        display: block;
        border-radius: var(--radius-md);
        overflow: visible;
    }

    .testers-table thead,
    .audit-table thead {
        display: none;
    }

    .testers-table tbody,
    .audit-table tbody {
        display: block;
    }

    .testers-table tr,
    .audit-table tr {
        display: block;
        margin-bottom: 1rem;
        background: var(--surface-2);
        border: 1px solid var(--stroke-1);
        border-radius: var(--radius-md);
        padding: 1rem;
    }

    .testers-table td,
    .audit-table td {
        display: block;
        padding: 0.5rem 0;
        border: none;
        text-align: left;
    }

    .testers-table td:before,
    .audit-table td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: var(--text-muted);
        display: inline-block;
        min-width: 100px;
    }

    /* Фильтры аудита */
    .audit-filters {
        grid-template-columns: 1fr;
    }

    .audit-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Touch-friendly элементы */
@media (hover: none) and (pointer: coarse) {
    /* Увеличиваем области нажатия для touch-устройств */
    .nav-link,
    .neo-button,
    .btn,
    .pagination-btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* Убираем hover-эффекты на touch-устройствах */
    .glass-panel:hover::after {
        opacity: 0;
    }

    .student-card:hover {
        transform: none;
    }

    .nav-link:hover {
        background: transparent;
    }
}

/* Дополнительные адаптации для форм */
@media (max-width: 768px) {
    .form-section {
        margin-bottom: 1.5rem;
    }

    .form-section-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .form-grid-full {
        grid-column: 1 / -1;
    }

    /* Модальные окна */
    .modal-content {
        width: calc(100% - 2rem);
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}

/* Модальное окно подтверждения */
.confirm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.confirm-modal.active {
    display: flex;
}

.confirm-modal-content {
    background: var(--surface-1);
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-soft);
}

.confirm-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.confirm-modal-message {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.confirm-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.confirm-modal-actions .neo-button {
    min-width: 120px;
}

/* Дополнительные адаптации для генератора/мелкого текста */
@media (max-width: 768px) {
    /* Генератор контекста */
    .generator-context {
        padding: 1.2rem;
    }

    .generator-mode {
        flex-direction: column;
        padding: 1.2rem;
    }

    /* Заметки и описания */
    small {
        font-size: 0.8rem;
    }
}

/* Глобальный поиск */
.global-search-container {
    position: relative;
}

.global-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: var(--surface-1);
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    padding: 1rem;
}

.global-search-results.active {
    display: block;
}

.search-results-section {
    margin-bottom: 1.5rem;
}

.search-results-section:last-child {
    margin-bottom: 0;
}

.search-results-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--stroke-1);
}

.search-result-item {
    display: block;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s;
    margin-bottom: 0.5rem;
}

.search-result-item:hover {
    background: var(--surface-2);
}

.search-result-item:last-child {
    margin-bottom: 0;
}

.search-result-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--accent-1);
}

.search-result-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.search-result-preview {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Быстрые действия */
.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--surface-2);
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.quick-action-btn:hover {
    background: var(--surface-3);
    border-color: var(--accent-1);
    transform: translateY(-2px);
}

/* Предпросмотр задания */
.task-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.task-preview-modal.active {
    display: flex;
}

.task-preview-content {
    background: var(--surface-1);
    border: 1px solid var(--stroke-1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-soft);
    position: relative;
}

.task-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--stroke-1);
}

.task-preview-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.task-preview-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.2s;
}

.task-preview-close:hover {
    color: var(--text-primary);
}

.task-preview-body {
    color: var(--text-primary);
}

/* ============================================
   UX УЛУЧШЕНИЯ
   ============================================ */

/* Breadcrumbs */
.breadcrumbs-container {
    margin-bottom: 1.5rem;
}

.breadcrumbs {
    display: flex;
    align-items: center;
}

.breadcrumbs-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.breadcrumbs-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.breadcrumbs-item:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.breadcrumbs-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs-link:hover {
    color: var(--accent-1);
}

.breadcrumbs-current {
    color: var(--text-primary);
    font-weight: 600;
}

/* Form Validation */
.neo-field {
    position: relative;
}

.neo-input.error,
.neo-select.error,
.neo-textarea.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(255, 108, 145, 0.1);
}

.field-error {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--danger);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.field-error::before {
    content: '⚠';
    font-size: 1rem;
}

/* Tooltips */
.tooltip {
    position: fixed;
    background: var(--surface-2);
    border: 1px solid var(--stroke-2);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s, transform 0.2s;
    max-width: 250px;
    box-shadow: var(--shadow-soft);
}

.tooltip.active {
    opacity: 1;
    transform: translateY(0);
}

.tooltip::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 6px solid transparent;
}

.tooltip[data-position="top"]::after {
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: var(--surface-2);
}

.tooltip[data-position="bottom"]::after {
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: var(--surface-2);
}

.tooltip[data-position="left"]::after {
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: var(--surface-2);
}

.tooltip[data-position="right"]::after {
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: var(--surface-2);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state-description {
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Undo Notification */
.undo-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
}

.undo-notification-item {
    background: var(--surface-2);
    border: 1px solid var(--stroke-2);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: var(--shadow-soft);
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s, transform 0.3s;
}

.undo-notification-item span {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.undo-btn {
    background: var(--accent-1);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    color: var(--page-bg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.undo-btn:hover {
    background: var(--accent-1-strong);
    transform: translateY(-2px);
}

/* Keyboard Shortcuts Hint */
.keyboard-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.keyboard-hint kbd {
    background: var(--surface-2);
    border: 1px solid var(--stroke-1);
    border-radius: 4px;
    padding: 0.2rem 0.4rem;
    font-family: var(--font-base);
    font-size: 0.7rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Mobile Responsiveness Improvements */
@media (max-width: 768px) {
    .breadcrumbs-list {
        font-size: 0.8rem;
    }
    
    .breadcrumbs-item:not(:last-child)::after {
        margin-left: 0.25rem;
        font-size: 1rem;
    }
    
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state-icon {
        font-size: 3rem;
    }
    
    .empty-state-title {
        font-size: 1.2rem;
    }
    
    .undo-notification {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
    
    .tooltip {
        max-width: 200px;
        font-size: 0.8rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .students-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .filters-grid {
        grid-template-columns: 1fr !important;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .neo-button {
        width: 100%;
    }
}

/* ===== Стили для графиков аналитики ===== */
#skillsChart {
    max-height: 500px !important;
    width: 100% !important;
}

/* Улучшаем читаемость подписей на радар-чарте */
.glass-panel canvas {
    filter: contrast(1.05);
}

/* ===== Кнопка "Наверх" (Scroll to Top) ===== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--surface-1);
    border: 2px solid var(--stroke-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--accent-1);
    border-color: var(--accent-1);
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(23, 96, 216, 0.3);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
    fill: var(--text-primary);
    transition: fill 0.2s ease;
}

.scroll-to-top:hover svg {
    fill: white;
}

/* Усиление темы Creator (Red Aggression) */
.theme-creator .profile-card { border: 1px solid rgba(255, 46, 46, 0.5); box-shadow: 0 0 60px rgba(255, 46, 46, 0.15); }
.theme-creator .profile-section { border-color: rgba(255, 46, 46, 0.3); background: linear-gradient(145deg, rgba(44, 7, 7, 0.6), rgba(26, 5, 5, 0.4)); }
.theme-creator .profile-section h3 { color: #ff4d4d; text-shadow: 0 0 15px rgba(255, 77, 77, 0.4); }
.theme-creator .profile-avatar-big { box-shadow: 0 0 50px rgba(255, 46, 46, 0.4); border-color: #ff2e2e; }
.theme-creator .neo-button.outline { border-color: rgba(255, 46, 46, 0.5); color: #ff2e2e; }
.theme-creator .neo-button.outline:hover { background: rgba(255, 46, 46, 0.1); box-shadow: 0 0 20px rgba(255, 46, 46, 0.2); }

/* Global Modal Styles */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); z-index: 10000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(8px); opacity: 0; transition: opacity 0.3s ease; }
.modal-overlay.active { display: flex; opacity: 1; }
.modal { background: var(--surface-1); border: 1px solid var(--stroke-1); border-radius: var(--radius-lg); width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 25px 50px rgba(0,0,0,0.5); transform: translateY(20px); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.modal-overlay.active .modal { transform: translateY(0); }
.modal-header { padding: 1.5rem; border-bottom: 1px solid var(--stroke-1); display: flex; justify-content: space-between; align-items: center; }
.modal-title { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }
.modal-close { background: transparent; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; padding: 0.5rem; line-height: 1; transition: color 0.2s; }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.modal-footer { padding: 1.5rem; border-top: 1px solid var(--stroke-1); display: flex; justify-content: flex-end; gap: 1rem; background: var(--surface-2); border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); }

/* GLOBAL CREATOR THEME OVERRIDE - применяется через JS на странице профиля */
/* Используем класс на body, который добавляется через JS, чтобы не влиять на другие страницы */
body.creator-theme-active {
    --page-bg: #0a0000;
    --surface-1: rgba(20, 0, 0, 0.95);
    --surface-2: rgba(30, 0, 0, 0.9);
    --surface-3: rgba(40, 0, 0, 0.8);
    --stroke-1: rgba(255, 0, 0, 0.2);
    --stroke-2: rgba(255, 0, 0, 0.3);
    --text-primary: #ffdddd;
    --text-muted: rgba(255, 200, 200, 0.6);
    --accent-1: #ff0000;
    --accent-1-strong: #cc0000;
    --page-gradient: radial-gradient(circle at 50% 0%, rgba(255, 0, 0, 0.2), transparent 70%);
}

body.creator-theme-active .nav-primary {
    background: #0f111c !important;
    border-color: var(--stroke-1);
    box-shadow: var(--shadow-soft);
}

/* Updated Profile Cover */
.theme-creator .profile-cover {
    background: 
        radial-gradient(circle at 50% 120%, rgba(255, 0, 0, 0.4), transparent 70%),
        linear-gradient(0deg, #0a0000 0%, transparent 100%),
        repeating-radial-gradient(circle at 50% 50%, rgba(255, 0, 0, 0.05) 0, rgba(255, 0, 0, 0.05) 1px, transparent 2px, transparent 40px);
    border-bottom: 1px solid rgba(255, 0, 0, 0.3);
    height: 250px;
}
.theme-creator .profile-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background-image: repeating-linear-gradient(45deg, #ff0000 0, #ff0000 1px, transparent 0, transparent 50%);
    background-size: 30px 30px;
}
