/* ============================================================
   МИНИМАЛИСТИЧНЫЙ СТИЛЬ для модуля обратной связи
   Полная изоляция через .mod-back-container
   ============================================================ */

.mod-back-container,
.mod-back-container *,
.mod-back-container *::before,
.mod-back-container *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.mod-back-container {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    color: #0f172a;
    --mod-back-primary: #2563eb;
    --mod-back-primary-dark: #1d4ed8;
}

/* ----- КНОПКА ОТКРЫТИЯ ----- */
.mod-back-container .mod-back-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 2.4rem;
    border: none;
    border-radius: 3rem;
    font-weight: 700;
    font-size: 1.1rem;
    background: var(--mod-back-primary);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}
.mod-back-container .mod-back-open-btn:hover {
    background: var(--mod-back-primary-dark);
}
.mod-back-container .mod-back-open-btn img {
    height: 20px;
    width: 20px;
    filter: brightness(0) invert(1);
}

/* ----- МОДАЛЬНОЕ ОКНО ----- */
.mod-back-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    align-items: center;
    justify-content: center;
    z-index: 9999999 !important;
    padding: 1rem;
}
.mod-back-overlay.show { display: flex; }

.mod-back-modal {
    background: #fff;
    width: 820px;
    max-width: 100%;
    height: 700px;
    max-height: 92vh;
    border-radius: 2rem;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.mod-back-modal-header {
    padding: 1rem 1.8rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #fafbfc;
}
.mod-back-modal-header span {
    font-size: 1.1rem;
    font-weight: 600;
}
.mod-back-modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #94a3b8;
    padding: 0 0.2rem;
    transition: color 0.15s;
}
.mod-back-modal-close:hover { color: #ef4444; }

.mod-back-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    min-height: 0;
}

.mod-back-modal-body .mod-back-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* ----- НАЧАЛЬНЫЙ ЭКРАН (компактный, не растягивается) ----- */
.mod-back-initial {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    /* flex: 1 убран, чтобы не занимать всё свободное место */
}
.mod-back-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.mod-back-write-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 2rem;
    border: none;
    border-radius: 3rem;
    font-weight: 600;
    font-size: 1rem;
    background: var(--mod-back-primary);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}
.mod-back-write-btn:hover { background: var(--mod-back-primary-dark); }
.mod-back-write-btn svg {
    height: 18px;
    width: 18px;
    stroke: currentColor;
    fill: none;
}

.mod-back-account-link {
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--mod-back-primary);
    cursor: pointer;
    padding: 0.3rem 0;
    border-bottom: 1px dashed var(--mod-back-primary);
    transition: color 0.15s;
}
.mod-back-account-link:hover { color: var(--mod-back-primary-dark); }

/* ----- ПОИСК ----- */
.mod-back-search-box {
    position: relative;
    margin-bottom: 1.5rem;
}
.mod-back-search-box input {
    width: 100%;
    padding: 0.7rem 3.5rem 0.7rem 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 3rem;
    font-size: 1rem;
    background: #fafbfc;
    transition: border-color 0.15s;
    outline: none;
}
.mod-back-search-box input:focus {
    border-color: var(--mod-back-primary);
}
.mod-back-search-box .mod-back-search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: var(--mod-back-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.mod-back-search-box .mod-back-search-btn:hover {
    background: var(--mod-back-primary-dark);
}
.mod-back-search-box .mod-back-search-btn::before {
    content: '🔍';
    font-size: 1.1rem;
    line-height: 1;
}

/* ----- ССЫЛКИ ----- */
.mod-back-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.mod-back-links button {
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--mod-back-primary);
    cursor: pointer;
    padding: 0.2rem 0;
    border-bottom: 1px dashed var(--mod-back-primary);
    transition: color 0.15s;
}
.mod-back-links button:hover { color: var(--mod-back-primary-dark); }

/* ----- ФОРМА (вкладки) ----- */
.mod-back-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 0%;
    min-height: 0;
    background: #fff;
}

/* Вкладки */
.mod-back-tabs-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
    background: #fafbfc;
    flex-shrink: 0;
    border-bottom: 1px solid #e2e8f0;
}
.mod-back-tabs-container {
    position: relative;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mod-back-tabs-container::-webkit-scrollbar {
    display: none;
}
.mod-back-tabs {
    display: flex;
    gap: 0.2rem;
    padding: 0.4rem 0.8rem 0;
    white-space: nowrap;
}
.mod-back-tab {
    position: relative;
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 0.5rem 0.5rem 0 0;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
    z-index: 2;
}
.mod-back-tab.active {
    color: var(--mod-back-primary);
    background: #eff6ff;
}
.mod-back-tab:not(.active):hover {
    color: #475569;
    background: #f1f5f9;
}
.mod-back-tab:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.mod-back-tab-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--mod-back-primary);
    transition: left 0.3s ease, width 0.3s ease;
    z-index: 3;
    pointer-events: none;
}

.mod-back-tab-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(250, 251, 252, 0.85);
    border: none;
    cursor: pointer;
    z-index: 4;
    font-size: 1.2rem;
    color: #475569;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, background 0.2s;
}
.mod-back-tab-arrow.visible {
    opacity: 1;
    pointer-events: auto;
}
.mod-back-tab-arrow:hover {
    background: rgba(241, 245, 249, 0.95);
    color: var(--mod-back-primary);
}
.mod-back-tab-arrow-left {
    left: 0;
    border-radius: 0 0.5rem 0 0;
}
.mod-back-tab-arrow-right {
    right: 0;
    border-radius: 0.5rem 0 0 0;
}

.mod-back-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1.8rem;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.mod-back-tab-panel {
    display: none;
}
.mod-back-tab-panel.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Вкладка Адресат — особая, чтобы список занимал всю высоту */
.mod-back-tab-panel.mod-back-tab-addressee.active {
    display: flex;
    flex-direction: column;
}

.mod-back-message-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.mod-back-message-field textarea {
    flex: 1;
    min-height: 120px;
    resize: vertical;
}

.mod-back-tab-footer {
    flex-shrink: 0;
    padding: 0.8rem 1.8rem;
    border-top: 1px solid #e2e8f0;
    background: #fafbfc;
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
}

/* ----- КАРТОЧКИ ----- */
.mod-back-card {
    border: 2px dashed var(--mod-back-primary);
    border-radius: 1.5rem;
    padding: 0.8rem 1.2rem;
    margin-bottom: 1rem;
    background: rgba(255,255,255,0.3);
}
.mod-back-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}
.mod-back-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--mod-back-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    flex-shrink: 0;
    transition: background-color 0.2s;
}
.mod-back-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Закруглённые строки внутри карточек */
.mod-back-card .mod-back-form-row {
    gap: 0.6rem;
    margin-bottom: 0.3rem;
}
.mod-back-card .mod-back-form-row .mod-back-field {
    margin-bottom: 0;
}

.mod-back-coauthor-card {
    border-left: 4px solid var(--mod-back-primary);
    margin-top: 0.6rem;
}

/* ----- ПОЛЯ ВВОДА ----- */
.mod-back-form-row {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.mod-back-form-row .mod-back-field {
    flex: 1 1 160px;
}
.mod-back-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.6rem;
}
.mod-back-field label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #475569;
}
.mod-back-field .required {
    color: #ef4444;
    margin-left: 2px;
}
.mod-back-field input:not([type="checkbox"]),
.mod-back-field textarea {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 2rem!important;
    font-size: 0.95rem;
    background: #fafbfc;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    appearance: none;
    font-family: inherit;
}
.mod-back-field input:focus,
.mod-back-field textarea:focus {
    border-color: var(--mod-back-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.mod-back-field textarea {
    border-radius: 1.5rem;
    resize: vertical;
    min-height: 70px;
}
.mod-back-field select {
    display: none;
}

/* ----- КАСТОМНЫЕ СЕЛЕКТЫ ----- */
.mod-back-container .custom-select {
    position: relative;
    width: 100%;
    user-select: none;
}
.mod-back-container .custom-select .selected {
    display: flex;
    align-items: center;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 2rem;
    background: #fafbfc;
    font-size: 0.95rem;
    color: #0f172a;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7a8f' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 14px;
}
.mod-back-container .custom-select.open .selected {
    border-radius: 1rem 1rem 0 0;
    border-bottom-color: transparent;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    border-color: var(--mod-back-primary);
}
.mod-back-container .custom-select .options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--mod-back-primary);
    border-top: none;
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
    z-index: 10;
}
.mod-back-container .custom-select.open .options {
    max-height: 220px;
    opacity: 1;
}
.mod-back-container .custom-select .options-scroll {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.3rem 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.mod-back-container .custom-select .options-scroll::-webkit-scrollbar {
    width: 3px;
}
.mod-back-container .custom-select .options-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.mod-back-container .custom-select .options-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 20px;
}
.mod-back-container .custom-select ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mod-back-container .custom-select li {
    padding: 0.45rem 1rem;
    cursor: pointer;
    color: #0f172a;
    font-size: 0.9rem;
    transition: background 0.15s;
}
.mod-back-container .custom-select li:hover {
    background: #eff6ff;
    color: var(--mod-back-primary);
}
.mod-back-container .custom-select li.selected-item {
    font-weight: 600;
    color: var(--mod-back-primary);
    background: #f0f7ff;
}

/* ----- РАЗВЁРНУТЫЙ СПИСОК ДОЛЖНОСТНЫХ ЛИЦ ----- */
.mod-back-official-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 0;
}
.mod-back-official-list-container {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #fafbfc;
    margin-top: 0.2rem;
    min-height: 100px;
}
.mod-back-official-list {
    list-style: none;
    padding: 0.5rem;
    margin: 0;
}
.mod-back-official-placeholder {
    padding: 0.5rem 1rem;
    color: #94a3b8;
    font-style: italic;
    font-size: 0.9rem;
}
.mod-back-official-item {
    padding: 0.6rem 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s;
    margin-bottom: 0.2rem;
}
.mod-back-official-item:hover {
    background: #eff6ff;
}
.mod-back-official-item.selected {
    background: var(--mod-back-primary);
    color: #fff;
    font-weight: 500;
}

/* ----- ЧЕКБОКС ОТЧЕСТВО ----- */
.mod-back-patronymic-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.mod-back-patronymic-wrapper input {
    padding-right: 40px;
}
.mod-back-patronymic-wrapper .mod-back-toggle-patr {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1rem;
    z-index: 2;
}
.mod-back-patronymic-wrapper .mod-back-toggle-patr:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #475569;
}
.mod-back-patronymic-wrapper .mod-back-toggle-patr.active {
    color: var(--mod-back-primary);
}
.mod-back-patronymic-wrapper .mod-back-toggle-patr .tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #f8fafc;
    font-size: 0.65rem;
    padding: 2px 10px;
    border-radius: 6px;
    white-space: nowrap;
    font-weight: 500;
    pointer-events: none;
}
.mod-back-patronymic-wrapper .mod-back-toggle-patr:hover .tooltip {
    display: block;
}
.mod-back-patronymic-wrapper .mod-back-hidden-check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}
.mod-back-patronymic-wrapper input:disabled {
    opacity: 0.5;
    background: #f1f5f9;
    cursor: not-allowed;
}

/* ----- ФАЙЛЫ ----- */
.mod-back-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
}
.mod-back-file-upload input[type="file"] {
    display: none;
}

/* Контейнер для списка файлов — горизонтальная прокрутка */
.mod-back-files-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.8rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 0 1rem 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mod-back-files-list::-webkit-scrollbar {
    display: none;
}

.mod-back-file-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem 0.4rem 0.8rem;
    border-radius: 2rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    max-width: 220px;
    min-width: 140px;
}
.mod-back-file-item .file-icon {
    font-size: 1.2rem;
}
.mod-back-file-item .file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
    font-size: 0.85rem;
}
.mod-back-file-item .file-size {
    color: #64748b;
    font-size: 0.75rem;
    margin-left: auto;
}
.mod-back-file-item .file-remove {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 0.2rem;
    transition: color 0.15s;
}
.mod-back-file-item .file-remove:hover {
    color: #ef4444;
}

/* Обёртка для стрелок и списка */
.mod-back-files-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.mod-back-files-scroll-btn {
    flex: 0 0 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: var(--mod-back-primary);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, background 0.2s;
    opacity: 0.3;
    pointer-events: none;
}
.mod-back-files-scroll-btn.visible {
    opacity: 1;
    pointer-events: auto;
}
.mod-back-files-scroll-btn:hover {
    background: var(--mod-back-primary-dark);
}
.mod-back-files-scroll-btn:disabled {
    opacity: 0.2;
    pointer-events: none;
}
/* Стрелки полностью скрыты, когда нет файлов (управляется через JS) */
.mod-back-files-scroll-btn.hidden {
    display: none !important;
}

/* ----- МАТЕМАТИЧЕСКАЯ КАПЧА ----- */
.mod-back-math-captcha-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.6rem;
}
.mod-back-math-label {
    flex: 0 0 auto;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}
.mod-back-math-input {
    flex: 1;
}
.mod-back-math-input input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 2rem;
    font-size: 0.95rem;
    background: #fafbfc;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
.mod-back-math-input input:focus {
    border-color: var(--mod-back-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ----- КНОПКИ ОБЩИЕ ----- */
.mod-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.4rem 1.2rem;
    border: 2px solid var(--mod-back-primary);
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.85rem;
    background: transparent;
    color: var(--mod-back-primary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.mod-back-btn:hover {
    background: var(--mod-back-primary);
    color: #fff;
}
.mod-back-btn-primary {
    background: var(--mod-back-primary);
    color: #fff;
    border-color: var(--mod-back-primary);
}
.mod-back-btn-primary:hover {
    background: var(--mod-back-primary-dark);
    border-color: var(--mod-back-primary-dark);
}
.mod-back-btn-success {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}
.mod-back-btn-success:hover {
    background: #059669;
    border-color: #059669;
}
.mod-back-btn-sm {
    padding: 0.2rem 0.8rem;
    font-size: 0.75rem;
}
.mod-back-btn-secondary {
    border-color: #94a3b8;
    color: #475569;
}
.mod-back-btn-secondary:hover {
    background: #94a3b8;
    color: #fff;
}

/* Кнопка «Добавить соавтора» — слева */
.mod-back-add-coauthor-btn {
    align-self: flex-start;
}

/* ----- ПУБЛИЧНЫЕ ОТВЕТЫ ----- */
.mod-back-public-answers {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    flex: 1;
}
.mod-back-public-answers h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.mod-back-public-item {
    background: #f8fafc;
    border-radius: 1.5rem;
    padding: 0.8rem 1.2rem;
    margin-bottom: 0.6rem;
    border: 1px solid #e2e8f0;
}
.mod-back-public-item small {
    color: #94a3b8;
    font-size: 0.8rem;
}

/* ----- ЛИЧНЫЙ КАБИНЕТ (компактный, с прокруткой) ----- */
.mod-back-login-form {
    padding: 1rem;
}
.mod-back-login-form h4 {
    margin-bottom: 0.5rem;
}

.mod-back-account-panel {
    padding: 1.5rem;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mod-back-account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.mod-back-account-info {
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.mod-back-account-messages {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.mod-back-account-messages ul {
    list-style: none;
    padding: 0;
}

.mod-back-account-messages li {
    background: #f8fafc;
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 0.8rem;
    border: 1px solid #e2e8f0;
}

.mod-back-account-messages .admin-reply {
    background: #e0f2fe;
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.mod-back-new-appeal-btn {
   /* margin-top: 1rem; */
    flex-shrink: 0;
}

/* Блок статуса авторизации на форме */
.mod-back-auth-status .mod-back-card {
    background: #f0fdf4;
	display: flex;
    gap: 20px;
}

/* ----- АДАПТИВ ----- */
@media (max-width: 640px) {
    .mod-back-modal {
        height: 95vh;
        max-height: 95vh;
        border-radius: 1.5rem;
        width: 100%;
        max-width: 100%;
    }
    .mod-back-modal-header { padding: 0.8rem 1rem; }
    .mod-back-tabs { padding: 0.5rem 1rem 0; }
    .mod-back-tab { font-size: 0.75rem; padding: 0.4rem 0.6rem; }
    .mod-back-tab-content { padding: 1rem; }
    .mod-back-tab-footer { padding: 0.6rem 1rem; }
    .mod-back-form-row { flex-direction: column; gap: 0.4rem; }
    .mod-back-form-row .mod-back-field { flex: 1 1 auto; }
    .mod-back-initial { padding: 1rem; }
    .mod-back-top-row { flex-direction: column; align-items: stretch; }
    .mod-back-write-btn { justify-content: center; }
    .mod-back-open-btn { width: 100%; justify-content: center; }
    .mod-back-math-captcha-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
    }
    .mod-back-math-label {
        white-space: normal;
    }
}

/* ----- УВЕДОМЛЕНИЕ ОБ УСПЕШНОЙ ОТПРАВКЕ ----- */
.mod-back-success-message {
    margin-bottom: 1.5rem;
}
.mod-back-success-message .mod-back-card {
    border-color: #10b981;
    background: #f0fdf4;
}
.mod-back-success-message h4 {
    margin-bottom: 0.5rem;
    color: #065f46;
}