/* Landing page refresh */
.splash-view {
    align-items: stretch;
    background: #f6d7d2 url('../landing-hero.png') center / cover no-repeat;
    color: var(--ink);
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(28px, 5vh, 56px) clamp(28px, 7vw, 112px);
}

.splash-view::before,
.splash-view::after { display: none; }

.splash-hero {
    align-items: center;
    display: grid;
    flex: 1;
    gap: clamp(36px, 7vw, 124px);
    grid-template-columns: minmax(0, 1fr) minmax(380px, .9fr);
    margin: 0 auto;
    max-width: 1450px;
    min-height: 0;
    width: 100%;
}

.splash-art {
    align-self: center;
    height: min(70vh, 660px);
    left: 0;
    min-height: 420px;
    top: 0;
    width: 100%;
}

.splash-art::before {
    border-color: rgba(255, 255, 255, .42);
    height: min(36vw, 500px);
    width: min(36vw, 500px);
}

.splash-art::after {
    border-color: rgba(255, 255, 255, .2);
    height: min(46vw, 640px);
    width: min(46vw, 640px);
}

.splash-orbit { border-color: rgba(255, 255, 255, .24); height: min(26vw, 360px); width: min(26vw, 360px); }
.splash-orbit-inner { border-color: rgba(255, 255, 255, .28); height: min(17vw, 235px); width: min(17vw, 235px); }
.splash-route { opacity: .74; }
.splash-route-node { box-shadow: 0 0 0 8px rgba(255, 255, 255, .14), 0 0 28px rgba(255, 255, 255, .42); }

.splash-art-label {
    background: rgba(148, 35, 42, .16);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    bottom: 9%;
    padding: 10px 15px;
}

.splash-copy {
    align-self: center;
    background: transparent;
    border: 0;
    box-shadow: none;
    max-width: 560px;
    padding: 0;
    text-align: left;
}

.splash-copy::before { display: none; }

.splash-copy .eyebrow.light {
    color: #bf4245;
    font-size: 10px;
    gap: 12px;
    letter-spacing: .18em;
    text-shadow: none;
}

.splash-copy .eyebrow.light::before { background: #cf4c50; height: 2px; width: 38px; }

.splash-copy .splash-brand-logo {
    height: clamp(66px, 6vw, 88px);
    margin: 28px 0 14px -4px;
    width: clamp(66px, 6vw, 88px);
}

.splash-copy h1 {
    color: #17181d;
    font-size: clamp(4.8rem, 7.3vw, 8.3rem);
    letter-spacing: -.085em;
    line-height: .88;
    margin: 0 0 19px;
    text-shadow: none;
}

.splash-copy h1 em {
    background: linear-gradient(130deg, #c94142 8%, #ed7779 95%);
    background-clip: text;
    color: transparent;
    -webkit-background-clip: text;
}

.splash-copy > p:not(.eyebrow):not(.portal-note) {
    color: #6d6870;
    font-size: clamp(16px, 1.25vw, 19px);
    line-height: 1.65;
    margin: 0;
    max-width: 410px;
    text-shadow: none;
}

.portal-unified {
    align-items: center;
    background: linear-gradient(105deg, #c94142 0%, #d64e51 100%);
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 16px;
    box-shadow: 0 14px 28px rgba(179, 53, 57, .2), inset 0 1px rgba(255, 255, 255, .2);
    color: #fff;
    margin-top: 30px;
    max-width: 440px;
    min-height: 68px;
    padding: 14px 16px 14px 20px;
    transition: box-shadow .2s ease, transform .2s ease, background .2s ease;
    width: 100%;
}

.portal-unified:hover {
    background: linear-gradient(105deg, #b83239 0%, #ca4248 100%);
    box-shadow: 0 18px 34px rgba(179, 53, 57, .27);
    transform: translateY(-2px);
}

.portal-unified:focus-visible { outline: 3px solid rgba(201, 65, 66, .36); outline-offset: 4px; }
.portal-unified .portal-button-copy { gap: 6px; }
.portal-unified .portal-button-copy strong { font-size: 13px; }
.portal-unified .portal-button-copy small { color: rgba(255, 255, 255, .8); font-size: 10px; }

.portal-unified .portal-arrow {
    background: #fff;
    box-shadow: 0 3px 10px rgba(104, 24, 29, .12);
    color: #c94142;
    flex: 0 0 36px;
    height: 36px;
    transition: transform .2s ease;
    width: 36px;
}

.portal-unified:hover .portal-arrow { transform: translateX(3px); }

.splash-copy .portal-note {
    color: #777178;
    font-size: 12px;
    line-height: 1.5;
    margin-top: 17px;
}

.splash-trust-row {
    align-items: center;
    color: #6e6970;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-top: 24px;
}

.splash-trust-row span {
    align-items: center;
    display: inline-flex;
    font-size: 10px;
    font-weight: 700;
    gap: 7px;
    white-space: nowrap;
}

.splash-trust-row span::before {
    background: #c94142;
    border: 3px solid #f7dfe0;
    border-radius: 50%;
    content: "";
    height: 5px;
    width: 5px;
}

@media (max-width: 1100px) and (min-width: 761px) {
    .splash-view { padding-left: 5vw; padding-right: 5vw; }
    .splash-hero { gap: 4vw; grid-template-columns: minmax(0, 1fr) minmax(340px, .94fr); }
    .splash-art { min-height: 360px; }
    .splash-copy h1 { font-size: clamp(4.4rem, 8vw, 6rem); }
}

@media (max-width: 760px) {
    .splash-view {
        align-items: stretch;
        background: linear-gradient(180deg, #fff1ef 0, #fff8f7 30%, #fff 61%);
        min-height: 100vh;
        min-height: 100svh;
        padding: 20px 22px 26px;
    }

    .splash-hero {
        align-items: center;
        display: flex;
        flex: 1;
        flex-direction: column;
        gap: 0;
        justify-content: center;
        margin: auto;
        max-width: 480px;
        width: 100%;
    }

    .splash-art {
        flex: none;
        height: clamp(145px, 24vh, 190px);
        margin: 0 auto 8px;
        min-height: 0;
        top: 0;
        width: 100%;
    }

    .splash-art::before { height: min(48vw, 205px); width: min(48vw, 205px); }
    .splash-art::after { height: min(62vw, 265px); width: min(62vw, 265px); }
    .splash-orbit { height: min(36vw, 155px); width: min(36vw, 155px); }
    .splash-orbit-inner { height: min(23vw, 100px); width: min(23vw, 100px); }
    .splash-art-label { bottom: 0; font-size: 8px; padding: 7px 11px; }

    .splash-copy {
        align-self: stretch;
        background: rgba(255, 255, 255, .82);
        border: 1px solid rgba(255, 255, 255, .95);
        border-radius: 24px;
        box-shadow: 0 14px 42px rgba(105, 44, 46, .08);
        padding: 22px 20px 21px;
        text-align: center;
    }

    .splash-copy .eyebrow.light { justify-content: center; font-size: 9px; letter-spacing: .14em; }
    .splash-copy .eyebrow.light::before { width: 22px; }
    .splash-copy .splash-brand-logo { height: 58px; margin: 13px auto 10px; width: 58px; }
    .splash-copy h1 { font-size: clamp(3.5rem, 15vw, 5rem); line-height: .9; margin: 0 0 12px; }

    .splash-copy > p:not(.eyebrow):not(.portal-note) {
        font-size: 14px;
        line-height: 1.55;
        margin: 0 auto;
        max-width: 300px;
    }

    .portal-unified {
        border-radius: 14px;
        margin: 21px auto 0;
        max-width: 360px;
        min-height: 62px;
        text-align: left;
    }

    .splash-copy .portal-note { font-size: 10px; margin-top: 13px; }
    .splash-trust-row { gap: 8px 15px; justify-content: center; margin-top: 17px; }
    .splash-trust-row span { font-size: 9px; }
}

@media (max-width: 380px) {
    .splash-view { padding-left: 15px; padding-right: 15px; }
    .splash-copy { padding-left: 14px; padding-right: 14px; }
    .splash-trust-row { column-gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .portal-unified,
    .portal-unified .portal-arrow { transition: none; }
}

/* Welcome screen styled to match the supplied Moto Aid reference. */
#splash-view {
    align-items: stretch;
    background-color: #f6d7d2;
    background-image:
        linear-gradient(90deg, rgba(255, 249, 247, .16) 0%, rgba(255, 244, 242, .1) 40%, rgba(255, 244, 242, 0) 65%),
        url('../landing-hero.png');
    background-position: center, center;
    background-repeat: no-repeat;
    background-size: cover, cover;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    padding: clamp(22px, 4vh, 42px) clamp(28px, 5vw, 76px) 0 clamp(30px, 14vw, 180px);
    position: relative;
}

#splash-view::before,
#splash-view::after { display: none; }

.splash-header {
    flex: 0 0 auto;
    margin: 0 auto;
    max-width: 1450px;
    width: 100%;
    z-index: 1;
}

.splash-brand {
    align-items: center;
    color: #17181d;
    display: inline-flex;
    gap: 7px;
    text-decoration: none;
}

.splash-brand img {
    background: rgba(255, 255, 255, .84);
    border: 1px solid rgba(113, 24, 32, .24);
    border-radius: 50%;
    height: 29px;
    object-fit: contain;
    padding: 2px;
    width: 29px;
}

.splash-brand span {
    font: 800 17px/1 'Manrope', sans-serif;
    letter-spacing: -.06em;
}

.splash-brand em { color: #bd3d43; font-style: normal; }

.splash-hero {
    align-items: center;
    display: grid;
    flex: 1 1 auto;
    gap: clamp(24px, 4vw, 64px);
    grid-template-columns: minmax(320px, .88fr) minmax(300px, 1.12fr);
    margin: 0 auto;
    max-width: 1450px;
    min-height: 0;
    width: 100%;
}

.splash-copy {
    align-self: center;
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    background: linear-gradient(140deg, rgba(255, 250, 248, .78), rgba(255, 235, 232, .72));
    border: 1px solid rgba(255, 255, 255, .88);
    border-radius: 30px;
    box-shadow: 0 26px 68px rgba(177, 57, 63, .17), inset 0 1px rgba(255, 255, 255, .94);
    max-width: 560px;
    padding: clamp(28px, 3.2vw, 42px);
    text-align: left;
    transform: translateY(-clamp(20px, 7vh, 52px));
    z-index: 1;
}

.splash-copy::before { display: none; }

.splash-copy .eyebrow.light {
    color: #6e3f43;
    font-size: 11px;
    gap: 0;
    letter-spacing: .12em;
    margin-bottom: 10px;
    text-shadow: none;
    text-transform: uppercase;
}

.splash-copy .eyebrow.light::before { display: none; }

.splash-copy h1 {
    color: #191a20;
    font-size: clamp(4.5rem, 7.4vw, 6.1rem);
    letter-spacing: -.085em;
    line-height: .9;
    margin: 0 0 13px;
    text-shadow: none;
}

.splash-copy h1 em {
    background: linear-gradient(130deg, #a32e38 8%, #d65860 95%);
    background-clip: text;
    color: transparent;
    -webkit-background-clip: text;
}

.splash-copy > p:not(.eyebrow):not(.portal-note) {
    color: #332c31;
    font-size: clamp(14px, 1.15vw, 16px);
    line-height: 1.55;
    margin: 0;
    max-width: 385px;
    text-shadow: none;
}

.portal-panel {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin-top: 20px;
    max-width: none;
    padding: 0;
}

.portal-panel h2 {
    color: #242127;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: -.02em;
    line-height: 1.2;
    margin: 0 0 9px;
}

.portal-panel .portal-actions {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    max-width: none;
}

.portal-panel .portal-button {
    align-items: center;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 9px;
    box-shadow: 0 4px 12px rgba(37, 18, 24, .14), inset 0 1px rgba(255, 255, 255, .14);
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    min-height: 55px;
    padding: 8px 9px;
    text-align: left;
    transition: box-shadow .2s ease, transform .2s ease;
}

.portal-panel .portal-button:hover {
    box-shadow: 0 8px 17px rgba(37, 18, 24, .19);
    transform: translateY(-2px);
}

.portal-panel .portal-driver {
    background: linear-gradient(120deg, #c33643, #9e2434);
    color: #fff;
}

.portal-panel .portal-admin {
    background: linear-gradient(120deg, #44434a, #262831);
    color: #fff;
}

.portal-icon {
    align-items: center;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 7px;
    display: inline-flex;
    flex: 0 0 27px;
    height: 27px;
    justify-content: center;
    width: 27px;
}

.portal-icon svg { height: 16px; width: 16px; }

.portal-panel .portal-button-copy {
    gap: 4px;
    min-width: 0;
}

.portal-panel .portal-button-copy strong {
    font-size: 9px;
    letter-spacing: .025em;
    line-height: 1.15;
    text-transform: uppercase;
}

.portal-panel .portal-button-copy small {
    color: rgba(255, 255, 255, .76);
    font-size: 7px;
    line-height: 1.25;
}

.portal-panel .portal-note {
    color: #55464a;
    font-size: 9px;
    line-height: 1.4;
    margin: 9px 0 0;
    text-align: center;
}

.splash-art-spacer { height: 100%; min-height: 360px; }

@media (max-width: 1100px) and (min-width: 761px) {
    #splash-view {
        background-position: center, 52% center;
        padding-left: clamp(72px, 10vw, 125px);
        padding-right: 5vw;
    }
    .splash-hero { gap: 3vw; grid-template-columns: minmax(400px, 1.15fr) minmax(200px, .85fr); }
    .splash-copy h1 { font-size: clamp(3.5rem, 7vw, 4.5rem); }
    .splash-copy { padding: clamp(18px, 2.8vw, 28px); }
}

@media (max-width: 760px) {
    #splash-view {
        background-image: linear-gradient(180deg, rgba(255, 250, 248, .05), rgba(255, 248, 246, .02) 54%, rgba(222, 111, 103, .08)), url('../landing-background.png');
        background-position: center, center;
        background-size: 100% 100%, cover;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: auto;
        padding: 15px 20px 0;
    }

    .splash-header { max-width: 560px; }
    .splash-brand img { height: 26px; width: 26px; }
    .splash-brand span { font-size: 16px; }

    .splash-hero {
        align-items: stretch;
        display: flex;
        flex: 1 0 auto;
        flex-direction: column;
        justify-content: flex-start;
        margin: 0 auto;
        max-width: 560px;
        width: 100%;
    }

    .splash-art-spacer { display: none; }

    .splash-copy {
        align-self: stretch;
        background: linear-gradient(140deg, rgba(255, 250, 248, .84), rgba(255, 235, 232, .78));
        border-color: rgba(255, 255, 255, .94);
        border-radius: 28px;
        box-shadow: 0 24px 56px rgba(177, 57, 63, .16), inset 0 1px rgba(255, 255, 255, .96);
        margin-top: clamp(80px, 14vh, 115px);
        max-width: none;
        padding: clamp(24px, 5vw, 32px);
        text-align: left;
        transform: none;
    }

    .splash-copy .eyebrow.light { font-size: 9px; letter-spacing: .12em; margin-bottom: 7px; }
    .splash-copy h1 { font-size: clamp(3.55rem, 15vw, 4.5rem); line-height: .92; margin-bottom: 9px; }

    .splash-copy > p:not(.eyebrow):not(.portal-note) {
        font-size: 13px;
        line-height: 1.5;
        max-width: 340px;
    }

    .portal-panel {
        margin-top: 17px;
        max-width: none;
        padding: 0;
    }

    .portal-panel h2 { font-size: 13px; }
    .portal-panel .portal-actions { gap: 8px; }
    .portal-panel .portal-button { gap: 7px; min-height: 56px; padding: 8px; }
    .portal-icon { flex-basis: 25px; height: 25px; width: 25px; }
    .portal-icon svg { height: 15px; width: 15px; }
    .portal-panel .portal-button-copy strong { font-size: 9px; }
    .portal-panel .portal-button-copy small { font-size: 7px; }
    .portal-panel .portal-note { font-size: 9px; margin-top: 9px; }
}

@media (max-width: 380px) {
    #splash-view { padding-left: 16px; padding-right: 16px; }
    .portal-panel { padding: 0; }
    .portal-panel .portal-actions { gap: 6px; }
    .portal-panel .portal-button { gap: 5px; padding: 7px; }
    .portal-panel .portal-button-copy strong { font-size: 8px; }
    .portal-panel .portal-button-copy small { font-size: 6.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .portal-panel .portal-button { transition: none; }
}

/* Rider login layout */
#auth-view.auth-view {
    align-items: stretch;
    background:
        linear-gradient(90deg, rgba(100, 0, 12, .2) 0%, rgba(100, 0, 12, .16) 43%, rgba(100, 0, 12, 0) 61%) center / cover no-repeat,
        #fff url('../background-enhanced.png') center / cover no-repeat;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    position: relative;
}

#auth-view .auth-visual {
    align-items: flex-start;
    background: transparent;
    color: #fff;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    padding: 48px 24px 48px clamp(24px, 15.8vw, 286px);
    position: relative;
    width: 50%;
}

#auth-view .auth-visual::before {
    display: none;
    border: 1px dashed rgba(255, 255, 255, .28);
    bottom: auto;
    height: min(44vw, 540px);
    right: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(44vw, 540px);
    z-index: 0;
}

#auth-view .auth-visual-content {
    margin: 0;
    max-width: 560px;
    position: relative;
    width: 100%;
    z-index: 1;
}

#auth-view .auth-visual-content::before,
#auth-view .auth-visual-content::after {
    display: none;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    content: "";
    left: 50%;
    pointer-events: none;
    position: absolute;
    top: 44%;
    transform: translate(-50%, -50%);
    z-index: -1;
}

#auth-view .auth-visual-content::before {
    height: min(35vw, 410px);
    width: min(35vw, 410px);
}

#auth-view .auth-visual-content::after {
    height: min(23vw, 270px);
    width: min(23vw, 270px);
}

#auth-view .auth-brand-lockup,
#auth-view .auth-road,
#auth-view .auth-map-art {
    display: none;
}

#auth-view .auth-visual-copy {
    max-width: 100%;
    position: relative;
    z-index: 1;
}

#auth-view .auth-visual-copy .eyebrow {
    align-items: center;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 10px;
    font-weight: 800;
    gap: 8px;
    letter-spacing: .02em;
    margin: 0 0 28px;
    padding: 7px 13px;
    text-transform: uppercase;
}

#auth-view .auth-visual-copy .eyebrow svg {
    color: #ffeb75;
    height: 14px;
    width: 14px;
}

#auth-view .auth-visual-copy h1 {
    color: #fff;
    font-size: clamp(2.55rem, 3.55vw, 3.95rem);
    letter-spacing: -.055em;
    line-height: .99;
    margin: 0 0 15px;
}

#auth-view .auth-visual-copy h1 em {
    color: #fff;
    font-style: normal;
}

#auth-view .auth-visual-copy > p:not(.eyebrow) {
    color: rgba(255, 255, 255, .96);
    font-size: clamp(13px, 1.08vw, 16px);
    line-height: 1.65;
    margin: 0;
    max-width: 560px;
}

#auth-view .auth-feature-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 39px;
    position: relative;
    z-index: 1;
}

#auth-view .auth-feature-card {
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 15px;
    color: #fff;
    min-height: 107px;
    padding: 13px 13px 12px;
}

#auth-view .auth-feature-icon {
    align-items: center;
    background: rgba(255, 255, 255, .23);
    border-radius: 8px;
    color: #fff;
    display: flex;
    height: 32px;
    justify-content: center;
    margin-bottom: 9px;
    width: 32px;
}

#auth-view .auth-feature-icon svg {
    height: 16px;
    width: 16px;
}

#auth-view .auth-feature-card strong,
#auth-view .auth-feature-card small {
    display: block;
    white-space: nowrap;
}

#auth-view .auth-feature-card strong {
    font-size: clamp(9px, .85vw, 12px);
    font-weight: 800;
}

#auth-view .auth-feature-card small {
    color: rgba(255, 255, 255, .8);
    font-size: clamp(8px, .73vw, 10px);
    margin-top: 3px;
}

#auth-view .auth-coverage-card {
    align-items: center;
    background: rgba(150, 38, 43, .54);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 16px;
    color: #fff;
    display: flex;
    gap: 15px;
    margin-top: 15px;
    min-height: 82px;
    padding: 13px 16px;
    position: relative;
    z-index: 1;
}

#auth-view .auth-coverage-icon {
    align-items: center;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 10px;
    color: #ffd782;
    display: flex;
    flex: none;
    height: 48px;
    justify-content: center;
    width: 48px;
}

#auth-view .auth-coverage-icon svg {
    height: 19px;
    width: 19px;
}

#auth-view .auth-coverage-total {
    flex: 1;
}

#auth-view .auth-coverage-card small,
#auth-view .auth-coverage-card strong {
    display: block;
}

#auth-view .auth-coverage-card small {
    color: rgba(255, 255, 255, .73);
    font-size: 9px;
}

#auth-view .auth-coverage-card strong {
    font-size: 17px;
    line-height: 1.35;
}

#auth-view .auth-coverage-total strong span {
    background: rgba(53, 182, 105, .48);
    border-radius: 999px;
    color: #dcffe7;
    font-size: 9px;
    font-weight: 600;
    margin-left: 4px;
    padding: 3px 8px;
    vertical-align: 2px;
}

#auth-view .auth-response-time {
    text-align: right;
}

#auth-view .auth-response-time strong {
    font-size: 13px;
}

#auth-view .auth-panel {
    align-items: center;
    background: transparent;
    justify-content: center;
    padding: 30px;
    width: 50%;
}

#auth-view .auth-panel-inner {
    margin: auto;
    max-width: 440px;
    transform: none;
    width: 100%;
}

#auth-login.auth-card-active {
    animation: fade-in .25s ease;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, .97);
    border: 1px solid rgba(226, 232, 240, .8);
    border-radius: 20px;
    box-shadow: 0 16px 36px rgba(55, 65, 81, .09);
    box-sizing: border-box;
    margin: 0 auto;
    padding: clamp(16px, 2.2vh, 24px) clamp(18px, 2.5vw, 26px) clamp(14px, 1.8vh, 18px);
    width: 100%;
    -webkit-backdrop-filter: blur(8px);
}

#auth-forgot.auth-card-active {
    animation: fade-in .25s ease;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, .97);
    border: 1px solid rgba(226, 232, 240, .8);
    border-radius: 24px;
    box-shadow: 0 18px 42px rgba(55, 65, 81, .1);
    box-sizing: border-box;
    margin: 0 auto;
    padding: 34px 32px 31px;
    width: 100%;
    -webkit-backdrop-filter: blur(8px);
}

/* Give rider registration its own contained card inside the auth overlay. */
#auth-signup.auth-card-active {
    animation: fade-in .25s ease;
    -webkit-backdrop-filter: blur(10px) saturate(1.04);
    backdrop-filter: blur(10px) saturate(1.04);
    background: linear-gradient(155deg, rgba(255, 255, 255, .985), rgba(255, 249, 248, .965));
    border: 1px solid rgba(226, 232, 240, .92);
    border-radius: 24px;
    box-shadow: 0 20px 48px rgba(55, 65, 81, .12), inset 0 1px rgba(255, 255, 255, .92);
    box-sizing: border-box;
    margin: 12px auto;
    padding: clamp(24px, 3vw, 34px);
    width: 100%;
}

#auth-signup > .back-button {
    margin-bottom: 24px;
}

#auth-signup .stack-form {
    gap: 15px;
}

#auth-signup .button-full {
    min-height: 48px;
}

#auth-login .auth-role-switch {
    background: #f0f3f8;
    border: 0;
    border-radius: 13px;
    gap: 4px;
    margin-bottom: clamp(10px, 1.6vh, 16px);
    padding: 4px;
}

#auth-login .auth-role-tab {
    align-items: center;
    background: transparent;
    border-radius: 11px;
    color: #75859c;
    display: flex;
    font-size: 10px;
    gap: 7px;
    justify-content: center;
    min-height: 37px;
    padding: 8px 9px;
}

#auth-login .auth-role-tab svg {
    height: 14px;
    width: 14px;
}

#auth-login .auth-role-tab.is-active {
    background: #fff;
    box-shadow: 0 2px 8px rgba(50, 64, 84, .08);
    color: #ef2935;
}

#auth-login > .eyebrow {
    align-items: center;
    color: #f02d39;
    display: flex;
    font-size: 10px;
    font-weight: 800;
    gap: 7px;
    letter-spacing: .1em;
    margin: 0 0 4px;
    text-transform: uppercase;
}

#auth-login > .eyebrow svg {
    height: 13px;
    width: 13px;
}

#auth-login h2 {
    color: #172033;
    font-size: 25px;
    letter-spacing: -.045em;
    margin: 0 0 2px;
}

#auth-login .login-role-copy {
    color: #8290a5;
    font-size: 11px;
    line-height: 1.45;
    margin: 0 0 clamp(10px, 1.6vh, 16px) !important;
}

#auth-login .stack-form {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.4vh, 13px);
}

#auth-login .stack-form label {
    color: #38465b;
    display: flex;
    flex-direction: column;
    font-size: 10px;
    font-weight: 700;
    gap: 7px;
}

#auth-login .auth-input-wrap {
    align-items: center;
    background: #fbfcfe;
    border: 1px solid #dce4ef;
    border-radius: 11px;
    display: flex;
    min-height: 42px;
    position: relative;
    width: 100%;
}

#auth-login .auth-input-wrap > svg {
    color: #91a1b9;
    flex: none;
    height: 15px;
    left: 13px;
    position: absolute;
    width: 15px;
}

#auth-login .auth-input-wrap input {
    background: transparent;
    border: 0;
    border-radius: inherit;
    box-shadow: none;
    color: #37465d;
    font-size: 11px;
    margin: 0;
    min-height: 40px;
    outline: 0;
    padding: 9px 12px 9px 39px;
    width: 100%;
}

#auth-login .auth-input-wrap:focus-within {
    border-color: #a9bbd5;
    box-shadow: 0 0 0 3px rgba(91, 129, 186, .08);
}

#auth-login .auth-password-label > span {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

#auth-login .auth-password-label .text-button {
    align-self: flex-end;
    color: #ef2935;
    font-size: 10px;
    font-weight: 600;
    padding: 0;
}

#auth-login .auth-password-label .auth-input-wrap {
    padding-left: 0;
}

#auth-login .auth-password-label .auth-input-wrap::before {
    border: 1.5px solid #91a1b9;
    border-radius: 2px;
    content: "";
    height: 8px;
    left: 14px;
    position: absolute;
    top: 19px;
    width: 10px;
}

#auth-login .auth-password-label .auth-input-wrap::after {
    border: 1.5px solid #91a1b9;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    content: "";
    height: 6px;
    left: 15px;
    position: absolute;
    top: 12px;
    width: 7px;
}

#auth-login .auth-password-label .auth-input-wrap input {
    padding-left: 39px;
    padding-right: 40px;
}

#auth-login .auth-password-label .password-toggle {
    align-items: center;
    background: transparent;
    display: flex;
    height: 34px;
    justify-content: center;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 31px;
}

#auth-login .auth-password-label .password-toggle svg {
    color: #91a1b9;
    height: 16px;
    width: 16px;
}

#auth-login .button-full {
    background: linear-gradient(100deg, #ed252b, #e5154b);
    border-radius: 11px;
    box-shadow: 0 8px 16px rgba(220, 34, 52, .2);
    font-size: 12px;
    margin-top: 1px;
    min-height: 40px;
}

.auth-card .divider {
    color: #8e9bb0;
    font-size: 10px;
    margin: clamp(10px, 1.5vh, 15px) 0 clamp(6px, 1vh, 10px);
}

.auth-card .social-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.auth-card .social-button,
.auth-card .social-button.google,
.auth-card .social-button.facebook {
    align-items: center;
    background: #fff;
    border: 1px solid #dce4ef;
    border-radius: 11px;
    color: #35445b;
    display: inline-flex;
    flex: 1;
    font-size: 10px;
    gap: 8px;
    height: 38px;
    justify-content: center;
    width: auto;
}

.auth-card .social-button strong {
    font-size: 15px;
    line-height: 1;
}

.auth-card .social-button.google strong {
    background: conic-gradient(from -45deg, #4285f4 0 25%, #34a853 25% 49%, #fbbc05 49% 74%, #ea4335 74%);
    background-clip: text;
    color: transparent;
    -webkit-background-clip: text;
}

.auth-card .social-button.facebook strong {
    color: #1877f2;
}

#auth-login .auth-signup-note {
    align-items: center;
    background: #f7f9fc;
    border: 1px solid #edf1f5;
    border-radius: 10px;
    box-sizing: border-box;
    color: #91a0b4;
    display: flex;
    font-size: 9px;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    line-height: 1.4;
    margin: clamp(10px, 1.4vh, 14px) 0 0;
    min-height: 38px;
    padding: 8px 12px;
    text-align: center;
}

#auth-login .auth-signup-note .text-button {
    color: #eb2635;
    font-size: inherit;
    font-weight: 700;
    padding: 0;
    white-space: nowrap;
}

#auth-login .auth-security-note {
    align-items: center;
    border-top: 1px solid #edf1f5;
    color: #91a0b4;
    display: flex;
    font-size: 9px;
    gap: 6px;
    justify-content: center;
    margin-top: clamp(10px, 1.4vh, 14px);
    padding-top: clamp(8px, 1.2vh, 12px);
}

#auth-login .auth-security-note svg {
    color: #d59c61;
    height: 12px;
    width: 12px;
}

@media (max-width: 1100px) and (min-width: 761px) {
    #auth-view .auth-visual {
        padding-left: 8vw;
        padding-right: 18px;
    }

    #auth-view .auth-panel {
        padding-left: 16px;
        padding-right: 22px;
    }

    #auth-view .auth-panel-inner {
        margin: auto;
        transform: none;
    }

    #auth-view .auth-feature-grid {
        gap: 7px;
        margin-top: 26px;
    }

    #auth-view .auth-feature-card {
        padding-left: 9px;
        padding-right: 8px;
    }
}

/* Rider navigation: a warmer, more polished Moto Aid brand and sidebar. */
.product-view:not(.admin-mode) .sidebar {
    background:
        radial-gradient(ellipse at 8% 0%, rgba(226, 75, 79, .13), transparent 33%),
        linear-gradient(180deg, #202229 0%, #1b1d23 48%, #191b20 100%);
    border-right: 1px solid rgba(255, 255, 255, .055);
    padding: 27px 18px 18px;
    scrollbar-color: #444750 transparent;
    scrollbar-width: thin;
}

.product-view:not(.admin-mode) .sidebar-brand {
    align-items: center;
    gap: 12px;
    margin-bottom: 31px;
    padding: 0 8px;
}

.product-view:not(.admin-mode) .sidebar-brand .brand-mark {
    background: linear-gradient(145deg, #353840, #282a31);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    box-shadow: 0 7px 18px rgba(0, 0, 0, .24), 0 0 0 3px rgba(235, 83, 83, .07);
    flex: none;
    height: 44px;
    overflow: hidden;
    width: 44px;
}

.product-view:not(.admin-mode) .sidebar-brand .brand-mark img {
    border-radius: inherit;
    clip-path: none;
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.product-view:not(.admin-mode) .sidebar-brand .brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.product-view:not(.admin-mode) .sidebar-brand .brand-title {
    color: #fff;
    font: 700 20px/1 'Space Grotesk', sans-serif;
    letter-spacing: -.055em;
}

.product-view:not(.admin-mode) .sidebar-brand em {
    color: #ff8582;
}

.product-view:not(.admin-mode) .sidebar-brand .brand-copy small {
    color: #858994;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .105em;
    margin-top: 6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.product-view:not(.admin-mode) .sidebar-nav {
    gap: 6px;
}

.product-view:not(.admin-mode) .sidebar .nav-label {
    align-items: center;
    color: #858a96;
    display: flex;
    font-size: 9px;
    gap: 8px;
    letter-spacing: .16em;
    margin: 0 11px 8px;
}

.product-view:not(.admin-mode) .sidebar .nav-label::before {
    background: #eb6263;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(235, 98, 99, .48);
    content: '';
    height: 5px;
    width: 5px;
}

.product-view:not(.admin-mode) .sidebar .nav-label-spaced {
    margin-top: 28px;
}

.product-view:not(.admin-mode) .sidebar .nav-item {
    border: 1px solid transparent;
    border-radius: 12px;
    color: #b4b7c0;
    cursor: pointer;
    gap: 13px;
    min-height: 46px;
    padding: 0 12px;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.product-view:not(.admin-mode) .sidebar .nav-item:hover {
    background: rgba(255, 255, 255, .055);
    border-color: rgba(255, 255, 255, .045);
    color: #fff;
    transform: translateX(2px);
}

.product-view:not(.admin-mode) .sidebar .nav-item:focus-visible {
    outline: 2px solid rgba(255, 132, 130, .85);
    outline-offset: 2px;
}

.product-view:not(.admin-mode) .sidebar .nav-item.is-active {
    background: linear-gradient(105deg, #ed6261 0%, #df5155 100%);
    border-color: rgba(255, 255, 255, .12);
    box-shadow: 0 9px 22px rgba(207, 60, 64, .22), inset 0 1px rgba(255, 255, 255, .15);
    color: #fff;
}

.product-view:not(.admin-mode) .sidebar .nav-item.is-active:hover {
    background: linear-gradient(105deg, #f16b69 0%, #e2575a 100%);
}

.product-view:not(.admin-mode) .sidebar .nav-icon {
    align-items: center;
    color: #aeb2bd;
    display: inline-flex;
    flex: none;
    height: 20px;
    justify-content: center;
    width: 20px;
}

.product-view:not(.admin-mode) .sidebar .nav-icon svg {
    height: 18px;
    stroke-width: 1.8;
    width: 18px;
}

.product-view:not(.admin-mode) .sidebar .nav-item.is-active .nav-icon {
    color: #fff;
}

.product-view:not(.admin-mode) .sidebar .nav-badge {
    background: #fff;
    border: 1px solid rgba(226, 79, 84, .12);
    border-radius: 6px;
    color: #ca4148;
    font-size: 8px;
    letter-spacing: .04em;
    padding: 4px 7px;
}

.product-view:not(.admin-mode) .sidebar-bottom {
    border-color: rgba(255, 255, 255, .1);
    margin-top: auto;
    padding-top: 17px;
}

.product-view:not(.admin-mode) .sidebar-bottom .nav-item + .nav-item {
    margin-top: 4px;
}

.product-view:not(.admin-mode) .sidebar .nav-item[data-action="logout"]:hover {
    background: rgba(229, 82, 85, .11);
    border-color: rgba(229, 82, 85, .12);
    color: #ffaaa7;
}

.product-view:not(.admin-mode) .sidebar-help {
    background: linear-gradient(125deg, #292c34, #25272e);
    border: 1px solid rgba(255, 255, 255, .065);
    border-radius: 13px;
    gap: 10px;
    margin-top: 22px;
    padding: 11px 10px;
}

.product-view:not(.admin-mode) .sidebar-help .help-icon {
    background: rgba(231, 87, 89, .14);
    border: 1px solid rgba(255, 124, 122, .12);
    color: #ff9390;
    flex: none;
    height: 29px;
    width: 29px;
}

.product-view:not(.admin-mode) .sidebar-help .help-icon svg {
    height: 16px;
    width: 16px;
}

.product-view:not(.admin-mode) .sidebar-help strong {
    color: #f4f4f6;
    font-size: 10px;
}

.product-view:not(.admin-mode) .sidebar-help small {
    color: #9699a3;
    font-size: 9px;
}

.product-view:not(.admin-mode) .sidebar-help > span:last-child {
    color: #8f939d;
    margin-left: auto;
    transition: color .18s ease, transform .18s ease;
}

#auth-view .auth-brand-lockup .auth-logo {
    clip-path: none;
    mix-blend-mode: normal;
}

#auth-view .mobile-brand.auth-brand-lockup .auth-logo {
    background: transparent;
    border-radius: 12px;
    padding: 0;
}

@media (prefers-reduced-motion: reduce) {
    .product-view:not(.admin-mode) .sidebar .nav-item,
    .product-view:not(.admin-mode) .sidebar-help > span:last-child {
        transition: none;
    }
}

@media (max-width: 760px) {
    #auth-view.auth-view.is-active {
        background-position: 38% center;
        display: block;
        min-height: 100vh;
        min-height: 100svh;
        overflow: auto;
    }

    #auth-view .auth-visual {
        display: none;
    }

    #auth-view .auth-panel {
        align-items: center;
        background: transparent;
        min-height: 100vh;
        min-height: 100svh;
        padding: 22px 18px;
        width: 100%;
    }

    #auth-view .auth-panel-inner {
        margin: auto;
        max-width: 448px;
        transform: none;
    }

    #auth-view .mobile-brand.auth-brand-lockup {
        color: #172033;
        display: flex;
        margin: 0 0 18px;
    }

    #auth-view .mobile-brand .auth-logo {
        background: #fff;
        border-radius: 50%;
        height: 42px;
        mix-blend-mode: normal;
        padding: 6px;
        width: 42px;
    }

    #auth-view .mobile-brand strong em {
        color: #ef2935;
    }

    #auth-view .mobile-brand small {
        color: #748198;
    }

    #auth-login.auth-card-active {
        padding: 22px 19px 19px;
        width: 100%;
    }

    #auth-signup.auth-card-active {
        border-radius: 20px;
        margin: 42px auto 12px;
        padding: 24px 18px 22px;
    }

    #auth-signup > .back-button {
        margin-bottom: 21px;
    }

    #auth-login .auth-role-switch {
        margin-bottom: 20px;
    }

    #auth-login .login-role-copy {
        margin-bottom: 19px !important;
    }

    #auth-login .stack-form {
        gap: 13px;
    }

    #auth-login .divider {
        margin-top: 20px;
    }

    #auth-login .auth-signup-note {
        margin-top: 19px;
    }

    #auth-login .auth-security-note {
        margin-top: 19px;
    }
}

@media (max-width: 380px) {
    #auth-login.auth-card-active {
        padding-left: 15px;
        padding-right: 15px;
    }

    #auth-signup.auth-card-active {
        padding-left: 15px;
        padding-right: 15px;
    }

    #auth-login .auth-role-tab {
        gap: 4px;
        font-size: 9px;
        padding-left: 5px;
        padding-right: 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #auth-login.auth-card-active {
        animation: none;
    }
}

/* Moto Aid welcome screen polish
   DESIGN_VARIANCE: 7, MOTION_INTENSITY: 5, VISUAL_DENSITY: 3.
   Keep the supplied route artwork prominent; use motion only for arrival and control feedback. */
#splash-view {
    color-scheme: light;
    isolation: isolate;
    min-height: 100dvh;
}

#splash-view::before,
#splash-view::after {
    content: "";
    display: block;
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

#splash-view::before {
    background:
        linear-gradient(90deg, rgba(255, 251, 249, .2), rgba(255, 248, 246, .08) 42%, transparent 66%),
        linear-gradient(0deg, rgba(94, 18, 26, .13), transparent 38%);
}

#splash-view::after {
    background: radial-gradient(ellipse 36% 34% at 100% 100%, rgba(255, 77, 82, .18), transparent 74%);
}

.splash-header,
.splash-hero {
    position: relative;
    z-index: 1;
}

.splash-copy {
    animation: splash-arrive .68s cubic-bezier(.2, .72, .22, 1) both;
    -webkit-backdrop-filter: blur(26px) saturate(1.18);
    backdrop-filter: blur(26px) saturate(1.18);
    background: linear-gradient(145deg, rgba(255, 252, 251, .86), rgba(255, 239, 236, .76));
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 26px;
    box-shadow: 0 28px 76px rgba(128, 35, 41, .2), 0 2px 8px rgba(128, 35, 41, .06), inset 0 1px rgba(255, 255, 255, .96);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    isolation: isolate;
    justify-content: center;
    min-height: 440px;
    overflow: hidden;
    position: relative;
    transform: none;
}

.splash-copy::before {
    background:
        radial-gradient(ellipse 70% 50% at 0 0, rgba(255, 255, 255, .58), transparent 76%),
        linear-gradient(120deg, rgba(255, 255, 255, .16), transparent 48%, rgba(255, 255, 255, .08));
    border-radius: inherit;
    content: "";
    display: block;
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

.splash-copy > * {
    position: relative;
    z-index: 1;
}

.splash-copy .eyebrow.light {
    color: #71383d;
    font-size: 11px;
    letter-spacing: .14em;
}

.splash-copy h1 {
    font-weight: 820;
    letter-spacing: -.075em;
}

.splash-copy > p:not(.eyebrow):not(.portal-note) {
    color: #4a4144;
}

.portal-panel {
    margin-top: 24px;
}

.portal-panel h2 {
    font-size: 14px;
    margin-bottom: 12px;
}

.portal-panel .portal-actions {
    gap: 12px;
}

.portal-panel .portal-button {
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 13px;
    box-shadow: 0 8px 20px rgba(49, 20, 27, .16), inset 0 1px rgba(255, 255, 255, .2);
    gap: 11px;
    isolation: isolate;
    min-height: 68px;
    overflow: hidden;
    padding: 10px 13px;
    position: relative;
    transition: box-shadow .24s ease, transform .24s cubic-bezier(.2, .72, .22, 1), filter .24s ease;
}

.portal-panel .portal-button::before {
    background: linear-gradient(105deg, transparent 18%, rgba(255, 255, 255, .2) 48%, transparent 78%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    transform: translateX(-115%);
    transition: transform .55s ease;
    z-index: 0;
}

.portal-panel .portal-button::after {
    color: rgba(255, 255, 255, .92);
    content: "\2192";
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 1;
    margin-left: auto;
    opacity: .86;
    position: relative;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 1;
}

.portal-panel .portal-button:hover {
    box-shadow: 0 13px 27px rgba(49, 20, 27, .22), inset 0 1px rgba(255, 255, 255, .24);
    filter: saturate(1.06);
    transform: translateY(-2px);
}

.portal-panel .portal-button:hover::before { transform: translateX(115%); }
.portal-panel .portal-button:hover::after { opacity: 1; transform: translateX(2px); }

.portal-panel .portal-button:active {
    transform: translateY(1px) scale(.985);
}

.portal-panel .portal-button:focus-visible {
    outline: 3px solid rgba(174, 43, 55, .62);
    outline-offset: 4px;
    z-index: 2;
}

.portal-panel .portal-driver {
    background: linear-gradient(118deg, #c83d49 0%, #a42637 100%);
}

.portal-panel .portal-admin {
    background: linear-gradient(118deg, #393a42 0%, #22242c 100%);
}

.portal-icon,
.portal-panel .portal-button-copy {
    position: relative;
    z-index: 1;
}

.portal-icon {
    background: rgba(255, 255, 255, .13);
    border-radius: 10px;
    flex-basis: 38px;
    height: 38px;
    width: 38px;
}

.portal-icon svg { height: 20px; width: 20px; }

.portal-driver .portal-icon-helmet {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 12px;
    color: #fff;
    display: grid;
    flex: 0 0 42px;
    height: 42px;
    place-items: center;
    width: 42px;
}

.portal-driver .portal-icon-helmet svg {
    height: 26px;
    width: 26px;
}

.portal-panel .portal-button-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.portal-panel .portal-button-copy strong {
    font-size: 11px;
    letter-spacing: .045em;
}

.portal-panel .portal-button-copy small {
    color: rgba(255, 255, 255, .94);
    font-size: 10px;
    line-height: 1.25;
}

.portal-panel .portal-note {
    color: #5d5053;
    font-size: 10px;
    margin-top: 12px;
}

@keyframes splash-arrive {
    from { opacity: 0; transform: translateY(14px) scale(.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 960px) and (min-width: 761px) {
    .portal-panel .portal-actions { grid-template-columns: 1fr; }
    .portal-panel .portal-button { min-height: 64px; }
}

@media (max-width: 760px) {
    #splash-view {
        min-height: 100dvh;
        padding-bottom: max(22px, env(safe-area-inset-bottom));
    }

    .splash-copy {
        border-radius: 24px;
        margin-top: clamp(52px, 8vh, 76px);
        padding: clamp(22px, 5vw, 30px);
    }

    .splash-copy .eyebrow.light { font-size: 10px; }
    .splash-copy h1 { font-size: clamp(3.4rem, 14vw, 4.5rem); }
    .portal-panel { margin-top: 20px; }
    .portal-panel .portal-actions { grid-template-columns: 1fr; gap: 10px; }
    .portal-panel .portal-button { min-height: 64px; padding: 9px 12px; }
    .portal-icon { flex-basis: 38px; height: 38px; width: 38px; }
    .portal-panel .portal-button-copy strong { font-size: 11px; }
    .portal-panel .portal-button-copy small { font-size: 10px; }
    .portal-panel .portal-note { font-size: 10px; }
}

@media (max-width: 380px) {
    #splash-view { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
    .splash-copy { padding-left: 18px; padding-right: 18px; }
    .splash-copy h1 { font-size: clamp(3.15rem, 15vw, 3.65rem); }
}

@media (prefers-color-scheme: dark) {
    #splash-view { color-scheme: dark; }

    #splash-view::before {
        background:
            linear-gradient(90deg, rgba(15, 16, 22, .56), rgba(15, 16, 22, .32) 43%, rgba(15, 16, 22, .02) 70%),
            linear-gradient(0deg, rgba(12, 13, 18, .38), transparent 55%);
    }

    #splash-view::after {
        background: radial-gradient(ellipse 42% 38% at 100% 100%, rgba(255, 50, 62, .24), transparent 72%);
    }

    .splash-brand { color: #f7f3f3; }
    .splash-brand img { background: rgba(255, 255, 255, .94); }

    .splash-copy {
        background: linear-gradient(145deg, rgba(27, 28, 35, .91), rgba(37, 27, 32, .86));
        border-color: rgba(255, 255, 255, .3);
        box-shadow: 0 28px 76px rgba(0, 0, 0, .35), inset 0 1px rgba(255, 255, 255, .24);
    }

    .splash-copy::before {
        background: linear-gradient(135deg, rgba(255, 255, 255, .14), transparent 48%, rgba(255, 255, 255, .04));
    }

    .splash-copy .eyebrow.light { color: #f2c1c5; }
    .splash-copy h1 { color: #fbf8f8; }
    .splash-copy h1 em {
        background: linear-gradient(130deg, #ef838b 8%, #ffabb0 95%);
        background-clip: text;
        -webkit-background-clip: text;
    }
    .splash-copy > p:not(.eyebrow):not(.portal-note) { color: #e9dddf; }
    .portal-panel h2 { color: #f7eeee; }
    .portal-panel .portal-note { color: #d4c5c8; }
}

@media (prefers-reduced-transparency: reduce) {
    .splash-copy {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background: #fffaf8;
    }
}

@media (prefers-color-scheme: dark) and (prefers-reduced-transparency: reduce) {
    .splash-copy { background: #202127; }
}

@media (prefers-reduced-motion: reduce) {
    .splash-copy { animation: none; }

    .portal-panel .portal-button,
    .portal-panel .portal-button::before,
    .portal-panel .portal-button::after {
        transition: none;
    }
}

/* Account onboarding: keep the existing left scene and refine only its type. */
#auth-view .auth-visual-copy .eyebrow {
    font-family: 'Manrope', 'Space Grotesk', sans-serif;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .12em;
}

#auth-view .auth-visual-copy h1 {
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
    font-size: clamp(2.85rem, 4vw, 4.25rem);
    font-weight: 750;
    letter-spacing: -.068em;
    line-height: .99;
    text-wrap: balance;
}

#auth-view .auth-visual-copy > p:not(.eyebrow) {
    font-family: 'Manrope', 'Space Grotesk', sans-serif;
    font-size: clamp(14px, 1.12vw, 16px);
    font-weight: 500;
    letter-spacing: .005em;
    line-height: 1.72;
}

/* One continuous glass card holds the stepper and the active setup form. */
#auth-view.has-onboarding .auth-panel {
    overflow-y: auto;
    padding-bottom: 24px;
    padding-top: 24px;
}

#auth-view.has-onboarding .auth-panel-inner {
    max-width: 520px;
    transform: translate(-2vw, 0);
}

#onboarding-flow {
    -webkit-backdrop-filter: blur(22px) saturate(1.12);
    backdrop-filter: blur(22px) saturate(1.12);
    background: linear-gradient(150deg, rgba(255, 255, 255, .98), rgba(255, 249, 248, .96));
    border: 1px solid rgba(226, 231, 238, .9);
    border-radius: 26px;
    box-shadow: 0 26px 70px rgba(53, 58, 70, .14), 0 3px 10px rgba(53, 58, 70, .04), inset 0 1px rgba(255, 255, 255, .96);
    box-sizing: border-box;
    margin: 0 auto;
    padding: 24px clamp(22px, 2.5vw, 32px) 30px;
    width: 100%;
}

#onboarding-flow[hidden] { display: none; }

.onboarding-status-banner {
    background: #fff9f6;
    border: 1px solid #fed7aa;
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.05);
}
.onboarding-status-banner[hidden] { display: none !important; }
.onboarding-badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #fdeee7;
    margin-bottom: 9px;
}
.onboarding-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.onboarding-avatar-wrap {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: #fee2e2;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}
.onboarding-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.portal-secondary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 13px;
    color: #475569;
}
.portal-secondary-action .text-button {
    font-size: 13px;
    font-weight: 700;
    color: #b92f3d;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.portal-secondary-action .text-button:hover {
    color: #991b1b;
}

/* Keep the landing actions above decorative layers and reliably hit-testable. */
.splash-copy,
.splash-copy .portal-panel,
.splash-copy .portal-actions,
.splash-copy .portal-button,
.splash-copy .portal-secondary-action,
.splash-copy .portal-secondary-action .text-button {
    pointer-events: auto;
}

.splash-copy .portal-panel,
.splash-copy .portal-secondary-action {
    position: relative;
    z-index: 2;
}

.onboarding-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 750;
    color: #b92f3d;
    background: #fdf2f2;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid #fecaca;
    margin-bottom: 2px;
}
.onboarding-role-badge i { width: 11px; height: 11px; }
.onboarding-user-info strong {
    display: block;
    font-size: 12.5px;
    font-weight: 750;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.onboarding-user-info small {
    display: block;
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.onboarding-alert-notice {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 11.5px;
    color: #9a3412;
    line-height: 1.45;
}
.onboarding-alert-notice i {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-top: 1px;
    color: #ea580c;
}
.onboarding-logout-btn {
    flex-shrink: 0;
    padding: 5px 9px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 8px;
    background: #fff;
}
.onboarding-logout-btn i { width: 12px; height: 12px; }

.onboarding-progress {
    margin-bottom: 26px;
}

.onboarding-progress-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.onboarding-progress-title {
    color: #242936;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: -.015em;
}

.onboarding-step-count {
    color: #687182;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.onboarding-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.onboarding-steps::before,
.onboarding-steps::after {
    content: "";
    height: 2px;
    left: 12.5%;
    position: absolute;
    top: 13px;
}

.onboarding-steps::before {
    background: #e6e8ed;
    width: 75%;
}

.onboarding-steps::after {
    background: #bf3844;
    transition: width .3s ease;
    width: var(--step-progress, 0%);
}

.onboarding-step {
    align-items: center;
    color: #6d7480;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    position: relative;
    text-align: center;
    z-index: 1;
}

.onboarding-step-number {
    align-items: center;
    background: #fff;
    border: 1px solid #d9dee6;
    border-radius: 50%;
    color: #777f8d;
    display: inline-flex;
    font-size: 9px;
    font-weight: 750;
    height: 28px;
    justify-content: center;
    transition: background .24s ease, border-color .24s ease, color .24s ease, box-shadow .24s ease;
    width: 28px;
}

.onboarding-step-label {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.25;
    max-width: 104px;
}

.onboarding-step.is-current { color: #242936; }
.onboarding-step.is-current .onboarding-step-number,
.onboarding-step.is-complete .onboarding-step-number {
    background: #b92f3d;
    border-color: #b92f3d;
    box-shadow: 0 0 0 4px rgba(185, 47, 61, .1);
    color: #fff;
}

.onboarding-step.is-current .onboarding-step-label { font-weight: 750; }
.onboarding-step.is-complete .onboarding-step-label { color: #94303a; }

.onboarding-card.auth-card-active {
    animation: fade-in .24s ease;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    width: 100%;
}

.onboarding-card .eyebrow {
    color: #a8323e;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .13em;
    margin: 0 0 7px;
    text-transform: uppercase;
}

.onboarding-card h2 {
    color: #1e2430;
    font-size: 29px;
    font-weight: 750;
    letter-spacing: -.055em;
    line-height: 1.12;
    margin: 0 0 7px;
}

.onboarding-card .muted {
    color: #626b79;
    font-size: 12px;
    line-height: 1.55;
    margin: 0 0 20px;
}

.onboarding-card .stack-form { gap: 12px; }

.onboarding-card .stack-form label {
    color: #343b48;
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .005em;
}

.onboarding-card .stack-form input {
    background: rgba(255, 255, 255, .9);
    border: 1px solid #d8dee8;
    border-radius: 11px;
    color: #232936;
    font-size: 12px;
    min-height: 45px;
    padding: 11px 13px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.onboarding-card .stack-form .input-icon-wrap input {
    margin-top: 0;
    padding-left: 42px;
}

.onboarding-card .stack-form > label > input,
.onboarding-card .stack-form .password-field {
    margin-top: 7px;
}

.onboarding-card .stack-form .password-field input { margin-top: 0; }

.onboarding-card .stack-form input::placeholder { color: #707988; opacity: 1; }

.onboarding-card .stack-form input:focus-visible {
    background: #fff;
    border-color: #c43d49;
    box-shadow: 0 0 0 3px rgba(196, 61, 73, .14);
    outline: 0;
}

.onboarding-card .button-primary {
    background: linear-gradient(105deg, #c83d49, #b22a3c);
    border-radius: 11px;
    box-shadow: 0 9px 18px rgba(186, 45, 61, .2);
    font-size: 12px;
    font-weight: 750;
    min-height: 46px;
    transition: box-shadow .2s ease, transform .2s ease, filter .2s ease;
}

.onboarding-card .button-primary:hover {
    box-shadow: 0 12px 24px rgba(186, 45, 61, .25);
    filter: saturate(1.06);
    transform: translateY(-1px);
}

.onboarding-card .button-primary:active { transform: translateY(1px) scale(.99); }

.onboarding-card .button-primary:focus-visible,
.onboarding-card .button-outline:focus-visible,
.onboarding-card .text-button:focus-visible {
    outline: 3px solid rgba(174, 43, 55, .35);
    outline-offset: 3px;
}

.onboarding-card .text-button { color: #ae2938; }

@media (max-width: 760px) {
    #auth-view.has-onboarding .auth-panel {
        align-items: flex-start;
        min-height: 100dvh;
        overflow: visible;
        padding: 20px 16px 28px;
    }

    #auth-view.has-onboarding .auth-panel-inner {
        margin: auto;
        max-width: 520px;
        transform: none;
    }

    #onboarding-flow {
        border-radius: 22px;
        padding: 21px 18px 24px;
    }

    .onboarding-progress { margin-bottom: 22px; }
    .onboarding-progress-heading { margin-bottom: 14px; }
    .onboarding-step-label { font-size: 9px; max-width: 74px; }
    .onboarding-step-number { height: 26px; width: 26px; }
    .onboarding-steps::before,
    .onboarding-steps::after { top: 12px; }
    .onboarding-card h2 { font-size: 27px; }
}

@media (max-width: 380px) {
    #onboarding-flow { padding-left: 15px; padding-right: 15px; }
    .onboarding-step-label { font-size: 8.5px; }
    .onboarding-step-number { height: 24px; width: 24px; }
    .onboarding-steps::before,
    .onboarding-steps::after { top: 11px; }
}

@media (prefers-reduced-transparency: reduce) {
    #onboarding-flow {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background: #fff;
    }
}

@media (prefers-reduced-motion: reduce) {
    .onboarding-steps::after,
    .onboarding-step-number,
    .onboarding-card .button-primary,
    .onboarding-card .stack-form input {
        transition: none;
    }
}

/* Present sign-in as a split modal over the softened welcome screen. */
body.auth-overlay-open { overflow: hidden; }

#auth-view.auth-view.is-active {
    align-items: stretch;
    background: transparent;
    box-sizing: border-box;
    display: flex;
    height: 100vh;
    height: 100dvh;
    isolation: isolate;
    inset: 0;
    min-height: 100svh;
    overflow: hidden;
    padding: clamp(16px, 3vw, 44px);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#auth-view.auth-view.is-active::before,
#auth-view.auth-view.is-active::after {
    content: "";
    pointer-events: none;
    position: absolute;
}

#auth-view.auth-view.is-active::before {
    animation: auth-backdrop-in .28s ease both;
    background: rgba(39, 24, 30, .24);
    backdrop-filter: blur(12px) saturate(.82);
    inset: 0;
    -webkit-backdrop-filter: blur(12px) saturate(.82);
    z-index: 0;
}

#auth-view.auth-view.is-active::after {
    animation: auth-shell-in .36s cubic-bezier(.2, .72, .22, 1) both;
    background: url('../background-enhanced.png') center / cover no-repeat;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 28px;
    box-shadow: 0 30px 90px rgba(40, 16, 22, .3), inset 0 1px rgba(255, 255, 255, .82);
    inset: clamp(16px, 3vw, 44px);
    z-index: 1;
}

#auth-view.auth-view.is-active .auth-visual,
#auth-view.auth-view.is-active .auth-panel {
    animation: auth-pane-in .42s cubic-bezier(.2, .72, .22, 1) both;
    min-height: 0;
    position: relative;
    z-index: 2;
}

#auth-view.auth-view.is-active .auth-visual {
    align-items: flex-start;
    background: transparent;
    border-radius: 27px 0 0 27px;
    flex: 1 1 50%;
    justify-content: center;
    padding: clamp(28px, 5vw, 88px) clamp(24px, 6vw, 108px);
    width: 50%;
}

#auth-view.auth-view.is-active .auth-visual-content {
    max-width: 560px;
    width: 100%;
}

#auth-view.auth-view.is-active .auth-panel {
    align-items: center;
    background: transparent;
    border-radius: 0 27px 27px 0;
    box-sizing: border-box;
    display: flex;
    flex: 1 1 50%;
    justify-content: center;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding: clamp(14px, 2vh, 28px) clamp(16px, 2.5vw, 36px);
    scrollbar-width: thin;
    width: 50%;
}

#auth-view.auth-view.is-active .auth-panel-inner {
    margin: auto;
    max-width: 440px;
    transform: none;
    width: 100%;
}

#auth-view .auth-close {
    align-items: center;
    animation: auth-backdrop-in .3s ease both;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(120, 60, 64, .12);
    border-radius: 50%;
    color: #71383d;
    cursor: pointer;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: calc(clamp(16px, 3vw, 44px) + 16px);
    top: calc(clamp(16px, 3vw, 44px) + 16px);
    transition: background .2s ease, color .2s ease, transform .2s ease;
    width: 38px;
    z-index: 3;
}

#auth-view .auth-close:hover {
    background: #fff;
    color: #bd3542;
    transform: rotate(5deg);
}

#auth-view .auth-close:focus-visible {
    outline: 3px solid rgba(174, 43, 55, .55);
    outline-offset: 3px;
}

#auth-view .auth-close svg { height: 17px; width: 17px; }

@keyframes auth-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes auth-shell-in {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes auth-pane-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
    #auth-view.auth-view.is-active {
        align-items: center;
        display: flex;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 12px;
    }

    #auth-view.auth-view.is-active::after { inset: 12px; border-radius: 24px; }
    #auth-view.auth-view.is-active .auth-visual { display: none; }

    #auth-view.auth-view.is-active .auth-panel {
        background: transparent;
        border-radius: 24px;
        flex: 1 0 auto;
        margin: auto;
        max-width: 480px;
        padding: 16px;
        width: 100%;
    }

    #auth-view.auth-view.is-active .auth-panel-inner { max-width: 448px; }
    #auth-view .auth-close { right: 25px; top: 25px; }
}

@media (prefers-reduced-transparency: reduce) {
    #auth-view.auth-view.is-active::before {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    #auth-view.auth-view.is-active::before,
    #auth-view.auth-view.is-active::after,
    #auth-view.auth-view.is-active .auth-visual,
    #auth-view.auth-view.is-active .auth-panel,
    #auth-view .auth-close {
        animation: none;
        transition: none;
    }
}

