:root {
	--sidebar-width: 280px;
	--header-height: 56px;
	--mobile-header-height: 47px;
	--muted-border: rgba(27, 31, 35, 0.12);
	--bg: #f7f8fa;
	--card-bg: #ffffff;
	--accent: #9c9ab8;
	--brand-bg: rgba(243, 244, 246, 0.95);
	--shadow-light: 0 4px 8px rgba(0, 0, 0, 0.12);
	--shadow-heavy: 8px 0 30px rgba(15, 23, 42, 0.08);
	--transition-smooth: 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
	--topbar-accent-color: transparent;
}

html {
	height: -webkit-fill-available;
	background: #fbfbfd;
}

body {
	min-height: 100vh;
	min-height: -webkit-fill-available;
	overflow: hidden;
	background: #fbfbfd;
}

/* ===== App Shell Desktop ===== */
.app-grid {
	display: grid;
	grid-template-columns: var(--sidebar-width) 1fr;
	grid-template-rows: var(--header-height) minmax(0, 1fr);
	height: 100dvh;
	overflow: hidden;
	opacity: 0;
	transition: opacity 150ms ease-in;
}

.app-grid.app-ready {
	opacity: 1;
}

/* ===== Sidebar Desktop ===== */
.sidebar {
	grid-column: 1 / 2;
	grid-row: 2 / 3;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
}

/* ===== Main Desktop ===== */
.main {
	grid-column: 2 / 3;
	grid-row: 2 / 3;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 1rem 1.25rem;
	background: linear-gradient(180deg, #fff, #fbfbfd 60%);
	-webkit-overflow-scrolling: touch;
	scrollbar-gutter: stable;
}

.app-breadcrumbs {
	margin: 0 0 1rem 0;
	padding: .5rem .125rem;
	overflow-x: auto;
	scrollbar-width: none;
	background: transparent;
	border: 0;
	box-shadow: none;
}

.app-breadcrumbs::-webkit-scrollbar {
	display: none;
}

.app-breadcrumbs__list {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: .25rem;
	margin: 0;
	padding: 0;
	list-style: none;
	min-width: max-content;
}

.app-breadcrumbs__item {
	display: inline-flex;
	align-items: center;
	min-width: 0;
	color: #64748b;
	font-size: .875rem;
	line-height: 1.2;
}

.app-breadcrumbs__item:not(:last-child)::after {
	content: "";
	width: 6px;
	height: 6px;
	margin: 0 .375rem;
	border-top: 1.5px solid #94a3b8;
	border-right: 1.5px solid #94a3b8;
	transform: rotate(45deg);
	flex: 0 0 auto;
}

.app-breadcrumbs__link,
.app-breadcrumbs__current {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	min-width: 0;
	white-space: nowrap;
	text-decoration: none;
	border-radius: 8px;
	padding: .25rem .4rem;
	transition: background-color .18s ease, color .18s ease;
}

.app-breadcrumbs__link {
	color: #475569;
}

.app-breadcrumbs__link:hover {
	color: #0f172a;
	background: rgba(148, 163, 184, 0.12);
}

.app-breadcrumbs__current {
	color: #0f172a;
	font-weight: 600;
}

.app-breadcrumbs__item i {
	font-size: .875rem;
	opacity: .9;
	flex: 0 0 auto;
}

/* ===== Mobile ===== */
@media (max-width: 991.98px) {
	html,
	body {
		height: auto;
		min-height: 100%;
		min-height: -webkit-fill-available;
		overflow-x: hidden;
		overflow-y: auto;
	}

	body {
		overflow: auto;
	}

	.app-grid {
		display: block;
		height: auto;
		min-height: 0;
		overflow: visible;
		padding: 0;
	}

	.sidebar {
		display: none !important;
	}

	.main {
		display: block;
		grid-column: auto;
		grid-row: auto;
		min-height: calc(100dvh - var(--mobile-header-height));
		height: auto;
		overflow: visible;
		padding-top: calc(var(--mobile-header-height) + 0.5rem);
		padding-right: 0.5rem;
		padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
		padding-left: 0.5rem;
		background: linear-gradient(180deg, #fff, #fbfbfd 60%);
		-webkit-overflow-scrolling: auto;
		scrollbar-gutter: auto;
	}

	.app-breadcrumbs {
		margin-bottom: .75rem;
		padding-top: .25rem;
		padding-bottom: .25rem;
	}

	.app-breadcrumbs__item {
		font-size: .8125rem;
	}

	.app-breadcrumbs__link,
	.app-breadcrumbs__current {
		padding: .2rem .3rem;
	}
}