/* ITOR Auth — Skillbox-style card.
   Палитра вынесена в CSS-переменные — переопределяются под бренд ИТОР через filter / customizer. */

:root {
	--itor-auth-bg: #f4f4f6;
	--itor-auth-card: #ffffff;
	--itor-auth-border: #e7e7eb;
	--itor-auth-text: #111418;
	--itor-auth-muted: #6b7080;
	--itor-auth-primary: #1a3a5c;
	--itor-auth-primary-hover: #14304b;
	--itor-auth-primary-disabled: #d8dde4;
	--itor-auth-primary-text: #ffffff;
	--itor-auth-link: #1a3a5c;
	--itor-auth-error: #d22f4f;
	--itor-auth-success: #1f8a4f;
	--itor-auth-radius: 12px;
	--itor-auth-radius-sm: 8px;
	--itor-auth-shadow: 0 4px 24px rgba(20, 30, 50, 0.06);
	--itor-auth-shadow-focus: 0 0 0 4px rgba(26, 58, 92, 0.12);
	--itor-auth-input-bg: #ffffff;
	--itor-auth-input-border: #d8dde4;
	--itor-auth-input-focus: #1a3a5c;
	--itor-auth-font: 'Exo 2', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.itor-auth-wrap {
	min-height: 100vh;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 80px 16px 40px;
	background: var(--itor-auth-bg);
	font-family: var(--itor-auth-font);
	color: var(--itor-auth-text);
	box-sizing: border-box;
}

.itor-auth-card {
	width: 100%;
	max-width: 420px;
	background: var(--itor-auth-card);
	border: 1px solid var(--itor-auth-border);
	border-radius: var(--itor-auth-radius);
	box-shadow: var(--itor-auth-shadow);
	padding: 32px 32px 28px;
	box-sizing: border-box;
	position: relative;
}

.itor-auth-back {
	position: absolute;
	top: 24px;
	left: 24px;
	background: none;
	border: 0;
	padding: 4px;
	cursor: pointer;
	color: var(--itor-auth-muted);
	border-radius: 6px;
	transition: color .15s, background .15s;
}
.itor-auth-back:hover { color: var(--itor-auth-text); background: var(--itor-auth-bg); }
.itor-auth-back svg { display: block; width: 20px; height: 20px; }

.itor-auth-logo {
	display: flex;
	justify-content: center;
	margin-bottom: 16px;
}
.itor-auth-logo-square {
	width: 48px;
	height: 48px;
	background: var(--itor-auth-primary);
	color: var(--itor-auth-primary-text);
	border-radius: var(--itor-auth-radius-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 24px;
	line-height: 1;
}
.itor-auth-logo img { max-height: 48px; max-width: 200px; display: block; }

.itor-auth-title {
	text-align: center;
	font-size: 22px;
	font-weight: 600;
	margin: 0 0 24px;
	letter-spacing: -.01em;
}

.itor-auth-subtitle {
	text-align: center;
	font-size: 14px;
	color: var(--itor-auth-muted);
	margin: -16px 0 24px;
	line-height: 1.5;
}
.itor-auth-subtitle b { color: var(--itor-auth-text); font-weight: 600; }

.itor-auth-field { margin-bottom: 16px; }

.itor-auth-input {
	width: 100%;
	box-sizing: border-box;
	padding: 14px 16px;
	border: 1px solid var(--itor-auth-input-border);
	border-radius: var(--itor-auth-radius-sm);
	background: var(--itor-auth-input-bg);
	font-family: inherit;
	font-size: 15px;
	color: var(--itor-auth-text);
	outline: none;
	transition: border-color .15s, box-shadow .15s;
}
.itor-auth-input:focus {
	border-color: var(--itor-auth-input-focus);
	box-shadow: var(--itor-auth-shadow-focus);
}
.itor-auth-input::placeholder { color: var(--itor-auth-muted); }
.itor-auth-input--error { border-color: var(--itor-auth-error); }

.itor-auth-input-wrap { position: relative; }
.itor-auth-input-wrap .itor-auth-toggle {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: 0;
	cursor: pointer;
	padding: 4px;
	color: var(--itor-auth-muted);
}

.itor-auth-checkbox {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 13px;
	line-height: 1.5;
	color: var(--itor-auth-text);
	cursor: pointer;
	margin-bottom: 12px;
}
.itor-auth-checkbox input { margin-top: 2px; flex-shrink: 0; }
.itor-auth-checkbox a { color: var(--itor-auth-link); text-decoration: underline; }

.itor-auth-button {
	width: 100%;
	padding: 14px 16px;
	background: var(--itor-auth-primary);
	color: var(--itor-auth-primary-text);
	border: 0;
	border-radius: var(--itor-auth-radius-sm);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, transform .05s;
	margin-top: 8px;
}
.itor-auth-button:hover { background: var(--itor-auth-primary-hover); }
.itor-auth-button:not(.itor-auth-button--secondary):not(:disabled):not([aria-disabled="true"]):hover,
.itor-auth-button:not(.itor-auth-button--secondary):not(:disabled):not([aria-disabled="true"]):focus-visible,
.itor-auth-button:not(.itor-auth-button--secondary):not(:disabled):not([aria-disabled="true"]):active {
	color: var(--itor-auth-primary-text);
}
.itor-auth-button:active { transform: scale(.99); }
.itor-auth-button:disabled,
.itor-auth-button[aria-disabled="true"] {
	background: var(--itor-auth-primary-disabled);
	color: #8a8f9c;
	cursor: not-allowed;
}

.itor-auth-button--secondary {
	background: transparent;
	color: var(--itor-auth-text);
	border: 1px solid var(--itor-auth-input-border);
}
.itor-auth-button--secondary:hover {
	background: var(--itor-auth-bg);
	border-color: var(--itor-auth-text);
}

.itor-auth-fineprint {
	font-size: 11px;
	line-height: 1.5;
	color: var(--itor-auth-muted);
	margin: 12px 0 0;
}
.itor-auth-fineprint a { color: var(--itor-auth-muted); text-decoration: underline; }

.itor-auth-link {
	color: var(--itor-auth-link);
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	display: inline-block;
}
.itor-auth-link:hover { text-decoration: underline; }

.itor-auth-link-row {
	margin-top: 8px;
	margin-bottom: 4px;
}

.itor-auth-divider {
	display: flex;
	align-items: center;
	margin: 24px 0 16px;
	color: var(--itor-auth-muted);
	font-size: 12px;
	text-transform: lowercase;
}
.itor-auth-divider::before,
.itor-auth-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--itor-auth-border);
}
.itor-auth-divider span { padding: 0 12px; }

.itor-auth-socials {
	display: flex;
	gap: 12px;
	justify-content: center;
	margin-bottom: 8px;
}
.itor-auth-social {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--itor-auth-card);
	border: 1px solid var(--itor-auth-input-border);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: border-color .15s, transform .05s;
	text-decoration: none;
	padding: 0;
}
.itor-auth-social:hover { border-color: var(--itor-auth-text); }
.itor-auth-social:active { transform: scale(.96); }
.itor-auth-social svg { width: 24px; height: 24px; }

.itor-auth-footer-link {
	text-align: center;
	margin-top: 20px;
	font-size: 13px;
	color: var(--itor-auth-muted);
}
.itor-auth-footer-link a {
	color: var(--itor-auth-link);
	font-weight: 600;
	text-decoration: none;
}
.itor-auth-footer-link a:hover { text-decoration: underline; }

/* OTP-инпут — 6 ячеек */
.itor-auth-otp {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 16px;
}
.itor-auth-otp input {
	width: 48px;
	height: 56px;
	text-align: center;
	font-size: 24px;
	font-weight: 600;
	font-family: inherit;
	border: 1px solid var(--itor-auth-input-border);
	border-radius: var(--itor-auth-radius-sm);
	background: var(--itor-auth-input-bg);
	color: var(--itor-auth-text);
	outline: none;
	transition: border-color .15s, box-shadow .15s;
	caret-color: var(--itor-auth-primary);
}
.itor-auth-otp input:focus {
	border-color: var(--itor-auth-input-focus);
	box-shadow: var(--itor-auth-shadow-focus);
}
.itor-auth-otp input.is-filled {
	background: var(--itor-auth-bg);
	border-color: var(--itor-auth-text);
}

.itor-auth-resend {
	text-align: center;
	font-size: 13px;
	color: var(--itor-auth-muted);
	margin-top: 8px;
}
.itor-auth-resend button {
	background: none;
	border: 0;
	padding: 0;
	color: var(--itor-auth-link);
	font-family: inherit;
	font-size: inherit;
	cursor: pointer;
	font-weight: 500;
	text-decoration: underline;
}
.itor-auth-resend button:disabled {
	color: var(--itor-auth-muted);
	cursor: not-allowed;
	text-decoration: none;
}

.itor-auth-error-msg {
	background: rgba(210, 47, 79, 0.08);
	color: var(--itor-auth-error);
	padding: 10px 14px;
	border-radius: var(--itor-auth-radius-sm);
	font-size: 13px;
	line-height: 1.4;
	margin-bottom: 16px;
}

.itor-auth-captcha {
	margin: 16px 0;
	display: flex;
	justify-content: center;
}

.itor-auth-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: itor-auth-spin .6s linear infinite;
	vertical-align: middle;
	margin-right: 8px;
}
@keyframes itor-auth-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
	.itor-auth-wrap { padding-top: 32px; }
	.itor-auth-card { padding: 24px 20px; border-radius: 0; border-left: 0; border-right: 0; }
	.itor-auth-otp input { width: 40px; height: 48px; font-size: 20px; }
}

/* ─── Анкета: новые поля и микрокопия ─── */

.itor-auth-field-group {
	margin-bottom: 18px;
}

.itor-auth-field-label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--itor-auth-text);
	margin-bottom: 8px;
	line-height: 1.4;
}

.itor-auth-checkboxes {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px 14px;
	border: 1px solid var(--itor-auth-input-border);
	border-radius: 10px;
	background: var(--itor-auth-input-bg);
}

.itor-auth-checkbox--inline {
	font-size: 13px;
	line-height: 1.4;
	color: var(--itor-auth-text);
	cursor: pointer;
	margin: 0;
	gap: 8px;
}

.itor-auth-checkbox--inline input[type="checkbox"] {
	margin-top: 1px;
}

.itor-auth-textarea {
	min-height: 80px;
	resize: vertical;
	font-family: inherit;
	line-height: 1.5;
	padding: 10px 12px;
}

.itor-auth-reward-note {
	margin: 16px 0 16px;
	padding: 10px 14px;
	background: rgba(26, 58, 92, 0.04);
	border-radius: 8px;
	color: var(--itor-auth-muted);
	font-size: 12px;
	line-height: 1.5;
}

.itor-auth-skip-link {
	text-align: center;
	margin-top: 10px;
}

.itor-auth-skip-link button {
	background: none;
	border: 0;
	cursor: pointer;
	padding: 8px 4px;
	color: var(--itor-auth-muted);
	font-size: 13px;
	font-family: inherit;
}

.itor-auth-skip-link button:hover { color: var(--itor-auth-link); }
.itor-auth-skip-link button[disabled] { opacity: 0.5; cursor: default; }

.itor-auth-success-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: var(--itor-auth-success);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.itor-auth-success-icon svg { width: 30px; height: 30px; }

.itor-auth-button--link {
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
}
