/* Sim-Fusion login — enhanced two-column layout:
   ─ Left: hero image, multiply overlay, subtle grid texture,
           brand + eyebrow + title + tagline + 3 feature rows + footer.
   ─ Right: decorative gradient blob, language toggle, eyebrow + heading,
           clean Google button, trust row, fine print. */

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: #f8fafc;
    color: #0f172a;
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.sf-login {
    display: grid;
    /* Hero takes ~58%, sign-in ~42% — keeps the sign-in column tight (~max 520px)
       while the image gets the visual weight. The 380px min lets the panel stay
       readable at 125 % browser zoom without triggering horizontal scroll. */
    grid-template-columns: minmax(0, 1.4fr) minmax(380px, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

/* ─── Left: hero ─────────────────────────────────────────────────── */
.sf-login__hero {
    position: relative;
    overflow: hidden;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    padding: clamp(2rem, 4vw, 3.75rem);
    min-height: 100vh;
    min-height: 100dvh;
    min-width: 0;
}

.sf-login__hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    z-index: 0;
}

.sf-login__hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(30, 58, 138, 0.85) 0%,
        rgba(19, 78, 74, 0.72) 50%,
        rgba(15, 23, 42, 0.92) 100%
    );
    mix-blend-mode: multiply;
    pointer-events: none;
}

/* Subtle grid texture layer over the photo */
.sf-login__hero-grid {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-image:
        linear-gradient(rgba(165, 243, 252, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(165, 243, 252, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    opacity: 0.5;
}

.sf-login__hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    gap: 2rem;
}

.sf-login__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sf-login__logo {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #22d3ee 0%, #2563eb 100%);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 20px rgba(34, 211, 238, 0.35);
    flex-shrink: 0;
}

.sf-login__logo--sm {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    box-shadow: 0 4px 12px rgba(34, 211, 238, 0.25);
}

.sf-login__brand-name {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    color: #eafbff;
}

/* Eyebrow label (uppercase pill) */
.sf-login__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3125rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 999px;
    background: rgba(165, 243, 252, 0.12);
    /* WCAG AA: cyan-100 on the dark overlay composite (~7:1). */
    color: #cffafe;
    border: 1px solid rgba(165, 243, 252, 0.28);
    margin-bottom: 1rem;
    backdrop-filter: blur(4px);
    max-width: 100%;
    overflow-wrap: anywhere;
}

.sf-login__eyebrow--panel {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.18);
    backdrop-filter: none;
}

.sf-login__hero-copy {
    /* Center the whole copy+features block horizontally within the hero column
       so it doesn't hug the left edge on wide screens. */
    align-self: center;
    width: 100%;
    max-width: 34rem;
    margin: auto 0;
}

.sf-login__hero-title {
    font-size: clamp(1.625rem, 3.2vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin: 0 0 1rem;
    background: linear-gradient(90deg, #99f6e4 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));
    overflow-wrap: anywhere;
}

/* Windows High Contrast / forced-colors: background-clip:text is not honored
   and color:transparent would erase the title. Restore a solid color. */
@media (forced-colors: active) {
    .sf-login__hero-title {
        background: none;
        -webkit-text-fill-color: CanvasText;
        color: CanvasText;
        filter: none;
    }
    .sf-login__logo,
    .sf-login__logo--sm {
        background: ButtonFace;
        color: ButtonText;
        border: 1px solid ButtonText;
        box-shadow: none;
    }
    .sf-login__eyebrow,
    .sf-login__eyebrow--panel,
    .sf-login__trust-item,
    .sf-login__features li,
    .sf-login__lang,
    .sf-login__google-btn {
        border-color: CanvasText;
    }
    .sf-login__google-btn:focus-visible,
    .sf-login__lang-btn:focus-visible {
        outline-color: Highlight;
    }
}

.sf-login__hero-tagline {
    font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
    line-height: 1.55;
    color: rgba(226, 232, 240, 0.85);
    margin: 0 0 2rem;
    font-weight: 300;
    max-width: 28rem;
    /* Balance line lengths so we don't get "in" orphaned at the end of line 1
       with "simulation." alone on line 2. */
    text-wrap: balance;
}

.sf-login__hero-title,
.sf-login__heading {
    text-wrap: balance;
}

/* Feature list on the hero */
.sf-login__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.sf-login__features li {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.75rem 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(165, 243, 252, 0.12);
    border-radius: 0.625rem;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    /* Staggered fade-up on page load */
    opacity: 0;
    transform: translateY(14px);
    animation: sf-login-fadeup 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.sf-login__features li:nth-child(1) { animation-delay: 0.45s; }
.sf-login__features li:nth-child(2) { animation-delay: 0.60s; }
.sf-login__features li:nth-child(3) { animation-delay: 0.75s; }

.sf-login__features li:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(165, 243, 252, 0.30);
    box-shadow: 0 6px 20px rgba(34, 211, 238, 0.12);
}

/* Fade-up sequence for the copy above the cards too, so the whole hero feels
   like it animates in rather than the cards popping in isolation. */
.sf-login__eyebrow,
.sf-login__hero-title,
.sf-login__hero-tagline {
    opacity: 0;
    transform: translateY(10px);
    animation: sf-login-fadeup 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.sf-login__eyebrow        { animation-delay: 0.05s; }
.sf-login__hero-title     { animation-delay: 0.15s; }
.sf-login__hero-tagline   { animation-delay: 0.30s; }

@keyframes sf-login-fadeup {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .sf-login__features li,
    .sf-login__eyebrow,
    .sf-login__hero-title,
    .sf-login__hero-tagline {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.sf-login__features i {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.25), rgba(37, 99, 235, 0.25));
    color: #a5f3fc;
    display: grid;
    place-items: center;
    font-size: 0.9375rem;
    border: 1px solid rgba(165, 243, 252, 0.2);
}

.sf-login__features div {
    display: flex;
    flex-direction: column;
    gap: 0.0625rem;
    min-width: 0;
}

.sf-login__features strong {
    font-size: 0.875rem;
    font-weight: 600;
    color: #eafbff;
    line-height: 1.3;
}

.sf-login__features span {
    font-size: 0.8125rem;
    font-weight: 400;
    /* WCAG AA: ~5.4:1 on the photo/overlay composite (was 0.68 / ~3.8:1). */
    color: rgba(241, 245, 249, 0.88);
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.sf-login__features strong {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.sf-login__hero-footer {
    font-size: 0.75rem;
    /* WCAG AA: lifted from 0.55 (≈2.9:1) to 0.85 for reliable contrast on the
       dark-gradient overlay. */
    color: rgba(226, 232, 240, 0.85);
    letter-spacing: 0.02em;
    margin-top: 1.5rem;
    text-wrap: balance;
}

/* ─── Right: sign-in panel ──────────────────────────────────────── */
.sf-login__panel {
    position: relative;
    display: flex;
    /* "safe center": if the card is taller than the panel (long translations,
       alerts, short viewports), fall back to flex-start so the top of the card
       is never clipped above the scroll area. */
    align-items: safe center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 4rem);
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    overflow: hidden;
    min-width: 0;
}

/* Decorative gradient blob in the top-right of the sign-in panel */
.sf-login__panel-glow {
    position: absolute;
    top: -12rem;
    right: -12rem;
    width: 28rem;
    height: 28rem;
    pointer-events: none;
    background: radial-gradient(
        circle at center,
        rgba(34, 211, 238, 0.18) 0%,
        rgba(37, 99, 235, 0.10) 40%,
        transparent 70%
    );
    filter: blur(20px);
    z-index: 0;
}

.sf-login__panel-content {
    position: relative;
    width: 100%;
    max-width: 26rem;
    min-width: 0;
    z-index: 1;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1rem;
    padding: clamp(1.5rem, 2.5vw, 2.5rem);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 24px rgba(15, 23, 42, 0.06),
        0 20px 48px rgba(15, 23, 42, 0.04);
}

.sf-login__panel-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    color: #0f172a;
}

.sf-login__panel-brand .sf-login__brand-name {
    color: #0f172a;
    font-size: 1rem;
}

.sf-login__heading {
    font-size: clamp(1.5rem, 2.4vw, 2.125rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin: 0 0 0.625rem;
    color: #0f172a;
    overflow-wrap: anywhere;
}

.sf-login__subheading {
    font-size: 0.9375rem;
    /* WCAG AA: #475569 on white = 7.6:1 (was 5.1:1 — lifted for readability). */
    color: #475569;
    line-height: 1.55;
    margin: 0 0 1.75rem;
    max-width: 22rem;
    overflow-wrap: anywhere;
}

.sf-login__alert {
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
}

/* Entrance animation for the right panel — staggered, matching the hero */
.sf-login__panel-brand,
.sf-login__eyebrow--panel,
.sf-login__heading,
.sf-login__subheading,
.sf-login__google-btn,
.sf-login__trust,
.sf-login__fineprint {
    opacity: 0;
    transform: translateY(10px);
    animation: sf-login-fadeup 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.sf-login__panel-brand      { animation-delay: 0.10s; }
.sf-login__eyebrow--panel   { animation-delay: 0.20s; }
.sf-login__heading          { animation-delay: 0.30s; }
.sf-login__subheading       { animation-delay: 0.40s; }
.sf-login__google-btn       { animation-delay: 0.55s; }
.sf-login__trust            { animation-delay: 0.70s; }
.sf-login__fineprint        { animation-delay: 0.85s; }

@media (prefers-reduced-motion: reduce) {
    .sf-login__panel-brand,
    .sf-login__eyebrow--panel,
    .sf-login__heading,
    .sf-login__subheading,
    .sf-login__google-btn,
    .sf-login__trust,
    .sf-login__fineprint {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Google button — Google Identity Services styling */
.sf-login__google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 2.75rem; /* 44px — WCAG 2.5.5 target size */
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
    background: #ffffff;
    /* WCAG 1.4.11 Non-text Contrast — border needs ≥ 3:1 against the panel. */
    border: 1px solid #6b7280;
    border-radius: 0.625rem;
    text-decoration: none;
    text-align: center;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 2px 6px rgba(15, 23, 42, 0.04),
        0 0 0 0 rgba(37, 99, 235, 0);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease, transform 0.08s ease;
    position: relative;
    overflow-wrap: anywhere;
}

.sf-login__google-btn > span {
    min-width: 0;
}

.sf-login__google-btn:hover,
.sf-login__google-btn:focus-visible {
    background: #f9fafb;
    border-color: #4b5563;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.06),
        0 0 0 4px rgba(37, 99, 235, 0.08);
    color: #111827;
}

.sf-login__google-btn:active { transform: translateY(1px); }
.sf-login__google-btn:focus-visible {
    /* WCAG 2.4.7: 3-px visible focus ring at 3:1 against the white panel. */
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

.sf-login__google-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/* Trust row under the Google button — pill badges */
.sf-login__trust {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
    font-size: 0.75rem;
    /* WCAG AA: #334155 on #f1f5f9 = ~9.7:1. */
    color: #334155;
}

.sf-login__trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3125rem 0.6875rem;
    font-weight: 500;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.sf-login__trust-item i {
    /* darkened for 3:1+ non-text contrast (was #16a34a ≈ 3.1:1 on #f1f5f9). */
    color: #15803d;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.sf-login__trust-divider {
    display: none;
}

.sf-login__fineprint {
    margin: 1.5rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.75rem;
    /* WCAG AA: #94a3b8 on white is 3.5:1 (fails). #64748b is 5.1:1. */
    color: #64748b;
    text-align: center;
    line-height: 1.5;
    text-wrap: balance;
}

/* ─── Language switcher (top-right of right panel) ───────────────── */
.sf-login__lang {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: inline-flex;
    padding: 0.25rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    z-index: 5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.sf-login__lang-btn {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0.375rem 0.875rem;
    min-width: 2.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    /* WCAG AA: #64748b on #f1f5f9 is 4.6:1. */
    color: #475569;
    border-radius: 999px;
    cursor: pointer;
    letter-spacing: 0.06em;
    transition: background 0.12s ease, color 0.12s ease, box-shadow 0.15s ease;
}

.sf-login__lang-btn:hover { color: #0f172a; }

.sf-login__lang-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    color: #0f172a;
}

.sf-login__lang-btn.is-active,
.sf-login__lang-btn[aria-pressed="true"] {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ─── Stacked layout on small screens ──────────────────────────── */
@media (max-width: 960px) {
    .sf-login {
        grid-template-columns: 1fr;
        /* Let stacked content flow naturally — don't force a 100dvh grid,
           which would add empty space (or force scroll) below a short card. */
        min-height: auto;
    }
    .sf-login__hero {
        min-height: auto;
        padding: 1.75rem 1.5rem 2rem;
    }
    .sf-login__hero-content {
        min-height: auto;
        flex: 0 1 auto;
        justify-content: flex-start;
        gap: 1rem;
    }
    .sf-login__hero-copy {
        margin: 0.5rem 0 0;
        max-width: 100%;
        align-self: flex-start;
    }
    .sf-login__hero-tagline { margin-bottom: 0; }
    .sf-login__features { display: none; }
    .sf-login__hero-footer { margin-top: 0.75rem; }
    .sf-login__panel-glow { display: none; }
    .sf-login__panel {
        align-items: flex-start;
        min-height: auto;
        /* Leave room at the top for the absolutely-positioned language toggle. */
        padding: clamp(3.25rem, 8vw, 4.5rem) clamp(1rem, 4vw, 2rem) clamp(1.5rem, 4vw, 2.5rem);
    }
}

@media (max-width: 640px) {
    .sf-login__panel {
        padding: 3.5rem 1rem 2rem;
    }
    .sf-login__panel-content {
        padding: 1.5rem 1.25rem;
        border-radius: 0.875rem;
    }
    .sf-login__heading { font-size: 1.5rem; }
    .sf-login__subheading { font-size: 0.9rem; }
    .sf-login__panel-brand { margin-bottom: 1.25rem; }
}

@media (max-width: 480px) {
    .sf-login__lang {
        top: 0.75rem;
        right: 0.75rem;
    }
}

/* ─────────────────────────────────────────────────────────────────────
   PWA login — single-column, Netflix-style mobile sign-in.

   Activates only when the installed PWA is launched on a phone-sized
   viewport (body[data-pwa="true"] is set by pwa-register.js when
   display-mode: standalone matches). Browser tabs — including mobile
   browser tabs — keep the full two-pane hero layout.

   The hero panel, long feature list, and fineprint are hidden; what's
   left is brand + heading + Google button + three compact info chips.
   Background is a dark gradient matching the splash so the handoff from
   launch animation → sign-in feels continuous.
   ────────────────────────────────────────────────────────────────── */

/* Compact chips: off by default; un-hidden in the PWA block below. */
.sf-login__chips { display: none; }

@media (max-width: 768px) {
    body[data-pwa="true"] html,
    body[data-pwa="true"] {
        background: #06091a;
    }

    body[data-pwa="true"] .sf-login {
        grid-template-columns: 1fr;
        min-height: 100vh;
        min-height: 100dvh;
        background:
            radial-gradient(ellipse at 50% 30%, rgba(37, 99, 235, 0.20) 0%, transparent 60%),
            radial-gradient(ellipse at 50% 75%, rgba(124, 58, 237, 0.16) 0%, transparent 60%),
            linear-gradient(180deg, #0b1028 0%, #06091a 100%);
        color: #fff;
    }

    body[data-pwa="true"] .sf-login__hero { display: none; }

    body[data-pwa="true"] .sf-login__panel {
        background: transparent;
        padding:
            calc(3.5rem + env(safe-area-inset-top, 0))
            1.5rem
            calc(1.75rem + env(safe-area-inset-bottom, 0));
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-height: 100vh;
        min-height: 100dvh;
        color: #fff;
        position: relative;
        overflow: hidden;
    }

    body[data-pwa="true"] .sf-login__panel-glow { display: none; }

    /* Language pill — floats top-right over the dark bg. */
    body[data-pwa="true"] .sf-login__lang {
        position: absolute;
        top: calc(1rem + env(safe-area-inset-top, 0));
        right: 1rem;
        left: auto;
        bottom: auto;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 999px;
        padding: 3px;
        display: inline-flex;
        gap: 0;
        z-index: 5;
    }
    body[data-pwa="true"] .sf-login__lang-btn {
        background: transparent;
        border: 0;
        color: rgba(255, 255, 255, 0.7);
        padding: 5px 12px;
        font-size: 12px;
        font-weight: 600;
        border-radius: 999px;
        letter-spacing: 0.06em;
    }
    body[data-pwa="true"] .sf-login__lang-btn.is-active {
        background: #ffffff;
        color: #06091a;
    }

    body[data-pwa="true"] .sf-login__panel-content {
        padding: 0;
        max-width: 100%;
        width: 100%;
        margin: auto 0;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        /* Main's login polish wraps the panel in a white card — strip
           that out in PWA mode so white text stays visible on the dark
           gradient. */
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    /* Brand: big centered white badge + wordmark. */
    body[data-pwa="true"] .sf-login__panel-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.85rem;
        margin-bottom: 0.5rem;
        /* Main's base rule sets color:#0f172a (dark) — needs to be white
           on the PWA dark bg. */
        color: #fff;
    }
    body[data-pwa="true"] .sf-login__panel-brand .sf-login__logo,
    body[data-pwa="true"] .sf-login__panel-brand .sf-login__logo--sm {
        width: 76px;
        height: 76px;
        border-radius: 20px;
        display: grid;
        place-items: center;
        font-size: 2rem;
        font-weight: 800;
        letter-spacing: -0.04em;
        color: #1e3a8a;
        background: linear-gradient(135deg, #ffffff 0%, #eef2ff 100%);
        box-shadow:
            0 20px 40px -12px rgba(0, 0, 0, 0.55),
            0 8px 16px -4px rgba(37, 99, 235, 0.35);
    }
    body[data-pwa="true"] .sf-login__panel-brand .sf-login__brand-name {
        font-size: 1.6rem;
        font-weight: 700;
        /* Main's rule forces #0f172a on this element via .sf-login__panel-brand
           .sf-login__brand-name; re-override to white for the dark bg. */
        color: #fff !important;
        letter-spacing: -0.02em;
    }

    /* Copy */
    body[data-pwa="true"] .sf-login__eyebrow--panel {
        display: block;
        text-align: center;
        color: rgba(167, 139, 250, 0.95);
        font-weight: 600;
        font-size: 12px;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        /* Main's .sf-login__eyebrow gives this a light-blue pill bg + border;
           drop that in PWA mode so it reads as a simple caption on the
           dark bg. */
        background: transparent;
        border: 0;
        padding: 0;
        margin-bottom: 0;
        backdrop-filter: none;
    }
    body[data-pwa="true"] .sf-login__heading {
        text-align: center;
        color: #fff;
        font-size: 1.75rem;
        font-weight: 700;
        letter-spacing: -0.02em;
        margin: 0.25rem 0 0.5rem;
    }
    body[data-pwa="true"] .sf-login__subheading {
        text-align: center;
        color: rgba(255, 255, 255, 0.68);
        font-size: 0.9375rem;
        line-height: 1.5;
        margin: 0 0 0.5rem;
        max-width: 30ch;
        margin-left: auto;
        margin-right: auto;
    }

    /* Google button — full-width, weighty, clean. */
    body[data-pwa="true"] .sf-login__google-btn {
        width: 100%;
        padding: 0.95rem 1rem;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 0.65rem;
        background: #ffffff;
        color: #1f2937;
        border: 0;
        box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.6);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.625rem;
        transition: transform 120ms ease, background-color 120ms ease;
    }
    body[data-pwa="true"] .sf-login__google-btn:hover,
    body[data-pwa="true"] .sf-login__google-btn:focus {
        background: #f3f4f6;
        color: #1f2937;
    }
    body[data-pwa="true"] .sf-login__google-btn:active { transform: scale(0.98); }

    /* Feature chips — small, centred, three-up. */
    body[data-pwa="true"] .sf-login__chips {
        display: flex;
        justify-content: space-between;
        gap: 0.5rem;
        list-style: none;
        margin: 1rem 0 0;
        padding: 0;
    }
    body[data-pwa="true"] .sf-login__chips li {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        font-size: 11px;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.75);
        text-align: center;
        line-height: 1.3;
    }
    body[data-pwa="true"] .sf-login__chips i {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.07);
        border: 1px solid rgba(255, 255, 255, 0.12);
        display: grid;
        place-items: center;
        font-size: 1.1rem;
        color: #a78bfa;
    }

    /* Trust strip — muted on dark; fineprint hidden (subheading covers it).
       Main turned each item into a light pill; invert for dark bg. */
    body[data-pwa="true"] .sf-login__trust {
        color: rgba(255, 255, 255, 0.70);
        font-size: 12px;
        justify-content: center;
        margin-top: 0.25rem;
    }
    body[data-pwa="true"] .sf-login__trust-item {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.14);
        color: rgba(255, 255, 255, 0.80);
    }
    body[data-pwa="true"] .sf-login__trust-item i {
        color: rgba(167, 139, 250, 0.95);
    }
    body[data-pwa="true"] .sf-login__trust-divider { background: rgba(255, 255, 255, 0.22); }
    body[data-pwa="true"] .sf-login__fineprint { display: none; }

    /* Alerts read against dark. */
    body[data-pwa="true"] .sf-login__alert {
        background: rgba(220, 38, 38, 0.18);
        border: 1px solid rgba(220, 38, 38, 0.35);
        color: #fecaca;
    }
    body[data-pwa="true"] .alert-warning.sf-login__alert {
        background: rgba(234, 179, 8, 0.15);
        border-color: rgba(234, 179, 8, 0.35);
        color: #fde68a;
    }
}

@media (max-width: 360px) {
    .sf-login__hero { padding: 1.5rem 1rem 2rem; }
    .sf-login__panel { padding: 3rem 0.75rem 1.5rem; }
    .sf-login__panel-content { padding: 1.25rem 1rem; }
    .sf-login__google-btn {
        padding: 0.75rem 0.75rem;
        font-size: 0.875rem;
        gap: 0.5rem;
    }
    .sf-login__trust { font-size: 0.6875rem; }
    .sf-login__lang-btn { padding: 0.375rem 0.625rem; min-width: 2.25rem; }
}

/* Short viewports (landscape phones, zoomed laptops): don't force 100vh so the
   page can scroll naturally and the card stays reachable. */
@media (max-height: 640px) {
    html, body, .sf-login, .sf-login__hero { min-height: 0; }
    .sf-login { min-height: auto; }
    .sf-login__hero-content { gap: 1.25rem; }
}

@media (prefers-contrast: more) {
    .sf-login__subheading { color: #1f2937; }
    .sf-login__fineprint  { color: #334155; border-top-color: #cbd5e1; }
    .sf-login__trust      { color: #111827; }
    .sf-login__google-btn { border-color: #111827; }
    .sf-login__lang-btn   { color: #0f172a; }
}
