/* ========================
   Базовые настройки
   ======================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #000;
    background-color: #fcfcfc;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.account-main {
    margin-top: 135px;
}

/* Кнопка "Личный кабинет" в шапке */
.btn--account {
    display: inline-flex;
    align-items: center;
    width: 207px;
    height: 60px;
    border: 2px solid #D90D26;
    border-radius: 10px;
    background: transparent;
    color: #000;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: background-color 0.2s;
    font-family: 'Montserrat', sans-serif;
    padding: 0 10px 0 15px;
    gap: 7px;
    box-sizing: border-box;
    white-space: nowrap;
}

.btn--account:hover {
    background-color: #f5f5f5;
}

.btn--account__icon {
    width: 37px;
    height: 37px;
    flex-shrink: 0;
}

/* Хлебные крошки */
.breadcrumbs {
    font-size: 18px;
    font-weight: 400;
    color: #929292;
    margin-bottom: 60px;
}
.breadcrumbs a { 
    color: #929292; 
    text-decoration: none; 
    transition: color 0.2s; 
}
.breadcrumbs a:hover { 
    color: #D90D26; 
}
.breadcrumbs__sep { 
    margin: 0 2px; 
}
.breadcrumbs__current { 
    color: #929292; 
}

.account-hero__title {
    font-size: 50px;
    font-weight: 500;
    margin-bottom: 30px;
    color: #000;
}

/* Основная раскладка */
.account-layout {
    display: flex;
    gap: 15px;
    margin-bottom: 100px;
    align-items: flex-start;      
}

/* Левая боковая панель */
.account-sidebar {
    width: 477px;
    min-height: 645px;
    background-color: #f5f5f5;
    //border: 4px solid #D6D6D6;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    padding: 60px 0;
    flex-shrink: 0;
    align-self: flex-start;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);       
}

.sidebar-avatar {
    width: 150px; 
    height: 150px;
    object-fit: cover;
    margin: 0 auto 30px;
    display: block;
}

.sidebar-name {
    font-size: 25px; 
    font-weight: 500;
    text-align: center;
    margin-bottom: 43px;
}

/* Меню */
.sidebar-menu {
    list-style: none; 
    width: 100%;
    margin-bottom: 30px;
}

.sidebar-menu__item {
    position: relative;
    display: flex; 
    align-items: center;
    height: 60px;
    background-color: transparent;
    cursor: pointer;
}

.sidebar-menu__item.active {
    background-color: #ebebeb;
}

.sidebar-indicator {
    position: absolute; 
    left: -4px; 
    top: 0;
    height: 100%; 
    width: 4px;
    background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    border-radius: 0 2px 2px 0;
    display: none;
}

.sidebar-menu__item.active .sidebar-indicator { 
    display: block; 
}

.sidebar-link {
    display: block; 
    width: 100%;
    padding: 18px 0 18px 60px;
    font-size: 20px; 
    font-weight: 400;
    color: #000; 
    text-decoration: none;
    z-index: 1;
}

/* Кнопки в сайдбаре */
.sidebar-actions {
    display: flex; 
    gap: 21px;
    margin-top: auto;
    padding: 0 60px;
}

.btn--delete-account {
    width: 214px; 
    height: 56px;
    background-color: #E7E7E7;
    border: none; 
    border-radius: 10px;
    font-size: 18px; 
    font-weight: 400;
    color: #000; 
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: 'Montserrat', sans-serif;
}
.btn--delete-account:hover { 
    opacity: 0.7; 
}

.btn--logout {
    width: 122px; 
    height: 56px;
    background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    border: none; 
    border-radius: 10px;
    font-size: 18px; 
    font-weight: 500;
    color: #FCFCFC; 
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: 'Montserrat', sans-serif;
}
.btn--logout:hover { 
    opacity: 0.8; 
}

/* Правая область контента */
.account-content {
    width: 708px;
    min-height: 645px;
    background-color: #f3f3f3;
    border-radius: 10px;
    padding: 30px;
    position: relative;
    flex-shrink: 0;
}

.content-panel { display: none; }
.content-panel.active { display: block; }

.content-header {
    display: flex; 
    align-items: center;
    gap: 10px; 
    margin-bottom: 30px;
}

.content-title { 
    font-size: 22px; 
    font-weight: 500; 
}

.content-add-btn {
    background: none; 
    border: none;
    cursor: pointer; 
    padding: 10px;
    display: flex;
}
.content-add-icon {
    width: 24px; 
    height: 24px;
    transform: rotate(45deg);
    transition: opacity 0.2s;
}
.content-add-btn:hover .content-add-icon { opacity: 0.7; }

/* Карточка заявки и отзыва – расстояние 10px */
.application-card,
.review-card {
    margin-bottom: 30px;
}

.application-card {
    position: relative;
    width: 648px;
    background-color: #FCFCFC;
    border-radius: 10px;
    padding: 20px;
    min-height: 200px;
}

.application-header {
    display: flex; 
    justify-content: space-between;
    align-items: flex-start;
}

.application-number { 
    font-size: 22px; 
    font-weight: 400; 
    margin-bottom: 3px; 
}

.application-status {
    width: 145px; 
    height: 35px;
    background: linear-gradient(-42deg, #FFBB3D, #FFC96C, #FFBB3D);
    border-radius: 10px;
    font-size: 18px; 
    font-weight: 400;
    color: #946000;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

/* Подтверждённая заявка – зелёный */
.application-status[data-status="confirmed"] {
    background: linear-gradient(-42deg, #80D34D, #8DDE62, #80D34D);
    color: #247E00;
    width: 169px; 
}

/* Отклонённая заявка – оранжевый */
.application-status[data-status="rejected"] {
    background: linear-gradient(-42deg, #FF743D, #FF966C, #FF743D);
    color: #942F00;
    width: 129px;
}

.application-course {
    font-size: 16px; 
    font-weight: 400;
    color: #7A7A7A; 
    margin-bottom: 15px;
}

.application-message {
    font-size: 18px; 
    font-weight: 300;
    line-height: 1.4; 
    color: #000;
    margin-bottom: 10px;
}

.application-date {
    position: absolute; 
    bottom: 20px; 
    right: 20px;
    font-size: 16px; 
    font-weight: 400; 
    color: #7A7A7A;
}

/* Кружок удаления (общий для заявок и отзывов) */
.application-delete-btn {
    position: absolute;
    top: -19.5px; 
    right: -19.5px;
    width: 39px; 
    height: 39px;
    background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    border: none; 
    border-radius: 50%;
    cursor: pointer;
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: opacity 0.2s;
}
.application-delete-btn img { width: 15px; height: 15px; }
.application-delete-btn:hover { opacity: 0.8; }

/* Карточка отзыва */
.review-card {
    position: relative;
    width: 648px;
    background-color: #FCFCFC;
    border-radius: 10px;
    padding: 20px;
}

.review-card__header {
    display: flex; 
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.review-card__name { font-size: 20px; font-weight: 500; margin-bottom: 3px; }
.review-card__course { font-size: 16px; font-weight: 400; color: #7A7A7A; }

.review-card__stars {
    display: flex; 
    gap: 0;
    margin-top: 3px;
}

.star {
    display: block;
    width: 30px; 
    height: 30px;
    position: relative;
}
.star--active::before {
    content: '★';
    font-size: 30px; 
    line-height: 1;
    color: transparent;
    background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    -webkit-background-clip: text;
    background-clip: text;
}
.star:not(.star--active)::before {
    content: '★';
    font-size: 30px; 
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px #D90D26;
}

.review-card__text {
    font-size: 18px; 
    font-weight: 400;
    line-height: 1.4; 
    color: #000;
    margin-bottom: 20px;
}

.review-card__date {
    font-size: 16px; 
    font-weight: 400;
    color: #7A7A7A;
    display: block; 
    text-align: right;
    margin-top: 20px;
}

/* Профиль */
.profile-form { 
    margin-top: 30px;
    padding: 0;       
}

.profile-field {
    margin-bottom: 0;
}

.profile-field__label {
    display: block;
    font-size: 20px;
    font-weight: 400;
    color: #717171;
    margin-top: 30px;
    margin-bottom: 5px;
    text-align: left;
}

/* Убираем лишний верхний отступ у первой метки */
.profile-field:first-child .profile-field__label {
    margin-top: 0;
}

.profile-field__input {
    width: 100%;
    height: 64px;
    background-color: #FCFCFC;
    border: 1px solid #9B9B9B;
    border-radius: 10px;
    padding: 0 30px;           
    font-size: 20px;
    font-weight: 400;
    font-family: 'Montserrat', sans-serif;
    color: #000;               
    outline: none;
}

.profile-field__input::placeholder {
    color: #717171;             
}

/* Кнопки в низу формы */
.profile-form__actions {
    display: flex;
    justify-content: space-between;   
    align-items: center;
    margin-top: 30px;
    padding: 0;                    
}

/* кнопка Отменить */
.btn--cancel-profile {
    width: 154px;
    height: 56px;
    background-color: #e7e7e7;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    color: #000000;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn--cancel-profile:hover {
    opacity: 0.7;
}

/* Кнопка Сохранить */
.profile-save-btn {
    width: 161px;
    height: 56px;
    background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 500;
    color: #FCFCFC;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: opacity 0.2s;
}

.profile-save-btn:hover {
    opacity: 0.8;
}

/* Кнопка Отмена (уже в оверлеях) */
.btn--cancel {
    width: 187px; 
    height: 60px;
    background: transparent; 
    border: none; 
    border-radius: 10px;
    font-size: 18px; 
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    position: relative;
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    color: transparent;
    background-image: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    -webkit-background-clip: text;
    background-clip: text;
    transition: opacity 0.2s;
    z-index: 0;
}
.btn--cancel::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 1px;
    z-index: -1;
}
.btn--cancel:hover { opacity: 0.7; }

/* Кнопка Удалить / Выйти (основная) */
.btn--confirm-delete,
.btn--confirm-action {
    width: 193px; 
    height: 60px;
    background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    border: none; 
    border-radius: 10px;
    font-size: 18px; 
    color: #fcfcfc;
    cursor: pointer; 
    font-family: 'Montserrat', sans-serif;
    transition: opacity 0.2s;
}
.btn--confirm-delete:hover,
.btn--confirm-action:hover { opacity: 0.8; }

/* Оверлеи удаления / выхода */
.delete-overlay {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.2);
    justify-content: center; 
    align-items: center;
    z-index: 999;
}
.delete-overlay.active { display: flex; }

.delete-overlay__box {
    width: 600px; 
    min-height: 345px;
    background: #fff; 
    border-radius: 10px;
    padding: 50px; 
    text-align: center;
    display: flex; 
    flex-direction: column; 
    justify-content: center;
}

.delete-overlay__text {
    font-size: 25px; 
    font-weight: 500; 
    line-height: 1.3;
    margin-bottom: 40px;
}

.delete-overlay__buttons {
    display: flex; 
    gap: 30px; 
    justify-content: center;
}

/* Оверлей успеха */
.success-overlay {
    display: none; 
    position: fixed; 
    top: 0; left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.2);
    justify-content: center; 
    align-items: center;
    z-index: 1000;
}
.success-overlay.active { display: flex; }

.success-overlay__box {
    width: 720px; 
    height: 387px;
    background-color: #FCFCFC; 
    border-radius: 10px;
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    padding: 100px 0;
}

.success-overlay__icon {
    width: 120px; 
    height: 120px; 
    margin-bottom: 30px;
}

.success-overlay__text {
    font-size: 30px; 
    font-weight: 500; 
    color: #000;
    text-align: center; 
    line-height: 1.3;
}

/* ========================
   Оверлей формы отзыва
   ======================== */
.review-form-overlay {
    display: none; 
    position: fixed; 
    top: 0; left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.2);
    justify-content: center; 
    align-items: center;
    z-index: 999;
}
.review-form-overlay.active { display: flex; }

.review-form-container {
    width: 1200px;
    height: 640px;
    background-color: #F0F0F0;
    border-radius: 10px;
    padding: 46px 0 0 40px;
    position: relative;
    display: flex; 
    flex-direction: column; 
    gap: 30px;
}

.review-form-row {
    display: flex; 
    align-items: center;
}

.review-form-label {
    
    font-size: 22px; 
    font-weight: 400;
    color: #000;
    text-align: left;
    margin-right: 15px;
}

.review-form-input {
    width: 841px; 
    height: 52px;
    background-color: #FCFCFC;
    border: 1px solid #9B9B9B;
    border-radius: 10px;
    padding: 15px;
    font-size: 20px; 
    font-weight: 400;
    color: #000;
    outline: none;
    font-family: 'Montserrat', sans-serif;
}
.review-form-input::placeholder {
    color: #717171;
}

.review-form-textarea {
    width: 1120px; 
    height: 150px;
    background-color: #FCFCFC;
    border: 1px solid #9B9B9B;
    border-radius: 10px;
    padding: 15px;
    font-size: 20px; 
    font-weight: 400;
    color: #000;
    outline: none;
    font-family: 'Montserrat', sans-serif;
    resize: none;
}
.review-form-textarea::placeholder {
    color: #717171;
}

/* Кастомный селект формы отзыва */
.review-custom-select {
    position: relative;
    width: 835px;
}

.review-custom-select--grade {
    width: 276px;
}

.review-custom-select__native {
    position: absolute; 
    opacity: 0; 
    pointer-events: none;
}

.review-custom-select__trigger {
    width: 100%; 
    height: 52px;
    background-color: #FCFCFC;
    border: 1px solid #9B9B9B;
    border-radius: 10px;
    padding: 0 10px 0 15px;
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    cursor: pointer;
    font-size: 20px; 
    font-weight: 400;
    font-family: 'Montserrat', sans-serif;
    color: #000;
}

.review-custom-select__selected.placeholder {
    color: #717171;
}

.review-custom-select__arrow {
    width: 20px; 
    height: 12px;
    margin-right: 15px;
    transition: transform 0.3s;
}

.review-custom-select.open .review-custom-select__arrow {
    transform: rotate(180deg);
}

.review-custom-select__options {
    position: absolute; 
    top: 100%; left: 0; 
    width: 100%;
    background: #FFFFFF;
    border-radius: 10px;
    list-style: none; 
    padding: 0; 
    margin: 0;
    display: none; 
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    max-height: 200px; 
    overflow-y: auto;
}

.review-custom-select.open .review-custom-select__options { display: block; }

.review-custom-select__options li {
    padding: 12px 15px;
    font-size: 20px;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
}
.review-custom-select__options li:hover { background-color: #F0F0F0; }

/* Кнопка Добавить отзыв */
.review-submit-btn {
    width: 210px; 
    height: 60px;
    background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    border: none; 
    border-radius: 10px;
    font-size: 20px; 
    font-weight: 400;
    color: #FCFCFC; 
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    align-self: flex-end;
    margin-right: 40px;
    margin-bottom: 40px;
    transition: opacity 0.2s;
}
.review-submit-btn:hover { opacity: 0.9; }

/* Кнопка закрытия в форме отзыва */
.review-form-container .form-container__close {
    position: absolute; 
    background: none; 
    border: none;
    cursor: pointer; 
    padding: 0;
}
.review-form-container .form-container__close img {
    width: 24px; 
    height: 24px;
}

.floating-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #24486B;
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 18px;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Ошибки в форме отзыва */
.review-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Красная обводка */
.review-form-input.error,
.review-form-textarea.error,
.review-custom-select__trigger.error {
    border-color: #D90D26 !important;
}

/* Ошибка внутри поля */
.review-input-wrapper .field-error-text {
    position: absolute;
    right: 260px;
    bottom: 7px;
    display: block !important;         
    color: #D90D26;
    font-size: 12px;
    padding: 0 4px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 2;
}

/* Ошибка под селектом */
.review-custom-select .field-error-text {
    position: absolute;
    bottom: -18px;
    right: 0;
    display: block !important;          
    color: #D90D26;
    font-size: 12px;
    white-space: nowrap;
}

/* Специальная ошибка для textarea – под полем, прижата к правому краю */
.review-input-wrapper .field-error-text.field-error-text--textarea {
    position: absolute;
    right: 50px;
    bottom: 12px;
    white-space: nowrap;
}

.cards-wrapper--loading {
    opacity: 0;
    transition: opacity 0.15s;
}

/* ========================
   Растягивание правой панели по высоте левой
   ======================== */
.account-layout {
    align-items: stretch;
}

/* ========================
   Оверлей заполнения договора
   ======================== */
.add-course-box {
    width: 862px;
    max-height: 80vh;
    overflow-y: auto;
    background-color: #F0F0F0;
    border-radius: 10px;
    padding: 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    font-family: 'Montserrat', sans-serif;
    margin: auto;
}

.add-course-title {
    text-align: center;
    font-size: 25px;
    font-weight: 500;
    margin-bottom: 30px;
}

.add-course-input {
    width: 100%;
    height: 52px;
    background-color: #FCFCFC;
    border: 1px solid #9B9B9B;
    border-radius: 10px;
    padding: 0 15px;
    font-size: 18px;
    font-family: 'Montserrat', sans-serif;
    color: #000;
    outline: none;
    margin-bottom: 15px;
}
.add-course-input::placeholder {
    color: #717171;
}

.app-detail-label {
    font-size: 20px;
    font-weight: 400;
    color: #000;
    white-space: nowrap;
    margin-bottom: 5px;
}

.app-detail-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}

/* Обёртка поля ввода для позиционирования ошибки */
.add-course-input-wrapper {
    position: relative;     
    height: 52px;  
    width: 100%;           
    overflow: visible; 
}

/* Текст ошибки внутри поля ввода (справа снизу) */
.add-course-input-wrapper .field-error-text {
    position: absolute;
    display: inline-block;
    right: 5px;
    bottom: 5px;
    font-size: 12px;
    color: #E53935;
    line-height: 1;
    pointer-events: none;
    white-space: nowrap;
    z-index: 5;                    
    padding: 0 4px;
    border-radius: 3px;
}

/* Ошибка поля */
.add-course-input.error {
  border-color: #E53935 !important;
  color: #E53935;
}

/* Кастомный скроллбар для оверлея договора */
.add-course-box::-webkit-scrollbar {
    width: 7px;
}
.add-course-box::-webkit-scrollbar-track {
    background: #E2E2E2;
    border-radius: 2px;
}
.add-course-box::-webkit-scrollbar-thumb {
    background: #C5C5C5;
    border-radius: 2px;
}

/* ========================
   Новая карточка договора (исправленная)
   ======================== */

.agreement-card {
    background: #fcfcfc;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: visible;
    position: relative;
}

/* Первая строка: курс и ФИО */
.agreement-card__row {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.agreement-card__info--course {
    flex: 2;
    min-width: 220px;
    position: relative;
}

.agreement-card__info--fio {
    flex: 1;
    min-width: 150px;
}

.agreement-card__label {
    display: block;
    font-size: 14px;
    color: #8A8A8A;
    margin-bottom: 8px;
}

.agreement-card__value {
    font-size: 16px;
    font-weight: 500;
    color: #1E1E1E;
    word-break: break-word;
}

/* Строка статуса */
.agreement-card__status-row {
    margin-bottom: 20px;
}
.agreement-card__status-row .agreement-card__info {
    flex: none;
    width: auto;
}

/* Блок кнопок договора */
.agreement-card__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 20px;
}

.agreement-card__actions-left {
    display: flex;
    gap: 15px;
}

.agreement-card__actions-right {
    display: flex;
    gap: 15px;
}

/* Кнопки внутри карточки */
.btn--fill-agreement,
.btn--view-agreement,
.btn--edit-agreement,
.btn--doc-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
    line-height: 1;
}

.btn--view-agreement,
.btn--doc-preview {
    background: transparent;
    border: 2px solid #D90D26;
    color: #D90D26;
}

.btn--fill-agreement,
.btn--edit-agreement {
    background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    border: none;
    color: #fff;
}

.btn--fill-agreement:hover,
.btn--view-agreement:hover,
.btn--edit-agreement:hover,
.btn--doc-preview:hover {
    opacity: 0.85;
}

/* Блок кнопок документов (Паспорт, СНИЛС, Справка, Памятка) */
.agreement-card__docs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 10px;
}

.agreement-card__docs-left {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.agreement-card__docs-right {
    margin-left: auto;
}

/* ========== Кастомный селект для договора (уникальные классы) ========== */
.custom-select-doc {
    position: relative;
    width: 100%;
    z-index: 5;
}

.custom-select-doc__native {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.custom-select-doc__trigger {
    width: 100%;
    height: 44px;
    background-color: #FCFCFC;
    border: 1.5px solid #9B9B9B;
    border-radius: 8px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    color: #000;
}

.custom-select-doc__selected {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-doc__selected.placeholder {
    color: #aaa;
}

.custom-select-doc__arrow {
    width: 12px;
    height: 12px;
    transition: transform 0.2s;
}

.custom-select-doc.open .custom-select-doc__arrow {
    transform: rotate(180deg);
}

.custom-select-doc__options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #FFFFFF;
    border-radius: 8px;
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
}

.custom-select-doc.open .custom-select-doc__options {
    display: block;
}

.custom-select-doc__options li {
    padding: 10px 12px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    white-space: normal;
    word-break: break-word;
}

.custom-select-doc__options li:hover {
    background-color: #F0F0F0;
}

/* Кнопки загрузки документов (под карточкой) */
.btn--upload-doc {
    background: transparent;
    border: 2px solid #D90D26;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #D90D26;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: 'Montserrat', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
}
.btn--upload-doc:hover {
    opacity: 0.7;
}
.btn--upload-doc.btn--uploaded {
    border-color: #c2c2c2;
    color: #c2c2c2;
    cursor: default;
}

/* Кнопка "Памятка" */
.btn--memory {
    background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: 'Montserrat', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
}
.btn--memory:hover {
    opacity: 0.85;
}

.memory-btn-wrapper {
    text-align: right;
    margin-top: 20px;
}

.upload-buttons-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.toggle-replies-btn {
    background: transparent;
    border: 2px solid #D90D26;
    border-radius: 10px;
    color: #D90D26;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    padding: 8px 16px;
    margin-top: 10px;
    text-decoration: none;
    transition: opacity 0.2s;
    display: inline-block;
}

.toggle-replies-btn:hover {
    opacity: 0.7;
}
.application-replies {
    margin-top: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}
.reply-item {
    border-bottom: 1px solid #eee;
    padding: 8px 0;
}
.reply-message { font-size: 14px; margin-bottom: 4px; }
.reply-date { font-size: 12px; color: #888; }

/* ========================
   Адаптивность (мобильная версия)
   ======================== */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    body {
        overflow-x: visible;
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
    }

    .container {
        max-width: 100%;
        padding: 0 16px;
        margin: 0 auto;
        overflow-x: hidden;
    }

    .account-main {
        margin-top: 83px;
        margin-bottom: 40px;
    }

    .breadcrumbs {
        font-size: 12px;
        margin-top: 0;
        margin-bottom: 30px;
    }

    .account-hero__title {
        font-size: 30px;
        margin-bottom: 15px;
    }

    /* Мобильный триггер */
    .sidebar-toggle-mobile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: auto;
        max-width: 110px;
        margin-left: -16px;
        margin-right: 0;
        background-color: #fcfcfc;
        padding: 10px 16px 10px 16px;
        border-radius: 0 12px 12px 0;
        cursor: pointer;
        margin-bottom: 20px;
        box-sizing: border-box;
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
    }
    .sidebar-toggle-mobile__text {
        font-size: 16px;
        font-weight: 500;
        color: #000;
        margin-right: 12px;
    }
    .sidebar-toggle-mobile__arrow {
        width: 20px;
        height: 20px;
        transform: rotate(-90deg);
    }

    /* ===== Левая боковая панель (мобильная) ===== */
    .account-sidebar {
        position: fixed;
        top: 83px;
        left: -100%;
        width: calc(100% - 16px);
        max-width: 328px;
        height: auto;
        min-height: calc(100% - 150px);
        background-color: #f5f5f5;
        z-index: 1000;
        transition: left 0.3s ease;
        padding: 30px 0 0 0;
        border-radius: 0 16px 16px 0;
        box-shadow: 4px 0 12px rgba(0,0,0,0.1);
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
    .account-sidebar.mobile-open {
        left: 0;
    }
    .sidebar-avatar {
        width: 95px;
        height: 95px;
        margin: 0 auto 15px;
    }
    .sidebar-name {
        font-size: 18px;
        font-weight: 500;
        margin-bottom: 30px;
        text-align: center;
    }
    .sidebar-menu {
        margin-bottom: 40px;
        padding: 0;
    }
    .sidebar-menu__item {
        height: auto;
        min-height: 50px;
        margin-bottom: 0;
        background-color: transparent;
    }
    .sidebar-menu__item.active {
        background-color: #E7E7E7;
    }
    .sidebar-indicator {
        left: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
        border-radius: 0 2px 2px 0;
    }
    .sidebar-menu__item.active .sidebar-indicator {
        display: block;
    }
    .sidebar-link {
        padding: 14px 0 14px 30px;
        font-size: 16px;
        font-weight: 400;
    }
    .sidebar-actions {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
        padding: 0 20px;
        margin-bottom: 30px;   
        margin-top: 0;         
        flex-wrap: wrap;
    }
    .btn--delete-account {
        width: 167px;
        height: 50px;
        font-size: 16px;
        font-weight: 400;
        background-color: #E7E7E7;
        margin: 0;
    }
    .btn--logout {
        width: 85px;
        height: 50px;
        font-size: 16px;
        font-weight: 500;
        margin: 0;
    }

    /* ===== Правая контентная область ===== */
    .account-layout {
        flex-direction: column;
        gap: 0;
        margin-bottom: 60px;
    }
    .account-content {
        width: 100%;
        min-height: 300px;
        background-color: #f3f3f3;
        border-radius: 10px;
        padding: 0;                
        overflow: visible;
    }
    .content-panel.active {
        width: 100%;
        padding: 15px;            
    }
    /* Заголовок панели */
    .content-header {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        margin-bottom: 15px;
        padding: 0;                
    }
    .content-title {
        font-size: 16px;
        font-weight: 500;
        margin: 0;
    }
    .content-add-btn {
        padding: 0;
        margin-left: 10px;             
        display: flex;
        background: none;
        border: none;
        cursor: pointer;
    }
    .content-add-icon {
        width: 15px;
        height: 15px;
        transform: rotate(45deg);
    }

    /* Карточки заявок и отзывов */
    .cards-wrapper {
        overflow: visible;
    }

    .application-card,
    .review-card {
        width: 100%;
        max-width: 328px;
        margin: 0 auto 20px auto;  
        background-color: #FCFCFC;
        border-radius: 10px;
        padding: 15px;
        position: relative;
        min-height: auto;
        overflow: visible;          
    }
    .application-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 4px;
    }
    .application-number {
        font-size: 16px;
        font-weight: 400;
        margin: 0;
    }
    .application-status {
        width: 97px;
        height: 25px;
        padding: 5px 10px;
        font-size: 12px;
        font-weight: 400;
        border-radius: 6px;
        display: inline-block;
        background: linear-gradient(-42deg, #FFBB3D, #FFC96C, #FFBB3D);
        color: #946000;
        text-align: center;
        white-space: nowrap;   
        margin-top: -5px;     
    }
    .application-status[data-status="confirmed"] {
        background: linear-gradient(-42deg, #80D34D, #8DDE62, #80D34D);
        color: #247E00;
        width: 113px;
    }
    .application-status[data-status="rejected"] {
        background: linear-gradient(-42deg, #FF743D, #FF966C, #FF743D);
        color: #942F00;
        width: 86px;
    }
    .application-course {
        max-width: 167px;
        font-size: 12px;
        font-weight: 400;
        color: #7A7A7A;
        margin-bottom: 15px;
    }
    .application-message {
        font-size: 12px;
        font-weight: 400;
        line-height: 1.4;
        margin-bottom: 15px;
    }
    .application-date {
        display: block;
        text-align: right;
        font-size: 12px;
        font-weight: 400;
        color: #7A7A7A;
        margin-top: 10px;
    }
    .application-delete-btn {
        position: absolute;
        top: -12px;
        right: -12px;
        width: 25px;
        height: 25px;
        background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
        border: none;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
    }
    .application-delete-btn img {
        width: 12px;
        height: 12px;
    }

    /* Карточка отзыва */
    .review-card__header {
        margin-bottom: 10px;
    }
    .review-card__name {
        font-size: 16px;
        font-weight: 400;
        margin-bottom: 4px;
    }
    .review-card__course {
        font-size: 12px;
        font-weight: 400;
        color: #7A7A7A;
    }
    .review-card__stars {
        position: absolute;
        top: 7px;
        right: 15px;
        gap: 0;
    }
    .star {
        width: 20px;
        height: 20px;
    }
    .star::before {
        font-size: 20px;
    }

    .review-card .star:not(.star--active) {
        width: 18px;
        height: 18px;
        padding-left: 1.5px;
    }
    .review-card .star:not(.star--active)::before {
        font-size: 18px;
        line-height: 1.1;
    }

    .review-card__text {
        font-size: 12px;
        font-weight: 400;
        line-height: 1.4;
        margin-bottom: 10px;
    }
    .review-card__date {
        font-size: 12px;
        font-weight: 400;
        color: #7A7A7A;
        text-align: right;
        margin-top: 10px;
    }

    /* Форма профиля */
    .profile-field__label {
        font-size: 16px;
        font-weight: 400;
        color: #717171;
        margin-top: 20px;
        margin-bottom: 5px;
    }
    .profile-field__input {
        height: 48px;
        font-size: 14px;
        padding: 0 15px;
    }
    .profile-form__actions {
        flex-direction: row;
        justify-content: space-between;
        margin-top: 30px;
        gap: 15px;
    }
    .btn--cancel-profile {
        width: 103px;
        height: 47px;
        font-size: 14px;
        font-weight: 500;
        margin: 0;
    }
    .profile-save-btn {
        width: 109px;
        height: 47px;
        font-size: 14px;
        font-weight: 500;
        margin: 0;
    }

    /* Раздел Документы */
    .agreement-card {
        padding: 15px;
        overflow: visible;
    }
    .agreement-card__row {
        flex-direction: column;
        gap: 15px;
    }

    .agreement-card__info--course {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }
    .custom-select-doc {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }
    .custom-select-doc__trigger {
        height: auto;
        min-height: 44px;
        padding: 10px 12px;
        font-size: 14px;
        white-space: normal;
        word-break: break-word;
        line-height: 1.3;
    }
    .custom-select-doc__selected {
        white-space: normal;
        word-break: break-word;
    }

    .custom-select-doc__options {
        max-height: 250px;
    }
    .custom-select-doc__options li {
        padding: 10px 12px;
        font-size: 14px;
        white-space: normal;
        word-break: break-word;
        line-height: 1.3;
    }
    .agreement-card__value {
        font-size: 14px;
    }
    .agreement-card__actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
    }
    .agreement-card__actions-left,
    .agreement-card__actions-right {
        display: flex;
        gap: 10px;
    }
    .btn--edit-agreement,
    .btn--view-agreement {
        width: auto;
        padding: 0 16px;
        height: 44px;
        font-size: 14px;
    }

    .no-docs-message {
        font-size: 14px;
        color: #999;
        text-align: center;
        width: 100%;
        font-weight: 400;
        font-family: 'Montserrat', sans-serif;
    }

    /* Разделитель перед кнопкой "Памятка" */
    .agreement-card__docs {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        border-top: 1px solid #eee;
        padding-top: 15px;
        margin-top: 15px;
    }
    .agreement-card__docs-left {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .agreement-card__docs-right {
        width: 268px;
        text-align: right;
        gap: 15px;
        border-top: 1px solid #eee;
        padding-top: 15px;
        margin-top: 15px;
    }
    .btn--doc-preview {
        height: 44px;
        font-size: 14px;
        padding: 0 16px;
    }
    /* Кнопки загрузки сканов */
    .upload-buttons-row {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
    }
    .btn--upload-doc {
        width: 100%;
        height: 44px;
        font-size: 14px;
        padding: 0 16px;
        justify-content: center;
        flex: none;
    }

    /* Оверлей удаления, выхода */
    .delete-overlay__box {
        width: 328px;
        min-height: 150px;
        padding: 30px 20px;
    }
    .delete-overlay__text {
        font-size: 18px;
        margin-bottom: 25px;
    }
    .delete-overlay__buttons {
        gap: 15px;
    }
    .btn--cancel,
    .btn--confirm-delete,
    .btn--confirm-action {
        width: 140px;
        height: 48px;
        font-size: 16px;
    }

    /* Оверлей формы отзыва */
    .review-form-container {
        width: 328px;
        height: 490px;          
        padding: 20px 15px 25px 15px;
        background-color: #F0F0F0;
        border-radius: 16px;
        overflow-y: auto;
        overflow-x: hidden;       
        position: relative;
    }
    .review-form-container .form-container__close {
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .review-form-container .form-container__close img {
        width: 15px;
        height: 15px;
        display: block;
    }
    .review-form-container .review-overlay__text {
        font-size: 18px;
        font-weight: 500;
        text-align: center;
        margin-top: 10px;  
        margin-bottom: -10px;      
    }

    /* Поле "Имя" и "Курс" */
    .review-form-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: -10px;        
    }
    .review-form-label {
        font-size: 16px;
        font-weight: 400;
        color: #000;
        margin: 0;
        width: auto;
        flex-shrink: 0;
    }
    .review-input-wrapper {
        width: 249px;              
        max-width: 249px;
        position: relative;
    }
    .review-form-input {
        width: 100%;
        height: 37px;
        font-size: 14px;
        font-weight: 400;
        padding: 10px 15px;
        background-color: #FCFCFC;
        border: 1px solid #9B9B9B;
        border-radius: 10px;
        outline: none;
        font-family: 'Montserrat', sans-serif;
        color: #000;
        box-sizing: border-box;
    }
    .review-form-input::placeholder {
        color: #717171;
    }

    /* Выпадающий список "Курс" */
    .review-custom-select {
        width: 249px;              
        max-width: 249px;
        position: relative;
    }
    .review-custom-select__trigger {
        width: 100%;
        height: 43px;
        line-height: 1.1;
        font-size: 14px;
        font-weight: 400;
        background-color: #FCFCFC;
        border: 1px solid #9B9B9B;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        color: #000;
        font-family: 'Montserrat', sans-serif;
        padding: 0 15px;
    }
    .review-custom-select__selected.placeholder {
        color: #717171;
    }
    .review-custom-select__arrow {
        width: 12px;
        height: 12px;
        margin: 0;
        transition: transform 0.3s;
    }
    .review-custom-select.open .review-custom-select__arrow {
        transform: rotate(180deg);
    }
    /* Перенос текста в селекте курса */
    .review-custom-select__selected {
        width: 190px;
    }
    .review-custom-select__options {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #FFFFFF;
        border-radius: 10px;
        list-style: none;
        display: none;
        z-index: 10;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        max-height: 200px;
        overflow-y: auto;
    }
    .review-custom-select.open .review-custom-select__options {
        display: block;
    }
    .review-custom-select__options li {
        padding: 10px 15px;
        font-size: 14px;
        cursor: pointer;
        font-family: 'Montserrat', sans-serif;
    }
    .review-custom-select__options li:hover {
        background-color: #F0F0F0;
    }

    /* Поле "Отзыв" (textarea) */
    .review-form-textarea-label {
        font-size: 16px;
        font-weight: 400;
        color: #000;      
        display: block;
    }
    .review-form-textarea {
        width: 298px;             
        height: 100px;
        font-size: 14px;
        font-weight: 400;
        padding: 10px 15px;
        background-color: #FCFCFC;
        border: 1px solid #9B9B9B;
        border-radius: 10px;
        resize: none;
        outline: none;
        font-family: 'Montserrat', sans-serif;
        color: #000;
        box-sizing: border-box;
        margin-bottom: -10px;
        margin-top: -12px;      
    }
    .review-form-textarea::placeholder {
        color: #717171;
    }

    /* Выпадающий список "Оценка" */
    .review-custom-select--grade {
        width: 220px;               
        max-width: 220px;
        margin-bottom: 0;       
    }

    /* Уменьшаем высоту выпадающего списка для оценки */
    .review-custom-select--grade .review-custom-select__options {
        max-height: 80px;
    }

    /* Кнопка Добавить */
    .review-submit-btn {
        width: 131px;
        height: 47px;
        font-size: 14px;
        font-weight: 500;
        font-family: 'Montserrat', sans-serif;
        background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
        border: none;
        border-radius: 10px;
        color: #FCFCFC;
        cursor: pointer;
        display: block;
        margin: 10px 0 0 auto;     
        text-align: center;
        line-height: 47px;
        transition: opacity 0.2s;
    }

    .review-submit-btn:hover {
        opacity: 1;
    }

    /* Ошибки в форме отзыва */
    .review-input-wrapper .field-error-text {
        position: absolute;
        right: 8px;
        bottom: 4px;
        font-size: 9px;
        color: #D90D26;
        white-space: nowrap;
        background: transparent;
        padding: 0 2px;
        pointer-events: none;
    }
    .review-custom-select .field-error-text {
        position: absolute;
        bottom: -16px;
        right: 0;
        font-size: 9px;
        color: #D90D26;
        white-space: nowrap;
    }
    .review-form-textarea.error ~ .field-error-text {
        bottom: 0;
        right: 0;
        margin: 0;
        margin-right: -40px;
    }

    /* Оверлей договора */
    .add-course-box {
        width: 328px;
        max-width: 328px;
        max-height: 85vh;
        overflow-y: auto;
        overflow-x: visible;            
        background-color: #F0F0F0;
        border-radius: 16px;
        padding: 20px 15px 25px 15px;
        position: relative;
        margin: auto;
    }
    .add-course-box .form-container__close {
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .add-course-box .form-container__close img {
        width: 15px;
        height: 15px;
        display: block;
    }
    .add-course-title {
        font-size: 18px;
        font-weight: 500;
        text-align: center;
        margin: 10px 0 20px 0;
    }
    .app-detail-row {
        margin-bottom: 0;
    }
    .app-detail-label {
        font-size: 14px;
        font-weight: 400;
        color: #000;
        margin-bottom: 2px;
        display: block;
        white-space: normal;
    }
    .add-course-input-wrapper {
        width: 100%;
        position: relative;
    }
    .add-course-input {
        width: 100%;
        height: 37px;
        font-size: 14px;
        font-weight: 400;
        padding: 0 15px;
        background-color: #FCFCFC;
        border: 1px solid #9B9B9B;
        border-radius: 10px;
        outline: none;
        font-family: 'Montserrat', sans-serif;
        color: #000;
        box-sizing: border-box;
        margin-bottom: 0;
    }
    .add-course-input::placeholder {
        color: #717171;
    }
    .add-course-save-btn {
        width: 201px !important;
        height: 47px !important;
        font-size: 14px !important;
        font-weight: 500;
        font-family: 'Montserrat', sans-serif;
        background: linear-gradient(-41deg, #D90D26, #E94055, #D90D26);
        border: none;
        border-radius: 10px;
        color: #FCFCFC;
        cursor: pointer;
        display: block;
        margin: 20px 0 0 auto;
        text-align: center;
        line-height: 47px;
        padding: 0 16px;
        margin-top: -10px;
    }

    .add-course-save-btn:hover {
        opacity: 1;
    }

    /* Ошибки в форме договора */
    .add-course-input.error {
        border-color: #D90D26;
    }
    .add-course-input-wrapper .field-error-text {
        position: absolute;
        right: 8px;
        bottom: 18px;
        font-size: 9px;
        color: #D90D26;
        white-space: nowrap;
        pointer-events: none;
    }

    /* Полоса прокрутки */
    .add-course-box::-webkit-scrollbar {
        display: none;
    }

    /* Оверлеи успеха */
    .success-overlay__box {
        width: 300px;
        padding: 30px 20px;
    }
    .success-overlay__icon {
        width: 60px;
        height: 60px;
    }
    .success-overlay__text {
        font-size: 16px;
        line-height: 1.4;
    }

    /* Повышаем z-index оверлеев, чтобы они были над сайдбаром */
    .delete-overlay,
    .success-overlay,
    .review-form-overlay,
    .add-course-box {
        z-index: 1002 !important;
    }
}