/* HR9 Login — premium split-screen SaaS experience (website only; no Frappe core edits) */

:root {
	--hr9-purple: #4d2d95;
	--hr9-blue: #1a60be;
	--hr9-black: #000000;
	--hr9-purple-dark: #3f257a;
	--hr9-surface: #ffffff;
	--hr9-muted: #667085;
	--hr9-border: rgba(15, 23, 42, 0.1);
	--hr9-panel-max: 440px;
	--hr9-radius: 12px;
	--hr9-radius-lg: 22px;
	--hr9-transition: 200ms ease;
}

@keyframes hr9-fade-up {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes hr9-fade-in {
	from {
		opacity: 0;
		transform: translateX(-12px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes hr9-float-a {
	0%,
	100% {
		transform: translate3d(0, 0, 0);
	}
	50% {
		transform: translate3d(10px, -14px, 0);
	}
}

@keyframes hr9-float-b {
	0%,
	100% {
		transform: translate3d(0, 0, 0);
	}
	50% {
		transform: translate3d(-12px, 10px, 0);
	}
}

/* ── Page shell ─────────────────────────────────────────────────────────── */

body.hr9-login,
body[data-path="login"].hr9-login {
	margin: 0 !important;
	min-height: 100vh;
	background: #f5f6fb !important;
	overflow-x: hidden;
}

body.hr9-login .navbar,
body.hr9-login .web-footer,
body.hr9-login .footer-powered,
body.hr9-login .page-footer,
body.hr9-login .page-breadcrumbs,
body.hr9-login .page-header-wrapper {
	display: none !important;
}

/* Website chrome: never show Powered by Frappe / ERPNext */
.footer-powered,
.web-footer .footer-powered {
	display: none !important;
}

body.hr9-login .page-content-wrapper,
body.hr9-login #page-login,
body.hr9-login main.container {
	max-width: none !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}

body.hr9-login main.container {
	display: block !important;
}

.hr9-login-shell {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	min-height: 100vh;
	width: 100%;
}

/* ── Left brand panel ───────────────────────────────────────────────────── */

.hr9-login-brand {
	position: relative;
	overflow: hidden;
	color: #fff;
	padding: clamp(40px, 6vw, 72px);
	display: flex;
	flex-direction: column;
	justify-content: center;
	background:
		radial-gradient(900px 520px at 10% 0%, rgba(255, 255, 255, 0.18), transparent 55%),
		radial-gradient(700px 480px at 100% 100%, rgba(26, 96, 190, 0.55), transparent 50%),
		linear-gradient(145deg, #4d2d95 0%, #3a3aad 42%, #1a60be 100%);
	animation: hr9-fade-in 520ms ease both;
}

.hr9-login-brand::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
	background-size: 22px 22px;
	opacity: 0.35;
	pointer-events: none;
}

.hr9-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(2px);
	pointer-events: none;
}

.hr9-orb-a {
	width: 280px;
	height: 280px;
	top: -60px;
	right: -40px;
	background: rgba(255, 255, 255, 0.14);
	animation: hr9-float-a 14s ease-in-out infinite;
}

.hr9-orb-b {
	width: 220px;
	height: 220px;
	bottom: 8%;
	left: -50px;
	background: rgba(26, 96, 190, 0.35);
	animation: hr9-float-b 16s ease-in-out infinite;
}

.hr9-orb-c {
	width: 120px;
	height: 120px;
	top: 42%;
	right: 18%;
	background: rgba(255, 255, 255, 0.1);
	animation: hr9-float-a 18s ease-in-out infinite reverse;
}

.hr9-login-brand-inner {
	position: relative;
	z-index: 1;
	max-width: 460px;
}

.hr9-login-brand-logo {
	display: block;
	height: 56px;
	width: auto;
	max-width: min(240px, 70%);
	object-fit: contain;
	margin-bottom: 36px;
}

.hr9-login-kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.2);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin-bottom: 18px;
}

.hr9-login-headline {
	margin: 0 0 14px;
	font-size: clamp(32px, 4vw, 44px);
	line-height: 1.12;
	font-weight: 700;
	letter-spacing: -0.03em;
	color: #fff;
}

.hr9-login-copy {
	margin: 0 0 28px;
	font-size: 16px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.88);
	max-width: 38ch;
}

.hr9-login-points {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.hr9-login-points li {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.92);
}

.hr9-login-points li::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex: 0 0 8px;
	background: #fff;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}

/* ── Right login panel ──────────────────────────────────────────────────── */

.hr9-login-panel {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(24px, 4vw, 48px);
	background:
		radial-gradient(700px 380px at 100% 0%, rgba(77, 45, 149, 0.06), transparent 60%),
		radial-gradient(560px 320px at 0% 100%, rgba(26, 96, 190, 0.06), transparent 55%),
		#f5f6fb;
	animation: hr9-fade-up 480ms ease both;
}

.hr9-login-panel #page-login,
.hr9-login-panel .page_content > div {
	width: 100%;
	max-width: var(--hr9-panel-max);
	margin: 0 auto;
}

body.hr9-login .for-login,
body.hr9-login .for-forgot,
body.hr9-login .for-signup,
body.hr9-login .for-login-with-email-link,
body.hr9-login .for-email-login {
	width: 100%;
	max-width: var(--hr9-panel-max);
	margin: 0 auto;
}

body.hr9-login .login-content.page-card,
body.hr9-login .page-card {
	width: 100% !important;
	max-width: var(--hr9-panel-max) !important;
	margin: 0 auto !important;
	padding: 28px 28px 24px !important;
	border-radius: var(--hr9-radius-lg) !important;
	border: 1px solid var(--hr9-border) !important;
	background: var(--hr9-surface) !important;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06) !important;
	backdrop-filter: none !important;
}

/* Form head — hide large logo on desktop (brand lives on left) */
body.hr9-login .page-card-head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	padding: 0 0 8px !important;
	background: transparent !important;
	box-shadow: none !important;
}

body.hr9-login .page-card-head .app-logo {
	display: none;
}

body.hr9-login .page-card-head h4,
body.hr9-login .page-card-head .title {
	margin: 0 0 6px !important;
	font-size: 28px !important;
	line-height: 1.2 !important;
	font-weight: 700 !important;
	letter-spacing: -0.03em;
	color: var(--hr9-black) !important;
	text-align: left !important;
}

body.hr9-login .page-card-subtitle {
	margin: 0 0 8px !important;
	font-size: 14px !important;
	line-height: 1.45 !important;
	color: var(--hr9-muted) !important;
	text-align: left !important;
}

/* Inputs */
body.hr9-login .form-label {
	font-size: 13px;
	font-weight: 600;
	color: #101828;
	margin-bottom: 8px;
}

body.hr9-login .form-group {
	margin-bottom: 16px;
}

body.hr9-login .form-control,
body.hr9-login input.form-control {
	min-height: 48px !important;
	height: 48px !important;
	border-radius: var(--hr9-radius) !important;
	border: 1px solid rgba(15, 23, 42, 0.12) !important;
	background: #fafbfe !important;
	padding-left: 40px !important;
	font-size: 15px !important;
	color: var(--hr9-black) !important;
	box-shadow: none !important;
	transition: border-color var(--hr9-transition), box-shadow var(--hr9-transition),
		background var(--hr9-transition);
}

body.hr9-login .form-control:focus,
body.hr9-login input.form-control:focus {
	border-color: rgba(77, 45, 149, 0.55) !important;
	background: #fff !important;
	box-shadow: 0 0 0 3px rgba(77, 45, 149, 0.12) !important;
	outline: none !important;
}

body.hr9-login .email-field,
body.hr9-login .password-field {
	position: relative;
}

body.hr9-login .field-icon {
	opacity: 0.55;
}

body.hr9-login .toggle-password {
	cursor: pointer;
	opacity: 0.7;
}

body.hr9-login .toggle-password:hover,
body.hr9-login .toggle-password:focus-visible {
	opacity: 1;
}

/* Error / success banners — hide empty placeholder (SVG-only counts as :empty=false) */
body.hr9-login .login-error-banner {
	display: none !important;
	align-items: flex-start;
	gap: 8px;
	padding: 10px 12px;
	margin-bottom: 14px;
	border-radius: 10px;
	border: 1px solid rgba(220, 38, 38, 0.25);
	background: rgba(254, 226, 226, 0.85);
	color: #991b1b;
	font-size: 13px;
	line-height: 1.4;
}

/* Show only when Frappe sets display:flex / .show after a real auth error */
body.hr9-login .login-error-banner.show,
body.hr9-login .login-error-banner[style*="display: flex"],
body.hr9-login .login-error-banner[style*="display:flex"],
body.hr9-login .login-error-banner[style*="display: block"],
body.hr9-login .login-error-banner[style*="display:block"] {
	display: flex !important;
}

body.hr9-login .login-success-banner {
	border-radius: 10px;
	border: 1px solid rgba(26, 96, 190, 0.22);
	background: rgba(26, 96, 190, 0.08);
	color: #1a60be;
}

body.hr9-login .field-error {
	display: none;
	color: #b42318;
	font-size: 12px;
	margin-top: 6px;
}

body.hr9-login .field-error:not(:empty) {
	display: block;
}

/* Buttons */
body.hr9-login .btn-login,
body.hr9-login .btn-primary,
body.hr9-login button[type="submit"].btn-login,
body.hr9-login button[type="submit"].btn-primary,
body.hr9-login .btn-forgot {
	min-height: 48px !important;
	border-radius: var(--hr9-radius) !important;
	font-size: 15px !important;
	font-weight: 650 !important;
	letter-spacing: -0.01em;
	border: none !important;
	background: var(--hr9-purple) !important;
	color: #fff !important;
	box-shadow: 0 8px 18px rgba(77, 45, 149, 0.22);
	transition: background var(--hr9-transition), box-shadow var(--hr9-transition),
		transform 180ms ease;
}

body.hr9-login .btn-login:hover,
body.hr9-login .btn-primary:hover,
body.hr9-login button[type="submit"]:hover:not(:disabled) {
	background: linear-gradient(135deg, #4d2d95 0%, #1a60be 100%) !important;
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 12px 24px rgba(26, 96, 190, 0.28);
}

body.hr9-login .btn-login:active,
body.hr9-login .btn-primary:active {
	transform: translateY(0);
}

body.hr9-login .btn-login:focus-visible,
body.hr9-login .btn-primary:focus-visible,
body.hr9-login .form-control:focus-visible {
	outline: 2px solid var(--hr9-blue);
	outline-offset: 2px;
}

body.hr9-login .btn-login-option,
body.hr9-login .btn-login-with-email-link,
body.hr9-login a.btn-default {
	min-height: 44px !important;
	border-radius: var(--hr9-radius) !important;
	border: 1px solid rgba(15, 23, 42, 0.12) !important;
	background: #fff !important;
	color: var(--hr9-blue) !important;
	font-weight: 600 !important;
	box-shadow: none !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	margin-top: 10px;
	transition: border-color var(--hr9-transition), background var(--hr9-transition),
		color var(--hr9-transition);
}

body.hr9-login .btn-login-option:hover,
body.hr9-login .btn-login-with-email-link:hover {
	border-color: rgba(77, 45, 149, 0.35) !important;
	background: rgba(77, 45, 149, 0.04) !important;
	color: var(--hr9-purple) !important;
}

body.hr9-login .forgot-password-message {
	margin-top: 8px;
	text-align: right;
}

body.hr9-login .forgot-password-message a,
body.hr9-login .sign-up-message a,
body.hr9-login a {
	color: var(--hr9-blue) !important;
	font-weight: 600;
	text-decoration: none;
}

body.hr9-login a:hover {
	color: var(--hr9-purple) !important;
	text-decoration: underline;
}

body.hr9-login .page-card-actions {
	margin-top: 8px;
}

body.hr9-login .sign-up-message {
	margin-top: 14px;
	font-size: 13px;
	color: var(--hr9-muted);
}

/* Support */
.hr9-login-support {
	display: block;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid rgba(15, 23, 42, 0.06);
	font-size: 13px;
	color: var(--hr9-muted);
	text-align: center;
}

.hr9-login-support a {
	color: var(--hr9-blue) !important;
	font-weight: 650;
	text-decoration: none;
}

.hr9-login-support a:hover {
	color: var(--hr9-purple) !important;
	text-decoration: underline;
}

.hr9-login-mobile-logo {
	display: none;
	height: 44px;
	width: auto;
	max-width: 180px;
	object-fit: contain;
	margin: 0 auto 16px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 980px) {
	.hr9-login-shell {
		grid-template-columns: 0.9fr 1.1fr;
	}

	.hr9-login-brand {
		padding: 36px 28px;
	}

	.hr9-login-headline {
		font-size: 34px;
	}
}

@media (max-width: 820px) {
	.hr9-login-shell {
		grid-template-columns: 1fr;
		min-height: auto;
	}

	.hr9-login-brand {
		min-height: auto;
		padding: 28px 24px 20px;
		animation: hr9-fade-up 420ms ease both;
	}

	.hr9-login-brand-logo {
		height: 44px;
		margin-bottom: 18px;
	}

	.hr9-login-headline {
		font-size: 28px;
		margin-bottom: 8px;
	}

	.hr9-login-copy {
		font-size: 14px;
		margin-bottom: 0;
	}

	.hr9-login-points,
	.hr9-login-kicker {
		display: none;
	}

	.hr9-orb-a,
	.hr9-orb-b,
	.hr9-orb-c {
		opacity: 0.45;
	}

	.hr9-login-panel {
		padding: 20px 16px 32px;
		align-items: flex-start;
	}

	body.hr9-login .login-content.page-card,
	body.hr9-login .page-card {
		padding: 22px 18px 18px !important;
		border-radius: 18px !important;
	}

	.hr9-login-mobile-logo {
		display: block;
	}
}

@media (max-width: 480px) {
	body.hr9-login .page-card-head h4 {
		font-size: 24px !important;
	}

	body.hr9-login .form-control {
		min-height: 46px !important;
		height: 46px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hr9-login-brand,
	.hr9-login-panel,
	.hr9-orb-a,
	.hr9-orb-b,
	.hr9-orb-c,
	body.hr9-login .btn-login,
	body.hr9-login .btn-primary,
	body.hr9-login .form-control {
		animation: none !important;
		transition: none !important;
		transform: none !important;
	}
}
