/* Login-only identity layer. Authentication and validation stay owned by Frappe. */
body[data-path="login"] {
	--lectores-brand: #d40a78;
	--lectores-brand-hover: #b5126a;
	--lectores-brand-soft: #fce7f3;
	--lectores-ink: #10273c;
	--lectores-muted: #5b6b7c;
	--lectores-line: #dde4ec;
	--lectores-serif: "Palatino Linotype", "Book Antiqua", Palatino, "Iowan Old Style",
		"URW Palladio L", P052, Georgia, serif;
	min-height: 100dvh;
	background:
		radial-gradient(60% 50% at 0% 0%, rgb(23 50 77 / 8%), transparent 70%),
		#eef2f6;
	color: var(--lectores-ink);
}

body[data-path="login"] #page-login,
body[data-path="login"] .page-content-wrapper,
body[data-path="login"] main.container,
body[data-path="login"] .page_content {
	min-height: 100dvh;
}

body[data-path="login"] .page-content-wrapper {
	padding-top: 0;
}

body[data-path="login"] main.container {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

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

body[data-path="login"] .page_content {
	display: grid;
	box-sizing: border-box;
	place-items: center;
	padding: clamp(24px, 5vw, 64px);
}

body[data-path="login"] .lectores-login-shell {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
	width: min(1080px, calc(100vw - 48px));
	min-height: min(650px, calc(100dvh - 80px));
	overflow: hidden;
	border: 1px solid rgba(23, 50, 77, 0.12);
	border-radius: 24px;
	background: #ffffff;
	box-shadow: 0 28px 80px rgba(16, 39, 60, 0.16);
}

body[data-path="login"] .lectores-login-brand {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	overflow: hidden;
	padding: clamp(48px, 6vw, 76px);
	background:
		radial-gradient(90% 70% at 100% 0%, rgba(46, 90, 135, 0.6), transparent 60%),
		linear-gradient(160deg, #17324d 0%, #10273c 100%);
	color: #ffffff;
}

body[data-path="login"] .lectores-login-brand::before {
	position: absolute;
	top: -92px;
	right: -92px;
	width: 290px;
	height: 290px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 50%;
	box-shadow:
		0 0 0 54px rgba(255, 255, 255, 0.045),
		0 0 0 108px rgba(255, 255, 255, 0.025);
	content: "";
}

/* El marcapáginas de Club Lectores cuelga del borde superior. */
body[data-path="login"] .lectores-login-brand::after {
	position: absolute;
	top: 0;
	left: clamp(48px, 6vw, 76px);
	width: 40px;
	height: 128px;
	background: linear-gradient(90deg, #b5126a 0 12%, #d40a78 12% 88%, #b5126a 88%);
	clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%);
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
	content: "";
	animation: lectores-cinta 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes lectores-cinta {
	from {
		transform: translateY(-100%);
	}

	70% {
		transform: translateY(4%);
	}

	to {
		transform: translateY(0);
	}
}

body[data-path="login"] .lectores-login-brand-copy {
	position: relative;
	z-index: 1;
	max-width: 480px;
}

body[data-path="login"] .lectores-login-brand-name {
	margin: 0 0 28px;
	color: #f9a8d4;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

body[data-path="login"] .lectores-login-brand h1 {
	max-width: 14ch;
	margin: 0 0 24px;
	color: #ffffff;
	font-family: var(--lectores-serif);
	font-size: clamp(2.4rem, 4vw, 4.1rem);
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.02;
}

body[data-path="login"] .lectores-login-brand-description {
	max-width: 38ch;
	margin: 0;
	color: #c9d6e3;
	font-size: 1.05rem;
	line-height: 1.65;
}

body[data-path="login"] .lectores-login-shell > section {
	grid-column: 2;
	grid-row: 1;
	align-self: center;
	width: 100%;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 48px clamp(40px, 5vw, 72px);
}

body[data-path="login"] .login-content.page-card {
	display: block;
	width: 100%;
	max-width: 410px;
	height: auto;
	min-height: 0;
	margin: 0 auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

body[data-path="login"] .page-card-head {
	margin-bottom: 32px;
	text-align: left;
}

body[data-path="login"] .page-card-head .app-logo {
	display: block;
	width: auto;
	max-width: min(100%, 250px);
	height: auto;
	max-height: 84px;
	margin: 0 0 30px;
	object-fit: contain;
}

body[data-path="login"] .page-card-head h4 {
	margin-bottom: 8px;
	color: var(--lectores-ink);
	font-family: var(--lectores-serif);
	font-size: 1.85rem;
	font-weight: 700;
	letter-spacing: -0.005em;
}

body[data-path="login"] #page-login .page-card-head p,
body[data-path="login"] #page-login .page-card-body label,
body[data-path="login"] #page-login .page-card-body .form-label {
	color: var(--lectores-muted) !important;
}

body[data-path="login"] #page-login .page-card-body label,
body[data-path="login"] #page-login .page-card-body .form-label {
	font-weight: 600;
}

body[data-path="login"] .page-card .form-control {
	min-height: 48px;
	border: 1px solid var(--lectores-line);
	border-radius: 12px;
	background: #ffffff;
	color: var(--lectores-ink);
}

body[data-path="login"] .page-card .form-control::placeholder {
	color: #6b6066;
}

body[data-path="login"] .page-card .form-control:focus {
	border-color: #17324d;
	box-shadow: 0 0 0 3px rgba(23, 50, 77, 0.14);
}

body[data-path="login"] .page-card .input-group-text {
	border-color: var(--lectores-line);
	background: #ffffff;
}

body[data-path="login"] .page-card .btn-login,
body[data-path="login"] .page-card .btn-primary {
	min-height: 48px;
	border: 1px solid var(--lectores-brand) !important;
	border-radius: 12px;
	background: var(--lectores-brand) !important;
	color: #ffffff !important;
	font-weight: 650;
	box-shadow: 0 10px 24px rgba(180, 8, 101, 0.2);
	transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

body[data-path="login"] .page-card .btn-login:hover,
body[data-path="login"] .page-card .btn-primary:hover {
	border-color: var(--lectores-brand-hover) !important;
	background: var(--lectores-brand-hover) !important;
}

body[data-path="login"] .page-card .btn-login:active,
body[data-path="login"] .page-card .btn-primary:active {
	transform: translateY(1px);
}

body[data-path="login"] .page-card .btn-login-option {
	min-height: 44px;
	border: 1px solid var(--lectores-line);
	border-radius: 12px;
	background: #f4f6f9;
	color: #17324d;
	font-weight: 600;
	box-shadow: none;
}

body[data-path="login"] .page-card .btn-login-option:hover {
	border-color: #c9d6e3;
	background: #e7eef6;
	color: var(--lectores-ink);
}

body[data-path="login"] #page-login .page-card a:not(.btn) {
	color: #b5126a !important;
	font-weight: 550;
}

body[data-path="login"] #page-login .page-card a:not(.btn):hover {
	color: #8f0e54 !important;
}

body[data-path="login"] .page-card :is(a, button, input):focus-visible {
	outline: 2px solid #d40a78;
	outline-offset: 3px;
}

@media (max-width: 767px) {
	body[data-path="login"] .page_content {
		align-items: start;
		padding: 12px;
	}

	body[data-path="login"] .lectores-login-shell {
		grid-template-columns: 1fr;
		width: 100%;
		min-height: 0;
		border-radius: 20px;
	}

	body[data-path="login"] .lectores-login-brand {
		grid-column: 1;
		grid-row: 1;
		min-height: 170px;
		padding: 26px 28px 26px 84px;
	}

	body[data-path="login"] .lectores-login-brand-name {
		margin-bottom: 14px;
	}

	body[data-path="login"] .lectores-login-brand h1 {
		max-width: 16ch;
		margin-bottom: 0;
		font-size: clamp(2rem, 10vw, 2.75rem);
		line-height: 1.02;
	}

	body[data-path="login"] .lectores-login-brand-description {
		display: none;
	}

	body[data-path="login"] .lectores-login-shell > section {
		grid-column: 1;
		grid-row: 2;
		height: auto !important;
		padding: 30px 24px 34px;
	}

	body[data-path="login"] .page-card-head {
		margin-bottom: 24px;
	}

	body[data-path="login"] .page-card-head .app-logo {
		max-width: 220px;
		max-height: 72px;
		margin-bottom: 24px;
	}
}

@media (max-width: 767px) {
	body[data-path="login"] .lectores-login-brand::after {
		left: 26px;
		width: 34px;
		height: 96px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body[data-path="login"] .lectores-login-brand::after {
		animation: none;
	}

	body[data-path="login"] .page-card * {
		scroll-behavior: auto;
		transition-duration: 0.01ms !important;
	}
}
