/* EIT custom login — locked to one viewport (no page scroll) */

:root {
	--eit-ink: #121216;
	--eit-ink-soft: #5b5b66;
	--eit-line: #e6e6ec;
	--eit-bg: #ffffff;
	--eit-focus: #3b6cff;
	--eit-font: "DM Sans", system-ui, sans-serif;
	--eit-display: "Sora", system-ui, sans-serif;
	--eit-vh: 100dvh;
}

/* Neutralize Frappe web chrome on /login */
body[data-path="login"] .navbar,
body[data-path="login"] .web-footer,
body[data-path="login"] footer,
body[data-path="login"] .footer-message,
body[data-path="login"] .page-header-wrapper,
body[data-path="login"] .page-breadcrumbs,
body[data-path="login"] .page-footer {
	display: none !important;
}

html:has(body[data-path="login"]),
body[data-path="login"] {
	height: var(--eit-vh) !important;
	max-height: var(--eit-vh) !important;
	overflow: hidden !important;
	overscroll-behavior: none;
}

body[data-path="login"],
body[data-path="login"] .main-section,
body[data-path="login"] .page_content,
body[data-path="login"] .container,
body[data-path="login"] .page-container,
body[data-path="login"] .page-content-wrapper,
body[data-path="login"] .web-page-content,
body[data-path="login"] #page-login,
body[data-path="login"] .page,
body[data-path="login"] .page-content,
body[data-path="login"] .layout-main,
body[data-path="login"] .layout-main-section,
body[data-path="login"] .layout-main-section-wrapper {
	max-width: none !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	height: 100% !important;
	max-height: 100% !important;
	overflow: hidden !important;
}

body[data-path="login"] {
	background: var(--eit-bg) !important;
}

body[data-path="login"] .main {
	padding: 0 !important;
	margin: 0 !important;
	max-width: none !important;
	height: 100% !important;
	overflow: hidden !important;
}

.eit-login {
	font-family: var(--eit-font);
	color: var(--eit-ink);
	height: var(--eit-vh);
	max-height: var(--eit-vh);
	overflow: hidden;
}

.eit-shell {
	display: flex;
	height: var(--eit-vh);
	max-height: var(--eit-vh);
	width: 100%;
	overflow: hidden;
}

.eit-left {
	flex: 1 1 42%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(24px, 4vh, 40px) clamp(24px, 6vw, 96px);
	max-width: 560px;
	background: var(--eit-bg);
	position: relative;
	z-index: 1;
	height: 100%;
	overflow: hidden;
	box-sizing: border-box;
}

.eit-left--solo {
	max-width: 560px;
}

.eit-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: clamp(20px, 4vh, 40px);
	flex-shrink: 0;
}

.eit-logo-mark {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--eit-ink);
	color: #fff;
	display: grid;
	place-items: center;
	font-family: var(--eit-display);
	font-weight: 700;
	font-size: 20px;
}

.eit-logo span {
	font-family: var(--eit-display);
	font-weight: 600;
	font-size: 17px;
	letter-spacing: 0.05em;
}

.eit-left h1 {
	font-family: var(--eit-display);
	font-weight: 700;
	font-size: clamp(24px, 3.2vh, 30px);
	line-height: 1.2;
	margin: 0;
	color: var(--eit-ink);
	flex-shrink: 0;
}

.eit-sub {
	color: var(--eit-ink-soft);
	font-size: 15px;
	margin-top: 6px;
	margin-bottom: 0;
	flex-shrink: 0;
}

.eit-form,
.eit-login .form-signin,
.eit-login .login-content {
	margin-top: clamp(16px, 3vh, 28px);
	display: flex;
	flex-direction: column;
	gap: clamp(12px, 2vh, 18px);
	flex-shrink: 0;
}

.eit-login .page-card-body {
	display: flex;
	flex-direction: column;
	gap: clamp(12px, 2vh, 18px);
	padding: 0 !important;
}

.eit-login .page-card-actions {
	padding: 0 !important;
	margin: 0 !important;
}

.eit-login .form-group,
.eit-field-group {
	margin: 0 !important;
}

.eit-label {
	font-size: 13px;
	font-weight: 600;
	display: block;
	margin-bottom: 6px;
	color: var(--eit-ink);
}

.eit-field {
	position: relative;
}

.eit-login .form-control {
	width: 100%;
	height: auto !important;
	padding: 12px 15px 12px 44px !important;
	font: inherit;
	font-size: 15px !important;
	border: 1px solid var(--eit-line) !important;
	border-radius: 10px !important;
	background: #fafafb !important;
	box-shadow: none !important;
	color: var(--eit-ink) !important;
	transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.eit-login .password-field .form-control {
	padding-right: 64px !important;
}

.eit-login .form-control:focus {
	outline: none !important;
	border-color: var(--eit-ink) !important;
	background: #fff !important;
	box-shadow: 0 0 0 3px rgba(18, 18, 22, 0.08) !important;
}

.eit-icon {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	stroke: var(--eit-ink-soft);
	fill: none;
	stroke-width: 1.6;
	pointer-events: none;
	z-index: 2;
}

.eit-login .field-icon {
	display: none !important;
}

.eit-show,
.eit-login .toggle-password {
	position: absolute !important;
	right: 13px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	background: none !important;
	border: 0 !important;
	font: inherit !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: var(--eit-ink-soft) !important;
	cursor: pointer;
	z-index: 2;
	user-select: none;
}

.eit-show:hover,
.eit-login .toggle-password:hover {
	color: var(--eit-ink) !important;
}

.eit-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
}

.eit-row a,
.eit-signup a,
.forgot-password-message a {
	color: var(--eit-ink) !important;
	text-decoration: none;
	font-weight: 600;
}

.eit-row a:hover,
.eit-signup a:hover {
	text-decoration: underline;
}

.eit-login-btn,
.eit-login .btn-login,
.eit-login .btn-forgot,
.eit-login .btn-login-with-email-link {
	margin-top: 4px;
	width: 100%;
	padding: 13px !important;
	border: 0 !important;
	border-radius: 10px !important;
	cursor: pointer;
	background: var(--eit-ink) !important;
	color: #fff !important;
	font: inherit !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	transition: transform 0.12s, box-shadow 0.12s;
	box-shadow: none !important;
}

.eit-login-btn:hover,
.eit-login .btn-login:hover,
.eit-login .btn-forgot:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 26px -12px rgba(18, 18, 22, 0.55) !important;
	background: var(--eit-ink) !important;
	color: #fff !important;
}

.eit-login-btn:disabled,
.eit-login .btn-login:disabled,
.eit-login .btn-forgot:disabled,
.eit-login-btn.eit-loading {
	opacity: 0.85 !important;
	cursor: not-allowed !important;
	transform: none !important;
	pointer-events: none !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 10px !important;
}

.eit-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: eit-spin 0.7s linear infinite;
	flex-shrink: 0;
}

@keyframes eit-spin {
	to {
		transform: rotate(360deg);
	}
}

.eit-login-btn--secondary {
	background: #fff !important;
	color: var(--eit-ink) !important;
	border: 1px solid var(--eit-line) !important;
	margin-top: 10px;
}

.eit-social {
	margin-top: 8px;
	text-align: center;
}

.eit-social .login-divider {
	color: var(--eit-ink-soft);
	font-size: 13px;
	margin: 12px 0;
}

.eit-signup {
	margin-top: clamp(12px, 2vh, 20px);
	font-size: 14px;
	color: var(--eit-ink-soft);
	text-align: left;
	flex-shrink: 0;
}

.eit-foot {
	margin-top: clamp(16px, 3vh, 32px);
	font-size: 12px;
	color: #a2a2ac;
	flex-shrink: 0;
}

.eit-right {
	flex: 1.15 1 58%;
	position: relative;
	overflow: hidden;
	display: flex;
	height: 100%;
	max-height: var(--eit-vh);
	background: #1a1a1f;
}

.eit-right img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.eit-right::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(200deg, rgba(18, 18, 22, 0) 40%, rgba(18, 18, 22, 0.55) 100%);
	pointer-events: none;
}

.eit-quote {
	position: absolute;
	left: clamp(24px, 4vw, 48px);
	right: clamp(24px, 4vw, 48px);
	bottom: clamp(24px, 4vh, 48px);
	z-index: 2;
	color: #fff;
}

.eit-quote p {
	font-family: var(--eit-display);
	font-weight: 600;
	font-size: clamp(18px, 1.8vw, 24px);
	line-height: 1.4;
	max-width: 26ch;
	margin: 0;
}

.eit-quote span {
	display: block;
	margin-top: 12px;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.75);
}

.eit-noscript {
	padding: 48px;
	text-align: center;
}

.eit-login .page-card {
	box-shadow: none !important;
	border: 0 !important;
	background: transparent !important;
	padding: 0 !important;
}

.eit-login .for-forgot,
.eit-login .for-signup,
.eit-login .for-login-with-email-link,
.eit-login .for-email-login {
	display: none;
}

.eit-login section.eit-shell {
	height: var(--eit-vh);
	max-height: var(--eit-vh);
}

@media (max-width: 900px) {
	.eit-right {
		display: none;
	}
	.eit-left,
	.eit-left--solo {
		max-width: none;
		width: 100%;
		flex: 1 1 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.eit-login * {
		transition: none !important;
	}
}

:focus-visible {
	outline: 2px solid var(--eit-focus);
	outline-offset: 2px;
}

/* Fallback when :has() unsupported */
@supports not selector(:has(*)) {
	html {
		height: 100%;
	}
}
