/* NIVA Milano Skin: صفحه‌ی ورود مدیریت (wp-login.php) با رنگ و لوگوی سایت
   رنگ‌ها از قالب Milano خوانده و به‌صورت متغیر (--nms-*) روی :root گذاشته می‌شوند. */

body.login {
	--nms-a: #3b1553;
	--nms-b: #55207a;
	--nms-soft: #f7f1fb;
	--nms-line: #e6d8f0;
	--nms-gold: #ffeb3b;
	position: relative;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 32px 16px;
	box-sizing: border-box;
	overflow-x: hidden;
	font-family: IranYekanx, Vazirmatn, Tahoma, "Segoe UI", system-ui, sans-serif;
	color: #444;
	background:
		radial-gradient(900px 520px at 85% -10%, rgba(255, 255, 255, .16), transparent 60%),
		radial-gradient(700px 480px at 0% 110%, rgba(255, 235, 59, .18), transparent 60%),
		linear-gradient(145deg, var(--nms-a) 0%, var(--nms-b) 60%, #7a3aa6 100%);
	background-attachment: fixed;
}

/* الگوی نقطه‌ای ملایم و حلقه‌های تزئینی */
body.login::before,
body.login::after {
	content: "";
	position: fixed;
	pointer-events: none;
	z-index: 0;
}

body.login::before {
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, .13) 1.4px, transparent 1.6px);
	background-size: 26px 26px;
	-webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
	mask-image: linear-gradient(180deg, #000, transparent 85%);
}

body.login::after {
	width: 520px;
	height: 520px;
	inset-inline-start: -180px;
	bottom: -220px;
	border-radius: 50%;
	border: 70px solid rgba(255, 255, 255, .06);
}

/* کارت اصلی: خود #login */
body.login #login {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 430px;
	margin: 62px auto 0;
	padding: 78px 34px 26px;
	box-sizing: border-box;
	border-radius: 30px;
	background: #fff;
	box-shadow: 0 40px 80px -30px rgba(20, 0, 40, .75), 0 0 0 1px rgba(255, 255, 255, .5) inset;
}

/* لوگو: دایره‌ی شناور بالای کارت */
body.login #login h1 {
	position: absolute;
	z-index: 3;
	top: -62px;
	inset-inline: 0;
	margin: 0;
	text-align: center;
}

body.login #login h1 a {
	display: block;
	width: 124px;
	height: 124px;
	margin: 0 auto;
	border-radius: 50%;
	background-color: #fff;
	background-position: center;
	background-repeat: no-repeat;
	background-size: 72% auto;
	box-shadow: 0 18px 36px -14px rgba(20, 0, 40, .6), 0 0 0 7px rgba(255, 255, 255, .22);
	text-indent: -9999px;
	overflow: hidden;
	transition: transform .25s ease;
}

body.login #login h1 a:hover,
body.login #login h1 a:focus {
	transform: translateY(-2px) scale(1.03);
	box-shadow: 0 22px 40px -14px rgba(20, 0, 40, .65), 0 0 0 7px rgba(255, 255, 255, .3);
}

/* پیام خوش‌آمد */
.nms-welcome {
	margin: 0 0 22px;
	text-align: center;
}

.nms-welcome strong {
	display: block;
	margin-bottom: 6px;
	font-size: 22px;
	font-weight: 800;
	color: var(--nms-a);
}

.nms-welcome span {
	display: block;
	font-size: 13.5px;
	line-height: 1.9;
	color: #7a7285;
}

body.login .message,
body.login .success,
body.login #login_error {
	margin: 0 0 18px;
	padding: 12px 16px;
	border: 0;
	border-inline-start: 4px solid var(--nms-b);
	border-radius: 12px;
	background: var(--nms-soft);
	box-shadow: none;
	color: #3d2a4f;
	line-height: 1.9;
}

body.login #login_error {
	border-inline-start-color: #c62828;
	background: #fdecec;
	color: #7a1c1c;
}

/* فرم */
body.login form {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

body.login form p {
	margin: 0 0 16px;
}

body.login label {
	display: block;
	margin-bottom: 7px;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--nms-a);
}

body.login form .input,
body.login input[type="text"],
body.login input[type="password"] {
	width: 100%;
	height: 52px;
	margin: 0;
	padding: 0 16px;
	border: 1.5px solid var(--nms-line);
	border-radius: 14px;
	background: #fcfaff;
	box-shadow: none;
	font-family: inherit;
	font-size: 16px;
	color: #222;
	transition: border-color .15s, box-shadow .15s, background .15s;
}

body.login form .input:focus {
	border-color: var(--nms-b);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(85, 32, 122, .14);
	outline: 0;
}

body.login .user-pass-wrap .wp-pwd {
	position: relative;
}

body.login .wp-pwd .button.wp-hide-pw {
	position: absolute;
	inset-inline-end: 6px;
	top: 6px;
	width: 40px;
	height: 40px;
	min-height: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--nms-b);
}

body.login .wp-pwd .button.wp-hide-pw:hover,
body.login .wp-pwd .button.wp-hide-pw:focus {
	background: var(--nms-soft);
	box-shadow: none;
	color: var(--nms-a);
}

body.login .wp-pwd input.input {
	padding-inline-end: 52px;
}

body.login .forgetmenot {
	float: none;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 4px 0 18px;
}

body.login .forgetmenot label {
	margin: 0;
	font-weight: 600;
	color: #5c5266;
}

body.login input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1.5px solid #c9b5d9;
	border-radius: 5px;
	accent-color: var(--nms-b);
}

body.login input[type="checkbox"]:checked::before {
	margin: -3px 0 0 -4px;
}

body.login p.submit {
	margin: 0;
}

body.login .button-primary,
body.login #wp-submit {
	float: none;
	width: 100%;
	height: 54px;
	margin: 0;
	border: 0;
	border-radius: 14px;
	background: linear-gradient(135deg, var(--nms-b), var(--nms-a));
	box-shadow: 0 16px 28px -14px rgba(59, 21, 83, .85);
	font-family: inherit;
	font-size: 17px;
	font-weight: 800;
	letter-spacing: 0;
	text-shadow: none;
	color: #fff;
	cursor: pointer;
	transition: transform .15s, box-shadow .15s, filter .15s;
}

body.login .button-primary:hover,
body.login #wp-submit:hover,
body.login .button-primary:focus {
	transform: translateY(-1px);
	filter: brightness(1.12);
	box-shadow: 0 20px 32px -14px rgba(59, 21, 83, .9);
	color: #fff;
}

body.login .button-primary:active {
	transform: translateY(1px);
}

/* لینک‌ها: فراموشی رمز و برگشت به سایت */
body.login #nav,
body.login #backtoblog {
	margin: 18px 0 0;
	padding: 0;
	text-align: center;
	font-size: 13.5px;
}

body.login #backtoblog {
	margin-top: 8px;
}

body.login #nav a,
body.login #backtoblog a {
	color: var(--nms-b);
	font-weight: 700;
	text-decoration: none;
}

body.login #nav a:hover,
body.login #backtoblog a:hover {
	color: var(--nms-a);
	text-decoration: underline;
}

body.login .privacy-policy-page-link {
	margin: 12px 0 0;
	text-align: center;
}

body.login .privacy-policy-page-link a {
	color: #8c8398;
	font-size: 12.5px;
}

/* بسته‌بندی بیرون از کارت: لینک‌ها کنار هم در پایین کارت بیایند */
.nms-foot {
	margin-top: 22px;
	text-align: center;
	font-size: 12.5px;
	color: rgba(255, 255, 255, .78);
}

.nms-foot a {
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	border-bottom: 1px dashed rgba(255, 255, 255, .5);
}

.nms-foot a:hover {
	color: var(--nms-gold);
	border-bottom-color: var(--nms-gold);
}

/* راست‌به‌چپ و موبایل */
body.login.rtl #login,
body.rtl.login form {
	direction: rtl;
}

@media (max-width: 480px) {
	body.login {
		padding: 20px 12px;
	}

	body.login #login {
		padding: 72px 22px 22px;
		border-radius: 26px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.login * {
		transition: none !important;
	}
}

/* انتخاب زبان زیر کارت */
body.login .language-switcher {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 430px;
	margin: 18px auto 0;
	padding: 0;
	text-align: center;
}

body.login .language-switcher label,
body.login .language-switcher label .dashicons {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 8px;
	color: rgba(255, 255, 255, .85);
	font-weight: 600;
}

body.login .language-switcher form {
	display: flex;
	justify-content: center;
	gap: 8px;
}

body.login .language-switcher select {
	min-width: 150px;
	height: 40px;
	border: 1.5px solid rgba(255, 255, 255, .35);
	border-radius: 12px;
	background-color: rgba(255, 255, 255, .95);
	font-family: inherit;
	color: var(--nms-a);
}

body.login .language-switcher .button {
	height: 40px;
	border: 1.5px solid rgba(255, 255, 255, .45);
	border-radius: 12px;
	background: transparent;
	font-family: inherit;
	font-weight: 700;
	color: #fff;
}

body.login .language-switcher .button:hover {
	background: rgba(255, 255, 255, .16);
	color: #fff;
}
/* جزئیات پایانی */
body.login .user-pass-wrap {
	margin-top: 18px;
}

.nms-welcome strong::after {
	content: "";
	display: block;
	width: 44px;
	height: 4px;
	margin: 10px auto 0;
	border-radius: 4px;
	background: linear-gradient(90deg, var(--nms-gold), #f0b429);
}

body.login #login::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: -14px 18px auto;
	height: 100%;
	border-radius: 34px;
	background: rgba(255, 255, 255, .14);
}
