/* =========================================================
   دروازهٔ ورود سایت — پنل برند + کارت سه‌بعدیِ ورود/ثبت‌نام
   ========================================================= */

.amz-auth-gate {
	position: relative;
	min-height: calc(100vh - 90px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	background: #F4F1EA;
}

.amz-auth-split {
	display: flex;
	width: 100%;
	max-width: 980px;
	min-height: 600px;
	background: #fff;
	border-radius: 28px;
	box-shadow: 0 30px 80px rgba(23,26,51,.16);
	overflow: hidden;
}

.amz-auth-brand-panel {
	position: relative;
	flex: 0 0 40%;
	background: linear-gradient(150deg, #20244A 0%, #2E346B 45%, #C98A12 130%);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 44px;
}
.amz-auth-brand-orbs { position: absolute; inset: 0; overflow: hidden; }
.amz-auth-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(70px);
	opacity: .45;
}
.amz-auth-orb-1 { width: 260px; height: 260px; background: #E9B94A; top: -60px; inset-inline-end: -60px; }
.amz-auth-orb-2 { width: 220px; height: 220px; background: #7D86E0; bottom: -80px; inset-inline-start: -60px; }
.amz-auth-brand-content { position: relative; z-index: 1; text-align: center; }
.amz-auth-brand-logo { color: #fff; font-weight: 800; font-size: 22px; display: inline-block; opacity: .95; }
.amz-auth-brand-content h2 { font-size: 26px; font-weight: 800; margin: 0 0 12px; line-height: 1.5; color: #fff; }
.amz-auth-brand-content p { font-size: 14px; color: rgba(255,255,255,.85); line-height: 1.9; margin: 0; }

.amz-auth-stage {
	position: relative;
	z-index: 1;
	flex: 1 1 60%;
	perspective: 1800px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 34px;
}

.amz-auth-card {
	position: relative;
	width: 100%;
	max-width: 420px;
	min-height: 520px;
	height: auto;
	transform-style: preserve-3d;
	transition: transform .7s cubic-bezier(.2,.8,.2,1);
	will-change: transform;
}
.amz-auth-card.is-flipped {
	transform: rotateY(180deg);
	min-height: 640px;
}

.amz-auth-card-inner {
	position: relative;
	width: 100%;
	min-height: 520px;
	height: 100%;
	transform-style: preserve-3d;
}
.amz-auth-card.is-flipped .amz-auth-card-inner {
	min-height: 640px;
}

.amz-auth-face {
	position: absolute;
	inset: 0;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	background: #fff;
	color: #2A2E45;
	overflow-y: visible; /* بدون اسکرول‌بار داخلی */
}
.amz-auth-face-front { transform: rotateY(0deg); }
.amz-auth-face-back { transform: rotateY(180deg); }

.amz-auth-face-scroll {
	padding: 28px 28px 32px;
	height: 100%;
	box-sizing: border-box;
}

/* فشرده‌سازی فرم ثبت‌نام داخل کارت */
.amz-auth-face-back .tam-register-form .tam-register-grid {
	grid-template-columns: 1fr 1fr;
	gap: 10px 12px;
	margin-bottom: 10px;
}
.amz-auth-face-back .tam-register-form .tam-register-grid label {
	font-size: 12px;
	gap: 4px;
}
.amz-auth-face-back .tam-register-form .tam-register-grid input,
.amz-auth-face-back .tam-register-form .tam-register-grid select {
	padding: 8px 10px;
	font-size: 13px;
}
.amz-auth-face-back .tam-field-error {
	min-height: 14px;
	font-size: 11px;
}
.amz-auth-face-back .tam-btn {
	margin-top: 8px;
	width: 100%;
}
.amz-auth-face-back .amz-auth-title { font-size: 20px; margin-bottom: 4px; }
.amz-auth-face-back .amz-auth-sub { font-size: 12px; margin-bottom: 14px; }
.amz-auth-face-back .amz-auth-switch { margin-top: 14px; }

.amz-auth-title {
	font-size: 25px;
	font-weight: 800;
	margin: 0 0 8px;
	color: #20233A;
}
.amz-auth-sub {
	color: #5B5F78;
	font-size: 14px;
	margin-bottom: 22px;
}
.amz-auth-error {
	background: #fdecea;
	color: #a3242f;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 13px;
	margin-bottom: 16px;
}
.amz-auth-success {
	background: #e7f6ec;
	color: #1e6b3c;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 13px;
	margin-bottom: 16px;
}
.amz-auth-form { display: flex; flex-direction: column; gap: 14px; }
.amz-auth-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #33364C; font-weight: 600; }
.amz-auth-field input { padding: 12px 14px; color: #20233A; background: #fff; border: 1px solid #DAD5C8; border-radius: 10px; }
.amz-auth-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin: 2px 0 6px; color: #33364C; }
.amz-auth-remember { display: flex; align-items: center; gap: 6px; }
.amz-auth-row a { color: var(--amz-primary, #C98A12); font-weight: 600; }
.amz-auth-switch {
	margin-top: 22px;
	text-align: center;
	font-size: 13px;
	color: #5B5F78;
}
.amz-auth-flip-btn {
	background: none;
	border: none;
	color: var(--amz-primary, #C98A12);
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
	font-size: 13px;
	padding: 0;
	margin-inline-start: 4px;
}

/* فرم ثبت‌نام افزونه (tam-register-form) داخل پشتِ کارت کمی جمع‌وجورتر شود */
.amz-auth-face-back .tam-register-form .form-table,
.amz-auth-face-back .tam-register-form th,
.amz-auth-face-back .tam-register-form td { display: block; width: 100%; padding: 0; }
.amz-auth-face-back .tam-register-form tr { display: block; margin-bottom: 12px; }
.amz-auth-face-back .tam-register-form input,
.amz-auth-face-back .tam-register-form select { width: 100%; }

@media (max-width: 860px) {
	.amz-auth-split { flex-direction: column; max-width: 460px; }
	.amz-auth-brand-panel { flex: 0 0 auto; padding: 30px 30px 24px; align-items: flex-start; }
	.amz-auth-brand-content h2 { font-size: 20px; }
	.amz-auth-brand-content p { display: none; }
	.amz-auth-stage { padding: 26px; }
	.amz-auth-card { min-height: 560px; height: auto; }
	.amz-auth-card.is-flipped { min-height: 700px; }
}

@media (prefers-reduced-motion: reduce) {
	.amz-auth-card { transition: none; }
}


/* خطای اعتبارسنجی کد ملی / موبایل در کارت ثبت‌نام */
.amz-auth-face-back .tam-field-error {
	display: block !important;
	color: #c0392b !important;
	font-size: 12px !important;
	font-weight: 600;
	margin-top: 4px;
	min-height: 16px;
}
.amz-auth-face-back input.tam-field-invalid,
.amz-auth-face-back .tam-national-code-field.tam-field-invalid {
	border-color: #c0392b !important;
	box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.2) !important;
}
.amz-auth-face-back .tam-notice-error {
	background: #fdecea;
	color: #a3242f;
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 13px;
	margin-bottom: 14px;
}

.tam-pass-wrap { position: relative; display: block; width: 100%; }
.tam-pass-wrap input { width: 100%; padding-left: 42px !important; }
.tam-pass-toggle {
	position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
	background: transparent; border: none; cursor: pointer; font-size: 16px; line-height: 1;
}
