/*
 * SaaS Theme — Login refinement
 * Keeps login field icons anchored inside the inputs and aligns the page with
 * the shared navy/blue/neutral palette.
 */

.st-login-form-col .email-field,
.st-login-form-col .password-field,
.st-login-form-col .form-group {
	position: relative !important;
}

.st-login-form-col .email-field,
.st-login-form-col .password-field {
	width: 100% !important;
	margin: 0 0 14px !important;
}

.st-login-form-col .page-card-body input[type="text"],
.st-login-form-col .page-card-body input[type="email"],
.st-login-form-col .page-card-body input[type="password"] {
	width: 100% !important;
	height: 50px !important;
	margin: 0 !important;
	padding: 0 46px 0 44px !important;
	border: 1px solid #D7DEEA !important;
	border-radius: 11px !important;
	background: #FFFFFF !important;
	color: #000000 !important;
	box-shadow: 0 1px 2px rgba(20, 33, 61, .04), 0 5px 14px rgba(20, 33, 61, .04) !important;
}

.st-login-form-col .page-card-body input[type="password"] {
	padding-right: 74px !important;
}

.st-login-form-col .page-card-body input:focus {
	border-color: #064ADB !important;
	box-shadow: 0 0 0 3px rgba(6, 74, 219, .11), 0 5px 14px rgba(20, 33, 61, .05) !important;
}

.st-login-form-col .field-icon {
	position: absolute !important;
	left: 15px !important;
	top: 50% !important;
	right: auto !important;
	bottom: auto !important;
	width: 16px !important;
	height: 16px !important;
	margin: 0 !important;
	transform: translateY(-50%) !important;
	color: #667085 !important;
	fill: none !important;
	stroke: currentColor !important;
	z-index: 3 !important;
	pointer-events: none !important;
}

.st-login-form-col .field-icon use {
	color: inherit !important;
	stroke: currentColor !important;
}

.st-login-form-col .toggle-password {
	position: absolute !important;
	right: 15px !important;
	top: 50% !important;
	bottom: auto !important;
	margin: 0 !important;
	transform: translateY(-50%) !important;
	color: #667085 !important;
	font-size: 12px !important;
	font-weight: 550 !important;
	z-index: 4 !important;
}

.st-login-form-col .toggle-password:hover {
	color: #064ADB !important;
}

.st-login-form-col .page-card-head h4 {
	color: #14213D !important;
}

.st-login-form-col .btn-primary,
.st-login-form-col .btn-login,
.st-login-form-col .btn-forgot,
.st-login-form-col .btn-login-with-email-link {
	background: #064ADB !important;
	border-color: #064ADB !important;
	box-shadow: 0 4px 12px rgba(6, 74, 219, .18) !important;
}

.st-login-form-col .btn-primary:hover,
.st-login-form-col .btn-login:hover,
.st-login-form-col .btn-forgot:hover,
.st-login-form-col .btn-login-with-email-link:hover {
	background: #043CB5 !important;
	border-color: #043CB5 !important;
}

/* Company branding replaces the stock Frappe mark on all login variants. */
.page-card-head .app-logo.st-login-company-logo,
.login-content .app-logo.st-login-company-logo {
	display: block !important;
	width: auto !important;
	height: auto !important;
	max-width: 132px !important;
	max-height: 68px !important;
	object-fit: contain !important;
	object-position: left center !important;
	border-radius: 10px !important;
}

.page-card-head .st-login-company-title,
.login-content .st-login-company-title {
	color: #14213D !important;
	font-weight: 750 !important;
	letter-spacing: -0.025em !important;
}

/* If Frappe's native successful-login handler briefly replaces the body with
   splash_screen.html, never show its Frappe/ERPNext logo. */
body > .centered.splash,
body > .splash.centered {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: #F7F9FC !important;
}

body > .centered.splash img,
body > .splash.centered img {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
}

body > .centered.splash::before,
body > .splash.centered::before {
	content: "" !important;
	width: 34px !important;
	height: 34px !important;
	border: 3px solid rgba(6, 74, 219, .16) !important;
	border-top-color: #064ADB !important;
	border-radius: 50% !important;
	animation: st-login-splash-spin .72s linear infinite !important;
}

@keyframes st-login-splash-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	body > .centered.splash::before,
	body > .splash.centered::before {
		animation-duration: 1.4s !important;
	}
}

/* Validation may color the border red, but must not move the icon. */
.st-login-form-col .page-card-body.invalid .email-field,
.st-login-form-col .page-card-body.invalid .password-field {
	position: relative !important;
}

@media (max-width: 768px) {
	.st-login-form-col .page-card-body input[type="text"],
	.st-login-form-col .page-card-body input[type="email"],
	.st-login-form-col .page-card-body input[type="password"] {
		height: 48px !important;
	}

	.page-card-head .app-logo.st-login-company-logo,
	.login-content .app-logo.st-login-company-logo {
		max-width: 112px !important;
		max-height: 58px !important;
	}
}
