/* ==== Общий каркас редактора курса ==== */
.editor-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.editor-sidebar {
    background: #f5f8f4;
    border-bottom: 1px solid #e5e9e3;
    padding: 20px;
    font-family: "FiraGO";
}

.editor-course-title {
    font-size: 17px;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
    line-height: 1.3;
}

.editor-status-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
}
.editor-status-badge.draft {
    background: #ececec;
    color: #4d5756;
}
.editor-status-badge.published {
    background: #eefbf5;
    color: #1f6b3a;
}

.editor-publish-btn {
    display: block;
    width: 100%;
    padding: 10px;
    border: 1px solid #5fb670;
    border-radius: 20px;
    background: #fff;
    color: #1f6b3a;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 20px;
}
.editor-publish-btn:hover {
    background: #eefbf5;
}

.editor-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 20px;
}
.editor-nav-item {
    text-align: left;
    background: none;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    color: #000;
    cursor: pointer;
}
.editor-nav-item:hover {
    background: #ececec;
}
.editor-nav-item.active {
    background: #5fb670;
    color: #fff;
    font-weight: 700;
}

.editor-back {
    font-size: 13px;
    color: #4d5756;
    text-decoration: none;
}

.editor-main {
    padding: 24px 20px 60px;
    font-family: "FiraGO";
}

.editor-h1 {
    font-size: 22px;
    color: #000;
    margin-bottom: 6px;
}
.editor-h2 {
    font-size: 16px;
    color: #000;
    margin: 28px 0 12px;
}
.editor-sub {
    font-size: 13px;
    color: #4d5756;
    margin-bottom: 20px;
}
.editor-loading,
.editor-empty {
    font-size: 13px;
    color: #9e9e9e;
    padding: 20px 0;
}

/* ==== Поля форм ==== */
.editor-field {
    margin-bottom: 18px;
}
.editor-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #000;
    margin-bottom: 6px;
}
.editor-hint {
    font-weight: 400;
    color: #9e9e9e;
    font-size: 12px;
}
.editor-field input[type="text"],
.editor-field input[type="number"],
.editor-field textarea,
.editor-field select {
    width: 100%;
    border: 1px solid #dfe5e0;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    color: #000;
    background: #fff;
}
.editor-field textarea {
    resize: vertical;
    line-height: 1.6;
}
.editor-field textarea.mono {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 13px;
}
.editor-field input:focus,
.editor-field textarea:focus,
.editor-field select:focus {
    outline: none;
    border-color: #5fb670;
}

.editor-row {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.editor-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #000;
    cursor: pointer;
    margin-bottom: 18px;
}
.editor-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: #5fb670;
    cursor: pointer;
}

.editor-cover-preview img {
    margin-top: 10px;
    max-width: 240px;
    border-radius: 10px;
    display: block;
}

.editor-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}
.editor-save-btn {
    background: #5fb670;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 11px 28px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.editor-save-btn:disabled {
    opacity: 0.6;
    cursor: default;
}
.editor-saved {
    font-size: 13px;
    color: #1f6b3a;
    font-weight: 600;
}

.editor-add-btn {
    background: #fff;
    border: 1px dashed #a9c2b1;
    border-radius: 10px;
    padding: 12px 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #1f6b3a;
    cursor: pointer;
    width: 100%;
}
.editor-add-btn:hover {
    background: #f5f8f4;
}
.editor-add-btn.small {
    font-size: 13px;
    padding: 9px 16px;
    margin-top: 8px;
}

/* ==== Дерево структуры курса ==== */
.structure-tree {
    margin-bottom: 16px;
}
.module-block {
    border: 1px solid #e5e9e3;
    border-radius: 12px;
    margin-bottom: 14px;
    overflow: hidden;
}
.module-head {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f8f4;
    padding: 12px 14px;
}
.module-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #5fb670;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.module-title {
    font-weight: 700;
    font-size: 14px;
    color: #000;
    flex: 1;
}
.module-tools,
.lesson-tools {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.tool-btn {
    background: #fff;
    border: 1px solid #dfe5e0;
    border-radius: 14px;
    padding: 5px 12px;
    font-family: inherit;
    font-size: 12px;
    color: #000;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.tool-btn:hover {
    border-color: #5fb670;
}
.tool-btn.primary {
    background: #eefbf5;
    border-color: #a9d8bb;
    color: #1f6b3a;
    font-weight: 600;
}
.tool-btn.danger {
    color: #b5391c;
}
.tool-btn.danger:hover {
    border-color: #fc6441;
}

.lesson-list {
    padding: 12px 14px;
}
.lesson-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f2ef;
    flex-wrap: wrap;
}
.lesson-row:last-of-type {
    border-bottom: none;
}
.lesson-num {
    font-size: 12px;
    color: #9e9e9e;
    font-weight: 600;
    flex-shrink: 0;
}
.lesson-title {
    font-size: 14px;
    color: #000;
    flex: 1;
    min-width: 120px;
}
.lesson-steps {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.step-chip {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    background: #ececec;
    color: #4d5756;
}
.step-chip.text { background: #eefbf5; color: #1f6b3a; }
.step-chip.video { background: #eaf6ff; color: #1c5a86; }
.step-chip.quiz { background: #fff3d9; color: #8a6300; }
.step-chip.code { background: #dfd4f4; color: #4b2e83; }
.lesson-nosteps {
    font-size: 12px;
    color: #9e9e9e;
}

/* ==== Аналитика ==== */
.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}
.stat-card {
    flex: 1;
    min-width: 130px;
    background: #f5f8f4;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #000;
}
.stat-label {
    font-size: 12px;
    color: #4d5756;
    margin-top: 4px;
}
.review-card {
    background: #f5f8f4;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}
.review-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.review-user {
    font-weight: 700;
    font-size: 13px;
    color: #000;
}
.review-stars {
    color: #f5b301;
    font-size: 13px;
}
.comment-where {
    font-size: 12px;
    color: #9e9e9e;
}
.review-body {
    font-size: 13px;
    color: #000;
    line-height: 1.5;
}

/* ==== Редактор шагов ==== */
.step-editor-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.step-sidebar {
    background: #f5f8f4;
    border-bottom: 1px solid #e5e9e3;
    padding: 18px;
    font-family: "FiraGO";
}
.step-sidebar-course {
    font-size: 13px;
    font-weight: 700;
    color: #000;
    margin-bottom: 12px;
}
.step-sidebar-module {
    margin-bottom: 12px;
}
.step-sidebar-module-title {
    font-size: 12px;
    color: #4d5756;
    font-weight: 600;
    margin-bottom: 6px;
}
.step-sidebar-lesson {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #000;
    text-decoration: none;
    margin-bottom: 2px;
}
.step-sidebar-lesson span {
    color: #9e9e9e;
    font-size: 12px;
    margin-right: 4px;
}
.step-sidebar-lesson:hover {
    background: #ececec;
}
.step-sidebar-lesson.active {
    background: #5fb670;
    color: #fff;
    font-weight: 600;
}
.step-sidebar-lesson.active span {
    color: #d8f0de;
}

.step-main {
    padding: 24px 20px 60px;
    font-family: "FiraGO";
}
.step-main-head {
    margin-bottom: 18px;
}

.step-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.step-tab {
    background: #f5f8f4;
    border: 1px solid #e5e9e3;
    border-radius: 10px;
    padding: 8px 14px;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 74px;
}
.step-tab-num {
    font-size: 11px;
    color: #9e9e9e;
}
.step-tab-type {
    font-size: 12px;
    color: #000;
    font-weight: 600;
}
.step-tab.active {
    background: #5fb670;
    border-color: #5fb670;
}
.step-tab.active .step-tab-num,
.step-tab.active .step-tab-type {
    color: #fff;
}
.step-tab.add {
    font-size: 20px;
    color: #1f6b3a;
    justify-content: center;
    min-width: 46px;
    border-style: dashed;
}

.step-form-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.step-form-head .editor-h2 {
    margin: 0;
}

.quiz-option-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.quiz-option-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #5fb670;
    flex-shrink: 0;
    cursor: pointer;
}
.quiz-option-row input[type="text"] {
    flex: 1;
    border: 1px solid #dfe5e0;
    border-radius: 8px;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 14px;
}
.quiz-option-row input[type="text"]:focus {
    outline: none;
    border-color: #5fb670;
}

/* ==== Модалка выбора типа шага ==== */
.step-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 20px;
}
.step-modal[hidden] {
    display: none;
}
.step-modal-box {
    background: #fff;
    border-radius: 18px;
    padding: 28px;
    max-width: 620px;
    width: 100%;
    position: relative;
    font-family: "FiraGO";
    max-height: 90vh;
    overflow-y: auto;
}
.step-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 18px;
    color: #4d5756;
    cursor: pointer;
}
.step-modal-box h2 {
    font-size: 20px;
    color: #000;
    text-align: center;
    margin-bottom: 22px;
}
.step-type-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.step-type-card {
    text-align: left;
    background: #fff;
    border: 1px solid #e5e9e3;
    border-radius: 12px;
    padding: 14px 16px;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.step-type-card:hover {
    border-color: #5fb670;
    background: #f5f8f4;
}
.step-type-name {
    font-size: 14px;
    font-weight: 700;
    color: #000;
}
.step-type-desc {
    font-size: 12px;
    color: #4d5756;
}

/* ==== Десктоп ==== */
@media (min-width: 768px) {
    .editor-layout,
    .step-editor-layout {
        flex-direction: row;
    }
    .editor-sidebar,
    .step-sidebar {
        width: 260px;
        flex-shrink: 0;
        border-bottom: none;
        border-right: 1px solid #e5e9e3;
        min-height: calc(100vh - 57px);
    }
    .editor-main,
    .step-main {
        flex: 1;
        padding: 36px 40px 80px;
        max-width: 900px;
    }
    .editor-row {
        flex-direction: row;
        gap: 14px;
    }
    .editor-row .editor-field {
        flex: 1;
    }
    .step-type-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==== Список своих курсов на странице სწავლება ==== */
.my-courses {
    padding: 40px 0 0;
    font-family: "FiraGO";
}
.my-courses-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.my-courses-head h2 {
    font-size: 19px;
    color: #000;
}
.my-courses-empty {
    font-size: 13px;
    color: #9e9e9e;
    background: #f5f8f4;
    border-radius: 12px;
    padding: 20px;
}
.my-course-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f5f8f4;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 10px;
    text-decoration: none;
}
.my-course-row:hover {
    background: #eef1ec;
}
.my-course-cover {
    width: 64px;
    height: 46px;
    border-radius: 8px;
    background: #dfe5e0;
    overflow: hidden;
    flex-shrink: 0;
}
.my-course-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.my-course-info {
    flex: 1;
    min-width: 0;
}
.my-course-title {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    margin-bottom: 4px;
}
.my-course-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #4d5756;
}
.my-course-status {
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
}
.my-course-status.draft {
    background: #ececec;
    color: #4d5756;
}
.my-course-status.published {
    background: #eefbf5;
    color: #1f6b3a;
}
.my-course-arrow {
    color: #5fb670;
    font-size: 18px;
    flex-shrink: 0;
}

/* ==== Модальные окна сайта (замена браузерным prompt/confirm) ==== */
.ui-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 600;
    padding: 20px;
    font-family: "FiraGO";
}
.ui-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 26px;
    width: 100%;
    max-width: 420px;
}
.ui-modal-title {
    font-size: 18px;
    color: #000;
    margin-bottom: 8px;
}
.ui-modal-text {
    font-size: 13px;
    color: #4d5756;
    line-height: 1.5;
    margin-bottom: 16px;
}
.ui-modal-input {
    width: 100%;
    border: 1px solid #dfe5e0;
    border-radius: 8px;
    padding: 11px 13px;
    font-family: inherit;
    font-size: 14px;
    color: #000;
    margin-bottom: 18px;
}
.ui-modal-input:focus {
    outline: none;
    border-color: #5fb670;
}
.ui-modal-input.invalid {
    border-color: #fc6441;
    background: #fff6f3;
}
.ui-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.ui-modal-btn {
    border: none;
    border-radius: 20px;
    padding: 10px 22px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.ui-modal-btn.primary {
    background: #5fb670;
    color: #fff;
}
.ui-modal-btn.danger {
    background: #fc6441;
    color: #fff;
}
.ui-modal-btn.ghost {
    background: #f0f2ef;
    color: #4d5756;
}

/* ==== Уведомления ==== */
.ui-toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translate(-50%, 20px);
    background: #0e2a46;
    color: #fff;
    font-family: "FiraGO";
    font-size: 13px;
    padding: 12px 22px;
    border-radius: 24px;
    z-index: 700;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    max-width: 90vw;
    text-align: center;
}
.ui-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}
.ui-toast.error {
    background: #b5391c;
}
.ui-toast.success {
    background: #1f6b3a;
}

@media (min-width: 768px) {
    .studio-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* ==== Студия курсов: компактные строки ==== */
.teach-studio {
    padding: 36px 0 20px;
    font-family: "FiraGO";
}
.studio-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.studio-title {
    font-size: 24px;
    color: #000;
    margin-bottom: 4px;
}
.studio-sub {
    font-size: 13px;
    color: #4d5756;
}
.studio-grid {
    display: flex;
    flex-direction: column;
}

.course-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 4px;
    border-bottom: 1px solid #eef0ed;
    position: relative;
}
.course-row:last-child {
    border-bottom: none;
}

.course-row-logo {
    width: 58px;
    height: 58px;
    border-radius: 10px;
    background: #eef1ec;
    color: #5fb670;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    text-decoration: none;
    position: relative;
}
.course-row-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.course-row-draft {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #9e9e9e;
    border: 2px solid #fff;
}

.course-row-main {
    flex: 1;
    min-width: 0;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.course-row-title {
    font-size: 15px;
    font-weight: 600;
    color: #000;
}
.course-row-meta {
    font-size: 12px;
    color: #4d5756;
}
.course-row-meta em {
    font-style: normal;
    font-weight: 700;
}
.dot-published { color: #1f6b3a; }
.dot-draft { color: #9e9e9e; }

.course-row-menu {
    position: relative;
    flex-shrink: 0;
}
.row-menu-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #4d5756;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    line-height: 1;
}
.row-menu-btn:hover {
    background: #f0f2ef;
}
.row-menu-list {
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #e5e9e3;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
    padding: 6px;
    min-width: 168px;
    z-index: 50;
    display: flex;
    flex-direction: column;
}
.row-menu-list[hidden] {
    display: none;
}
.row-menu-list a,
.row-menu-list button {
    text-align: left;
    background: none;
    border: none;
    padding: 9px 12px;
    border-radius: 7px;
    font-family: inherit;
    font-size: 13px;
    color: #000;
    text-decoration: none;
    cursor: pointer;
}
.row-menu-list a:hover,
.row-menu-list button:hover {
    background: #f5f8f4;
}
.row-menu-list button.danger {
    color: #b5391c;
}

/* ==== Страница создания курса ==== */
.new-course-page {
    max-width: 560px;
    padding: 36px 20px 70px;
    font-family: "FiraGO";
}
.new-course-title {
    font-size: 24px;
    color: #000;
    margin: 14px 0 24px;
}
.required {
    color: #fc6441;
}
.new-course-counter {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    color: #9e9e9e;
}
.field-error {
    font-size: 12px;
    color: #b5391c;
    margin-top: 6px;
}
.editor-field input.invalid {
    border-color: #fc6441;
    background: #fff6f3;
}
.new-course-note {
    margin-top: 26px;
    font-size: 13px;
    color: #4d5756;
    line-height: 1.6;
}
.new-course-note p {
    margin-bottom: 8px;
}

/* ==== Чек-лист публикации ==== */
.publish-progress {
    background: #f5f8f4;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 22px;
}
.publish-progress-head {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #4d5756;
    margin-bottom: 8px;
}
.publish-progress-head strong {
    color: #000;
}
.publish-progress-bar {
    height: 7px;
    background: #e2e7e0;
    border-radius: 4px;
    overflow: hidden;
}
.publish-progress-bar span {
    display: block;
    height: 100%;
    background: #5fb670;
    border-radius: 4px;
}

.publish-checklist {
    list-style: none;
    border-left: 2px solid #e2e7e0;
    padding-left: 0;
    margin-left: 11px;
}
.publish-rule {
    display: flex;
    gap: 12px;
    padding: 10px 0 10px 18px;
    margin-left: -11px;
}
.publish-mark {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    background: #fff;
    border: 2px solid #e2e7e0;
}
.publish-rule.ok .publish-mark {
    background: #5fb670;
    border-color: #5fb670;
    color: #fff;
}
.publish-rule.fail .publish-mark {
    border-color: #fc6441;
    color: #b5391c;
}
.publish-rule-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.publish-rule-label {
    font-size: 14px;
    color: #000;
}
.publish-rule.ok .publish-rule-label {
    color: #4d5756;
}
.publish-rule-hint {
    font-size: 12px;
    color: #9e9e9e;
}
.publish-goto {
    align-self: flex-start;
    margin-top: 4px;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: #1f6b3a;
    cursor: pointer;
}
.publish-final {
    margin-top: 24px;
}
.publish-ready {
    font-size: 14px;
    color: #1f6b3a;
    font-weight: 600;
    margin-bottom: 14px;
}
.publish-notready {
    font-size: 14px;
    color: #b5391c;
}

@media (min-width: 768px) {
    .new-course-page {
        padding: 44px 40px 80px;
    }
}

/* ==== Заглушка вместо отсутствующей обложки ==== */
.kursi-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef1ec;
    color: #5fb670;
    font-size: 34px;
    font-weight: 700;
    font-family: "FiraGO";
}
.leqtori-initial {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #eef1ec;
    color: #5fb670;
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==== Страница курса ==== */
.course-hero {
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: #f5f8f4;
    border-radius: 18px;
    padding: 24px;
    margin: 20px 14px;
    font-family: "FiraGO";
}
.course-hero-cover {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 16/10;
    border-radius: 12px;
    overflow: hidden;
    background: #e2e7e0;
    flex-shrink: 0;
}
.course-hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.course-hero-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
    font-weight: 700;
    color: #5fb670;
}
.course-hero-text h1 {
    font-size: 24px;
    color: #000;
    margin-bottom: 10px;
    line-height: 1.3;
}
.course-summary {
    font-size: 14px;
    color: #000;
    line-height: 1.6;
    margin-bottom: 12px;
}
.course-hero-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #4d5756;
    margin-bottom: 10px;
}
.course-rating {
    color: #b8860b;
    font-weight: 700;
}
.course-author {
    font-size: 13px;
    color: #4d5756;
}
.course-description {
    font-size: 14px;
    line-height: 1.7;
    color: #000;
}

.program-module {
    border: 1px solid #e5e9e3;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}
.program-module-head {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f8f4;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 14px;
    color: #000;
}
.program-lesson {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-top: 1px solid #f0f2ef;
    flex-wrap: wrap;
}
.program-lesson-num {
    font-size: 12px;
    color: #9e9e9e;
    font-weight: 600;
}
.program-lesson-title {
    font-size: 14px;
    color: #000;
    flex: 1;
    min-width: 120px;
}
.program-lesson-steps {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.review-form {
    background: #f5f8f4;
    border-radius: 12px;
    padding: 16px;
    margin-top: 14px;
}
.review-form h3 {
    font-size: 14px;
    color: #000;
    margin-bottom: 10px;
}
.review-form textarea {
    width: 100%;
    border: 1px solid #dfe5e0;
    border-radius: 8px;
    padding: 10px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 10px;
    resize: vertical;
}
.rating-picker {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}
.rating-picker button {
    background: none;
    border: none;
    font-size: 26px;
    color: #d5dbd6;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}
.rating-picker button.on {
    color: #f5b301;
}

/* ==== Урок: видео, код, прогресс, комментарии ==== */
.lesson-sidebar-progress {
    margin-bottom: 14px;
}
.lesson-sidebar-num.done {
    background: #1f6b3a;
}
.lesson-step-body {
    margin-bottom: 20px;
}
.lesson-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}
.lesson-video iframe,
.lesson-video video {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
.lesson-code-area {
    width: 100%;
    border: 1px solid #dfe5e0;
    border-radius: 10px;
    padding: 12px;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    background: #fbfcfb;
    resize: vertical;
    margin-bottom: 8px;
}
.lesson-quiz-option.chosen {
    border-color: #5fb670;
    background: #f2fbf5;
}
.lesson-step-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.comments-box {
    border-top: 1px solid #eef0ed;
    padding-top: 22px;
    font-family: "FiraGO";
}
.comments-title {
    font-size: 15px;
    color: #000;
    margin-bottom: 14px;
}
.comment-form {
    margin-bottom: 20px;
}
.comment-form textarea {
    width: 100%;
    border: 1px solid #dfe5e0;
    border-radius: 10px;
    padding: 11px 13px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 10px;
}
.comment-form textarea:focus {
    outline: none;
    border-color: #5fb670;
}
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.comment-item {
    display: flex;
    gap: 12px;
}
.comment-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #5fb670;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.comment-body {
    flex: 1;
}
.comment-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 3px;
    flex-wrap: wrap;
}
.comment-author {
    font-size: 13px;
    font-weight: 700;
    color: #000;
}
.comment-date {
    font-size: 12px;
    color: #9e9e9e;
}
.comment-delete {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 12px;
    color: #b5391c;
    cursor: pointer;
    padding: 0;
}
.comment-text {
    font-size: 14px;
    color: #000;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .course-hero {
        flex-direction: row;
        align-items: flex-start;
        padding: 30px;
    }
}

/* ==== Виджет загрузки файлов ==== */
.up-box {
    border: 1px solid #dfe5e0;
    border-radius: 12px;
    padding: 14px;
    background: #fbfcfb;
}
.up-preview {
    margin-bottom: 12px;
}
.up-empty {
    height: 110px;
    border: 1px dashed #cfd8d5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #9e9e9e;
}
.up-preview-img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 10px;
    display: block;
}
.up-preview-video {
    width: 100%;
    max-height: 260px;
    border-radius: 10px;
    background: #000;
    display: block;
}
.up-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.up-btn {
    display: inline-block;
    background: #5fb670;
    color: #fff;
    border-radius: 20px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.up-btn:hover {
    background: #52a463;
}
.up-clear {
    background: none;
    border: 1px solid #dfe5e0;
    border-radius: 20px;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 13px;
    color: #b5391c;
    cursor: pointer;
}
.up-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 140px;
}
.up-progress-bar {
    flex: 1;
    height: 6px;
    background: #e2e7e0;
    border-radius: 4px;
    overflow: hidden;
}
.up-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: #5fb670;
    transition: width 0.2s;
}
.up-progress-text {
    font-size: 12px;
    color: #4d5756;
    min-width: 34px;
}
.up-hint {
    font-size: 12px;
    color: #9e9e9e;
    margin-top: 10px;
}

/* ==== Блокировка курса ==== */
.editor-status-badge.blocked {
    background: #fff1ec;
    color: #b5391c;
}
.blocked-banner {
    background: #fff1ec;
    border: 1px solid #f6c3b3;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #b5391c;
}
.blocked-banner strong {
    font-size: 13px;
}
.blocked-note {
    color: #8a6300;
}

/* ==== Админка ==== */
.admin-chosen {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.admin-chosen-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: #f5f8f4;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #000;
}
.admin-table {
    display: flex;
    flex-direction: column;
}
.admin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #eef0ed;
    flex-wrap: wrap;
}
.admin-row:last-child {
    border-bottom: none;
}
.admin-row-main {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.admin-row-title {
    font-size: 14px;
    font-weight: 600;
    color: #000;
}
.admin-row-meta {
    font-size: 12px;
    color: #4d5756;
}
.admin-row-meta em {
    font-style: normal;
    font-weight: 700;
}
.badge-published { color: #1f6b3a; }
.badge-draft { color: #9e9e9e; }
.badge-blocked { color: #b5391c; }
.admin-row-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ==== Урок: заголовок шага + картинка ==== */
.lesson-step-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 18px;
    border-bottom: 1px solid #eef0ed;
    flex-wrap: wrap;
}
.lesson-step-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    background: #ececec;
    color: #4d5756;
}
.lesson-step-badge.text { background: #eefbf5; color: #1f6b3a; }
.lesson-step-badge.video { background: #eaf6ff; color: #1c5a86; }
.lesson-step-badge.quiz { background: #fff3d9; color: #8a6300; }
.lesson-step-badge.code { background: #dfd4f4; color: #4b2e83; }
.lesson-step-counter {
    font-size: 12px;
    color: #9e9e9e;
}
.lesson-step-done {
    font-size: 12px;
    font-weight: 700;
    color: #1f6b3a;
    margin-left: auto;
}
.lesson-image {
    max-width: 100%;
    border-radius: 12px;
    margin: 16px 0;
    display: block;
}

/* ==== Сообщение о недоступном загруженном файле ==== */
.up-broken {
    border: 1px dashed #f6c3b3;
    background: #fff6f3;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    color: #b5391c;
    word-break: break-all;
}
.up-broken strong {
    font-size: 13px;
}
.up-broken-hint {
    color: #8a6300;
}

/* ==== Статус загрузки (не исчезает, в отличие от toast) ==== */
.up-status {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 8px;
    padding: 9px 12px;
    word-break: break-word;
}
.up-status.error {
    background: #fff1ec;
    color: #b5391c;
    border: 1px solid #f6c3b3;
}
.up-status.ok {
    background: #eefbf5;
    color: #1f6b3a;
    border: 1px solid #b7e2c7;
}

/* ==== Перенос длинных слов ====
   Пользователь может ввести длинную строку без пробелов (asdasdasd...),
   которая иначе растягивает страницу и ломает раскладку. */
body {
    overflow-x: hidden;
}

.course-summary,
.course-description,
.course-hero-text h1,
.course-author,
.program-lesson-title,
.program-module-head,
.lesson-paragraph,
.lesson-content h1,
.comment-text,
.review-body,
.editor-h1,
.editor-h2,
.studio-card-title,
.course-row-title,
.admin-row-title,
.cab-course-title,
.cab-bio,
.kursis-saxeli,
.lesson-quiz-question,
.lesson-quiz-option,
.publish-rule-label,
.step-sidebar-lesson,
.lesson-sidebar-item,
.editor-course-title,
.module-title,
.lesson-title {
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

/* Флекс-элементы должны уметь сжиматься, иначе длинный текст их распирает */
.course-hero-text,
.course-main,
.cab-course-body,
.admin-row-main,
.course-row-main,
.editor-main,
.lesson-main,
.step-main {
    min-width: 0;
}

.course-body,
.course-content-columns,
.lesson-content {
    max-width: 100%;
}

/* ==== Профиль лектора ==== */
.instructor-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 34px 20px 70px;
    font-family: "FiraGO";
}
.instructor-head {
    display: flex;
    gap: 20px;
    align-items: center;
    background: #f5f8f4;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.instructor-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: #5fb670;
    color: #fff;
    font-size: 34px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.instructor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.instructor-info {
    flex: 1;
    min-width: 200px;
}
.instructor-info h1 {
    font-size: 24px;
    color: #000;
    margin-bottom: 6px;
}
.instructor-bio {
    font-size: 14px;
    color: #4d5756;
    line-height: 1.6;
    margin-bottom: 10px;
    overflow-wrap: anywhere;
}
.instructor-stats {
    display: flex;
    gap: 18px;
    font-size: 13px;
    color: #4d5756;
}
.instructor-stats strong {
    color: #000;
}
.instructor-courses {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.instructor-course {
    display: flex;
    gap: 14px;
    background: #fff;
    border: 1px solid #e5e9e3;
    border-radius: 14px;
    padding: 14px;
    text-decoration: none;
}
.instructor-course:hover {
    border-color: #5fb670;
}
.instructor-course-cover {
    width: 110px;
    height: 78px;
    border-radius: 10px;
    background: #eef1ec;
    color: #5fb670;
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.instructor-course-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.instructor-course-body {
    flex: 1;
    min-width: 0;
}
.instructor-course-body h3 {
    font-size: 15px;
    color: #000;
    margin-bottom: 4px;
    overflow-wrap: anywhere;
}
.instructor-course-summary {
    font-size: 12px;
    color: #4d5756;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.instructor-course-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #4d5756;
    flex-wrap: wrap;
}
.instructor-course-price {
    font-weight: 700;
    color: #1f6b3a;
}
.author-link {
    color: #1f6b3a;
    font-weight: 700;
    text-decoration: none;
}
.author-link:hover {
    text-decoration: underline;
}

/* ==== Редактор тестов для шага «программирование» ==== */
.test-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
}
.test-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ececec;
    color: #4d5756;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 6px;
}
.test-fields {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-width: 0;
}
.test-fields textarea {
    width: 100%;
    border: 1px solid #dfe5e0;
    border-radius: 8px;
    padding: 8px 10px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 13px;
    resize: vertical;
}
.test-fields textarea:focus {
    outline: none;
    border-color: #5fb670;
}
.test-remove {
    margin-top: 4px;
}

/* ==== Запуск кода в уроке ==== */
.code-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}
.code-lang {
    background: #dfd4f4;
    color: #4b2e83;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}
.code-tests-count {
    font-size: 12px;
    color: #9e9e9e;
}
.code-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.code-status {
    font-size: 12px;
    color: #4d5756;
}
.code-output {
    background: #0e2a46;
    color: #dfe8ec;
    border-radius: 10px;
    padding: 14px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-x: auto;
}
.code-output.error {
    background: #3a1410;
    color: #ffc9ba;
}
.code-summary {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}
.code-summary.ok {
    background: #eefbf5;
    color: #1f6b3a;
}
.code-summary.no {
    background: #fff1ec;
    color: #b5391c;
}
.code-test {
    border: 1px solid #e5e9e3;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
    font-size: 13px;
}
.code-test.pass {
    border-color: #b7e2c7;
    background: #f7fdf9;
    color: #1f6b3a;
}
.code-test.fail {
    border-color: #f6c3b3;
    background: #fffaf8;
}
.code-test-head {
    font-weight: 700;
}
.code-test-detail {
    margin-top: 8px;
    display: grid;
    gap: 8px;
    font-size: 12px;
}
.code-test-detail pre {
    background: #f5f8f4;
    border-radius: 6px;
    padding: 7px 10px;
    font-family: ui-monospace, Consolas, monospace;
    white-space: pre-wrap;
    margin-top: 3px;
    overflow-x: auto;
}

@media (min-width: 768px) {
    .instructor-courses {
        grid-template-columns: 1fr 1fr;
    }
    .test-fields {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==== Рейтинг: одна звезда + числовая оценка ==== */
.rating-star {
    color: #f5b301;
    font-size: 15px;
    line-height: 1;
}
.rating-value {
    font-size: 13px;
    font-weight: 600;
    color: #000;
    margin-left: 4px;
}
.shefaseba {
    display: flex;
    align-items: center;
    gap: 2px;
}
.review-stars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #000;
    font-size: 13px;
    font-weight: 600;
}
.course-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #000;
    font-weight: 600;
}
.stat-value .rating-star {
    font-size: 20px;
}

/* ==== Навигация по курсу в сайдбаре урока ==== */
.lesson-sidebar-course {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    text-decoration: none;
    margin-bottom: 12px;
    overflow-wrap: anywhere;
}
.lesson-sidebar-course:hover {
    color: #1f6b3a;
}
.lesson-course-progress {
    margin-bottom: 18px;
}
.course-nav-module {
    margin-bottom: 16px;
}
.course-nav-module-title {
    font-size: 12px;
    font-weight: 700;
    color: #4d5756;
    margin-bottom: 6px;
    overflow-wrap: anywhere;
}
.course-nav-lesson {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #000;
    text-decoration: none;
    margin-bottom: 3px;
}
.course-nav-lesson:hover {
    background: #ececec;
}
.course-nav-lesson.active {
    background: #5fb670;
    color: #fff;
    font-weight: 600;
}
.course-nav-mark {
    min-width: 26px;
    height: 20px;
    border-radius: 10px;
    background: #e2e7e0;
    color: #4d5756;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.course-nav-lesson.done .course-nav-mark {
    background: #1f6b3a;
    color: #fff;
}
.course-nav-lesson.active .course-nav-mark {
    background: #fff;
    color: #1f6b3a;
}
.course-nav-lesson-title {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}
.course-nav-count {
    font-size: 11px;
    color: #9e9e9e;
    flex-shrink: 0;
}
.course-nav-lesson.active .course-nav-count {
    color: #d8f0de;
}

/* Пройденный шаг в верхней ленте */
.step-tab.done .step-tab-num {
    color: #1f6b3a;
    font-weight: 700;
}
.step-tab.done:not(.active) {
    border-color: #b7e2c7;
    background: #f7fdf9;
}

/* Прогресс на странице курса */
.course-progress-box {
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 14px;
}

/* Заблокированный курс */
.course-blocked {
    max-width: 520px;
    margin: 60px auto;
    text-align: center;
    font-family: "FiraGO";
    padding: 0 20px;
}
.course-blocked h1 {
    font-size: 22px;
    color: #000;
    margin-bottom: 10px;
}
.course-blocked p {
    font-size: 14px;
    color: #b5391c;
    margin-bottom: 18px;
    line-height: 1.6;
}

/* Ответы на комментарии */
.comment-item.reply {
    margin-left: 46px;
    padding-left: 14px;
    border-left: 2px solid #e5e9e3;
}
.comment-reply-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #1f6b3a;
    cursor: pointer;
    padding: 0;
}
.reply-form {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}
.reply-form[hidden] {
    display: none;
}
.reply-form textarea {
    width: 100%;
    border: 1px solid #dfe5e0;
    border-radius: 8px;
    padding: 9px 11px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
}
.reply-form textarea:focus {
    outline: none;
    border-color: #5fb670;
}

/* ==== Кнопки-ссылки (были случайно удалены при переработке студии) ==== */
.studio-btn {
    display: inline-block;
    border: 1px solid #dfe5e0;
    background: #fff;
    border-radius: 20px;
    padding: 9px 20px;
    font-family: "FiraGO";
    font-size: 13px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.studio-btn:hover {
    border-color: #5fb670;
}
.studio-btn.primary {
    background: #5fb670;
    border-color: #5fb670;
    color: #fff;
}
.studio-btn.primary:hover {
    background: #52a463;
    border-color: #52a463;
}
.studio-btn.danger {
    color: #b5391c;
}
.studio-btn.danger:hover {
    border-color: #fc6441;
}

/* Одна кнопка продолжения вместо пары «назад/вперёд» */
.lesson-next {
    padding: 22px 0 6px;
    border-top: 1px solid #eef0ed;
    margin-top: 14px;
}
.lesson-next .studio-btn {
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
}

/* ==== Категории в админке ==== */
.cat-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.cat-row {
    border: 1px solid #e5e9e3;
    border-radius: 12px;
    padding: 14px;
}
.cat-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 12px;
    font-family: "FiraGO";
    font-size: 14px;
    font-weight: 600;
    color: #000;
}
.cat-preview img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.cat-controls {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}
.cat-color-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #4d5756;
}
.cat-color-label input[type="color"] {
    width: 42px;
    height: 30px;
    border: 1px solid #dfe5e0;
    border-radius: 6px;
    padding: 2px;
    cursor: pointer;
    background: #fff;
}
.cat-icon-upload {
    flex: 1;
    min-width: 200px;
}
.cat-icon-upload .up-box {
    padding: 10px;
}
.cat-icon-upload .up-preview-img {
    max-height: 60px;
}
.cat-icon-upload .up-empty {
    height: 56px;
    font-size: 12px;
}
.cat-icon-upload .up-hint {
    display: none;
}
.cat-count {
    display: block;
    font-size: 12px;
    color: #9e9e9e;
    margin-top: 10px;
}
.new-cat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

/* ==== Сертификат ==== */
.cert-page {
    min-height: 100vh;
    background: #eef1ec;
    padding: 24px 16px 50px;
    font-family: "FiraGO";
}
.cert-actions {
    max-width: 820px;
    margin: 0 auto 18px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.cert-sheet {
    max-width: 820px;
    margin: 0 auto;
    background: #fff;
    border: 2px solid #5fb670;
    border-radius: 8px;
    padding: 50px 46px;
    text-align: center;
    position: relative;
}
.cert-brand {
    text-decoration: none;
    color: #5FB670;
    font-size: 29px;
    font-weight: bold;
    font-family: "alk-katerina";
    letter-spacing: 2px;
    margin-bottom: 26px;
}
.cert-kicker {
    font-size: 13px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #4d5756;
    margin-bottom: 26px;
}
.cert-name {
    font-size: 34px;
    color: #000;
    margin-bottom: 14px;
    overflow-wrap: anywhere;
}
.cert-text {
    font-size: 14px;
    color: #4d5756;
    margin-bottom: 10px;
}
.cert-course {
    font-size: 21px;
    color: #1f6b3a;
    margin-bottom: 34px;
    overflow-wrap: anywhere;
}
.cert-meta {
    display: flex;
    justify-content: center;
    gap: 44px;
    flex-wrap: wrap;
    padding: 22px 0;
    border-top: 1px solid #eef0ed;
    border-bottom: 1px solid #eef0ed;
    margin-bottom: 22px;
}
.cert-meta > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cert-meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9e9e9e;
}
.cert-meta-value {
    font-size: 14px;
    font-weight: 600;
    color: #000;
}
.cert-footer {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.cert-code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 17px;
    font-weight: 700;
    color: #000;
    letter-spacing: 1px;
}
.cert-verify-note {
    font-size: 11px;
    color: #9e9e9e;
    overflow-wrap: anywhere;
}

.cert-verify {
    max-width: 420px;
    margin: 70px auto;
    background: #fff;
    border-radius: 16px;
    padding: 34px;
    text-align: center;
}
.cert-verify h1 {
    font-size: 20px;
    color: #000;
    margin: 16px 0 18px;
}
.cert-verify input {
    width: 100%;
    border: 1px solid #dfe5e0;
    border-radius: 10px;
    padding: 12px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 15px;
    text-align: center;
    margin-bottom: 14px;
    text-transform: uppercase;
}
.cert-error {
    background: #fff1ec;
    color: #b5391c;
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    margin-bottom: 14px;
}

/* Сертификаты в кабинете */
.cert-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #f5f8f4;
    border-radius: 12px;
    padding: 14px 16px;
    text-decoration: none;
}
.cert-item-title {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    overflow-wrap: anywhere;
}
.cert-item-code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    color: #4d5756;
    margin-top: 2px;
}
.cab-course-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media print {
    .no-print { display: none !important; }
    .cert-page { background: #fff; padding: 0; }
    .cert-sheet { border-width: 2px; margin: 0; max-width: none; }
}

/* ==== Визуальный редактор текста ==== */
.rich {
    border: 1px solid #dfe5e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 7px 8px;
    background: #f5f8f4;
    border-bottom: 1px solid #e5e9e3;
}
.rich-btn {
    min-width: 32px;
    height: 30px;
    border: none;
    background: none;
    border-radius: 6px;
    font-family: "FiraGO";
    font-size: 14px;
    color: #000;
    cursor: pointer;
}
.rich-btn:hover {
    background: #e2e7e0;
}
.rich-area {
    padding: 14px 16px;
    font-family: "FiraGO";
    font-size: 15px;
    line-height: 1.7;
    color: #000;
    outline: none;
    overflow-wrap: anywhere;
}
.rich-area:focus {
    background: #fdfefd;
}
.rich-area:empty::before {
    content: "დაწერე ტექსტი...";
    color: #9e9e9e;
}

/* Оформление содержимого — и в редакторе, и при показе ученику */
.rich-area h3, .rich-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 18px 0 8px;
    color: #000;
}
.rich-area h4, .rich-content h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 14px 0 6px;
}
.rich-area p, .rich-content p {
    margin-bottom: 12px;
}
.rich-area ul, .rich-content ul,
.rich-area ol, .rich-content ol {
    margin: 0 0 12px 22px;
}
.rich-area li, .rich-content li {
    margin-bottom: 5px;
}
.rich-area blockquote, .rich-content blockquote {
    border-left: 3px solid #5fb670;
    background: #f5f8f4;
    padding: 10px 14px;
    margin: 0 0 12px;
    border-radius: 0 8px 8px 0;
}
.rich-area a, .rich-content a {
    color: #1f6b3a;
    text-decoration: underline;
}
.rich-area img, .rich-content img {
    max-width: 100%;
    border-radius: 10px;
    margin: 10px 0;
    display: block;
}
.rich-area code, .rich-content code {
    background: #f0f2ef;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 13px;
}
.rich-content {
    font-family: "FiraGO";
    font-size: 15px;
    line-height: 1.7;
    color: #000;
    overflow-wrap: anywhere;
}

/* ==== Кнопки перестановки ==== */
.tool-btn.move {
    min-width: 30px;
    padding: 5px 8px;
    font-size: 14px;
    line-height: 1;
}
.tool-btn.move:disabled {
    opacity: 0.35;
    cursor: default;
}
.tool-btn.move:disabled:hover {
    border-color: #dfe5e0;
}
.step-head-tools {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ==== Отписка от курса ==== */
.course-unenroll {
    width: 100%;
    margin-top: 10px;
    background: none;
    border: none;
    font-family: "FiraGO";
    font-size: 12px;
    color: #9e9e9e;
    cursor: pointer;
    text-decoration: underline;
    padding: 6px;
}
.course-unenroll:hover {
    color: #b5391c;
}

/* ==== Страницы подтверждения почты и восстановления пароля ==== */
.auth-msg-page {
    max-width: 440px;
    margin: 70px auto;
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px;
    text-align: center;
    font-family: "FiraGO";
}
.auth-msg-page h1 {
    font-size: 21px;
    color: #000;
    margin: 18px 0 12px;
}
.auth-msg-page p {
    font-size: 14px;
    color: #4d5756;
    line-height: 1.6;
    margin-bottom: 20px;
}
.auth-msg-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #eefbf5;
    color: #1f6b3a;
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 18px auto 0;
}
.auth-msg-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.auth-msg-form input,
.auth-msg-resend input {
    width: 100%;
    border: 1px solid #dfe5e0;
    border-radius: 10px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
}
.auth-msg-form input:focus,
.auth-msg-resend input:focus {
    outline: none;
    border-color: #5fb670;
}
.auth-msg-resend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}
.auth-msg-note {
    font-size: 12px;
    color: #9e9e9e;
}

/* Напоминание подтвердить почту */
.verify-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #fff3d9;
    border: 1px solid #f0dcae;
    border-radius: 12px;
    padding: 13px 16px;
    margin-bottom: 20px;
    font-family: "FiraGO";
    font-size: 13px;
    color: #8a6300;
    flex-wrap: wrap;
}

/* ==== Удаление аккаунта ==== */
.danger-zone {
    border: 1px solid #f6c3b3;
    background: #fffaf8;
    border-radius: 12px;
    padding: 16px;
    margin-top: 8px;
}
.danger-zone p {
    font-size: 13px;
    color: #4d5756;
    line-height: 1.6;
    margin-bottom: 12px;
}
.deletion-preview ul {
    margin: 0 0 14px 18px;
    font-size: 13px;
    color: #000;
}
.deletion-preview li {
    margin-bottom: 4px;
}
.deletion-warning {
    color: #b5391c;
    font-weight: 700;
}

/* ==== Проверка почты в админке ==== */
.mail-test {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.mail-test input {
    flex: 1;
    min-width: 220px;
    border: 1px solid #dfe5e0;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
}
.mail-test-result {
    border-radius: 10px;
    padding: 14px;
    font-size: 13px;
    line-height: 1.7;
    word-break: break-word;
}
.mail-test-result.ok {
    background: #eefbf5;
    color: #1f6b3a;
}
.mail-test-result.fail {
    background: #fff1ec;
    color: #b5391c;
}

/* ==== Подсказка о типе теста ==== */
.quiz-mode-hint {
    font-size: 12px;
    color: #4d5756;
    background: #f5f8f4;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
}
.quiz-mode-hint.multi {
    background: #eefbf5;
    color: #1f6b3a;
    font-weight: 600;
}
.quiz-mode-hint.warn {
    background: #fff3d9;
    color: #8a6300;
}
.lesson-quiz-mode {
    font-size: 12px;
    color: #9e9e9e;
    margin-bottom: 12px;
}

/* ==== Пагинация каталога ==== */
.catalog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px 14px 40px;
    flex-wrap: wrap;
    font-family: "FiraGO";
}
.pagination-info {
    font-size: 13px;
    color: #4d5756;
}
.catalog-pagination .studio-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ==== Занятое место в кабинете ==== */
.storage-usage {
    background: #f5f8f4;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}

/* ==== Роли в админке ==== */
.role-select {
    border: 1px solid #dfe5e0;
    border-radius: 14px;
    padding: 5px 10px;
    font-family: inherit;
    font-size: 12px;
    background: #fff;
    cursor: pointer;
}
.role-select:focus {
    outline: none;
    border-color: #5fb670;
}
.owner-badge {
    background: #eefbf5;
    color: #1f6b3a;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ==== Кнопка входа через Google ==== */
.google-signin {
    width: 100%;
    position: relative;
}
/* Настоящая кнопка Google лежит прозрачной поверх своей.
   Клик по iframe Google нельзя вызвать из JS — пользователь должен
   нажать его сам, поэтому он растягивается на размер видимой кнопки. */
.google-hidden {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    opacity: 0.01;
    z-index: 2;
}
/* мышь теперь над iframe, поэтому hover вешаем на контейнер */
.google-signin:hover .avtorizacia-google {
    background: #f7f7f7;
}

/* ==== Страница "სწავლება" ==== */
.teach-page {
    font-family: "FiraGO";
    /* серая полоса начинается сразу под шапкой, без белого зазора */
    padding-top: 0;
}

/* Серый блок тянется во всю ширину экрана, а содержимое внутри
   ограничено и отцентровано — как в макете. */
.teach-hero {
    background: #eef1ec;
    padding: 0 20px;
    /* выходим за пределы контейнера .rest на всю ширину окна */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}
.teach-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
}
.teach-hero-content {
    max-width: 460px;
    /* выравниваем по центру серой полосы: фото прижато к низу,
       и без этого текст уезжал вниз вместе с ним */
    align-self: center;
}
.teach-hero h1 {
    font-size: 30px;
    color: #000;
    line-height: 1.25;
    margin-bottom: 14px;
}
.teach-hero p {
    font-size: 15px;
    color: #4d5756;
    line-height: 1.6;
    margin-bottom: 24px;
}
/* Фотография без фона и рамки: у PNG прозрачный фон,
   человек просто стоит на серой полосе и ничем не обрезается. */
.teach-hero-photo {
    flex-shrink: 0;
    align-self: flex-end;
    line-height: 0;
    background: none;
    border-radius: 0;
    overflow: visible;
}
.teach-hero-photo img {
    display: block;
    max-width: 400px;
    width: 100%;
    height: auto;
    margin-bottom: 0;
}

/* Крупная кнопка, как в макете */
.teach-cta {
    background: #5fb670;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 15px 64px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.teach-cta:hover {
    background: #52a463;
}

.teach-features {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 34px;
    padding: 56px 20px 70px;
}
.teach-feature {
    text-align: center;
}
.teach-feature-icon {
    width: 76px;
    height: 76px;
    object-fit: contain;
    margin: 0 auto 16px;
    display: block;
}
.teach-feature h3 {
    font-size: 17px;
    color: #000;
    margin-bottom: 10px;
    font-weight: 700;
}
.teach-feature p {
    font-size: 13px;
    color: #4d5756;
    line-height: 1.7;
    max-width: 320px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .teach-hero {
        padding: 0 40px;
    }
    .teach-hero-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
        text-align: left;
        gap: 40px;
    }
    .teach-hero-photo img {
        max-width: 400px;
        margin-bottom: 0;
    }
    .teach-features {
        flex-direction: row;
        gap: 40px;
    }
    .teach-feature {
        flex: 1;
    }
}

/* ==== Предпросмотр обложки в редакторе ==== */
.cover-pos {
    margin-top: 14px;
}
.cover-pos-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.cover-pos-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}
.cover-pos-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cover-pos-frame {
    overflow: hidden;
    background: #eef1ec;
    cursor: grab;
    touch-action: none;
    user-select: none;
}
.cover-pos-frame.dragging {
    cursor: grabbing;
}
.cover-pos-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
/* размеры как на сайте */
.cover-pos-frame.home { width: 320px; height: 180px; border-radius: 16px 16px 0 0; }
.cover-pos-frame.catalog { width: 240px; height: 180px; border-radius: 16px 0 0 16px; }
.cover-pos-frame.hero { width: 280px; height: 175px; border-radius: 12px; }
.cover-pos-frame.thumb { width: 58px; height: 58px; border-radius: 10px; }
.cover-pos-label {
    font-size: 12px;
    color: #4d5756;
}

/* ==== Позиция обложки по форматам (переменные ставит EdunityUpload.posStyle) ==== */
.kursi-picture {
    object-position: var(--pos-card, 50% 50%);
}
.course-hero-cover img {
    object-position: var(--pos-hero, 50% 50%);
}
.course-row-logo img {
    object-position: var(--pos-thumb, 50% 50%);
}
.cab-course-cover img,
.instructor-course-cover img {
    object-position: var(--pos-row, 50% 50%);
}
@media (min-width: 768px) {
    .catalog-grid .kursi-picture {
        object-position: var(--pos-row, 50% 50%);
    }
}

/* ==== Курс без отзывов ==== */
.shefaseba-carieli {
    font-size: 12px;
    color: #9e9e9e;
}

/* ==== Подписи полей: подсказка с новой строки ==== */
/* Иначе длинная подсказка переносится сама и поля в строке разъезжаются */
.editor-field label .editor-hint {
    display: block;
    margin-top: 2px;
}
.editor-row .editor-field label {
    min-height: 38px;
}

/* ==== Телефон: меню редактора всегда первое ==== */
/* Порядок задаётся стилями, а не только разметкой, чтобы меню
   не уезжало вниз под содержимое. */
@media (max-width: 767px) {
    .editor-layout {
        flex-direction: column;
    }
    .editor-sidebar {
        order: -1;
        display: flex;
        flex-direction: column;
    }
    .editor-nav {
        order: -1;
    }
    .editor-back {
        align-self: flex-start;
    }
    .editor-main {
        order: 1;
    }
}

/* ==== Телефон: меню редактора — лента наверху ==== */
@media (max-width: 767px) {
    .editor-nav {
        position: sticky;
        top: 0;
        z-index: 60;
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        background: #fff;
        border-bottom: 1px solid #e5e9e3;
        padding: 8px 14px;
        margin: 0;
        -webkit-overflow-scrolling: touch;
    }
    .editor-nav-item {
        white-space: nowrap;
        padding: 8px 14px;
        border-radius: 18px;
        background: #f0f2ef;
        font-size: 13px;
    }
    .editor-nav-item.active {
        background: #5fb670;
    }
    .editor-sidebar {
        padding-top: 16px;
    }
}

/* ==== Иконки в мете карточки: один размер ==== */
.agwera-item img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ==== Бэкап курса в админке ==== */
.backup-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

/* ==== Заглушки на время загрузки ==== */
/* Бэкенд просыпается не мгновенно, и пустая страница выглядит сломанной */
.skel {
    border-radius: 16px;
    background: linear-gradient(90deg, #f0f2ef 25%, #e6eae5 50%, #f0f2ef 75%);
    background-size: 200% 100%;
    animation: skel-shine 1.2s infinite linear;
}
@keyframes skel-shine {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}
/* Размеры берутся у настоящих карточек, заглушка только красит */
.skel-card {
    height: 300px;
}
.skel-row {
    height: 190px;
    margin-bottom: 14px;
}
.skel-leqtori {
    border-color: #e6eae5;
}
@media (prefers-reduced-motion: reduce) {
    .skel { animation: none; }
}

/* ==== სწავლება: пока проверяем курсы, лендинг скрыт ==== */
.teach-checking #teach-landing {
    display: none;
}
.skel-studio {
    height: 72px;
    border-radius: 12px;
    margin-bottom: 10px;
}
