/* ===== Межрегиональная методическая школа =====
 * ЛК: статус-карточка + модалка документов.
 * Админка: страница с табами + таблица модерации + модалка.
 */

/* === Status card (cabinet) === */

.ms-status {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--darkBlue);
}

.ms-status__card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-content: space-between;
    gap: clamp(150px, 17vw, 240px);
    padding: clamp(16px, 2vw, 24px);
    border-radius: 24px;
    border: 1px solid #21212D1A;

    @media (width < 1024px) {
        gap: 24px;
    }

    @media (width < 780px) {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
}

/* .ms-status__text {
    flex: 1 1 320px;
    min-width: 0;
} */

.ms-status__title {
    margin-bottom: 8px;
    font-size: clamp(20px, 2vw, 24px);
    letter-spacing: 2.3%;
    line-height: 130%;
    font-weight: 500;
}

.ms-status__lead {
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 130%;
}

.ms-status__btn {
    padding: 10px 22px;
    color: var(--darkBlue);
    border: 1px solid var(--darkBlue);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.12s ease;
}

.ms-status__btn:hover {
    background: #f7f6f1;
}

.ms-status__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #769AC91A;
    color: var(--darkBlue);
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

.ms-status__badge--approved {
    background: #dfe7d8;
    color: #4d6a3b;
}

.ms-status__action {
    @media (width < 576px) {
        width: 100%;

        button {
            width: 100%;
        }
    }

}

.ms-status__hint {
    margin: 0;
    padding: 0 4px;
    color: #6b6b6b;
    font-size: 13px;
    line-height: 1.55;
}

.ms-status__hint--warn {
    color: #b07a3d;
}

/* === MS modal (cabinet & admin) === */

.ms-modal {
    width: min(100%, 880px) !important;
    max-height: calc(100vh - 32px);
    padding: 28px 28px 0 !important;
    display: flex;
    flex-direction: column;
}

.ms-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #ece9e3;
}

.ms-modal__title {
    text-align: left !important;
    margin: 0 0 6px !important;
}

.ms-modal__nav {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b6b6b;
    font-size: 13px;
}

.ms-modal__nav-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #dcdad6;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4a4742;
}

.ms-modal__nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ms-modal__nav-label {
    white-space: nowrap;
}

.ms-modal__comment {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 0;
    padding: 12px 14px;
    background: #fff5e3;
    border-radius: 10px;
    color: #6b4a17;
    font-size: 13px;
    line-height: 1.55;
}

.ms-modal__comment strong { display: block; margin-bottom: 4px; }
.ms-modal__comment p { margin: 0; }

.ms-modal__comment-close {
    border: 0;
    background: transparent;
    color: #b07a3d;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.ms-modal__comment-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.ms-modal__comment-file {
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.12s ease;
}

.ms-modal__comment-file:hover {
    transform: translateY(-1px);
}

.ms-modal__comment-file-img {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(176, 122, 61, 0.3);
    background: #fff;
}

.ms-modal__comment-file-doc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid rgba(176, 122, 61, 0.3);
    border-radius: 8px;
    color: #6b4a17;
    font-size: 12px;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
 * Admin: вкладка «Управление обучением» (модули + drag&drop).
 * ============================================================ */

.admin-ms-training {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0 24px;
}

.admin-ms-training__top {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-ms-training__toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.admin-ms-training__toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.admin-ms-training__toggle-track {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #99c0a0;
    transition: background 0.15s ease;
}

.admin-ms-training__toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.admin-ms-training__toggle input:checked + .admin-ms-training__toggle-track {
    background: #c75454;
}

.admin-ms-training__toggle input:checked + .admin-ms-training__toggle-track::after {
    transform: translateX(20px);
}

.admin-ms-training__toggle-label {
    font-size: 14px;
    font-weight: 600;
    color: #2b2925;
}

.admin-ms-training__hint {
    margin: 0;
    color: #6b6b6b;
    font-size: 12px;
}

.admin-ms-training__loading {
    padding: 32px;
    text-align: center;
    color: #6b6b6b;
}

.admin-ms-training__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 1100px) {
    .admin-ms-training__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .admin-ms-training__grid { grid-template-columns: 1fr; }
}

/* Плитка-плюсик создания. */
.admin-ms-training__add {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px;
    background: #fafaf8;
    border: 1.5px dashed #c4c1bb;
    border-radius: 14px;
    color: #6b6b6b;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
    /* По дефолту в конце сетки. Когда модулей нет — становится "первой" (визуально). */
    order: 1;
}

.admin-ms-training__add.is-first {
    order: -1;
}

.admin-ms-training__add:hover {
    border-color: #869ec0;
    color: #2b2925;
    background: #fff;
}

.admin-ms-training__add-plus {
    font-size: 36px;
    line-height: 1;
    font-weight: 300;
}

.admin-ms-training__add-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* === Module card === */

.admin-ms-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ece9e3;
    border-radius: 14px;
    overflow: hidden;
    cursor: grab;
    transition: box-shadow 0.12s ease, border-color 0.12s ease;
}

.admin-ms-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    border-color: #dcdad6;
}

.admin-ms-card--ghost {
    opacity: 0.4;
    background: #f0eee9;
}

.admin-ms-card--chosen {
    cursor: grabbing;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.admin-ms-card__cover {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: #e7e4dd;
    position: relative;
}

.admin-ms-card__cover.is-empty {
    background:
        repeating-linear-gradient(45deg, #ece9e3 0 10px, #e3e0d8 10px 20px);
}

.admin-ms-card__cover-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #8a8782;
    pointer-events: none;
}

.admin-ms-card__cover-placeholder span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.admin-ms-card__body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
}

.admin-ms-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #2b2925;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.admin-ms-card__lead {
    margin: 0;
    color: #6b6b6b;
    font-size: 12px;
    line-height: 1.45;
    flex: 1 1 auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.admin-ms-card__check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4a4742;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}

.admin-ms-card__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px solid #f0eee9;
}

.admin-ms-card__edit {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: 1px solid #dcdad6;
    border-radius: 8px;
    color: #4a4742;
    cursor: pointer;
}

.admin-ms-card__edit:hover {
    background: #f7f6f1;
    color: #2b2925;
}

.admin-ms-card__editor {
    flex: 0 0 auto;
    padding: 8px 14px;
    background: #fff;
    color: #2b2925;
    border: 1px solid #2b2925;
    border-radius: 8px;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.admin-ms-card__editor:hover {
    background: #2b2925;
    color: #fff;
}

/* === Module modal extras (счётчик, превью). === */

.ms-mod-mod__counter {
    margin-top: 4px;
    color: #8a8782;
    font-size: 11px;
    text-align: right;
}

.ms-mod-mod__preview-label {
    font-size: 12px;
    font-weight: 600;
    color: #4a4742;
    margin-bottom: 6px;
}

.ms-mod-mod__preview {
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    background: #f0eee9;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #dcdad6;
}

.ms-mod-mod__preview.has-image {
    border-style: solid;
    border-color: transparent;
}

.ms-mod-mod__preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ms-mod-mod__preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #8a8782;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ms-mod-mod__preview-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.ms-mod-mod__preview-btn {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #2b2925;
    color: #2b2925;
    border-radius: 8px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.ms-mod-mod__preview-btn:hover { background: #f7f6f1; }

.ms-mod-mod__preview-btn--ghost {
    border-color: #c75454;
    color: #c75454;
}

.ms-mod-mod__preview-btn--ghost:hover {
    background: rgba(199, 84, 84, 0.08);
}

.ms-mod-mod__check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    cursor: pointer;
    user-select: none;
    color: #4a4742;
    font-size: 13px;
}

.ms-mod-mod__delete {
    color: #c75454 !important;
    border-color: #c75454 !important;
}

.ms-mod-mod__delete:hover {
    background: rgba(199, 84, 84, 0.08) !important;
}

/* === Module editor (страница «Наполнение модуля» — фаза Б, заглушка) === */

.admin-ms-editor {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 4px 0 24px;
}

.admin-ms-editor__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b6b6b;
    font-size: 13px;
    text-decoration: none;
    align-self: flex-start;
}

.admin-ms-editor__back:hover { color: #2b2925; }

.admin-ms-editor__header {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
    align-items: stretch;
    background: #fff;
    border: 1px solid #ece9e3;
    border-radius: 14px;
    overflow: hidden;
}

@media (max-width: 720px) {
    .admin-ms-editor__header { grid-template-columns: 1fr; }
}

.admin-ms-editor__cover {
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: #e7e4dd;
    min-height: 160px;
}

.admin-ms-editor__cover.is-empty {
    background:
        repeating-linear-gradient(45deg, #ece9e3 0 10px, #e3e0d8 10px 20px);
}

.admin-ms-editor__meta {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
}

.admin-ms-editor__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #2b2925;
}

.admin-ms-editor__lead {
    margin: 0;
    color: #6b6b6b;
    font-size: 14px;
    line-height: 1.5;
}

/* Inline-edit заголовка/описания модуля. */
.admin-ms-editor__row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-ms-editor__title-input,
.admin-ms-editor__lead-input {
    flex: 1 1 auto;
}

.admin-ms-editor__pencil {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border: 1px solid #dcdad6;
    border-radius: 6px;
    background: #fff;
    color: #6b6b6b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-ms-editor__pencil:hover { background: #f7f6f1; color: #2b2925; }

.admin-ms-editor__inline-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.admin-ms-editor__save,
.admin-ms-editor__cancel {
    padding: 6px 12px;
    border-radius: 6px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.admin-ms-editor__save {
    background: #869ec0;
    color: #fff;
    border: 1px solid #869ec0;
}
.admin-ms-editor__save:hover:not(:disabled) { background: #6f8db8; }

.admin-ms-editor__cancel {
    background: #fff;
    color: #4a4742;
    border: 1px solid #dcdad6;
}
.admin-ms-editor__cancel:hover:not(:disabled) { background: #f7f6f1; }

/* === Body: lessons + add row === */

.admin-ms-editor__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-ms-lessons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-ms-editor__add-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-ms-editor__add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #fff;
    color: #2b2925;
    border: 1.5px dashed #c4c1bb;
    border-radius: 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.admin-ms-editor__add:hover:not(:disabled) {
    border-color: #869ec0;
    color: #2b2925;
    background: #fafaf8;
}

.admin-ms-editor__add:disabled { opacity: 0.5; cursor: not-allowed; }

.admin-ms-editor__add--alt {
    border-color: #b1aed5;
}

.admin-ms-editor__add-plus {
    font-size: 18px;
    line-height: 1;
}

/* === Lesson === */

.admin-ms-lesson {
    background: #fff;
    border: 1px solid #ece9e3;
    border-radius: 12px;
    overflow: hidden;
}

.admin-ms-lesson--ghost { opacity: 0.4; }
.admin-ms-lesson--chosen { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15); }

.admin-ms-lesson--test {
    border-color: #b1aed5;
    background: #f7f6fa;
}

.admin-ms-lesson__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid #ece9e3;
}

.admin-ms-lesson__header.is-collapsed {
    border-bottom: 0;
}

.admin-ms-lesson__toggle,
.admin-ms-section__toggle {
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent;
    color: #6b6b6b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-ms-lesson__drag,
.admin-ms-section__drag {
    color: #b1aea7;
    cursor: grab;
    display: inline-flex;
    flex-shrink: 0;
}

.admin-ms-lesson__title {
    flex: 1 1 auto;
    font-size: 15px;
    font-weight: 600;
    color: #2b2925;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-ms-lesson__title-input {
    flex: 1 1 auto;
    margin: 0;
}

.admin-ms-lesson__edit-form {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-ms-lesson__short-input {
    font-size: 13px;
    background: #fafaf8;
}

.admin-ms-lesson__short-badge {
    flex: 0 0 auto;
    padding: 2px 8px;
    background: #eef3fa;
    color: #5878a6;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-ms-lesson__icon-btn {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border: 1px solid #dcdad6;
    border-radius: 6px;
    background: #fff;
    color: #6b6b6b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-ms-lesson__icon-btn:hover { background: #f7f6f1; color: #2b2925; }

.admin-ms-lesson__icon-btn--danger:hover {
    color: #c75454;
    border-color: #c75454;
    background: rgba(199, 84, 84, 0.06);
}

.admin-ms-lesson__body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-ms-lesson__sections {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 12px;
}

.admin-ms-lesson__add-section {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    color: #2b2925;
    border: 1px dashed #c4c1bb;
    border-radius: 8px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.admin-ms-lesson__add-section:hover:not(:disabled) {
    border-color: #869ec0;
    background: #fafaf8;
}

/* === Section === */

.admin-ms-section {
    background: #fafaf8;
    border: 1px solid #ece9e3;
    border-radius: 10px;
    overflow: hidden;
}

.admin-ms-section--ghost { opacity: 0.4; }
.admin-ms-section--chosen { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); }

.admin-ms-section__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
}

.admin-ms-section__type-icon {
    color: #6b6b6b;
    flex-shrink: 0;
    display: inline-flex;
}

.admin-ms-section__type-label {
    font-size: 12px;
    color: #6b6b6b;
    font-weight: 600;
    flex-shrink: 0;
}

.admin-ms-section__title-preview {
    flex: 1 1 auto;
    color: #2b2925;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-ms-section__body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid #ece9e3;
}

.admin-ms-section__label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b6b6b;
    font-weight: 600;
    margin-bottom: 4px;
}

.admin-ms-section__type-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-ms-section__type-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-ms-section__type-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #dcdad6;
    border-radius: 8px;
    color: #4a4742;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.admin-ms-section__type-btn.is-active {
    background: #2b2925;
    color: #fff;
    border-color: #2b2925;
}

.admin-ms-section__type-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.admin-ms-section__field { display: flex; flex-direction: column; gap: 4px; }

.admin-ms-section__textarea {
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    resize: vertical;
}

.admin-ms-section__video-preview {
    margin-top: 8px;
    padding: 8px;
    background: #f0eee9;
    border-radius: 8px;
    overflow: hidden;
}

.admin-ms-section__video-preview iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 6px;
}

.admin-ms-section__file-existing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #dcdad6;
    border-radius: 8px;
}

.admin-ms-section__file-link {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: transparent;
    border: 0;
    color: #2b2925;
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.admin-ms-section__file-remove {
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent;
    color: #b1aea7;
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
}

.admin-ms-section__file-remove:hover { color: #c75454; background: rgba(199, 84, 84, 0.08); }

.admin-ms-section__file-pick {
    align-self: flex-start;
    padding: 8px 14px;
    background: #fff;
    border: 1px dashed #c4c1bb;
    border-radius: 8px;
    color: #2b2925;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* === Test (questions/answers) === */

.admin-ms-test {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-ms-test__questions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-ms-test__question {
    padding: 12px;
    background: #fff;
    border: 1px solid #ece9e3;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-ms-test__question--ghost { opacity: 0.4; }

.admin-ms-test__question-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-ms-test__question-num {
    flex: 1 1 auto;
    font-size: 13px;
    font-weight: 700;
    color: #4a4742;
}

.admin-ms-test__question-text {
    width: 100%;
    resize: vertical;
}

.admin-ms-test__answers {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-ms-test__answer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #fafaf8;
    border-radius: 6px;
}

.admin-ms-test__answer--ghost { opacity: 0.4; }

.admin-ms-test__correct {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #4d6a3b;
}

.admin-ms-test__answer-text { flex: 1 1 auto; }

.admin-ms-test__add-answer,
.admin-ms-test__add-question {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff;
    border: 1px dashed #c4c1bb;
    border-radius: 8px;
    color: #2b2925;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.admin-ms-test__add-answer:hover,
.admin-ms-test__add-question:hover { border-color: #869ec0; background: #fafaf8; }

.ms-modal__scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 4px;
    margin: 0 -4px;
}

.ms-modal__section {
    padding: 18px 0;
    border-top: 1px solid #ece9e3;
}

.ms-modal__section:first-of-type {
    border-top: 0;
}

.ms-modal__section-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: #2b2925;
}

.ms-modal__section-lead {
    margin: 0 0 14px;
    color: #6b6b6b;
    font-size: 13px;
    line-height: 1.5;
}

.ms-modal__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

@media (max-width: 640px) {
    .ms-modal__grid {
        grid-template-columns: 1fr;
    }
}

.ms-modal__field {
    margin-bottom: 12px;
}

.ms-modal__notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 12px 0 0;
    padding: 12px 14px;
    background: #eef3fa;
    border-radius: 10px;
    color: #4a5e84;
    font-size: 13px;
    line-height: 1.55;
}

.ms-modal__notice svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.ms-modal__sample-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 18px;
    background: #fff;
    color: #2b2925;
    border: 1px solid #2b2925;
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.ms-modal__sample-btn:hover {
    background: #f7f6f1;
}

.ms-modal__footer {
    padding: 16px 0 24px;
    margin: 0 -28px;
    padding-left: 28px;
    padding-right: 28px;
    border-top: 1px solid #ece9e3;
    background: #fff;
    position: sticky;
    bottom: 0;
}

.ms-modal__loading {
    padding: 40px;
    text-align: center;
    color: #6b6b6b;
}

.ms-modal__user {
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid #ece9e3;
    border-radius: 10px;
    background: #fafaf8;
}

.ms-modal__user-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.ms-modal__user-summary::-webkit-details-marker { display: none; }

.ms-modal__user-name {
    font-size: 15px;
    font-weight: 600;
    color: #2b2925;
}

.ms-modal__user-toggle {
    color: #6b6b6b;
    font-size: 12px;
}

.ms-modal__user-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin: 12px 0 0;
}

.ms-modal__user-grid div { display: flex; flex-direction: column; gap: 2px; }
.ms-modal__user-grid dt { color: #6b6b6b; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.ms-modal__user-grid dd { margin: 0; color: #2b2925; font-size: 14px; }

@media (max-width: 640px) {
    .ms-modal__user-grid { grid-template-columns: 1fr; }
}

/* === File field (dropzone + list) === */

.ms-file {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ms-file__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ms-file__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #dcdad6;
    border-radius: 8px;
}

.ms-file__open {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #2b2925;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
}

.ms-file__open svg {
    flex-shrink: 0;
    color: #6b6b6b;
}

.ms-file__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-file__remove {
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent;
    color: #b1aea7;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
}

.ms-file__remove:hover {
    color: #c75454;
    background: rgba(199, 84, 84, 0.08);
}

.ms-file__dropzone {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: #f0eee9;
    border: 1px dashed #c4c1bb;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.ms-file__dropzone.is-dragover {
    border-color: #869ec0;
    background: #eef3fa;
}

.ms-file__dropzone.is-uploading {
    pointer-events: none;
    opacity: 0.7;
}

.ms-file__native {
    position: absolute;
    left: -10000px;
    top: -10000px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.ms-file__icon {
    color: #7a7873;
    flex-shrink: 0;
}

.ms-file__caption {
    flex: 1 1 auto;
    min-width: 0;
}

.ms-file__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4a4742;
}

.ms-file__hint {
    color: #6b6b6b;
    font-size: 13px;
    margin-top: 2px;
}

.ms-file.has-error .ms-file__dropzone {
    border-color: #c75454;
}

.ms-file__error {
    margin: 0;
    padding: 0 4px;
    color: #c75454;
    font-size: 12px;
}

.ms-file.is-disabled {
    opacity: 0.7;
}

/* === Admin: page tabs === */

.admin-ms__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 18px;
    border-bottom: 1px solid #ece9e3;
}

.admin-ms__tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: transparent;
    border: 0;
    color: #6b6b6b;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.admin-ms__tab.is-active {
    color: #2b2925;
    border-bottom-color: #869ec0;
}

.admin-ms__tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #c75454;
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.admin-ms__panel {
    padding: 4px 0 24px;
}

.admin-stub-card {
    padding: 32px;
    text-align: center;
    background: #fafaf8;
    border-radius: 12px;
    border: 1px solid #ece9e3;
}

.admin-stub-card__title {
    font-size: 15px;
    font-weight: 600;
    color: #2b2925;
}

.admin-stub-card__hint {
    margin-top: 4px;
    color: #6b6b6b;
    font-size: 13px;
}

/* === Admin: moderation table === */

.admin-ms-mod__filters {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.admin-ms-mod__search { flex: 1 1 280px; }
.admin-ms-mod__select { flex: 1 1 220px; min-width: 200px; }

.admin-ms-mod__loading,
.admin-ms-mod__empty {
    padding: 32px;
    text-align: center;
    color: #6b6b6b;
}

.admin-ms-mod__table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #ece9e3;
}

.admin-ms-mod__table th {
    text-align: left;
    padding: 12px 14px;
    background: #fafaf8;
    font-size: 12px;
    font-weight: 600;
    color: #6b6b6b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    border-bottom: 1px solid #ece9e3;
}

.admin-ms-mod__table td {
    padding: 14px;
    font-size: 14px;
    color: #2b2925;
    border-bottom: 1px solid #ece9e3;
}

.admin-ms-mod__row {
    cursor: pointer;
    transition: background 0.12s ease;
}

.admin-ms-mod__row:hover {
    background: #fafaf8;
}

.admin-ms-mod__status {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #ece9e3;
    color: #4a4742;
}

.admin-ms-mod__status--pending { background: #fff5e3; color: #b07a3d; }
.admin-ms-mod__status--approved { background: #dfe7d8; color: #4d6a3b; }
.admin-ms-mod__status--rejected { background: #fbe2e2; color: #a13a3a; }

.admin-ms-mod__files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.admin-ms-mod__file {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #dcdad6;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    color: #2b2925;
    cursor: pointer;
}

.admin-ms-mod__file:hover { background: #f7f6f1; }

.admin-ms-mod__empty-files {
    color: #b1aea7;
    font-size: 13px;
}

.admin-ms-mod__decision {
    background: #fafaf8;
    border-radius: 12px;
    padding: 16px !important;
    border: 1px solid #ece9e3;
    margin-top: 12px;
}

/* Сверху скролла модалки модерации — баннер с подтверждением свежего действия
   (одобрено/отклонено/ответ отправлен). Полная ширина, иконка-чекмарк слева. */
.admin-ms-mod__success {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.4;
    text-align: left;
    background: rgba(72, 158, 96, 0.14);
    color: #2f7d49;
    border: 1px solid rgba(72, 158, 96, 0.28);
}

.admin-ms-mod__success svg {
    flex: 0 0 auto;
}

.admin-ms-mod__radio-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.admin-ms-mod__radio-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.admin-ms-mod__comment {
    width: 100%;
    margin-bottom: 8px;
    resize: vertical;
}

/* Attempts admin */

.admin-ms-attempts__meta {
    margin-top: 4px;
    color: #8a8782;
    font-size: 12px;
}

.admin-ms-attempts__history {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fafaf8;
    border-radius: 8px;
}

.admin-ms-attempts__history h4 {
    margin: 0 0 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b6b6b;
}

.admin-ms-attempts__history ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.55;
    color: #4a4742;
}

.admin-ms-attempts__req-history {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-ms-attempts__req-history li {
    padding: 8px 12px;
    background: #fafaf8;
    border-radius: 8px;
    font-size: 13px;
}

.admin-ms-attempts__req-history li.is-current {
    background: #fff5e3;
    border: 1px solid #b07a3d;
}

.admin-ms-attempts__req-comment {
    margin-top: 4px;
    color: #4a4742;
    font-style: italic;
}

.admin-ms-attempts__count { margin: 12px 0; }

.admin-ms-attempts__count-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-ms-attempts__count-row button {
    width: 36px;
    height: 36px;
    border: 1px solid #2b2925;
    background: #fff;
    color: #2b2925;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
}

.admin-ms-attempts__count-row button:hover { background: #f7f6f1; }

.admin-ms-attempts__count-row input {
    width: 80px;
    text-align: center;
}

.ms-modal__user-message {
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #ece9e3;
    border-radius: 8px;
    color: #2b2925;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-line;
}

/* Admin diploma block */

.admin-ms-mod__diploma { background: #fafaf8; border-radius: 12px; padding: 14px !important; }

.admin-ms-mod__diploma-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-ms-mod__diploma-meta {
    color: #8a8782;
    font-size: 12px;
}

.admin-ms-mod__diploma-btn {
    padding: 8px 14px !important;
    font-size: 12px !important;
    flex: 0 0 auto !important;
}

.admin-ms-mod__diploma-btn--danger {
    color: #c75454 !important;
    border-color: #c75454 !important;
}

/* User diploma block */

.ms-diploma__file-meta {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

/* Print request block (фаза VIII) */

/* .ms-print-request { margin-top: 12px; } */

.ms-print-request__btn {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.ms-print-request__btn:hover { background: rgba(255, 255, 255, 0.28); }

.ms-print-request__msg {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.ms-print-request__msg--approved { color: #cfe0c1; }
.ms-print-request__msg--revision { color: #ffd6a8; }

.ms-print-request__link {
    background: transparent;
    border: 0;
    color: var(--lightBlue);
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 130%;
    cursor: pointer;
    text-decoration: underline;
    text-align: start;
    width: fit-content;
}

.ms-print-request__link:hover { opacity: 0.85; }

/* Admin print decision */
.admin-ms-mod__print-decision {
    margin-top: 12px;
    padding: 12px;
    background: #fafaf8;
    border-radius: 10px;
}

/* Бейдж «Запрос на печать» в строке таблицы модерации. */
.admin-ms-mod__print-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    padding: 2px 8px;
    background: #fff5e3;
    color: #b07a3d;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}

/* ============================================================
 * Полная страница «Межрегиональная методическая школа» в ЛК.
 * Каркас по макету local-situational-files/Методическая школа.png.
 * Реальный функционал на этой фазе только у статус-карточки;
 * модули, сертификаты и очное участие — визуальная заглушка.
 * ============================================================ */

.ms-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* === Modules block === */

.ms-modules-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ms-empty-modules {
    padding: 32px;
    text-align: center;
    color: #6b6b6b;
    background: #f0eee9;
    border-radius: 14px;
    font-size: 16px;
}

.ms-module__link {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.ms-module--locked .ms-module__link {
    pointer-events: none;
    cursor: not-allowed;
}

.ms-module--locked {
    filter: grayscale(0.7);
    opacity: 0.65;
}

.ms-module--completed .ms-module__cover {
    border-bottom: 3px solid #4d6a3b;
}

.ms-module__cover {
    position: relative;
}

.ms-module__cover.is-empty {
    background: repeating-linear-gradient(45deg, #ece9e3 0 10px, #e3e0d8 10px 20px) !important;
}

.ms-module__lock,
.ms-module__check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ms-module__lock {
    background: rgba(255, 255, 255, 0.85);
    color: #6b6b6b;
}

.ms-module__check {
    background: #4d6a3b;
    color: #fff;
}

/* Закрыт админом — оверлей «Скоро откроется» вместо обычного lock'а. */
.ms-module--coming-soon {
    filter: none;
    opacity: 1;
}

.ms-module--coming-soon .ms-module__cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(43, 41, 37, 0.55);
}

.ms-module__coming-soon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    padding: 0 16px;
}

.ms-module__stats {
    margin-top: 8px;
    font-size: 12px;
    color: #5878a6;
}

/* === Modules row === */

.ms-modules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;

    @media (width < 901px) {
        grid-template-columns: 1fr 1fr;
    }

    @media (width < 601px) {
        grid-template-columns: 1fr;
    }
}

.ms-module {
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #21212D1A;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.ms-module__cover {
    height: 280px;
    background-color: #c4c1bb;
    background-size: cover;
    background-position: center;
}

.ms-module__body {
    /* padding: 16px 18px 18px; */
    padding: clamp(16px, 2vw, 24px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    color: var(--darkBlue);
}

.ms-module__title {
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 600;
    line-height: 130%;
}

.ms-module__lead {
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 130%;
}

.ms-module__btn {
    margin-top: 6px;
    align-self: flex-start;
    padding: 9px 16px;
    background: #fff;
    color: #2b2925;
    border: 1px solid #2b2925;
    border-radius: 8px;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.12s ease;
}

.ms-module__btn:hover:not(:disabled) {
    background: #f7f6f1;
}

.ms-module__btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* === Certificates strip === */

.ms-certificates {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: clamp(16px, 2vw, 24px);
    background: var(--darkBlue);
    color: var(--white);
    border-radius: 24px;
    flex-wrap: nowrap;

    @media(width <= 600px) {
        flex-direction: column;
        align-items: flex-start;
    }
}

.ms-certificates_white {
    background: transparent;
    border: 1px solid #21212D1A;
    color: var(--darkBlue);
}

/* .ms-certificates__text { flex: 1 1 320px; min-width: 0; } */

.ms-certificates__title {
    margin-bottom: 8px;
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 600;
    letter-spacing: 2%;
    line-height: 130%;
}

.ms-certificates__lead {
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 130%;
}

.ms-certificates__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 8px 24px;
    background: var(--lightBlue);
    color: var(--white);
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    letter-spacing: 5%;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.12s ease;
    width: fit-content;


    @media(width <= 600px) {
        width: 100%;
    }
}

.ms-certificates__btn:hover:not(:disabled) {
    background: #597DAC;
}

.ms-certificates__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ms-certificates.is-disabled {
    opacity: 0.7;
}

.ms-certificates.is-disabled .ms-certificates__btn {
    opacity: 0.5;
    cursor: not-allowed;
}

.ms-certificates_white .ms-certificates__btn {
    background: transparent;
    border: 1px solid var(--darkBlue);
    color: var(--darkBlue);

    &:hover:not(:disabled) {
        background: transparent;
        color: var(--lightBlue);
        border-color: var(--lightBlue)
    }
}

/* ============================================================
 * Страница прохождения модуля + страница раздела (фаза II/III).
 * ============================================================ */

.ms-mod-page,
.ms-sec-page {
    /* max-width: 960px;
    margin: 0 auto;
    padding: 24px 0; */
    color: var(--darkBlue)
}

.ms-mod-page__title,
.ms-sec-page__title {
    margin: 12px 0 8px;
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 600
}

.ms-mod-page__lead {
    font-family: 'Monomakh-Regular', sans-serif;
    margin: 20px 0;
    color: var(--darkBlue);
    font-size: clamp(24px, 2vw, 30px);
    line-height: 130%;
}

.ms-mod-page__lessons {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.ms-mod-page__lesson {
    border-bottom: 1px solid #21212D1A;
    overflow: hidden;
    transition: border-color 0.12s ease, opacity 0.12s ease;
    color: var(--darkBlue);

    &:last-child {
        border-bottom-color: transparent;
    }
}

.ms-mod-page__lesson.is-locked {
    opacity: 0.55;
    filter: grayscale(0.5);
}

.ms-mod-page__lesson.is-completed {
    border-color: #cfe0c1;
}

.ms-mod-page__lesson.is-test {}

.ms-mod-page__lesson-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f0eee9;
    cursor: pointer;
}

.ms-mod-page__lesson-title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 600;
    line-height: 130%;
    letter-spacing: 2%;
}

.ms-mod-page__lesson-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #5D9B2A;
    color: var(--white);
}

.ms-mod-page__lesson-lock {
    color: #b1aea7;
}

.ms-mod-page__sections {
    list-style: none;
    margin: 0;
    padding: 4px 0 16px;
}

.ms-mod-page__section {
    border-top: 1px solid #f0eee9;
}

.ms-mod-page__section:first-child {
    border-top: 0;
}

.ms-mod-page__section-link {
    display: grid;
    grid-template-columns: 24px 1fr 24px;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 8px;
    text-decoration: none;
    transition: background 0.12s ease;
    font-size: clamp(16px, 1.5vw, 18px);
    color: var(--darkBlue);
}

.ms-mod-page__section-link:hover {
    background: #fafaf8;
}

.ms-mod-page__section.is-locked .ms-mod-page__section-link {
    pointer-events: none;
    color: #21212D80;
}

.ms-mod-page__section.is-completed .ms-mod-page__section-link {}

.ms-mod-page__section-icon {
    flex-shrink: 0;
    display: inline-flex;
}

.ms-mod-page__section.is-completed .ms-mod-page__section-icon {}

.ms-mod-page__section-type {
    flex-shrink: 0;
}

.ms-mod-page__section-title {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-mod-page__section-status {
    color: #21212D80;
    flex-shrink: 0;
}

.ms-mod-page__section.is-completed .ms-mod-page__section-status {
    color: #4d6a3b;
}

/* === Section page === */

.ms-sec-page__type-pill {
    display: inline-block;
    padding: 4px 10px;
    margin-right: 10px;
    background: #ece9e3;
    color: #6b6b6b;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}

.ms-sec-page__lead {
    margin: 16px 0 0;
    font-size: clamp(16px, 1.5vw, 18px);
}

.ms-sec-page__hint {
    margin: 8px 0 24px;
    font-size: clamp(16px, 1.5vw, 18px);
}

/* .ms-sec-page__empty {
    margin: 12px 0;
    padding: 14px 18px;
    background: #f0eee9;
    border-radius: 10px;
    color: #6b6b6b;
    font-size: 14px;
} */


.ms-sec-page__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;

    @media(width <= 500px) {
        flex-direction: column;

        button,
        a {
            width: 100%;
        }
    }
}

.ms-sec-page__next,
.ms-sec-page__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    background: var(--lightBlue);
    color: var(--white);
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    letter-spacing: 5%;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: 0.3s;
    @media(width <= 500px) {
        width: 100%;
    }
}

.ms-sec-page__next:hover:not(:disabled),
.ms-sec-page__btn:hover:not(:disabled) {
    background: #597DAC;
}

.ms-sec-page__next:disabled,
.ms-sec-page__btn:disabled {
    background: #c4c1bb;
    cursor: not-allowed;
}

.ms-sec-page__btn--ghost {
    background: #fff;
    color: #2b2925;
    border: 1px solid #2b2925;
}

.ms-sec-page__btn--ghost:hover:not(:disabled) {
    background: #f7f6f1;
}

/* Sub-types */

.ms-sec-practice,
.ms-sec-presentation,
.ms-sec-lecture,
.ms-sec-video {
    margin-bottom: 24px;
    border-bottom: 1px solid #21212D1A;
    padding-bottom: 24px;
}

.ms-sec-presentation__card,
.ms-sec-lecture__viewer_empty,
.ms-sec-page__empty {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: clamp(16px, 2vw, 24px);
    background: #fff;
    border: 1px solid #21212D1A;
    border-radius: 24px;
}

.ms-sec-presentation__icon { color: #6b6b6b; flex-shrink: 0; }

.ms-sec-presentation__meta { flex: 1 1 auto; min-width: 0; }

.ms-sec-presentation__name {
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ms-sec-presentation__size {
    font-size: clamp(16px, 1.5vw, 18px);
    margin-top: 2px;
}

.ms-sec-lecture__viewer,
.ms-sec-video__embed {
    display: flex;
    align-items: center;
    gap: 14px;
    border-radius: 24px;
    overflow: hidden;
}
.ms-sec-lecture__frame { width: 100%; height: 70vh; border: 0; display: block; }

.ms-sec-video__embed iframe { width: 100%; height: auto; aspect-ratio: 16/9; border: 0; border-radius: 12px; }

.ms-sec-practice__task {
    margin-bottom: 20px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #ece9e3;
    border-radius: 12px;
    line-height: 1.55;
}

.ms-sec-practice__upload {
    padding: 16px 20px;
    background: #fafaf8;
    border: 1px dashed #c4c1bb;
    border-radius: 12px;
}

.ms-sec-practice__upload-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: #2b2925;
}

.ms-sec-practice__submission {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.ms-sec-practice__submission-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2b2925;
    text-decoration: none;
    font-size: 13px;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-sec-practice__submission-size { color: #8a8782; font-size: 12px; }

.ms-sec-practice__submission {
    flex-wrap: wrap;
}

.ms-sec-practice__submission-text {
    flex-basis: 100%;
    margin: 8px 0 0;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #ece9e3;
    border-radius: 8px;
    color: #2b2925;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.ms-sec-practice__form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #ece9e3;
}

.ms-sec-practice__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ms-sec-practice__label {
    font-size: 13px;
    font-weight: 600;
    color: #4a4742;
}

.ms-sec-practice__file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ms-sec-practice__file-name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #ece9e3;
    border-radius: 8px;
    font-size: 13px;
    color: #2b2925;
}

.ms-sec-practice__file-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 0;
    background: transparent;
    color: #8a8782;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.ms-sec-practice__file-clear:hover {
    color: #2b2925;
}

.ms-sec-practice__textarea {
    resize: vertical;
    min-height: 80px;
}

.ms-sec-practice__counter {
    align-self: flex-end;
    font-size: 11px;
    color: #8a8782;
}

.ms-sec-test__retake {
    margin-top: 14px;
    display: inline-flex;
}

.ms-sec-test__retake-hint {
    margin: 8px 0 0;
    color: #8a8782;
    font-size: 12px;
}

.ms-sec-test__retry {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* === Preview-экран теста (до старта). === */

.ms-sec-test__preview {
    /* padding: 24px 28px; */
    /* background: #fff; */
    /* border: 1px solid #ece9e3; */
    /* border-radius: 14px; */
}

.ms-sec-test__preview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ms-sec-test__preview-card {
    padding: clamp(16px, 2vw, 24px);
    background-color: #769AC91A;
    border-radius: 24px;
    color: var(--darkBlue);
}

.ms-sec-test__preview-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--lightBlue);
    border-radius: 8px;
    color: var(--white);
    margin-bottom: clamp(24px, 4vw, 40px);
}

.ms-sec-test__preview-value {
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 600;
    line-height: 130%;
    letter-spacing: 2%;
    margin-bottom: 9px;
}

.ms-sec-test__preview-hint {
    font-size: clamp(14px, 1.5vw, 16px);
    line-height: 130%;
}

.ms-sec-test__preview-actions {
    display: flex;
    justify-content: flex-end;

    @media (width <= 400px) {
        width: 100%;
    }
}



.ms-sec-test {
    padding: clamp(16px, 2vw, 24px);
    background-color: var(--white);
    border-radius: 24px;
    margin-bottom: 24px;

    @media (width < 576px) {
        background-color: transparent;
        padding: 0;
        border-radius: 0;
    }
}
/* === Live-таймер во время прохождения. === */



.ms-sec-test__timer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    margin-left: auto;
    padding: 8px 14px;
    background: #f3f6fb;
    border-radius: 999px;
    color: #4a6a93;
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ms-sec-test__timer-icon {
    display: inline-flex;
}

/* === Блок результата (после клика «Завершить тестирование» или passed). === */

.ms-sec-test__result-block {

}

.ms-sec-test__result-heading-wrap {
    padding: clamp(16px, 2vw, 24px);
    border-radius: 24px;
    border: 1px solid #21212D1A;
    margin-bottom: 24px;
}

.ms-sec-test__result-heading {
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 600
}

.ms-sec-test__result-heading.is-failed {
    color: #a13a3a;
}

.ms-sec-test__result-subtitle {
    font-size: clamp(16px, 1.5vw, 18px);
}

.ms-sec-test__stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.ms-sec-test__stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: clamp(16px, 2vw, 24px);
    background: #769AC91A;
    border-radius: 24px;
}

.ms-sec-test__stat-card.is-success {
    /* background: #e1ebd9; */
}

.ms-sec-test__stat-card.is-fail {
    background-color: #A6312E1A;

    .ms-sec-test__stat-icon {
        background-color: #A6312E;
    }
}

.ms-sec-test__stat-card.is-time {
    /* background: #f3f6fb; */
}

.ms-sec-test__stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--lightBlue);
    border-radius: 8px;
    color: var(--white);
    flex-shrink: 0;
}

.ms-sec-test__stat-card.is-success .ms-sec-test__stat-icon {  }
.ms-sec-test__stat-card.is-fail .ms-sec-test__stat-icon {  }

.ms-sec-test__stat-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ms-sec-test__stat-label {
    font-size: 12px;
    text-transform: uppercase;
}

.ms-sec-test__stat-value {
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.ms-sec-test__result-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.ms-sec-test__result-note {
    font-size: 13px;
    color: #6b6b6b;
    margin-right: auto;
}

/* Свёрнутый разбор ответов под блоком результата. */
.ms-sec-test__review-toggle {
    /* background: #fff; */
    /* border: 1px solid #ece9e3; */
    /* border-radius: 14px; */
    /* padding: 14px 18px; */
    margin-bottom: 24px;
}

.ms-sec-test__review-toggle summary {
    font-size: clamp(18px, 2vw, 22px);
    cursor: pointer;
    font-weight: 700;
    color: #2b2925;
    list-style: none;
}

.ms-sec-test__review-toggle summary::-webkit-details-marker { display: none; }

.ms-sec-test__review-toggle[open] summary {
    margin-bottom: 14px;
}

.ms-sec-literature__body {
    border-bottom: 1px solid #21212D1A;
    line-height: 1.6;
    padding-bottom: 24px;
    margin-bottom: 24px;
    font-size: clamp(16px, 1.5vw, 18px);
}

/* === Test === */

.ms-sec-test__question {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #ece9e3;

    &:last-child {
        border-color: transparent;
    }
}

.ms-sec-test__q-head {
    margin-bottom: 12px;
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 600;
    line-height: 130%;
}

.ms-sec-test__answers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ms-sec-test__answer-row {
    padding: 0;
}

.ms-sec-test__answer-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.12s ease;
}

.ms-sec-test__answer-label:hover {
    background: #fafaf8;
}

.ms-sec-test__answer-input {
    /* Скрываем нативный радио/чекбокс, рендерим свой круглый. */
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ms-sec-test__answer-circle {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 1px solid var(--darkBlue);
    opacity: 0.5;
    border-radius: 50%;
    background: #fff;
    transition: border-color 0.12s ease, background 0.12s ease;
    position: relative;
}

.ms-sec-test__answer-input:checked + .ms-sec-test__answer-circle {
    opacity: 1;
    border-color: var(--lightBlue);
    /* background: var(--lightBlue); */
}

.ms-sec-test__answer-input:checked + .ms-sec-test__answer-circle::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: calc(50% - 8px);
    left: calc(50% - 8px);
    /* transform: translate(-50%, -50%); */
    border-radius: 50%;
    background: var(--lightBlue);
}

.ms-sec-test__answer-text {
    font-size: clamp(16px, 1.5vw, 18px);
}

/* Результат */

.ms-sec-test__result {
    text-align: center;
    padding: 24px;
    margin-bottom: 16px;
    border-radius: 14px;
    border: 1px solid #ece9e3;
    background: #fff;
}

.ms-sec-test__result.is-passed { border-color: #cfe0c1; background: #f6fbf2; }
.ms-sec-test__result.is-failed { border-color: #efc5c5; background: #fcf6f6; }

.ms-sec-test__result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin-bottom: 8px;
}

.ms-sec-test__result-icon--success { background: #4d6a3b; color: #fff; }
.ms-sec-test__result-icon--fail { background: #c75454; color: #fff; }

.ms-sec-test__result-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: #2b2925;
}

.ms-sec-test__result-stats {
    margin: 0;
    color: #4a4742;
    font-size: 14px;
}

.ms-sec-test__review-title {
    margin: 16px 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #2b2925;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ms-sec-test__review-question {
    margin-bottom: clamp(16px, 2vw, 24px);
    border-bottom: 1px solid #ece9e3;
    padding-bottom: clamp(16px, 2vw, 24px);

    &:last-child {
        border-color: transparent;
    }
}

/* .ms-sec-test__review-question.is-correct { border-left-color: #4d6a3b; } */
/* .ms-sec-test__review-question.is-incorrect { border-left-color: #c75454; } */

.ms-sec-test__review-q-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: clamp(20px, 2vw, 24px);
}

.ms-sec-test__review-q-badge {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 6px;
}

.ms-sec-test__review-q-badge.is-correct {
    background: rgba(77, 106, 59, 0.15);
    color: #4d6a3b;
}

.ms-sec-test__review-q-badge.is-incorrect {
    background: rgba(199, 84, 84, 0.15);
    color: #a13a3a;
}

.ms-sec-test__review-answers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ms-sec-test__review-answer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    font-size: clamp(16px, 1.5vw, 18px);
}

/* Подсвечиваем ТОЛЬКО варианты юзера: зелёный — попал, красный — ошибся.
   Правильные варианты, которые юзер не выбрал, не выделяются — иначе он
   подсмотрит ответы для пересдачи. */
.ms-sec-test__review-answer.is-user-right { background-color: #5D9B2A1A; }
.ms-sec-test__review-answer.is-user-wrong { background-color: #A6312E1A; }

.ms-sec-test__review-mark {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 1px solid #21212D1A;
}

.ms-sec-test__review-answer.is-user-right .ms-sec-test__review-mark { background-color: #5D9B2A; border-color: #5D9B2A; }
.ms-sec-test__review-answer.is-user-wrong .ms-sec-test__review-mark { background-color: #A6312E; border-color: #A6312E; }

.ms-sec-test__retry {
    margin-top: 12px;
    text-align: center;
}

.ms-sec-test__no-attempts {
    margin-top: 16px;
    padding: 18px 22px;
    background: #fcf6f6;
    border: 1px solid #efc5c5;
    border-radius: 12px;
}

.ms-sec-test__no-attempts h4 {
    margin: 0 0 6px;
    color: #2b2925;
    font-size: 15px;
}

.ms-sec-test__no-attempts p {
    margin: 0 0 12px;
    color: #6b6b6b;
    font-size: 13px;
    line-height: 1.55;
}

.ms-sec-test__pending {
    padding: 12px 14px;
    background: #fff5e3;
    border-radius: 10px;
    color: #6b4a17;
    font-size: 13px;
    margin-bottom: 8px;
}

.ms-sec-test__pending small {
    display: block;
    margin-top: 4px;
    color: #b07a3d;
}

/* === Offline (очное участие) === */

.ms-offline {
    margin-top: 20px;
    padding-top: clamp(20px, 4vw, 49px);
    color: var(--darkBlue)
}

.ms-offline__heading {
    font-family: 'Monomakh-Regular', 'Jost-Regular', sans-serif;
    font-size: clamp(22px, 4vw, 40px);
    text-transform: uppercase;
    margin-bottom: -4px;
}

.ms-offline__grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    align-items: stretch;

    @media(width <= 1366px) {
        gap: 24px;
    }

    @media(width <= 900px) {
        grid-template-columns: 1fr;
    }
}

.ms-offline__text {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ms-offline__lead {
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 130%;
}

.ms-offline__subtitle {
    margin-top: 7px;
    font-size: 18px;
    font-weight: 600;
    line-height: 130%;
    letter-spacing: 2%;
}

.ms-offline__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: clamp(16px, 1.5vw, 18px);
    letter-spacing: 2%;
    line-height: 130%;

    li {
        position: relative;
        padding-left: 13px;

        &::before {
            position: absolute;
            content: '';
            width: 4px;
            height: 4px;
            border-radius: 100%;
            background-color: var(--lightBlue);
            left: 0;
            top: 8px;
        }
    }
}

.ms-offline__cta {
    background-color: #769AC91A;
    border-radius: 24px;
    padding: clamp(16px, 2vw, 24px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: fit-content;
}

.ms-offline__cta-title {
    font-size: clamp(20px, 2vw, 24px);
    line-height: 160%;
    font-weight: 600;
}

.ms-offline__cta-text {
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 130%;
}

.ms-offline__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 7px;
    width: 100%;
    padding: 10px 16px;
    background: #99a9c2;
    color: #fff;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    letter-spacing: 5%;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.12s ease;
}

.ms-offline__btn:hover:not(:disabled) {
    background: #869ec0;
}

.ms-offline__btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* «Заявка отправлена» — кнопка с галочкой, светлый вариант. */
.ms-offline__btn--sent {
    background: #b9c7da;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    opacity: 1;
}

.ms-offline__btn--sent:disabled {
    opacity: 1;
    cursor: default;
}

.ms-offline__btn--question {
    background: #7e9bc4;
}

.ms-offline__btn--question:hover:not(:disabled) {
    background: #6f8db8;
}

.ms-offline__cta-text--reason {
    color: #2b2925;
    font-weight: 500;
    background: #fff;
    padding: 10px 12px;
    border-radius: 8px;
}

/* ============================================================
 * Содержание урока — sidebar справа на странице раздела.
 * ============================================================ */

.ms-sec-page__title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ms-sec-page__toc-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 24px;
    background: var(--white);
    border: 1px solid var(--darkBlue);
    border-radius: 8px;
    color: var(--darkBlue);
    font: inherit;
    font-size: 14px;
    letter-spacing: 5%;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease;


    @media(width <= 500px) {
        width: 100%;
    }
}

.ms-sec-page__toc-btn:hover {
    background: var(--lightBlue);
    color: var(--white);
    border-color: var(--lightBlue)
}

.ms-toc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(43, 41, 37, 0.4);
    z-index: 1100;
    display: flex;
    justify-content: flex-end;
}

.ms-toc {
    width: min(485px, 100%);
    height: 100%;
    background: #FFFEFB;
    color: var(--darkBlue);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    padding: 41px 16px 41px 24px;

    @media(width <= 576px) {
        padding: 46px 8px 24px 16px;
    }
}

.ms-toc__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin-bottom: clamp(10px, 1.2vw, 14px);
}

.ms-toc__title {
    font-family: 'Monomakh-Regular', sans-serif;
    font-size: clamp(32px, 4vw, 40px);
    text-transform: uppercase;
}

.ms-toc__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--darkBlue);
    opacity: 0.5;
    cursor: pointer;
    transition: 0.3s ease;
}

.ms-toc__close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.ms-toc__list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    overflow-y: auto;
    flex: 1 1 auto;
}

.ms-toc__item {
    padding: 6px 0;
}
.ms-toc__item:not(:last-child) {
    border-bottom: 1px solid #21212D1A;
}

.ms-toc__link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-radius: 8px;
    padding: 10px 16px 10px 10px;
    color: #6b6b6b;
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
}

.ms-toc__link:hover {
    background-color: #769AC91A;
}

.ms-toc__item.is-completed .ms-toc__link {
    color: #2b2925;
}

.ms-toc__item.is-current .ms-toc__link {
    color: var(--lightBlue);
    background-color: #769AC91A;
    pointer-events: none;
}

.ms-toc__item.is-locked .ms-toc__link {
    color: #b1aea7;
    pointer-events: none;
    cursor: not-allowed;
}

.ms-toc__icon {
    color: currentColor;
    flex-shrink: 0;
    display: inline-flex;
    margin-top: 2px;
}

.ms-toc__text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
    line-height: 1.4;
}

.ms-toc__type {
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 140%;
}

.ms-toc__name {
    color: inherit;
    opacity: 0.9;
}

.ms-toc__check {
    flex-shrink: 0;
    color: #c4c1bb;
    display: inline-flex;
    margin-top: 2px;
}

.ms-toc__item.is-completed .ms-toc__check {
    color: #4a6a93;
}

.ms-toc-fade-enter-active,
.ms-toc-fade-leave-active {
    transition: opacity 0.18s ease;
}

.ms-toc-fade-enter-active .ms-toc,
.ms-toc-fade-leave-active .ms-toc {
    transition: transform 0.22s ease;
}

.ms-toc-fade-enter-from,
.ms-toc-fade-leave-to {
    opacity: 0;
}

.ms-toc-fade-enter-from .ms-toc,
.ms-toc-fade-leave-to .ms-toc {
    transform: translateX(40px);
}

/* ============================================================
 * Админ-таб «Очное участие» — переписка и хайлайт строк.
 * ============================================================ */

.admin-ms-mod__row--highlight {
    background: #fff8e8;
}

.admin-ms-mod__row--highlight:hover {
    background: #fff1d4;
}

.admin-ms-offline__history {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-ms-offline__history-item {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    background: #f5f3ef;
    border-left: 3px solid #c4c1bb;
}

.admin-ms-offline__history-item--admin {
    background: #f1f5fa;
    border-left-color: #7e9bc4;
}

.admin-ms-offline__history-item header {
    color: #4a4742;
    margin-bottom: 4px;
}

.admin-ms-offline__history-date {
    color: #8a8782;
    font-size: 12px;
}

.admin-ms-offline__history-message {
    color: #2b2925;
    white-space: pre-wrap;
}

.auth-modal__primary--ghost {
    background: #fff;
    color: #2b2925;
    border: 1px solid #2b2925;
}

.auth-modal__primary--ghost:hover {
    background: #f7f6f1;
}

/* ───────── Активность участников: таблица + дерево ───────── */

.admin-ms-activity { padding: 0 4px; }

.admin-ms-activity__filters {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.admin-ms-activity__search { flex: 1 1 280px; max-width: 360px; }
.admin-ms-activity__filter-select { flex: 0 0 auto; width: auto; min-width: 200px; }

.admin-ms-activity__docfilter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.admin-ms-activity__docfilter-label { font-size: 13px; color: #5C5851; margin-right: 2px; }
.admin-ms-activity__chip {
    border: 1px solid rgba(33, 33, 45, 0.15);
    background: #fff;
    color: #21212D;
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.admin-ms-activity__chip:hover { border-color: #769AC9; }
.admin-ms-activity__chip.is-active {
    background: #769AC9;
    border-color: #769AC9;
    color: #fff;
}

.admin-ms-activity__loading,
.admin-ms-activity__empty { padding: 20px 0; color: #5C6584; }

.admin-ms-activity__table {
    width: 100%;
    border-collapse: collapse;
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #E1E8F5;
}

.admin-ms-activity__table th,
.admin-ms-activity__table td {
    padding: 10px 14px;
    border-bottom: 1px solid #E1E8F5;
    text-align: left;
    font-size: 13px;
    vertical-align: middle;
}

.admin-ms-activity__table th { background: #F5F8FE; color: #5C6584; font-weight: 500; }

.admin-ms-activity__row:hover { background: #FAFBFE; }

.admin-ms-activity__actions { text-align: right; }

.admin-ms-activity__btn {
    background: #769AC9;
    color: #FFFFFF;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Бейдж статуса документов в списке активности */
.admin-ms-activity__doc {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 18px;
    white-space: nowrap;
    background: #EEF1F6;
    color: #21212D;
}
.admin-ms-activity__doc--pending { background: #FFF6E5; color: #8C6300; }
.admin-ms-activity__doc--approved { background: #E5F4EA; color: #1F7A3D; }
.admin-ms-activity__doc--rejected,
.admin-ms-activity__doc--needs_revision { background: #FBE9E8; color: #A6312E; }

.admin-ms-activity__btn:hover { background: #5A7FAF; }

/* Дерево модулей → уроков → разделов в модалке */

.adm-tree {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
}

.adm-tree__node { border-top: 1px solid #EEF1F8; }
.adm-tree__node:first-child { border-top: none; }
.adm-tree__node--section { background: #FAFBFE; }

.adm-tree__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
}

.adm-tree__row:hover { background: rgba(63, 108, 217, 0.04); }

.adm-tree__caret {
    display: inline-block;
    width: 16px;
    color: #79705F;
    transition: transform 0.15s ease;
    font-size: 11px;
}
.adm-tree__caret.is-open { transform: rotate(90deg); }

.adm-tree__type {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #5C6584;
    background: rgba(118, 154, 201, 0.12);
    padding: 2px 8px;
    border-radius: 999px;
}

.adm-tree__title {
    flex: 1;
    color: #21212D;
    font-size: 14px;
}

.adm-tree__meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 12px;
    color: #79705F;
}

.adm-tree__check { color: #2A7549; font-size: 16px; }
.adm-tree__date { white-space: nowrap; }

.adm-tree__children {
    list-style: none;
    margin: 0;
    padding: 0 0 0 24px;
}

.adm-tree__detail {
    padding: 12px 18px 16px 36px;
    background: #FFFFFF;
    border-top: 1px dashed #E1E8F5;
    font-size: 13px;
    color: #21212D;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.adm-tree__detail-row strong { font-weight: 600; margin-right: 4px; }

.adm-tree__view-original {
    align-self: flex-start;
    color: #769AC9;
    font-size: 13px;
    text-decoration: underline;
}

.adm-tree__practice {
    margin-top: 6px;
    padding: 10px 12px;
    background: #F5F8FE;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.adm-tree__practice-text {
    white-space: pre-line;
    line-height: 1.5;
}

.adm-tree__practice-file {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.adm-tree__practice-size { color: #79705F; font-size: 12px; }

.adm-tree__practice-file a { color: #769AC9; text-decoration: underline; }

.adm-tree__test {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.adm-tree__test-badge {
    background: #E8F5EE;
    color: #2A7549;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 8px;
    text-transform: uppercase;
}

.adm-tree__attempt {
    background: #FAFBFE;
    border: 1px solid #E1E8F5;
    border-radius: 8px;
    padding: 8px 12px;
}

.adm-tree__attempt summary {
    cursor: pointer;
    font-size: 13px;
    color: #21212D;
}

.adm-tree__attempt-body {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.adm-tree__question {
    background: #FFFFFF;
    border: 1px solid #E1E8F5;
    border-radius: 6px;
    padding: 10px 12px;
}

.adm-tree__question-text {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
    color: #21212D;
}

.adm-tree__question-num { color: #79705F; margin-right: 4px; }

.adm-tree__q-correct { color: #2A7549; font-weight: 600; margin-right: 4px; }
.adm-tree__q-wrong   { color: #D14040; font-weight: 600; margin-right: 4px; }

.adm-tree__answers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }

.adm-tree__answer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #21212D;
    border: 1px solid transparent;
}

.adm-tree__answer.is-picked-correct {
    background: #E8F5EE;
    border-color: #B6DBC4;
    color: #1F5E36;
}

.adm-tree__answer.is-picked-wrong {
    background: #FBE8E8;
    border-color: #F0BFBF;
    color: #94303A;
}

.adm-tree__answer-mark {
    width: 16px;
    text-align: center;
    font-weight: 600;
}

.adm-tree__answer-text { flex: 1; }

.adm-tree__answer-correct {
    color: #2A7549;
    font-size: 12px;
}


/* ───────── Публичная страница «Межрегиональная методическая школа» ───────── */

/* .ms-public { background: var(--bg, #F5F3F1); } */

.ms-public-page__inner {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 3rem) 80px;
}

.ms-public-page__notice {
    margin-top: 24px;
    padding: 14px 18px;
    background: #FFF6E5;
    border: 1px solid #F2D998;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.ms-public-page__notice-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8C6300;
    font-size: 12px;
}

.ms-public-page__notice-msg { color: #5C5851; font-size: 14px; }

/* Hero */
.ms-hero {
    margin-top: 24px;
    background-color: var(--darkBlue);
    color: var(--white);
}

.ms-banner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
    min-height: 420px;
    position: relative;
    overflow: hidden;
    padding-right: 0;
}

.ms-hero__content {
    z-index: 2;
    padding: 50px 0 47px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ms-hero__title {
    color: #F8F5EE;
    text-align: left;
    font-size: clamp(32px, 4vw, 40px);
    margin: 0;
}

.ms-hero__tags {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}

.ms-hero__tag {
    background-color: #769AC91A;
    backdrop-filter: blur(200px);
    padding: 6px 16px 6px 8px;
    border-radius: 31px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 5%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
}

.ms-hero__lead {
    margin: 0;
    line-height: 130%;
    font-size: clamp(16px, 1.5vw, 18px);
}

.ms-hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 22px;
}

.ms-hero__cta {
    display: inline-block;
    background: var(--lightBlue);
    padding: 10px 22px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: background-color 0.15s ease;
}

.ms-hero__cta:hover { background: #769AC9; }

.ms-hero__secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 22px;
    border-radius: 10px;
    border: 1px solid var(--white);
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ms-hero__secondary:hover { color: #FFFFFF; }

.ms-hero__counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 5%;
    margin-top: -3px;
}

.ms-hero__media {
    position: relative;
    overflow: hidden;
}

.ms-hero__media > img:first-child {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.ms-hero__decor {
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 0px;
    bottom: 0px;
    height: 100%;
    width: auto;
    pointer-events: none;
    transform: rotateY(180deg);
}

.ms-hero__decor_mobile {
    display: none;
}

/* Шаги «Как получить удостоверение» */
.ms-steps { margin: 51px 0; }

.ms-steps__title { margin: 0 0 37px; }

.ms-steps__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;

    @media (width < 1025px) {
        grid-template-columns: 1fr 1fr;
    }

    @media (width < 576px) {
        grid-template-columns: 1fr;
    }
}

.ms-step {
    background: #769AC91A;
    border-radius: 24px;
    padding: clamp(16px, 2vw, 24px);
    color: var(--darkBlue);
    line-height: 130%;
}

.ms-step__icon {
    width: clamp(50px, 5vw, 64px);
    height: clamp(50px, 5vw, 64px);
    border-radius: 8px;
    background-color: #769AC9;
    display: grid;
    place-items: center;
    color: var(--white);
    margin-bottom: 39px;
}

.ms-step__num {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 5%;
    margin-bottom: 11px;
}

.ms-step__title {
    margin-bottom: 10px;
    font-size: clamp(20px, 2vw, 24px);
    letter-spacing: 0.0175em;
    font-weight: 600;
}

.ms-step__desc {
    margin-bottom: 18px;
    font-size: clamp(14px, 1.5vw, 16px);
    line-height: 1.5;
}

/* Кто может принять участие */
.ms-participants {
    padding: clamp(16px, 2vw, 24px);
    background-color: var(--darkBlue);
    color: var(--white);
    border-radius: 24px;
    margin-bottom: 24px;
}
.ms-participants__title {
    font-weight: 600;
    font-size: clamp(20px, 2vw, 24px);
    line-height: 130%;
    margin-bottom: 16px;
}
.ms-participants__list {
    li {
        position: relative;
        padding-left: 12px;
        font-size: clamp(16px, 1.5vw, 18px);
        line-height: 130%;

        &::before {
            position: absolute;
            content: '';
            top: 8px;
            left: 0;
            width: 4px;
            height: 4px;
            background-color: var(--lightBlue);
            border-radius: 50%;
        }
    }
}

/* Медиа-архив */
.ms-archive {
    margin-bottom: 50px;
    color: var(--darkBlue);
    line-height: 130%;
}

.ms-archive__row {
    /* background: #FBF7EE; */
    border: 1px solid #21212D1A;
    border-radius: 24px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ms-archive__title {
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 500;
    line-height: 130%;
    letter-spacing: 2%;
    margin-bottom: 9px;
}

.ms-archive__meta {
    font-size: clamp(14px, 1.5vw, 18px);
    text-transform: uppercase;

}

.ms-archive__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 22px;
    background: transparent;
    border: 1px solid var(--darkBlue);
    border-radius: 8px;
    font-size: clamp(12px, 1.5vw, 14px);
    text-transform: uppercase;
    letter-spacing: 5%;
    text-decoration: none;
}

.ms-archive__btn:hover { background: #21212D; color: #FFFFFF; }

/* FAQ */
.ms-faq { padding-top: 45px; }

.ms-faq__title {
    text-align: left;
    margin-bottom: 31px;
}

.ms-faq__layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 36px;
    align-items: start;

    @media (width < 901px) {
        grid-template-columns: 1fr;
    }
}

.ms-faq__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ms-faq__item {
    background: #FFFFFF;
    border-radius: 10px;
    border: 1px solid rgba(64, 53, 40, 0.06);
    overflow: hidden;
}

.ms-faq__head {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 18px 22px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    color: #21212D;
}

.ms-faq__caret {
    font-size: 22px;
    color: #79705F;
    line-height: 1;
}

.ms-faq__body {
    padding: 0 22px 18px;
    color: #5C5851;
    line-height: 1.55;
    font-size: 14px;
}

.ms-faq__cta {
    background: var(--darkBlue);
    color: var(--white);
    border-radius: 24px;
    padding: 24px;
}

.ms-faq__cta-title {
    margin: 0 0 14px;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 130%;
}

.ms-faq__cta-text {
    margin-bottom: 16px;
    font-size: clamp(14px, 1.5vw, 18px);
    line-height: 130%;
}

.ms-faq__cta-btn {
    display: inline-block;
    padding: 9px 22px;
    background-color: var(--lightBlue);
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    width: 100%;
    text-align: center;
}

.ms-faq__cta-btn:hover { background: #769AC9; }


@media (width < 1025px) {
    .ms-banner {
        display: flex;
        flex-direction: column-reverse;
        padding: 0;
    }
    .ms-hero__content {
        padding: 30px clamp(1rem, 4vw, 3rem) 50px;
    }
    .ms-hero__decor {
        display: none;
    }
    .ms-hero__media {
        height: 429px;
    }
}

@media (max-width: 576px) {
    .ms-hero__decor_mobile {
        z-index: 1;
        display: block;
        position: absolute;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        object-fit: cover;
        transform: rotateY(180deg);
    }
    .ms-hero__cta,
    .ms-hero__secondary {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}
