/* ==========================================================================
   GL Crypto — Dashboard Layout & Theme Variables (BrightFunded-inspired)
   ========================================================================== */

:root {
	/* Paleta deep navy + electric blue */
	--bg-primary: #060814;
	--bg-secondary: #0c1226;
	--bg-tertiary: #141c38;
	--bg-card: rgba(20, 28, 56, 0.55);
	--bg-card-solid: #141c38;
	--sidebar-bg: rgba(8, 11, 28, 0.78);

	--accent-primary: #3a8dff;
	--accent-secondary: #6c5cff;
	--accent-tertiary: #38bdf8;
	--accent-hover: #5da8ff;
	--accent-glow: rgba(58, 141, 255, 0.45);

	--text-primary: #f1f5fc;
	--text-secondary: #93a4cd;
	--text-muted: #6e7681;
	--border-color: rgba(255, 255, 255, 0.08);
	--border-hover: rgba(58, 141, 255, 0.4);

	--danger: #f85149;
	--warning: #d29922;
	--success: #3fb950;
	--badge-gold: #FFD700;

	--sidebar-width: 264px;
	--topbar-height: 68px;

	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 18px;
	--radius-xl: 24px;

	--shadow-card: 0 8px 32px rgba(0, 0, 0, 0.32);
	--shadow-hover: 0 12px 40px rgba(58, 141, 255, 0.25);
	--shadow-glow: 0 0 24px rgba(58, 141, 255, 0.4);

	--font-base: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--font-mono: 'JetBrains Mono', 'SF Mono', Consolas, ui-monospace, monospace;

	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	--ease-in-out: cubic-bezier(0.65, 0.05, 0.36, 1);
	--transition-fast: 150ms var(--ease-out);
	--transition-base: 250ms var(--ease-out);
	--transition-slow: 400ms var(--ease-out);
}

[data-theme="light"] {
	--bg-primary: #f6f8fa;
	--bg-secondary: #ffffff;
	--bg-tertiary: #f0f3f8;
	--bg-card: rgba(255, 255, 255, 0.85);
	--bg-card-solid: #ffffff;
	--sidebar-bg: rgba(255, 255, 255, 0.92);
	--text-primary: #0a1024;
	--text-secondary: #4b5773;
	--text-muted: #8a92a8;
	--border-color: rgba(0, 0, 0, 0.08);
	--border-hover: rgba(58, 141, 255, 0.45);
	--shadow-card: 0 4px 20px rgba(10, 16, 36, 0.08);
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	min-height: 100%;
	background: var(--bg-primary);
	color: var(--text-primary);
	font-family: var(--font-base);
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Ambient gradient background pe dark mode */
body.gl-app::before {
	content: '';
	position: fixed;
	inset: 0;
	background:
		radial-gradient(ellipse 800px 400px at 20% -10%, rgba(58, 141, 255, 0.18), transparent),
		radial-gradient(ellipse 600px 400px at 100% 30%, rgba(108, 92, 255, 0.12), transparent);
	pointer-events: none;
	z-index: 0;
}
[data-theme="light"] body.gl-app::before {
	background:
		radial-gradient(ellipse 800px 400px at 20% -10%, rgba(58, 141, 255, 0.08), transparent),
		radial-gradient(ellipse 600px 400px at 100% 30%, rgba(108, 92, 255, 0.05), transparent);
}

a {
	color: var(--accent-primary);
	text-decoration: none;
	transition: color var(--transition-fast);
}
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(58,141,255,0.4); }

/* ---------- Shell layout ---------- */
.gl-shell {
	display: flex;
	min-height: 100vh;
	position: relative;
	z-index: 1;
}

/* ---------- Sidebar ---------- */
.gl-sidebar {
	width: var(--sidebar-width);
	background: var(--sidebar-bg);
	backdrop-filter: blur(24px) saturate(1.3);
	-webkit-backdrop-filter: blur(24px) saturate(1.3);
	border-right: 1px solid var(--border-color);
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
	z-index: 30;
	flex-shrink: 0;
}

.gl-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 22px 22px 18px;
	color: var(--text-primary);
	border-bottom: 1px solid var(--border-color);
	transition: opacity var(--transition-fast);
}
.gl-brand:hover { opacity: 0.85; color: var(--text-primary); }

.gl-brand-text { font-size: 18px; letter-spacing: 0.3px; font-weight: 500; }
.gl-brand-text strong {
	background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-weight: 800;
}

/* Logo identic cu index.html (landing) — folosit fix in sidebar-ul dashboard. */
.logo{display:flex;align-items:center;gap:11px;font-family:'Sora',sans-serif;font-weight:800;font-size:1.3rem;letter-spacing:-.01em;color:#fff}
.logo .mark{width:38px;height:38px;border-radius:11px;background:linear-gradient(120deg,#2F7BFF 0%,#19D3C5 100%);display:grid;place-items:center;color:#04122b;font-weight:800;font-size:1rem;box-shadow:0 8px 22px -6px rgba(25,211,197,.6)}
.logo b{background:linear-gradient(120deg,#2F7BFF 0%,#19D3C5 100%);-webkit-background-clip:text;background-clip:text;color:transparent}

/* Logo mark unificat (mark "GL" + text "Charts") — folosit in sidebar si login. */
.gl-logo-mark {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
	color: #04122b;
	font-weight: 800;
	font-size: 13px;
	letter-spacing: -0.02em;
	flex-shrink: 0;
}
.gl-logo-mark-lg {
	width: 56px;
	height: 56px;
	border-radius: 14px;
	font-size: 20px;
	margin: 0 auto;
}

.gl-nav {
	flex: 1;
	padding: 12px 8px;
	overflow-y: auto;
}

.gl-menu { list-style: none; margin: 0; padding: 0; }

.gl-menu-label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 1.4px;
	color: var(--text-muted);
	text-transform: uppercase;
	padding: 16px 14px 6px;
	pointer-events: none;
}

.gl-menu-item { list-style: none; }

.gl-menu-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	margin: 2px 0;
	color: var(--text-secondary);
	font-size: 14px;
	font-weight: 500;
	border-radius: var(--radius-sm);
	transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
	position: relative;
}
.gl-menu-link:hover {
	background: rgba(58, 141, 255, 0.08);
	color: var(--text-primary);
	transform: translateX(2px);
}
.gl-menu-item.is-active > .gl-menu-link {
	background: linear-gradient(90deg, rgba(58, 141, 255, 0.22), rgba(108, 92, 255, 0.10));
	color: var(--text-primary);
	box-shadow: inset 3px 0 0 var(--accent-primary);
}
.gl-menu-item.is-active > .gl-menu-link::after {
	content: '';
	position: absolute;
	right: 12px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--accent-primary);
	box-shadow: 0 0 12px var(--accent-glow);
}

.gl-menu-icon {
	width: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: currentColor;
}
.gl-menu-text { flex: 1; }

.gl-sidebar-foot {
	padding: 16px;
	border-top: 1px solid var(--border-color);
	position: sticky;
	bottom: 0;
	background: var(--sidebar-bg);
	backdrop-filter: blur(24px);
}

/* ---------- Main + Topbar ---------- */
.gl-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.gl-topbar {
	height: var(--topbar-height);
	background: rgba(6, 8, 20, 0.6);
	backdrop-filter: blur(20px) saturate(1.3);
	-webkit-backdrop-filter: blur(20px) saturate(1.3);
	border-bottom: 1px solid var(--border-color);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 28px;
	position: sticky;
	top: 0;
	z-index: 20;
}

.gl-topbar-right {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-left: auto;
}

.gl-hamburger {
	display: none;
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 8px;
	flex-direction: column;
	gap: 4px;
}
.gl-hamburger span {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--text-primary);
	border-radius: 1px;
	transition: transform var(--transition-fast);
}

.gl-theme-toggle {
	background: var(--bg-card);
	backdrop-filter: blur(12px);
	border: 1px solid var(--border-color);
	color: var(--text-primary);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	transition: all var(--transition-fast);
}
.gl-theme-toggle:hover {
	border-color: var(--accent-primary);
	color: var(--accent-primary);
	box-shadow: var(--shadow-glow);
}
.gl-theme-toggle .gl-icon-sun { display: none; }
.gl-theme-toggle .gl-icon-moon { display: inline; }
[data-theme="light"] .gl-theme-toggle .gl-icon-sun { display: inline; }
[data-theme="light"] .gl-theme-toggle .gl-icon-moon { display: none; }

.gl-user-chip {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 14px 6px 6px;
	background: var(--bg-card);
	backdrop-filter: blur(12px);
	border: 1px solid var(--border-color);
	border-radius: 100px;
	transition: border-color var(--transition-fast);
}
.gl-user-chip:hover { border-color: var(--border-hover); }

.gl-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 13px;
	text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.gl-user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.gl-user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.gl-user-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.gl-content-wrap {
	padding: 32px;
	flex: 1;
}

/* ---------- Page header (h1 + subtitle) ---------- */
.gl-page-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 28px;
	gap: 24px;
}
.gl-page-title {
	margin: 0;
	font-size: 30px;
	font-weight: 700;
	letter-spacing: -0.5px;
	background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-tertiary));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.gl-page-subtitle {
	margin: 6px 0 0;
	color: var(--text-secondary);
	font-size: 14px;
}

/* ---------- Status indicators ---------- */
.gl-status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	display: inline-block;
	background: var(--text-muted);
}
.gl-status-dot.gl-status-active { background: var(--success); box-shadow: 0 0 8px rgba(63, 185, 80, 0.6); }
.gl-status-dot.gl-status-expired { background: var(--danger); }
.gl-status-dot.gl-status-past_due { background: var(--warning); }
.gl-status-dot.gl-status-none { background: var(--text-muted); }

.gl-status-chip {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 100px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.3px;
	background: rgba(255,255,255,0.06);
	border: 1px solid var(--border-color);
}
.gl-status-chip.gl-status-success { background: rgba(63,185,80,0.12); border-color: rgba(63,185,80,0.4); color: var(--success); }
.gl-status-chip.gl-status-warning { background: rgba(210,153,34,0.12); border-color: rgba(210,153,34,0.4); color: var(--warning); }
.gl-status-chip.gl-status-muted { color: var(--text-muted); }

/* ---------- Tabs ---------- */
.gl-tabs {
	display: flex;
	gap: 4px;
	border-bottom: 1px solid var(--border-color);
	margin-bottom: 28px;
	overflow-x: auto;
}
.gl-tab {
	padding: 12px 16px;
	color: var(--text-secondary);
	font-size: 14px;
	font-weight: 600;
	border-bottom: 2px solid transparent;
	transition: color var(--transition-fast), border-color var(--transition-fast);
	white-space: nowrap;
}
.gl-tab:hover { color: var(--text-primary); }
.gl-tab.is-active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }

.gl-tab-rail {
	display: flex;
	gap: 10px;
	margin-bottom: 28px;
	overflow-x: auto;
	padding-bottom: 4px;
}
.gl-tab-pill {
	padding: 8px 16px;
	color: var(--text-secondary);
	background: var(--bg-card);
	backdrop-filter: blur(12px);
	border: 1px solid var(--border-color);
	border-radius: 100px;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	transition: all var(--transition-fast);
}
.gl-tab-pill:hover { color: var(--text-primary); border-color: var(--border-hover); }
.gl-tab-pill.is-active {
	background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
	color: #ffffff;
	border-color: transparent;
	box-shadow: 0 4px 16px var(--accent-glow);
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
	.gl-sidebar {
		position: fixed;
		left: 0;
		top: 0;
		transform: translateX(-100%);
		transition: transform var(--transition-base);
		box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
	}
	.gl-sidebar.is-open { transform: translateX(0); }
	.gl-hamburger { display: flex; }
	.gl-content-wrap { padding: 20px; }
	.gl-user-meta { display: none; }
	.gl-page-title { font-size: 24px; }
	.gl-page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- Auth ---------- */
.gl-auth-page {
	background: var(--bg-primary);
	min-height: calc(100vh - 72px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	position: relative;
}
.gl-auth-page::before {
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 600px 400px at 20% 30%, rgba(58, 141, 255, 0.2), transparent),
		radial-gradient(ellipse 500px 400px at 80% 70%, rgba(108, 92, 255, 0.15), transparent);
	pointer-events: none;
}
.gl-auth-shell { width: 100%; max-width: 440px; position: relative; z-index: 1; }
.gl-auth-card {
	background: var(--bg-card);
	backdrop-filter: blur(24px) saturate(1.4);
	-webkit-backdrop-filter: blur(24px) saturate(1.4);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-xl);
	padding: 36px;
	box-shadow: var(--shadow-card);
}
.gl-auth-brand { text-align: center; margin-bottom: 28px; }
.gl-auth-brand h1 { margin: 14px 0 0; font-size: 28px; font-weight: 700; }
.gl-auth-brand h1 strong {
	background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.gl-auth-tabs { display: flex; border-bottom: 1px solid var(--border-color); margin-bottom: 24px; }
.gl-auth-tab { flex: 1; text-align: center; padding: 14px; color: var(--text-secondary); font-weight: 600; border-bottom: 2px solid transparent; transition: color var(--transition-fast), border-color var(--transition-fast); }
.gl-auth-tab:hover { color: var(--text-primary); }
.gl-auth-tab.is-active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }
.gl-auth-foot { margin-top: 22px; text-align: center; font-size: 14px; color: var(--text-secondary); }
.gl-auth-legal-note { margin-top: 18px; text-align: center; font-size: 12.5px; line-height: 1.6; color: var(--text-muted); }
.gl-auth-legal-note a { color: var(--accent-primary) !important; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.gl-auth-legal-note a:hover { color: var(--accent-hover) !important; }

.gl-field-inline { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 18px; }
.gl-check-label { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.gl-link { color: var(--accent-primary); font-size: 13px; }


