/* Shared web sign-in and password recovery appearance. */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

    :root {
        --lg-void: #0b0d10;
        --lg-panel: #11141a;
        --lg-line: rgba(235, 240, 248, 0.09);
        --lg-line-strong: rgba(235, 240, 248, 0.16);
        --lg-text: #eef1f5;
        --lg-text-dim: rgba(238, 241, 245, 0.62);
        --lg-text-faint: rgba(238, 241, 245, 0.38);
        --lg-blue: #1080e8;
        --lg-blue-bright: #4da3ff;
        --lg-sans: 'Space Grotesk', -apple-system, sans-serif;
        --lg-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;
    }

    html { background: var(--lg-void); }

    body {
        background: var(--lg-void);
        font-family: var(--lg-sans);
        -webkit-font-smoothing: antialiased;
    }

    ::selection { background: var(--lg-blue); color: #fff; }

    .login-canvas {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: clamp(2rem, 5vw, 5rem) clamp(1.25rem, 4vw, 3rem);
        position: relative;
        overflow: hidden;
        color: var(--lg-text);
    }

    .login-smoke {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
    }

    /* blueprint grid + blue bloom, matching the landing hero */
    .login-canvas::before {
        z-index: 1;
        content: "";
        position: absolute;
        inset: 0;
        background-image:
            radial-gradient(ellipse 60% 50% at 50% 0%, rgba(16, 128, 232, 0.14), transparent 68%),
            linear-gradient(var(--lg-line) 1px, transparent 1px),
            linear-gradient(90deg, var(--lg-line) 1px, transparent 1px);
        background-size: auto, 72px 72px, 72px 72px;
        -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 90%);
        mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 90%);
        pointer-events: none;
    }

    @media (prefers-reduced-motion: no-preference) {
        .login-canvas::before {
            animation: lg-grid-drift 90s linear infinite;
        }
    }

    @keyframes lg-grid-drift {
        from { background-position: 0 0, 0 0, 0 0; }
        to   { background-position: 0 0, 72px 72px, 72px 72px; }
    }

    .login-frame {
        position: relative;
        width: 100%;
        max-width: 960px;
        display: grid;
        grid-template-columns: 1fr 420px;
        gap: clamp(2.5rem, 5vw, 5rem);
        align-items: center;
        z-index: 1;
    }

    .login-copy { display: grid; gap: 1.4rem; justify-items: start; }

    .login-brand {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        color: var(--lg-text);
        text-decoration: none;
        margin-bottom: 0.6rem;
    }

    .login-brand img { width: 28px; height: 28px; object-fit: contain; }

    .login-brand span { font-weight: 600; font-size: 1.05rem; }

    .login-tag {
        display: inline-flex;
        align-items: center;
        gap: 0.7rem;
        font-family: var(--lg-mono);
        font-size: 0.7rem;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        color: var(--lg-text-faint);
    }

    .login-tag::before {
        content: "";
        width: 22px;
        height: 1px;
        background: var(--lg-blue-bright);
    }

    .login-title {
        margin: 0;
        font-size: clamp(2.1rem, 4.5vw, 3.1rem);
        font-weight: 600;
        line-height: 1.06;
        letter-spacing: -0.025em;
    }

    .login-title .hl { color: var(--lg-blue-bright); }

    .login-subtitle {
        margin: 0;
        max-width: 38ch;
        font-size: 1rem;
        line-height: 1.65;
        color: var(--lg-text-dim);
    }

    .back-link {
        display: inline-flex;
        align-items: baseline;
        gap: 0.5rem;
        margin-top: 0.6rem;
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--lg-blue-bright);
        text-decoration: none;
    }

    .back-link .arr { transition: transform 0.25s ease; display: inline-block; }

    .back-link:hover .arr { transform: translateX(-4px); }

    .login-card {
        position: relative;
        background: var(--lg-panel);
        border: 1px solid var(--lg-line-strong);
        border-radius: 14px;
        padding: clamp(1.8rem, 3vw, 2.4rem);
        box-shadow:
            0 0 0 1px rgba(0, 0, 0, 0.4),
            0 60px 120px -40px rgba(0, 0, 0, 0.8),
            0 0 90px -30px rgba(16, 128, 232, 0.35);
    }

    .card-tag {
        font-family: var(--lg-mono);
        font-size: 0.64rem;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: var(--lg-text-faint);
        margin: 0 0 1.6rem;
        display: flex;
        align-items: center;
        gap: 0.55rem;
    }

    .card-tag::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--lg-blue-bright);
        box-shadow: 0 0 8px rgba(16, 128, 232, 0.5);
    }

    .form-group { margin-bottom: 1.15rem; }

    .form-label {
        display: block;
        font-family: var(--lg-mono);
        font-size: 0.64rem;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--lg-text-faint);
        margin-bottom: 0.5rem;
    }

    .form-input {
        width: 100%;
        padding: 0.88rem 1.05rem;
        border-radius: 8px;
        border: 1px solid var(--lg-line-strong);
        background: rgba(255, 255, 255, 0.02);
        font-family: var(--lg-sans);
        font-size: 16px;
        color: var(--lg-text);
        box-sizing: border-box;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .form-input:focus {
        outline: none;
        border-color: var(--lg-blue);
        box-shadow: 0 0 0 3px rgba(16, 128, 232, 0.18);
    }

    .form-input::placeholder { color: var(--lg-text-faint); }

    .form-checkbox {
        position: relative;
        display: flex;
        align-items: center;
        gap: 0.6rem;
        width: fit-content;
        max-width: 100%;
        font-size: 0.88rem;
        color: var(--lg-text-dim);
        margin: 1.2rem 0 1.4rem;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    /* 44px-tall tap target around the box and its words, without moving anything. */
    .form-checkbox::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        height: 44px;
        transform: translateY(-50%);
    }

    .form-checkbox input {
        flex: none;
        width: 16px;
        height: 16px;
        margin: 3px 0;  /* no side margin: the box lines up with the fields' left edge */
        cursor: pointer;
        accent-color: var(--lg-blue);
    }

    .form-error {
        margin: 0.45rem 0 0;
        font-size: 0.84rem;
        color: #ff7d7d;
    }

    .submit-btn {
        width: 100%;
        border: none;
        border-radius: 8px;
        padding: 0.92rem 2rem;
        font-size: 0.96rem;
        font-weight: 600;
        font-family: var(--lg-sans);
        letter-spacing: 0.01em;
        background: var(--lg-blue);
        color: #fff;
        cursor: pointer;
        transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.25s ease;
    }

    .submit-btn:hover {
        background: #1a8cf5;
        transform: translateY(-1px);
        box-shadow: 0 8px 30px -6px rgba(16, 128, 232, 0.45);
    }

    .login-footer {
        margin-top: 1.4rem;
        text-align: center;
        font-size: 0.9rem;
        color: var(--lg-text-dim);
    }

    .login-footer a {
        color: var(--lg-blue-bright);
        font-weight: 600;
        text-decoration: none;
    }

    .login-footer a:hover { color: #7cbcff; }

    .demo-notice {
        margin-top: 1.5rem;
        padding: 0.95rem 1.1rem;
        background: rgba(16, 128, 232, 0.07);
        border: 1px solid rgba(77, 163, 255, 0.25);
        border-radius: 8px;
        font-size: 0.86rem;
        color: var(--lg-text-dim);
        line-height: 1.55;
    }

    .demo-notice strong { color: var(--lg-text); font-weight: 600; }

    .demo-notice a {
        color: var(--lg-blue-bright);
        font-weight: 600;
        text-decoration: none;
    }

    .demo-notice a:hover { color: #7cbcff; }

    .sso-divider {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        margin: 1.3rem 0 1rem;
        font-family: var(--lg-mono);
        font-size: 0.64rem;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--lg-text-faint);
    }

    .sso-divider::before,
    .sso-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--lg-line-strong);
    }

    .sso-buttons { display: grid; gap: 0.6rem; }

    .sso-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.65rem;
        padding: 0.82rem 1rem;
        border-radius: 8px;
        border: 1px solid var(--lg-line-strong);
        background: rgba(255, 255, 255, 0.03);
        color: var(--lg-text);
        font-family: var(--lg-sans);
        font-size: 0.94rem;
        font-weight: 600;
        text-decoration: none;
        transition: border-color 0.2s ease, background 0.2s ease;
    }

    .sso-btn:hover {
        border-color: rgba(235, 240, 248, 0.3);
        background: rgba(255, 255, 255, 0.06);
    }

    .sso-btn svg { width: 18px; height: 18px; flex: none; }

    .sso-note {
        margin: 0.65rem 0 0;
        text-align: center;
        font-size: 0.8rem;
        color: var(--lg-text-faint);
    }

    @media (max-width: 900px) {
        .login-frame {
            grid-template-columns: 1fr;
            max-width: 440px;
            gap: 2.25rem;
        }

        .login-copy { justify-items: center; text-align: center; }

        .login-subtitle { display: none; }
    }

    @media (max-width: 480px) {
        .login-card { padding: 1.5rem 1.25rem; }
    }

/* Recovery uses sign-in's palette and layout, with persistent form guidance. */
.auth-recovery { min-height: 100svh; box-sizing: border-box; }
.auth-recovery .login-frame > * { min-width: 0; }
.auth-recovery .login-tag,
.auth-recovery .form-label { color: var(--lg-text-dim); }
.auth-recovery .form-label { font-size: 0.7rem; letter-spacing: 0.1em; }
.auth-recovery .login-card { min-width: 0; }
.recovery-heading { margin: 0 0 0.65rem; color: var(--lg-text); font-size: 1.25rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.02em; }
.recovery-description { margin: 0 0 1.6rem; color: var(--lg-text-dim); font-size: 0.94rem; line-height: 1.65; }
.auth-recovery .form-input { min-height: 48px; }
.auth-recovery .form-input[aria-invalid="true"] { border-color: #ff7d7d; }
.auth-recovery .submit-btn { min-height: 48px; background: #0968bf; }
.auth-recovery .submit-btn:hover { background: #0874d5; }
.auth-recovery a:focus-visible,
.auth-recovery button:focus-visible,
.auth-recovery .submit-btn:focus-visible { outline: 2px solid var(--lg-blue-bright); outline-offset: 4px; }
.auth-recovery .back-link { min-height: 44px; align-items: center; }
.recovery-footnote { margin: 1.2rem 0 0; color: var(--lg-text-dim); font-size: 0.82rem; line-height: 1.6; text-align: center; }
.recovery-password { position: relative; }
.recovery-password .form-input { padding-right: 4.5rem; }
.auth-recovery .password-toggle { position: absolute; right: 3px; top: 3px; min-width: 60px; min-height: 44px; padding: 0 0.65rem; border: 0; border-radius: 6px; background: transparent; color: var(--lg-blue-bright); font: 500 0.85rem var(--lg-sans); cursor: pointer; }
.auth-recovery .password-toggle:hover { background: rgba(77, 163, 255, 0.1); }
.auth-recovery .password-toggle[hidden] { display: none; }
.auth-recovery .form-hint { margin: 0.5rem 0 0; color: var(--lg-text-dim); font-size: 0.84rem; line-height: 1.5; }
.auth-recovery .form-hint:empty { display: none; }
.recovery-notice { margin: 0 0 1.5rem; padding: 0.85rem 1rem; border: 1px solid rgba(77, 163, 255, 0.4); border-radius: 8px; background: rgba(16, 128, 232, 0.08); color: var(--lg-text); font-size: 0.9rem; line-height: 1.6; }
.recovery-notice--error { border-color: rgba(255, 125, 125, 0.5); background: rgba(255, 125, 125, 0.06); }
.recovery-form-error { margin-bottom: 1.2rem; }
@media (max-width: 900px) {
    .auth-recovery { padding: 2rem 1.25rem; }
    .auth-recovery .login-frame { gap: 1.5rem; }
    .auth-recovery .login-copy { gap: 0.9rem; }
    .auth-recovery .login-title { font-size: clamp(1.9rem, 7vw, 2.5rem); line-height: 1.12; }
    .auth-recovery .login-brand { margin-bottom: 0.25rem; }
    .auth-recovery .back-link { margin-top: 0; }
}
@media (max-height: 700px) and (max-width: 900px) {
    .auth-recovery { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-recovery *, .auth-recovery *::before { animation: none; transition: none; }
}
