/**
 * Ostadino-style split login: visual LEFT, form RIGHT.
 */

html,
body.page-login-v2 {
	min-height: 100%;
	margin: 0;
}

body.page-login-v2 {
	font-family: iransans, Vazirmatn, Tahoma, sans-serif;
	background: #eef2f7;
	color: #364163;
}

body.page-login-v2 #siteHead,
body.page-login-v2 #siteFoot,
body.page-login-v2 .appnav,
body.page-login-v2 #menucanvas {
	display: none !important;
}

.f2m-login-shell {
	display: grid;
	grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
	min-height: 100vh;
	width: 100%;
}

.f2m-login-visual {
	position: relative;
	background-color: #1e2756;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
	min-height: 100vh;
}

.f2m-login-side-logo {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	line-height: 0;
}

.f2m-login-side-logo img {
	display: block;
	max-width: 180px;
	height: auto;
	filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.25));
}

.f2m-login-main {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2.5rem 1.5rem;
	background: #eef2f7;
	min-height: 100vh;
	box-sizing: border-box;
}

.f2m-login-card.card {
	direction: rtl;
	width: 100%;
	max-width: 440px;
	background: #fff;
	border: 0;
	border-radius: 12px;
	box-shadow: 0 25px 60px rgba(63, 67, 76, 0.12);
	overflow: hidden;
}

.f2m-login-card .card-body {
	padding: 2.25rem 2rem;
}

.logo-mobile {
	display: none;
	text-align: center;
	margin-bottom: 1rem;
}

.f2m-login-subscribe {
	margin: 1.25rem 0 0;
	text-align: center;
	font-size: 0.9rem;
}

.f2m-login-subscribe a {
	color: #2533cc;
	text-decoration: none;
	font-weight: 600;
}

.f2m-login-subscribe a:hover {
	text-decoration: underline;
}

.f2m-login-error {
	color: #b91c1c;
	margin: 0;
	line-height: 1.6;
}

/* OTP tabs inside card */
.ruberah-login {
	max-width: none;
	margin: 0;
	direction: rtl;
}

.ruberah-login__tabs {
	display: flex;
	gap: 0.25rem;
	margin-bottom: 1.25rem;
	border-bottom: 1px solid #e8ecf3;
}

.ruberah-login__tab {
	flex: 1;
	appearance: none;
	border: 0;
	background: transparent;
	padding: 0.75rem 0.5rem;
	cursor: pointer;
	font: inherit;
	color: #6b7280;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.ruberah-login__tab.is-active {
	color: #1e2756;
	border-bottom-color: #2533cc;
	font-weight: 600;
}

.ruberah-login__panel {
	display: none;
}

.ruberah-login__panel.is-active {
	display: block;
}

.ruberah-otp__label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.9rem;
	color: #374151;
}

.ruberah-otp__input {
	width: 100%;
	box-sizing: border-box;
	padding: 0.75rem 0.9rem;
	border: 1px solid #d5dbe8;
	border-radius: 8px;
	font-size: 1rem;
	margin-bottom: 0.85rem;
	direction: ltr;
	text-align: left;
}

.ruberah-otp__btn {
	width: 100%;
	appearance: none;
	border: 1px solid #1e2756;
	border-radius: 8px;
	padding: 0.85rem 1rem;
	background: #2533cc;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.ruberah-otp__btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.ruberah-otp__btn--ghost {
	margin-top: 0.65rem;
	background: transparent;
	color: #2533cc;
	border: 1px solid #c7cff5;
	box-shadow: none;
}

.ruberah-otp__hint {
	margin: 0.75rem 0 0;
	font-size: 0.8rem;
	color: #6b7280;
	line-height: 1.5;
}

.ruberah-otp__alert {
	margin-bottom: 0.85rem;
	padding: 0.65rem 0.75rem;
	border-radius: 8px;
	font-size: 0.875rem;
	line-height: 1.5;
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.ruberah-otp__alert.is-success {
	background: #ecfdf5;
	color: #065f46;
	border-color: #a7f3d0;
}

.ruberah-otp__phone-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
	margin-bottom: 1rem;
	font-size: 0.9rem;
}

.ruberah-otp__link {
	appearance: none;
	border: 0;
	background: none;
	color: #2563eb;
	cursor: pointer;
	font: inherit;
	padding: 0;
	text-decoration: underline;
}

.ruberah-otp__boxes {
	display: flex;
	gap: 0.45rem;
	justify-content: center;
	margin-bottom: 1rem;
	direction: ltr;
}

.ruberah-otp__box {
	width: 2.75rem;
	height: 3rem;
	text-align: center;
	font-size: 1.25rem;
	border: 1px solid #d5dbe8;
	border-radius: 8px;
	padding: 0;
}

/* TML email tab */
.ruberah-login__email .tml,
.f2m-login-card .tml {
	direction: rtl;
}

.ruberah-login__email .tml-field-wrap,
.f2m-login-card .tml-field-wrap {
	margin: 0.75rem 0;
}

.ruberah-login__email .tml-label,
.f2m-login-card .tml-label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.9rem;
	color: #374151;
}

.ruberah-login__email .tml-field,
.f2m-login-card .tml-field {
	width: 100%;
	box-sizing: border-box;
	padding: 0.75rem 0.9rem;
	border: 1px solid #d5dbe8;
	border-radius: 8px;
	font-size: 1rem;
	text-align: left;
	direction: ltr;
}

.ruberah-login__email .tml-button,
.f2m-login-card .tml-button {
	width: 100%;
	appearance: none;
	border: 1px solid #1e2756;
	border-radius: 8px;
	padding: 0.85rem 1.5rem;
	background: #2533cc;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.ruberah-login__email .tml-rememberme-wrap,
.f2m-login-card .tml-rememberme-wrap {
	text-align: right;
	margin-top: 1rem;
}

.ruberah-login__email .tml-links,
.f2m-login-card .tml-links {
	list-style: none;
	padding: 0;
	margin: 1.25rem 0 0;
	border-top: 1px solid #e8ecf3;
	padding-top: 1rem;
	text-align: center;
}

.ruberah-login__email .tml-links a,
.f2m-login-card .tml-links a {
	color: #2533cc;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 600;
}

.ruberah-login__email .tml-links a:hover,
.f2m-login-card .tml-links a:hover {
	text-decoration: underline;
}

/* Password show/hide */
.f2m-pwd-wrap {
	position: relative;
}

.f2m-pwd-wrap .tml-field,
.f2m-pwd-wrap input[type="password"],
.f2m-pwd-wrap input[type="text"] {
	padding-left: 2.75rem;
}

.f2m-pwd-toggle {
	position: absolute;
	left: 0.55rem;
	bottom: 0.55rem;
	width: 2rem;
	height: 2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	appearance: none;
	border: 0;
	background: transparent;
	color: #667494;
	cursor: pointer;
	padding: 0;
	border-radius: 6px;
	line-height: 0;
}

.f2m-pwd-toggle:hover,
.f2m-pwd-toggle:focus {
	color: #2533cc;
	outline: none;
}

.f2m-pwd-toggle svg {
	width: 1.15rem;
	height: 1.15rem;
	display: block;
}

.f2m-pwd-toggle[aria-pressed="true"] .f2m-pwd-icon--show {
	display: none;
}

.f2m-pwd-toggle[aria-pressed="false"] .f2m-pwd-icon--hide,
.f2m-pwd-toggle:not([aria-pressed="true"]) .f2m-pwd-icon--hide {
	display: none;
}

.f2m-pwd-toggle[aria-pressed="true"] .f2m-pwd-icon--hide {
	display: block;
}

@media (max-width: 900px) {
	.f2m-login-shell {
		grid-template-columns: 1fr;
	}

	.f2m-login-visual {
		display: none !important;
	}

	.logo-mobile {
		display: block;
	}

	.f2m-login-main {
		min-height: 100vh;
		padding: 1.5rem 1rem 2.5rem;
	}
}
