/* —— Модалка авторизации —— */
body.auth-modal-open { overflow: hidden; }

.auth-modal {
	position: fixed;
	inset: 0;
	z-index: 80;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}
.auth-modal[hidden] { display: none !important; }
.auth-modal.is-open { display: flex !important; }

.auth-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	cursor: pointer;
}

.auth-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 380px;
	padding: 28px 28px 24px;
	box-sizing: border-box;
	border-radius: 18px;
	background: #fff;
	color: #0f172a;
	box-shadow:
		0 4px 6px rgba(15, 23, 42, 0.06),
		0 24px 48px rgba(15, 23, 42, 0.22);
	animation: auth-modal-in 0.22s ease-out;
}
@keyframes auth-modal-in {
	from { opacity: 0; transform: translateY(10px) scale(0.98); }
	to { opacity: 1; transform: none; }
}

.auth-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: rgba(15, 23, 42, 0.06);
	color: #334155;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease;
}
.auth-modal__close:hover { background: rgba(15, 23, 42, 0.12); }

.auth-modal__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin: 0 auto 14px;
	border-radius: 14px;
	background: rgba(13, 148, 136, 0.12);
	font-size: 26px;
	line-height: 1;
}

.auth-modal__title {
	margin: 0 0 6px;
	padding: 0 28px 0 0;
	font-size: 1.35rem;
	font-weight: 700;
	text-align: center;
	color: #0f172a;
	line-height: 1.25;
}

.auth-modal__hint {
	margin: 0 0 18px;
	padding: 0;
	font-size: 0.9rem;
	line-height: 1.4;
	text-align: center;
	color: #64748b;
}

.auth-modal__error {
	margin: 0 0 14px;
	padding: 10px 12px;
	border-radius: 10px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
	font-size: 0.9rem;
	line-height: 1.35;
	text-align: center;
}

.auth-modal__form {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 0;
}

.auth-modal__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	font-size: 0.85rem;
	font-weight: 600;
	color: #334155;
}

.auth-modal__input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 11px 14px !important;
	border: 1px solid #cbd5e1;
	border-radius: 11px;
	background: #f8fafc;
	color: #0f172a;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.auth-modal__input:focus {
	border-color: #0d9488;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}
.auth-modal__input::placeholder { color: #94a3b8; font-weight: 400; }

.auth-modal__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 4px 0 0;
	padding: 12px 18px;
	border: 0;
	border-radius: 11px;
	background: #0d9488;
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.01em;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
	box-shadow: 0 1px 2px rgba(13, 148, 136, 0.25);
}
.auth-modal__submit:hover {
	background: #0f766e;
	box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}
.auth-modal__submit:active { transform: translateY(1px); }

@media (max-width: 420px) {
	.auth-modal { padding: 12px; }
	.auth-modal__dialog { padding: 24px 18px 20px; border-radius: 16px; }
}
