:root {
	--auth-primary: #1c62ae;
	--auth-primary-hover: #154f90;
	--auth-primary-soft: #edf5ff;
	--auth-text: #172033;
	--auth-muted: #5d6878;
	--auth-border: #cdd5df;
	--auth-surface: #ffffff;
	--auth-background: #f5f7fa;
	--auth-error: #a51d2d;
	--auth-error-bg: #fff1f2;
	--auth-success: #176b42;
	--auth-success-bg: #edf9f2;
}

.auth-page {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	min-height: 520px;
	padding: 56px 20px 72px;
	background: var(--auth-background);
}

.auth-card {
	box-sizing: border-box;
	width: 100%;
	max-width: 460px;
	padding: 40px;
	border: 1px solid #e2e7ed;
	border-radius: 16px;
	background: var(--auth-surface);
	box-shadow: 0 16px 40px rgba(23, 32, 51, 0.09);
	color: var(--auth-text);
}

.auth-eyebrow {
	margin: 0 0 8px;
	color: var(--auth-primary);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.auth-title {
	margin: 0;
	color: var(--auth-text);
	font-size: clamp(28px, 6vw, 36px);
	font-weight: 700;
	line-height: 1.2;
}

.auth-intro {
	margin: 12px 0 28px;
	color: var(--auth-muted);
	font-size: 16px;
	line-height: 1.55;
}

.auth-alert {
	margin: 0 0 24px;
	padding: 14px 16px;
	border: 1px solid currentColor;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.5;
}

.auth-alert--error {
	background: var(--auth-error-bg);
	color: var(--auth-error);
}

.auth-alert--success {
	background: var(--auth-success-bg);
	color: var(--auth-success);
}

.auth-form {
	display: grid;
	gap: 20px;
}

.auth-field {
	display: grid;
	gap: 8px;
}

.auth-label {
	color: var(--auth-text);
	font-size: 14px;
	font-weight: 600;
}

.auth-input-wrap {
	position: relative;
}

.auth-input {
	box-sizing: border-box;
	width: 100%;
	min-height: 50px;
	padding: 12px 14px;
	border: 1px solid var(--auth-border);
	border-radius: 10px;
	background: #fff;
	color: var(--auth-text);
	font: inherit;
	font-size: 16px;
	line-height: 1.4;
	transition: border-color 180ms ease, box-shadow 180ms ease;
}

.auth-input-wrap .auth-input {
	padding-right: 52px;
}

.auth-input:hover {
	border-color: #9ba8b7;
}

.auth-input:focus {
	border-color: var(--auth-primary);
	box-shadow: 0 0 0 3px rgba(28, 98, 174, 0.18);
	outline: none;
}

.auth-password-toggle {
	position: absolute;
	top: 3px;
	right: 3px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--auth-muted);
	cursor: pointer;
}

.auth-password-toggle:hover {
	background: var(--auth-primary-soft);
	color: var(--auth-primary);
}

.auth-password-toggle:focus-visible {
	box-shadow: 0 0 0 3px rgba(28, 98, 174, 0.22);
	outline: none;
}

.auth-password-toggle svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.auth-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
}

.auth-check {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 44px;
	color: var(--auth-muted);
	cursor: pointer;
}

.auth-check input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--auth-primary);
}

.auth-link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--auth-primary);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.auth-link:hover {
	color: var(--auth-primary-hover);
}

.auth-link:focus-visible,
.auth-button:focus-visible {
	box-shadow: 0 0 0 3px rgba(28, 98, 174, 0.24);
	outline: none;
}

.auth-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 50px;
	padding: 12px 20px;
	border: 1px solid var(--auth-primary);
	border-radius: 10px;
	background: var(--auth-primary);
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.auth-button:hover {
	border-color: var(--auth-primary-hover);
	background: var(--auth-primary-hover);
}

.auth-button:disabled {
	cursor: wait;
	opacity: 0.6;
}

.auth-footer {
	margin: 24px 0 0;
	padding-top: 20px;
	border-top: 1px solid #e4e9ef;
	color: var(--auth-muted);
	font-size: 14px;
	line-height: 1.5;
}

.auth-footer .auth-link {
	margin-left: 4px;
}

.auth-helper {
	margin: 0;
	color: var(--auth-muted);
	font-size: 13px;
	line-height: 1.5;
}

.auth-captcha {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

.auth-policy {
	margin: 0;
	padding: 12px 14px;
	border-radius: 8px;
	background: #f7f9fb;
	color: var(--auth-muted);
	font-size: 13px;
	line-height: 1.5;
}

@media (min-width: 1024px) and (max-width: 1399px) {
	.nav-top a {
		padding-right: 8px;
		padding-left: 8px;
		font-size: 14px;
	}
}

@media (max-width: 560px) {
	.auth-page {
		min-height: 0;
		padding: 24px 12px 48px;
	}

	.auth-card {
		padding: 28px 20px;
		border-radius: 12px;
		box-shadow: 0 10px 28px rgba(23, 32, 51, 0.08);
	}

	.auth-row {
		align-items: flex-start;
		flex-direction: column;
		gap: 4px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.auth-input,
	.auth-button {
		transition: none;
	}
}
