body {
	background-color: #f4f6f9;
}

/* Sidebar styling for desktop and mobile */
.sidebar {
	width: 280px;
	height: 100vh; /* Fixed to exactly 100% of viewport height */
	position: sticky; /* Keeps it fixed on screen while scrolling */
	top: 0;
	overflow-y: auto; /* Allows scrolling inside sidebar if items are too long */
	overflow-x: hidden;
	transition: all 0.3s ease-in-out;
	z-index: 1040;
	background-color: #ffffff;
	box-shadow: 2px 0 15px rgba(0,0,0,0.03);
}

/* Custom scrollbar for a cleaner sidebar look */
.sidebar::-webkit-scrollbar {
	width: 5px;
}
.sidebar::-webkit-scrollbar-track {
	background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
	background: rgba(0,0,0,0.1);
	border-radius: 10px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
	background: rgba(0,0,0,0.2);
}

.sidebar .nav-link {
	color: #4b5563;
	border-radius: 0.5rem;
	margin-bottom: 0.25rem;
	font-weight: 500;
	transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
	background-color: #f8f9fa;
	color: #0d6efd !important;
}

.sidebar .nav-link.active {
	background-color: #eff6ff;
	color: #0d6efd !important;
	font-weight: 600;
	box-shadow: inset 4px 0 0px #0d6efd;
}

/* Mobile Sidebar Behavior */
@media (max-width: 768.98px) {
	.sidebar {
		position: fixed;
		left: -280px;
	}
	.sidebar.show {
		left: 0;
	}
	.sidebar-overlay {
		display: none;
		position: fixed;
		top: 0; left: 0; right: 0; bottom: 0;
		background: rgba(0,0,0,0.5);
		z-index: 1030;
	}
	.sidebar-overlay.show {
		display: block;
	}
}

/* Tree View Chevron Animation */
.nav-link .bi-chevron-down {
	transition: transform 0.3s ease-in-out;
}
.nav-link:not(.collapsed) .bi-chevron-down {
	transform: rotate(-180deg);
}

.submenu .nav-link {
	font-size: 0.875rem;
	color: #6b7280;
	padding-top: 0.4rem;
	padding-bottom: 0.4rem;
	border-radius: 0.3rem;
	transition: all 0.3s ease;
}
.submenu .nav-link:hover {
	background-color: transparent;
	color: #0d6efd !important;
	padding-left: 1.5rem; /* subtle slide effect */
}

/* Iframe wrapper for content loading */
.content-iframe-wrapper {
	flex-grow: 1;
	min-height: 0; /* Ensures the flex child shrinks properly without overflowing */
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
	background: #fff;
	overflow: hidden;
	display: flex;
}
.content-iframe-wrapper iframe {
	width: 100%;
	height: 100%;
	border: none;
}