/* ============================================================
	 TOKENS — edit these to reskin. Everything below reads from
	 these vars, so a palette swap is a one-place change.
	 ============================================================ */
:root {
	--nav-bg: #14161c;
	--nav-bg-elevated: #1b1e26;
	--nav-collapsed: 64px;
	--nav-expanded: 224px;
	--nav-text-muted: #8b909c;
	--nav-text: #f2f3f5;
	--nav-accent: #ff8a3d;
	--nav-item-height: 56px;
	--bottom-nav-height: 62px;
	--transition-speed: .22s;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	/*
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: #0c0d10;
	color: var(--nav-text);
	*/
}

/* ============================================================
	 DESKTOP LEFT RAIL
	 Fixed + overlays the page (does not push content) so hover-
	 expansion never causes a reflow. Page content just needs
	 padding-left equal to the collapsed width — see .page-content.
	 ============================================================ */
.side-nav {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: var(--nav-collapsed);
	background: var(--indigo-dark);
	border-right: 1px solid rgba(255,255,255,.06);
	overflow: hidden;
	transition: width var(--transition-speed) ease;
	z-index: 200;
	display: flex;
	flex-direction: column;
}
.side-nav:hover,
.side-nav:focus-within {
	width: var(--nav-expanded);
	box-shadow: 4px 0 24px rgba(0,0,0,.35);
}

.side-nav-brand {
	height: var(--nav-item-height);
	display: flex;
	align-items: center;
	padding: 0 20px;
	flex: 0 0 auto;
	border-bottom: 1px solid rgba(255,255,255,.06);
}
.side-nav-brand .brand-mark {
	width: 24px;
	height: 24px;
	border-radius: 6px;
	background: var(--nav-accent);
	flex: 0 0 24px;
}
.side-nav-brand .brand-name {
	margin-left: 14px;
	font-weight: 700;
	letter-spacing: .02em;
	white-space: nowrap;
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}
.side-nav:hover .brand-name,
.side-nav:focus-within .brand-name { opacity: 1; transform: translateX(0); }

.side-nav-items {
	display: flex;
	flex-direction: column;
	padding: 8px 0;
	overflow-y: auto;
	overflow-x: hidden;
}

.side-nav-icon {
	width: 36px;
	height: 36px;
}

.nav-item {
	display: flex;
	align-items: center;
	height: var(--nav-item-height);
	padding: 0 20px;
	color: var(--nav-text-muted);
	text-decoration: none;
	white-space: nowrap;
	border-left: 3px solid transparent;
	background: transparent;
	cursor: pointer;
	transition: color .15s ease, background .15s ease;
}
.nav-item:hover { color: var(--nav-text); background: rgba(255,255,255,.05); }
.nav-item.active { color: var(--nav-text); border-left-color: var(--nav-accent); background: rgba(255,255,255,.04); }

.nav-item .nav-icon {
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.nav-item .nav-icon svg { width: 22px; height: 22px; }

.nav-item .nav-label {
	margin-left: 14px;
	font-size: 14px;
	font-weight: 500;
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}
.side-nav:hover .nav-label,
.side-nav:focus-within .nav-label { opacity: 1; transform: translateX(0); }

/* ============================================================
	 MOBILE BOTTOM NAV
	 Hidden on desktop widths; shown on narrow / portrait screens.
	 ============================================================ */
.bottom-nav {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	height: var(--bottom-nav-height);
	padding-bottom: env(safe-area-inset-bottom, 0);
	background: var(--indigo-dark);
	border-top: 1px solid rgba(255,255,255,.08);
	z-index: 200;
}
.bottom-nav-inner {
	height: var(--bottom-nav-height);
	display: flex;
}
.bottom-item {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	background: none;
	border: none;
	color: var(--nav-text-muted);
	font-family: inherit;
	font-size: 11px;
	font-weight: 500;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.bottom-item svg { width: 22px; height: 22px; }
.bottom-item.active,
.bottom-item[aria-pressed="true"] { color: var(--nav-accent); }

/* ============================================================
	 MOBILE FULLSCREEN MENU (opened by tapping "Search"/menu icon)
	 Shows the same item set + labels as the desktop hover state.
	 ============================================================ */
.mobile-menu {
	position: fixed;
	inset: 0;
	background: var(--nav-bg-elevated);
	z-index: 300;
	display: flex;
	flex-direction: column;
	transform: translateY(100%);
	transition: transform var(--transition-speed) ease;
}
.mobile-menu.open { transform: translateY(0); }

.mobile-menu-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid rgba(255,255,255,.08);
	flex: 0 0 auto;
}
.mobile-menu-header .mobile-menu-title { font-weight: 700; font-size: 16px; }
.mobile-menu-close {
	background: rgba(255,255,255,.06);
	border: none;
	color: var(--nav-text);
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.mobile-menu-search {
	margin: 16px 20px 4px;
	display: flex;
	align-items: center;
	gap: 10px;
	background: rgba(255,255,255,.06);
	border-radius: 10px;
	padding: 10px 14px;
	flex: 0 0 auto;
}
.mobile-menu-search svg { width: 18px; height: 18px; color: var(--nav-text-muted); flex: 0 0 auto; }
.mobile-menu-search input {
	background: none;
	border: none;
	outline: none;
	color: var(--nav-text);
	font-size: 15px;
	width: 100%;
	font-family: inherit;
}
.mobile-menu-search input::placeholder { color: var(--nav-text-muted); }

.mobile-menu-list {
	overflow-y: auto;
	padding: 8px 0 24px;
}
.mobile-menu-item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 20px;
	color: var(--nav-text);
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
}
.mobile-menu-item:active { background: rgba(255,255,255,.06); }
.mobile-menu-item .nav-icon { flex: 0 0 24px; display:flex; align-items:center; justify-content:center; color: var(--nav-text-muted); }
.mobile-menu-item .nav-icon svg { width: 22px; height: 22px; }

/* ============================================================
	 BREAKPOINT — swap desktop rail for bottom nav.
	 Matches "mobile OR portrait" per the brief: narrow widths
	 (phones landscape included) and any portrait orientation
	 (e.g. a portrait tablet) both trigger the mobile layout.
	 ============================================================ */
@media (max-width: 768px), (orientation: portrait) {
	.side-nav { display: none; }
	.bottom-nav { display: block; }
	.page-content { padding-left: 0 !important; padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0)); }
}

/* Demo page content styling — delete in real integration */
.page-content { padding-left: var(--nav-collapsed); min-height: 100vh; }
.demo-inner { max-width: 720px; margin: 0 auto; padding: 48px 24px; }
.demo-inner h1 { font-size: 26px; margin-bottom: 8px; }
.demo-inner p { color: var(--nav-text-muted); line-height: 1.6; }
