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

/* ─── Design Tokens ─── */
:root {
	--primary: #1d6fe8;
	--primary-dark: #1558c5;
	--primary-light: #5294f0;
	--accent: #0ea5e9;
	--green: #10b981;
	--bg: #f0f6ff;
	--surface: #ffffff;
	--surface-2: #f1f7ff;
	--border: #dde8fb;
	--text: #0f2040;
	--text-muted: #5a729a;
	--error: #ef4444;
	--hero-from: #1d6fe8;
	--hero-to: #0ea5e9;
}
[data-theme="dark"] {
	--primary: #4f8ef7;
	--primary-dark: #3b7df5;
	--primary-light: #93bbff;
	--accent: #38bdf8;
	--green: #10b981;
	--bg: #070e1a;
	--surface: #0d1829;
	--surface-2: #111f36;
	--border: rgba(79, 142, 247, 0.18);
	--text: #e2ecff;
	--text-muted: #7a9cc4;
	--hero-from: #0a1628;
	--hero-to: #0d2040;
}

html,
body {
	height: 100%;
	font-family:
		"Inter",
		-apple-system,
		BlinkMacSystemFont,
		sans-serif;
	-webkit-font-smoothing: antialiased;
	overscroll-behavior: none;
}

body {
	background: var(--bg);
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	position: relative;
}

/* ─── Hero Banner Top ─── */
.login-hero {
	flex: 0 0 auto;
	background: linear-gradient(
		145deg,
		var(--hero-from) 0%,
		var(--primary) 50%,
		var(--hero-to) 100%
	);
	padding: 56px 28px 60px;
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

/* Decorative circles */
.hero-circle {
	position: absolute;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.06);
}
.hero-circle-1 {
	width: 260px;
	height: 260px;
	top: -90px;
	right: -80px;
}
.hero-circle-2 {
	width: 160px;
	height: 160px;
	bottom: -50px;
	left: -40px;
}
.hero-circle-3 {
	width: 80px;
	height: 80px;
	top: 30px;
	left: 20px;
	background: rgba(255, 255, 255, 0.08);
}

/* Wavy bottom edge */
.hero-wave {
	position: absolute;
	bottom: -1px;
	left: 0;
	right: 0;
	height: 40px;
	overflow: hidden;
}
.hero-wave svg {
	display: block;
	width: 100%;
	height: 100%;
}

.hero-logo-wrap {
	width: 80px;
	height: 80px;
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 2px solid rgba(255, 255, 255, 0.25);
	border-radius: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 38px;
	color: white;
	margin-bottom: 20px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
	animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
	position: relative;
	z-index: 2;
}
@keyframes popIn {
	from {
		opacity: 0;
		transform: scale(0.6);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.hero-title {
	font-size: 30px;
	font-weight: 900;
	color: #fff;
	letter-spacing: -0.5px;
	line-height: 1.1;
	position: relative;
	z-index: 2;
	animation: fadeUp 0.5s 0.1s ease both;
}
.hero-sub {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.75);
	margin-top: 8px;
	font-weight: 400;
	position: relative;
	z-index: 2;
	animation: fadeUp 0.5s 0.2s ease both;
}
@keyframes fadeUp {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ─── Form Panel ─── */
.login-panel {
	flex: 1;
	background: var(--surface);
	border-radius: 0;
	padding: 28px 24px 32px;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	animation: slideUp 0.45s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
	position: relative;
	z-index: 5;
}
@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.panel-heading {
	font-size: 20px;
	font-weight: 800;
	color: var(--text);
	margin-bottom: 4px;
}
.panel-sub {
	font-size: 13px;
	color: var(--text-muted);
	margin-bottom: 24px;
}

/* Error alert */
.alert-error {
	background: rgba(239, 68, 68, 0.08);
	border: 1px solid rgba(239, 68, 68, 0.25);
	border-radius: 12px;
	padding: 12px 14px;
	margin-bottom: 20px;
	color: var(--error);
	font-size: 13px;
	display: flex;
	align-items: center;
	gap: 8px;
	animation: shake 0.3s ease;
}
@keyframes shake {
	0%,
	100% {
		transform: translateX(0);
	}
	25% {
		transform: translateX(-4px);
	}
	75% {
		transform: translateX(4px);
	}
}

/* Form */
.form-group {
	margin-bottom: 16px;
}

.form-label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.7px;
	margin-bottom: 7px;
}

.input-wrap {
	position: relative;
}

.input-icon {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-muted);
	font-size: 18px;
	pointer-events: none;
	transition: color 0.2s;
	display: flex;
}

.form-control {
	width: 100%;
	background: var(--surface-2);
	border: 1.5px solid var(--border);
	border-radius: 14px;
	padding: 15px 48px 15px 46px;
	color: var(--text);
	font-size: 15px;
	font-family: "Inter", sans-serif;
	transition: all 0.2s;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
}
.form-control::placeholder {
	color: rgba(90, 114, 154, 0.45);
}
.form-control:focus {
	border-color: var(--primary);
	background: var(--surface);
	box-shadow: 0 0 0 3px rgba(29, 111, 232, 0.12);
}
.form-control:focus ~ .input-icon {
	color: var(--primary);
}

.toggle-pass {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: var(--text-muted);
	font-size: 18px;
	padding: 4px;
	display: flex;
	transition: color 0.2s;
}
.toggle-pass:hover {
	color: var(--primary);
}

/* Login button */
.btn-login {
	width: 100%;
	padding: 16px;
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	border: none;
	border-radius: 14px;
	color: white;
	font-size: 16px;
	font-weight: 700;
	font-family: "Inter", sans-serif;
	cursor: pointer;
	transition: all 0.2s;
	margin-top: 8px;
	box-shadow: 0 6px 20px rgba(29, 111, 232, 0.35);
	letter-spacing: 0.2px;
	position: relative;
	overflow: hidden;
}
.btn-login::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.1),
		transparent
	);
	pointer-events: none;
}
.btn-login:active {
	transform: scale(0.98);
}
.btn-login.loading {
	pointer-events: none;
	opacity: 0.8;
}

.spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: white;
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
	vertical-align: middle;
	margin-right: 8px;
}
@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.footer-text {
	text-align: center;
	margin-top: auto;
	padding-top: 24px;
	font-size: 12px;
	color: var(--text-muted);
}

/* ─── SSO Divider ─── */
.sso-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 18px 0 14px;
	color: var(--text-muted);
	font-size: 12px;
	font-weight: 500;
}
.sso-divider::before,
.sso-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--border);
}

/* ─── Tombol Login MySso ─── */
.btn-sso {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 16px 16px;
	background: var(--primary);
	border: none;
	border-radius: 14px;
	color: white;
	font-size: 15px;
	font-weight: 600;
	font-family: "Inter", sans-serif;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s;
	position: relative;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(29, 111, 232, 0.2);
}
.btn-sso:hover {
	background: var(--primary-dark);
	color: white;
	box-shadow: 0 6px 16px rgba(29, 111, 232, 0.35);
}
.btn-sso:active {
	transform: scale(0.98);
}
[data-theme="dark"] .btn-sso {
	background: var(--primary);
	color: white;
}
[data-theme="dark"] .btn-sso:hover {
	background: var(--primary-dark);
	color: white;
}

/* Theme toggle */
.theme-btn {
	position: absolute;
	top: 18px;
	right: 18px;
	z-index: 20;
	width: 38px;
	height: 38px;
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 20px;
	cursor: pointer;
	transition: all 0.2s;
}
[data-theme="dark"] .theme-btn {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.12);
}
.theme-btn:hover {
	background: rgba(255, 255, 255, 0.25);
}

/* ─── Desktop Layout Adjustments ─── */
.login-shell {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	width: 100%;
}
@media (min-width: 768px) {
	body {
		align-items: center;
		justify-content: center;
		background: var(--surface-2);
	}
	.login-shell {
		min-height: auto;
		max-width: 450px;
		margin: 40px auto;
		border-radius: 24px;
		box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
		overflow: hidden;
	}
	.login-hero {
		padding: 28px 24px 36px;
	}
	.hero-logo-wrap {
		width: 56px;
		height: 56px;
		font-size: 26px;
		margin-bottom: 12px;
		border-radius: 16px;
	}
	.hero-title {
		font-size: 24px;
	}
	.hero-sub {
		margin-top: 4px;
	}
	body > .theme-btn {
		top: 24px;
		right: 24px;
	}
}
