﻿/* ============ Общий UI-kit внутренних страниц ============ */

/* --- Фон и панель --- */
.inner-page {
    min-height: calc(100vh - 200px);
    padding: 3rem 0 4rem;
    background: linear-gradient(rgba(0,0,0,.62), rgba(0,0,0,.62)), url('/images/hero-bg.png') center / cover no-repeat fixed;
    width: 100%;
    overflow-x: hidden;
}


.inner-panel {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 14px;
    padding: 2rem;
}

.inner-title {
    color: #fff;
    font-weight: 800;
    font-size: 1.6rem;
    margin: 0;
}

.inner-subtitle {
    color: rgba(255,255,255,.6);
    font-size: .92rem;
    margin-top: .35rem;
}

/* --- Кнопки --- */
.btn-gold {
    display: inline-block;
    padding: .7rem 1.6rem;
    background: var(--brand-gold);
    border: none;
    border-radius: 6px;
    color: #141414;
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all .25s ease;
}

    .btn-gold:hover {
        background: #e8b93f;
        color: #141414;
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(217, 166, 46, .35);
    }

.btn-gold--block {
    width: 100%;
    padding: .9rem;
    font-size: 1.05rem;
}

.btn-ghost {
    display: inline-block;
    padding: .7rem 1.6rem;
    background: transparent;
    border: 1.5px solid rgba(255,255,255,.5);
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all .25s ease;
}

    .btn-ghost:hover {
        background: rgba(255,255,255,.12);
        color: #fff;
    }

/* --- Кнопки действий в таблицах --- */
.action-btn {
    display: inline-block;
    padding: .4rem .9rem;
    border-radius: 5px;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .2s ease;
}

.action-btn--edit {
    background: transparent;
    border-color: rgba(255,255,255,.5);
    color: #fff;
}

    .action-btn--edit:hover {
        background: #fff;
        color: #141414;
    }

.action-btn--danger {
    background: transparent;
    border-color: var(--brand-red);
    color: #ff8a8a;
}

    .action-btn--danger:hover {
        background: var(--brand-red);
        color: #fff;
    }

/* --- Поля форм (бывший .auth-field) --- */
.form-field {
    text-align: left;
    margin-bottom: 1.25rem;
}

    .form-field label {
        display: block;
        color: rgba(255, 255, 255, .85);
        font-size: .9rem;
        font-weight: 600;
        margin-bottom: .45rem;
    }

    .form-field input,
    .form-field select,
    .form-field textarea {
        width: 100%;
        padding: .8rem 1rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, .25);
        border-radius: 6px;
        color: #fff;
        font-size: 1rem;
        transition: border-color .25s ease, background .25s ease;
    }

        .form-field input::placeholder {
            color: rgba(255, 255, 255, .45);
        }

        .form-field input:focus,
        .form-field select:focus,
        .form-field textarea:focus {
            outline: none;
            border-color: var(--brand-gold);
            background: rgba(255, 255, 255, 0.15);
        }

/* --- Ошибки валидации (класс генерирует ASP.NET) --- */
.field-validation-error {
    color: #ff8a8a;
    font-size: .82rem;
    margin-top: .35rem;
    display: block;
}

.input-validation-error {
    border-color: var(--brand-red) !important;
}

/* --- Таблица --- */
.glass-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
}

    .glass-table th {
        text-align: left;
        font-size: .8rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--brand-gold);
        padding: .9rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,.2);
    }

    .glass-table td {
        padding: 1rem;
        border-bottom: 1px solid rgba(255,255,255,.08);
        font-size: .95rem;
        vertical-align: middle;
    }

    .glass-table tr:hover td {
        background: rgba(255,255,255,.04);
    }

/* --- Бейджи и чекбоксы групп --- */
.group-badge {
    display: inline-block;
    padding: .25rem .7rem;
    margin: .15rem .2rem .15rem 0;
    background: rgba(217,166,46,.15);
    border: 1px solid rgba(217,166,46,.4);
    border-radius: 20px;
    color: var(--brand-gold);
    font-size: .78rem;
    font-weight: 600;
}

.group-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.group-checkbox {
    position: relative;
}

    .group-checkbox input {
        position: absolute;
        opacity: 0;
    }

    .group-checkbox label {
        display: inline-block;
        padding: .5rem 1.1rem;
        border: 1.5px solid rgba(255,255,255,.3);
        border-radius: 20px;
        color: rgba(255,255,255,.75);
        font-size: .88rem;
        cursor: pointer;
        transition: all .2s ease;
        user-select: none;
    }

    .group-checkbox input:checked + label {
        background: rgba(217,166,46,.2);
        border-color: var(--brand-gold);
        color: var(--brand-gold);
        font-weight: 600;
    }

/* --- Алерты --- */
.alert-success-glass {
    padding: .9rem 1.25rem;
    background: rgba(40, 167, 69, .15);
    border: 1px solid rgba(40, 167, 69, .5);
    border-radius: 8px;
    color: #7ddb9a;
    margin-bottom: 1.5rem;
}

/* бывший .auth-error */
.alert-danger-glass {
    padding: .9rem 1.25rem;
    background: rgba(198, 47, 47, .2);
    border: 1px solid var(--brand-red);
    border-radius: 8px;
    color: #ff8a8a;
    font-size: .9rem;
    margin-bottom: 1.5rem;
}

.course-card__placeholder {
    background: linear-gradient(135deg, #2c2c3e 0%, #1a1a2e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    border-radius: 8px 8px 0 0;
}

    .course-card__placeholder span {
        font-size: 4rem;
        color: #d4af37;
        opacity: 0.6;
    }
/* ===== Список уроков ===== */
.lesson-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .lesson-item:hover {
        background: rgba(212, 175, 55, 0.1);
        border-color: rgba(212, 175, 55, 0.4);
        transform: translateX(4px);
    }

.lesson-item__status {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    flex-shrink: 0;
}

.lesson-item--completed .lesson-item__status {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
    color: #4caf50;
}

.lesson-item__title {
    font-size: 1.05rem;
}

/* ===== Прогресс-бар ===== */
.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.75rem 0 0.5rem;
}

.progress-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #f4d03f);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* ===== Карточки курсов (ученик) ===== */
.course-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.course-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.course-card__content {
    padding: 1.25rem;
}

    .course-card__content h3 {
        color: #d4af37;
        margin: 0 0 0.5rem;
    }

    .course-card__content p {
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.9rem;
    }

/* ===== Страница урока ===== */
.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.lesson-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.video-container {
    margin: 1.5rem 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.lesson-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.lesson-actions {
    margin: 1.5rem 0;
    text-align: center;
}

    .lesson-actions .btn-gold:disabled {
        background: rgba(76, 175, 80, 0.3);
        border-color: #4caf50;
        color: #4caf50;
        cursor: default;
    }

.lesson-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.course-card__image {
    width: 100%;
    height: 160px; /* фиксированная высота блока */
    overflow: hidden; /* обрезать лишнее */
    border-radius: 8px 8px 0 0;
}

    .course-card__image img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* ← ГЛАВНОЕ: заполняет блок, обрезая края, БЕЗ искажения */
        object-position: center; /* центрирует обрезку */
        display: block;
    }

/* ===== Загрузка файла ===== */
.file-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.file-upload__input {
    display: none; /* скрываем стандартный input */
}

.file-upload__button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    color: #d4af37;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

    .file-upload__button:hover {
        background: rgba(212, 175, 55, 0.25);
        border-color: #d4af37;
        transform: translateY(-1px);
    }

.file-upload__icon {
    font-size: 1.2rem;
}

.file-upload__name {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Шире таблица для тренера */
.trainer-table {
    min-width: 900px; /* или 100% */
}

/* Кнопка Прогресс — красивый стиль */
.action-btn--progress {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 0.4rem 0.9rem; /* как у .action-btn */
    border-radius: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

    .action-btn--progress:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        color: #fff;
    }

/* ============ Профиль — адаптивность ============ */

/* ФИО: 3 колонки → 1 колонка на мобиле */
.profile-fio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: .75rem;
}

@media (max-width: 575.98px) {
    .profile-fio-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Форма создания группы */
.profile-group-form {
    display: flex;
    gap: .75rem;
    margin-top: 1rem;
}

.profile-group-form input {
    flex: 1;
    padding: .8rem 1rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 6px;
    color: #fff;
}

@media (max-width: 575.98px) {
    .profile-group-form {
        flex-direction: column;
    }
    
    .profile-group-form .btn-gold {
        width: 100%;
    }
}

/* Уменьшаем padding панели на мобиле */
@media (max-width: 575.98px) {
    .inner-panel {
        padding: 1.5rem 1rem;
    }
    
    .container {
        padding-left: .75rem;
        padding-right: .75rem;
    }
}

/* ============ Уроки и курсы — адаптивность ============ */

/* Маленькая кнопка назад */
.btn-ghost--small {
    padding: .5rem 1rem;
    font-size: .85rem;
}

/* Шапка урока — перенос на мобиле */
.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: .5rem;
}

@media (max-width: 575.98px) {
    .lesson-header {
        flex-direction: column;
        align-items: flex-start;
        gap: .75rem;
    }
    
    .lesson-counter {
        font-size: .85rem;
    }
}

/* Блок домашнего задания */
.lesson-homework {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 215, 0, .1);
    border: 1px solid rgba(255, 215, 0, .3);
    border-radius: 8px;
    text-align: center;
}

/* Навигация по урокам */
.lesson-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 1rem;
}

.lesson-navigation span {
    flex: 1; /* для выравнивания, если нет предыдущего */
}

@media (max-width: 575.98px) {
    .lesson-navigation {
        flex-direction: column;
    }
    
    .lesson-navigation .btn-ghost {
        width: 100%;
        text-align: center;
    }
    
    .lesson-navigation span {
        display: none;
    }
}

/* Список курсов — 1 колонка на мобиле */
@media (max-width: 575.98px) {
    .course-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .course-card__content {
        padding: 1rem;
    }
    
    .course-card__content h3 {
        font-size: 1.1rem;
    }
}

/* Список уроков — компактнее на мобиле */
@media (max-width: 575.98px) {
    .lesson-item {
        padding: .875rem 1rem;
        gap: .75rem;
    }
    
    .lesson-item__status {
        width: 28px;
        height: 28px;
        font-size: .9rem;
    }
    
    .lesson-item__title {
        font-size: .95rem;
    }
}

/* Видео — адаптивное */
.video-container video {
    max-width: 100%;
    height: auto;
}

/* ============ Шапка страницы — адаптивная ============ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 575.98px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .page-header > div {
        text-align: center;
    }
}

/* Кнопка на всю ширину на мобиле */
.btn-gold--block-mobile,
.btn-ghost--block-mobile {
    width: auto;
}

@media (max-width: 575.98px) {
    .btn-gold--block-mobile,
    .btn-ghost--block-mobile {
        width: 100%;
    }
}

/* ============ Адаптивная таблица ============ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
    /* Превращаем таблицу в карточки на мобиле */
    .trainer-table {
        min-width: auto;
    }
    
    .trainer-table thead {
        display: none; /* Скрываем заголовки */
    }
    
    .trainer-table tbody,
    .trainer-table tr,
    .trainer-table td {
        display: block;
        width: 100%;
    }
    
    .trainer-table tr {
        margin-bottom: 1.5rem;
        padding: 1rem;
        background: rgba(255,255,255,.05);
        border-radius: 10px;
        border: 1px solid rgba(255,255,255,.1);
    }
    
    .trainer-table td {
        padding: .5rem 0;
        border: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .trainer-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--brand-gold);
        font-size: .8rem;
        text-transform: uppercase;
        letter-spacing: .5px;
        margin-right: 1rem;
    }
    
    .trainer-table td[data-label="Действия"] {
        flex-direction: column;
        align-items: stretch;
        gap: .5rem;
    }
    
    .trainer-table td[data-label="Действия"]::before {
        margin-bottom: .5rem;
    }
}

/* Действия в таблице */
.table-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

@media (max-width: 767.98px) {
    .table-actions {
        flex-direction: column;
    }
    
    .table-actions form {
        width: 100%;
    }
    
    .table-actions .action-btn {
        width: 100%;
        text-align: center;
    }
}

/* Статус-бейдж */
.status-badge {
    display: inline-block;
    padding: .35rem .75rem;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
}

.status-badge--done {
    background: rgba(76, 175, 80, .2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, .4);
}

.status-badge--pending {
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.6);
    border: 1px solid rgba(255,255,255,.2);
}

/* Кнопка на всю ширину — для обоих типов */
.btn-gold--block,
.btn-ghost--block {
    width: 100%;
    padding: .9rem;
    font-size: 1.05rem;
    text-align: center;
    display: block; /* ← для ссылки */
}

/* Мобильная версия */
@media (max-width: 575.98px) {
    .btn-gold--block-mobile,
    .btn-ghost--block-mobile {
        width: 100%;
        display: block;
        text-align: center;
    }
}

/* Нередактируемые поля профиля — как Email */
.profile-data-form input[readonly] {
    opacity: .5;
    cursor: not-allowed;
}

.profile-data-form select {
    width: 100%;
    box-sizing: border-box;
    padding: .75rem 1rem;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 6px;
    background-color: #252b35;
    color: #fff;
    font: inherit;
}

    /* Пункты раскрытого списка: тёмный текст на светлом фоне */
    .profile-data-form select option {
        background-color: #fff;
        color: #111;
    }

.form-field select.student-mode-select {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 6px;
    background-color: #202020;
    color: #f5f5f5;
    font: inherit;
    color-scheme: dark;
}

    .form-field select.student-mode-select:focus {
        outline: none;
        border-color: #d4af37;
    }

    .form-field select.student-mode-select option {
        background-color: #202020;
        color: #f5f5f5;
    }




