/* Classinar owner login (wp-login.php) — هم زبان با صفحه انتخاب محیط و پنل */

@font-face {
	font-family: "iransans";
	src: url("../../../public/fonts/IRANSansWebFaNum.woff2") format("woff2"),
		url("../../../public/fonts/IRANSansWebFaNum.woff") format("woff");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "iransans";
	src: url("../../../public/fonts/IRANSansWebFaNum_Bold.woff2") format("woff2"),
		url("../../../public/fonts/IRANSansWebFaNum_Bold.woff") format("woff");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

body.clo-body {
	margin: 0;
	padding: 0;
	min-width: 0;
	background: #f3f6fb;
	font-family: "iransans", Tahoma, Arial, sans-serif;
}

.clo,
.clo * ,
.clo *::before,
.clo *::after {
	box-sizing: border-box;
}

.clo {
	--clo-blue: #1769e0;
	--clo-blue-dark: #0f4fb5;
	--clo-blue-soft: #edf4ff;
	--clo-blue-line: #d9e7ff;
	--clo-rose: #d64b63;
	--clo-rose-dark: #b83a51;
	--clo-rose-soft: #fdf1f3;
	--clo-rose-line: #f8dbe1;
	--clo-text: #0f2457;
	--clo-muted: #6b7890;
	--clo-border: #e3e9f2;

	position: relative;
	isolation: isolate;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	min-height: 100dvh;
	padding: 32px 16px;
	overflow: hidden;
	color: var(--clo-text);
	direction: rtl;
	font-family: "iransans", Tahoma, Arial, sans-serif;
}

.clo svg {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* پس زمینه متحرک */
.clo__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}

.clo-blob {
	--c: 23, 105, 224;
	position: absolute;
	width: var(--s, 46vmax);
	height: var(--s, 46vmax);
	border-radius: 50%;
	background: radial-gradient(circle, rgba(var(--c), .5) 0%, rgba(var(--c), .24) 35%, rgba(var(--c), 0) 68%);
	will-change: transform;
	animation: cloFloat var(--d, 22s) ease-in-out var(--delay, 0s) infinite alternate;
}

.clo-blob--1 { --s: 50vmax; top: -16vmax; right: -10vmax; --d: 20s; }
.clo-blob--2 { --s: 42vmax; bottom: -16vmax; left: -10vmax; --d: 25s; --delay: -7s; animation-name: cloFloat2; }
.clo-blob--3 { --s: 26vmax; top: 10%; left: 12%; --c: 124, 92, 230; --d: 28s; --delay: -12s; animation-name: cloFloat2; opacity: .5; }
.clo-blob--4 { --s: 22vmax; bottom: 4%; right: 22%; --c: 214, 75, 99; --d: 24s; --delay: -4s; opacity: .35; }

.clo__grain {
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(15, 36, 87, .07) 1px, transparent 1px);
	background-size: 22px 22px;
	-webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
	mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

@keyframes cloFloat {
	0% { transform: translate3d(0, 0, 0) scale(1); }
	50% { transform: translate3d(-20vw, 14vh, 0) scale(1.12); }
	100% { transform: translate3d(-6vw, 30vh, 0) scale(.92); }
}

@keyframes cloFloat2 {
	0% { transform: translate3d(0, 0, 0) scale(1); }
	50% { transform: translate3d(20vw, -16vh, 0) scale(.9); }
	100% { transform: translate3d(8vw, -30vh, 0) scale(1.1); }
}

/* کارت */
.clo__wrap {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 960px;
}

.clo-card {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
	overflow: hidden;
	background: rgba(255, 255, 255, .82);
	-webkit-backdrop-filter: blur(18px) saturate(1.4);
	backdrop-filter: blur(18px) saturate(1.4);
	border: 1px solid rgba(255, 255, 255, .75);
	border-radius: 24px;
	box-shadow: 0 1px 2px rgba(15, 36, 87, .04), 0 22px 54px rgba(15, 36, 87, .12);
}

.clo-card::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	top: 0;
	z-index: 2;
	height: 4px;
	background: var(--clo-blue);
}

.clo-card__form {
	padding: 30px 40px 32px;
}

/* بالای فرم */
.clo-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 22px;
}

.clo-top__logo {
	display: block;
	width: auto;
	height: 40px;
}

.clo-top__back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	color: var(--clo-muted);
	background: rgba(255, 255, 255, .7);
	border: 1px solid var(--clo-border);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
	transition: color .2s ease, border-color .2s ease;
}

.clo-top__back svg {
	width: 15px;
	height: 15px;
}

.clo-top__back:hover {
	color: var(--clo-blue);
	border-color: var(--clo-blue-line);
}

.clo-head {
	margin-bottom: 22px;
}

.clo-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 10px;
	padding: 5px 12px 5px 13px;
	color: var(--clo-blue-dark);
	background: var(--clo-blue-soft);
	border: 1px solid var(--clo-blue-line);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.6;
}

.clo-pill svg {
	width: 16px;
	height: 16px;
}

.clo-head h1 {
	margin: 0 0 4px;
	padding: 0;
	color: var(--clo-text);
	font-size: 23px;
	font-weight: 700;
	line-height: 1.6;
	text-align: start;
}

.clo-head p {
	margin: 0;
	color: var(--clo-muted);
	font-size: 13px;
	line-height: 1.9;
}

/* خطا */
.login .clo-alert,
.clo-alert {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 18px;
	padding: 12px 14px;
	color: #a22a45;
	background: var(--clo-rose-soft);
	border: 1px solid var(--clo-rose-line);
	border-inline-start: 1px solid var(--clo-rose-line);
	border-radius: 14px;
	box-shadow: none;
	font-size: 12.5px;
	line-height: 1.9;
}

.clo-alert__icon {
	display: inline-flex;
	color: var(--clo-rose);
	padding-top: 2px;
}

.clo-alert__text p {
	margin: 0;
}

.clo-alert__text p + p {
	margin-top: 4px;
}

.clo-alert a {
	color: var(--clo-rose-dark);
	font-weight: 700;
}

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

.login .clo-form {
	margin-top: 0;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	overflow: visible;
}

.clo-field {
	margin-bottom: 16px;
}

.clo-field label {
	display: block;
	margin-bottom: 7px;
	color: var(--clo-text);
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1.6;
}

.clo-control {
	position: relative;
	display: flex;
	align-items: center;
}

.clo-control__icon {
	position: absolute;
	right: 14px;
	top: 50%;
	z-index: 2;
	display: inline-flex;
	color: var(--clo-blue);
	transform: translateY(-50%);
	pointer-events: none;
}

.login .clo-input,
.clo-input {
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 0 48px;
	color: #142342;
	background: rgba(248, 250, 253, .9);
	border: 1px solid #d8e1ed;
	border-radius: 14px;
	box-shadow: none;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	text-align: center;
	outline: 0;
	transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.login .clo-input--password,
.clo-input--password {
	letter-spacing: 1px;
}

.clo-input::placeholder {
	color: #a9b4c6;
	font-weight: 400;
	letter-spacing: 0;
}

.login .clo-input:focus,
.clo-input:focus {
	background: #fff;
	border-color: rgba(23, 105, 224, .55);
	box-shadow: 0 0 0 4px rgba(23, 105, 224, .1);
}

.clo-input:-webkit-autofill,
.clo-input:-webkit-autofill:hover,
.clo-input:-webkit-autofill:focus {
	-webkit-box-shadow: 0 0 0 40px #fff inset;
	-webkit-text-fill-color: #142342;
	transition: background-color 5000s ease-in-out 0s;
}

.clo-control__toggle {
	position: absolute;
	left: 8px;
	top: 50%;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	color: #8a96aa;
	background: transparent;
	border: 0;
	border-radius: 10px;
	cursor: pointer;
	transform: translateY(-50%);
}

.clo-control__toggle:hover,
.clo-control__toggle:focus-visible {
	color: var(--clo-blue);
	background: var(--clo-blue-soft);
	outline: 0;
}

.clo-eye-off,
.clo-control__toggle.is-visible .clo-eye {
	display: none;
}

.clo-control__toggle.is-visible .clo-eye-off {
	display: inline-flex;
}

.clo-eye {
	display: inline-flex;
}

.clo-options {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 2px 0 20px;
}

.clo-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--clo-text);
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	user-select: none;
}

.login .clo-check input[type="checkbox"],
.clo-check input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--clo-blue);
	cursor: pointer;
}

.clo-link {
	color: var(--clo-blue);
	font-size: 12.5px;
	font-weight: 700;
	text-decoration: none;
}

.clo-link:hover {
	text-decoration: underline;
}

/* دکمه ها */
.clo-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 12px 18px;
	border: 1px solid transparent;
	border-radius: 14px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.clo-btn--primary {
	color: #fff;
	background: linear-gradient(135deg, #1769e0, #1257be);
	box-shadow: 0 8px 18px rgba(23, 105, 224, .22);
}

.clo-btn--primary:hover,
.clo-btn--primary:focus-visible {
	color: #fff;
	box-shadow: 0 12px 26px rgba(23, 105, 224, .3);
	transform: translateY(-1px);
	outline: 0;
}

.clo-btn--primary svg {
	transition: transform .2s ease;
}

.clo-btn--primary:hover svg {
	transform: translateX(-4px);
}

.clo-btn--soft {
	color: var(--clo-blue-dark);
	background: var(--clo-blue-soft);
	border-color: var(--clo-blue-line);
}

.clo-btn--soft:hover {
	color: var(--clo-blue-dark);
	background: #e2edff;
}

.clo-divider {
	position: relative;
	margin: 20px 0;
	text-align: center;
}

.clo-divider::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	top: 50%;
	height: 1px;
	background: var(--clo-border);
}

.clo-divider span {
	position: relative;
	padding: 0 12px;
	color: var(--clo-muted);
	background: #fbfcfe;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}

.clo-alt {
	display: grid;
	gap: 10px;
}

.clo-switch {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	color: var(--clo-rose-dark);
	background: var(--clo-rose-soft);
	border: 1px solid var(--clo-rose-line);
	border-radius: 14px;
	text-decoration: none;
	transition: border-color .2s ease, background-color .2s ease;
}

.clo-switch:hover {
	color: var(--clo-rose-dark);
	background: #fbe8ec;
	border-color: #f1c4ce;
}

.clo-switch__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	color: var(--clo-rose);
	background: #fff;
	border-radius: 10px;
}

.clo-switch__text {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	line-height: 1.6;
}

.clo-switch__text strong {
	color: var(--clo-text);
	font-size: 12.5px;
	font-weight: 700;
}

.clo-switch__text span {
	color: var(--clo-rose-dark);
	font-size: 12px;
	font-weight: 700;
}

/* ستون تصویر */
.clo-card__visual {
	position: relative;
	display: flex;
	align-items: flex-end;
	margin: 10px 0 10px 10px;
	overflow: hidden;
	background-color: #1257be;
	background-position: center;
	background-size: cover;
	border-radius: 18px;
}

.clo-card__visual::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10, 32, 84, 0) 35%, rgba(10, 32, 84, .82) 100%);
}

.clo-visual {
	position: relative;
	z-index: 1;
	width: 100%;
	padding: 26px;
	color: #fff;
}

.clo-visual__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	color: #fff;
	background: rgba(255, 255, 255, .16);
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 12px;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.clo-visual__icon svg {
	width: 22px;
	height: 22px;
}

.clo-visual h2 {
	margin: 12px 0 10px;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
}

.clo-visual ul {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.clo-visual li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	color: rgba(238, 245, 255, .9);
	font-size: 12.5px;
	line-height: 1.8;
}

.clo-visual li svg {
	width: 16px;
	height: 16px;
	margin-top: 4px;
	color: #6ee7b7;
	stroke-width: 2.6;
}

.clo__home {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: max-content;
	margin: 18px auto 0;
	color: var(--clo-muted);
	font-size: 12.5px;
	font-weight: 700;
	text-decoration: none;
}

.clo__home svg {
	width: 15px;
	height: 15px;
}

.clo__home:hover {
	color: var(--clo-blue);
}

/* موبایل */
@media (max-width: 860px) {
	.clo {
		align-items: flex-start;
		padding: 18px 12px 28px;
	}
	.clo-card {
		grid-template-columns: minmax(0, 1fr);
		border-radius: 20px;
	}
	.clo-card__visual {
		display: none;
	}
	.clo-card__form {
		padding: 22px 18px 22px;
	}
	.clo-head h1 {
		font-size: 20px;
	}
	.clo-top__logo {
		height: 34px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.clo-blob {
		animation: none;
	}
	.clo-btn,
	.clo-btn svg {
		transition: none;
	}
}

/* اگر wp-login.php اصلی وردپرس استفاده شود: برچسب محیط بالای فرم */
.clg-area {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
	text-align: center;
	direction: rtl;
}

.clg-area__pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 14px 6px 12px;
	color: #0f4fb5;
	background: #edf4ff;
	border: 1px solid #d9e7ff;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}

.clg-area__pill svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

.clg-area__switch {
	color: #6b7890;
	font-size: 12px;
}

.clg-area__switch a {
	margin-inline-start: 4px;
	color: #d64b63;
	font-weight: 700;
	text-decoration: none;
}

/* Dark theme (html[data-cui-theme="dark"], same switch as the panel) */
html[data-cui-theme="dark"] body.clo-body { background: #0b1220; }
html[data-cui-theme="dark"] .clo {
	--clo-blue-soft: rgba(23, 105, 224, .16);
	--clo-blue-line: rgba(58, 130, 240, .35);
	--clo-blue-dark: #8fb8ff;
	--clo-rose-soft: rgba(214, 75, 99, .14);
	--clo-rose-line: rgba(214, 75, 99, .35);
	--clo-rose-dark: #f29aab;
	--clo-text: #e7edf8;
	--clo-muted: #9aa8c2;
	--clo-border: #26324a;
}
html[data-cui-theme="dark"] .clo__grain { background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px); }
html[data-cui-theme="dark"] .clo-card { background: rgba(17, 26, 46, .9); border-color: #26324a; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
html[data-cui-theme="dark"] .clo-top__back { background: rgba(17, 26, 46, .8); }
html[data-cui-theme="dark"] .clo-input,
html[data-cui-theme="dark"] .login .clo-input { color: #e7edf8; background: #152039; border-color: #31405f; }
html[data-cui-theme="dark"] .clo-input:focus,
html[data-cui-theme="dark"] .login .clo-input:focus { background: #18243f; }
html[data-cui-theme="dark"] .clo-input::placeholder { color: #6f7f9c; }
html[data-cui-theme="dark"] .clo-input:-webkit-autofill,
html[data-cui-theme="dark"] .clo-input:-webkit-autofill:hover,
html[data-cui-theme="dark"] .clo-input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 40px #152039 inset; -webkit-text-fill-color: #e7edf8; }
html[data-cui-theme="dark"] .clo-alert { color: #f2b6c2; }
html[data-cui-theme="dark"] .clo-divider span { background: #111a2e; }
html[data-cui-theme="dark"] .clo-switch:hover { background: rgba(214, 75, 99, .22); border-color: rgba(214, 75, 99, .45); }
html[data-cui-theme="dark"] .clo-switch__icon { background: #111a2e; }
html[data-cui-theme="dark"] .clo-btn--soft:hover { background: rgba(23, 105, 224, .26); }
