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

:root {
	--blue: #1B5EAB;
	--blue-dark: #0D3D72;
	--text: #1e293b;
	--muted: #64748b;
	--border: rgba(0, 0, 0, .08);
	--bg: #eef3f9;
	--surface: #ffffff;
	--radius: 14px;
	--shadow: 0 2px 4px rgba(0,0,0,.06), 0 12px 36px rgba(13,61,114,.12);
}

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

html, body {
	height: 100%;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	background: var(--bg);
	color: var(--text);
	-webkit-font-smoothing: antialiased;
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* Navbar */
header {
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	height: 60px;
	display: flex;
	align-items: center;
	padding: 0 2rem;
	flex-shrink: 0;
}

	header a {
		display: flex;
		align-items: center;
		text-decoration: none;
	}

	header img {
		height: 32px;
	}

/* Main */
main {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3rem 1.5rem;
}

/* Footer */
footer {
	background: var(--surface);
	border-top: 1px solid var(--border);
	text-align: center;
	padding: .9rem 1rem;
	font-size: .78rem;
	color: var(--muted);
	flex-shrink: 0;
}

/* Full-page loading overlay */
.page-loader {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(238, 243, 249, .88);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	z-index: 9999;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
}

	.page-loader.active {
		display: flex;
	}

.page-loader__spinner {
	width: 46px;
	height: 46px;
	border: 3.5px solid rgba(27, 94, 171, .18);
	border-top-color: var(--blue);
	border-radius: 50%;
	animation: loader-spin .7s linear infinite;
}

.page-loader__text {
	font-size: .9rem;
	font-weight: 500;
	color: var(--muted);
}
.card {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	border-top: 4px solid var(--blue);
	padding: 3rem 3.5rem;
	width: 100%;
	max-width: 460px;
	text-align: center;
}

.card-icon {
	height: 72px;
	margin: 0 auto 1.75rem;
	display: block;
}

.card h1 {
	font-size: 1.45rem;
	font-weight: 700;
	color: var(--blue-dark);
	letter-spacing: -.01em;
	line-height: 1.25;
	margin-bottom: .4rem;
}

.card .subtitle {
	font-size: .85rem;
	color: var(--muted);
	margin-bottom: 2rem;
}

.divider {
	border: none;
	border-top: 1px solid var(--border);
	margin: .25rem 0;
}

.status-badge {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	padding: .5rem 1.25rem;
	border-radius: 99px;
	font-size: .82rem;
	font-weight: 600;
	letter-spacing: .01em;
}

	.status-badge.online {
		background: #f0fdf4;
		color: #15803d;
		border: 1px solid #bbf7d0;
	}

	.status-badge.offline {
		background: #fef2f2;
		color: #b91c1c;
		border: 1px solid #fecaca;
	}

	.status-badge.warning {
		background: #fffbeb;
		color: #b45309;
		border: 1px solid #fde68a;
	}

.status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}

.status-badge.online .status-dot {
	background: #22c55e;
	animation: pulse-dot 2.4s ease-in-out infinite;
}

.status-badge.offline .status-dot {
	background: #ef4444;
}

.status-badge.warning .status-dot {
	background: #f59e0b;
}

@keyframes pulse-dot {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(34,197,94,.5);
	}

	50% {
		box-shadow: 0 0 0 5px rgba(34,197,94,0);
	}
}
@keyframes loader-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Login page */
.login-card {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 2.5rem 2rem;
	width: 100%;
	max-width: 400px;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

	.login-card h1 {
		font-size: 1.5rem;
		font-weight: 700;
		color: var(--blue-dark);
		margin-bottom: .25rem;
	}

	.login-card p {
		font-size: .9rem;
		color: var(--muted);
		margin-bottom: .5rem;
	}

.provider-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .625rem;
	padding: .75rem 1.25rem;
	border: 1.5px solid var(--border);
	border-radius: 8px;
	background: var(--surface);
	color: var(--text);
	font-size: .95rem;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	transition: border-color .15s, box-shadow .15s, background .15s;
	width: 100%;
}

	.provider-btn:hover {
		border-color: var(--blue);
		box-shadow: 0 0 0 3px rgba(27,94,171,.12);
		background: #f5f8fd;
	}

	.provider-btn svg {
		width: 20px;
		height: 20px;
		flex-shrink: 0;
	}

/* MFA pages — share login-card layout, add MFA-specific elements */
.provider-btn--secondary {
	background: #f5f8fd;
	color: var(--blue-dark);
	font-weight: 500;
}

.mfa-qr {
	display: flex;
	justify-content: center;
	padding: 1rem 0 .5rem;
}

	.mfa-qr img {
		display: block;
		width: 220px;
		height: 220px;
		border: 1px solid var(--border);
		border-radius: 8px;
		padding: 8px;
		background: var(--surface);
	}

.mfa-manual {
	font-size: .85rem;
	color: var(--muted);
}

	.mfa-manual summary {
		cursor: pointer;
		color: var(--blue);
		font-weight: 500;
		padding: .25rem 0;
	}

	.mfa-manual p {
		margin: .5rem 0 .35rem;
	}

.mfa-secret {
	display: inline-block;
	padding: .5rem .75rem;
	background: #f1f5f9;
	border-radius: 6px;
	font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
	font-size: .9rem;
	color: var(--text);
	letter-spacing: .05em;
	word-break: break-all;
}

.mfa-error {
	padding: .75rem 1rem;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 6px;
	color: #b91c1c;
	font-size: .85rem;
}

.mfa-info {
	padding: .75rem 1rem;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 6px;
	color: #15803d;
	font-size: .85rem;
}

.mfa-status {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: .35rem 1rem;
	margin: 0;
	font-size: .9rem;
}

	.mfa-status dt {
		color: var(--muted);
		font-weight: 500;
	}

	.mfa-status dd {
		margin: 0;
		color: var(--text);
	}

.mfa-section-heading {
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--blue-dark);
	margin: .25rem 0 .5rem;
}

.login-card label {
	display: block;
	font-size: .85rem;
	font-weight: 500;
	color: var(--text);
	margin-bottom: .35rem;
}

.login-card input[type="text"] {
	width: 100%;
	padding: .75rem 1rem;
	border: 1.5px solid var(--border);
	border-radius: 8px;
	font-size: 1.1rem;
	letter-spacing: .15em;
	text-align: center;
	font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
	transition: border-color .15s, box-shadow .15s;
}

	.login-card input[type="text"]:focus {
		outline: none;
		border-color: var(--blue);
		box-shadow: 0 0 0 3px rgba(27,94,171,.12);
	}

.mfa-codes {
	list-style: none;
	padding: 0;
	margin: .5rem 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: .5rem;
}

	.mfa-codes li code {
		display: block;
		padding: .55rem .75rem;
		background: #f1f5f9;
		border-radius: 6px;
		font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
		font-size: .95rem;
		color: var(--text);
		text-align: center;
		letter-spacing: .05em;
	}

.mfa-acknowledge {
	display: flex !important;
	align-items: flex-start;
	gap: .5rem;
	font-size: .88rem;
	color: var(--text);
	font-weight: 400 !important;
	cursor: pointer;
	margin: .5rem 0 1rem !important;
}

	.mfa-acknowledge input[type="checkbox"] {
		margin-top: .15rem;
		flex-shrink: 0;
	}

.provider-btn:disabled {
	opacity: .5;
	cursor: not-allowed;
}

	.provider-btn:disabled:hover {
		border-color: var(--border);
		box-shadow: none;
		background: var(--surface);
	}

/* Error page */
.card--error {
	border-top-color: #b91c1c;
}

.error-icon {
	font-size: 3rem;
	margin-bottom: 1.25rem;
	line-height: 1;
	color: #b91c1c;
}

.card p {
	font-size: .88rem;
	color: var(--muted);
	line-height: 1.6;
	margin-bottom: 1rem;
}

.request-id {
	display: inline-block;
	margin-top: .25rem;
	padding: .35rem .8rem;
	background: #f1f5f9;
	border-radius: 6px;
	font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
	font-size: .78rem;
	color: var(--muted);
	word-break: break-all;
}

.back-link {
	display: inline-block;
	margin-top: 1.75rem;
	font-size: .82rem;
	color: var(--blue);
	text-decoration: none;
	font-weight: 500;
}

	.back-link:hover {
		text-decoration: underline;
	}

.home-purpose {
	margin-top: -1rem;
}

/* Footer links */
.footer-links {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: .4rem 1.25rem;
	margin-bottom: .4rem;
}

	.footer-links a {
		color: var(--blue);
		text-decoration: none;
	}

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

/* Privacy / Terms pages */
.document {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	border-top: 4px solid var(--blue);
	padding: 2.5rem 3rem;
	width: 100%;
	max-width: 820px;
	align-self: flex-start;
	line-height: 1.65;
	font-size: .95rem;
}

	.document .document-back {
		margin: 0 0 1.25rem;
	}

	.document h1 {
		font-size: 1.6rem;
		font-weight: 700;
		color: var(--blue-dark);
		letter-spacing: -.01em;
	}

	.document .document-meta {
		font-size: .82rem;
		color: var(--muted);
		margin-bottom: 1.5rem;
	}

	.document h2 {
		font-size: 1.1rem;
		font-weight: 600;
		color: var(--blue-dark);
		margin: 2rem 0 .6rem;
	}

	.document p {
		margin-bottom: .9rem;
	}

	.document ul {
		margin: 0 0 .9rem 1.4rem;
	}

	.document li {
		margin-bottom: .35rem;
	}

	.document a:not(.back-link) {
		color: var(--blue);
	}

@media (max-width: 600px) {
	.document {
		padding: 1.75rem 1.25rem;
	}
}