/* ============================= */
/* RESPONSIVE & MOBILE MENU      */
/* ============================= */
.main-header {
	display: flex;
	align-items: center;
	margin-bottom: 40px;
}

.menu-toggle {
	display: none;
	background: transparent;
	border: none;
	color: var(--text-secondary);
	cursor: pointer;
	margin-right: 15px;
	padding: 5px;
	transition: color 0.2s;
}

.menu-toggle:hover {
	color: var(--text-primary);
}

.sidebar-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(3px);
	z-index: 900;
}

/* En pantallas pequeñas, poner un grafico debajo de otro */
@media (max-width: 1374px) {
	.pie-grid {
		flex-direction: column;
	}
}

/* En pantallas mas pequeñas, el sidebar se convierte en desplegable */
@media (max-width: 900px) {
	.menu-toggle {
		display: block;
	}

	.content header {
		margin-bottom: 20px;
	}

	.sidebar {
		position: fixed;
		top: 0;
		left: -320px;
		height: 100vh;
		width: 280px;
		z-index: 1000;
		transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
		transform: translateX(0);
		border-right: none;
		box-shadow: none;
	}

	.sidebar.open {
		transform: translateX(320px);
		box-shadow: 4px 0 25px rgba(0, 0, 0, 0.8);
	}

	.sidebar-overlay {
		display: none;
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		background-color: rgba(0, 0, 0, 0.6);
		backdrop-filter: blur(3px);
		z-index: 900;
		opacity: 0;
		transition: opacity 0.3s ease;
	}

	.sidebar-overlay.open {
		display: block;
		opacity: 1;
	}

	.content {
		padding: 20px;
	}

	.metrics-grid {
		flex-direction: column;
	}
}
