/* KamaDS standalone auth pages — login_box.php, change_password_box.php */

html:has(body.kds-login-page) {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.kds-login-page {
	margin: 0;
	padding: 0;
	width: 100%;
	max-width: 100vw;
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	font-size: 15px;
	font-family: "Segoe UI", system-ui, -apple-system, Verdana, Arial, sans-serif;
	color: #1e293b;
	-webkit-font-smoothing: antialiased;
	background: linear-gradient(160deg, #e8eef9 0%, #f1f5f9 40%, #eef2ff 100%);
	box-sizing: border-box;
}

.kds-login-page.kds-login-page--fa {
	font-family: YekanBakhRegular, iransans, Tahoma, sans-serif;
}

.kds-login {
	display: flex;
	width: 100%;
	max-width: 100%;
	height: 100%;
	min-height: 0;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	box-sizing: border-box;
	position: relative;
	overflow-x: hidden;
	overflow-y: auto;
}

.kds-login::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 15% 20%, rgba(65, 84, 241, 0.12) 0%, transparent 42%),
		radial-gradient(circle at 85% 80%, rgba(1, 39, 112, 0.1) 0%, transparent 45%);
	pointer-events: none;
}

.kds-login__center {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: min(440px, 100%);
	flex-shrink: 0;
}

.kds-login__card {
	width: 100%;
	max-width: 100%;
	background: #fff;
	border-radius: 20px;
	box-shadow:
		0 4px 6px -1px rgba(15, 23, 42, 0.05),
		0 24px 48px -12px rgba(1, 39, 112, 0.18);
	padding: 36px 40px 28px;
	box-sizing: border-box;
	border: 1px solid rgba(65, 84, 241, 0.12);
	overflow: hidden;
}

.kds-login__header {
	text-align: center;
	margin-bottom: 28px;
	padding-bottom: 24px;
	border-bottom: 1px solid #e2e8f0;
}

.kds-login__logo {
	display: block;
	width: 175px;
	max-width: 100%;
	height: auto;
	margin: 0 auto 14px;
	filter: drop-shadow(0 2px 8px rgba(1, 39, 112, 0.12));
}

.kds-login__tagline {
	margin: 0;
	font-size: 0.9rem;
	color: #64748b;
	line-height: 1.55;
}

.kds-login__intro {
	margin: 0 0 22px;
	padding: 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: #334155;
	text-align: center;
	line-height: 1.5;
}

.kds-login-page--fa .kds-login__intro {
	font-family: YekanBakhRegular, sans-serif;
}

.kds-login-page--fa .kds-login__tagline {
	font-family: YekanBakhLight, YekanBakhRegular, sans-serif;
}

.kds-login__decoy {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
	opacity: 0;
	pointer-events: none;
}

.kds-login__form {
	margin: 0;
	position: relative;
}

.kds-login__field {
	margin-bottom: 18px;
}

.kds-login__field label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.875rem;
	font-weight: 600;
	color: #334155;
}

.kds-login-page--fa .kds-login__field label {
	font-family: YekanBakhRegular, sans-serif;
}

.kds-login__field input[type="text"],
.kds-login__field input[type="password"] {
	width: 100%;
	height: 44px;
	padding: 0 14px;
	font-size: 0.95rem;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #f8fafc;
	color: #0f172a;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.kds-login-page--fa .kds-login__field input {
	font-family: YekanBakhRegular, iransans, sans-serif;
}

.kds-login__field input:focus {
	outline: none;
	border-color: #4154f1;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(65, 84, 241, 0.2);
}

.kds-login__captcha-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
	flex-wrap: wrap;
}

.kds-login__captcha-refresh {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #f8fafc;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

.kds-login__captcha-refresh:hover {
	background: #eef2ff;
	border-color: #4154f1;
}

.kds-login__captcha-refresh img {
	width: 22px;
	height: 22px;
}

.kds-login__captcha-img {
	flex: 1;
	min-width: 140px;
	display: flex;
	justify-content: center;
	padding: 8px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
}

.kds-login__captcha-img img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}

.kds-login__submit {
	width: 100%;
	height: 46px;
	margin-top: 6px;
	padding: 0 20px;
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
	border: none;
	border-radius: 10px;
	background: linear-gradient(135deg, #4154f1 0%, #012970 100%);
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(65, 84, 241, 0.35);
	transition: transform 0.15s, box-shadow 0.15s;
}

.kds-login-page--fa .kds-login__submit {
	font-family: YekanBakhBold, YekanBakhRegular, sans-serif;
}

.kds-login__submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(65, 84, 241, 0.45);
}

.kds-login__submit:active {
	transform: translateY(0);
}

.kds-login-page #message {
	width: 100%;
	margin: 16px 0 0;
	padding: 12px 14px;
	font-size: 0.875rem;
	line-height: 1.45;
	color: #b91c1c;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 10px;
	box-sizing: border-box;
}

.kds-login-page #message:empty {
	display: none;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
}

.kds-login__footer {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid #e2e8f0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.kds-login__website {
	font-size: 0.95rem;
	font-weight: 600;
	color: #4154f1;
	text-decoration: none;
	letter-spacing: 0.02em;
	transition: color 0.15s;
}

.kds-login__website:hover {
	color: #012970;
	text-decoration: underline;
}

.kds-login-page--fa .kds-login__website {
	font-family: YekanBakhRegular, sans-serif;
}

.kds-login__version {
	font-size: 0.75rem;
	font-weight: 600;
	color: #94a3b8;
	letter-spacing: 0.04em;
}

/* RTL (Farsi) */
.kds-login-page[dir="rtl"] .kds-login__field label,
.kds-login-page[dir="rtl"] .kds-login__header {
	text-align: center;
}

.kds-login-page[dir="rtl"] .kds-login__field label {
	text-align: right;
}

.kds-login-page[dir="rtl"] .kds-login__field input {
	text-align: left;
	direction: ltr;
}

.kds-login-page[dir="rtl"] .kds-login__captcha-row {
	flex-direction: row-reverse;
}

@media (max-width: 480px) {
	.kds-login__card {
		padding: 28px 22px 22px;
	}

	.kds-login__logo {
		width: 175px;
		max-width: 100%;
	}
}
