/* ============================================================================
   PAGE WRAPPER - Общий контейнер для страниц
   ============================================================================ */

.page-wrapper {
    background: linear-gradient(135deg, #f6fff8 0%, #eaf4f4 100%);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(107, 144, 128, 0.15);
    border: 3px solid #cce3de;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
}

.page-wrapper::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, #6b9080, #a4c3b2, #cce3de);
    border-radius: 12px;
    z-index: -1;
}

/* Вариант для страницы удаления (красная рамка) */
.page-wrapper.page-delete {
    border: 3px solid #dc3545;
}

.page-wrapper.page-delete::before {
    background: linear-gradient(135deg, #dc3545, #ff6b6b, #ffa8a8);
}

/* ============================================================================
   ЛИСТ-ХЕДЕР - Заголовок страницы
   ============================================================================ */

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #cce3de;
}

/* Вариант для страницы удаления */
.page-wrapper.page-delete .list-header {
    border-bottom: 3px solid #dc3545;
}

.list-header h4.section-title {
    color: #6b9080;
    font-weight: 600;
    margin: 0;
    font-size: 1.75rem;
}

.page-wrapper.page-delete .list-header h4.section-title {
    color: #dc3545;
}

/* ============================================================================
   СЕКЦИИ ФОРМЫ
   ============================================================================ */

.form-section {
    margin-bottom: 0;
}

.section-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #cce3de;
}

.section-header-with-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #cce3de;
}

/* Вариант для страницы удаления */
.page-wrapper.page-delete .section-header,
.page-wrapper.page-delete .section-header-with-button {
    border-bottom: 3px solid #dc3545;
}

.section-title {
    color: #6b9080;
    font-weight: 600;
    margin: 0;
    font-size: 1.75rem;
}

.form-content {
    padding: 0.5rem 0;
}

/* ============================================================================
   АДАПТИВНОСТЬ
   ============================================================================ */

@media (max-width: 768px) {
    .page-wrapper {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .page-wrapper::before {
        border-radius: 12px;
    }

    .list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    /* Кнопки в заголовке на всю ширину на мобильных */
    .list-header .btn-action {
        width: 100%;
    }
    
    /* Группа кнопок в заголовке вертикально */
    .list-header .d-flex.gap-2 {
        flex-direction: column;
        width: 100%;
    }

    .section-header-with-button {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    /* Кнопки в секции с кнопками на всю ширину */
    .section-header-with-button button.btn-action {
        width: 100%;
    }
}
