/**
 * MigraSync auth pages — Inter, centered card, matches dashboard aesthetic.
 */

body.msw-auth-page {
	background: #f1f5f9;
}

.msw-auth {
	font-family: "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: #000000;
	padding: 2.5rem 1.25rem 3rem;
	-webkit-font-smoothing: antialiased;
}

.msw-auth__shell {
	max-width: 420px;
	margin: 0 auto;
}

.msw-auth__card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	padding: 2.25rem 2rem 2rem;
	box-shadow: none;
}

.msw-auth__brand {
	display: flex;
	align-items: center;
	gap: 0.35em;
	margin-bottom: 1.75rem;
}

.msw-auth__logo {
	width: 2rem;
	height: 2rem;
	border-radius: 4px;
	flex-shrink: 0;
}

span.msw-auth__logo {
	display: block;
	background: #9966cc;
	box-shadow: none;
}

img.msw-auth__logo {
	display: block;
	object-fit: contain;
	background: transparent;
	box-shadow: none;
}

.msw-auth__name {
	font-family: "Albert Sans", sans-serif;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.04em;
	color: #000000;
}

.msw-auth__title {
	font-family: "Albert Sans", sans-serif;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.03em;
	margin: 0 0 0.35rem;
}

.msw-auth__subtitle {
	font-size: 0.9375rem;
	color: #64748b;
	margin: 0 0 1.5rem;
}

.msw-auth__alert {
	font-size: 0.875rem;
	padding: 0.75rem 1rem;
	border-radius: 10px;
	margin-bottom: 1.25rem;
}

.msw-auth__alert--error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.msw-auth__alert--success {
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #065f46;
}

.msw-auth__field {
	margin: 0 0 1.1rem;
}

.msw-auth__field--inline {
	margin-bottom: 0.5rem;
}

.msw-auth__label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #64748b;
	margin-bottom: 0.35rem;
}

.msw-auth__input {
	width: 100%;
	font: inherit;
	font-size: 0.9375rem;
	padding: 0.65rem 0.85rem;
	border-radius: 4px;
	border: 1px solid #e2e8f0;
	background: #f8fafc;
	color: #000000;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.msw-auth__input:focus {
	outline: none;
	border-color: #9966cc;
	box-shadow: none;
	background: #fff;
}

.msw-otp {
	margin-bottom: 1.1rem;
}

.msw-otp__boxes {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-top: 0.35rem;
}

.msw-otp__digit {
	flex: 1 1 0;
	min-width: 0;
	max-width: 3.25rem;
	height: 3.25rem;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	text-align: center;
	font: inherit;
	font-size: 1.375rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
	color: #0f172a;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.msw-otp__digit:hover {
	border-color: #cbd5e1;
}

.msw-otp__digit:focus {
	outline: none;
	border-color: #9966cc;
	box-shadow: 0 0 0 3px rgba(153, 102, 204, 0.18);
	background: #fff;
}

.msw-otp__digit.msw-otp__digit--filled {
	border-color: #9966cc;
	background: #faf8fc;
}

.msw-otp__digit:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	background: #f1f5f9;
}

@media (max-width: 420px) {
	.msw-otp__boxes {
		gap: 0.35rem;
	}

	.msw-otp__digit {
		height: 2.85rem;
		font-size: 1.25rem;
		max-width: 2.75rem;
	}
}

.msw-auth__checkbox {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.875rem;
	color: #475569;
	cursor: pointer;
}

.msw-auth__checkbox input {
	width: 1rem;
	height: 1rem;
	accent-color: #9966cc;
}

.msw-auth__checkbox--terms {
	align-items: flex-start;
	gap: 0.65rem;
	line-height: 1.6;
}

.msw-auth__checkbox--terms input {
	flex-shrink: 0;
	margin-top: 0.15rem;
}

.msw-auth__checkbox-copy {
	display: block;
}

.msw-auth__checkbox-copy a {
	color: #9966cc;
	font-weight: 700;
	text-decoration: none;
}

.msw-auth__checkbox-copy a:hover {
	text-decoration: underline;
}

.msw-auth__checkbox--locked {
	opacity: 0.85;
	cursor: default;
}

.msw-auth__actions {
	margin: 1.5rem 0 0;
}

.msw-auth__submit {
	width: 100%;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	padding: 0.75rem 1rem;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	color: #fff;
	background: #9966cc;
	box-shadow: none;
	transition: filter 0.15s ease, transform 0.1s ease;
}

.msw-auth__submit:hover {
	filter: brightness(1.05);
}

.msw-auth__submit:active {
	transform: scale(0.99);
}

.msw-auth__submit:disabled,
.msw-auth__submit.msw-auth__submit--locked {
	opacity: 0.72;
	cursor: not-allowed;
	filter: none;
	transform: none;
	background: #9966cc;
	box-shadow: none;
}

.msw-auth__submit:disabled:hover,
.msw-auth__submit.msw-auth__submit--locked:hover {
	filter: none;
}

.msw-auth__input:disabled,
.msw-auth__input.msw-auth__input--locked {
	opacity: 0.65;
	cursor: not-allowed;
	background: #f1f5f9;
}

.msw-auth__footer {
	margin: 1.75rem 0 0;
	font-size: 0.875rem;
	text-align: center;
	color: #64748b;
}

.msw-auth__footer a {
	color: #9966cc;
	font-weight: 500;
	text-decoration: none;
}

.msw-auth__footer a:hover {
	text-decoration: underline;
}

.msw-auth__sep {
	opacity: 0.5;
	padding: 0 0.25rem;
}

.msw-auth__muted {
	color: #64748b;
	font-size: 0.9375rem;
	margin: 0;
}

/* Inline nav shortcode (block themes) */
.msw-auth-nav {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.msw-auth-nav__link {
	font-weight: 600;
	font-size: 0.875rem;
	color: #334155;
	text-decoration: none;
}

.msw-auth-nav__link:hover {
	color: #0f172a;
}

.msw-auth-nav__link--accent {
	color: #9966cc;
}

.msw-auth-nav__link--accent:hover {
	color: #8759b8;
}

#msw-auth-login-form.msw-locked-state,
#msw-auth-resend-form.msw-locked-state,
#msw-auth-resend-wrap.msw-locked-state {
	opacity: 0.92;
	pointer-events: none;
}

@media (min-width: 480px) {
	.msw-auth {
		padding: 4rem 1.5rem 4rem;
	}

	.msw-auth__card {
		padding: 2.5rem 2.25rem;
	}
}

body.msw-auth-page--register,
body.msw-auth-page--login,
body.msw-auth-page--forgot,
body.msw-auth-page--newsletter {
	background:
		radial-gradient(circle at top left, rgba(153, 102, 204, 0.12), transparent 32%),
		linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.msw-auth--register {
	min-height: 100vh;
	padding: 1.5rem;
	display: flex;
	align-items: center;
}

.msw-auth__register-shell {
	max-width: 1220px;
	width: 100%;
	margin: 0 auto;
}

.msw-auth__register-layout {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	overflow: hidden;
	background: #ffffff;
	min-height: 720px;
}

.msw-auth__register-main {
	padding: 3rem 3rem 2.5rem;
	background: #ffffff;
	display: flex;
	flex-direction: column;
}

.msw-auth__register-main .msw-auth__brand {
	margin-bottom: 2rem;
}

.msw-auth__register-intro {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.msw-auth__eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #9966cc;
}

.msw-auth__register-plan {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.35rem;
	padding: 0.7rem 0.85rem;
	border: 1px solid rgba(153, 102, 204, 0.18);
	border-radius: 4px;
	background: rgba(153, 102, 204, 0.08);
	color: #1e293b;
	font-size: 0.875rem;
	min-width: 8.5rem;
}

.msw-auth__register-plan-label {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #9966cc;
}

.msw-auth__register-plan-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.15rem;
	line-height: 1.3;
}

.msw-auth__register-plan-product {
	font-size: 0.95rem;
	font-weight: 800;
	color: #0f172a;
}

.msw-auth__register-plan-tier {
	font-size: 0.875rem;
	font-weight: 600;
	color: #334155;
}

.msw-auth__register-plan-meta {
	font-size: 0.75rem;
	font-weight: 600;
	color: #64748b;
}

.msw-auth__select {
	appearance: none;
	background-image:
		linear-gradient(45deg, transparent 50%, #64748b 50%),
		linear-gradient(135deg, #64748b 50%, transparent 50%);
	background-position:
		calc(100% - 18px) calc(50% - 2px),
		calc(100% - 12px) calc(50% - 2px);
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	padding-right: 2.5rem;
}

.msw-auth__hint {
	margin: -0.15rem 0 0;
	font-size: 0.875rem;
	color: #64748b;
}

.msw-auth__consent {
	margin: 0.85rem 0 0;
	font-size: 0.8125rem;
	line-height: 1.6;
	color: #64748b;
}

.msw-auth__consent a {
	color: #9966cc;
	font-weight: 700;
	text-decoration: none;
}

.msw-auth__consent a:hover {
	text-decoration: underline;
}

.msw-auth__footer--left {
	text-align: left;
	margin-top: 1rem;
	padding-top: 0;
}

.msw-auth__register-side {
	padding: 3rem 2.75rem;
	background: linear-gradient(180deg, #f7f1ff 0%, #f8fafc 100%);
	border-left: 1px solid #e2e8f0;
	display: flex;
	flex-direction: column;
}

.msw-auth__founder-title {
	font-family: "Albert Sans", sans-serif;
	font-size: 2rem;
	line-height: 1.12;
	letter-spacing: -0.03em;
	margin: 0 0 1rem;
	color: #0f172a;
}

.msw-auth__founder-copy {
	margin: 0 0 1.75rem;
	font-size: 0.975rem;
	line-height: 1.7;
	color: #475569;
}

.msw-auth__founder-profile {
	margin-top: auto;
	display: grid;
	gap: 1rem;
	justify-items: start;
}

.msw-auth__founder-name {
	font-family: "Albert Sans", sans-serif;
	font-size: 1.125rem;
	font-weight: 700;
	color: #0f172a;
}

.msw-auth__founder-role {
	font-size: 0.875rem;
	color: #64748b;
}

.msw-auth__founder-profile-meta {
	display: grid;
	gap: 0.2rem;
}

.msw-auth__founder-image {
	width: 100%;
	max-width: 180px;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: center top;
	border-radius: 4px;
	border: 1px solid #e2e8f0;
	background: #ffffff;
	padding: 0.35rem;
	filter: grayscale(1) contrast(1.04) brightness(1.02);
}

@media (max-width: 1080px) {
	.msw-auth__register-layout {
		grid-template-columns: 1fr;
	}

	.msw-auth__register-side {
		border-left: 0;
		border-top: 1px solid #e2e8f0;
	}

	.msw-auth__founder-image {
		max-width: 180px;
	}
}

@media (max-width: 720px) {
	.msw-auth--register {
		padding: 0.9rem;
	}

	.msw-auth__register-main,
	.msw-auth__register-side {
		padding: 1.5rem;
	}

	.msw-auth__register-intro {
		flex-direction: column;
	}

	.msw-auth__founder-title {
		font-size: 1.6rem;
	}

	.msw-auth__founder-meta {
		align-items: flex-start;
	}

	.msw-auth__founder-image {
		max-width: 180px;
		align-self: stretch;
	}
}
