body {
	height: 100dvh;
	background: #f0f2f5;
	overflow: hidden;
}

.header {
	background: #1e2b3c;
	color: white;
	z-index: 40;
	gap: 1rem;
	height: 50px;
	display: flex;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
    font-size: 1.5rem;
	font-weight: 500;
	color: white;
}

.header_menu-btn {
	display: none; /* По умолчанию скрыта */
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	transition: background-color 0.2s;
}

.header_icon {
	width: 40px;
	height: 40px;
}

.scroller {
	height: calc(100dvh - 50px);
	overflow-y: auto;
	position: relative;
	background: #161920;
}

.page-width {
	width: 100%;
	max-width: 1500px;
	min-height: 100%;
	margin: 0 auto;
	display: flex;
}

.left {
	width: 250px;
	background: #4a6782;
	padding: 1rem;
	box-shadow: inset -2px 0 5px rgba(0,0,0,0.03);
	
	position: sticky;
	top: 0;
	flex-shrink: 0;
	/*align-self: flex-start; /* Не будет растягиваться */
	height: calc(100dvh - 50px);
	
	overflow-y: auto;
	transition: transform 0.25s ease;
	
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Контейнер для основного контента и панели действий */
.center {
	flex: 1;
	min-width: 0;
	
	display: flex;
	/*align-items: flex-start; /* Не растягивать детей на всю высоту flexbox'а */
}

.main {
	flex: 1;
	background: #ffffff;
	min-width: 0;
}

.actions {
	width: 200px;
	background: #4a6782;
	color: white;
	padding: 1rem 0.75rem;
	overflow-y: auto;

	position: sticky;
	top: 0;
	/*align-self: flex-start; /* Не будет растягиваться, если не задать height по размерам экрана или больше */
	height: calc(100dvh - 50px);
	flex-shrink: 0;
	z-index: 20;
	
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.actions-right {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Оверлей для мобильного меню */
.mobile-overlay {
	display: none;
	position: fixed;
	top: 50px;
	left: 0;
	width: 100vw;
	height: calc(100vh - 50px);
	background: rgba(0,0,0,0.3);
	z-index: 25;
}

.mobile-overlay.active {
	display: block;
}

.left.mobile-open {
	display: flex;
	position: fixed;
	top: 50px;
	left: 0;
	bottom: 0;
	z-index: 30;
	border-radius: 0 0 12px 0;
	box-shadow: 2px 0 20px rgba(0,0,0,0.3);
}

/* < 1000px: actions встает сверху main */
@media (max-width: 1000px) {
	.center {
		flex-direction: column;
	}
	
	.main {
		order: 2;
	}
	
	.actions {
		order: 1;
		flex-direction: row;
		width: 100%;
		height: auto;
	}
	
	.actions-right {
		flex-direction: row;
		margin-left: auto;
	}
}

/* < 768px: left скрывается, появляется кнопка */
@media (max-width: 768px) {
	.header_menu-btn {
		display: inline-block;
	}
	
	.actions {
		padding: 0.5rem;
	}

	.left {
		display: none;
	}
}

.flash-message {
    position: absolute;
    display: flex;
    align-items: center;    /* вертикальное центрирование */
    justify-content: center; /* только горизонтальное центрирование */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    max-height: 0;
    visibility: hidden;
    background-color: #d1ecf1;
    color: #0c5460;
    font-size: 14px;
    animation: fadeInOut 5s forwards;
    animation-delay: 0;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        visibility: visible;
    }
    10% {
        opacity: 1;
        max-height: 50px;
    }
    90% {
        opacity: 1;
        max-height: 50px;
    }
    100% {
        opacity: 0;
        max-height: 0;
        visibility: hidden;
    }
}
