/* @import url('https://fonts.googleapis.com/css2?family=iransans:wght@300;400;500;600;700&display=swap'); */
@font-face {
  font-family: "iransans";
  src: url("/fonts/iransans/IRANSansWeb(FaNum).woff2") format("woff2"),
       url("/fonts/iransans/IRANSansWeb(FaNum)MyBrand.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'iransans', sans-serif;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	direction: rtl;
	color: #333;
	line-height: 1.6;
	padding: 1rem;
}

.login-container {
	background: #ffffff;
	border-radius: 20px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.15);
	padding: 3rem;
	width: 100%;
	max-width: 450px;
	position: relative;
	overflow: hidden;
}

.login-container::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 5px;
	background: linear-gradient(90deg, #667eea, #764ba2);
}

.logo-section {
	text-align: center;
	margin-bottom: 3rem;
}

.logo {
	font-size: 2.5rem;
	font-weight: 700;
	color: #3f51b5;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.logo i {
	font-size: 2.8rem;
	background: linear-gradient(135deg, #667eea, #764ba2);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.welcome-text {
	color: #666;
	font-size: 1.1rem;
	margin-bottom: 0.5rem;
}

.step-indicator {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1rem;
	margin-bottom: 2.5rem;
}

.step {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 1rem;
	transition: all 0.3s ease;
	position: relative;
}

.step.active {
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: white;
	transform: scale(1.1);
}

.step.completed {
	background: #4caf50;
	color: white;
}

.step.inactive {
	background: #f0f0f0;
	color: #999;
}

.step-line {
	width: 60px;
	height: 3px;
	background: #e0e0e0;
	border-radius: 2px;
	transition: all 0.3s ease;
}

.step-line.active {
	background: linear-gradient(90deg, #667eea, #764ba2);
}

.form-step {
	display: none;
	animation: fadeInUp 0.5s ease;
}

.form-step.active {
	display: block;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.step-title {
	font-size: 1.5rem;
	font-weight: 600;
	color: #333;
	text-align: center;
	margin-bottom: 0.5rem;
}

.step-description {
	color: #666;
	text-align: center;
	margin-bottom: 2rem;
	line-height: 1.5;
}

.form-group {
	margin-bottom: 1.5rem;
}

.form-label {
	display: block;
	font-weight: 500;
	color: #333;
	margin-bottom: 0.5rem;
	font-size: 1rem;
}

.form-input {
	width: 100%;
	padding: 1rem 1.5rem;
	border: 2px solid #e0e0e0;
	border-radius: 12px;
	font-size: 1rem;
	font-family: 'iransans', sans-serif;
	transition: all 0.3s ease;
	background: #fafafa;
}

.form-input:focus {
	outline: none;
	border-color: #3f51b5;
	background: white;
	box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

.form-input.error {
	border-color: #f44336;
	background: #fff8f8;
}

.form-input.success {
	border-color: #4caf50;
	background: #f8fff8;
}

.input-icon {
	position: relative;
}

.input-icon i {
	position: absolute;
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
	color: #999;
	font-size: 1.1rem;
}

.input-icon .form-input {
	padding-left: 3rem;
}

.error-message {
	color: #f44336;
	font-size: 0.85rem;
	margin-top: 0.5rem;
	display: flex;
	align-items: center;
	gap: 0.3rem;
}

.success-message {
	color: #4caf50;
	font-size: 0.85rem;
	margin-top: 0.5rem;
	display: flex;
	align-items: center;
	gap: 0.3rem;
}

.user-type-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: linear-gradient(135deg, #667eea, #764ba2);
	color: white;
	padding: 0.5rem 1rem;
	border-radius: 20px;
	font-size: 0.9rem;
	font-weight: 500;
	margin-bottom: 1rem;
	justify-content: center;
}

.user-type-badge.admin {
	background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.otp-inputs {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	margin-bottom: 1.5rem;
	direction: ltr; /* اضافه شده */
}

.otp-input {
	width: 50px;
	height: 50px;
	text-align: center;
	font-size: 1.2rem;
	font-weight: 600;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	background: #fafafa;
	transition: all 0.3s ease;
	direction: ltr; /* اضافه شده */
}

.otp-input:focus {
	outline: none;
	border-color: #3f51b5;
	background: white;
	box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

.otp-input.filled {
	border-color: #4caf50;
	background: #f8fff8;
}

.resend-otp {
	text-align: center;
	margin-top: 1rem;
}

.resend-link {
	color: #3f51b5;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.3s;
}

.resend-link:hover {
	color: #303f9f;
	text-decoration: underline;
}

.resend-timer {
	color: #666;
	font-size: 0.9rem;
}

.btn {
	width: 100%;
	padding: 1rem 2rem;
	border: none;
	border-radius: 12px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	font-family: 'iransans', sans-serif;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.btn-primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
	background: #ccc;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.btn-secondary {
	background: transparent;
	border: 2px solid #e0e0e0;
	color: #666;
}

.btn-secondary:hover {
	border-color: #3f51b5;
	color: #3f51b5;
}

.button-group {
	display: flex;
	gap: 1rem;
	margin-top: 2rem;
}

.loading-spinner {
	display: none;
	width: 20px;
	height: 20px;
	border: 2px solid transparent;
	border-top: 2px solid currentColor;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.forgot-password {
	text-align: center;
	margin-top: 1.5rem;
}

.forgot-password a {
	color: #3f51b5;
	text-decoration: none;
	font-size: 0.9rem;
}

.forgot-password a:hover {
	text-decoration: underline;
}

.security-info {
	background: #f0f2ff;
	border: 1px solid #d1d9ff;
	border-radius: 8px;
	padding: 1rem;
	margin-bottom: 1.5rem;
	font-size: 0.9rem;
	color: #3f51b5;
	text-align: center;
}

/* Responsive Design */
@media (max-width: 576px) {
	.login-container {
		padding: 2rem 1.5rem;
		margin: 0.5rem;
	}

	.logo {
		font-size: 2rem;
	}

	.logo i {
		font-size: 2.2rem;
	}

	.step {
		width: 35px;
		height: 35px;
		font-size: 0.9rem;
	}

	.step-line {
		width: 40px;
	}

	.otp-input {
		width: 45px;
		height: 45px;
		font-size: 1.1rem;
	}

	.button-group {
		flex-direction: column;
	}
}

/* Animation for successful login */
.success-animation {
	text-align: center;
	padding: 2rem 0;
}

.success-icon {
	font-size: 4rem;
	color: #4caf50;
	margin-bottom: 1rem;
	animation: bounce 0.6s ease;
}

@keyframes bounce {
	0%, 20%, 50%, 80%, 100% {
		transform: translateY(0);
	}
	40% {
		transform: translateY(-10px);
	}
	60% {
		transform: translateY(-5px);
	}
}