/**
 * at-amber Theme - Navigation Styles
 *
 * Navigation layer: Top stats bar, sidebar, breadcrumbs
 * Version: 2.1
 * Date: 2025-12-06
 */

/* ===== LAYOUT STRUCTURE ===== */
.dashboard-layout {
	display: flex;
	min-height: 100vh;
	flex-direction: column;
}

.dashboard-content {
	display: flex;
	flex: 1;
}

/* ===== TOP STATS BAR ===== */
.top-stats-bar {
	background: linear-gradient(135deg, #1a1613 0%, #0f0b08 100%);
	border-bottom: 1px solid rgba(212, 165, 116, 0.2);
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: blur(10px);
}

/* Desktop Logo */
.tn-logo {
	font-family: 'Orbitron', sans-serif;
	font-weight: 700;
	font-size: 1.2rem;
	color: #e0b890;
	letter-spacing: -0.5px;
	text-decoration: none;
	transition: color 0.2s ease;
}

.tn-logo:hover {
	color: #d4a574;
}

/* Mobile logo row - hidden on desktop */
.tn-mobile-logo-row {
	display: none;
}

.top-stats-container {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 1.5rem;
	padding: 0.75rem 2rem;
}

.mobile-menu-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--border);
	color: var(--accent);
	width: 36px;
	height: 36px;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
	background: var(--bg-tertiary);
	border-color: var(--accent);
}

.quick-stats {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	justify-content: center;
	flex-wrap: wrap;
	flex: 1;
}

.tn-future-space {
	min-width: 1rem;
}

.ts-stat {
	display: inline-flex;
	align-items: baseline;
	gap: 0.4rem;
}

.ts-stat:not(:last-child)::after {
	content: "|";
	margin-left: 1rem;
	margin-right: 0.6rem;
	color: var(--border);
	font-weight: 300;
}

.ts-label {
	font-size: 0.85rem;
	color: var(--text-tertiary);
	text-transform: lowercase;
	font-weight: 400;
}

.ts-value {
	font-size: 0.85rem;
	color: var(--text-primary);
	font-weight: 600;
	font-family: 'Orbitron', monospace;
}

.ts-value.positive {
	color: var(--success);
}

.ts-value.negative {
	color: var(--danger);
}

.ts-value.neutral {
	color: var(--text-secondary);
}

.ts-value.error {
	color: #f39c12;
}


.stat-error {
	color: var(--danger);
	font-size: 0.85rem;
}

/* ===== SIDEBAR ===== */
.sidebar {
	width: 260px;
	background: linear-gradient(180deg, #1a1613 0%, #0f0b08 100%);
	border-right: 1px solid rgba(212, 165, 116, 0.2);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	height: 100vh;
	position: sticky;
	top: 0;
}

/* Sidebar Welcome Section */
.sidebar-welcome {
	padding: 1.5rem 1rem;
	border-bottom: 1px solid rgba(212, 165, 116, 0.15);
	background: rgba(212, 165, 116, 0.05);
}

.welcome-title {
	font-size: 0.9rem;
	color: var(--text-secondary);
	margin-bottom: 0.5rem;
}

.welcome-title strong {
	color: var(--accent);
	font-weight: 600;
}

.welcome-subtitle {
	font-size: 0.75rem;
	color: var(--text-tertiary);
	line-height: 1.4;
	margin-bottom: 0.75rem;
}

.plan-badges {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.plan-badge {
	padding: 0.25rem 0.5rem;
	border-radius: 10px;
	font-size: 0.65rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.plan-badge.basic {
	background: rgba(52, 152, 219, 0.2);
	color: #3498db;
	border: 1px solid rgba(52, 152, 219, 0.3);
}

.plan-badge.pro {
	background: rgba(155, 89, 182, 0.2);
	color: #9b59b6;
	border: 1px solid rgba(155, 89, 182, 0.3);
}

.plan-badge.elite {
	background: rgba(241, 196, 15, 0.2);
	color: #f1c40f;
	border: 1px solid rgba(241, 196, 15, 0.3);
}

/* Sidebar Brand */
.sidebar-brand {
	padding: 1.5rem 1rem;
	border-bottom: 1px solid rgba(212, 165, 116, 0.15);
}

.sidebar-brand h5 {
	color: var(--accent);
	margin: 0 0 0.25rem 0;
	font-family: 'Exo 2', sans-serif;
	font-weight: 600;
	font-size: 1.1rem;
}

.sidebar-brand small {
	color: var(--text-tertiary);
	font-size: 0.75rem;
}

/* Sidebar Navigation */
.sidebar-nav {
	flex: 1;
	padding: 1rem 0;
	overflow-y: auto;
}

.nav-link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	color: var(--text-secondary);
	text-decoration: none;
	transition: all 0.2s ease;
	position: relative;
}

.nav-link i:first-child {
	width: 18px;
	text-align: center;
	font-size: 1rem;
}

.nav-link span {
	flex: 1;
	font-size: 0.9rem;
}

.nav-link:hover {
	background: rgba(212, 165, 116, 0.08);
	color: var(--accent);
}

.nav-link.active {
	background: rgba(212, 165, 116, 0.12);
	color: var(--accent);
	border-left: 3px solid var(--accent);
}

.nav-link.disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.lock-icon-basic,
.lock-icon-pro,
.lock-icon-elite {
	font-size: 0.75rem;
	margin-left: auto;
}

.lock-icon-basic {
	color: #3498db;
}

.lock-icon-pro {
	color: #9b59b6;
}

.lock-icon-elite {
	color: #f1c40f;
}

.nav-divider {
	height: 1px;
	background: rgba(212, 165, 116, 0.15);
	margin: 0.75rem 1rem;
}

.nav-section-header {
	padding: 0.5rem 1rem;
	font-size: 0.7rem;
	color: var(--text-tertiary);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 600;
}

/* ===== MAIN CONTENT AREA ===== */
.main-content {
	flex: 1;
	overflow-y: auto;
	background: #0f0b088a;
}

/* ===== SIDEBAR OVERLAY (Mobile) ===== */
.sidebar-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.7);
	z-index: 999;
	display: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
	display: block;
	opacity: 1;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
	.sidebar {
		width: 220px;
	}

	.top-stats-container {
		padding: 0.75rem 1rem;
		gap: 1rem;
	}

	.quick-stats {
		gap: 1rem;
	}

	.stat-pill {
		padding: 0.3rem 0.65rem;
	}
}

@media (max-width: 768px) {
	/* Show mobile logo row */
	.tn-mobile-logo-row {
		display: block;
		text-align: center;
		padding: 0.5rem 1rem;
		border-bottom: 1px solid rgba(212, 165, 116, 0.1);
	}

	.tn-mobile-logo {
		font-family: 'Orbitron', sans-serif;
		font-weight: 700;
		font-size: 1rem;
		color: #e0b890;
		letter-spacing: -0.5px;
		text-decoration: none;
	}

	/* Hide desktop logo and future space */
	.tn-logo,
	.tn-future-space {
		display: none;
	}

	.mobile-menu-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.sidebar {
		position: fixed;
		left: -260px;
		top: 0;
		z-index: 1000;
		transition: left 0.3s ease;
	}

	.sidebar.show {
		left: 0;
	}

	/* Revert to flex layout for mobile */
	.top-stats-container {
		display: flex;
		align-items: center;
		gap: 0.5rem;
		padding: 0.5rem 1rem;
		flex-wrap: wrap;
	}

	.quick-stats {
		gap: 0.5rem;
		flex: 1;
		width: 100%;
		justify-content: flex-start;
	}

	.ts-stat {
		gap: 0.3rem;
	}

	.ts-label {
		font-size: 0.6rem;
	}

	.ts-value {
		font-size: 0.75rem;
	}
}

@media (max-width: 480px) {
	/* Horizontal scrollable stats - keeps topbar compact (1 line max) */
	.quick-stats {
		overflow-x: auto;
		overflow-y: hidden;
		flex-wrap: nowrap;  /* Force single line - no wrapping */
		justify-content: flex-start;
		gap: 0.75rem;
		width: 100%;
		padding-bottom: 0.25rem;  /* Space for scrollbar */

		/* Smooth scroll behavior */
		scroll-behavior: smooth;
		-webkit-overflow-scrolling: touch;

		/* Subtle scrollbar styling */
		scrollbar-width: thin;
		scrollbar-color: rgba(212, 165, 116, 0.3) transparent;
	}

	/* Webkit browsers (Chrome, Safari, Edge) scrollbar */
	.quick-stats::-webkit-scrollbar {
		height: 3px;
	}

	.quick-stats::-webkit-scrollbar-track {
		background: transparent;
	}

	.quick-stats::-webkit-scrollbar-thumb {
		background: rgba(212, 165, 116, 0.3);
		border-radius: 3px;
	}

	/* Prevent stats from shrinking - enables horizontal scroll */
	.ts-stat {
		flex-shrink: 0;  /* Each stat maintains its width */
		white-space: nowrap;  /* Keep label + value on same line */
	}

	/* Adjust pipe separator spacing for compact layout */
	.ts-stat:not(:last-child)::after {
		margin-left: 0.5rem;
		margin-right: 0.5rem;
	}
}

/* ===== MOBILE SIDEBAR TOGGLE SCRIPT ===== */
/* JavaScript functions in inc_topbar_ata.php handle sidebar toggle */
