/* Rider sign-in / join: looks and feels like a native phone app screen. Form controls come from auth.css. */
html, body { height: 100%; }
body { background: #000; overscroll-behavior: none; }
.app-screen { position: relative; max-width: 440px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; background: #070707; overflow: hidden; }
@media (min-width: 520px) {
    body { background: radial-gradient(ellipse at 50% 0%, #1d0204, #000 70%); }
    .app-screen { min-height: 0; margin: 28px auto; border-radius: 34px; border: 1px solid #222; box-shadow: 0 30px 90px rgba(0, 0, 0, .8); }
}

.app-hero { position: relative; isolation: isolate; padding: calc(30px + env(safe-area-inset-top)) 24px 54px; text-align: center; }
.app-hero::before { content: ''; position: absolute; z-index: -2; inset: 0; background: radial-gradient(circle at 50% 38%, rgba(227, 18, 27, .55), transparent 58%), radial-gradient(ellipse at 50% 0%, #2a0306, #070707 75%); }
.app-hero svg.hills { position: absolute; z-index: -1; left: 0; right: 0; bottom: 18px; width: 100%; height: 90px; }
.app-hero .back { position: absolute; left: 16px; top: calc(16px + env(safe-area-inset-top)); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .07); color: #ddd; text-decoration: none; font-size: 18px; }
.app-hero img { width: 124px; height: 124px; border-radius: 50%; margin: 6px auto 14px; display: block; box-shadow: 0 16px 40px rgba(0, 0, 0, .7), 0 0 0 6px rgba(255, 255, 255, .04); }
.app-hero.small img { width: 84px; height: 84px; margin-bottom: 8px; }
.app-hero h1 { font: 400 34px var(--brush); margin: 0; line-height: 1; }
.app-hero h1 span { color: var(--red); }
.app-hero .sub { font: 600 11px var(--head); letter-spacing: 5px; color: #bdbdbd; margin-top: 6px; }

.sheet { position: relative; z-index: 2; flex: 1; margin-top: -26px; background: #111; border-radius: 28px 28px 0 0; padding: 14px 22px calc(28px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(0, 0, 0, .55); }
@media (min-width: 520px) { .sheet { border-radius: 28px 28px 34px 34px; } }
.sheet .grab { width: 44px; height: 5px; border-radius: 5px; background: #333; margin: 0 auto 18px; }
.sheet h2 { font: 600 26px var(--head); margin: 0 0 4px; }
.sheet .lead { color: var(--muted); margin: 0 0 22px; font-size: 14.5px; }
.sheet .tabs2 { border-radius: 14px; background: #0a0a0a; margin-bottom: 22px; }
.sheet .tabs2 a { border-radius: 11px; padding: 11px; }
.sheet .in input, .sheet .in select { height: 54px; border-radius: 14px; font-size: 16px; background: #0b0b0b; }
.sheet .submit { height: 56px; border-radius: 16px; font-size: 16px; }
.sheet .blood span { padding: 12px 0; border-radius: 12px; background: #0b0b0b; }
.sheet .alert { border-radius: 14px; }
.sheet .alt { margin-top: 20px; }
.sheet .foot { display: flex; justify-content: center; gap: 18px; margin-top: 22px; font-size: 12.5px; }
.sheet .foot a { color: #777; text-decoration: none; }
.sheet .foot a:hover { color: #ccc; }
.install-tip { display: none; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: #0b0b0b; border: 1px dashed #333; font-size: 13px; color: #bbb; }
.install-tip.on { display: flex; }
.install-tip button { margin-left: auto; background: var(--red); color: #fff; border: 0; border-radius: 10px; padding: 8px 12px; font: 700 12.5px var(--body); cursor: pointer; }

/* Sign-in fits one phone screen without scrolling; shorter phones get a smaller header. */
@media (max-width: 519px) {
    .app-screen:has(.screen-fit) { height: 100vh; height: 100dvh; }
    .app-screen:has(.screen-fit) .sheet { min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-height: 760px) {
    .app-hero { padding-top: calc(18px + env(safe-area-inset-top)); padding-bottom: 44px; }
    .app-hero.small img { width: 66px; height: 66px; margin-bottom: 6px; }
    .app-hero h1 { font-size: 28px; }
    .sheet .grab { margin-bottom: 12px; }
    .sheet h2 { font-size: 23px; }
    .sheet .lead { margin-bottom: 16px; }
    .sheet .alt { margin-top: 14px; }
    .sheet .foot { margin-top: 12px; }
}

/* Desktop brand scene: hidden below 1024px, so phones and tablets keep the app screen above exactly as it is. */
.desk-scene { display: none; }

@media (min-width: 1024px) {
    body { background: #050505; }
    .auth-wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(480px, 1fr); min-height: 100vh; }

    .desk-scene { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 64px clamp(48px, 6vw, 110px); border-right: 1px solid #1a1a1a;
        background: radial-gradient(ellipse at 20% 0%, #2a0306, transparent 60%), #070707; }
    .desk-sun { position: absolute; z-index: -2; width: 620px; height: 620px; right: -160px; top: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(227, 18, 27, .42), rgba(227, 18, 27, .08) 45%, transparent 70%); }
    .desk-hills { position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; width: 100%; height: 42%; }
    .desk-home { position: absolute; top: 28px; left: clamp(48px, 6vw, 110px); color: #8a8a8a; text-decoration: none; font-size: 13.5px; font-weight: 600; }
    .desk-home:hover { color: #fff; }
    .desk-brand { display: flex; align-items: center; gap: 18px; margin-bottom: 44px; }
    .desk-brand img { width: 84px; height: 84px; border-radius: 50%; box-shadow: 0 16px 40px rgba(0, 0, 0, .7), 0 0 0 6px rgba(255, 255, 255, .04); }
    .desk-brand h1 { font: 400 34px var(--brush); margin: 0; line-height: 1; }
    .desk-brand h1 span { color: var(--red); }
    .desk-brand .sub { font: 600 11px var(--head); letter-spacing: 5px; color: #bdbdbd; margin-top: 6px; }
    .desk-title { font: 700 clamp(44px, 4.4vw, 68px)/1.02 var(--head); text-transform: uppercase; margin: 0 0 18px; letter-spacing: .5px; }
    .desk-title span { color: var(--red); }
    .desk-lead { color: #a8a8a8; font-size: 17px; line-height: 1.6; max-width: 470px; margin: 0 0 36px; }
    .desk-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 470px; }
    .desk-points li { display: grid; gap: 2px; padding: 14px 18px 14px 46px; position: relative; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid #1d1d1d; backdrop-filter: blur(4px); }
    .desk-points li::before { content: ''; position: absolute; left: 18px; top: 19px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(227, 18, 27, .18); }
    .desk-points b { font: 600 15px var(--head); letter-spacing: .4px; }
    .desk-points span { color: #8f8f8f; font-size: 13.5px; }

    /* The form side: the sheet becomes a plain card; the scene already carries the logo. */
    .app-screen { width: 100%; max-width: 460px; min-height: 0; margin: auto; padding: 48px 0; align-self: center; background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
    .app-hero { display: none; }
    .sheet { flex: none; margin: 0; padding: 38px 36px 34px; border-radius: 24px; overflow: hidden; background: #0f0f0f; border: 1px solid #1f1f1f; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
    .sheet::before { content: ''; display: block; height: 4px; margin: -38px -36px 30px; border-radius: 24px 24px 0 0; background: linear-gradient(90deg, var(--red), #ff5a3c 60%, transparent); }
    .sheet .grab { display: none; }
    .sheet h2 { font-size: 30px; }
    .app-screen:has(.screen-fit) { height: auto; }
}

/* Admin sign-in extras: a small "admin panel" pill and the keep-me-signed-in row. */
.admin-pill { display: inline-flex; align-items: center; gap: 7px; font: 700 11px var(--head); letter-spacing: 2.5px; color: #fff; background: rgba(227, 18, 27, .15); border: 1px solid rgba(227, 18, 27, .5); padding: 5px 12px; border-radius: 20px; margin-bottom: 12px; }
.sheet .row { margin: 2px 0 18px; }
.sheet .row a { color: #9a9a9a; text-decoration: none; }
.sheet .row a:hover { color: #fff; }
.sheet .note { margin-top: 18px; }

/* Two-step join wizard */
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: #2a2a2a; transition: background .2s; }
.steps span.on { background: var(--red); }
.step[hidden] { display: none; }
.step .err { min-height: 0; margin: 0 0 8px; }
.step-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 6px; }
.submit.ghost { background: #1c1c1c; box-shadow: none; }
.submit.ghost:hover { background: #262626; }
