/* Каркас страницы как в siamtaskmanager: боковое меню слева, белая шапка страницы 72px */
body.with-sidebar {
    padding-left: var(--sidebar-width);
}

.page {
    min-height: 100vh;
}

/* Шапка страницы: заголовок слева, действия справа */
.wide-page-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: var(--page-header-height);
    padding: 0 20px;
    background: var(--color-grey-white);
    border-bottom: 1px solid var(--color-grey-82);
}

.wide-page-header h1 {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.wide-page-header__title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Строка фильтров под шапкой. Высота фиксирована: под ней прилипает заголовок таблицы (tables.css) */
.filter-row {
    position: sticky;
    top: var(--page-header-height);
    z-index: 9;
    display: flex;
    align-items: center;
    gap: 8px;
    height: var(--filter-row-height);
    padding: 0 20px;
    background: var(--color-grey-white);
    border-bottom: 1px solid var(--color-grey-82);
}

.table-wrapper {
    padding: 0 20px 40px;
}

/* Обычное содержимое страницы (формы, пустые состояния) */
.page-body {
    padding: 24px 20px 40px;
}

.page-lead {
    margin-bottom: 16px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: var(--radius-10);
}

.back-link:hover {
    background: var(--color-grey-90-transparent-85);
}

/* Сообщение после сохранения: всплывает справа сверху и скрывается (js/app.js) */
.flash {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 1100;
    max-width: 420px;
    transition: opacity 0.3s ease;
}

.flash.is-hidden {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 640px) {
    .wide-page-header h1 {
        font-size: 1.75rem;
    }
}
