/**
 * AMS V3 Auth UI
 *
 * Phase 1 safe extraction from app-shell.css.
 * This file is loaded after app-shell.css for auth routes only,
 * so it does not remove or replace the legacy shell dependency yet.
 */

/* ===== AMS AUTH UI FOUNDATION ===== */

.ams-auth-shell {
	min-height: 100svh;
	display: grid;
	place-items: center;
	padding: 24px;
	background:
		radial-gradient(circle at top right, rgba(199, 171, 104, 0.10), transparent 28%),
		radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.08), transparent 26%),
		var(--ams-bg);
	color: var(--ams-text);
	direction: rtl;
}

.ams-auth-shell--inline {
	min-height: auto;
	padding: 12px clamp(12px, 2vw, 28px);
	background:
		radial-gradient(circle at 18% 26%, rgba(199, 171, 104, 0.08), transparent 34%),
		radial-gradient(circle at 8% 82%, rgba(59, 130, 246, 0.055), transparent 30%);
	place-items: center;
}

.ams-auth-shell--login {
	min-height: 100svh;
	padding: clamp(16px, 4vw, 48px);
	background:
		radial-gradient(circle at 18% 24%, rgba(199, 171, 104, 0.10), transparent 32%),
		radial-gradient(circle at 82% 78%, rgba(59, 130, 246, 0.07), transparent 34%),
		var(--ams-bg);
}

.ams-auth-card {
	--ams-auth-offset-x: 0;
	width: min(100%, 980px);
	display: grid;
	gap: 0;
	position: relative;
	overflow: hidden;
	border: 1px solid color-mix(in srgb, var(--ams-border) 78%, transparent);
	border-radius: 22px;
	background:
		radial-gradient(circle at 18% 12%, rgba(199, 171, 104, 0.10), transparent 34%),
		radial-gradient(circle at 86% 90%, rgba(59, 130, 246, 0.07), transparent 32%),
		color-mix(in srgb, var(--ams-card) 94%, var(--ams-surface-soft));
	box-shadow: 0 24px 70px rgba(2, 6, 23, 0.22);
	animation: ams-auth-card-in 0.28s ease-out both;
}

.ams-auth-shell--inline .ams-auth-card {
	width: min(100%, 800px);
	margin-inline: auto;
	--ams-auth-offset-x: -18px;
	transform: translateX(-18px);
}

.ams-auth-card--login {
	width: min(100%, 720px);
	margin-inline: auto;
}

.ams-auth-card--register {
	width: min(100%, 860px);
}

.ams-auth-brand {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 14px;
	padding: 28px;
	background: transparent;
	border-block-end: 1px solid color-mix(in srgb, var(--ams-border) 64%, transparent);
}

.ams-auth-brand h1,
.ams-auth-brand h2 {
	margin: 0;
	color: var(--ams-accent-gold);
	font-size: 28px;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: 0;
}

.ams-auth-brand p {
	max-width: 42ch;
	margin: 8px 0 0;
	color: var(--ams-text-soft);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.75;
}

.ams-auth-brand small {
	color: var(--ams-text-muted);
	font-size: 12px;
	font-weight: 700;
}

.ams-auth-form {
	display: grid;
	align-content: center;
	gap: 12px;
	padding: 28px;
}

.ams-auth-form > form {
	display: grid;
	gap: 12px;
}

.ams-auth-form h2 {
	margin: 0;
	color: var(--ams-accent-gold);
	font-size: 22px;
	font-weight: 800;
	line-height: 1.35;
}

.ams-auth-form > p,
.ams-auth-form .ams-auth-subtitle {
	margin: 0 0 4px;
	color: var(--ams-text-soft);
	font-size: 13px;
	line-height: 1.65;
}

.ams-auth-form label {
	display: grid;
	gap: 6px;
	color: var(--ams-text-muted);
	font-size: 12px;
	font-weight: 750;
}

.ams-auth-form input,
.ams-auth-form select,
.ams-auth-form textarea {
	width: 100%;
	min-height: 40px;
	padding-inline: 13px;
	border: 1px solid var(--ams-border);
	border-radius: var(--ams-radius-md);
	background: var(--ams-surface);
	color: var(--ams-text);
	font-size: 13px;
	transition: var(--ams-transition);
}

.ams-auth-form textarea {
	min-height: 96px;
	padding-block: 10px;
	resize: vertical;
}

.ams-auth-form input::placeholder,
.ams-auth-form textarea::placeholder {
	color: color-mix(in srgb, var(--ams-text-soft) 82%, var(--ams-text));
}

.ams-auth-form input:hover,
.ams-auth-form select:hover,
.ams-auth-form textarea:hover {
	border-color: var(--ams-border-strong);
	background: color-mix(in srgb, var(--ams-surface) 86%, var(--ams-hover));
}

.ams-auth-form input:focus,
.ams-auth-form select:focus,
.ams-auth-form textarea:focus {
	border-color: var(--ams-accent-gold);
	box-shadow: var(--ams-focus-ring);
	outline: none;
}

.ams-auth-form input:-webkit-autofill,
.ams-auth-form input:-webkit-autofill:hover,
.ams-auth-form input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--ams-text);
	box-shadow: 0 0 0 1000px var(--ams-surface) inset;
	caret-color: var(--ams-text);
	transition: background-color 9999s ease-in-out 0s;
}

.ams-auth-form-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 2px;
}

.ams-auth-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.ams-auth-form-grid label:last-child:nth-child(odd) {
	grid-column: 1 / -1;
}

.ams-auth-password-field {
	position: relative;
	display: block;
}

.ams-auth-password-field input {
	padding-inline-end: 78px;
}

.ams-auth-password-field button {
	position: absolute;
	inset-block: 5px;
	inset-inline-end: 5px;
	min-height: 0;
	padding-inline: 10px;
	border: 1px solid color-mix(in srgb, var(--ams-border) 72%, transparent);
	border-radius: calc(var(--ams-radius-md) - 4px);
	background: color-mix(in srgb, var(--ams-surface-soft) 84%, transparent);
	color: var(--ams-accent-gold);
	font-size: 11px;
	font-weight: 800;
	cursor: pointer;
	transition: var(--ams-transition);
}

.ams-auth-password-field button:hover {
	border-color: rgba(199, 171, 104, 0.34);
	background: rgba(199, 171, 104, 0.10);
}

.ams-auth-helper,
.ams-auth-bottom-link {
	margin: 0;
	color: var(--ams-text-soft);
	font-size: 12px;
	line-height: 1.65;
}

.ams-auth-bottom-link a {
	color: var(--ams-accent-gold);
	font-weight: 800;
	text-decoration: none;
}

.ams-auth-bottom-link a:hover {
	color: color-mix(in srgb, var(--ams-accent-gold) 82%, #ffffff);
}

.ams-password-strength {
	min-height: 18px;
	color: var(--ams-text-muted);
	font-size: 12px;
	font-weight: 750;
	line-height: 1.5;
}

.ams-password-strength.is-weak {
	color: #fca5a5;
}

.ams-password-strength.is-medium {
	color: var(--ams-accent-gold);
}

.ams-password-strength.is-strong {
	color: color-mix(in srgb, var(--ams-success, #48b782) 86%, var(--ams-text));
}

.ams-auth-remember {
	display: inline-flex !important;
	grid-auto-flow: column;
	align-items: center;
	gap: 8px !important;
	color: var(--ams-text-soft) !important;
	font-size: 12px !important;
	font-weight: 750 !important;
	cursor: pointer;
}

.ams-auth-remember input {
	width: 16px;
	min-height: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--ams-accent-gold);
}

.ams-auth-link {
	color: var(--ams-accent-gold);
	font-size: 12px;
	font-weight: 800;
	text-decoration: none;
	transition: var(--ams-transition);
}

.ams-auth-link:hover {
	color: color-mix(in srgb, var(--ams-accent-gold) 82%, #ffffff);
}

.ams-auth-status {
	display: grid;
	gap: 6px;
	padding: 12px 13px;
	border: 1px solid color-mix(in srgb, var(--ams-border) 78%, transparent);
	border-radius: var(--ams-radius-md);
	background: color-mix(in srgb, var(--ams-surface) 86%, transparent);
	color: var(--ams-text-soft);
	font-size: 13px;
	line-height: 1.65;
	animation: ams-auth-status-in 0.2s ease-out both;
}

.ams-auth-status-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1px solid rgba(199, 171, 104, 0.38);
	border-radius: 999px;
	background: rgba(199, 171, 104, 0.14);
	color: var(--ams-accent-gold);
	font-size: 17px;
	font-weight: 900;
	line-height: 1;
}

.ams-auth-status strong {
	color: var(--ams-text);
	font-size: 13px;
	font-weight: 800;
}

.ams-auth-status.is-success {
	border-color: color-mix(in srgb, var(--ams-success, #48b782) 36%, transparent);
	background: color-mix(in srgb, var(--ams-success, #48b782) 12%, transparent);
	color: color-mix(in srgb, var(--ams-success, #48b782) 84%, var(--ams-text));
}

.ams-auth-status.is-warning {
	border-color: rgba(199, 171, 104, 0.34);
	background: rgba(199, 171, 104, 0.12);
	color: var(--ams-accent-gold);
}

.ams-auth-status.is-error {
	border-color: rgba(239, 68, 68, 0.26);
	background: rgba(239, 68, 68, 0.10);
	color: #fca5a5;
}

.ams-auth-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}

.ams-auth-actions .ams-primary-btn,
.ams-auth-actions .ams-secondary-btn,
.ams-auth-actions button,
.ams-auth-actions a {
	min-height: 40px;
	padding-inline: 15px;
	border-radius: var(--ams-radius-md);
	font-size: 13px;
	font-weight: 800;
	text-decoration: none;
}

.ams-auth-actions button {
	cursor: pointer;
}

.ams-auth-actions form {
	display: inline-flex;
	margin: 0;
}

.ams-auth-actions a:not(.ams-primary-btn):not(.ams-secondary-btn) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--ams-accent-gold);
}

.ams-auth-actions .ams-secondary-btn {
	cursor: pointer;
	opacity: 1;
}

.ams-auth-actions .ams-secondary-btn:hover {
	border-color: rgba(199, 171, 104, 0.34);
	color: var(--ams-accent-gold);
}

.ams-auth-actions button.is-loading {
	position: relative;
	gap: 8px;
	cursor: wait;
	opacity: 0.82;
}

.ams-auth-actions button.is-loading::before {
	content: "";
	width: 13px;
	height: 13px;
	border: 2px solid currentColor;
	border-block-start-color: transparent;
	border-radius: 999px;
	animation: ams-auth-spin 0.7s linear infinite;
}

.ams-auth-otp-panel {
	display: grid;
	gap: 12px;
}

.ams-auth-otp-panel > form {
	display: grid;
	gap: 12px;
}

.ams-auth-otp-input {
	text-align: center;
	direction: ltr;
	letter-spacing: 0.28em;
	font-size: 18px;
	font-weight: 800;
}

.ams-auth-otp-actions {
	margin-top: -2px;
}

.ams-auth-dev-otp {
	border-style: dashed;
}

.ams-auth-dev-otp span:nth-of-type(2) {
	direction: ltr;
	font-size: 20px;
	font-weight: 900;
	letter-spacing: 0.24em;
}

.ams-register-type-form,
.ams-register-steps {
	display: grid;
	gap: 14px;
}

.ams-register-type-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.ams-register-type-card {
	position: relative;
	min-height: 148px;
	padding: 15px;
	border: 1px solid var(--ams-border);
	border-radius: var(--ams-radius-lg);
	background: color-mix(in srgb, var(--ams-surface) 82%, transparent);
	cursor: pointer;
	transition: var(--ams-transition);
}

.ams-register-type-card input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.ams-register-type-card strong {
	color: var(--ams-text);
	font-size: 16px;
}

.ams-register-type-card small {
	color: var(--ams-text-soft);
	font-size: 12px;
	line-height: 1.7;
}

.ams-register-type-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid rgba(199, 171, 104, 0.26);
	border-radius: 999px;
	background: rgba(199, 171, 104, 0.10);
	color: var(--ams-accent-gold);
	font-size: 17px;
}

.ams-register-type-card:hover,
.ams-register-type-card:has(input:checked) {
	border-color: rgba(199, 171, 104, 0.48);
	background: rgba(199, 171, 104, 0.12);
}

.ams-register-selected-type {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid rgba(199, 171, 104, 0.24);
	border-radius: var(--ams-radius-md);
	background: rgba(199, 171, 104, 0.08);
}

.ams-register-selected-type span,
.ams-register-stepper span {
	color: var(--ams-text-muted);
	font-size: 12px;
	font-weight: 800;
}

.ams-register-selected-type strong {
	color: var(--ams-accent-gold);
	font-size: 13px;
}

.ams-register-stepper {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.ams-register-stepper span {
	padding: 8px 10px;
	border: 1px solid var(--ams-border);
	border-radius: 999px;
	background: color-mix(in srgb, var(--ams-surface) 80%, transparent);
	text-align: center;
}

.ams-register-stepper span.is-active {
	border-color: rgba(199, 171, 104, 0.42);
	background: rgba(199, 171, 104, 0.14);
	color: var(--ams-accent-gold);
}

.ams-register-step {
	display: grid;
	gap: 12px;
}

.ams-register-steps.is-stepped .ams-register-step {
	display: none;
}

.ams-register-steps.is-stepped .ams-register-step.is-active {
	display: grid;
}

.ams-register-step h2 {
	margin: 0;
	color: var(--ams-text);
	font-size: 15px;
	font-weight: 800;
}

.ams-auth-file-field {
	padding: 12px;
	border: 1px dashed color-mix(in srgb, var(--ams-border) 84%, transparent);
	border-radius: var(--ams-radius-md);
	background: color-mix(in srgb, var(--ams-surface) 80%, transparent);
}

.ams-auth-file-field input[type="file"] {
	min-height: auto;
	padding: 8px;
	border-style: solid;
}

.ams-auth-file-field small,
.ams-auth-file-name {
	color: var(--ams-text-soft);
	font-size: 11px;
	line-height: 1.5;
}

.ams-auth-file-name {
	color: var(--ams-accent-gold);
	font-weight: 800;
	overflow-wrap: anywhere;
}

@keyframes ams-auth-card-in {
	from {
		opacity: 0;
		transform: translate(var(--ams-auth-offset-x), 8px);
	}
	to {
		opacity: 1;
		transform: translate(var(--ams-auth-offset-x), 0);
	}
}

@keyframes ams-auth-status-in {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes ams-auth-spin {
	to {
		transform: rotate(360deg);
	}
}

body.login {
	background:
		radial-gradient(circle at top right, rgba(199, 171, 104, 0.10), transparent 28%),
		radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.08), transparent 26%),
		var(--ams-bg);
}

body.ams-auth-page {
	margin: 0;
	background: var(--ams-bg);
	color: var(--ams-text);
	font-family: "Tajawal", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ams-auth-links {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 8px;
	direction: rtl;
}

.ams-auth-link-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 0 15px;
	border-radius: var(--ams-radius-md, 12px);
	font-size: 13px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	transition: var(--ams-transition, all 0.2s ease);
	white-space: nowrap;
}

.ams-auth-link-btn--primary {
	border: 1px solid rgba(199, 171, 104, 0.42);
	background: rgba(199, 171, 104, 0.16);
	color: var(--ams-accent-gold, #c7ab68);
}

.ams-auth-link-btn--secondary {
	border: 1px solid color-mix(in srgb, var(--ams-border, rgba(148, 163, 184, 0.24)) 82%, transparent);
	background: color-mix(in srgb, var(--ams-surface, #111827) 78%, transparent);
	color: var(--ams-text, #f8fafc);
}

.ams-auth-link-btn:hover,
.ams-auth-link-btn:focus-visible {
	transform: translateY(-1px);
	text-decoration: none;
	outline: none;
}

.ams-auth-link-btn--primary:hover,
.ams-auth-link-btn--primary:focus-visible {
	border-color: rgba(199, 171, 104, 0.58);
	background: rgba(199, 171, 104, 0.22);
	color: color-mix(in srgb, var(--ams-accent-gold, #c7ab68) 84%, #ffffff);
}

.ams-auth-link-btn--secondary:hover,
.ams-auth-link-btn--secondary:focus-visible {
	border-color: rgba(199, 171, 104, 0.34);
	color: var(--ams-accent-gold, #c7ab68);
}

body.login #login:has(.ams-auth-shell) {
	width: min(100%, 980px);
	padding: 24px;
}

body.login #login_error:has(.ams-auth-shell) {
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

body.login #login_error:has(.ams-auth-shell) ~ form,
body.login #login_error:has(.ams-auth-shell) ~ #nav,
body.login #login_error:has(.ams-auth-shell) ~ #backtoblog,
body.login #login:has(.ams-auth-shell) > h1 {
	display: none;
}

body.login .ams-auth-shell--embedded {
	min-height: calc(100svh - 48px);
	padding: 0;
	background: transparent;
}

body.login .ams-auth-card--status {
	width: 100%;
}

html[dir="ltr"] .ams-auth-shell {
	direction: ltr;
}

html[dir="ltr"] .ams-auth-brand {
	border-block-end: 1px solid color-mix(in srgb, var(--ams-border) 64%, transparent);
}

@media (max-width: 820px) {
	.ams-auth-shell {
		padding: 16px;
		place-items: stretch;
	}

	.ams-auth-card {
		border-radius: 18px;
	}

	.ams-auth-shell--inline {
		padding: 10px;
		background: transparent;
	}

	.ams-auth-shell--inline .ams-auth-card {
		transform: none;
	}

	.ams-auth-card--login {
		width: 100%;
	}

	.ams-auth-form-grid {
		grid-template-columns: 1fr;
	}

	.ams-auth-form-grid label:last-child:nth-child(odd) {
		grid-column: auto;
	}

	.ams-auth-brand {
		padding: 22px;
		border-block-end: 1px solid color-mix(in srgb, var(--ams-border) 78%, transparent);
	}

	html[dir="ltr"] .ams-auth-brand {
		border-block-end: 1px solid color-mix(in srgb, var(--ams-border) 78%, transparent);
	}

	.ams-auth-form {
		padding: 22px;
	}
}

@media (max-width: 520px) {
	.ams-auth-shell {
		padding: 10px;
	}

	.ams-auth-brand,
	.ams-auth-form {
		padding: 18px;
	}

	.ams-auth-brand h1,
	.ams-auth-brand h2 {
		font-size: 23px;
	}

	.ams-auth-form h2 {
		font-size: 20px;
	}

	.ams-auth-actions,
	.ams-auth-actions form,
	.ams-auth-actions .ams-primary-btn,
	.ams-auth-actions .ams-secondary-btn,
	.ams-auth-actions button,
	.ams-auth-actions a {
		width: 100%;
		justify-content: center;
	}

	.ams-auth-form-row {
		align-items: stretch;
		flex-direction: column;
	}

	.ams-register-type-grid,
	.ams-register-stepper {
		grid-template-columns: 1fr;
	}
}

/* ===== AMS V3 Auth Luxury Redesign (Login / Forgot / Register) ===== */
:root {
	--ams-auth-radius: 14px;
	--ams-auth-gold: #d9b86f;
	--ams-auth-gold-2: #f2d28f;
	--ams-auth-panel: rgba(6, 10, 18, 0.62);
	--ams-auth-panel-strong: rgba(6, 10, 18, 0.78);
	--ams-auth-line: rgba(217, 184, 111, 0.24);
	--ams-auth-field: rgba(8, 12, 20, 0.44);
}

body.ams-auth-page,
body.login {
	min-height: 100svh;
	background: #05070b url('../icons/SpreadWallpaper.webp') center center / cover no-repeat fixed !important;
	color: #f8fafc;
}

body.ams-auth-page::before,
body.login::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background:
		linear-gradient(90deg, rgba(0, 0, 0, 0.70), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.76)),
		radial-gradient(circle at 52% 40%, rgba(217, 184, 111, 0.12), transparent 34%),
		rgba(0, 0, 0, 0.28);
}

body.ams-auth-page > *,
body.login > * {
	position: relative;
	z-index: 1;
}

.ams-auth-shell,
.ams-auth-shell--login,
.ams-auth-shell--inline,
body.login .ams-auth-shell--embedded {
	min-height: 100svh;
	padding: clamp(18px, 4vw, 56px);
	background: transparent !important;
	place-items: center;
}

.ams-auth-card,
.ams-auth-card--login,
.ams-auth-card--register,
.ams-auth-card--status {
	width: min(100%, 520px);
	border: 1px solid rgba(217, 184, 111, 0.22);
	border-radius: 22px;
	background:
		linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
		var(--ams-auth-panel);
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
	backdrop-filter: blur(18px) saturate(128%);
	-webkit-backdrop-filter: blur(18px) saturate(128%);
}

.ams-auth-card--register {
	width: min(100%, 720px);
}

.ams-auth-card::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	border-radius: inherit;
	background:
		radial-gradient(circle at 50% 0%, rgba(217, 184, 111, 0.16), transparent 28%),
		linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 34%);
}

.ams-auth-brand {
	align-items: center;
	padding: 34px 34px 10px;
	border: 0;
	text-align: center;
}

.ams-auth-brand::before {
	content: "";
	display: block;
	width: 58px;
	height: 68px;
	margin: 0 auto 12px;
	background: linear-gradient(135deg, #b88a3c 0%, #f7d991 48%, #b88a3c 100%);
	clip-path: polygon(6% 100%, 6% 42%, 20% 30%, 20% 100%, 36% 100%, 36% 20%, 50% 8%, 50% 100%, 66% 100%, 66% 0, 82% 14%, 82% 100%, 100% 100%, 100% 92%, 0 92%, 0 100%);
	filter: drop-shadow(0 8px 18px rgba(217, 184, 111, 0.24));
}

.ams-auth-brand::after {
	content: "AMS V3";
	display: block;
	margin-top: -7px;
	color: var(--ams-auth-gold-2);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.02em;
}

.ams-auth-brand small {
	display: none;
}

.ams-auth-brand h1,
.ams-auth-brand h2,
.ams-auth-form h2 {
	color: #ffffff;
	font-size: clamp(24px, 3vw, 30px);
	font-weight: 500;
	line-height: 1.35;
}

.ams-auth-brand p,
.ams-auth-form > p,
.ams-auth-form .ams-auth-subtitle,
.ams-auth-helper,
.ams-auth-bottom-link,
.ams-auth-register-cta {
	color: rgba(248, 250, 252, 0.72) !important;
	font-weight: 300;
}

.ams-auth-form {
	padding: 24px 34px 34px;
	gap: 15px;
}

.ams-auth-form > form,
.ams-register-type-form,
.ams-register-steps,
.ams-register-step {
	gap: 15px;
}

.ams-auth-form label {
	gap: 8px;
	color: rgba(248, 250, 252, 0.72);
	font-size: 13px;
	font-weight: 300;
}

.ams-auth-form input,
.ams-auth-form select,
.ams-auth-form textarea,
.ams-auth-password-field button,
.ams-auth-status,
.ams-register-selected-type,
.ams-register-stepper span,
.ams-register-type-card,
.ams-auth-file-field,
.ams-auth-actions .ams-primary-btn,
.ams-auth-actions .ams-secondary-btn,
.ams-auth-actions button,
.ams-auth-actions a,
.ams-auth-link-btn {
	border-radius: var(--ams-auth-radius) !important;
}

.ams-auth-form input,
.ams-auth-form select,
.ams-auth-form textarea {
	min-height: 54px;
	padding-inline: 18px;
	border: 1px solid rgba(217, 184, 111, 0.22);
	background: var(--ams-auth-field);
	color: #ffffff;
	font-size: 14px;
	font-weight: 300;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ams-auth-form textarea {
	min-height: 106px;
	padding-block: 14px;
}

.ams-auth-form input::placeholder,
.ams-auth-form textarea::placeholder {
	color: rgba(248, 250, 252, 0.50);
}

.ams-auth-form input:hover,
.ams-auth-form select:hover,
.ams-auth-form textarea:hover,
.ams-auth-form input:focus,
.ams-auth-form select:focus,
.ams-auth-form textarea:focus {
	border-color: rgba(242, 210, 143, 0.58);
	background: rgba(8, 12, 20, 0.58);
	box-shadow: 0 0 0 3px rgba(217, 184, 111, 0.10);
}

.ams-auth-password-field input {
	padding-inline-end: 88px;
}

.ams-auth-password-field button {
	inset-block: 9px;
	inset-inline-end: 9px;
	border-color: rgba(217, 184, 111, 0.24);
	background: rgba(217, 184, 111, 0.09);
	color: var(--ams-auth-gold-2);
}

.ams-auth-remember {
	color: rgba(248, 250, 252, 0.70) !important;
	font-weight: 300 !important;
}

.ams-auth-remember input {
	border-radius: 5px !important;
	accent-color: var(--ams-auth-gold);
}

.ams-auth-link,
.ams-auth-bottom-link a,
.ams-auth-register-cta a {
	color: var(--ams-auth-gold-2) !important;
	font-weight: 500 !important;
}

.ams-auth-actions {
	margin-top: 8px;
}

.ams-auth-actions .ams-primary-btn,
.ams-auth-actions button.ams-primary-btn,
.ams-auth-actions .ams-secondary-btn,
.ams-auth-actions a.ams-secondary-btn {
	width: 100%;
	min-height: 54px;
	justify-content: center;
	font-size: 16px;
	font-weight: 500;
}

.ams-auth-actions .ams-primary-btn,
.ams-auth-actions button.ams-primary-btn {
	border: 1px solid rgba(242, 210, 143, 0.72);
	background: linear-gradient(135deg, #b98b41 0%, #f7d892 50%, #c7984b 100%);
	color: #14100a;
	box-shadow: 0 14px 30px rgba(217, 184, 111, 0.20);
}

.ams-auth-actions .ams-primary-btn:hover,
.ams-auth-actions button.ams-primary-btn:hover {
	transform: translateY(-1px);
	filter: brightness(1.04);
}

.ams-auth-actions .ams-secondary-btn,
.ams-auth-actions a.ams-secondary-btn,
.ams-auth-link-btn--secondary {
	border: 1px solid rgba(217, 184, 111, 0.34);
	background: rgba(8, 12, 20, 0.28);
	color: var(--ams-auth-gold-2);
}

.ams-auth-status,
.ams-register-selected-type,
.ams-register-stepper span,
.ams-register-type-card,
.ams-auth-file-field {
	border-color: rgba(217, 184, 111, 0.20);
	background: rgba(8, 12, 20, 0.36);
}

.ams-register-type-icon {
	border-color: rgba(217, 184, 111, 0.30);
	background: rgba(217, 184, 111, 0.10);
	color: var(--ams-auth-gold-2);
}

.ams-register-step h2,
.ams-register-type-card strong,
.ams-auth-status strong {
	color: #ffffff;
	font-weight: 500;
}

.ams-register-type-card small,
.ams-auth-file-field small,
.ams-auth-file-name,
.ams-register-selected-type span,
.ams-register-stepper span {
	color: rgba(248, 250, 252, 0.68);
	font-weight: 300;
}

.ams-register-type-card:hover,
.ams-register-type-card:has(input:checked),
.ams-register-stepper span.is-active {
	border-color: rgba(242, 210, 143, 0.62);
	background: rgba(217, 184, 111, 0.12);
	color: var(--ams-auth-gold-2);
}

@media (max-width: 820px) {
	.ams-auth-shell,
	.ams-auth-shell--login,
	.ams-auth-shell--inline,
	body.login .ams-auth-shell--embedded {
		padding: 16px;
	}

	.ams-auth-card,
	.ams-auth-card--register {
		width: min(100%, 560px);
	}

	.ams-auth-brand,
	.ams-auth-form {
		padding-inline: 22px;
	}
}


/* AMS V3 Auth Redesign Background */
.ams-auth-shell,
.ams-auth-shell--login{
background-image:
linear-gradient(rgba(0,0,0,.72),rgba(0,0,0,.72)),
url('../img/login-bg.webp') !important;
background-size:cover !important;
background-position:center center !important;
background-repeat:no-repeat !important;
background-attachment:fixed !important;
}

/* Unified radius */
.ams-auth-form input,
.ams-auth-form select,
.ams-auth-form textarea,
.ams-auth-password-field button,
.ams-auth-status,
.ams-auth-card{
border-radius:18px !important;
}


/* ===== AMS V3 Auth Dynamic Branding Patch ===== */
body.ams-auth-page,
body.login {
	background: #05070b url('../img/login-bg.webp') center center / cover no-repeat fixed !important;
}

.ams-auth-shell,
.ams-auth-shell--login,
.ams-auth-shell--inline,
body.login .ams-auth-shell--embedded {
	background: transparent !important;
}

.ams-auth-brand::before,
.ams-auth-brand::after {
	display: none !important;
	content: none !important;
}

.ams-auth-dynamic-brand {
	display: grid;
	justify-items: center;
	gap: 7px;
	margin: 0 auto 18px;
}

.ams-auth-dynamic-logo {
	display: block;
	width: auto;
	max-width: 118px;
	max-height: 72px;
	object-fit: contain;
	filter: drop-shadow(0 8px 18px rgba(217, 184, 111, 0.22));
}

.ams-auth-dynamic-logo-fallback {
	display: block;
	width: 58px;
	height: 68px;
	background: linear-gradient(135deg, #b88a3c 0%, #f7d991 48%, #b88a3c 100%);
	clip-path: polygon(6% 100%, 6% 42%, 20% 30%, 20% 100%, 36% 100%, 36% 20%, 50% 8%, 50% 100%, 66% 100%, 66% 0, 82% 14%, 82% 100%, 100% 100%, 100% 92%, 0 92%, 0 100%);
	filter: drop-shadow(0 8px 18px rgba(217, 184, 111, 0.24));
}

.ams-auth-platform-name {
	display: block;
	color: var(--ams-auth-gold-2);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
}

.ams-auth-brand h1,
.ams-auth-brand h2 {
	margin-top: 0;
}

.ams-auth-form input,
.ams-auth-form select,
.ams-auth-form textarea,
.ams-auth-password-field button,
.ams-auth-status,
.ams-register-selected-type,
.ams-register-stepper span,
.ams-register-type-card,
.ams-auth-file-field,
.ams-auth-actions .ams-primary-btn,
.ams-auth-actions .ams-secondary-btn,
.ams-auth-actions button,
.ams-auth-actions a,
.ams-auth-link-btn {
	border-radius: 18px !important;
}


/* AMS V3 AUTH BUTTON BRAND FIX */
.ams-register-steps .ams-primary-btn,
.ams-register-steps button.ams-primary-btn,
.ams-register-steps .button-next,
.ams-register-steps [data-step-next],
.ams-auth-actions .ams-primary-btn{
    background: linear-gradient(135deg,#D8BC7A 0%,#C9A867 50%,#B8944F 100%) !important;
    border: 1px solid rgba(216,188,122,.35) !important;
    color:#0F172A !important;
    box-shadow: 0 14px 30px rgba(216,188,122,.20) !important;
}
.ams-register-steps .ams-primary-btn:hover,
.ams-register-steps button.ams-primary-btn:hover,
.ams-register-steps .button-next:hover,
.ams-register-steps [data-step-next]:hover,
.ams-auth-actions .ams-primary-btn:hover{
    background: linear-gradient(135deg,#E2C98B 0%,#D8BC7A 50%,#C9A867 100%) !important;
}


/* AMS V3 Auth Register: brand-color navigation buttons + first-step login hint */
.ams-auth-page .ams-register-steps .ams-register-step-actions [data-ams-register-next],
.ams-auth-page .ams-register-steps .ams-register-step-actions [data-ams-register-next]:not(:disabled),
.ams-auth-page .ams-register-steps .ams-register-step-actions [data-ams-register-next]:visited{
	background: linear-gradient(135deg,#D8BC7A 0%,#C9A867 50%,#B8944F 100%) !important;
	background-color: #C9A867 !important;
	border-color: rgba(216,188,122,.44) !important;
	color: #0F172A !important;
	box-shadow: 0 14px 30px rgba(216,188,122,.16) !important;
}

.ams-auth-page .ams-register-steps .ams-register-step-actions [data-ams-register-next]:hover,
.ams-auth-page .ams-register-steps .ams-register-step-actions [data-ams-register-next]:focus,
.ams-auth-page .ams-register-steps .ams-register-step-actions [data-ams-register-next]:focus-visible,
.ams-auth-page .ams-register-steps .ams-register-step-actions [data-ams-register-next]:active{
	background: linear-gradient(135deg,#E2C98B 0%,#D8BC7A 52%,#C9A867 100%) !important;
	background-color: #D8BC7A !important;
	border-color: rgba(226,201,139,.72) !important;
	color: #0F172A !important;
	box-shadow: 0 16px 34px rgba(216,188,122,.22) !important;
	outline: none !important;
	transform: translateY(-1px);
}

.ams-auth-page .ams-register-login-hint{
	margin: 12px 0 0;
	text-align: center;
	font-size: 13px;
	font-weight: 300;
	line-height: 1.7;
	color: rgba(248,250,252,.68);
}

.ams-auth-page .ams-register-login-hint a{
	color: #D8BC7A !important;
	font-weight: 500;
	text-decoration: none;
	margin-inline-start: 6px;
}

.ams-auth-page .ams-register-login-hint a:hover,
.ams-auth-page .ams-register-login-hint a:focus{
	color: #E2C98B !important;
	text-decoration: none;
}


/* AMS AUTH FINAL FIXES */
.ams-register-step-actions [data-ams-register-prev]:hover,
.ams-register-step-actions [data-ams-register-prev]:focus,
.ams-register-step-actions [data-ams-register-prev]:focus-visible{
background:rgba(201,168,106,.20)!important;
border-color:rgba(216,188,122,.55)!important;
color:#E2C98B!important;
}

.ams-auth-password-field button[data-ams-password-toggle]{
min-width:38px!important;
width:38px!important;
padding:0!important;
font-size:0!important;
}

.ams-auth-password-field button[data-ams-password-toggle]::before{
content:"👁";
font-size:16px;
}


/* AMS AUTH PASSWORD TOGGLE - FONT AWESOME EYE ICONS */
.ams-auth-password-field button[data-ams-password-toggle]{
    min-width:38px!important;
    width:38px!important;
    height:38px!important;
    padding:0!important;
    font-size:0!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    color:rgba(248,250,252,.75)!important;
    background:rgba(201,168,106,.08)!important;
    border:1px solid rgba(201,168,106,.28)!important;
    border-radius:999px!important;
}

.ams-auth-password-field button[data-ams-password-toggle]::before{
    content:"\f06e"!important;
    font-family:"Font Awesome 6 Free"!important;
    font-weight:400!important;
    font-size:15px!important;
    line-height:1!important;
}

.ams-auth-password-field button[data-ams-password-toggle].is-visible::before{
    content:"\f070"!important;
}

.ams-auth-password-field button[data-ams-password-toggle]:hover,
.ams-auth-password-field button[data-ams-password-toggle]:focus{
    color:#D8BC7A!important;
    border-color:rgba(216,188,122,.55)!important;
    background:rgba(201,168,106,.14)!important;
    outline:none!important;
}


/* FORCE EYE ICON WITHOUT DEPENDING ON FONT AWESOME */
.ams-auth-password-field button[data-ams-password-toggle]{
    font-size:0 !important;
    width:40px !important;
    min-width:40px !important;
}

.ams-auth-password-field button[data-ams-password-toggle]::before{
    content:"👁" !important;
    font-size:18px !important;
    line-height:1 !important;
    display:block !important;
}

.ams-auth-password-field button[data-ams-password-toggle].is-visible::before{
    content:"🙈" !important;
}

