/* Sign-in page: one centered card on a full-page brand background; never scrolls on a normal screen. */
html, body { height: 100%; }
.lg { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; overflow: hidden;
    background: radial-gradient(700px 480px at 12% 8%, rgba(var(--x-accent-2-rgb), .35), transparent 62%),
                radial-gradient(620px 420px at 90% 95%, rgba(var(--x-accent-3-rgb), .22), transparent 62%),
                linear-gradient(160deg, var(--x-deep-1) 0%, var(--x-deep-2) 100%); }
/* a faint grid, fading out toward the edges */
.lg::before { content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 40px 40px; -webkit-mask-image: radial-gradient(closest-side, #000, transparent); mask-image: radial-gradient(closest-side, #000, transparent); }
.lg-center { position: relative; z-index: 1; width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: stretch; gap: 18px; }

.lg-top { display: flex; align-items: center; justify-content: center; gap: 12px; }
.lg-mark { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none;
    background: var(--x-mark-grad); box-shadow: 0 10px 26px -10px rgba(var(--x-accent-2-rgb), .9); }
.lg-mark svg { width: 23px; height: 23px; stroke: #fff; stroke-width: 2.4; fill: none; stroke-linecap: round; }
.lg-name { font-weight: 800; color: #fff; font-size: 17px; line-height: 1.1; }
.lg-name small { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--x-on-deep-3); font-weight: 800; }

.lg-theme { position: absolute; top: 16px; right: 16px; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 99px;
    background: var(--x-panel); border: 1px solid var(--x-line); box-shadow: var(--x-shadow); }
.lg-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--x-solid); cursor: pointer; padding: 0;
    background: conic-gradient(var(--a) 0 50%, var(--b) 0 75%, var(--c) 0); box-shadow: 0 0 0 1px var(--x-line-2); transition: transform .2s, box-shadow .2s; }
.lg-dot:hover { transform: scale(1.12); }
.lg-dot.is-on { box-shadow: 0 0 0 2px var(--x-accent); }
.lg-theme .x-icon-btn { width: 28px; height: 28px; }
.lg-card { position: relative; z-index: 1; width: 100%; padding: clamp(20px, 3.6vh, 32px) 30px; border-radius: 26px;
    background: var(--x-solid); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06); }
/* a hairline of the brand gradient along the top edge */
.lg-card::before { content: ""; position: absolute; top: 0; left: 28px; right: 28px; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, var(--x-accent), var(--x-accent-2), var(--x-accent-3)); }
.lg-steps { list-style: none; display: flex; align-items: center; gap: 8px; padding: 0; margin: 0 0 clamp(12px, 2.4vh, 20px); }
.lg-steps li { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--x-muted); }
.lg-steps li + li::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--x-line-2); margin-right: 1px; }
.lg-steps b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--x-soft-2); border: 1px solid var(--x-line-2); }
.lg-steps li.on { color: var(--x-accent); }
.lg-steps li.on b { background: var(--x-grad); color: var(--x-on-accent); border-color: transparent; }
.lg-steps li.done b { background: var(--x-soft); color: var(--x-accent); border-color: transparent; }

.lg-step { display: flex; flex-direction: column; gap: clamp(10px, 1.8vh, 14px); }
.lg-step[hidden] { display: none; }
.lg-step h2 { font-size: clamp(1.35rem, 1vw + 1.4vh, 1.65rem); margin: 0; }
.lg-step > p.muted { margin: -6px 0 2px; font-size: 13.5px; }
.lg-pass { position: relative; }
.lg-pass input { padding-right: 44px; }
.lg-pass .x-icon-btn { position: absolute; right: 4px; top: 4px; }
.lg-go { height: 46px; justify-content: center; font-size: 14px; margin-top: 2px; }
.lg-go.busy span::after { content: "…"; }
.lg-err { margin: 0; color: var(--x-bad); font-size: 12.5px; font-weight: 600; }
.lg-err:empty { display: none; }
.lg-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 14px; border-radius: 13px; background: var(--x-warn-soft); color: var(--x-warn); font-size: 12.5px; font-weight: 600; }
.lg-note svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.lg-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--x-muted); font: 700 12.5px inherit; font-family: inherit; cursor: pointer; }
.lg-back:hover { color: var(--x-accent); }
.lg-back svg { width: 14px; height: 14px; }
.lg-otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.lg-otp input { width: 100%; height: 52px; text-align: center; border-radius: 13px; border: 1px solid var(--x-line-2); background: var(--x-input); color: var(--x-ink); font: 700 22px "JetBrains Mono", monospace; outline: none; transition: border-color .15s, box-shadow .15s; }
.lg-otp input:focus { border-color: var(--x-accent); box-shadow: 0 0 0 3px rgba(var(--x-accent-rgb), .15); }
.lg-otp input.filled { border-color: var(--x-accent); background: var(--x-soft-2); }
.lg-otp.shake { animation: lgShake .35s; }
@keyframes lgShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.lg-resend { margin: 0; text-align: center; font-size: 12.5px; color: var(--x-muted); }
.lg-resend button { border: 0; background: none; padding: 0; color: var(--x-accent); font: 700 12.5px inherit; font-family: inherit; cursor: pointer; }
.lg-resend button:disabled { color: var(--x-muted); cursor: default; }
.lg-badge { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--x-grad-warm); color: var(--x-on-warm); }
.lg-badge svg { width: 24px; height: 24px; }
.lg-spin { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--x-soft); border-top-color: var(--x-accent); animation: lgSpin .8s linear infinite; }
@keyframes lgSpin { to { transform: rotate(360deg); } }


/* phones */
@media (max-width: 520px) {
    .lg { place-items: start center; padding-top: 64px; }
    .lg-card { padding: 24px 20px; }
}
