/**
 * استایل صفحه ورود و ثبت‌نام NFE
 * هماهنگ با تم تیره/قرمز قالب.
 */

.nfe-auth-wrap {
	max-width: 480px;
	margin: 0 auto;
	padding: 40px 18px 60px;
	min-height: 60vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nfe-auth-card {
	width: 100%;
	position: relative;
	background: linear-gradient(180deg, rgba(24, 29, 40, 0.95) 0%, rgba(17, 20, 28, 0.98) 100%);
	border: 1px solid rgba(255, 46, 67, 0.35);
	border-radius: 22px;
	padding: 32px 26px 28px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(255, 46, 67, 0.12);
	overflow: hidden;
}

/* خط اسکن بالای کارت */
.nfe-auth-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, transparent, var(--nfe-red-glow, #ff2e43) 30%, var(--nfe-red-glow, #ff2e43) 70%, transparent);
	background-size: 200% 100%;
	animation: nfeAuthScan 4s linear infinite;
}

@keyframes nfeAuthScan {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* --- سربرگ --- */
.nfe-auth-head {
	text-align: center;
	margin-bottom: 22px;
}

.nfe-auth-logo {
	width: 62px;
	height: 62px;
	margin: 0 auto 12px;
	border-radius: 18px;
	background: linear-gradient(135deg, #b30012, #ff2e43);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	box-shadow: 0 0 26px rgba(255, 46, 67, 0.5);
}

.nfe-auth-logo img {
	width: 40px;
	height: auto;
}

.nfe-auth-head h1 {
	color: #fff;
	margin: 0;
	font-size: 21px;
	font-weight: 900;
}

.nfe-auth-head p {
	color: #808a9d;
	font-size: 12.5px;
	margin: 7px 0 0;
	line-height: 1.7;
}

/* --- تب‌ها --- */
.nfe-auth-tabs {
	display: flex;
	gap: 6px;
	padding: 5px;
	margin-bottom: 22px;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid #262c3a;
	border-radius: 14px;
}

.nfe-auth-tab {
	flex: 1;
	padding: 11px 8px;
	border: none;
	background: none;
	color: #808a9d;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 700;
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.25s ease;
}

.nfe-auth-tab:hover {
	color: #e6e8ec;
}

.nfe-auth-tab.is-active {
	background: linear-gradient(135deg, #b30012, #ff2e43);
	color: #fff;
	box-shadow: 0 4px 16px rgba(255, 46, 67, 0.35);
}

/* --- پنل‌ها و مراحل --- */
.nfe-auth-panel[hidden],
.nfe-auth-step[hidden] {
	display: none;
}

.nfe-auth-panel {
	animation: nfeAuthFade 0.35s ease;
}

@keyframes nfeAuthFade {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* --- فیلدها --- */
.nfe-field {
	margin-bottom: 14px;
}

.nfe-field label {
	display: block;
	font-size: 12.5px;
	color: #808a9d;
	margin-bottom: 6px;
	font-weight: 600;
}

.nfe-field label .req {
	color: #ff2e43;
}

.nfe-auth-card .nfe-input,
.nfe-auth-card select.nfe-input {
	width: 100%;
	background: #0d1017;
	border: 1px solid #262c3a;
	color: #fff;
	padding: 12px 14px;
	border-radius: 11px;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 14px;
	margin: 0;
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.nfe-auth-card .nfe-input:focus {
	border-color: #ff2e43;
	outline: none;
	box-shadow: 0 0 0 3px rgba(255, 46, 67, 0.14);
}

.nfe-auth-card .nfe-input::placeholder {
	color: #5a6273;
}

.nfe-auth-card .nfe-input[readonly] {
	background: #14171f;
	color: #9aa3b2;
	cursor: not-allowed;
}

/* ورودی‌های عددی لاتین */
.nfe-input-ltr {
	direction: ltr;
	text-align: center;
	letter-spacing: 2px;
	font-size: 17px !important;
	height: 50px;
}

.nfe-input-code {
	direction: ltr;
	text-align: center;
	letter-spacing: 10px;
	font-size: 22px !important;
	font-weight: 700;
	height: 54px;
}

/* دو فیلد در یک ردیف */
.nfe-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

@media (max-width: 420px) {
	.nfe-field-row {
		grid-template-columns: 1fr;
		gap: 0;
	}
}

/* نمایش/مخفی کردن رمز */
.nfe-pass-wrap {
	position: relative;
}

.nfe-pass-wrap .nfe-input {
	padding-left: 46px;
}

.nfe-pass-toggle {
	position: absolute;
	left: 6px;
	top: 50%;
	transform: translateY(-50%);
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	color: #808a9d;
	cursor: pointer;
	border-radius: 8px;
}

.nfe-pass-toggle:hover {
	color: #ff2e43;
}

.nfe-pass-toggle svg {
	width: 19px;
	height: 19px;
	fill: currentColor;
}

.nfe-field-hint {
	font-size: 11px;
	color: #6b7385;
	margin-top: 5px;
	line-height: 1.6;
}

/* --- دکمه اصلی --- */
.nfe-auth-card .nfe-btn-red {
	width: 100%;
	justify-content: center;
	height: 48px;
	font-size: 14.5px;
	margin-top: 8px;
	border-radius: 12px;
	background: linear-gradient(135deg, #b30012, #ff2e43);
	border: none;
	color: #fff;
	font-family: inherit;
	font-weight: 800;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 6px 22px rgba(255, 46, 67, 0.35);
	transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.nfe-auth-card .nfe-btn-red:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 10px 30px rgba(255, 46, 67, 0.55);
}

.nfe-auth-card .nfe-btn-red:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* اسپینر داخل دکمه */
.nfe-btn-red.is-loading::after {
	content: "";
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: nfeSpin 0.7s linear infinite;
}

@keyframes nfeSpin {
	to { transform: rotate(360deg); }
}

/* --- جعبه اطلاع شماره --- */
.nfe-sent-box {
	background: #181d28;
	padding: 11px 14px;
	border-radius: 11px;
	border: 1px solid #262c3a;
	margin-bottom: 16px;
	text-align: center;
	font-size: 12.5px;
	color: #b9bfcb;
}

.nfe-sent-box strong {
	color: #ff2e43;
	direction: ltr;
	display: inline-block;
}

.nfe-sent-box a {
	font-size: 11.5px;
	margin-right: 8px;
	color: #808a9d;
}

.nfe-sent-box a:hover {
	color: #fff;
}

/* --- تایمر --- */
.nfe-timer-row {
	text-align: center;
	margin-top: 15px;
	font-size: 12px;
	color: #808a9d;
}

.nfe-timer-row strong {
	color: #fff;
	direction: ltr;
	display: inline-block;
}

#btnResendOtp {
	color: #ff2e43;
	font-weight: bold;
	cursor: pointer;
}

/* --- پیام‌ها --- */
.nfe-auth-msg {
	margin-top: 16px;
	font-size: 13px;
	text-align: center;
	font-weight: 700;
	line-height: 1.7;
	min-height: 20px;
}

.nfe-auth-msg.is-error   { color: #ff2e43; }
.nfe-auth-msg.is-success { color: #00e39b; }
.nfe-auth-msg.is-info    { color: #808a9d; }

/* --- نوار پیشرفت مراحل ثبت‌نام --- */
.nfe-steps {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-bottom: 20px;
}

.nfe-steps .dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #2c3242;
	transition: all 0.3s ease;
}

.nfe-steps .dot.is-active {
	width: 24px;
	border-radius: 6px;
	background: linear-gradient(90deg, #b30012, #ff2e43);
	box-shadow: 0 0 10px rgba(255, 46, 67, 0.5);
}

.nfe-steps .dot.is-done {
	background: #00e39b;
}

/* --- لینک پایین کارت --- */
.nfe-auth-foot {
	text-align: center;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid #232838;
	font-size: 12px;
	color: #6b7385;
}

.nfe-auth-foot a {
	color: #808a9d;
}

.nfe-auth-foot a:hover {
	color: #ff2e43;
}
