@import url('../fonts/fontiran.css');

:root {
	--auth-navy: #0b2b4a;
	--auth-teal: #078b8c;
	--auth-teal-dark: #057173;
	--auth-muted: #718096;
	--auth-line: #d7e1ea;
	--auth-bg: #eff8fc;
	--auth-danger: #c53b4b;
	--auth-success: #087f68;
}

html {
	min-height: 100%;
	background: var(--auth-bg);
}

body.auth-page {
	min-height: 100vh;
	margin: 0;
	padding: clamp(18px, 4vw, 64px);
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: IRANSans, Tahoma, sans-serif !important;
	color: var(--auth-navy);
	background:
		radial-gradient(circle at 12% 8%, rgba(63, 184, 201, .16), transparent 29rem),
		radial-gradient(circle at 92% 92%, rgba(7, 139, 140, .09), transparent 28rem),
		linear-gradient(135deg, #f8fcfe 0%, #eaf6fb 100%);
}

body.auth-page *,
body.auth-page *::before,
body.auth-page *::after {
	box-sizing: border-box;
}

.auth-shell {
	direction: ltr;
	display: grid;
	grid-template-columns: minmax(0, 1.04fr) minmax(430px, .96fr);
	width: min(1380px, 100%);
	min-height: min(760px, calc(100vh - 72px));
	max-height: calc(100vh - 36px);
	overflow: hidden;
	background: rgba(255, 255, 255, .96);
	border: 1px solid rgba(255, 255, 255, .9);
	border-radius: 28px;
	box-shadow: 0 30px 80px rgba(29, 70, 98, .14);
}

body.auth-page #righttt {
	grid-column: 2;
	grid-row: 1;
	float: none;
	width: auto;
	height: auto;
	min-height: 0;
	overflow-y: auto;
	background: #fff;
	direction: rtl;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	padding: clamp(34px, 5vw, 74px) clamp(28px, 5vw, 76px);
}

body.auth-page #lefttt {
	grid-column: 1;
	grid-row: 1;
	float: none;
	width: auto;
	height: auto;
	min-height: 100%;
	background: #dff3f7;
	overflow: hidden;
	position: relative;
}

.auth-visual,
body.auth-page #lefttt .auth-visual img {
	width: 100%;
	height: 100%;
}

body.auth-page #lefttt .auth-visual img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	object-fit: cover;
	object-position: 50% 48%;
}

.auth-visual::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(4, 61, 79, .03), rgba(4, 99, 109, .2));
	pointer-events: none;
}

.auth-visual-badge {
	position: absolute;
	z-index: 1;
	right: 32px;
	bottom: 30px;
	direction: rtl;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 16px;
	border: 1px solid rgba(255, 255, 255, .78);
	border-radius: 14px;
	background: rgba(5, 65, 82, .68);
	backdrop-filter: blur(12px);
	color: #fff;
	font-size: 12px;
	box-shadow: 0 12px 35px rgba(4, 45, 59, .16);
}

.auth-visual-badge::before,
.auth-security::before {
	content: '';
	width: 15px;
	height: 18px;
	flex: 0 0 auto;
	background: currentColor;
	clip-path: polygon(50% 0, 91% 16%, 86% 69%, 50% 100%, 14% 69%, 9% 16%);
	opacity: .9;
}

body.auth-page #content {
	width: 100%;
	max-width: 470px;
	margin: auto auto 0;
	padding: 0;
	border: 0 !important;
	border-radius: 0;
	background: transparent;
	box-shadow: none !important;
	direction: rtl;
}

body.auth-page #content > .padding10,
body.auth-page #content > .padding20 {
	padding: 0;
}

.auth-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 11px;
	margin-bottom: 24px;
	color: var(--auth-navy);
	font-size: 19px;
	font-weight: 700;
}

.auth-brand-mark {
	position: relative;
	display: inline-block;
	width: 54px;
	height: 54px;
	flex: 0 0 54px;
	border-radius: 17px;
	background: linear-gradient(145deg, #0b9b9a, #075d79);
	box-shadow: 0 10px 24px rgba(7, 113, 115, .2);
}

.auth-brand-mark::before,
.auth-brand-mark::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	border-radius: 3px;
	background: #fff;
	transform: translate(-50%, -50%);
}

.auth-brand-mark::before {
	width: 25px;
	height: 8px;
}

.auth-brand-mark::after {
	width: 8px;
	height: 25px;
}

.auth-welcome {
	text-align: center;
	margin-bottom: 25px;
}

.auth-welcome h1 {
	margin: 0 0 9px;
	font-size: clamp(24px, 2.2vw, 34px);
	line-height: 1.5;
	font-weight: 700;
	letter-spacing: -.5px;
	color: var(--auth-navy);
}

.auth-welcome p {
	margin: 0;
	color: var(--auth-muted);
	font-size: 13px;
}

body.auth-page .pagetitle {
	margin: 0 0 18px;
	text-align: right;
	color: var(--auth-navy);
	font-size: 14px;
	font-weight: 600;
}

body.auth-page .pagetitle div,
body.auth-page .pagetitle > div:first-child {
	display: none;
}

body.auth-page .pagetitle span {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0 !important;
	width: auto !important;
	height: auto !important;
	line-height: 1.8 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: #52677a !important;
	font-size: 13px;
	font-weight: 600;
	text-align: right;
}

body.auth-page .pagetitle.auth-login-title {
	display: none;
}

body.auth-page form.loginform,
body.auth-page form.regform,
body.auth-page #content .loginform {
	width: 100% !important;
	max-width: none;
	margin: 0 auto;
	padding: 0 !important;
	text-align: right !important;
	direction: rtl;
	color: #40556a;
	font-size: 12px;
	font-weight: 500;
}

body.auth-page form.loginform > br,
body.auth-page form.regform > br {
	display: none;
}

body.auth-page form label {
	display: block;
	margin: 0 2px 6px;
	color: #40556a;
	font-size: 12px;
	font-weight: 600;
}

body.auth-page input,
body.auth-page select,
body.auth-page textarea {
	font-family: IRANSans, Tahoma, sans-serif !important;
}

body.auth-page form input[type='text'],
body.auth-page form input[type='password'],
body.auth-page form input[type='email'],
body.auth-page form input[type='tel'],
body.auth-page form select,
body.auth-page form textarea {
	display: block;
	width: 100% !important;
	height: 52px !important;
	line-height: 52px !important;
	margin: 0 0 16px !important;
	padding: 0 16px !important;
	text-indent: 0;
	border: 1px solid var(--auth-line);
	border-radius: 12px !important;
	outline: 0;
	background: #fff;
	color: var(--auth-navy);
	font-size: 14px;
	font-weight: 400;
	transition: border-color .2s, box-shadow .2s, background .2s;
}

body.auth-page form input:focus,
body.auth-page form select:focus,
body.auth-page form textarea:focus {
	border-color: var(--auth-teal);
	box-shadow: 0 0 0 4px rgba(7, 139, 140, .11);
	background: #fcffff;
}

body.auth-page form input::placeholder {
	color: #9aabba;
}

body.auth-page input[type='submit'] {
	display: block;
	width: 100% !important;
	height: 52px !important;
	line-height: 52px !important;
	margin: 18px 0 8px !important;
	padding: 0 18px !important;
	text-indent: 0;
	border: 0 !important;
	border-radius: 12px !important;
	background: linear-gradient(135deg, var(--auth-teal), var(--auth-teal-dark)) !important;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 12px 26px rgba(7, 139, 140, .23) !important;
	transition: transform .18s, box-shadow .18s, filter .18s;
}

body.auth-page input[type='submit']:hover {
	transform: translateY(-1px);
	filter: brightness(1.04);
	box-shadow: 0 15px 32px rgba(7, 139, 140, .28) !important;
}

body.auth-page input[type='submit']:focus-visible,
body.auth-page a:focus-visible,
.auth-password-toggle:focus-visible {
	outline: 3px solid rgba(7, 139, 140, .28);
	outline-offset: 3px;
}

body.auth-page a {
	color: var(--auth-teal-dark);
	font-weight: 600;
	text-decoration: none;
}

body.auth-page a:hover {
	opacity: 1;
	color: var(--auth-navy);
}

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

.auth-password-field input {
	padding-left: 48px !important;
}

.auth-password-toggle {
	position: absolute;
	left: 9px;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #7890a4;
	cursor: pointer;
}

.auth-password-toggle:hover {
	background: #eef7f8;
	color: var(--auth-teal-dark);
}

.auth-password-toggle svg {
	width: 19px;
	height: 19px;
	vertical-align: middle;
}

body.auth-page .msgbox1,
body.auth-page .msgbox2 {
	width: 100%;
	max-width: 470px;
	margin: 0 auto 15px;
	padding: 12px 14px;
	border-radius: 12px;
	font-size: 12px;
	line-height: 1.9;
	box-shadow: none;
}

body.auth-page .msgbox1 {
	color: #075f50;
	background: #e8f8f3;
	border: 1px solid #b9e8da;
}

body.auth-page .msgbox2 {
	color: #a22c3a;
	background: #fff0f2;
	border: 1px solid #f5c6cd;
}

body.auth-page center {
	margin-top: 12px;
	color: var(--auth-muted);
	font-size: 12px;
}

.auth-security {
	direction: rtl;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 24px auto auto;
	color: #8495a6;
	font-size: 11px;
}

.auth-security::before {
	width: 11px;
	height: 13px;
}

body.auth-customer { --auth-teal: #168f80; --auth-teal-dark: #0b7369; }
body.auth-manager { --auth-teal: #167f9c; --auth-teal-dark: #0a647d; }
body.auth-admin { --auth-teal: #087f82; --auth-teal-dark: #075f66; }

@media (max-width: 1100px) {
	body.auth-page {
		padding: 0;
		align-items: stretch;
		background: #fff;
	}

	.auth-shell {
		display: flex;
		flex-direction: column;
		width: 100%;
		min-height: 100vh;
		max-height: none;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	body.auth-page #lefttt {
		display: block;
		order: -1;
		width: 100%;
		height: clamp(170px, 27vh, 240px);
		min-height: 170px;
		flex: 0 0 auto;
	}

	body.auth-page #righttt {
		width: 100%;
		min-height: 0;
		flex: 1 0 auto;
		overflow: visible;
		padding: 34px clamp(22px, 8vw, 64px);
	}

	body.auth-page #lefttt .auth-visual img {
		object-position: 50% 42%;
	}

	.auth-visual-badge {
		display: none;
	}

	.auth-brand {
		margin-bottom: 22px;
	}
}

@media (max-width: 460px) {
	body.auth-page #lefttt {
		height: 132px;
		min-height: 132px;
	}

	body.auth-page #righttt {
		padding: 26px 20px;
		justify-content: flex-start;
	}

	.auth-brand-mark {
		width: 50px;
		height: 50px;
		flex-basis: 50px;
	}

	.auth-welcome h1 {
		font-size: 23px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.auth-page *,
	body.auth-page *::before,
	body.auth-page *::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
