/* assets/css/pages/login_crm.css
 * Login screen of the CRM (templates/pages/login.php), layout of CheckPOP: illustrated panel on the left (scene
 * for a CRM: evening business district, client relationships network, floating CRM cards), form on the right.
 * Brand and semantic colors come from the design tokens; the night palette of the scene is local to this page.
 */
.login-root {
	--lg-night: #0f0c06;
	--lg-ink: var(--body-color, #1F2937);
	--lg-muted: var(--gray-500, #9CA3AF);
	--lg-line: var(--gray-200, #F3F4F6);
	font-family: var(--body-font-family);
	width: 100%;
	min-height: 100vh;
	display: flex;
	background: var(--lg-night);
	position: fixed;
	inset: 0;
	z-index: 9999;
	overflow: auto;
}

.login-root * {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------ Left panel: scene */
.login-root .left {
	width: 52%;
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.login-root .scene,
.login-root #pc {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.login-root .lg-sky-0 { stop-color: #120d05; }
.login-root .lg-sky-1 { stop-color: #2a1c06; }
.login-root .lg-sky-2 { stop-color: var(--primary); stop-opacity: 0.45; }
.login-root .lg-sky-3 { stop-color: var(--lg-night); }
.login-root .lg-tower-0 { stop-color: #1b1a17; }
.login-root .lg-tower-1 { stop-color: #0e0d0b; }

.login-root .lg-glow {
	fill: var(--primary);
	opacity: 0.32;
}

/* Client relationships network */
.login-root .lg-link {
	stroke: rgba(var(--primary-rgb), 0.28);
	stroke-width: 1.2;
}

.login-root .lg-node {
	fill: var(--primary);
}

.login-root .lg-node-halo {
	fill: rgba(var(--primary-rgb), 0.18);
	transform-box: fill-box;
	transform-origin: center;
	animation: lgPulse 4s ease-in-out infinite;
}

.login-root .lg-pulse-1 { animation-delay: 1s; }
.login-root .lg-pulse-2 { animation-delay: 2s; }
.login-root .lg-pulse-3 { animation-delay: 3s; }

@keyframes lgPulse {
	0%, 100% { transform: scale(0.6); opacity: 0.2; }
	50% { transform: scale(1.1); opacity: 0.9; }
}

/* Business district */
.login-root .lg-roofline {
	fill: rgba(var(--primary-rgb), 0.55);
}

.login-root .lg-window { fill: rgba(var(--primary-rgb), 0.08); }
.login-root .lg-window-1 { fill: rgba(var(--primary-rgb), 0.22); }
.login-root .lg-window-2 { fill: rgba(var(--primary-rgb), 0.4); }
.login-root .lg-window-3 { fill: rgba(255, 255, 255, 0.05); }

/* Floating CRM cards (decorative illustration) */
.login-root .lg-card-bg {
	fill: rgba(255, 255, 255, 0.08);
	stroke: rgba(255, 255, 255, 0.16);
	stroke-width: 1;
}

.login-root .lg-card text {
	font-family: var(--body-font-family);
}

.login-root .lg-card-label {
	fill: rgba(255, 255, 255, 0.55);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.login-root .lg-card-title {
	fill: #fff;
	font-size: 15px;
	font-weight: 700;
}

.login-root .lg-card-amount,
.login-root .lg-card-kpi {
	fill: var(--primary);
	font-weight: 800;
}

.login-root .lg-card-amount { font-size: 17px; }
.login-root .lg-card-kpi { font-size: 26px; }

.login-root .lg-card-trend {
	fill: var(--success);
	font-size: 11px;
	font-weight: 600;
}

.login-root .lg-pill {
	fill: rgba(var(--warning-rgb), 0.25);
}

.login-root .lg-pill-text {
	fill: #fff;
	font-size: 10px;
	font-weight: 600;
}

.login-root .lg-bar {
	fill: var(--primary);
	transform-box: fill-box;
	transform-origin: bottom;
	animation: lgGrow 1.2s ease-out both;
}

.login-root .lg-bar-1 { animation-delay: 0.1s; }
.login-root .lg-bar-2 { animation-delay: 0.2s; }
.login-root .lg-bar-3 { animation-delay: 0.3s; }
.login-root .lg-bar-4 { animation-delay: 0.4s; }
.login-root .lg-bar-5 { animation-delay: 0.5s; }

@keyframes lgGrow {
	from { transform: scaleY(0); }
	to { transform: scaleY(1); }
}

.login-root .lg-col { fill: rgba(255, 255, 255, 0.06); }
.login-root .lg-kcard { fill: rgba(255, 255, 255, 0.22); }
.login-root .lg-kcard-2 { fill: rgba(var(--primary-rgb), 0.55); }
.login-root .lg-kcard-3 { fill: rgba(var(--success-rgb), 0.7); }

.login-root .lg-float-a,
.login-root .lg-float-b,
.login-root .lg-float-c {
	animation: lgFloat 7s ease-in-out infinite;
}

.login-root .lg-float-b { animation-duration: 8s; animation-delay: 1s; }
.login-root .lg-float-c { animation-duration: 9s; animation-delay: 2s; }

@keyframes lgFloat {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-8px); }
}

/* Overlays */
.login-root .left-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(15, 12, 6, 0.97) 0%, rgba(15, 12, 6, 0.82) 26%, rgba(15, 12, 6, 0.35) 52%, rgba(15, 12, 6, 0) 100%);
}

.login-root .grid {
	position: absolute;
	inset: 0;
	background-image: linear-gradient(rgba(var(--primary-rgb), 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--primary-rgb), 0.04) 1px, transparent 1px);
	background-size: 44px 44px;
}

/* Left panel text */
.login-root .left-content {
	position: relative;
	z-index: 4;
	padding: 40px 48px;
	margin-bottom: 8px;
}

.login-root .brand-plate {
	display: flex;
	width: fit-content;
	align-items: center;
	background: #fff;
	border-radius: 16px;
	padding: 14px 24px;
	margin-bottom: 22px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.login-root .brand-plate img {
	height: 52px;
	width: auto;
	display: block;
}

.login-root .badge-design {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 13px;
	border-radius: 20px;
	border: 1px solid rgba(var(--primary-rgb), 0.35);
	background: rgba(var(--primary-rgb), 0.09);
	margin-bottom: 16px;
}

.login-root .badge-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--primary);
	animation: lgBlink 2s infinite;
}

@keyframes lgBlink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.25; }
}

.login-root .badge-txt {
	font-size: 10px;
	color: var(--primary);
	letter-spacing: 1.5px;
	font-weight: 600;
	text-transform: uppercase;
}

.login-root .left-title {
	font-size: 34px;
	font-weight: 800;
	color: #fff;
	line-height: 1.2;
	margin-bottom: 10px;
	letter-spacing: -0.4px;
}

.login-root .left-title em {
	font-style: normal;
	color: var(--primary);
}

.login-root .left-desc {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.6);
	line-height: 1.7;
	font-weight: 300;
	max-width: 380px;
	margin: 0;
}

.login-root .feats {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin-top: 22px;
}

.login-root .ft {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
}

.login-root .ft-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--success);
	flex-shrink: 0;
}

/* ------------------------------------------------------------------ Right panel: form */
.login-root .right {
	width: 48%;
	background: #fff;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 56px 52px;
	position: relative;
}

.login-root .rc {
	position: absolute;
	top: 0;
	right: 0;
	width: 100px;
	height: 100px;
	background: var(--primary);
	clip-path: polygon(100% 0, 0 0, 100% 100%);
	opacity: 0.08;
}

.login-root .fw {
	width: 100%;
	max-width: 350px;
}

.login-root .f-eye {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--primary-text);
	margin-bottom: 10px;
}

.login-root .f-title {
	font-size: 26px;
	font-weight: 800;
	color: var(--lg-ink);
	letter-spacing: -0.4px;
	margin: 0 0 4px;
}

.login-root .f-sub {
	font-size: 13px;
	color: var(--gray-600, #6B7280);
	margin: 0;
}

.login-root form {
	margin-top: 28px;
}

.login-root .field {
	margin-bottom: 18px;
}

.login-root .field label {
	display: block;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	color: var(--gray-600, #6B7280);
	margin-bottom: 7px;
}

.login-root .fi {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.login-root .fi .form-control {
	width: 100%;
	height: auto;
	padding: 13px 44px;
	border: 1.5px solid var(--gray-300, #E5E7EB);
	border-radius: 10px;
	font-size: 14px;
	color: var(--lg-ink);
	background: var(--gray-100, #F9FAFB);
	box-shadow: none;
	transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.login-root .fi .form-control:focus {
	border-color: var(--primary);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.14);
}

.login-root .fi .form-control::placeholder {
	color: var(--gray-400, #D1D5DB);
}

.login-root .fi-icon {
	position: absolute;
	left: 14px;
	top: 14px;
	--icon-font-size: 18px;
	color: var(--gray-400, #D1D5DB);
	pointer-events: none;
	transition: color 0.2s;
	z-index: 1;
}

.login-root .fi:focus-within .fi-icon {
	color: var(--primary-text);
}

.login-root .pass-toggle {
	position: absolute;
	right: 12px;
	top: 11px;
	background: none;
	border: 0;
	padding: 2px;
	cursor: pointer;
	color: var(--gray-500, #9CA3AF);
	border-radius: 6px;
	line-height: 1;
	z-index: 1;
}

.login-root .pass-toggle:hover,
.login-root .pass-toggle:focus-visible {
	color: var(--primary-text);
}

.login-root .pass-toggle:focus-visible,
.login-root .fgt:focus-visible,
.login-root .btn-submit:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 2px;
}

.login-root .frow {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 26px;
}

.login-root .ck {
	display: flex;
	align-items: center;
	gap: 7px;
}

.login-root .ck input {
	accent-color: var(--primary);
	margin: 0;
}

.login-root .ck label {
	font-size: 12px;
	color: var(--gray-600, #6B7280);
	cursor: pointer;
	margin: 0;
}

.login-root .fgt {
	font-size: 12px;
	color: var(--primary-text);
	text-decoration: none;
	font-weight: 600;
}

.login-root .fgt:hover {
	text-decoration: underline;
}

.login-root .back-row {
	text-align: center;
	margin-top: 16px;
}

.login-root #forget-form .field {
	margin-bottom: 26px;
}

.login-root .btn-submit {
	width: 100%;
	padding: 14px;
	background: var(--primary);
	border: 0;
	border-radius: 10px;
	color: var(--on-primary);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.4px;
	cursor: pointer;
	transition: background-color 0.2s, box-shadow 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.login-root .btn-submit:hover {
	background: var(--primary-hover);
	box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.3);
}

.login-root .btn-submit .icon {
	--icon-font-size: 16px;
}

.login-root #forget-message {
	font-size: 12px;
	line-height: 1.5;
	margin: 0 0 14px;
}

.login-root #forget-message:empty {
	display: none;
}

.login-root #forget-message.success { color: var(--success); }
.login-root #forget-message.danger { color: var(--danger); }

.login-root .invalid-feedback {
	display: none;
	width: 100%;
	color: var(--danger);
	font-size: 11px;
	margin-top: 4px;
}

.login-root .is-invalid ~ .invalid-feedback {
	display: block;
}

.login-root .fi .form-control.is-invalid {
	border-color: var(--danger);
	background-image: none;
}

.login-root .login-message {
	margin-top: 20px;
	font-size: 13px;
}

.login-root .strow {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 20px;
	margin-top: 28px;
	padding-top: 22px;
	border-top: 1px solid var(--lg-line);
}

.login-root .st {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	color: var(--gray-600, #6B7280);
}

.login-root .st-d {
	width: 6px;
	height: 6px;
	border-radius: 50%;
}

.login-root .st-info { background: var(--info); }
.login-root .st-success { background: var(--success); }
.login-root .st-primary { background: var(--primary); }

.login-root .copy {
	position: absolute;
	bottom: 16px;
	font-size: 10px;
	color: var(--gray-500, #9CA3AF);
	letter-spacing: 0.4px;
}

.login-root .hide {
	display: none !important;
}

/* Reduced motion: still scene */
@media (prefers-reduced-motion: reduce) {
	.login-root .lg-node-halo,
	.login-root .lg-bar,
	.login-root .lg-float-a,
	.login-root .lg-float-b,
	.login-root .lg-float-c,
	.login-root .badge-dot {
		animation: none;
	}
}

/* ------------------------------------------------------------------ Tablet (<= 1024px) */
@media (max-width: 1024px) {
	.login-root .left { width: 45%; }
	.login-root .right { width: 55%; padding: 40px 36px; }
	.login-root .left-title { font-size: 28px; }
	.login-root .left-content { padding: 32px; }
	.login-root .fw { max-width: 100%; }
}

/* ------------------------------------------------------------------ Mobile (<= 768px): form first */
@media (max-width: 768px) {
	.login-root {
		position: relative;
		flex-direction: column;
		min-height: 100dvh;
	}

	.login-root .right {
		order: 1;
		width: 100%;
		padding: 52px 24px 36px;
		justify-content: flex-start;
		align-items: stretch;
	}

	.login-root .copy {
		position: relative;
		bottom: auto;
		margin-top: 24px;
		text-align: center;
	}

	.login-root .left {
		order: 2;
		width: 100%;
		min-height: 260px;
	}

	.login-root .left-content { padding: 24px 24px 28px; margin-bottom: 0; }
	.login-root .brand-plate { margin-bottom: 12px; }
	.login-root .brand-plate img { height: 40px; }
	.login-root .badge-design { margin-bottom: 8px; }
	.login-root .left-title { font-size: 22px; margin-bottom: 4px; }
	.login-root .left-desc { display: none; }
	.login-root .feats { gap: 12px; margin-top: 10px; }
	.login-root .f-title { font-size: 22px; }
	.login-root .fi .form-control { font-size: 16px; }
	.login-root .btn-submit { padding: 16px; font-size: 16px; }
}
