/*
 * Login Page
 *
 * Split-panel layout: unlike homepage sections (which all respect the
 * shared 96px .qehs-container margin), this page's left panel
 * deliberately bleeds to the true viewport edge — a common, distinct
 * login-page convention, confirmed by measuring the Figma reference
 * (the tinted panel starts at the literal left edge, not at a 96px
 * inset). This is a page-specific layout choice, not a new sitewide
 * container system — the trust strip below it, and the rest of the
 * site, still use the existing .qehs-container.
 *
 * Panel background is the closest existing token
 * (--qehs-background-alt) to the Figma's measured tint — a close but
 * not pixel-identical match; see implementation report.
 */

.qehs-login-hero {
	display: grid;
	grid-template-columns: 53.3% 46.7%;
	min-height: 640px;
}

.qehs-login-hero__left {
	background-color: var(--qehs-background-alt);
	display: flex;
	align-items: center;
}

.qehs-login-hero__left-inner {
	width: 100%;
	max-width: 528px;
	margin-inline: auto;
	padding: var(--qehs-space-2xl) var(--qehs-space-xl);
}

.qehs-login-hero__title {
	margin: 0 0 var(--qehs-space-sm);
	font-size: 2.25rem;
	font-weight: 700;
	color: var(--qehs-text);
}

.qehs-login-hero__subtitle {
	margin: 0 0 var(--qehs-space-xl);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--qehs-text-muted);
}

.qehs-login-benefits {
	margin: 0 0 var(--qehs-space-xl);
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: var(--qehs-space-lg);
}

.qehs-login-benefit {
	display: flex;
	align-items: flex-start;
	gap: var(--qehs-space-md);
}

.qehs-login-benefit__icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: var(--qehs-radius-md);
	background-color: var(--qehs-success-tint);
	color: var(--qehs-secondary);
}

.qehs-login-benefit__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.qehs-login-benefit__text strong {
	font-size: 1rem;
	color: var(--qehs-text);
}

.qehs-login-benefit__text span:last-child {
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--qehs-text-muted);
}

/* Sized to the real illustration asset's native dimensions
   (assets/images/login/login-illustration.svg, 349x174,
   ~2.006:1 aspect ratio) — width:100%/height:auto below preserves
   that ratio exactly at any size, never stretches or crops. */
.qehs-login-hero__illustration {
	max-width: 349px;
}

.qehs-login-hero__illustration img {
	display: block;
	width: 100%;
	height: auto;
}

/* --- Right column / login card --- */

.qehs-login-hero__right {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: var(--qehs-space-2xl) var(--qehs-space-xl);
	background-color: var(--qehs-background);
}

.qehs-login-card {
	width: 100%;
	max-width: 528px;
	background-color: var(--qehs-background);
	border: 1px solid var(--qehs-border);
	border-radius: var(--qehs-radius-lg);
	box-shadow: var(--qehs-shadow-md);
	padding: var(--qehs-space-2xl);
	text-align: center;
}

.qehs-login-card__title {
	margin: 0 0 var(--qehs-space-xs);
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--qehs-text);
}

.qehs-login-card__subtitle {
	margin: 0 0 var(--qehs-space-xl);
	font-size: 0.95rem;
	color: var(--qehs-text-muted);
}

.qehs-login-form__message {
	margin-bottom: var(--qehs-space-lg);
	padding: var(--qehs-space-sm) var(--qehs-space-md);
	border-radius: var(--qehs-radius-md);
	background-color: var(--qehs-error-tint);
	color: var(--qehs-error);
	font-size: 0.9rem;
	text-align: left;
}

.qehs-login-form {
	text-align: left;
}

.qehs-login-form__field {
	margin-bottom: var(--qehs-space-lg);
}

.qehs-login-form__field label {
	display: block;
	margin-bottom: var(--qehs-space-sm);
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--qehs-text);
}

.qehs-login-form__control {
	position: relative;
	display: flex;
	align-items: center;
}

.qehs-login-form__control input {
	width: 100%;
	padding: var(--qehs-space-md) var(--qehs-space-xl) var(--qehs-space-md) var(--qehs-space-md);
	border: 1px solid var(--qehs-border);
	border-radius: var(--qehs-radius-md);
	font-family: inherit;
	font-size: 1rem;
	color: var(--qehs-text);
}

.qehs-login-form__control input::placeholder {
	color: var(--qehs-text-muted);
}

.qehs-login-form__control input:focus-visible {
	outline: 2px solid var(--qehs-secondary);
	outline-offset: 1px;
}

.qehs-login-form__control svg {
	position: absolute;
	right: var(--qehs-space-md);
	color: var(--qehs-text-muted);
	pointer-events: none;
}

.qehs-login-form__toggle-password {
	position: absolute;
	right: var(--qehs-space-md);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: none;
	border: none;
	color: var(--qehs-text-muted);
	cursor: pointer;
	padding: 0;
}

.qehs-login-form__toggle-password svg {
	position: static;
}

.qehs-login-form__toggle-password:focus-visible {
	outline: 2px solid var(--qehs-secondary);
	outline-offset: 1px;
	border-radius: var(--qehs-radius-sm);
}

.qehs-login-form__forgot {
	text-align: right;
	margin-bottom: var(--qehs-space-lg);
}

.qehs-login-form__forgot a {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--qehs-secondary);
}

.qehs-login-form__forgot a:hover,
.qehs-login-form__forgot a:focus-visible {
	text-decoration: underline;
}

/* Reuses .qehs-btn visual language (color/weight/radius) via its own
   scoped rule rather than the shared class itself, keeping this page
   self-contained per file-scope instructions — matches the existing
   pattern used for other page-specific CTAs on this project (e.g. the
   Resource Bundle card's "View Bundle" button). */
.qehs-login-form__submit {
	width: 100%;
	padding: var(--qehs-space-md);
	margin-bottom: var(--qehs-space-lg);
	border: none;
	border-radius: var(--qehs-radius-md);
	background-color: var(--qehs-secondary);
	color: #ffffff;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	transition: filter 0.2s ease;
}

.qehs-login-form__submit:hover {
	filter: brightness(1.08);
}

.qehs-login-form__submit:focus-visible {
	outline: 2px solid var(--qehs-primary);
	outline-offset: 2px;
}

.qehs-login-form__divider {
	position: relative;
	text-align: center;
	margin-bottom: var(--qehs-space-lg);
}

.qehs-login-form__divider::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	border-top: 1px solid var(--qehs-border);
}

.qehs-login-form__divider span {
	position: relative;
	padding-inline: var(--qehs-space-sm);
	background-color: var(--qehs-background);
	font-size: 0.85rem;
	color: var(--qehs-text-muted);
}

.qehs-login-form__social {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--qehs-space-sm);
	padding: var(--qehs-space-md);
	margin-bottom: var(--qehs-space-md);
	border: 1px solid var(--qehs-border);
	border-radius: var(--qehs-radius-md);
	background-color: var(--qehs-background);
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--qehs-text);
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.qehs-login-form__social:hover,
.qehs-login-form__social:focus-visible {
	border-color: var(--qehs-text-muted);
	background-color: var(--qehs-background-alt);
}

.qehs-login-form__social:focus-visible {
	outline: 2px solid var(--qehs-secondary);
	outline-offset: 1px;
}

.qehs-login-form__create-account {
	margin: var(--qehs-space-sm) 0 0;
	text-align: center;
	font-size: 0.9rem;
	color: var(--qehs-text-muted);
}

.qehs-login-form__create-account a {
	font-weight: 700;
	color: var(--qehs-secondary);
}

.qehs-login-form__create-account a:hover,
.qehs-login-form__create-account a:focus-visible {
	text-decoration: underline;
}

.qehs-login-security-note {
	display: flex;
	align-items: center;
	gap: var(--qehs-space-xs);
	margin-top: var(--qehs-space-lg);
	font-size: 0.85rem;
	color: var(--qehs-text-muted);
}

/* --- Trust strip --- */

.qehs-login-trust {
	padding-block: var(--qehs-space-xl);
	background-color: var(--qehs-background);
	border-top: 1px solid var(--qehs-border);
}

.qehs-login-trust__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--qehs-space-lg);
}

.qehs-login-trust__item {
	display: flex;
	align-items: center;
	gap: var(--qehs-space-md);
}

.qehs-login-trust__icon {
	flex-shrink: 0;
	color: var(--qehs-secondary);
}

.qehs-login-trust__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.qehs-login-trust__text strong {
	font-size: 1rem;
	color: var(--qehs-text);
}

.qehs-login-trust__text span:last-child {
	font-size: 0.85rem;
	color: var(--qehs-text-muted);
}

/* --- Tablet: stack the two columns, matching the site's existing
   1024px breakpoint. --- */
@media (max-width: 1024px) {
	.qehs-login-hero {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.qehs-login-hero__left-inner {
		margin-inline: auto;
		max-width: 560px;
	}

	.qehs-login-hero__illustration {
		margin-inline: auto;
	}

	.qehs-login-trust__list {
		grid-template-columns: 1fr 1fr;
	}
}

/* --- Mobile --- */
@media (max-width: 768px) {
	.qehs-login-hero__left-inner,
	.qehs-login-hero__right {
		padding: var(--qehs-space-xl) var(--qehs-space-lg);
	}

	.qehs-login-card {
		padding: var(--qehs-space-xl) var(--qehs-space-lg);
	}

	.qehs-login-trust__list {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.qehs-login-hero__title {
		font-size: 1.75rem;
	}

	.qehs-login-card__title {
		font-size: 1.5rem;
	}
}

/* Social sign-in isn't available yet: the buttons are disabled and look it
   (no hover, not-allowed cursor), with a "Coming soon" note below them. */
.qehs-login-form__social:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	pointer-events: none;
}

.qehs-login-form__social-note {
	margin: 4px 0 0;
	font-size: 0.8rem;
	text-align: center;
	color: var(--qehs-text-muted);
}

/* Social sign-in buttons are links when the provider is configured: same look as
   the (disabled) button version, without the default link underline/colour. */
a.qehs-login-form__social {
	text-decoration: none;
	box-sizing: border-box;
}

a.qehs-login-form__social:visited {
	color: var(--qehs-text);
}
