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

body {
	min-height: 100vh;
	font-family:
		"Segoe UI",
		system-ui,
		-apple-system,
		sans-serif;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow-x: hidden; /* was: overflow: hidden; */
	overflow-y: auto; /* allow vertical scroll */
	position: relative;
	background: #1565e8;
}

.bg {
	position: fixed;
	inset: 0;
	background: linear-gradient(
		135deg,
		#0d47c4 0%,
		#1a6de8 40%,
		#1976f5 70%,
		#0d5cd4 100%
	);
	z-index: 0;
}

/* Keep subtle radial glow top-right */
.bg::before {
	content: "";
	position: absolute;
	top: -10%;
	right: -5%;
	width: 50%;
	height: 60%;
	background: radial-gradient(
		ellipse at center,
		rgba(80, 140, 255, 0.3) 0%,
		transparent 70%
	);
	border-radius: 50%;
}

/* Remove the old blob — waves SVG replaces this */
.bg::after {
	display: none;
}

/* ── Wave SVG container ── */
.waves-wrap {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	z-index: 1;
	pointer-events: none;
	line-height: 0;
}

.waves {
	width: 100%;
	height: clamp(160px, 28vh, 320px);
	display: block;
}

/* ── Decorative dots ── */
.dots {
	position: fixed;
	top: 20px;
	left: 20px;
	display: grid;
	grid-template-columns: repeat(6, 10px);
	gap: 8px;
	z-index: 2;
	opacity: 0.35;
}

.dots span {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: #fff;
	display: block;
}

.circle-outline {
	position: fixed;
	top: -60px;
	left: 60px;
	width: 200px;
	height: 200px;
	border: 1.5px solid rgba(255, 255, 255, 0.18);
	border-radius: 50%;
	z-index: 2;
}

.diamonds {
	position: fixed;
	left: 40px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.diamond {
	width: 32px;
	height: 32px;
	border: 1.5px solid rgba(255, 255, 255, 0.25);
	transform: rotate(45deg);
	border-radius: 4px;
}

.diamond.sm {
	width: 18px;
	height: 18px;
}

.diamond.filled {
	background: rgba(255, 255, 255, 0.12);
}

.dot-accent {
	position: fixed;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.6);
	z-index: 2;
}

.dot-accent.a {
	top: 38%;
	left: 52%;
}

.dot-accent.b {
	bottom: 22%;
	right: 8%;
}

/* ── Page layout ── */
.page {
	position: relative;
	z-index: 3;
	width: 100%;
	max-width: 1200px;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 40px 80px;
	gap: 40px;
}

.branding {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	color: #fff;
	padding-bottom: 40px;
}

.branding h1 {
	font-size: 32px;
	font-weight: 700;
	color: #fff;
	text-align: center;
	line-height: 1.25;
	margin-bottom: 14px;
}

.branding .divider-line {
	width: 56px;
	height: 3px;
	background: linear-gradient(90deg, #38cfff, #1a8af5);
	border-radius: 2px;
	margin-bottom: 18px;
}

.branding .tagline {
	font-size: 18px;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.85);
	letter-spacing: 0.02em;
}

/* ── Login card ── */
.cardlogin {
	width: 420px;
	min-width: 380px;
	background: #fff;
	border-radius: 20px;
	padding: 44px 40px 36px;
	box-shadow:
		0 24px 80px rgba(0, 0, 0, 0.18),
		0 4px 20px rgba(0, 0, 0, 0.08);
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	overflow: hidden;
	opacity: 0;
}

/* Top-right light bloom */
.cardlogin::before {
	content: "";
	position: absolute;
	top: -40px;
	right: -40px;
	width: 180px;
	height: 180px;
	background: radial-gradient(
		circle,
		rgba(200, 220, 255, 0.5) 0%,
		transparent 70%
	);
	pointer-events: none;
	z-index: 0;
}

/* Bottom wave — replaced by .card-waves-wrap SVG */

/* Keep all card content above decorations */
.cardlogin > * {
	position: relative;
	z-index: 1;
}

.app-icon {
	width: 72px;
	height: 72px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px auto;
	flex-shrink: 0;
}

.app-icon img {
	width: 70px;
	height: 70px;
	object-fit: contain;
}

.card-title {
	font-size: 22px;
	font-weight: 700;
	color: #022361;
	text-align: center;
	margin-bottom: 6px;
}

.card-subtitle {
	font-size: 13.5px;
	color: #8a94a8;
	text-align: center;
	margin-bottom: 28px;
}

.form-group {
	position: relative;
	width: 100%;
	margin-bottom: 16px;
}

.form-group .field-icon {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: #2b6de8;
	pointer-events: none;
	display: flex;
	align-items: center;
}
.form-group:focus-within .field-icon {
	color: #1a8af5;
}

.form-group .form-control {
	width: 100%;
	height: 52px;
	border: 1.5px solid #e5e9f0;
	border-radius: 12px;
	padding: 0 48px;
	font-size: 14.5px;
	color: #1a1f36;
	background: #f7f9fc;
	outline: none;
	transition:
		border-color 0.2s,
		background 0.2s;
	font-family: inherit;
	box-shadow: none;
}

.form-group .form-control::placeholder {
	color: #b0b8cc;
}

.form-group .form-control:focus {
	border-color: #3b7df8;
	background: #fff;
	box-shadow: none;
}

.eye-btn {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: #a0a8bc;
	padding: 4px;
	display: flex;
	align-items: center;
}

.eye-btn:hover {
	color: #5a6380;
}

.btnlogin {
	width: 100%;
	height: 52px;
	background: #6192ed !important;
	background: linear-gradient(
		90deg,
		rgba(97, 146, 237, 1) 0%,
		rgba(34, 100, 224, 1) 49%,
		rgba(4, 52, 140, 1) 100%
	) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 12px !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	cursor: pointer;
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 4px;
	transition:
		opacity 0.2s,
		transform 0.1s;
	font-family: inherit;
	letter-spacing: 0.01em;
	-webkit-appearance: none;
	appearance: none;
	-webkit-box-shadow: 5px 5px 15px 5px rgba(25, 86, 224, 0.42) !important;
	box-shadow: 5px 5px 15px 5px rgba(25, 86, 224, 0.42) !important;
}

.btnlogin:hover {
	opacity: 0.92;
}

.btnlogin:active {
	transform: scale(0.98);
}

.divider-or {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 8px 0 0;
	color: #c0c8d8;
	font-size: 13px;
}

.divider-or::before,
.divider-or::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e8ecf2;
}

.logincopy {
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid #f0f2f7;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	color: #b0b8cc;
	font-size: 12.5px;
}

.alert-loginfail {
	width: 100%;
	background: #fff1f0;
	border: 1px solid #ffc4c0;
	color: #c0392b;
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 13px;
	margin-bottom: 12px;
	text-align: center;
}

/* ── Card bottom wave ── */
.card-waves-wrap {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 0; /* sits behind logincopy/divider-or via .cardlogin > * z-index:1 */
	line-height: 0;
	pointer-events: none;
}

.card-waves {
	width: 100%;
	height: 80px;
	display: block;
}

@media (max-width: 860px) {
	.page {
		flex-direction: column;
		padding: 40px 24px;
		justify-content: center;
		min-height: auto; /* add this — let it grow past 100vh */
	}

	.branding {
		padding-bottom: 0;
	}

	.cardlogin {
		min-width: 0;
		width: 100%;
		max-width: 420px;
	}

	.diamonds,
	.circle-outline {
		display: none;
	}
}
