:root{
    --auth-bg:#090b12;
    --auth-panel:#10101c;
    --auth-panel-2:#1c1a2b;
    --auth-line:#393450;
    --auth-text:#f7f5ff;
    --auth-muted:#9692b1;
    --auth-accent:#b18cff;
    --auth-accent-2:#6b2be8;
    --auth-danger:#ff9da8;
    --auth-success:#91e6bd;
}

*{box-sizing:border-box}
html,body{
    width:100%;
    height:100%;
    min-height:0;
    margin:0;
    overflow:hidden;
    overscroll-behavior:none;
}
body{
    height:100dvh;
    min-height:0;
    background:
        radial-gradient(circle at 50% -18%, rgba(107,43,232,.18), transparent 42%),
        linear-gradient(180deg,#0b0d14 0%,#090b12 100%);
    color:var(--auth-text);
    font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
button,input{font:inherit}
button{cursor:pointer}
a{color:inherit}

.auth-welcome-shell{
    height:100dvh;
    min-height:0;
    max-height:100dvh;
    display:flex;
    justify-content:center;
    padding:12px 24px 24px;
    overflow:hidden;
}
.auth-welcome{
    width:min(100%,620px);
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    padding-top:clamp(44px,12vh,140px);
}
.auth-welcome-brand{
    display:inline-block;
    color:transparent;
    background:linear-gradient(180deg,#e9b8ff 0%,#bb7eff 36%,#6334f1 100%);
    -webkit-background-clip:text;
    background-clip:text;
    font-size:clamp(64px,13vw,104px);
    font-weight:900;
    letter-spacing:-.065em;
    line-height:.88;
    text-decoration:none;
    text-shadow:0 8px 34px rgba(95,47,255,.18);
}
.auth-welcome-kicker{
    margin:22px 0 0;
    color:#aba1e0;
    font-size:clamp(10px,2.1vw,16px);
    font-weight:600;
    letter-spacing:.24em;
    white-space:nowrap;
}
.auth-welcome-kicker span{
    margin:0 8px;
    color:#7660cf;
}
.auth-welcome-copy{
    margin-top:clamp(38px,10vh,102px);
}
.auth-welcome-copy h1{
    margin:0;
    color:#fbfaff;
    font-size:clamp(36px,7vw,58px);
    font-weight:800;
    letter-spacing:-.045em;
    line-height:1.08;
}
.auth-welcome-copy p{
    margin:20px 0 0;
    color:#aaa4c1;
    font-size:clamp(23px,4.5vw,35px);
    line-height:1.2;
}
.auth-welcome-actions{
    width:min(100%,540px);
    display:grid;
    gap:clamp(14px,2.5vh,25px);
    margin-top:clamp(34px,7vh,84px);
}
.auth-welcome-button{
    width:100%;
    min-height:clamp(58px,8.5vh,86px);
    display:grid;
    place-items:center;
    border-radius:999px;
    font-size:clamp(20px,3.7vw,28px);
    font-weight:750;
    letter-spacing:-.02em;
    text-decoration:none;
    transition:transform .16s ease,filter .16s ease,background .16s ease;
}
.auth-welcome-button:hover{
    filter:brightness(1.1);
    transform:translateY(-2px);
}
.auth-welcome-primary{
    color:#fff;
    background:linear-gradient(100deg,#5e23f2 0%,#7650ff 48%,#8b5cf6 100%);
    box-shadow:0 16px 34px rgba(77,34,225,.32);
}
.auth-welcome-secondary{
    color:#f5f1ff;
    border:2px solid transparent;
    background:
        linear-gradient(#090811,#090811) padding-box,
        linear-gradient(100deg,#5422ed,#9f68ff) border-box;
}
.auth-welcome-divider{
    display:flex;
    align-items:center;
    gap:16px;
    margin:3px 0 0;
    color:#8d87a8;
    font-size:14px;
    font-weight:700;
    letter-spacing:.16em;
}
.auth-welcome-divider::before,
.auth-welcome-divider::after{
    content:"";
    height:1px;
    flex:1;
    background:#3d365b;
}
.auth-welcome-actions .google-button-stage{
    min-height:70px;
}
.auth-welcome-actions .google-button{
    min-height:70px;
}
.auth-welcome-message{
    min-height:0;
    margin:10px 0 0;
}

.auth-shell{
    height:100dvh;
    min-height:0;
    max-height:100dvh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:12px 16px;
    overflow:hidden;
}
.auth-card{
    width:100%;
    max-width:460px;
    background:rgba(13,17,35,.96);
    border:1px solid var(--auth-line);
    border-radius:26px;
    padding:30px;
    box-shadow:0 24px 70px rgba(0,0,0,.42);
    max-height:calc(100dvh - 24px);
    overflow:hidden;
}
.auth-card--login{
    max-width:680px;
    padding:28px 32px 30px;
    border-radius:24px;
    background:rgba(16,16,28,.94);
    box-shadow:0 30px 90px rgba(0,0,0,.48);
}
.auth-card--standalone{
    max-width:460px;
    padding:30px;
}
.auth-card--standalone .auth-brand{
    display:block;
    margin:0 0 26px;
    color:#a986ff;
    font-size:12px;
    font-weight:800;
    letter-spacing:.24em;
}
.auth-card--standalone .auth-title{font-size:32px}
.auth-card--standalone .auth-subtitle{
    margin:10px 0 26px;
    font-size:14px;
    line-height:1.55;
}
.auth-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
}
.auth-brand{
    margin:0;
    color:#a986ff;
    font-size:42px;
    line-height:.95;
    font-weight:850;
    letter-spacing:-.055em;
    text-decoration:none;
}
.auth-tagline{
    margin:2px 0 0;
    color:#827d9e;
    font-size:14px;
    line-height:1.45;
    text-align:right;
}
.auth-kicker{
    margin:10px 0 25px;
    color:#817b9e;
    font-size:10px;
    font-weight:700;
    letter-spacing:.2em;
}
.auth-kicker span{
    margin:0 7px;
    color:#615b78;
}
.auth-create{
    display:flex;
    align-items:center;
    gap:18px;
    min-height:118px;
    padding:18px 22px;
    border:1px solid rgba(173,116,255,.25);
    border-radius:22px;
    color:#fff;
    background:linear-gradient(110deg,#4e20b7 0%,#7738ed 58%,#7542e8 100%);
    box-shadow:0 14px 30px rgba(67,25,159,.24);
    text-decoration:none;
    transition:transform .15s ease,filter .15s ease;
}
.auth-create:hover{
    filter:brightness(1.08);
    transform:translateY(-1px);
}
.auth-create-icon{
    width:66px;
    height:66px;
    flex:0 0 66px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:rgba(30,4,107,.32);
}
.auth-create-copy{
    display:grid;
    gap:3px;
    min-width:0;
}
.auth-create-copy small{
    color:#c5adff;
    font-size:12px;
    font-weight:700;
    letter-spacing:.1em;
}
.auth-create-copy strong{
    font-size:25px;
    line-height:1.1;
    letter-spacing:-.025em;
}
.auth-create-copy em{
    color:#ded2ff;
    font-size:15px;
    font-style:normal;
}
.auth-create-arrow{
    margin-left:auto;
    font-size:43px;
    font-weight:300;
    line-height:1;
}
.auth-login-panel{
    margin-top:14px;
    padding:26px 22px 20px;
    border:1px solid rgba(74,69,104,.7);
    border-radius:22px;
}
.auth-login-panel .auth-title{
    font-size:38px;
}
.auth-title{
    margin:0;
    font-size:32px;
    line-height:1.08;
    letter-spacing:-.03em;
}
.auth-subtitle{
    margin:9px 0 25px;
    color:var(--auth-muted);
    line-height:1.45;
    font-size:18px;
    max-width:540px;
}

.google-wrap{margin-top:18px}
.google-button-stage{
    position:relative;
    width:100%;
    min-height:58px;
}
.google-button{
    width:100%;
    min-height:58px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:16px;
    border:1px solid #dedee7;
    border-radius:14px;
    background:#fff;
    color:#171726;
    font-weight:750;
    font-size:17px;
    box-shadow:0 2px 0 rgba(0,0,0,.08);
}
.google-button svg{flex:0 0 auto}
.google-button-host{
    position:absolute;
    inset:0;
    z-index:2;
    width:100%;
    min-height:58px;
    display:flex;
    justify-content:center;
    overflow:hidden;
    opacity:0;
}
.google-button-host>div{max-width:100%;min-width:0}

.auth-divider{
    display:flex;
    align-items:center;
    gap:12px;
    margin:22px 0 18px;
    color:#707896;
    font-size:14px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.12em;
}
.auth-divider::before,.auth-divider::after{
    content:"";
    height:1px;
    flex:1;
    background:var(--auth-line);
}

.auth-form{display:grid;gap:17px}
.auth-field{display:grid;gap:8px}
.auth-field label{font-size:16px;font-weight:600;color:#f0eef8}
.auth-input-wrap{position:relative}
.auth-input-wrap svg{
    position:absolute;
    left:18px;
    top:50%;
    width:25px;
    height:25px;
    color:#817d9f;
    transform:translateY(-50%);
    pointer-events:none;
}
.auth-field input{
    width:100%;
    min-height:58px;
    border:1px solid #4a4564;
    border-radius:16px;
    background:var(--auth-panel-2);
    color:var(--auth-text);
    padding:14px 48px 14px 64px;
    outline:none;
    transition:border-color .15s,box-shadow .15s;
}
.auth-field input::placeholder{color:#7f7b9b}
.auth-field input:focus{
    border-color:var(--auth-accent);
    box-shadow:0 0 0 3px rgba(168,156,255,.12);
}
.auth-password-toggle{
    position:absolute;
    top:50%;
    right:14px;
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border:0;
    border-radius:9px;
    background:transparent;
    color:#8984a4;
    transform:translateY(-50%);
}
.auth-password-toggle:hover{background:rgba(255,255,255,.06);color:#c8c3e2}
.auth-hint{font-size:12px;color:var(--auth-muted);line-height:1.4}
.auth-submit{
    width:100%;
    min-height:60px;
    border:1px solid rgba(206,175,255,.3);
    border-radius:16px;
    padding:14px 18px;
    background:linear-gradient(105deg,#7731e9,#ac8dff);
    color:#fff;
    font-size:18px;
    font-weight:800;
    margin-top:1px;
    box-shadow:0 10px 24px rgba(85,35,190,.24);
    transition:filter .15s ease,transform .15s ease;
}
.auth-submit:hover{filter:brightness(1.08);transform:translateY(-1px)}
.auth-submit:disabled{opacity:.65;cursor:wait}
.auth-help{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-top:-2px;
    font-size:15px;
}
.auth-help a,.auth-help button{
    color:#aa8dff;
    font:inherit;
    text-decoration:none;
}
.auth-help a:hover,.auth-help button:hover{text-decoration:underline}
.auth-help button{
    border:0;
    padding:0;
    background:transparent;
    color:#8f8aa9;
    cursor:pointer;
}
.auth-message{
    min-height:20px;
    margin:14px 0 0;
    color:var(--auth-danger);
    font-size:13px;
    line-height:1.45;
}
.auth-message.success{color:var(--auth-success)}
.auth-footer{
    margin:24px 0 0;
    text-align:center;
    color:var(--auth-muted);
    font-size:13px;
}
.auth-footer a{color:#a89cff;text-decoration:none;font-weight:700}
.auth-footer a:hover{text-decoration:underline}
.auth-terms{
    margin:25px 0 0;
    color:#8a86a2;
    font-size:13px;
    line-height:1.45;
    text-align:center;
}
.auth-terms a{color:#a88bff;text-decoration:none}
.auth-terms a:hover{text-decoration:underline}

/* Keep the shared registration screen on its original, compact layout. */
.auth-card:not(.auth-card--login) .auth-brand{
    margin:0 0 26px;
    color:#a89cff;
    font-size:12px;
    font-weight:800;
    letter-spacing:.24em;
}
.auth-card:not(.auth-card--login) .auth-subtitle{
    margin:10px 0 26px;
    line-height:1.55;
    font-size:14px;
}
.auth-card:not(.auth-card--login) .google-wrap{
    margin-top:0;
    margin-bottom:20px;
}
.auth-card:not(.auth-card--login) .google-button-host{
    position:static;
    width:100%;
    min-height:44px;
    display:flex;
    justify-content:center;
    overflow:hidden;
    opacity:1;
}
.auth-card:not(.auth-card--login) .auth-divider{
    margin:20px 0;
    font-size:12px;
    font-weight:400;
}
.auth-card:not(.auth-card--login) .auth-form{gap:16px}
.auth-card:not(.auth-card--login) .auth-field{gap:7px}
.auth-card:not(.auth-card--login) .auth-field label{
    font-size:13px;
    font-weight:700;
    color:#dfe2f4;
}
.auth-card:not(.auth-card--login) .auth-field input{
    min-height:0;
    border-radius:14px;
    padding:13px 14px;
}
.auth-card:not(.auth-card--login) .auth-submit{
    min-height:0;
    border:0;
    border-radius:14px;
    padding:14px 18px;
    font-size:inherit;
    margin-top:2px;
    box-shadow:none;
}

.manual-toggle{
    width:100%;
    border:1px solid var(--auth-line);
    border-radius:14px;
    background:transparent;
    color:#c8cdef;
    padding:12px 14px;
    font-size:13px;
    font-weight:700;
}
.manual-toggle:hover{background:rgba(255,255,255,.025)}
.manual-area{display:none}
.manual-area.open{display:block}

.auth-note{
    margin-top:18px;
    padding:11px 13px;
    border:1px solid rgba(130,145,255,.15);
    border-radius:13px;
    background:rgba(130,145,255,.06);
    color:#969dbd;
    font-size:12px;
    line-height:1.5;
}

@media(max-width:480px){
    .auth-shell{padding:12px}
    .auth-welcome-shell{padding:12px 24px 24px}
    .auth-welcome{padding-top:clamp(44px,12vh,120px)}
    .auth-welcome-kicker{letter-spacing:.14em}
    .auth-welcome-kicker span{margin:0 4px}
    .auth-welcome-copy{margin-top:clamp(38px,10vh,94px)}
    .auth-welcome-copy p{margin-top:16px}
    .auth-welcome-actions{gap:clamp(14px,2.5vh,24px);margin-top:clamp(34px,7vh,76px)}
    .auth-welcome-button{min-height:clamp(58px,8.5vh,74px)}
    .auth-card{padding:18px 16px;border-radius:20px}
    .auth-card--login{padding:18px 16px 16px}
    .auth-brand{font-size:34px}
    .auth-tagline{font-size:12px}
    .auth-kicker{font-size:9px;letter-spacing:.15em}
    .auth-kicker span{margin:0 4px}
    .auth-create{gap:12px;padding:15px 14px;border-radius:18px}
    .auth-create-icon{width:56px;height:56px;flex-basis:56px}
    .auth-create-copy small{font-size:10px}
    .auth-create-copy strong{font-size:20px}
    .auth-create-copy em{font-size:13px}
    .auth-create-arrow{font-size:34px}
    .auth-login-panel{padding:18px 14px 16px;border-radius:18px}
    .auth-login-panel .auth-title{font-size:30px}
    .auth-subtitle{font-size:14px}
    .auth-card:not(.auth-card--login) .auth-brand{
        margin:0 0 26px;
        font-size:12px;
    }
    .auth-card:not(.auth-card--login) .auth-subtitle{font-size:14px}
}

@media(max-height:850px){
    .auth-card{
        padding:18px 16px;
    }
    .auth-card--standalone{
        padding:18px 18px 16px;
    }
    .auth-card--standalone .auth-brand{
        margin-bottom:12px;
    }
    .auth-card--standalone .auth-subtitle{
        margin:6px 0 14px;
        line-height:1.35;
    }
    .auth-title{font-size:28px}
    .auth-form{gap:9px}
    .auth-field{gap:4px}
    .auth-field label{font-size:12px}
    .auth-field input{
        min-height:44px;
        padding-top:10px;
        padding-bottom:10px;
    }
    .auth-submit{
        min-height:46px;
        padding:10px 14px;
    }
    .auth-help{font-size:12px}
    .auth-divider{margin:10px 0}
    .google-wrap{margin-top:10px}
    .google-button-stage,
    .google-button{
        min-height:46px;
    }
    .auth-message{
        min-height:14px;
        margin:8px 0 0;
    }
    .auth-terms{
        margin-top:12px;
        font-size:11px;
    }
    .auth-footer{
        margin-top:10px;
        font-size:12px;
    }
    .auth-card:not(.auth-card--login) .auth-brand{
        margin-bottom:12px;
    }
    .auth-card:not(.auth-card--login) .auth-subtitle{
        margin:6px 0 14px;
    }
    .auth-card:not(.auth-card--login) .auth-form{gap:9px}
    .auth-card:not(.auth-card--login) .auth-field input{
        min-height:44px;
        padding:10px 12px;
    }
    .auth-card:not(.auth-card--login) .google-wrap{
        margin-top:0;
        margin-bottom:8px;
    }
}
