/* ============================================================
   STERLINPRIME — AUTH THEME (standalone stylesheet)
   Shared by login.html, register.html, forgot-password.html

   Desktop (>900px): two-column split screen — dark brand panel
   on the left, form panel on the right.

   Mobile (<=900px): brand panel is hidden entirely. Only the
   form shows, as a centered, elevated/floating card on a
   full-bleed branded background.
   ============================================================ */

   /* ============================================================
   STERLINPRIME AUTH SYSTEM
   AI / FINTECH VISUAL THEME
   ============================================================ */


/* ============================================================
   FORM MESSAGE
   ============================================================ */

.form-message {
    display: none;

    margin: 0 0 20px;

    padding: 12px 14px;

    border-radius: 10px;

    font-size: 14px;

    line-height: 1.5;

    border: 1px solid transparent;
}

.form-message.error {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    color: #b42318;

    background: #fef3f2;

    border-color: #fecdca;
}

.form-message.success {
    display: flex;

    align-items: flex-start;

    gap: 10px;

    color: #067647;

    background: #ecfdf3;

    border-color: #abefc6;
}

.form-message::before {
    content: "!";

    display: inline-flex;

    align-items: center;

    justify-content: center;

    flex: 0 0 20px;

    width: 20px;

    height: 20px;

    border-radius: 50%;

    font-size: 12px;

    font-weight: 700;

    background: currentColor;

    color: white;
}


/* ============================================================
   GLOBAL THEME
   Inspired by the supplied AI trading reference
   ============================================================ */

:root {

    /* Main dark/navy */
    --sp-dark: #17153F;
    --sp-dark2: #28225F;

    /* Main violet */
    --sp-accent: #7357E8;
    --sp-accent-soft: #8B6CF5;

    /* Secondary blue */
    --sp-blue: #5D8EF5;

    /* Supporting purple */
    --sp-purple: #A982F5;

    /* Light surfaces */
    --sp-stone: #EEE8FF;
    --sp-ivory: #FFFFFF;

    /* Form fields */
    --sp-field: #F8F7FF;

    /* Text */
    --sp-ink: #202044;
    --sp-muted: #777594;

    /* Borders */
    --sp-border: #D9D4F2;

    /* Error */
    --sp-error: #D84D72;

    /* Success */
    --sp-success: #3D9B76;

    /* Soft colors */
    --sp-pink: #F8E9F5;
    --sp-lavender: #EDE7FF;
}


/* ============================================================
   GLOBAL
   ============================================================ */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    font-family:
        Inter,
        system-ui,
        sans-serif;

    color: var(--sp-ink);

    line-height: 1.6;

    background: var(--sp-stone);
}

a {
    text-decoration: none;

    color: inherit;
}

button {
    font-family: inherit;
}


/* ============================================================
   AUTH SHELL
   ============================================================ */

.auth-shell {
    min-height: 100vh;

    display: grid;

    grid-template-columns: 1fr 1fr;
}


/* ============================================================
   LEFT BRAND PANEL
   ============================================================ */

.auth-brand {

    /*
     * Deep AI / technology gradient.
     * This keeps the desktop brand panel strong
     * while matching the purple theme.
     */

    background:
        radial-gradient(
            circle at 82% 12%,
            rgba(139,108,245,.42),
            transparent 30%
        ),

        radial-gradient(
            circle at 8% 88%,
            rgba(93,142,245,.25),
            transparent 32%
        ),

        linear-gradient(
            145deg,
            #17153F 0%,
            #28225F 55%,
            #3B327F 100%
        );

    color: #FFFFFF;

    padding: 56px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    position: relative;

    overflow: hidden;
}


/* Decorative glow */

.auth-brand::before,
.auth-brand::after {

    content: "";

    position: absolute;

    border-radius: 999px;

    pointer-events: none;

    filter: blur(2px);
}

.auth-brand::before {

    width: 420px;

    height: 420px;

    right: -160px;

    top: -160px;

    background:
        rgba(169,130,245,.18);
}

.auth-brand::after {

    width: 300px;

    height: 300px;

    left: -120px;

    bottom: -140px;

    background:
        rgba(93,142,245,.14);
}

.auth-brand > * {

    position: relative;

    z-index: 1;
}


/* ============================================================
   DESKTOP LOGO
   ============================================================ */

.auth-logo {

    font-size: 19px;

    font-weight: 800;

    letter-spacing: .12em;

    color: #FFFFFF;
}

.auth-logo span {

    color: #A990FF;
}


/* ============================================================
   BRAND TAG
   ============================================================ */

.auth-tag {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    text-transform: uppercase;

    letter-spacing: 1.6px;

    font-size: 10.5px;

    font-weight: 800;

    color: #A990FF;

    margin-bottom: 14px;
}

.auth-tag::before {

    content: "";

    width: 18px;

    height: 2px;

    background: #8B6CF5;
}

.auth-brand .auth-tag {

    margin: 44px 0 16px;
}


/* ============================================================
   BRAND HEADING
   ============================================================ */

.auth-brand h1 {

    font-size:
        clamp(
            28px,
            3.2vw,
            40px
        );

    line-height: 1.15;

    letter-spacing: -.03em;

    margin: 0 0 14px;

    max-width: 420px;

    color: #FFFFFF;
}

.auth-brand p {

    color: #D4D0EE;

    font-size: 15px;

    line-height: 1.75;

    max-width: 370px;

    margin: 0;
}


/* ============================================================
   ROUTE
   ============================================================ */

.route {

    position: relative;

    margin-top: 46px;

    padding-left: 26px;

    display: flex;

    flex-direction: column;

    gap: 28px;
}

.route::before {

    content: "";

    position: absolute;

    left: 4px;

    top: 4px;

    bottom: 4px;

    width: 2px;

    background:
        rgba(169,144,255,.28);
}

.route-dot {

    position: absolute;

    left: 0;

    top: 0;

    width: 10px;

    height: 10px;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #8B6CF5,
            #5D8EF5
        );

    box-shadow:
        0 0 14px rgba(139,108,245,.90);

    animation:
        route-move 6s ease-in-out infinite;
}

@keyframes route-move {

    0%,
    100% {
        top: 0;
    }

    50% {
        top: calc(100% - 10px);
    }
}

.route-stop b {

    display: block;

    font-size: 14px;

    color: #FFFFFF;

    letter-spacing: .01em;
}

.route-stop span {

    font-size: 12px;

    color: #BDB9D8;
}


/* ============================================================
   BRAND FOOTER
   ============================================================ */

.auth-brand-foot {

    font-size: 12px;

    color: #AAA6C8;

    letter-spacing: .02em;
}


/* ============================================================
   RIGHT AUTH PANEL
   ============================================================ */

.auth-panel {

    background:

        radial-gradient(
            circle at 88% 8%,
            rgba(169,130,245,.25),
            transparent 28%
        ),

        radial-gradient(
            circle at 10% 90%,
            rgba(93,142,245,.18),
            transparent 30%
        ),

        linear-gradient(
            145deg,
            #F8EAF5 0%,
            #EEE8FF 48%,
            #E5F0FF 100%
        );

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 60px 24px;

    position: relative;
}


/* ============================================================
   BACK LINK
   ============================================================ */

.auth-back {

    position: absolute;

    top: 28px;

    left: 28px;

    font-size: 12px;

    font-weight: 700;

    color: #68658A;

    transition:
        color .2s ease;
}

.auth-back:hover {

    color: var(--sp-accent);
}


/* ============================================================
   MOBILE LOGO
   ============================================================ */

.auth-logo-mobile {

    display: none;
}


/* ============================================================
   AUTH CARD
   ============================================================ */

.auth-card {

    width: 100%;

    /*
     * Slightly wider to accommodate
     * the paired registration fields.
     */

    max-width: 500px;

    background:
        rgba(255,255,255,.94);

    border:
        1px solid rgba(217,212,242,.95);

    border-radius: 22px;

    padding: 40px 36px;

    box-shadow:
        0 30px 70px rgba(55,45,110,.13),

        0 8px 25px rgba(55,45,110,.07),

        inset 0 1px 0
        rgba(255,255,255,.9);

    position: relative;

    backdrop-filter: blur(12px);

    -webkit-backdrop-filter: blur(12px);
}


/* ============================================================
   CARD TOP ACCENT
   ============================================================ */

.auth-card::before {

    content: "";

    position: absolute;

    top: 0;

    left: 15%;

    right: 15%;

    height: 3px;

    border-radius:
        0 0 10px 10px;

    background:
        linear-gradient(
            90deg,
            var(--sp-accent),
            var(--sp-purple),
            var(--sp-blue)
        );
}


/* ============================================================
   CARD HEADER
   ============================================================ */

.auth-card-head {

    text-align: center;
}

.auth-card-head h2 {

    font-size: 26px;

    margin: 0 0 8px;

    letter-spacing: -.02em;

    line-height: 1.2;

    color: var(--sp-ink);
}

.auth-card-head p {

    color: var(--sp-muted);

    font-size: 13.5px;

    margin: 0 0 26px;

    line-height: 1.65;
}


/* ============================================================
   FORM
   ============================================================ */

.auth-form {

    display: flex;

    flex-direction: column;

    gap: 16px;
}


/* ============================================================
   FIELD PAIRS / REGISTRATION ROWS
   ============================================================ */

.field-pair,
.registration-row {

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 14px;
}


/* ============================================================
   FIELD
   ============================================================ */

.field {

    display: flex;

    flex-direction: column;

    gap: 7px;

    font-size: 13px;

    font-weight: 600;

    color: var(--sp-ink);

    min-width: 0;
}


/* ============================================================
   INPUT
   ============================================================ */

.field input {

    border:
        1px solid
        var(--sp-border);

    background:
        rgba(248,247,255,.95);

    border-radius: 10px;

    padding: 13px 14px;

    font:
        500 14px Inter,
        sans-serif;

    color: var(--sp-ink);

    outline: none;

    width: 100%;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.field input:hover {

    background: #FFFFFF;
}

.field input:focus {

    border-color:
        var(--sp-accent);

    background: #FFFFFF;

    box-shadow:
        0 0 0 3px
        rgba(115,87,232,.14);
}

.field.has-error input {

    border-color:
        var(--sp-error);
}


/* ============================================================
   FIELD ERROR
   ============================================================ */

.field-error {

    font-size: 11.5px;

    color: var(--sp-error);

    display: none;

    margin-top: -2px;
}

.field.has-error .field-error {

    display: block;
}


/* ============================================================
   FIELD HINT
   ============================================================ */

.field-hint {

    font-size: 11px;

    color: var(--sp-muted);

    font-weight: 400;

    margin-top: -2px;
}


/* ============================================================
   PASSWORD
   ============================================================ */

.pw-wrap {

    position: relative;
}

.pw-wrap input {

    padding-right: 44px;
}


/* ============================================================
   PASSWORD TOGGLE
   ============================================================ */

.pw-toggle {

    position: absolute;

    right: 4px;

    top: 0;

    bottom: 0;

    border: 0;

    background: transparent;

    cursor: pointer;

    font-size: 14px;

    color: var(--sp-muted);

    padding: 0 12px;

    transition:
        color .2s ease;
}

.pw-toggle:hover {

    color: var(--sp-accent);
}


/* ============================================================
   PASSWORD STRENGTH
   ============================================================ */

.pw-strength {

    display: flex;

    gap: 5px;

    margin-top: 2px;
}

.pw-strength span {

    height: 4px;

    flex: 1;

    border-radius: 3px;

    background:
        var(--sp-border);

    transition:
        background .25s ease;
}

.pw-strength[data-level="1"]
span:nth-child(1) {

    background:
        var(--sp-error);
}

.pw-strength[data-level="2"]
span:nth-child(-n+2) {

    background:
        #E0A458;
}

.pw-strength[data-level="3"]
span {

    background:
        var(--sp-success);
}


/* ============================================================
   FIELD ROW
   ============================================================ */

.field-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

    font-size: 12.5px;

    flex-wrap: wrap;

    gap: 10px;
}


/* ============================================================
   CHECKBOX
   ============================================================ */

.checkbox {

    display: flex;

    align-items: center;

    gap: 8px;

    color: var(--sp-muted);

    font-weight: 500;

    cursor: pointer;
}

.checkbox input {

    accent-color:
        var(--sp-accent);

    width: 15px;

    height: 15px;
}


/* ============================================================
   AUTH LINKS
   ============================================================ */

.auth-link {

    color:
        var(--sp-accent);

    font-weight: 700;
}

.auth-link:hover {

    color:
        var(--sp-accent-soft);
}


/* ============================================================
   TERMS
   ============================================================ */

.terms {

    display: flex;

    gap: 10px;

    align-items: flex-start;

    font-size: 12px;

    color: var(--sp-muted);

    line-height: 1.55;

    font-weight: 400;
}

.terms input {

    margin-top: 3px;

    accent-color:
        var(--sp-accent);

    width: 15px;

    height: 15px;

    flex-shrink: 0;
}

.terms a {

    color:
        var(--sp-accent);

    font-weight: 700;
}

.terms a:hover {

    color:
        var(--sp-accent-soft);
}


/* ============================================================
   BUTTONS
   ============================================================ */

.btn {

    position: relative;

    overflow: hidden;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    border: 0;

    border-radius: 10px;

    padding: 14px 20px;

    font:
        600 13.5px Inter;

    cursor: pointer;

    transition:
        .2s ease;
}


/* ============================================================
   PRIMARY BUTTON
   ============================================================ */

.btn-gold {

    background:
        linear-gradient(
            135deg,
            #7357E8,
            #8B6CF5 55%,
            #5D8EF5
        );

    color: #FFFFFF;

    width: 100%;

    margin-top: 2px;

    box-shadow:
        0 8px 18px
        rgba(115,87,232,.22);
}

.btn-gold:hover {

    background:
        linear-gradient(
            135deg,
            #6549DC,
            #7D5EEE 55%,
            #4D80EA
        );

    transform:
        translateY(-1px);

    box-shadow:
        0 10px 22px
        rgba(115,87,232,.28);
}

.btn-gold:active {

    transform:
        translateY(0);
}

.btn-gold[disabled] {

    opacity: .7;

    cursor: default;

    transform: none;
}


/* ============================================================
   OUTLINE BUTTON
   ============================================================ */

.btn-outline-auth {

    background:
        rgba(255,255,255,.65);

    border:
        1px solid
        var(--sp-border);

    color:
        var(--sp-ink);

    width: 100%;
}

.btn-outline-auth:hover {

    border-color:
        var(--sp-accent);

    color:
        var(--sp-accent);

    background:
        #FFFFFF;
}


/* ============================================================
   BUTTON RIPPLE
   ============================================================ */

.btn .sp-ripple {

    position: absolute;

    border-radius: 50%;

    transform:
        scale(0);

    animation:
        sp-ripple-anim .6s ease-out forwards;

    background:
        rgba(255,255,255,.45);

    pointer-events: none;
}

@keyframes sp-ripple-anim {

    to {

        transform:
            scale(2.6);

        opacity: 0;
    }
}


/* ============================================================
   AUTH SWITCH
   ============================================================ */

.auth-switch {

    text-align: center;

    font-size: 12.5px;

    color: var(--sp-muted);

    margin: 22px 0 0;
}

.auth-switch a {

    color:
        var(--sp-accent);

    font-weight: 700;
}

.auth-switch a:hover {

    color:
        var(--sp-accent-soft);
}


/* ============================================================
   SUCCESS STATE
   ============================================================ */

.auth-success {

    display: none;

    text-align: center;
}

.auth-success.show {

    display: block;
}

.auth-form.hidden {

    display: none;
}


/* ============================================================
   SUCCESS ICON
   ============================================================ */

.icon-circle {

    width: 52px;

    height: 52px;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            rgba(115,87,232,.13),
            rgba(93,142,245,.16)
        );

    color:
        var(--sp-accent);

    font-size: 22px;

    display: grid;

    place-items: center;

    margin: 0 auto 16px;
}


/* ============================================================
   SUCCESS TEXT
   ============================================================ */

.auth-success p {

    color:
        var(--sp-muted);

    font-size: 13.5px;

    line-height: 1.7;

    margin: 0 0 24px;
}

.auth-success b {

    color:
        var(--sp-ink);
}


/* ============================================================
   RESEND
   ============================================================ */

.resend {

    font-size: 12.5px;

    color:
        var(--sp-muted);

    margin-top: 16px;
}

.resend button {

    background: none;

    border: 0;

    color:
        var(--sp-accent);

    font-weight: 700;

    cursor: pointer;

    padding: 0;

    font-size: 12.5px;
}

.resend button:hover {

    color:
        var(--sp-accent-soft);
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 900px) {

    .auth-shell {

        grid-template-columns:
            1fr;
    }

    .auth-brand {

        display: none;
    }


    /* --------------------------------------------------------
       Mobile background
       -------------------------------------------------------- */

    .auth-panel {

        min-height: 100vh;

        flex-direction: column;

        padding:
            20px 18px 40px;

        background:

            radial-gradient(
                circle at 88% 8%,
                rgba(169,130,245,.34),
                transparent 30%
            ),

            radial-gradient(
                circle at 12% 90%,
                rgba(93,142,245,.24),
                transparent 32%
            ),

            linear-gradient(
                145deg,
                #F9E9F5 0%,
                #EEE8FF 48%,
                #E4F1FF 100%
            );
    }


    /* --------------------------------------------------------
       Back
       -------------------------------------------------------- */

    .auth-back {

        position: static;

        order: -2;

        align-self: flex-start;

        margin:
            0 auto 22px;

        color:
            #68658A;
    }

    .auth-back:hover {

        color:
            var(--sp-accent);
    }


    /* --------------------------------------------------------
       Mobile logo
       -------------------------------------------------------- */

    .auth-logo-mobile {

        display: block;

        order: -3;

        margin:
            0 auto 20px;

        font-size: 19px;

        font-weight: 800;

        letter-spacing: .12em;

        color:
            var(--sp-dark);
    }

    .auth-logo-mobile span {

        color:
            var(--sp-accent);
    }


    /* --------------------------------------------------------
       Card
       -------------------------------------------------------- */

    .auth-card {

        max-width: 520px;

        background:
            rgba(255,255,255,.95);

        border:
            1px solid
            rgba(217,212,242,.95);

        box-shadow:

            0 40px 80px
            rgba(66,52,130,.18),

            0 12px 30px
            rgba(66,52,130,.10),

            inset 0 1px 0
            rgba(255,255,255,.9);

        animation:
            auth-float 7s ease-in-out infinite;
    }


    @keyframes auth-float {

        0%,
        100% {
            transform:
                translateY(0);
        }

        50% {
            transform:
                translateY(-5px);
        }
    }


    /* --------------------------------------------------------
       Header remains original font size
       -------------------------------------------------------- */

    .auth-card-head {

        text-align: center;
    }

    .auth-card-head h2 {

        font-size: 26px;
    }

    .auth-card-head p {

        font-size: 13.5px;
    }


    /* --------------------------------------------------------
       Registration paired fields
       -------------------------------------------------------- */

    .field-pair,
    .registration-row {

        grid-template-columns:
            1fr 1fr;

        gap: 12px;
    }
}


/* ============================================================
   SMALL PHONES
   ============================================================ */

@media (max-width: 480px) {

    .auth-panel {

        padding:
            16px 12px 30px;
    }


    .auth-logo-mobile {

        margin-bottom:
            16px;
    }


    .auth-back {

        margin-bottom:
            18px;
    }


    .auth-card {

        padding:
            30px 22px;

        border-radius:
            18px;
    }


    /*
     * Original font sizes retained.
     * Only spacing is adjusted.
     */

    .auth-form {

        gap:
            13px;
    }


    .field-pair,
    .registration-row {

        gap:
            10px;
    }
}


/* ============================================================
   VERY SMALL PHONES
   ============================================================ */

@media (max-width: 380px) {

    .auth-panel {

        padding:
            14px 10px 26px;
    }


    .auth-card {

        padding:
            27px 18px;

        border-radius:
            17px;
    }


    .auth-form {

        gap:
            12px;
    }


    .field-pair,
    .registration-row {

        gap:
            8px;
    }
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    .auth-card {

        animation:
            none;
    }

    .route-dot {

        animation:
            none;

        top:
            calc(50% - 5px);
    }
}