/* AMPRA branded login — split layout, password + OTP */

.ampra-login-body {
	margin: 0;
	min-height: 100vh;
	background:
		radial-gradient(900px 420px at 100% 0%, rgb(255 107 0 / 0.08), transparent 55%),
		linear-gradient(180deg, #e8eef5 0%, #f1f5f9 48%, #eef2f7 100%);
	font-family: var(--ampra-font, "Kalameh", Tahoma, sans-serif);
	color: var(--ampra-ink, #0f172a);
}

.ampra-login-body .site-header,
.ampra-login-body .site-footer {
	display: none !important;
}

.ampra-login {
	min-height: 100vh;
	display: grid;
}

.ampra-login__brand {
	display: none;
	position: relative;
	overflow: hidden;
	background: linear-gradient(165deg, #0a1628 0%, #0f172a 48%, #152238 100%);
	color: #e2e8f0;
	padding: 2.75rem 2.5rem;
}

.ampra-login__brand-glow {
	position: absolute;
	inset: -20% -10% auto auto;
	width: min(70vw, 520px);
	height: min(70vw, 520px);
	background: radial-gradient(circle, rgb(255 107 0 / 0.28) 0%, transparent 68%);
	pointer-events: none;
	animation: ampra-login-glow 8s ease-in-out infinite alternate;
}

.ampra-login__brand-grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgb(255 255 255 / 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgb(255 255 255 / 0.035) 1px, transparent 1px);
	background-size: 42px 42px;
	mask-image: linear-gradient(180deg, rgb(0 0 0 / 0.55), transparent 88%);
	pointer-events: none;
}

.ampra-login__brand-inner {
	position: relative;
	z-index: 1;
	max-width: 28rem;
	margin-inline: auto;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.95rem;
	animation: ampra-login-rise 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ampra-login__logo img {
	height: 48px;
	width: auto;
	margin-bottom: 0.85rem;
}

.ampra-login__eyebrow {
	margin: 0;
	color: #ff6b00;
	font-weight: 900;
	font-size: 0.95rem;
	letter-spacing: 0.12em;
}

.ampra-login__headline {
	margin: 0;
	color: #fff;
	font-size: clamp(1.9rem, 3.2vw, 2.55rem);
	line-height: 1.3;
	font-weight: 900;
	letter-spacing: -0.02em;
}

.ampra-login__lead {
	margin: 0;
	line-height: 1.9;
	opacity: 0.9;
	max-width: 26rem;
}

.ampra-login__points {
	margin: 1.15rem 0 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.7rem;
}

.ampra-login__points li {
	display: flex;
	gap: 0.65rem;
	align-items: start;
	font-weight: 700;
	font-size: 0.95rem;
}

.ampra-login__points li::before {
	content: "";
	width: 0.55rem;
	height: 0.55rem;
	margin-top: 0.55rem;
	border-radius: 50%;
	background: #ff6b00;
	box-shadow: 0 0 0 4px rgb(255 107 0 / 0.18);
	flex-shrink: 0;
}

.ampra-login__form-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.1rem;
	padding: 1.35rem 1rem 2rem;
	animation: ampra-login-rise 640ms 80ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ampra-login__mobile-brand {
	width: min(100%, 440px);
	text-align: center;
}

.ampra-login__mobile-logo img {
	height: 36px;
	width: auto;
}

.ampra-login__mobile-title {
	margin: 0.55rem 0 0;
	font-size: 1.15rem;
	font-weight: 900;
	color: #0f172a;
}

.ampra-login__card {
	width: min(100%, 440px);
	background: rgb(255 255 255 / 0.92);
	backdrop-filter: blur(10px);
	border: 1px solid rgb(226 232 240 / 0.95);
	border-radius: 20px;
	box-shadow:
		0 1px 2px rgb(15 23 42 / 0.04),
		0 18px 44px rgb(15 23 42 / 0.08);
	padding: 1.35rem 1.2rem 1.35rem;
}

.ampra-login__modes {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.3rem;
	padding: 0.28rem;
	background: #e8eef5;
	border-radius: 14px;
	margin-bottom: 1.15rem;
}

.ampra-login__tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	margin-bottom: 1.15rem;
	border-bottom: 1px solid #e2e8f0;
}

.ampra-login__mode {
	border: 0;
	background: transparent;
	color: #64748b;
	font: inherit;
	font-weight: 800;
	font-size: 0.95rem;
	min-height: 2.85rem;
	border-radius: 11px;
	cursor: pointer;
	transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ampra-login__mode.is-active {
	background: #0f172a;
	color: #fff;
	box-shadow: 0 8px 18px rgb(15 23 42 / 0.16);
}

.ampra-login__mode:hover:not(.is-active) {
	color: #0f172a;
}

.ampra-login__mode:focus-visible,
.ampra-login__tab:focus-visible,
.ampra-field__toggle:focus-visible,
.ampra-login__link:focus-visible {
	outline: 2px solid #ff6b00;
	outline-offset: 2px;
}

.ampra-login__mode-panel[hidden] {
	display: none !important;
}

.ampra-login__mode-panel.is-active,
.ampra-login__panel.is-active {
	animation: ampra-login-panel 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ampra-login__tab {
	border: 0;
	border-bottom: 2px solid transparent;
	background: transparent;
	color: #64748b;
	font: inherit;
	font-weight: 800;
	font-size: 0.88rem;
	min-height: 2.65rem;
	margin-bottom: -1px;
	border-radius: 0;
	cursor: pointer;
	transition: color 160ms ease, border-color 160ms ease;
}

.ampra-login__tab.is-active {
	color: #0f172a;
	border-bottom-color: #ff6b00;
	background: transparent;
	box-shadow: none;
}

.ampra-login__tab:hover:not(.is-active) {
	color: #334155;
}

.ampra-login__alert {
	margin-bottom: 1rem;
	padding: 0.8rem 0.9rem;
	border-radius: 12px;
	font-size: 0.9rem;
	font-weight: 700;
	border: 1px solid transparent;
	animation: ampra-login-panel 220ms ease both;
}

.ampra-login__alert.is-error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #b91c1c;
}

.ampra-login__alert.is-ok {
	background: #ecfdf3;
	border-color: #bbf7d0;
	color: #15803d;
}

.ampra-login__panel[hidden] {
	display: none !important;
}

.ampra-login__form {
	display: grid;
	gap: 1rem;
}

.ampra-login__form[hidden],
.ampra-login__mode-panel[hidden],
.ampra-login__panel[hidden],
.ampra-login__alert[hidden],
.ampra-login__otp-step[hidden] {
	display: none !important;
}

/* OTP: only one step visible at a time */
[data-otp-step="request"] [data-otp-step-view="verify"],
[data-otp-step="verify"] [data-otp-step-view="request"] {
	display: none !important;
}

[data-otp-step="request"] [data-otp-step-view="request"],
[data-otp-step="verify"] [data-otp-step-view="verify"] {
	display: block;
}

.ampra-field {
	display: grid;
	gap: 0.4rem;
	font-weight: 800;
	color: #0f172a;
	font-size: 0.9rem;
}

.ampra-field label {
	font-weight: 800;
	color: #0f172a;
}

.ampra-field input {
	width: 100%;
	min-height: 3.05rem;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	padding: 0.65rem 0.9rem;
	background: #fff;
	font: inherit;
	font-weight: 600;
	color: #0f172a;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.ampra-field input::placeholder {
	color: #94a3b8;
	font-weight: 600;
}

.ampra-field input:focus {
	outline: none;
	border-color: #ff6b00;
	box-shadow: 0 0 0 4px rgb(255 107 0 / 0.14);
}

.ampra-field input.is-invalid {
	border-color: #ef4444;
	box-shadow: 0 0 0 4px rgb(239 68 68 / 0.12);
}

.ampra-field__password:has(input.is-invalid),
.ampra-field__phone:has(input.is-invalid) {
	border-color: #ef4444;
	box-shadow: 0 0 0 4px rgb(239 68 68 / 0.12);
}

.ampra-field__error {
	font-size: 0.8rem;
	font-weight: 700;
	color: #b91c1c;
	line-height: 1.5;
}

.ampra-req {
	color: #ff6b00;
	font-style: normal;
	font-weight: 900;
}

.ampra-field__password,
.ampra-field__phone {
	display: flex;
	align-items: stretch;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.ampra-field__password:focus-within,
.ampra-field__phone:focus-within {
	border-color: #ff6b00;
	box-shadow: 0 0 0 4px rgb(255 107 0 / 0.14);
}

.ampra-field__password input,
.ampra-field__phone input {
	border: 0 !important;
	box-shadow: none !important;
	border-radius: 0;
	min-height: 3.05rem;
}

.ampra-field__toggle {
	border: 0;
	border-right: 1px solid #e2e8f0;
	background: #f8fafc;
	color: #334155;
	padding: 0 0.95rem;
	font: inherit;
	font-weight: 800;
	font-size: 0.82rem;
	cursor: pointer;
	white-space: nowrap;
	transition: background 160ms ease, color 160ms ease;
}

.ampra-field__toggle:hover {
	background: #fff4eb;
	color: #ea580c;
}

.ampra-field__prefix {
	display: inline-flex;
	align-items: center;
	padding: 0 0.85rem;
	background: #f8fafc;
	color: #334155;
	font-weight: 800;
	border-left: 1px solid #e2e8f0;
	white-space: nowrap;
}

.ampra-login__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.65rem;
}

.ampra-check {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 700;
	color: #334155;
	font-size: 0.88rem;
	cursor: pointer;
	user-select: none;
}

.ampra-check input {
	appearance: none;
	width: 1.05rem;
	height: 1.05rem;
	border: 1.5px solid #94a3b8;
	border-radius: 5px;
	background: #fff;
	display: grid;
	place-content: center;
	margin: 0;
	flex-shrink: 0;
	transition: border-color 140ms ease, background 140ms ease;
}

.ampra-check input::before {
	content: "";
	width: 0.55rem;
	height: 0.55rem;
	transform: scale(0);
	background: #fff;
	clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%);
	transition: transform 120ms ease;
}

.ampra-check input:checked {
	background: #ff6b00;
	border-color: #ff6b00;
}

.ampra-check input:checked::before {
	transform: scale(1);
}

.ampra-login__link {
	border: 0;
	background: transparent;
	color: #ff6b00;
	font: inherit;
	font-weight: 800;
	font-size: 0.86rem;
	text-decoration: none;
	cursor: pointer;
	padding: 0;
}

.ampra-login__link:hover {
	color: #ea580c;
}

.ampra-login__link:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.ampra-login__hint {
	margin: 0;
	color: #64748b;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.7;
}

.ampra-login__hint--compact {
	font-size: 0.82rem;
	font-weight: 600;
	padding: 0.7rem 0.85rem;
	border-radius: 10px;
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
}

.ampra-otp {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 0.4rem;
}

.ampra-otp__digit {
	width: 100%;
	min-height: 3.15rem;
	text-align: center;
	font-size: 1.25rem;
	font-weight: 900;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	background: #fff;
	color: #0f172a;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ampra-otp__digit:focus {
	outline: none;
	border-color: #ff6b00;
	box-shadow: 0 0 0 4px rgb(255 107 0 / 0.14);
	transform: translateY(-1px);
}

.ampra-login__timer {
	font-weight: 800;
	color: #64748b;
	font-size: 0.86rem;
}

.ampra-login__footer-note {
	margin: 1.15rem 0 0;
	text-align: center;
	font-size: 0.88rem;
}

.ampra-login__footer-note a {
	color: #334155;
	font-weight: 800;
	text-decoration: none;
}

.ampra-login__footer-note a:hover {
	color: #ff6b00;
}

.ampra-login .ampra-btn.is-loading {
	opacity: 0.82;
	pointer-events: none;
	position: relative;
}

.ampra-login .ampra-btn.is-loading::after {
	content: "";
	width: 1rem;
	height: 1rem;
	margin-inline-start: 0.55rem;
	border: 2px solid rgb(255 255 255 / 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	display: inline-block;
	vertical-align: -0.15em;
	animation: ampra-login-spin 0.7s linear infinite;
}

@keyframes ampra-login-rise {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes ampra-login-panel {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes ampra-login-glow {
	from {
		transform: translate(0, 0) scale(1);
		opacity: 0.85;
	}
	to {
		transform: translate(-8%, 10%) scale(1.08);
		opacity: 1;
	}
}

@keyframes ampra-login-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (min-width: 960px) {
	.ampra-login {
		grid-template-columns: 1.08fr 0.92fr;
	}

	.ampra-login__brand {
		display: block;
		min-height: 100vh;
	}

	.ampra-login__mobile-brand {
		display: none;
	}

	.ampra-login__form-wrap {
		padding: 2.5rem;
	}

	.ampra-login__card {
		padding: 1.65rem 1.5rem 1.55rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ampra-login__brand-inner,
	.ampra-login__form-wrap,
	.ampra-login__mode-panel.is-active,
	.ampra-login__panel.is-active,
	.ampra-login__alert,
	.ampra-login__brand-glow,
	.ampra-otp__digit,
	.ampra-login .ampra-btn.is-loading::after {
		animation: none !important;
		transition: none !important;
	}
}
