/* Cohenix branded login — video left, form right */

:root {
	/* EPI-USE palette. These are the same hexes the Desk theme declares in
	   public/scss/desk/_tokens.scss - sign-in and the app behind it are one brand. */
	--cohenix-navy-ink: #001844;
	--cohenix-navy: #1b2750;
	--cohenix-heading: #24356a;
	--cohenix-brand: #2b3c98;
	--cohenix-steel: #5073a5;
	--cohenix-light-blue: #859fc4;

	/* The accent splits by surface. On the white panel, brand blue. Over the
	   hero it sits on the scrim rather than on bare photo, so the effective
	   ground is about rgb(52, 73, 112): brand blue measures 1.06:1 there and
	   the light blue 3.33:1, which clears AA for the headline's size. */
	--cohenix-accent: var(--cohenix-brand);
	--cohenix-accent-on-dark: var(--cohenix-light-blue);

	/* Neutrals: Desk's light-theme text and rule colours, which are navy-mixed
	   rather than slate, so the greys sit under the same hue as the blues. */
	--cohenix-ink: #333333;
	--cohenix-ink-muted: #525c6b;
	--cohenix-ink-light: #6b7380;
	--cohenix-rule: #dfe6f0;
	--cohenix-rule-strong: #c8d4e4;
	--cohenix-panel-bg: #f4f6fa;
	--cohenix-surface-quiet: #eef1f7;

	--cohenix-card-radius: 14px;
	--cohenix-input-radius: 8px;
	--cohenix-control-height: 44px;
	--cohenix-focus-ring: 0 0 0 3px rgba(43, 60, 152, 0.14);
}

/* Shell: hero left, panel right */
.cohenix-login-shell {
	display: grid;
	grid-template-columns: 1fr;
	width: 100%;
	min-height: 100vh;
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.5;
}

body[data-path="login"] {
	background: var(--cohenix-panel-bg);
	min-height: 100vh;
	overflow-x: hidden;
}

body[data-path="login"] .web-footer,
body[data-path="login"] .page-breadcrumbs,
body[data-path="login"] .page-header-wrapper,
body[data-path="login"] .page-footer {
	display: none !important;
}

body[data-path="login"] #page-login,
body[data-path="login"] .page-content-wrapper,
body[data-path="login"] main,
body[data-path="login"] .page_content {
	width: 100%;
	max-width: none;
	padding: 0;
	margin: 0;
	min-height: 100vh;
}

@media (min-width: 992px) {
	body.cohenix-login-locked {
		overflow: hidden;
	}

	.cohenix-login-shell {
		grid-template-columns: minmax(0, 1.15fr) minmax(28rem, 0.85fr);
		gap: 0;
		box-sizing: border-box;
		padding: 0.75rem 0.75rem 0.75rem 0;
		height: 100vh;
		max-height: 100vh;
		overflow: hidden;
	}
}

/* Hero — left column, full bleed */
.cohenix-login-hero {
	display: none;
	position: relative;
	overflow: hidden;
	background: var(--cohenix-navy);
	min-height: 0;
	isolation: isolate;
}

@media (min-width: 992px) {
	.cohenix-login-hero {
		display: flex;
		height: 100%;
		min-height: 0;
		border-radius: 0 1.5rem 1.5rem 0;
	}
}

.cohenix-login-hero__media {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background-color: var(--cohenix-navy);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	border-radius: inherit;
}

.cohenix-login-hero__still {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cohenix-login-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	opacity: 0;
	transition: opacity 0.5s ease;
}

.cohenix-login-hero--video-ready .cohenix-login-hero__video {
	opacity: 1;
}

.cohenix-login-hero--video-ready .cohenix-login-hero__still {
	opacity: 0;
	transition: opacity 0.5s ease;
}

.cohenix-login-hero__scrim {
	position: absolute;
	inset: 0;
	pointer-events: none;
	border-radius: inherit;
	background:
		linear-gradient(0deg, rgba(0, 24, 68, 0.45) 0%, rgba(0, 24, 68, 0) 42%),
		linear-gradient(
			105deg,
			rgba(0, 24, 68, 0.84) 0%,
			rgba(0, 24, 68, 0.62) 34%,
			rgba(0, 24, 68, 0.24) 64%,
			rgba(0, 24, 68, 0.06) 100%
		);
}

.cohenix-login-hero__content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	padding: 44px;
	max-width: 520px;
}

.cohenix-login-hero__logo {
	display: block;
	width: auto;
	height: 36px;
	max-width: 100%;
	margin-bottom: 44px;
	object-fit: contain;
	object-position: left center;
}

.cohenix-login-hero__headline {
	margin: 0 0 14px;
	font-size: clamp(1.75rem, 2.4vw, 2.125rem);
	font-weight: 600;
	line-height: 1.18;
	letter-spacing: -0.028em;
	text-wrap: balance;
	color: #fff;
}

.cohenix-login-hero__headline-accent {
	color: var(--cohenix-accent-on-dark);
}

.cohenix-login-hero__subhead {
	margin: 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.82);
	max-width: 25rem;
	text-wrap: pretty;
}

.cohenix-login-hero__divider {
	width: 40px;
	height: 2px;
	margin: 30px 0 28px;
	background: var(--cohenix-accent-on-dark);
	border-radius: 1px;
}

.cohenix-login-hero__features {
	display: grid;
	gap: 22px;
}

.cohenix-login-hero__feature {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.cohenix-login-hero__feature-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.16);
}

.cohenix-login-hero__feature-title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: #fff;
}

.cohenix-login-hero__feature-detail {
	margin: 3px 0 0;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.72);
	max-width: 24rem;
	text-wrap: pretty;
}

.cohenix-login-hero__testimonial {
	margin: auto 0 0;
	padding: 22px 24px;
	border-radius: 14px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	background: rgba(255, 255, 255, 0.1);
}

.cohenix-login-hero__quote-icon {
	color: rgba(255, 255, 255, 0.45);
	margin-bottom: 0.5rem;
}

.cohenix-login-hero__testimonial-text {
	margin: 0 0 16px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.92);
	text-wrap: pretty;
}

.cohenix-login-hero__testimonial-author {
	display: flex;
	align-items: center;
	gap: 12px;
}

.cohenix-login-hero__testimonial-logo {
	display: block;
	width: 38px;
	height: 38px;
	object-fit: contain;
	flex-shrink: 0;
	border-radius: 8px;
}

.cohenix-login-hero__testimonial-name {
	display: block;
	font-style: normal;
	font-size: 13px;
	font-weight: 600;
	color: #fff;
	line-height: 1.35;
}

.cohenix-login-hero__testimonial-role {
	display: block;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.66);
	line-height: 1.35;
}

/* Form panel — right column */
.cohenix-login-panel {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 2rem 1.5rem;
	background: var(--cohenix-panel-bg);
	overflow-y: auto;
}

@media (min-width: 992px) {
	.cohenix-login-panel {
		min-height: 0;
		height: 100%;
		padding: 2.5rem 3rem;
	}
}

.cohenix-login-panel-card-glow {
	position: relative;
	width: 100%;
	max-width: 25rem;
}

.cohenix-login-panel-card {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: none;
	padding: 36px 32px;
	border-radius: var(--cohenix-card-radius);
	background: #fff;
	border: 1px solid var(--cohenix-rule);
	box-shadow:
		0 1px 2px rgba(0, 24, 68, 0.04),
		0 12px 32px rgba(0, 24, 68, 0.07);
}

.cohenix-login-intro {
	margin-bottom: 24px;
}

.cohenix-login-logo,
.cohenix-login-panel .app-logo {
	border-radius: 10px;
}

.cohenix-login-logo {
	height: 36px;
	width: auto;
	max-width: 9rem;
	object-fit: contain;
	margin-bottom: 16px;
}

.cohenix-login-panel h1.cohenix-login-title {
	margin: 0 0 5px;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: var(--cohenix-heading);
}

.cohenix-login-subhead {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--cohenix-ink-muted);
	text-wrap: pretty;
}

.cohenix-login-forms {
	width: 100%;
}

.cohenix-login-panel .for-login > .page-card-head {
	display: none;
}

/* Card overrides — flat form area inside unified panel */
.cohenix-login-panel .for-login .page-card,
.cohenix-login-panel .for-email-login .page-card,
.cohenix-login-panel .for-signup .page-card,
.cohenix-login-panel .for-forgot .page-card,
.cohenix-login-panel .for-login-with-email-link .page-card {
	max-width: none;
	width: 100%;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
}

.cohenix-login-panel .for-signup .page-card,
.cohenix-login-panel .for-forgot .page-card,
.cohenix-login-panel .for-login-with-email-link .page-card,
.cohenix-login-panel .for-email-login .page-card {
	padding: 0;
	border: none;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
}

.cohenix-login-panel .page-card-head {
	padding: 0 0 1.25rem;
}

.cohenix-login-panel .page-card-head h4 {
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--cohenix-heading);
	margin: 0;
}

.cohenix-login-panel .page-card-head .app-logo {
	height: 1.75rem;
	width: auto;
	max-width: 9rem;
	margin-bottom: 0.625rem;
}

.cohenix-login-panel .page-card form {
	max-width: none;
	margin: 0;
}

.cohenix-login-panel .page-card .page-card-body input[type="text"],
.cohenix-login-panel .page-card .page-card-body input[type="email"],
.cohenix-login-panel .page-card .page-card-body input[type="password"] {
	width: 100%;
	height: var(--cohenix-control-height);
	box-sizing: border-box;
	border: 1px solid var(--cohenix-rule);
	border-radius: var(--cohenix-input-radius);
	background: #fff;
	padding: 0 14px;
	margin-bottom: 0;
	font-size: 15px;
	line-height: 1.4;
	color: var(--cohenix-ink);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cohenix-login-panel .page-card .page-card-body input:focus {
	border-color: var(--cohenix-brand);
	box-shadow: var(--cohenix-focus-ring);
	outline: none;
}

/* Frappe parks the field icon at left: 8px and the reveal toggle at right: 9px. */
.cohenix-login-panel .page-card .page-card-body .email-field input,
.cohenix-login-panel .page-card .page-card-body .password-field input {
	padding-left: 38px;
}

.cohenix-login-panel .page-card .page-card-body .password-field input {
	padding-right: 64px;
}

.cohenix-login-panel .field-icon {
	color: var(--cohenix-ink-light);
	fill: var(--cohenix-ink-light);
	stroke: var(--cohenix-ink-light);
}

.cohenix-login-panel .toggle-password {
	right: 12px;
	font-size: 13px;
	font-weight: 500;
	color: var(--cohenix-accent);
}

/* Labels are visible now - they were sr-only, which is both an
   accessibility problem and the cheapest-looking thing on the page. */
.cohenix-login-panel .form-group {
	margin-bottom: 16px;
}

.cohenix-login-panel .form-group:last-child {
	margin-bottom: 0;
}

.cohenix-login-panel .page-card .page-card-body .form-label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--cohenix-ink);
}

.cohenix-login-panel .cohenix-label-row {
	display: flex;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 6px;
}

.cohenix-login-panel .page-card .page-card-body .cohenix-label-row .form-label {
	flex: 1 1 auto;
	margin-bottom: 0;
}

.cohenix-login-panel .cohenix-forgot-link {
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--cohenix-accent);
	text-decoration: none;
}

.cohenix-login-panel .cohenix-forgot-link:hover {
	text-decoration: underline;
}

.cohenix-login-panel .page-card .page-card-actions .btn-login,
.cohenix-login-panel .page-card .page-card-actions .btn-forgot,
.cohenix-login-panel .page-card .page-card-actions .btn-login-with-email-link,
.cohenix-login-panel .page-card .page-card-actions .btn-signup {
	display: flex;
	align-items: center;
	justify-content: center;
	height: var(--cohenix-control-height);
	background: var(--cohenix-brand);
	border: 1px solid var(--cohenix-brand);
	color: #fff;
	border-radius: var(--cohenix-input-radius);
	padding: 0 16px;
	font-weight: 500;
	font-size: 15px;
	letter-spacing: 0.005em;
	box-shadow: none;
}

.cohenix-login-panel .page-card .page-card-actions .btn-login:hover,
.cohenix-login-panel .page-card .page-card-actions .btn-forgot:hover,
.cohenix-login-panel .page-card .page-card-actions .btn-login-with-email-link:hover,
.cohenix-login-panel .page-card .page-card-actions .btn-signup:hover {
	background: var(--cohenix-navy-ink);
	border-color: var(--cohenix-navy-ink);
	color: #fff;
	box-shadow: none;
}

.cohenix-login-panel .btn-login-option {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: var(--cohenix-control-height);
	border-radius: var(--cohenix-input-radius);
	border: 1px solid var(--cohenix-rule-strong);
	background: #fff;
	padding: 0 16px;
	font-weight: 500;
	font-size: 15px;
	color: var(--cohenix-ink);
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.cohenix-login-panel .btn-login-option .mr-2 {
	margin-right: 0 !important;
}

.cohenix-login-panel .btn-login-option:hover {
	background: var(--cohenix-surface-quiet);
	border-color: var(--cohenix-rule-strong);
	color: var(--cohenix-ink);
	box-shadow: 0 2px 8px rgba(0, 24, 68, 0.06);
}

.cohenix-login-panel .login-divider {
	position: relative;
	margin: 20px 0;
	font-size: 12px;
	font-weight: 500;
	color: var(--cohenix-ink-light);
}

.cohenix-login-panel .login-divider::before,
.cohenix-login-panel .login-divider::after {
	content: "";
	position: absolute;
	top: 50%;
	width: calc(50% - 1.5rem);
	height: 1px;
	background: var(--cohenix-rule);
}

.cohenix-login-panel .login-divider::before {
	left: 0;
}

.cohenix-login-panel .login-divider::after {
	right: 0;
}

.cohenix-login-panel .sign-up-message {
	margin-top: 20px;
	font-size: 13px;
	color: var(--cohenix-ink-muted);
}

.cohenix-login-panel .sign-up-message a {
	color: var(--cohenix-accent);
	font-weight: 600;
	text-decoration: none;
}

.cohenix-login-panel .sign-up-message a:hover {
	text-decoration: underline;
}

.cohenix-login-panel .page-card-actions {
	margin-top: 24px;
}
