/*
 * Sign-in, register, verify and password screens.
 *
 * A 400px card on the left, and on wide viewports a brand-tinted panel on the
 * right carrying one customer quote and a live-looking uptime fragment. The
 * panel is decorative: it disappears below 1024px and its content is never the
 * only place something is said.
 */

.um-auth {
	display: flex;
	min-height: 100vh;
	min-height: 100dvh;
	background: var(--bg-subtle);
}

.um-auth__col {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--space-12) var(--space-8);
}

@media (max-width: 767px) {
	.um-auth__col { padding: var(--space-8) var(--space-4); }

	/* These carry their own classes, so the marketing-header touch rules
	   never reached them: the theme toggle stayed 32x32 and the footer
	   links 24px tall - on the two pages every new customer has to get
	   through before they can use anything. */
	.um-auth__head .um-btn--icon,
	.um-auth__head .um-btn--sm {
		width: 44px;
		height: 44px;
	}

	.um-auth__brand,
	.um-auth__legal a,
	.um-auth footer a {
		display: inline-flex;
		align-items: center;
		min-height: 40px;
		min-width: 40px;
	}

	/* "Forgot password?" was 20px tall - the one link people reach for
	   when they are already locked out and annoyed. */
	.um-auth a.um-small {
		display: inline-flex;
		align-items: center;
		min-height: 40px;
	}
}

.um-auth__inner {
	width: 100%;
	max-width: 400px;
	display: flex;
	flex-direction: column;
	gap: var(--space-6);
}

.um-auth__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
}

.um-auth__brand {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	color: var(--text);
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.um-auth__brand:hover { color: var(--text); text-decoration: none; }

.um-auth__card {
	padding: var(--space-8);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
}

.um-auth__title { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: 600; }

.um-auth__subtitle {
	margin-block: var(--space-1) var(--space-6);
	font-size: 0.875rem;
	color: var(--text-secondary);
}

.um-auth__form {
	display: flex;
	flex-direction: column;
	gap: var(--space-5, 20px);
}

.um-auth__form .um-field { margin-block-end: 0; }

.um-auth__label-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-3);
	margin-block-end: var(--space-2);
}

.um-auth__divider {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin-block: var(--space-6);
}

.um-auth__divider::before,
.um-auth__divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--border);
}

.um-auth__divider span {
	font-size: var(--fs-micro);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--text-muted);
}

.um-auth__legal {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	flex-wrap: wrap;
	font-size: var(--fs-micro);
	color: var(--text-muted);
}

.um-auth__legal a { color: var(--text-muted); }
.um-auth__legal a:hover { color: var(--text-secondary); }

/* -- Password strength -------------------------------------------------- */

.um-strength { margin-block-start: var(--space-2); }

.um-strength__track {
	display: flex;
	gap: var(--space-1);
	height: 4px;
}

.um-strength__seg {
	flex: 1;
	border-radius: var(--radius-full);
	background: var(--border);
	transition: background var(--duration-base) var(--ease);
}

.um-strength__label {
	display: block;
	margin-block-start: var(--space-2);
	font-size: var(--fs-micro);
	color: var(--text-muted);
}

.um-strength[data-level="1"] .um-strength__seg:nth-child(1) { background: var(--down); }
.um-strength[data-level="2"] .um-strength__seg:nth-child(-n+2) { background: var(--degraded); }
.um-strength[data-level="3"] .um-strength__seg:nth-child(-n+3) { background: var(--degraded); }
.um-strength[data-level="4"] .um-strength__seg { background: var(--up); }

/* -- Right-hand panel ---------------------------------------------------- */

.um-auth__aside { display: none; }

@media (min-width: 1024px) {
	.um-auth__aside {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: var(--space-12);
		width: 55%;
		flex-shrink: 0;
		padding: var(--space-16);
		background: var(--brand-subtle);
		border-inline-start: 1px solid var(--border);
	}
}

.um-auth__quote { max-width: 560px; margin: 0; }

.um-auth__quote p {
	font-size: var(--fs-h2);
	line-height: 2.125rem;
	font-weight: 500;
	letter-spacing: -0.01em;
	text-wrap: pretty;
}

.um-auth__quote footer {
	margin-block-start: var(--space-4);
	font-size: var(--fs-small);
	color: var(--text-secondary);
}

.um-auth__preview {
	max-width: 560px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
	overflow: hidden;
}

.um-auth__preview-head {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	padding: var(--space-3) var(--space-4);
	border-block-end: 1px solid var(--border);
	font-size: var(--fs-small);
	font-weight: 500;
}

.um-auth__preview-body { padding: var(--space-4); }

.um-auth__preview-metrics {
	display: flex;
	gap: var(--space-6);
	margin-block-start: var(--space-4);
}

.um-auth__preview-metrics dt {
	font-size: var(--fs-micro);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--text-muted);
}

.um-auth__preview-metrics dd {
	margin: 2px 0 0;
	font-family: var(--mono);
	font-size: 1.25rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

/* -- Verify screen -------------------------------------------------------- */

.um-verify {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: var(--space-4);
}

.um-verify__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: var(--radius-full);
	background: var(--brand-subtle);
	color: var(--brand);
}

.um-verify__email {
	font-family: var(--mono);
	font-size: 0.875rem;
	word-break: break-all;
}
