/* NAV - the sidebar, the hamburger, and the second page's container.
   Shell layout only: no plugin looks like this, no page owns these rules. */

.shell {
	display: flex;
	height: 100%;
	min-height: 0;
}

/* ---------------- sidebar ---------------- */
.sidebar {
	flex: none;
	width: 168px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 12px 8px;
	border-right: 1px solid var(--line);
	background: var(--panel);
}

.sidebar-brand {
	font-size: 10px;
	letter-spacing: .16em;
	color: var(--faint);
	padding: 4px 10px 12px;
}

.nav-link {
	display: block;
	padding: 8px 10px;
	border-radius: 4px;
	font-size: 12px;
	letter-spacing: .06em;
	color: var(--dim);
	text-decoration: none;
}
.nav-link:hover { background: rgba(255,255,255,.03); color: var(--text); }
.nav-link.active {
	background: rgba(255,255,255,.05);
	color: var(--text);
	box-shadow: inset 2px 0 0 var(--amber);
}

/* ---------------- the area the pages live in ---------------- */
.shell-main {
	flex: 1;
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.view {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
}

/* the desk slots fill the same space; the router shows one or the other */
body[data-page="trades"] .slot { display: none; }
body[data-page="desk"] .view { display: none; }

/* ---------------- hamburger ---------------- */
.burger {
	display: none;                     /* desktop has the rail, so no button */
	position: fixed;
	top: 9px; left: 10px;
	z-index: 40;
	flex-direction: column;
	justify-content: center;
	gap: 3px;
	width: 30px; height: 26px;
	padding: 0 4px;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 4px;
	cursor: pointer;
}
.burger span {
	display: block;
	height: 1.5px;
	background: var(--dim);
	border-radius: 1px;
}

.scrim {
	position: fixed; inset: 0;
	background: rgba(0,0,0,.55);
	z-index: 20;
	display: none;                 /* only ever shown with .open */
}
.scrim.open { display: block; }

/* ---------------- small screens: sidebar becomes a drawer ---------------- */
@media (max-width: 900px) {
	.burger { display: flex; }

	/* the button gets its own strip, so it can never sit on top of a page's content */
	.shell-main { padding-top: 44px; }
	.sidebar { padding-top: 56px; }

	.sidebar {
		position: fixed;
		top: 0; bottom: 0; left: 0;
		width: 210px;
		z-index: 30;
		transform: translateX(-100%);
		transition: transform .18s ease;
	}
	body.nav-open .sidebar { transform: translateX(0); }
}
