:root {
	--bg: #0b0f1a;
	--bg-2: #101626;
	--card: #141a2a;
	--card-2: #181f32;
	--ink: #ffffff;
	--muted: #8b9bb4;
	--accent: #3ddc97;
	--accent-soft: rgba(61, 220, 151, 0.12);
	--border: rgba(255, 255, 255, 0.08);
	--danger: #ef4444;
	--warn: #fbbf24;
	--shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}

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

body {
	margin: 0;
	font-family: "Inter", "Segoe UI", sans-serif;
	background:
		radial-gradient(circle at 8% 8%, rgba(61, 220, 151, 0.16), transparent 38%),
		radial-gradient(circle at 88% 92%, rgba(59, 130, 246, 0.12), transparent 35%),
		linear-gradient(135deg, var(--bg), var(--bg-2));
	color: var(--ink);
	min-height: 100vh;
}

h1,
h2,
h3,
h4 {
	font-family: "Inter", "Segoe UI", sans-serif;
	margin: 0 0 0.6rem;
	line-height: 1.3;
}

p {
	margin: 0;
	color: var(--muted);
	line-height: 1.55;
}

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

.portal-body {
	position: relative;
	overflow-x: hidden;
}

.flash-stack {
	position: fixed;
	top: 24px;
	right: 24px;
	display: grid;
	gap: 10px;
	z-index: 100;
	max-width: min(360px, 90vw);
}

.flash {
	background: var(--card-2);
	border: 1px solid var(--border);
	border-left: 4px solid var(--accent);
	border-radius: 12px;
	padding: 12px 14px;
	box-shadow: var(--shadow);
	font-size: 0.9rem;
}

.flash-error {
	border-left-color: var(--danger);
}

.flash-warning {
	border-left-color: var(--warn);
}

.flash-success {
	border-left-color: var(--accent);
}

.bg-orb {
	position: fixed;
	border-radius: 50%;
	opacity: 0.7;
	z-index: 0;
	pointer-events: none;
}

.orb-1 {
	width: 400px;
	height: 400px;
	top: -120px;
	left: -130px;
	background: radial-gradient(circle, rgba(61, 220, 151, 0.24), transparent 68%);
}

.orb-2 {
	width: 360px;
	height: 360px;
	bottom: -140px;
	right: -120px;
	background: radial-gradient(circle, rgba(59, 130, 246, 0.2), transparent 68%);
}

.orb-3 {
	width: 280px;
	height: 280px;
	top: 40%;
	right: 20%;
	background: radial-gradient(circle, rgba(168, 85, 247, 0.14), transparent 68%);
}

.portal-shell {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 24px;
	padding: 24px;
	max-width: 1440px;
	margin: 0 auto;
	position: relative;
	z-index: 1;
}

.side-nav {
	background: rgba(20, 26, 42, 0.9);
	backdrop-filter: blur(8px);
	border: 1px solid var(--border);
	border-radius: 20px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	height: fit-content;
	position: sticky;
	top: 24px;
	box-shadow: var(--shadow);
}

.brand {
	display: flex;
	align-items: center;
	gap: 8px;
}

.brand-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 7px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--accent), #2bb67d);
}

.brand-mark img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.brand-name {
	font-size: 1rem;
	font-weight: 600;
}

.nav-group {
	display: grid;
	gap: 6px;
}

.nav-link {
	padding: 10px 12px;
	border-radius: 10px;
	color: var(--muted);
	transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
	background: var(--accent-soft);
	color: var(--accent);
	outline: none;
}

.nav-link.active {
	background: var(--accent-soft);
	color: var(--accent);
}

.lang-card {
	margin-top: auto;
	padding: 8px;
	border-radius: 12px;
	background: rgba(61, 220, 151, 0.1);
	border: 1px solid rgba(61, 220, 151, 0.25);
	text-align: center;
	font-weight: 600;
	color: var(--accent);
}

.lang-card form {
	margin: 0;
}

.lang-btn {
	width: 100%;
	border: none;
	border-radius: 9px;
	background: transparent;
	color: var(--accent);
	font: inherit;
	font-weight: 700;
	padding: 8px 10px;
	cursor: pointer;
}

.lang-btn:hover {
	background: rgba(61, 220, 151, 0.12);
}

.side-card {
	margin-top: auto;
	background: var(--card-2);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 14px;
	display: grid;
	gap: 8px;
}

.side-card h3 {
	font-size: 0.9rem;
	margin: 0;
}

.side-card p {
	font-size: 0.85rem;
	margin-bottom: 4px;
}

.side-card-user {
	margin-top: 10px;
}

.portal-main {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.portal-header {
	display: flex;
	justify-content: space-between;
	align-items: end;
	gap: 18px;
}

.subtitle {
	max-width: 720px;
}

.header-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.panel {
	background: rgba(20, 26, 42, 0.92);
	border: 1px solid var(--border);
	border-radius: 20px;
	padding: 22px;
	box-shadow: var(--shadow);
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 16px;
}

.page-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.align-center {
	text-align: center;
}

.align-center .subtitle {
	margin: 8px auto 0;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}

.stats-grid-1 {
	grid-template-columns: 1fr;
}

.stats-grid-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-grid-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 14px;
	display: grid;
	gap: 6px;
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
	transform: translateY(-2px) scale(1.01);
	border-color: rgba(61, 220, 151, 0.28);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

.stat-card-accent {
	background: linear-gradient(140deg, rgba(61, 220, 151, 0.16), rgba(20, 26, 42, 0.95));
	border-color: rgba(61, 220, 151, 0.36);
}

.stat-label {
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}

.stat-value {
	font-size: 1.35rem;
	font-weight: 600;
}

.stat-note {
	font-size: 0.82rem;
	color: var(--muted);
}

.status-row {
	margin-top: 14px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.status-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 16px;
	display: grid;
	gap: 12px;
}

.status-highlight {
	background: linear-gradient(135deg, rgba(61, 220, 151, 0.15), rgba(61, 220, 151, 0.04));
	border-color: rgba(61, 220, 151, 0.35);
}

.status-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.steps {
	display: grid;
	gap: 6px;
	font-size: 0.9rem;
	color: var(--muted);
}

.key-grid,
.server-grid,
.plans,
.support-grid,
.referral-grid {
	display: grid;
	gap: 12px;
}

.key-grid {
	grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.server-grid {
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.key-card,
.server-card,
.plan-card,
.support-card,
.referral-card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 14px;
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.key-card:hover,
.server-card:hover,
.plan-card:hover,
.support-card:hover,
.referral-card:hover {
	transform: translateY(-2px) scale(1.01);
	border-color: rgba(61, 220, 151, 0.35);
	box-shadow: 0 14px 30px rgba(2, 8, 24, 0.44);
}

.key-card {
	display: grid;
	gap: 10px;
}

.server-card {
	display: grid;
	gap: 10px;
	padding: 18px;
}

.server-select-card {
	text-decoration: none;
	transition: transform 0.15s ease, border-color 0.15s ease;
}

.server-select-card:hover {
	transform: translateY(-2px);
	border-color: rgba(61, 220, 151, 0.45);
}

.server-card-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
}

.server-card-sub {
	font-size: 0.95rem;
	color: var(--muted);
}

.server-dot {
	width: 12px;
	height: 12px;
	border-radius: 999px;
	display: inline-flex;
}

.server-dot.ok {
	background: var(--accent);
}

.server-dot.bad {
	background: var(--danger);
}

.server-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 0.95rem;
}

.server-load-track {
	height: 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	overflow: hidden;
}

.server-load-fill {
	height: 100%;
	border-radius: 999px;
}

.server-load-fill.ok {
	background: #3ddc97;
}

.server-load-fill.mid {
	background: #fbbf24;
}

.server-load-fill.high {
	background: #ef4444;
}

.key-top {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	align-items: center;
}

.key-name {
	font-weight: 600;
}

.key-meta {
	display: grid;
	gap: 4px;
	font-size: 0.88rem;
	color: var(--muted);
}

.key-meta-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.key-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.inline-form {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
	margin: 0;
}

.plans {
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.plan-card {
	display: grid;
	gap: 10px;
	position: relative;
	transition: transform 0.15s ease, border-color 0.15s ease;
}

.plan-card.has-badge {
	padding-top: 44px;
}

.plan-card:hover {
	transform: translateY(-2px);
}

.plan-featured {
	border: 1px solid rgba(61, 220, 151, 0.45);
	background: linear-gradient(160deg, rgba(61, 220, 151, 0.16), rgba(20, 26, 42, 0.94));
}

.plan-card.plan-selected {
	border-color: rgba(59, 130, 246, 0.8);
	box-shadow: 0 12px 30px rgba(59, 130, 246, 0.25);
}

.plan-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 3px 9px;
	font-size: 0.74rem;
	border-radius: 999px;
	background: var(--accent);
	color: #03110a;
	font-weight: 600;
}

.plan-badge-value {
	right: auto;
	left: 12px;
	background: rgba(59, 130, 246, 0.95);
	color: #e7f1ff;
}

.plan-price {
	font-size: 1.4rem;
	font-weight: 600;
	margin: 0;
}

.plan-price span {
	font-size: 0.84rem;
	color: var(--muted);
}

.plan-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 5px;
	font-size: 0.88rem;
	color: var(--muted);
}

.table {
	display: grid;
	gap: 8px;
}

.table-row {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	padding: 10px 12px;
	align-items: center;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 10px;
}

.table-head {
	background: transparent;
	border: none;
	padding: 0 2px 6px;
	font-size: 0.76rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--muted);
}

.timeline {
	display: grid;
	gap: 10px;
}

.timeline-item {
	display: grid;
	grid-template-columns: 14px 1fr;
	gap: 10px;
}

.timeline-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	margin-top: 8px;
	background: linear-gradient(135deg, var(--accent), #2bb67d);
}

.timeline-time {
	font-size: 0.8rem;
	color: var(--muted);
}

.support-grid {
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.support-card {
	display: grid;
	gap: 8px;
}

.support-card summary {
	list-style: none;
	cursor: pointer;
}

.support-card summary::-webkit-details-marker {
	display: none;
}

.referral-grid {
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.referral-card.stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	text-align: center;
	gap: 10px;
}

.referral-link {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px;
}

.referral-link input,
.field > input,
.select-field select {
	width: 100%;
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 9px 11px;
	background: rgba(20, 26, 42, 0.95);
	color: var(--ink);
	font-family: inherit;
}

.referral-link input::placeholder,
.field > input::placeholder {
	color: rgba(139, 155, 180, 0.8);
}

.select-field {
	display: inline-flex;
}

.select-field select {
	color-scheme: dark;
	min-width: 150px;
}

.select-field select option {
	background: #141a2a;
	color: #ffffff;
}

.select-field select:focus,
.field > input:focus,
.referral-link input:focus {
	outline: none;
	border-color: rgba(61, 220, 151, 0.7);
	box-shadow: 0 0 0 2px rgba(61, 220, 151, 0.2);
}

.empty-state {
	display: grid;
	gap: 8px;
	text-align: center;
	padding: 20px;
	border-radius: 14px;
	border: 1px dashed var(--border);
	background: rgba(255, 255, 255, 0.02);
}

.btn-primary,
.btn-ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: none;
	padding: 9px 14px;
	border-radius: 10px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
}

.btn-primary {
	background: linear-gradient(135deg, var(--accent), #2bb67d);
	color: #06140d;
}

.btn-ghost {
	background: rgba(255, 255, 255, 0.05);
	color: var(--ink);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-primary:hover,
.btn-ghost:hover {
	transform: translateY(-1px) scale(1.01);
}

.btn-primary:hover {
	filter: brightness(1.05);
	box-shadow: 0 0 0 1px rgba(61, 220, 151, 0.25), 0 10px 24px rgba(61, 220, 151, 0.26);
}

.btn-primary:disabled,
.btn-ghost:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.btn-full {
	width: 100%;
}

.pill {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	background: rgba(255, 255, 255, 0.08);
	color: var(--muted);
}

.pill-muted {
	background: rgba(139, 155, 180, 0.18);
	color: #c6d2e5;
}

.pill-accent,
.pill-live {
	background: rgba(61, 220, 151, 0.16);
	color: var(--accent);
}

.pill-warn {
	background: rgba(251, 191, 36, 0.16);
	color: var(--warn);
}

.pill-off {
	background: rgba(239, 68, 68, 0.16);
	color: #fca5a5;
}

.eyebrow {
	display: inline-flex;
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #9ac6ff;
	margin-bottom: 10px;
}

.fade-up {
	animation: fadeUp 0.5s ease both;
	animation-delay: var(--delay, 0s);
}

@keyframes fadeUp {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.login-shell {
	min-height: 100vh;
	width: 100%;
	max-width: 1040px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	position: relative;
	z-index: 1;
}

.login-card {
	width: 100%;
	max-width: 980px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
	gap: 32px;
	align-items: start;
	background: rgba(20, 26, 42, 0.92);
	border: 1px solid var(--border);
	border-radius: 24px;
	padding: 32px;
	box-shadow: var(--shadow);
}

.login-copy {
	display: grid;
	gap: 14px;
	max-width: 460px;
}

.login-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 2px;
}

.login-brand img {
	width: 24px;
	height: 24px;
}

.login-brand span {
	font-weight: 700;
	color: #e9f5ff;
}

.login-card-hero {
	background:
		linear-gradient(135deg, rgba(14, 20, 35, 0.95), rgba(10, 24, 49, 0.9)),
		radial-gradient(circle at 4% 8%, rgba(61, 220, 151, 0.14), transparent 36%);
}

.login-copy-hero h1 {
	font-size: clamp(2.5rem, 3.2vw, 3.25rem);
	line-height: 1.15;
	max-width: 12ch;
	margin-bottom: 2px;
}

.login-lead {
	max-width: 420px;
	font-size: 1.05rem;
	color: #9fb0c9;
}

.login-benefits {
	display: grid;
	gap: 12px;
	margin-top: 2px;
}

.benefit {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #dae6f7;
	font-weight: 600;
}

.benefit-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 10px;
	background: rgba(61, 220, 151, 0.16);
	border: 1px solid rgba(61, 220, 151, 0.35);
	color: var(--accent);
	font-family: "Inter", "Segoe UI", sans-serif;
	font-weight: 700;
	font-size: 0.88rem;
}

.hero-panel {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
	gap: 16px;
	align-items: end;
	background:
		linear-gradient(145deg, rgba(61, 220, 151, 0.12), rgba(20, 26, 42, 0.96)),
		radial-gradient(circle at 10% 0%, rgba(61, 220, 151, 0.16), transparent 40%);
	border-color: rgba(61, 220, 151, 0.35);
}

.hero-copy {
	display: grid;
	gap: 12px;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.hero-kpis {
	display: grid;
	gap: 10px;
}

.hero-kpi {
	display: grid;
	gap: 4px;
	padding: 12px;
	border-radius: 12px;
	background: rgba(11, 15, 26, 0.55);
	border: 1px solid rgba(61, 220, 151, 0.2);
}

.hero-kpi-label {
	color: var(--muted);
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.hero-kpi strong {
	font-size: 1.6rem;
	line-height: 1.1;
}

.onboarding-panel {
	background:
		linear-gradient(180deg, rgba(20, 26, 42, 0.95), rgba(14, 20, 35, 0.95)),
		radial-gradient(circle at 15% 10%, rgba(59, 130, 246, 0.12), transparent 36%);
}

.onboarding-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.onboarding-step {
	padding: 14px;
	border-radius: 14px;
	background: rgba(11, 15, 26, 0.48);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.onboarding-step h3 {
	margin: 4px 0 6px;
	font-size: 1rem;
}

.onboarding-step p {
	font-size: 0.9rem;
}

.onboarding-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 999px;
	background: rgba(61, 220, 151, 0.18);
	border: 1px solid rgba(61, 220, 151, 0.4);
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--accent);
}

[data-tooltip] {
	position: relative;
	cursor: help;
}

[data-tooltip]::after {
	content: attr(data-tooltip);
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	transform: translateX(-50%) translateY(4px);
	opacity: 0;
	pointer-events: none;
	white-space: nowrap;
	font-size: 0.76rem;
	line-height: 1.2;
	padding: 6px 8px;
	border-radius: 8px;
	background: rgba(8, 12, 22, 0.96);
	border: 1px solid rgba(61, 220, 151, 0.35);
	color: #d9e6fb;
	transition: opacity 0.14s ease, transform 0.14s ease;
	z-index: 10;
}

[data-tooltip]:hover::after {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.login-trust {
	margin-top: 10px;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.trust-pill {
	display: inline-flex;
	align-items: center;
	padding: 8px 12px;
	border-radius: 999px;
	background: rgba(61, 220, 151, 0.14);
	border: 1px solid rgba(61, 220, 151, 0.35);
	color: #b9ffd9;
	font-size: 0.82rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	font-weight: 700;
}

.trust-note {
	color: #8ea3c2;
	font-size: 0.92rem;
}

.login-form {
	display: grid;
	gap: 12px;
	width: 100%;
	max-width: 420px;
	justify-self: start;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 32px;
}

.login-form-elevated {
	background: linear-gradient(180deg, rgba(24, 32, 51, 0.96), rgba(16, 24, 40, 0.96));
	border: 1px solid rgba(255, 255, 255, 0.05);
	backdrop-filter: blur(8px);
	box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
	padding: 32px;
}

.form-title p {
	font-size: 0.92rem;
	margin-top: 4px;
}

.field {
	display: grid;
	gap: 6px;
	font-size: 0.9rem;
}

.field-help {
	color: var(--muted);
	font-size: 0.78rem;
}

.field-input {
	display: grid;
	grid-template-columns: 28px 1fr auto;
	align-items: center;
	gap: 8px;
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 0 10px;
	background: rgba(20, 26, 42, 0.95);
}

.field-input .field-icon {
	opacity: 0.8;
	font-size: 0.95rem;
}

.field-input input {
	border: none;
	background: transparent;
	padding: 10px 0;
	color: #ffffff;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.2;
	-webkit-text-fill-color: #ffffff;
	caret-color: #3ddc97;
}

.field-input input::placeholder {
	color: rgba(139, 155, 180, 0.92);
	font-size: 0.96rem;
}

.field-input input:focus {
	outline: none;
	box-shadow: none;
}

.field-input input:-webkit-autofill,
.field-input input:-webkit-autofill:hover,
.field-input input:-webkit-autofill:focus {
	-webkit-text-fill-color: #ffffff;
	-webkit-box-shadow: 0 0 0 1000px rgba(20, 26, 42, 0.95) inset;
	transition: background-color 9999s ease-in-out 0s;
}

.field-input:focus-within {
	border-color: rgba(61, 220, 151, 0.7);
	box-shadow: 0 0 0 2px rgba(61, 220, 151, 0.2);
}

.password-toggle {
	border: none;
	background: transparent;
	color: #b7c9e2;
	cursor: pointer;
	font-size: 0.95rem;
	padding: 4px 2px;
}

.password-toggle:hover {
	color: var(--accent);
}

.login-form .field span {
	color: #dbe4f2;
}

.tg-auth-btn {
	border-color: rgba(61, 220, 151, 0.35);
}

.tg-auth-btn[disabled] {
	opacity: 0.65;
	cursor: not-allowed;
}

.tg-auth-note {
	font-size: 0.85rem;
	color: var(--muted);
}

.form-hint {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	font-size: 0.86rem;
	color: var(--muted);
}

.link {
	color: var(--accent);
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.portal-body.modal-open {
	overflow: hidden;
}

.qr-modal,
.plan-modal {
	position: fixed;
	inset: 0;
	z-index: 200;
	background: rgba(4, 8, 14, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.qr-modal[hidden],
.plan-modal[hidden] {
	display: none;
}

.qr-backdrop,
.plan-backdrop {
	position: absolute;
	inset: 0;
}

.qr-dialog,
.plan-dialog {
	width: min(440px, 100%);
	background: var(--card-2);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 16px;
	display: grid;
	gap: 10px;
	position: relative;
	z-index: 1;
	box-shadow: var(--shadow);
}

.plan-summary {
	display: grid;
	gap: 8px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 10px;
}

.plan-row {
	display: flex;
	justify-content: space-between;
	gap: 10px;
}

.qr-image {
	display: grid;
	place-items: center;
	padding: 12px;
	border: 1px dashed var(--border);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.02);
}

.qr-image img {
	max-width: 100%;
	height: auto;
	background: #fff;
	padding: 6px;
	border-radius: 8px;
}

.qr-close,
.plan-close {
	position: absolute;
	top: 10px;
	right: 10px;
	border: none;
	background: transparent;
	color: var(--muted);
	font-size: 1.2rem;
	cursor: pointer;
}

@media (min-width: 1440px) {
	.login-shell {
		max-width: 1040px;
		padding: 24px;
	}

	.login-card {
		max-width: 980px;
		grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
		gap: 32px;
		padding: 32px;
	}
}

@media (min-width: 1280px) and (max-width: 1439px) {
	.login-shell {
		max-width: 1020px;
		padding: 24px 20px;
	}

	.login-card {
		max-width: 960px;
		grid-template-columns: minmax(0, 1fr) minmax(350px, 400px);
		gap: 30px;
		padding: 32px;
	}
}

@media (min-width: 1024px) and (max-width: 1279px) {
	.login-shell {
		max-width: 960px;
		padding: 20px 14px;
	}

	.login-card {
		max-width: 920px;
		grid-template-columns: minmax(0, 1fr) minmax(330px, 380px);
		gap: 24px;
		padding: 24px;
	}

	.login-copy-hero h1 {
		font-size: clamp(2.2rem, 3vw, 2.8rem);
	}

	.login-lead {
		font-size: 1rem;
		max-width: 34ch;
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.login-shell {
		max-width: 980px;
		padding: 16px 14px;
	}

	.login-card,
	.login-card-mobile-priority {
		grid-template-columns: 1fr;
		max-width: 760px;
		gap: 16px;
		padding: 20px 18px;
	}

	.login-form {
		max-width: none;
		justify-self: stretch;
		padding: 22px 20px;
	}
}

@media (max-width: 1080px) {
	.portal-shell {
		grid-template-columns: 1fr;
	}

	.hero-panel {
		grid-template-columns: 1fr;
	}

	.onboarding-grid {
		grid-template-columns: 1fr 1fr;
	}

	.side-nav {
		position: static;
	}

	.stats-grid,
	.status-row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.key-meta-3 {
		grid-template-columns: 1fr;
	}

	.portal-header {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 820px) {
	.login-card {
		grid-template-columns: 1fr;
		padding: 18px;
	}

	.login-form {
		max-width: none;
		justify-self: stretch;
		padding: 16px 14px;
	}

	.login-copy-hero h1 {
		max-width: none;
	}

	.referral-card.stats {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 680px) {
	.portal-shell {
		padding: 14px;
	}

	.panel {
		padding: 16px;
	}

	.stats-grid,
	.status-row,
	.table-row {
		grid-template-columns: 1fr;
	}

	.onboarding-grid {
		grid-template-columns: 1fr;
	}

	.page-head {
		flex-direction: column;
		align-items: flex-start;
	}

	.table-head {
		display: none;
	}

	.referral-link {
		grid-template-columns: 1fr;
	}
}

/* --- Mobile UX refresh (TechRenewal) --- */
.mobile-topbar {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.mobile-topbar-status {
	display: grid;
	gap: 4px;
}

.mobile-bottom-nav {
	display: none;
	position: fixed;
	left: 10px;
	right: 10px;
	bottom: 10px;
	z-index: 120;
	padding: 10px;
	border-radius: 16px;
	background: rgba(11, 15, 26, 0.92);
	border: 1px solid rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(10px);
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 4px;
}

.mobile-account-actions {
	display: none;
	position: fixed;
	left: 10px;
	right: 10px;
	bottom: 72px;
	z-index: 121;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.mobile-account-actions form {
	margin: 0;
}

.mobile-account-btn {
	width: 100%;
	min-height: 42px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(20, 26, 42, 0.92);
	color: #d6e2f3;
	font-weight: 600;
	font-size: 0.84rem;
}

.mobile-account-btn-lang {
	color: var(--accent);
	border-color: rgba(61, 220, 151, 0.35);
}

.mobile-account-btn-logout {
	color: #ffd5d5;
	border-color: rgba(239, 68, 68, 0.35);
}

.mobile-nav-link {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	text-align: center;
	min-height: 40px;
	border-radius: 10px;
	font-size: 0.72rem;
	color: #a8b8cf;
	padding: 0 4px;
}

.mobile-nav-link.active {
	color: #04160f;
	background: var(--accent);
	font-weight: 700;
}

.mobile-fab-cta {
	display: none;
	position: fixed;
	left: 14px;
	right: 14px;
	bottom: 84px;
	z-index: 119;
	min-height: 52px;
	border-radius: 14px;
	background: linear-gradient(135deg, var(--accent), #2bb67d);
	color: #04160f;
	font-weight: 800;
	align-items: center;
	justify-content: center;
	box-shadow: 0 14px 28px rgba(61, 220, 151, 0.32);
}

.login-card-mobile-priority {
	grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
}

.login-benefits-secondary {
	grid-column: 1;
}

.login-form-compact {
	align-content: start;
}

.tg-auth-btn-primary {
	min-height: 52px;
	font-size: 1rem;
}

.btn-login-secondary {
	min-height: 52px;
}

.tg-steps {
	display: grid;
	gap: 4px;
	font-size: 0.82rem;
	color: var(--muted);
	padding: 8px 10px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.02);
}

.field-input {
	min-height: 48px;
	border-radius: 12px;
}

.field-input input {
	min-height: 46px;
	font-size: 1rem;
}

.quick-stepper .onboarding-step {
	display: block;
}

@media (max-width: 820px) {
	.login-shell {
		padding: 12px;
		min-height: 100svh;
	}

	.login-card-mobile-priority {
		grid-template-columns: 1fr;
		padding: 14px;
		gap: 12px;
		min-height: calc(100svh - 24px);
	}

	.login-card-mobile-priority .login-copy {
		gap: 10px;
	}

	.login-card-mobile-priority .login-form {
		padding: 14px;
		gap: 10px;
	}

	.login-copy-hero h1 {
		font-size: clamp(1.5rem, 7vw, 1.9rem);
		margin: 0;
	}

	.login-lead {
		display: none;
	}

	.hero-panel {
		display: none;
	}

	.mobile-topbar {
		display: flex;
	}

	.mobile-stats-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.desktop-status-card {
		display: none;
	}

	.onboarding-grid {
		grid-template-columns: 1fr;
	}

	.side-nav {
		display: none;
	}

	.portal-shell {
		grid-template-columns: 1fr;
		width: 100%;
		max-width: 560px;
		margin: 0 auto;
		padding: clamp(10px, 2.8vw, 14px);
		padding-bottom: 190px;
	}

	.portal-main {
		gap: clamp(12px, 2.8vw, 18px);
	}

	.panel {
		padding: clamp(14px, 3.2vw, 18px);
		border-radius: clamp(14px, 3vw, 18px);
	}

	.subtitle {
		font-size: clamp(0.9rem, 2.8vw, 1rem);
	}

	.stat-value {
		font-size: clamp(1.15rem, 4.8vw, 1.4rem);
	}

	.mobile-bottom-nav,
	.mobile-fab-cta,
	.mobile-account-actions {
		display: grid;
	}

	.mobile-fab-cta {
		display: flex;
		left: 50%;
		transform: translateX(-50%);
		width: min(calc(100% - 28px), 560px);
	}

	.mobile-bottom-nav {
		left: 50%;
		right: auto;
		transform: translateX(-50%);
		width: min(calc(100% - 20px), 560px);
	}

	.mobile-account-actions {
		left: 50%;
		right: auto;
		transform: translateX(-50%);
		width: min(calc(100% - 20px), 560px);
	}

	.login-benefits-secondary {
		border-top: 1px solid rgba(255, 255, 255, 0.08);
		padding-top: 10px;
	}
}

@media (max-width: 420px) {
	.login-card-mobile-priority {
		padding: 12px;
		border-radius: 18px;
	}

	.login-card-mobile-priority .login-copy {
		gap: 8px;
	}

	.login-card-mobile-priority .login-form {
		padding: 12px;
	}

	.login-benefits-secondary .benefit {
		font-size: 0.9rem;
	}

	.form-title h2 {
		font-size: 1.3rem;
	}
}

@media (max-width: 820px) and (min-width: 540px) {
	/* Large phones: keep content compact and centered instead of stretching edge-to-edge. */
	.portal-shell {
		max-width: 520px;
	}

	.mobile-bottom-nav,
	.mobile-account-actions,
	.mobile-fab-cta {
		width: min(calc(100% - 20px), 520px);
	}
}
