/* =====================================================================
   Sign-in on phones and tablets: an app-style screen — brand header on top,
   the form in a rounded bottom sheet, big touch targets. Desktop (> 1100px)
   is untouched: every rule here sits inside the media query.
   ===================================================================== */
.lg-app-hero { display: none; }

@media (max-width: 1100px) {
	html, body.lg-body { min-height: 100dvh; }
	body.lg-body, body.wn-app.lg-p-super, body.wn-app.lg-p-root, body.wn-app.lg-p-company {
		--app-a: var(--wn-primary);
		--app-b: color-mix(in srgb, var(--wn-primary) 55%, #0F172A);
		background: var(--lg-card) !important;
		background-image: none !important;
		display: flex; flex-direction: column;
		padding-top: env(safe-area-inset-top);
	}
	.lg-p-super, .lg-p-root { --app-a: #4F46E5; --app-b: #6D28D9; }
	.lg-p-company { --app-a: #0891B2; --app-b: #0E7490; }
	[data-theme="dark"] body.lg-body { background: var(--lg-bg) !important; }
	.lg-blob, .lg-tagline, .lg-show, .lg-qr-card { display: none !important; }

	/* brand header */
	.lg-app-hero {
		display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
		position: fixed; inset: 0 0 auto 0; height: 300px; z-index: 0;
		padding: calc(34px + env(safe-area-inset-top)) 24px 0; color: #fff;
		background: radial-gradient(120% 90% at 85% 0%, rgba(255, 255, 255, .18), transparent 55%), linear-gradient(150deg, var(--app-a), var(--app-b));
	}
	.lg-app-hero::after { content: ''; position: absolute; width: 220px; height: 220px; left: -70px; bottom: -40px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
	.lg-app-logo { width: 74px; height: 74px; border-radius: 22px; background: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px rgba(15, 23, 42, .25); margin-bottom: 10px; overflow: hidden; }
	.lg-app-logo b { font-size: 32px; font-weight: 800; color: var(--app-a); }
	.lg-app-logo .wnx-logo { display: block; }
	.lg-app-logo .wnx-logo img { height: 62px; width: auto; }
	.lg-app-logo .wnx-dark { display: none !important; }
	.lg-app-logo .wnx-light { display: block !important; }
	.lg-app-name { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
	.lg-app-hi { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
	.lg-app-sub { font-size: 14px; opacity: .85; }

	/* theme toggle: glass button on the header */
	.lg-top { position: fixed; top: env(safe-area-inset-top); right: 0; left: auto; padding: 14px 16px 0; z-index: 5; background: none; }
	.lg-theme { background: rgba(255, 255, 255, .18) !important; color: #fff !important; box-shadow: none; backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .3); }

	/* the sheet */
	.lg-layout, .lg-p-super .lg-layout, .lg-p-root .lg-layout, .lg-p-company .lg-layout {
		position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end;
		max-width: none; min-height: 0; flex: 1; margin: 0; padding: 248px 0 0; gap: 0;
	}
	.lg-side, .lg-p-super .lg-side, .lg-p-root .lg-side, .lg-p-company .lg-side { flex: 1; gap: 0; max-width: none; justify-self: stretch; }
	.lg-side > .lg-card:first-child {
		flex: 1; display: flex; flex-direction: column;
		border: 0; border-radius: 28px 28px 0 0; margin: 0;
		padding: 26px 22px calc(18px + env(safe-area-inset-bottom));
		background: var(--lg-card) !important;
		box-shadow: 0 -12px 40px -18px rgba(15, 23, 42, .35) !important;
	}
	.lg-side > .lg-card:first-child::before { left: 50%; right: auto; top: 10px; width: 44px; height: 5px; border-radius: 3px; transform: translateX(-50%); background: var(--wn-line) !important; }
	.lg-brandbar .lg-logo { display: none; }
	.lg-brandbar { margin-top: 4px; min-height: 0; }
	.lg-welcome { font-size: 15px; color: var(--wn-title); font-weight: 600; margin: 6px 0 18px; }
	.lg-mode-badge { margin: 4px auto 0; }

	/* controls: app-sized, 16px text so phones do not zoom in */
	.lg-seg { border-radius: 14px; padding: 5px; margin-bottom: 22px; }
	.lg-seg button { border-radius: 10px; padding: 11px 8px; font-size: 14px; }
	.lg-label { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
	.lg-label-row { margin-top: 18px; }
	.lg-input > i { left: 15px; font-size: 19px; }
	.lg-input input { height: 54px; border-radius: 16px; padding-left: 46px; font-size: 16px; background: var(--wn-bg); border-color: transparent; }
	.lg-input input:focus { background: var(--lg-card); border-color: var(--wn-primary); }
	.lg-eye { right: 8px; width: 40px; height: 40px; font-size: 20px; }
	.lg-link { font-size: 13px; }
	.lg-btn { height: 56px; margin-top: 26px; border-radius: 16px; font-size: 16px; font-weight: 700; }
	.lg-btn-light { height: 52px; }
	.lg-alert { border-radius: 14px; font-size: 13.5px; padding: 12px 14px; }
	.lg-geo { font-size: 12.5px; }
	.lg-divider { margin: 26px 0 14px; }
	.lg-demo { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.lg-demo button, .lg-demo button:nth-child(n+4) { grid-column: auto; padding: 11px 10px; border-radius: 12px; font-size: 13px; }
	.lg-help > div { padding: 14px 0; }
	.lg-card-foot { margin: auto -22px 0; padding: 16px 12px 4px; border: 0; background: none; border-radius: 0; font-size: 13.5px; }
	.lg-copy { position: relative; z-index: 1; padding: 0 16px calc(14px + env(safe-area-inset-bottom)); background: var(--lg-card); }
	[data-theme="dark"] .lg-copy { background: var(--lg-card); }
}

/* tablets: the sheet becomes a floating card in the middle */
@media (min-width: 640px) and (max-width: 1100px) {
	.lg-app-hero { height: 360px; padding-top: calc(48px + env(safe-area-inset-top)); }
	.lg-layout, .lg-p-super .lg-layout, .lg-p-root .lg-layout, .lg-p-company .lg-layout { padding: 270px 24px 24px; align-items: center; justify-content: flex-start; }
	.lg-side, .lg-p-super .lg-side, .lg-p-root .lg-side, .lg-p-company .lg-side { flex: 0 0 auto; width: 100%; max-width: 480px; }
	.lg-side > .lg-card:first-child { border-radius: 28px; flex: 0 0 auto; padding: 30px 30px 20px; }
	.lg-card-foot { margin: 18px -30px 0; }
	.lg-copy { background: none; padding-top: 14px; }
}
