:root {
	--text-primary: #1a1d29;
	--text-secondary: #565b70;
	--text-muted: #7d8298;
	--accent: #1e88e5;
	--accent-2: #22d3ee;
	--radius: 22px;
	--glass-bg: rgba(255, 255, 255, 0.42);
	--glass-bg-strong: rgba(255, 255, 255, 0.68);
	--glass-border: rgba(255, 255, 255, 0.55);
	--glass-shadow:
		0 8px 32px rgba(31, 38, 80, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
}

body {
	margin: 0;
	font-family:
		"Inter",
		-apple-system,
		BlinkMacSystemFont,
		sans-serif;
	color: var(--text-primary);
	-webkit-font-smoothing: antialiased;
	background: #eef0fb;
	overflow-x: hidden;
	min-height: 100vh;
}

.bg-scene {
	position: fixed;
	inset: 0;
	z-index: -1;
	overflow: hidden;
}

.blob {
	position: absolute;
	border-radius: 50%;
	filter: blur(70px);
	opacity: 0.5;
}

.blob-1 {
	width: 520px;
	height: 520px;
	top: -140px;
	left: -120px;
	background: radial-gradient(
		circle at 30% 30%,
		#8ea1ff,
		#5b6cf0 60%,
		transparent 75%
	);
	animation: float1 22s ease-in-out infinite;
}

.blob-2 {
	width: 460px;
	height: 460px;
	top: 60px;
	right: -140px;
	background: radial-gradient(
		circle at 40% 40%,
		#5be4ff,
		#0aa5c4 60%,
		transparent 75%
	);
	animation: float2 26s ease-in-out infinite;
}

.blob-3 {
	width: 480px;
	height: 480px;
	bottom: -180px;
	left: 20%;
	background: radial-gradient(
		circle at 50% 50%,
		#8ff0d8,
		#12b3a0 60%,
		transparent 75%
	);
	animation: float3 30s ease-in-out infinite;
}

.blob-4 {
	width: 360px;
	height: 360px;
	bottom: 0;
	right: 8%;
	background: radial-gradient(
		circle at 50% 50%,
		#7fa8ff,
		#2451c9 60%,
		transparent 75%
	);
	animation: float1 20s ease-in-out infinite reverse;
}

@keyframes float1 {
	0%,
	100% {
		transform: translate(0, 0) scale(1);
	}

	50% {
		transform: translate(40px, 60px) scale(1.08);
	}
}

@keyframes float2 {
	0%,
	100% {
		transform: translate(0, 0) scale(1);
	}

	50% {
		transform: translate(-50px, 40px) scale(1.05);
	}
}

@keyframes float3 {
	0%,
	100% {
		transform: translate(0, 0) scale(1);
	}

	50% {
		transform: translate(30px, -50px) scale(1.1);
	}
}

.bubble {
	position: absolute;
	border-radius: 50%;
	background: radial-gradient(
		circle at 32% 28%,
		rgba(255, 255, 255, 0.85),
		rgba(255, 255, 255, 0.12) 45%,
		rgba(255, 255, 255, 0) 70%
	);
	backdrop-filter: blur(2px);
	border: 1px solid rgba(255, 255, 255, 0.5);
	box-shadow:
		0 6px 18px rgba(31, 38, 80, 0.08),
		inset 0 2px 4px rgba(255, 255, 255, 0.6);
	opacity: 0.65;
}

.bubble-a {
	width: 38px;
	height: 38px;
	top: 14%;
	left: 12%;
	animation: drift1 14s ease-in-out infinite;
}

.bubble-b {
	width: 22px;
	height: 22px;
	top: 70%;
	left: 8%;
	animation: drift2 18s ease-in-out infinite;
}

.bubble-c {
	width: 54px;
	height: 54px;
	top: 22%;
	right: 14%;
	animation: drift3 20s ease-in-out infinite;
}

.bubble-d {
	width: 16px;
	height: 16px;
	top: 55%;
	right: 22%;
	animation: drift1 12s ease-in-out infinite reverse;
}

.bubble-e {
	width: 28px;
	height: 28px;
	bottom: 10%;
	left: 42%;
	animation: drift2 16s ease-in-out infinite;
}

@keyframes drift1 {
	0%,
	100% {
		transform: translate(0, 0);
	}

	50% {
		transform: translate(18px, -26px);
	}
}

@keyframes drift2 {
	0%,
	100% {
		transform: translate(0, 0);
	}

	50% {
		transform: translate(-14px, 20px);
	}
}

@keyframes drift3 {
	0%,
	100% {
		transform: translate(0, 0);
	}

	50% {
		transform: translate(-20px, -16px);
	}
}

@keyframes float1 {
	0%,
	100% {
		transform: translate(0, 0) scale(1);
	}

	50% {
		transform: translate(40px, 60px) scale(1.08);
	}
}

@keyframes float2 {
	0%,
	100% {
		transform: translate(0, 0) scale(1);
	}

	50% {
		transform: translate(-50px, 40px) scale(1.05);
	}
}

@keyframes float3 {
	0%,
	100% {
		transform: translate(0, 0) scale(1);
	}

	50% {
		transform: translate(30px, -50px) scale(1.1);
	}
}

.page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 40px 20px 60px;
}

.brand-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 36px;
	align-self: flex-start;
	margin-left: 6px;
	width: 100%;
	position: relative;
	height: 50px;
	z-index: 9;
}

.logo-box {
	width: 150px;
	height: auto;
	border-radius: 50%;
	/* overflow: hidden; */
	background: var(--glass-bg);
	backdrop-filter: blur(16px) saturate(180%);
	-webkit-backdrop-filter: blur(16px) saturate(180%);
	border: 1px solid var(--glass-border);
	box-shadow: var(--glass-shadow);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	position: absolute;
	left: 50%;
	transform: translate(-50%);
	padding: 15px;
	box-sizing: border-box;
	top: 10px;
}

.logo-box img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 6px;
}

.logo-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #fff;
	font-weight: 700;
	font-size: 20px;
}

.brand-word {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

.brand-word span {
	display: block;
	font-size: 11px;
	font-weight: 400;
	color: var(--text-muted);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.login-card {
	width: 100%;
	max-width: 900px;
	background: var(--glass-bg);
	backdrop-filter: blur(26px) saturate(180%);
	-webkit-backdrop-filter: blur(26px) saturate(180%);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius);
	box-shadow: var(--glass-shadow);
	padding: 40px 44px 44px;
	position: relative;
	overflow: hidden;
	opacity: 0;
	transform: translateY(18px) scale(0.98);
	filter: blur(6px);
	transition:
		opacity 0.6s cubic-bezier(0.2, 0.7, 0.3, 1),
		transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1),
		filter 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.login-card.is-loaded {
	opacity: 1;
	transform: translateY(0) scale(1);
	filter: blur(0);
}

.login-card::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	background: linear-gradient(
		135deg,
		rgba(255, 255, 255, 0.5),
		rgba(255, 255, 255, 0) 45%
	);
}

.tabs {
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	background: rgba(255, 255, 255, 0.5);
	border: 1px solid var(--glass-border);
	border-radius: 14px;
	margin-bottom: 30px;
	position: relative;
}

.tab-btn {
	border: none;
	background: transparent;
	cursor: pointer;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--text-secondary);
	padding: 10px 20px;
	border-radius: 11px;
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	transition: color 0.25s ease;
}

.tab-btn i {
	font-size: 14px;
}

.tab-btn.active {
	color: #fff;
}

.tab-highlight {
	position: absolute;
	top: 4px;
	bottom: 4px;
	left: 4px;
	width: calc(50% - 4px);
	border-radius: 11px;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	box-shadow: 0 6px 18px rgba(30, 136, 229, 0.35);
	transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.tab-btn:nth-child(2).active ~ .tab-highlight,
.tabs[data-active="credentials"] .tab-highlight {
	transform: translateX(100%);
}

.panels {
	position: relative;
}

.panel {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 48px;
	align-items: center;
}

.panel[hidden] {
	display: none;
}

h1.title {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 22px;
	color: var(--text-primary);
}

.steps {
	list-style: none;
	margin: 0 0 26px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.steps li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-size: 14.5px;
	color: var(--text-secondary);
	line-height: 1.5;
}

.step-num {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	flex-shrink: 0;
	background: rgba(30, 136, 229, 0.16);
	color: #0d5aa7;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 1px;
}

.switch-link {
	border: none;
	cursor: pointer;
	font-family: inherit;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #fff;
	font-size: 13.5px;
	font-weight: 600;
	padding: 12px 22px;
	border-radius: 30px;
	box-shadow: 0 8px 20px rgba(30, 136, 229, 0.35);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

.switch-link:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 26px rgba(30, 136, 229, 0.42);
}

/* QR panel visual */
.qr-visual {
	position: relative;
	width: 220px;
	height: 220px;
	margin: 0 auto;
	background: rgba(255, 255, 255, 0.6);
	border: 1px solid var(--glass-border);
	border-radius: 20px;
	box-shadow: var(--glass-shadow);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.qr-visual img {
	width: 86%;
	height: 86%;
	object-fit: contain;
	opacity: 0;
	transition: opacity 0.5s ease;
}

.qr-visual.is-loaded img {
	opacity: 1;
}

.qr-visual.is-loaded .sk-block {
	opacity: 0;
	pointer-events: none;
}

.qr-visual .sk-block {
	position: absolute;
	inset: 14px;
	border-radius: 12px;
	transition: opacity 0.4s ease;
}

.sk-block {
	background: linear-gradient(
		100deg,
		rgba(120, 128, 160, 0.14) 20%,
		rgba(120, 128, 160, 0.28) 40%,
		rgba(120, 128, 160, 0.14) 60%
	);
	background-size: 200% 100%;
	animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
	0% {
		background-position: 140% 0;
	}

	100% {
		background-position: -60% 0;
	}
}

.qr-caption {
	text-align: center;
	font-size: 12.5px;
	color: var(--text-muted);
	margin-top: 14px;
}

/* Credentials panel */
.field-group {
	margin-bottom: 18px;
}

.field-group label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--text-secondary);
	margin-bottom: 7px;
}

.field-shell {
	position: relative;
}

.field-shell input {
	width: 100%;
	padding: 12px 14px;
	font-size: 14px;
	font-family: inherit;
	border: 1px solid rgba(30, 60, 100, 0.14);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.9);
	color: var(--text-primary);
	outline: none;
	transition:
		border-color 0.2s ease,
		background 0.2s ease,
		box-shadow 0.2s ease;
}

.field-shell input:focus {
	border-color: #4fc9e8;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(79, 201, 232, 0.18);
}

.field-shell .sk-block {
	position: absolute;
	inset: 0;
	border-radius: 12px;
}

.validate-btn {
	width: 100%;
	border: none;
	cursor: pointer;
	font-family: inherit;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	color: #fff;
	font-size: 14.5px;
	font-weight: 700;
	padding: 13px;
	border-radius: 12px;
	box-shadow: 0 8px 22px rgba(30, 136, 229, 0.35);
	margin-top: 6px;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

.validate-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(30, 136, 229, 0.42);
}

.cred-form {
	position: relative;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.82);
	backdrop-filter: blur(22px) saturate(180%);
	-webkit-backdrop-filter: blur(22px) saturate(180%);
	border: 1px solid rgba(255, 255, 255, 0.9);
	border-radius: 20px;
	padding: 26px 24px;
	box-shadow:
		0 18px 44px rgba(20, 40, 80, 0.14),
		inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.cred-form::before,
.cred-form::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	filter: blur(30px);
	opacity: 0.5;
}

.cred-form::before {
	width: 180px;
	height: 180px;
	top: -70px;
	right: -60px;
	background: radial-gradient(
		circle at 40% 40%,
		#7fd8ff,
		#2fb6e6 70%,
		transparent 80%
	);
	animation: liquidMove1 9s ease-in-out infinite;
}

.cred-form::after {
	width: 150px;
	height: 150px;
	bottom: -70px;
	left: -50px;
	background: radial-gradient(
		circle at 60% 60%,
		#bfeaff,
		#4fc9e8 70%,
		transparent 80%
	);
	animation: liquidMove2 11s ease-in-out infinite;
}

@keyframes liquidMove1 {
	0%,
	100% {
		transform: translate(0, 0) scale(1);
	}

	50% {
		transform: translate(-16px, 14px) scale(1.12);
	}
}

@keyframes liquidMove2 {
	0%,
	100% {
		transform: translate(0, 0) scale(1);
	}

	50% {
		transform: translate(14px, -12px) scale(1.1);
	}
}

.cred-form.is-loaded .sk-block {
	opacity: 0;
	pointer-events: none;
}

.cred-form .field-content {
	position: relative;
	z-index: 1;
	opacity: 0;
	filter: blur(4px);
	transform: translateY(4px);
	transition:
		opacity 0.5s ease,
		filter 0.5s ease,
		transform 0.5s ease;
}

.cred-form.is-loaded .field-content {
	opacity: 1;
	filter: blur(0);
	transform: translateY(0);
}

.cred-form .field-group {
	position: relative;
	z-index: 1;
}

.qr-side,
.cred-side {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.blocker {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	bottom: 0;
	background: #fff;
	z-index: 99;
	display: none;
	text-align: center;
	padding-top: 50px;
	font-size: 30px;
}

@media (max-width: 760px) {
	.panel {
		grid-template-columns: 1fr;
	}

	.login-card {
		padding: 30px 24px 34px;
	}
}

@media (max-width: 700px) {
	.blocker {
		display: block;
	}
}



/* ---------- Loader overlay ---------- */
  .loader-overlay{
    position:fixed; inset:0; z-index:2000;
    display:flex; align-items:center; justify-content:center;
    background: radial-gradient(circle at 50% 35%, rgba(20,45,90,.55), rgba(4,10,24,.72));
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    opacity:0; visibility:hidden; pointer-events:none;
    transition: opacity .45s ease, visibility .45s ease;
  }
  .loader-overlay.active{ opacity:1; visibility:visible; pointer-events:auto; }

  .loader-card{
    display:flex; flex-direction:column; align-items:center; gap:22px;
    background: rgba(255,255,255,.14);
    border:1px solid rgba(255,255,255,.28);
    border-radius:26px; padding:46px 54px;
    box-shadow: 0 24px 70px rgba(0,10,30,.45), inset 0 1px 0 rgba(255,255,255,.3);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    transform: scale(.85) translateY(12px);
    transition: transform .5s cubic-bezier(.2,.8,.2,1);
  }
  .loader-overlay.active .loader-card{ transform: scale(1) translateY(0); }

  .loader-blob-wrap{ position:relative; width:96px; height:96px; display:flex; align-items:center; justify-content:center; }
  .loader-ring{
    position:absolute; inset:0; border-radius:50%;
    border:3px solid transparent;
    border-top-color: var(--accent-2);
    border-right-color: var(--accent);
    animation: loaderSpin 1s linear infinite;
  }
  .loader-orbit{ position:absolute; inset:-10px; animation: loaderSpin 2.4s linear infinite reverse; }
  .loader-orbit::after{
    content:''; position:absolute; top:-2px; left:50%; margin-left:-4px;
    width:8px; height:8px; border-radius:50%;
    background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2), 0 0 2px #fff;
  }
  .loader-blob{
    width:64px; height:64px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    filter: blur(1px);
    box-shadow: 0 0 24px rgba(34,211,238,.55), inset 0 2px 6px rgba(255,255,255,.4);
    animation: loaderMorph 2.6s ease-in-out infinite, loaderPulse 2.6s ease-in-out infinite;
  }
  .loader-logo{
    position:absolute; z-index:2;
    width:42px; height:42px; border-radius:50%;
    background:#fff; padding:6px;
    display:flex; align-items:center; justify-content:center;
    box-shadow: 0 4px 14px rgba(0,10,30,.35), inset 0 1px 0 rgba(255,255,255,.9);
    animation: loaderLogoPulse 2.6s ease-in-out infinite;
  }
  .loader-logo img{ width:100%; height:100%; object-fit:contain; display:block; }
  @keyframes loaderLogoPulse{ 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.08); } }

  @keyframes loaderSpin{ to{ transform: rotate(360deg); } }
  @keyframes loaderMorph{
    0%,100%{ border-radius:42% 58% 65% 35% / 45% 45% 55% 55%; }
    25%{ border-radius:62% 38% 30% 70% / 50% 62% 38% 50%; }
    50%{ border-radius:50% 50% 65% 35% / 38% 62% 38% 62%; }
    75%{ border-radius:35% 65% 55% 45% / 55% 35% 65% 45%; }
  }
  @keyframes loaderPulse{ 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.08); } }

  .loader-text{ display:flex; align-items:baseline; gap:4px; font-size:14.5px; font-weight:600; color:#fff; }
  .loader-dots span{ animation: loaderDot 1.4s ease-in-out infinite; opacity:.2; }
  .loader-dots span:nth-child(2){ animation-delay:.2s; }
  .loader-dots span:nth-child(3){ animation-delay:.4s; }
  @keyframes loaderDot{ 0%,80%,100%{ opacity:.2; } 40%{ opacity:1; } }

  .loader-progress{ width:180px; height:4px; border-radius:4px; background:rgba(255,255,255,.2); overflow:hidden; position:relative; }
  .loader-progress::after{
    content:''; position:absolute; top:0; left:-40%; width:40%; height:100%;
    background: linear-gradient(90deg, transparent, var(--accent-2), transparent);
    animation: loaderSweep 1.3s ease-in-out infinite;
  }
  @keyframes loaderSweep{ 0%{ left:-40%; } 100%{ left:100%; } }
