/* ==========================================================================
   CANDIDATE LOGIN — "Sky" theme: brand gradient page, white card.
   Loaded after Candidate-portal-sky.css.
   ========================================================================== */
body {
	position: relative;
	min-height: 100vh;
	overflow-x: hidden;
	background: linear-gradient(90deg, #020024 0%, #060552 7%, #090979 21%, #0482c9 56%, #0ea5e9 100%);
}

/* Drifting stars, as in the site's hero sections */
body::before {
	content: '';
	position: fixed;
	inset: -50% 0 0 0;
	z-index: 0;
	pointer-events: none;
	opacity: 0.8;
	background-image:
		radial-gradient(1.5px 1.5px at 20px 30px, #ffffff 50%, transparent 51%),
		radial-gradient(1px 1px at 90px 120px, #ffffff 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 160px 60px, rgba(255, 255, 255, 0.8) 50%, transparent 51%),
		radial-gradient(1px 1px at 230px 180px, #ffffff 50%, transparent 51%);
	background-size: 340px 240px;
	animation: loginStarDrift 60s linear infinite;
}

@keyframes loginStarDrift {
	from { transform: translateY(0); }
	to { transform: translateY(240px); }
}

.main-content {
	position: relative;
	z-index: 1;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 2rem 1rem;
}

.main-content > .portal-alert {
	width: 100%;
	max-width: 900px;
}

.candidate-login-container {
	width: 100%;
	max-width: 900px;
}

/* ---------- One card: what the portal does, then the form ---------- */
.login-shell {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	overflow: hidden;
	border-radius: 26px;
	background: #ffffff;
	box-shadow: 0 40px 80px -30px rgba(2, 0, 36, 0.75);
	animation: loginCardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes loginCardIn {
	from { opacity: 0; transform: translateY(22px) scale(0.98); }
	to { opacity: 1; transform: none; }
}

.login-aside {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	padding: 40px 36px;
	color: #ffffff;
	background: linear-gradient(165deg, #060552 0%, #090979 42%, #0a5fb0 100%);
}

.login-aside::before,
.login-aside::after {
	content: '';
	position: absolute;
	border-radius: 50%;
	border: 1.5px solid rgba(255, 255, 255, 0.16);
	pointer-events: none;
}

.login-aside::before { width: 280px; height: 280px; top: -140px; right: -110px; }
.login-aside::after { width: 200px; height: 200px; bottom: -110px; left: -70px; }

.login-aside > * {
	position: relative;
	z-index: 1;
}

.login-aside-brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 34px;
	text-decoration: none;
}

.login-aside-brand .brand-seal {
	width: 56px;
	height: 56px;
}

/* The site wordmark, in white and sky for the dark panel */
.login-aside-brand .brand-text {
	font-size: 1.2rem;
}

.login-aside-brand .brand-word {
	color: #ffffff;
}

.login-aside-brand .brand-word--accent {
	background: linear-gradient(90deg, #bae6fd, #7dd3fc);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

.login-aside h2 {
	margin-bottom: 10px;
	font-family: "Sora", "Inter", system-ui, sans-serif;
	font-size: 1.55rem;
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.25;
}

.login-aside-lead {
	margin-bottom: 28px;
	color: rgba(255, 255, 255, 0.86);
	line-height: 1.65;
}

.login-aside-points {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
	display: grid;
	gap: 16px;
}

.login-aside-points li {
	display: flex;
	align-items: center;
	gap: 14px;
	color: rgba(255, 255, 255, 0.94);
	font-weight: 500;
}

.login-aside-points i {
	flex: none;
	width: 42px;
	height: 42px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.22);
}

.login-aside-foot {
	margin: auto 0 0;
	padding-top: 22px;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	color: rgba(255, 255, 255, 0.86);
	font-size: 0.92rem;
}

.login-aside-foot a {
	color: #ffffff;
	font-weight: 700;
}

/* ---------- Form ---------- */
.login-card {
	padding: 44px 40px 36px;
}

.login-logo {
	display: none;
	width: 72px;
	height: 72px;
	margin: 0 auto 18px;
	border-radius: 50%;
	overflow: hidden;
	background: #ffffff;
	box-shadow: 0 14px 28px -14px rgba(37, 99, 235, 0.7);
}

.login-logo .brand-seal {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.login-title {
	margin-bottom: 6px;
	font-family: "Sora", "Inter", system-ui, sans-serif;
	font-size: 1.6rem;
	font-weight: 600;
	letter-spacing: -0.03em;
	color: #0a1633;
}

.login-subtitle {
	margin-bottom: 28px;
	color: #5a6785;
}

.login-card .form-label {
	margin-bottom: 7px;
	color: #0a1633;
	font-size: 0.9rem;
	font-weight: 600;
}

.login-card .form-label i {
	margin-right: 6px;
	color: #2563eb;
}

.login-card .form-control {
	min-height: 50px;
	padding: 12px 16px;
	border: 1px solid #d5e3fb;
	border-radius: 14px;
	background: #f7faff;
	color: #0a1633;
	font-size: 0.95rem;
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.login-card .form-control::placeholder {
	color: #8a96b3;
}

.login-card .form-control:focus {
	border-color: #2563eb;
	background: #ffffff;
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

/* Keep browser autofill readable on the light field */
.login-card .form-control:-webkit-autofill {
	-webkit-text-fill-color: #0a1633;
	box-shadow: 0 0 0 1000px #f7faff inset;
}

.login-card .input-group .form-control {
	border-radius: 14px 0 0 14px;
	border-right: 0;
}

.btn-toggle-password {
	min-width: 50px;
	border: 1px solid #d5e3fb;
	border-left: 0;
	border-radius: 0 14px 14px 0;
	background: #f7faff;
	color: #5a6785;
}

.btn-toggle-password:hover,
.btn-toggle-password:focus-visible {
	border-color: #d5e3fb;
	background: #eaf2ff;
	color: #2563eb;
}

.btn-login {
	width: 100%;
	min-height: 52px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, #2563eb, #38bdf8);
	color: #ffffff;
	font-weight: 700;
	box-shadow: 0 16px 30px -14px rgba(37, 99, 235, 0.75);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-login:hover,
.btn-login:focus-visible {
	transform: translateY(-2px);
	background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
	color: #ffffff;
	box-shadow: 0 20px 34px -14px rgba(37, 99, 235, 0.85);
}

.login-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 22px 0;
	color: #8a96b3;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
}

.login-divider::before,
.login-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: #e1eafa;
}

.custom-google-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	border: 1px solid #d5e3fb;
	border-radius: 999px;
	background: #ffffff;
	color: #0a1633;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.custom-google-btn:hover {
	border-color: #2563eb;
	background: #eef4ff;
	color: #0a1633;
}

.login-card-footer {
	display: none;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid #e1eafa;
	color: #4a5672;
	font-size: 0.9rem;
	text-align: center;
}

.login-card-footer a {
	color: #2563eb;
	font-weight: 600;
	text-decoration: none;
}

.login-card-footer a:hover {
	text-decoration: underline;
}

/* ---------- Forgot / reset password: the form card on its own ---------- */
.candidate-login-container--narrow,
.main-content:has(.candidate-login-container--narrow) > .portal-alert {
	max-width: 460px;
}

.login-shell--single {
	grid-template-columns: minmax(0, 1fr);
}

.login-shell--single .login-card {
	text-align: center;
}

.login-shell--single .login-card form {
	text-align: left;
}

.login-shell--single .login-logo {
	display: block;
}

.login-forgot {
	margin-bottom: 7px;
	color: #2563eb;
	font-size: 0.86rem;
	font-weight: 600;
	text-decoration: none;
}

.login-forgot:hover {
	color: #1d4ed8;
	text-decoration: underline;
}

.login-otp-input {
	font-size: 1.2rem !important;
	font-weight: 600;
	letter-spacing: 0.4em;
	text-align: center;
}

.login-help {
	margin-top: 22px;
	color: #5a6785;
	font-size: 0.9rem;
}

.login-help a {
	color: #2563eb;
	font-weight: 600;
}

.login-errors {
	margin-bottom: 18px;
	padding: 12px 16px;
	border: 1px solid #f3c8c4;
	border-radius: 14px;
	background: #fdecea;
	color: #b42318;
	font-size: 0.9rem;
	text-align: left;
}

.login-errors p {
	margin: 0;
}

/* Back link: a small pill above the card, on the left */
.login-back {
	margin-bottom: 16px;
}

.back-to-jobs-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 9px 18px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	background: rgba(255, 255, 255, 0.12);
	color: #ffffff;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	transition: background 0.2s ease, transform 0.2s ease;
}

.back-to-jobs-link:hover {
	background: rgba(255, 255, 255, 0.24);
	color: #ffffff;
	transform: translateX(-2px);
}

/* ---------- Tablet and phone: the form on its own ---------- */
@media (max-width: 991.98px) {
	.candidate-login-container,
	.main-content > .portal-alert { max-width: 460px; }

	.login-shell { grid-template-columns: minmax(0, 1fr); }
	.login-aside { display: none; }
	.login-card { text-align: center; }
	.login-card form { text-align: left; }
	.login-logo { display: block; }
	.login-card-footer { display: block; }
}

@media (max-width: 575.98px) {
	.main-content { padding: 1.25rem 1rem; }
	.login-shell { border-radius: 22px; }
	.login-card { padding: 32px 22px 26px; }
	.login-title { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
	body::before,
	.login-shell {
		animation: none;
	}
}
