:root {
	color-scheme: dark;
	--canvas: #080b12;
	--canvas-raised: #0d111b;
	--surface: rgba(20, 26, 40, 0.88);
	--surface-strong: #171e2d;
	--surface-hover: #1c2638;
	--border: rgba(148, 163, 184, 0.18);
	--border-strong: rgba(125, 211, 252, 0.36);
	--text: #f4f7fb;
	--text-muted: #9aa8bc;
	--text-soft: #cbd5e1;
	--cyan: #67e8f9;
	--cyan-strong: #22d3ee;
	--violet: #a78bfa;
	--green: #4ade80;
	--danger: #fb7185;
	--shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.42);
	--shadow-card: 0 18px 48px rgba(0, 0, 0, 0.2);
	--radius-sm: 0.625rem;
	--radius-md: 1rem;
	--radius-lg: 1.5rem;
	--content-width: 72rem;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	min-height: 100%;
	background: var(--canvas);
}

body {
	min-height: 100vh;
	margin: 0;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--text);
	background:
		radial-gradient(circle at 15% 10%, rgba(34, 211, 238, 0.12), transparent 30rem),
		radial-gradient(circle at 85% 4%, rgba(167, 139, 250, 0.12), transparent 28rem),
		linear-gradient(180deg, #0b0f18 0%, var(--canvas) 58%);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body::before {
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	content: "";
	background-image:
		linear-gradient(rgba(148, 163, 184, 0.026) 1px, transparent 1px),
		linear-gradient(90deg, rgba(148, 163, 184, 0.026) 1px, transparent 1px);
	background-size: 3rem 3rem;
	mask-image: linear-gradient(to bottom, black, transparent 78%);
}

main {
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
select,
textarea {
	font: inherit;
}

button,
input {
	min-height: 2.875rem;
	border-radius: var(--radius-sm);
}

input {
	width: 100%;
	padding: 0.75rem 0.875rem;
	border: 1px solid var(--border);
	color: var(--text);
	background: rgba(7, 11, 19, 0.72);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
	transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:hover {
	border-color: rgba(148, 163, 184, 0.34);
	background: rgba(11, 16, 27, 0.88);
}

input:focus {
	border-color: var(--cyan-strong);
	outline: none;
	box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.625rem;
	padding: 0.75rem 1rem;
	border: 1px solid rgba(103, 232, 249, 0.42);
	font-weight: 720;
	color: #061017;
	cursor: pointer;
	background: linear-gradient(135deg, var(--cyan), #93c5fd);
	box-shadow: 0 12px 32px rgba(34, 211, 238, 0.16);
	transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

button:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
	box-shadow: 0 16px 38px rgba(34, 211, 238, 0.22);
}

button:active {
	transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 3px solid var(--cyan);
	outline-offset: 3px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	width: max-content;
	border-radius: var(--radius-sm);
}

.brand__mark {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	border: 1px solid rgba(103, 232, 249, 0.42);
	border-radius: 0.8rem;
	font-size: 0.76rem;
	font-weight: 850;
	letter-spacing: 0.08em;
	color: var(--cyan);
	background:
		linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(167, 139, 250, 0.15)),
		var(--canvas-raised);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand__copy {
	display: grid;
	line-height: 1.15;
}

.brand__copy strong {
	font-size: 0.98rem;
	font-weight: 760;
	letter-spacing: -0.01em;
}

.brand__copy small {
	margin-top: 0.22rem;
	font-size: 0.69rem;
	font-weight: 650;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.eyebrow {
	margin: 0 0 0.875rem;
	font-size: 0.72rem;
	font-weight: 780;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--cyan);
}

.lede {
	max-width: 42rem;
	margin: 0;
	color: var(--text-muted);
}

.auth-page {
	display: grid;
	place-items: center;
	padding: 2rem;
}

.auth-shell {
	display: grid;
	gap: 1.5rem;
	width: min(100%, 27rem);
	margin: 0 auto;
}

.auth-shell > .brand {
	margin-left: 0.5rem;
}

.auth-card {
	position: relative;
	overflow: hidden;
	padding: clamp(1.5rem, 5vw, 2.5rem);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: linear-gradient(155deg, rgba(25, 33, 49, 0.96), rgba(13, 18, 29, 0.94));
	box-shadow: var(--shadow-lg);
	backdrop-filter: blur(18px);
}

.auth-card::before {
	position: absolute;
	top: 0;
	left: 2rem;
	right: 2rem;
	height: 1px;
	content: "";
	background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
}

.auth-card h1,
.dashboard-hero h1 {
	margin: 0;
	font-size: clamp(2rem, 6vw, 3.5rem);
	line-height: 1.04;
	letter-spacing: -0.045em;
}

.auth-card h1 {
	font-size: clamp(2rem, 8vw, 2.8rem);
}

.auth-card > .lede {
	margin-top: 0.9rem;
}

.auth-card form {
	display: grid;
	gap: 1rem;
	margin-top: 2rem;
}

.auth-card label {
	display: grid;
	gap: 0.45rem;
}

.auth-card label > span {
	font-size: 0.79rem;
	font-weight: 680;
	letter-spacing: 0.035em;
	color: var(--text-soft);
}

.auth-card button {
	width: 100%;
	margin-top: 0.25rem;
}

.auth-card__meta {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 1.5rem 0 0;
	padding-top: 1.25rem;
	border-top: 1px solid var(--border);
	font-size: 0.76rem;
	color: var(--text-muted);
}

.status-dot {
	width: 0.48rem;
	height: 0.48rem;
	border-radius: 50%;
	background: var(--green);
	box-shadow: 0 0 0 0.22rem rgba(74, 222, 128, 0.1), 0 0 1rem rgba(74, 222, 128, 0.35);
}

.app-page {
	display: flex;
	flex-direction: column;
}

.app-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 5rem;
	padding: 1rem max(1.5rem, calc((100vw - var(--content-width)) / 2));
	border-bottom: 1px solid var(--border);
	background: rgba(8, 11, 18, 0.74);
	backdrop-filter: blur(18px);
}

.app-header__context {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.42rem 0.7rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 680;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-muted);
	background: rgba(15, 21, 33, 0.72);
}

.app-header__context::before {
	width: 0.4rem;
	height: 0.4rem;
	border-radius: 50%;
	content: "";
	background: var(--green);
	box-shadow: 0 0 0.75rem rgba(74, 222, 128, 0.5);
}

.dashboard-shell {
	flex: 1;
	width: min(calc(100% - 3rem), var(--content-width));
	margin: 0 auto;
	padding: clamp(3.5rem, 8vw, 7rem) 0 5rem;
}

.dashboard-hero {
	display: grid;
	gap: 0;
	max-width: 48rem;
}

.dashboard-hero .lede {
	margin-top: 1.1rem;
	font-size: clamp(1rem, 2vw, 1.15rem);
}

.nav-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: 1rem;
	margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

.nav-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 13.5rem;
	padding: 1.5rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	background: linear-gradient(150deg, rgba(24, 31, 46, 0.9), rgba(13, 18, 29, 0.88));
	box-shadow: var(--shadow-card);
	transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.nav-card::after {
	position: absolute;
	inset: auto 1.5rem 0;
	height: 1px;
	content: "";
	background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.4), transparent);
	opacity: 0;
	transition: opacity 180ms ease;
}

.nav-card:hover {
	border-color: var(--border-strong);
	background: linear-gradient(150deg, rgba(29, 40, 57, 0.96), rgba(16, 23, 36, 0.94));
	box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(34, 211, 238, 0.04);
	transform: translateY(-3px);
}

.nav-card:hover::after {
	opacity: 1;
}

.nav-card__module {
	width: max-content;
	padding: 0.3rem 0.55rem;
	border: 1px solid rgba(167, 139, 250, 0.24);
	border-radius: 999px;
	font-size: 0.66rem;
	font-weight: 760;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #c4b5fd;
	background: rgba(124, 58, 237, 0.09);
}

.nav-card__title {
	margin-top: 1.6rem;
	font-size: 1.28rem;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.nav-card__action {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: auto;
	padding-top: 1.8rem;
	font-size: 0.82rem;
	font-weight: 660;
	color: var(--text-muted);
}

.nav-card__action span {
	font-size: 1.05rem;
	color: var(--cyan);
	transition: transform 180ms ease;
}

.nav-card:hover .nav-card__action span {
	transform: translateX(0.2rem);
}

.empty-state {
	display: grid;
	gap: 0.45rem;
	grid-column: 1 / -1;
	padding: 2rem;
	border: 1px dashed rgba(148, 163, 184, 0.28);
	border-radius: var(--radius-md);
	color: var(--text-soft);
	background: rgba(15, 21, 33, 0.55);
}

.empty-state span {
	font-size: 0.9rem;
	color: var(--text-muted);
}

.app-footer {
	display: flex;
	justify-content: space-between;
	width: min(calc(100% - 3rem), var(--content-width));
	margin: 0 auto;
	padding: 1.5rem 0 2rem;
	border-top: 1px solid var(--border);
	font-size: 0.72rem;
	font-weight: 650;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-muted);
}

@media (max-width: 720px) {
	.auth-page {
		align-items: start;
		padding: 1.25rem;
	}

	.auth-shell {
		margin-top: 8vh;
	}

	.auth-card {
		padding: 1.5rem;
		border-radius: 1.25rem;
	}

	.app-header {
		min-height: 4.5rem;
		padding-inline: 1rem;
	}

	.app-header__context {
		display: none;
	}

	.dashboard-shell,
	.app-footer {
		width: min(calc(100% - 2rem), var(--content-width));
	}

	.dashboard-shell {
		padding-top: 3.5rem;
	}

	.nav-grid {
		grid-template-columns: 1fr;
		margin-top: 2.5rem;
	}

	.nav-card {
		min-height: 11.5rem;
	}

	.app-footer {
		gap: 1rem;
		padding-bottom: 1.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
