/**
 * login.php — premium dark SaaS sign-in (matches admin orange/dark chrome).
 * Scope: body.rs-login-page only.
 */

/* -------------------------------------------------------------------------- */
/* Canvas                                                                      */
/* -------------------------------------------------------------------------- */

body.rs-login-page {
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0;
	overflow-x: clip;
	color: rgba(248, 250, 252, 0.96);
	background:
		radial-gradient(ellipse 120% 80% at 10% -10%, rgba(255, 122, 46, 0.14), transparent 45%),
		radial-gradient(ellipse 90% 60% at 100% 50%, rgba(255, 90, 31, 0.06), transparent 42%),
		linear-gradient(165deg, #080c11 0%, #0b0f14 38%, #070a0e 100%);
}

body.rs-login-page .rs-login {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	grid-template-areas: 'brand form';
	min-height: 100vh;
	min-height: 100dvh;
	align-items: stretch;
}

body.rs-login-page .rs-login__brand {
	grid-area: brand;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(1.75rem, 4vw, 3rem);
	position: relative;
	overflow: hidden;
	border-inline-end: 1px solid rgba(255, 255, 255, 0.06);
}

body.rs-login-page .rs-login__brand::before {
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 30% 40%, rgba(255, 122, 46, 0.09), transparent 52%),
		radial-gradient(circle at 70% 75%, rgba(59, 130, 246, 0.05), transparent 45%);
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	body.rs-login-page .rs-login__brand::before {
		opacity: 0.85;
	}
}

body.rs-login-page .rs-login__brand-inner {
	position: relative;
	z-index: 1;
	max-width: 22rem;
	text-align: center;
}

body.rs-login-page .rs-login__logo-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 1rem;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	transition: border-color 0.2s ease, background 0.2s ease;
}

body.rs-login-page .rs-login__logo-link:hover {
	border-color: rgba(255, 122, 46, 0.35);
	background: rgba(255, 255, 255, 0.06);
}

body.rs-login-page .rs-login__logo-link:focus-visible {
	outline: 2px solid rgba(255, 186, 120, 0.95);
	outline-offset: 3px;
}

body.rs-login-page .rs-login__logo {
	max-height: 2.75rem;
	width: auto;
	object-fit: contain;
	filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.35));
}

body.rs-login-page .rs-login__brand-name {
	font-size: clamp(1.35rem, 3vw, 1.65rem);
	font-weight: 700;
	letter-spacing: -0.035em;
	margin: 1.25rem 0 0.35rem;
	line-height: 1.2;
	background: linear-gradient(105deg, #ffffff 0%, rgba(255, 214, 196, 0.95) 45%, rgba(255, 154, 77, 0.92) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

body.rs-login-page .rs-login__brand-lead {
	font-size: clamp(0.88rem, 2vw, 0.95rem);
	line-height: 1.5;
	color: rgba(148, 163, 184, 0.92);
	margin: 0;
}

body.rs-login-page .rs-login__panel {
	grid-area: form;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(1.25rem, 4vw, 2.5rem);
}

body.rs-login-page .rs-login__card {
	width: 100%;
	max-width: 26rem;
	padding: clamp(1.75rem, 4vw, 2.25rem);
	border-radius: clamp(16px, 3vw, 20px);
	background: rgba(17, 24, 39, 0.52);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	border: 1px solid rgba(255, 255, 255, 0.085);
	box-shadow:
		0 24px 64px rgba(0, 0, 0, 0.45),
		inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

@media (prefers-reduced-motion: reduce) {
	body.rs-login-page .rs-login__card {
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		background: rgba(17, 24, 39, 0.88);
	}
}

body.rs-login-page .rs-login__title {
	font-size: clamp(1.25rem, 3vw, 1.45rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	margin: 0 0 1.35rem;
	color: rgba(248, 250, 252, 0.98);
}

body.rs-login-page .rs-login__alert {
	border-radius: 12px;
	border: 1px solid rgba(248, 113, 113, 0.38) !important;
	background: rgba(127, 29, 29, 0.42) !important;
	color: rgba(254, 226, 226, 0.98) !important;
	font-size: 0.875rem;
	line-height: 1.45;
	padding: 0.75rem 1rem;
	margin-bottom: 1.25rem;
}

/* -------------------------------------------------------------------------- */
/* Form                                                                        */
/* -------------------------------------------------------------------------- */

body.rs-login-page .rs-login__form .mb-field {
	margin-bottom: 1.15rem;
}

body.rs-login-page .rs-login__form label {
	display: block;
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: rgba(203, 213, 225, 0.88);
	margin-bottom: 0.4rem;
}

body.rs-login-page .rs-login__form .form-control {
	border-radius: 11px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(15, 23, 42, 0.55);
	color: rgba(248, 250, 252, 0.98);
	min-height: 2.65rem;
	font-size: 0.9375rem;
	padding: 0.55rem 0.85rem;
	transition:
		border-color 0.18s ease,
		box-shadow 0.18s ease,
		background 0.18s ease;
}

body.rs-login-page .rs-login__form .form-control::placeholder {
	color: rgba(148, 163, 184, 0.55);
}

body.rs-login-page .rs-login__form .form-control:focus {
	border-color: rgba(255, 122, 46, 0.55);
	box-shadow: 0 0 0 3px rgba(255, 122, 46, 0.18);
	background: rgba(15, 23, 42, 0.72);
	color: rgba(248, 250, 252, 1);
	outline: none;
}

body.rs-login-page .rs-login__form .form-control:focus-visible {
	outline: none;
}

body.rs-login-page .rs-login__pass-wrap {
	position: relative;
	display: flex;
	align-items: stretch;
}

body.rs-login-page .rs-login__pass-wrap .form-control {
	padding-inline-end: 3rem;
	flex: 1;
	min-width: 0;
}

body.rs-login-page .rs-login__pass-toggle {
	position: absolute;
	inset-inline-end: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 2.5rem;
	height: 2.25rem;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: rgba(203, 213, 225, 0.85);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.15s ease, background 0.15s ease;
}

body.rs-login-page .rs-login__pass-toggle:hover {
	color: rgba(255, 186, 120, 0.98);
	background: rgba(255, 255, 255, 0.06);
}

body.rs-login-page .rs-login__pass-toggle:focus-visible {
	outline: 2px solid rgba(255, 186, 120, 0.9);
	outline-offset: 2px;
}

body.rs-login-page .rs-login__submit {
	width: 100%;
	min-height: 2.75rem;
	font-weight: 600;
	font-size: 0.9375rem;
	border-radius: 11px;
	border: none;
	background: linear-gradient(135deg, rgba(255, 154, 77, 0.98) 0%, rgba(255, 90, 31, 0.95) 100%);
	color: #0f172a;
	box-shadow:
		0 10px 28px rgba(255, 122, 46, 0.28),
		inset 0 1px 0 rgba(255, 255, 255, 0.25);
	transition:
		transform 0.18s ease,
		box-shadow 0.18s ease,
		opacity 0.18s ease;
	margin-top: 0.25rem;
}

body.rs-login-page .rs-login__submit:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow:
		0 14px 36px rgba(255, 122, 46, 0.34),
		inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

body.rs-login-page .rs-login__submit:focus-visible {
	outline: 2px solid rgba(255, 186, 120, 0.95);
	outline-offset: 3px;
}

body.rs-login-page .rs-login__submit:disabled {
	opacity: 0.72;
	cursor: not-allowed;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	body.rs-login-page .rs-login__submit {
		transition: none;
	}

	body.rs-login-page .rs-login__submit:hover:not(:disabled) {
		transform: none;
	}
}

body.rs-login-page .rs-login__langs {
	margin-top: 1.35rem;
	padding-top: 1.15rem;
	border-top: 1px solid rgba(255, 255, 255, 0.065);
	font-size: 0.8125rem;
	text-align: center;
	color: rgba(148, 163, 184, 0.85);
}

body.rs-login-page .rs-login__langs a {
	color: rgba(251, 146, 60, 0.92);
	font-weight: 600;
	text-decoration: none;
	margin: 0 0.2rem;
}

body.rs-login-page .rs-login__langs a:hover {
	text-decoration: underline;
	color: rgba(253, 186, 116, 1);
}

body.rs-login-page .rs-login__langs a:focus-visible {
	outline: 2px solid rgba(255, 186, 120, 0.85);
	outline-offset: 2px;
	border-radius: 4px;
}

/* -------------------------------------------------------------------------- */
/* RTL + responsive                                                           */
/* -------------------------------------------------------------------------- */

html[dir='rtl'] body.rs-login-page .rs-login {
	grid-template-areas: 'form brand';
}

@media (max-width: 991.98px) {
	html[dir='ltr'] body.rs-login-page .rs-login,
	html[dir='rtl'] body.rs-login-page .rs-login {
		grid-template-columns: 1fr;
		grid-template-areas: 'brand' 'form';
	}

	body.rs-login-page .rs-login__brand {
		border-inline-end: none;
		border-bottom: 1px solid rgba(255, 255, 255, 0.06);
		min-height: auto;
		padding-block: clamp(1.5rem, 5vw, 2rem);
	}

	body.rs-login-page .rs-login__panel {
		padding-block: clamp(1.5rem, 5vw, 2.25rem);
		align-items: flex-start;
		padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
	}
}
