/* Sign-in page: one screen, never scrolls. Left: a live mini task board on a lagoon blueprint. Right: the sign-in card.
   Sizes use clamp() on viewport height so the page fits short laptop screens as well as tall monitors. */
html, body { height: 100%; }
body { overflow: hidden; }
.lg { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(400px, 1fr); height: 100vh; height: 100dvh; }

/* ---------------------------------------------------------------- brand pane */
.lg-brand { position: relative; overflow: hidden; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: clamp(14px, 3vh, 30px); padding: clamp(20px, 4vh, 40px) clamp(24px, 4vw, 52px); color: var(--x-on-deep);
    background: radial-gradient(600px 400px at 0% 0%, rgba(var(--x-accent-2-rgb), .32), transparent 60%),
                radial-gradient(520px 360px at 100% 100%, rgba(var(--x-accent-3-rgb), .2), transparent 62%),
                linear-gradient(165deg, var(--x-deep-1) 0%, var(--x-deep-2) 100%); }
/* blueprint dot grid, fading toward the bottom */
.lg-brand::before { content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.2px); background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 95%); mask-image: linear-gradient(180deg, #000 30%, transparent 95%); }
/* a slow marigold scan line, like a probe passing over the bed */
.lg-brand::after { content: ""; position: absolute; left: 0; right: 0; height: 120px; top: -120px; pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(var(--x-accent-3-rgb), .07) 70%, rgba(var(--x-accent-3-rgb), .25) 99%, transparent);
    animation: lgScan 9s linear infinite; }
@keyframes lgScan { to { top: 100%; } }
.lg-brand > * { position: relative; z-index: 1; }

.lg-top { display: flex; align-items: center; gap: 12px; }
.lg-mark { width: 42px; height: 42px; 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: 15px; 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-live { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; font-size: 11.5px; font-weight: 700;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); color: var(--x-on-deep); }
.lg-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--x-bright); box-shadow: 0 0 0 0 rgba(var(--x-bright-rgb), .7); animation: lgPulse 1.8s infinite; }
@keyframes lgPulse { 70% { box-shadow: 0 0 0 8px rgba(var(--x-bright-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--x-bright-rgb), 0); } }

.lg-copy h1 { color: #fff; font-size: clamp(1.7rem, 2.2vw + 2vh, 3rem); line-height: 1.05; letter-spacing: -.025em; margin: 0 0 clamp(6px, 1.4vh, 12px); }
.lg-copy h1 em { font-style: normal; background: linear-gradient(90deg, var(--x-accent-3), var(--x-accent-3-hi)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg-copy p { color: var(--x-on-deep-2); font-size: clamp(13px, .4vw + 1vh, 15.5px); margin: 0; max-width: 34rem; }

/* ---- the live board ---- */
.lg-board { min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lg-col { min-height: 0; display: flex; flex-direction: column; padding: 10px; border-radius: 18px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .07); }
.lg-col h3 { display: flex; align-items: center; gap: 8px; margin: 2px 4px 10px; color: var(--x-on-deep); font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.lg-col h3 b { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px; text-align: center; background: rgba(255, 255, 255, .08); font-size: 11px; }
.lg-col .d { width: 8px; height: 8px; border-radius: 50%; }
.lg-col .d.a { background: var(--x-info); } .lg-col .d.p { background: var(--x-accent-3); } .lg-col .d.v { background: var(--x-bright); }
.lg-list { position: relative; min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.lg-ticket { flex: none; padding: 10px 11px; border-radius: 13px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .09);
    backdrop-filter: blur(6px); will-change: transform; }
.lg-ticket .r1 { display: flex; align-items: center; gap: 6px; }
.lg-ticket code { font: 600 11px "JetBrains Mono", monospace; color: var(--x-bright); }
.lg-ticket .sla { margin-left: auto; font: 700 10.5px "JetBrains Mono", monospace; padding: 2px 6px; border-radius: 6px; background: rgba(var(--x-info-rgb), .14); color: var(--x-info); }
.lg-ticket .sla.warn { background: rgba(var(--x-accent-3-rgb), .16); color: var(--x-accent-3-hi); }
.lg-ticket .sla.ok { background: rgba(var(--x-bright-rgb), .14); color: var(--x-bright); }
.lg-ticket b { display: block; margin: 5px 0 6px; color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-ticket .r3 { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--x-on-deep-2); }
.lg-ticket .av { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 8.5px; font-weight: 800; color: var(--x-deep-2); background: linear-gradient(135deg, var(--x-bright), var(--x-info)); }
.lg-ticket .bar { height: 3px; border-radius: 99px; background: rgba(255, 255, 255, .08); margin-top: 8px; overflow: hidden; }
.lg-ticket .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--x-accent-3), var(--x-accent-3-hi)); }
.lg-ticket.enter { animation: lgEnter .5s cubic-bezier(.2, .8, .2, 1); }
.lg-ticket.leave { animation: lgLeave .4s ease forwards; }
@keyframes lgEnter { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
@keyframes lgLeave { to { opacity: 0; transform: scale(.94); } }
.lg-ticket.glow { box-shadow: 0 0 0 1px rgba(var(--x-bright-rgb), .5), 0 0 22px -6px rgba(var(--x-bright-rgb), .7); }

.lg-stats { display: flex; gap: clamp(16px, 3vw, 40px); }
.lg-stats b { display: block; color: #fff; font-size: clamp(1.15rem, .8vw + 1vh, 1.5rem); font-weight: 800; font-variant-numeric: tabular-nums; }
.lg-stats span { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--x-on-deep-3); }

/* ---------------------------------------------------------------- sign-in side */
.lg-side { position: relative; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: clamp(16px, 4vh, 40px) 24px; background: var(--x-hero); }
.lg-side::before { content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(var(--x-accent-rgb), .05) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--x-accent-rgb), .05) 1px, transparent 1px);
    background-size: 36px 36px; -webkit-mask-image: radial-gradient(closest-side, #000, transparent); mask-image: radial-gradient(closest-side, #000, transparent); }
.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%; max-width: 410px; padding: clamp(20px, 3.6vh, 32px) 30px; border-radius: 26px;
    background: var(--x-solid); box-shadow: 0 30px 60px -30px rgba(var(--x-accent-rgb), .45), 0 0 0 1px var(--x-line); }
/* 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); } }
.lg-foot { position: relative; z-index: 1; margin: clamp(10px, 2vh, 18px) 0 0; font-size: 12px; color: var(--x-muted); text-align: center; }

@media (prefers-reduced-motion: reduce) { .lg-brand::after, .lg-live i { animation: none; } }

/* short screens: drop what is least needed, in order */
@media (max-height: 760px) { .lg-copy p { display: none; } }
@media (max-height: 640px) { .lg-stats { display: none; } .lg-brand { grid-template-rows: auto auto minmax(0, 1fr); } }

/* narrow screens: the brand becomes a slim header, the card fills the rest */
@media (max-width: 899.98px) {
    body { overflow: auto; }
    .lg { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: auto; min-height: 100dvh; }
    .lg-brand { grid-template-rows: auto auto; gap: 14px; padding: 18px 20px 22px; }
    .lg-board, .lg-stats, .lg-copy p, .lg-live { display: none; }
    .lg-copy h1 { font-size: 1.6rem; }
    .lg-side { position: static; justify-content: flex-start; padding: 22px 16px 28px; overflow: visible; }
    .lg-theme { top: 18px; right: 16px; color: var(--x-on-deep); }
    .lg-theme:hover { background: rgba(255, 255, 255, .08); color: #fff; }
    .lg-card { padding: 24px 20px; }
}
