/* =====================================================================
   Snaproll v2 — login page (sign-in)
   ---------------------------------------------------------------------
   Page-scoped styles for /login (frontend/login-v2.html). Imported AFTER
   tokens.css → base.css → components.css. All measurements use the v2
   spacing scale and CSS variables; no inline hex.

   Visual move: centered card with corner-bleed Apertures (blue top-right,
   saffron bottom-left) — echoes the prototype's Login screen.
   ===================================================================== */

.lg-body {
	min-height: 100vh;
	min-height: 100dvh;
	background: var(--v2-canvas);
	display: flex;
	align-items: stretch;
	justify-content: center;
	position: relative;
	overflow: hidden;
	padding: 24px 20px 32px;
}

/* Decorative corner Apertures. Behind the form, no pointer interaction. */
.lg-corner {
	position: absolute;
	pointer-events: none;
	z-index: 0;
}
.lg-corner-tr { top: -60px; right: -60px; opacity: 0.35; }
.lg-corner-bl { bottom: -80px; left: -80px; opacity: 0.25; }

.lg-shell {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 420px;
	display: flex;
	flex-direction: column;
	align-self: center;
}

/* ── Brand row ─────────────────────────────────────────────────────── */
/* Centered PNG lockup (same asset as landing-v2 header). The brand row
   is a flex container whose only job is to horizontally center the
   anchor; the anchor itself is `inline-flex` so the <img> sits flush
   without baseline gap. `line-height: 0` on `.lg-brand` neutralises
   the inline-img font-leading that would otherwise add ~4 px below. */
.lg-brand-row {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 28px;
}
.lg-brand {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	line-height: 0;
	flex-shrink: 0;
}
/* 64 px tall (vs 48 px on landing) so it reads with more ceremony in
   the centered login layout. Aspect 2.56:1 → ~164 × 64 effective. */
.lg-brand-img {
	height: 64px;
	width: auto;
	max-width: none;
	display: block;
}

/* ── Heading ───────────────────────────────────────────────────────── */
.lg-title {
	text-align: center;
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -0.025em;
	margin: 4px 0 6px;
	color: var(--v2-ink);
}
.lg-sub {
	text-align: center;
	color: var(--v2-muted);
	font-size: 14px;
	margin: 0 0 28px;
}

/* ── Form ──────────────────────────────────────────────────────────── */
.lg-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.lg-pw-wrap {
	position: relative;
	display: block;
}
.lg-pw-wrap .v2-input { padding-right: 44px; }

.lg-pw-toggle {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: 0;
	padding: 8px;
	border-radius: 8px;
	color: var(--v2-soft);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.15s ease;
}
.lg-pw-toggle:hover { color: var(--v2-blue); }
.lg-pw-toggle[data-shown="1"] { color: var(--v2-blue); }

/* Unified login identity input — monospace so `admin@a3kp` reads as
   a single token (no kerning ambiguity around the `@`). */
.lg-identity-input {
	font-family: var(--v2-font-mono);
}

.lg-row-between {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	font-size: 13px;
	color: var(--v2-muted);
	margin-top: -2px;
}

.lg-link {
	color: var(--v2-blue);
	font-weight: 600;
	text-decoration: none;
}
.lg-link:hover { text-decoration: underline; }

/* "Forgot password?" — a <button> for accessibility (it triggers a JS
   action, not navigation) but visually identical to .lg-link. Reset the
   default button chrome so it reads as a link. */
.lg-forgot-toggle {
	background: transparent;
	border: 0;
	padding: 0;
	font-family: inherit;
	font-size: inherit;
	cursor: pointer;
}

.lg-error {
	display: none;
	background: var(--v2-red-soft);
	color: var(--v2-red);
	border: 1px solid rgba(200, 52, 31, 0.25);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 13.5px;
	line-height: 1.45;
}
.lg-error.visible { display: block; }

.lg-submit {
	margin-top: 4px;
}

/* ── Footer ────────────────────────────────────────────────────────── */
.lg-footer {
	margin-top: 32px;
	text-align: center;
	color: var(--v2-soft);
	font-size: 13px;
}

/* Subtle shake on bad credentials. */
@keyframes lg-shake {
	0%, 100% { transform: translateX(0); }
	20%      { transform: translateX(-6px); }
	40%      { transform: translateX(6px); }
	60%      { transform: translateX(-4px); }
	80%      { transform: translateX(4px); }
}
.lg-shake { animation: lg-shake 0.36s ease; }

/* ── Narrow phones ─────────────────────────────────────────────────── */
@media (max-width: 380px) {
	.lg-brand-img { height: 56px; }
	.lg-title { font-size: 22px; }
}
