/* =====================================================================
   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 ─────────────────────────────────────────────────────── */
.lg-brand-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-bottom: 28px;
}
.lg-brand-mark {
	width: 56px;
	height: 56px;
	border-radius: 16px;
	background: var(--v2-blue);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	box-shadow: var(--v2-sh-blue);
	flex-shrink: 0;
}
.lg-brand-word {
	font-weight: 800;
	font-size: 28px;
	letter-spacing: -0.025em;
	color: var(--v2-ink);
}
.lg-brand-accent { color: var(--v2-blue); }

/* ── 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); }

.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; }

.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-mark { width: 48px; height: 48px; border-radius: 14px; }
	.lg-brand-word { font-size: 24px; }
	.lg-title { font-size: 22px; }
}
