@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    --auth-bg: #030611;
    --auth-surface: rgba(10, 17, 39, .82);
    --auth-surface-strong: rgba(9, 15, 35, .94);
    --auth-border: rgba(139, 164, 255, .18);
    --auth-text: #f7f9ff;
    --auth-muted: #9aa8c8;
    --auth-blue: #1d8fff;
    --auth-violet: #8148ff;
    --auth-pink: #bc45ff;
    --auth-danger: #ff6f91;
    --auth-success: #58e5bc;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--auth-bg); }
body {
    margin: 0;
    min-height: 100svh;
    color: var(--auth-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 82% 12%, rgba(89, 53, 255, .19), transparent 28rem),
        radial-gradient(circle at 15% 88%, rgba(0, 127, 255, .14), transparent 32rem),
        #030611;
}
a { color: inherit; }
button, input { font: inherit; }

.auth-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
}

.auth-shell::before,
.auth-shell::after {
    content: "";
    position: fixed;
    z-index: -1;
    width: 34rem;
    height: 34rem;
    border-radius: 999px;
    filter: blur(85px);
    opacity: .24;
    pointer-events: none;
}
.auth-shell::before { right: -13rem; bottom: -15rem; background: #5c25ff; }
.auth-shell::after { left: -17rem; top: -16rem; background: #006eff; }

/* HERO */
.auth-hero {
    --hero-image: none;
    position: relative;
    min-height: 100svh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: clamp(34px, 4vw, 66px) clamp(34px, 5vw, 82px) 34px;
    border-right: 1px solid rgba(134, 157, 255, .12);
    background:
        linear-gradient(90deg, rgba(3, 7, 20, .18), rgba(2, 5, 17, .52)),
        radial-gradient(circle at 70% 58%, rgba(43, 104, 255, .18), transparent 34%),
        linear-gradient(155deg, #050b20 0%, #06102a 52%, #080b20 100%);
}
.auth-hero.is-login { --hero-image: url('/images/auth/login-hero.webp'); }
.auth-hero.is-signup { --hero-image: url('/images/auth/signup-hero.webp'); }

.auth-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--hero-image);
    background-repeat: no-repeat;
    background-size: min(74%, 760px) auto;
    background-position: right 56%;
    opacity: .88;
    filter: saturate(1.08) contrast(1.02) drop-shadow(0 0 28px rgba(46, 105, 255, .32));
    pointer-events: none;
}
.auth-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(3, 7, 20, .92) 0%, rgba(3, 7, 20, .72) 35%, rgba(3, 7, 20, .16) 72%, rgba(3, 7, 20, .30) 100%),
        linear-gradient(0deg, rgba(3, 7, 20, .70) 0%, transparent 33%, rgba(3, 7, 20, .16) 78%, rgba(3, 7, 20, .54) 100%);
    pointer-events: none;
}

.auth-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: .2;
    background-image:
        linear-gradient(rgba(104, 139, 255, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(104, 139, 255, .08) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, transparent 2%, #000 45%, #000 100%);
}

.auth-brand,
.auth-hero-copy,
.auth-feature-row { position: relative; z-index: 2; }

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    text-decoration: none;
}
.auth-logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(115, 157, 255, .34);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(29,143,255,.22), rgba(129,72,255,.19));
    box-shadow: 0 0 26px rgba(72, 91, 255, .22), inset 0 0 18px rgba(255,255,255,.06);
}
.auth-logo svg { width: 25px; height: 25px; }
.auth-brand-name {
    font-family: "Space Grotesk", sans-serif;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.auth-hero-copy {
    max-width: 530px;
    margin-top: clamp(78px, 13vh, 150px);
}
.auth-kicker {
    display: inline-flex;
    padding: 8px 13px;
    border-radius: 999px;
    border: 1px solid rgba(103, 141, 255, .27);
    background: rgba(22, 31, 72, .42);
    color: #c2ccff;
    font-size: 12px;
    font-weight: 600;
    box-shadow: inset 0 0 14px rgba(97, 83, 255, .08);
    backdrop-filter: blur(12px);
}
.auth-hero h1 {
    margin: 22px 0 15px;
    max-width: 520px;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(42px, 4.2vw, 67px);
    line-height: .99;
    letter-spacing: -.055em;
    text-shadow: 0 8px 32px rgba(0,0,0,.35);
}
.auth-gradient-text {
    background: linear-gradient(105deg, #55b9ff 8%, #8c6dff 54%, #d768ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.auth-hero-copy > p {
    margin: 0;
    max-width: 465px;
    color: #a9b7d7;
    font-size: 15px;
    line-height: 1.75;
}

.auth-feature-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: auto;
    max-width: 640px;
    padding-top: 34px;
}
.auth-feature {
    min-width: 0;
    padding: 13px 9px 10px;
    border: 1px solid rgba(124, 150, 255, .11);
    border-radius: 14px;
    background: rgba(7, 13, 35, .34);
    backdrop-filter: blur(10px);
}
.auth-feature-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    margin-bottom: 9px;
    border-radius: 10px;
    color: #9bc6ff;
    border: 1px solid rgba(96, 133, 255, .22);
    background: rgba(37, 55, 119, .28);
}
.auth-feature-icon svg { width: 18px; height: 18px; }
.auth-feature b {
    display: block;
    font-size: 11px;
    line-height: 1.25;
    color: #e9edff;
    white-space: nowrap;
}
.auth-feature span {
    display: block;
    margin-top: 3px;
    color: #7583a8;
    font-size: 9px;
    line-height: 1.3;
}

/* FORM SIDE */
.auth-panel {
    position: relative;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: clamp(26px, 4vw, 58px);
    background:
        radial-gradient(circle at 85% 15%, rgba(104, 64, 255, .11), transparent 22rem),
        linear-gradient(180deg, rgba(5, 9, 25, .97), rgba(4, 8, 20, .98));
}
.auth-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, rgba(33, 116, 255, .07), transparent 50%);
}
.auth-card {
    position: relative;
    z-index: 1;
    width: min(100%, 500px);
    padding: 24px;
    border: 1px solid rgba(139, 166, 255, .24);
    border-radius: 25px;
    background:
        linear-gradient(180deg, rgba(14, 23, 51, .90), rgba(7, 13, 31, .90));
    box-shadow:
        0 28px 70px rgba(0, 0, 0, .42),
        0 0 0 1px rgba(255,255,255,.018) inset,
        0 0 44px rgba(67, 69, 255, .10);
    backdrop-filter: blur(20px);
}
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 27px;
    padding: 4px;
    border: 1px solid rgba(133, 152, 222, .17);
    border-radius: 14px;
    background: rgba(5, 10, 25, .62);
}
.auth-tab {
    display: grid;
    place-items: center;
    min-height: 48px;
    border-radius: 10px;
    color: #a8b4d1;
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: .2s ease;
}
.auth-tab:hover { color: #fff; background: rgba(54, 76, 160, .18); }
.auth-tab.active {
    color: #fff;
    border: 1px solid rgba(70, 143, 255, .43);
    background: linear-gradient(110deg, #245de0, #5a2ee5);
    box-shadow: 0 8px 25px rgba(55, 66, 255, .18), inset 0 1px rgba(255,255,255,.12);
}

.auth-card h2 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 26px;
    line-height: 1.15;
    letter-spacing: -.035em;
}
.auth-subtitle {
    margin: 7px 0 25px;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.55;
}

.auth-alert {
    margin: 0 0 17px;
    padding: 11px 13px;
    border-radius: 11px;
    font-size: 12px;
    line-height: 1.5;
}
.auth-alert.success { color: #bafce8; border: 1px solid rgba(88,229,188,.2); background: rgba(31,139,107,.13); }
.auth-alert.error { color: #ffd0dc; border: 1px solid rgba(255,111,145,.2); background: rgba(175,38,80,.13); }

.auth-field { margin-bottom: 16px; }
.auth-field label {
    display: block;
    margin-bottom: 7px;
    color: #e5e9f7;
    font-size: 12px;
    font-weight: 600;
}
.auth-input-wrap { position: relative; }
.auth-input-icon,
.auth-password-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #7180a2;
}
.auth-input-icon { left: 14px; width: 18px; height: 18px; pointer-events: none; }
.auth-input-wrap input {
    width: 100%;
    height: 52px;
    padding: 0 43px 0 44px;
    border: 1px solid rgba(130, 149, 204, .20);
    border-radius: 10px;
    outline: none;
    color: #f8faff;
    background: rgba(11, 20, 46, .73);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.auth-input-wrap input::placeholder { color: #687695; }
.auth-input-wrap input:focus {
    border-color: rgba(72, 130, 255, .65);
    background: rgba(14, 25, 58, .88);
    box-shadow: 0 0 0 3px rgba(64, 105, 255, .10), 0 0 23px rgba(56, 89, 255, .07);
}
.auth-input-wrap.has-error input { border-color: rgba(255,111,145,.65); }
.auth-password-toggle {
    right: 9px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
}
.auth-password-toggle:hover { background: rgba(255,255,255,.05); color: #bec9e5; }
.auth-password-toggle svg { width: 17px; height: 17px; }
.auth-field-error { display: block; margin-top: 6px; color: #ff9ab0; font-size: 11px; }

.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 2px 0 20px;
}
.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #b3bdd5;
    font-size: 12px;
    cursor: pointer;
}
.auth-check input { width: 16px; height: 16px; accent-color: #4a5fff; }
.auth-link { color: #bd76ff; font-size: 12px; text-decoration: none; }
.auth-link:hover { color: #d8aaff; text-decoration: underline; }
.auth-link.is-disabled { opacity: .58; cursor: default; text-decoration: none; }

.auth-submit {
    width: 100%;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(100deg, #178cff 0%, #5c4dff 52%, #b243ee 100%);
    box-shadow: 0 14px 30px rgba(52, 72, 255, .20), inset 0 1px rgba(255,255,255,.22);
    transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.auth-submit:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 18px 34px rgba(69, 65, 255, .27); }
.auth-submit:active { transform: translateY(0); }
.auth-submit svg { width: 17px; height: 17px; }

.auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    color: #7784a2;
    font-size: 10px;
}
.auth-divider::before,
.auth-divider::after { content: ""; height: 1px; background: rgba(128,145,194,.16); }

.auth-socials { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-social {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid rgba(134, 153, 202, .17);
    border-radius: 9px;
    color: #a7b0c7;
    background: rgba(7, 13, 30, .48);
    font-size: 11px;
    cursor: pointer;
    opacity: 1;
    text-decoration: none;
    transition: border-color .18s ease, background .18s ease, transform .18s ease, color .18s ease;
}
.auth-social:hover {
    color: #f8faff;
    border-color: rgba(102, 130, 255, .42);
    background: rgba(30, 45, 92, .54);
    transform: translateY(-1px);
}
.auth-social svg { width: 17px; height: 17px; }


.auth-social-legal {
    margin: 12px auto 0;
    max-width: 430px;
    color: #667491;
    font-size: 9px;
    line-height: 1.55;
    text-align: center;
}
.auth-social-legal a { color: #9b7bea; text-decoration: none; }
.auth-social-legal a:hover { text-decoration: underline; }

.auth-recovery-card { max-width: 500px; }
.auth-recovery-badge {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border: 1px solid rgba(88, 135, 255, .28);
    border-radius: 14px;
    color: #a5c4ff;
    background: linear-gradient(145deg, rgba(29,143,255,.16), rgba(129,72,255,.15));
    box-shadow: 0 12px 32px rgba(38, 75, 255, .12), inset 0 1px rgba(255,255,255,.06);
}
.auth-recovery-badge svg { width: 24px; height: 24px; }
.auth-recovery-note {
    margin: -6px 0 20px;
    padding: 11px 13px;
    border: 1px solid rgba(129, 150, 213, .13);
    border-radius: 10px;
    color: #8491ad;
    background: rgba(7, 13, 30, .38);
    font-size: 10px;
    line-height: 1.55;
}
.auth-back-row {
    margin-top: 19px;
    text-align: center;
    color: #8794b0;
    font-size: 12px;
}
.auth-back-row a { color: #bd76ff; text-decoration: none; font-weight: 600; }
.auth-back-row a:hover { text-decoration: underline; }

.auth-switch-copy {
    margin: 21px 0 0;
    color: #8e9ab6;
    font-size: 12px;
    text-align: center;
}
.auth-switch-copy a { color: #bd76ff; text-decoration: none; font-weight: 600; }
.auth-switch-copy a:hover { text-decoration: underline; }
.auth-legal {
    margin: 0 0 20px;
    color: #8d9ab6;
    font-size: 11px;
    line-height: 1.55;
}
.auth-legal a { color: #be7cff; text-decoration: none; }
.auth-legal a:hover { text-decoration: underline; }

.auth-home-link {
    position: absolute;
    z-index: 2;
    top: 22px;
    right: 25px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #7f8dab;
    font-size: 11px;
    text-decoration: none;
}
.auth-home-link:hover { color: #d5dcf3; }
.auth-home-link svg { width: 14px; height: 14px; }

/* RESPONSIVE */
@media (max-width: 1080px) {
    .auth-shell { grid-template-columns: minmax(0, .95fr) minmax(390px, 1.05fr); }
    .auth-hero { padding-left: 42px; padding-right: 42px; }
    .auth-hero::before { background-size: 88% auto; background-position: 120% 61%; opacity: .78; }
    .auth-hero h1 { font-size: clamp(38px, 5vw, 52px); }
    .auth-feature span { display: none; }
}

@media (max-width: 820px) {
    body { background: #030611; }
    .auth-shell { display: block; min-height: 100svh; overflow: visible; }
    .auth-hero {
        min-height: 300px;
        height: 300px;
        padding: 22px 22px 0;
        border-right: 0;
        border-bottom: 1px solid rgba(134,157,255,.11);
    }
    .auth-hero::before {
        background-size: 310px auto;
        background-position: 72% 54%;
        opacity: .84;
    }
    .auth-hero::after {
        background:
            linear-gradient(90deg, rgba(3,7,20,.90) 0%, rgba(3,7,20,.52) 44%, rgba(3,7,20,.10) 100%),
            linear-gradient(0deg, #030611 0%, rgba(3,7,20,.28) 48%, rgba(3,7,20,.40) 100%);
    }
    .auth-brand { gap: 9px; }
    .auth-logo { width: 35px; height: 35px; border-radius: 11px; }
    .auth-logo svg { width: 21px; height: 21px; }
    .auth-brand-name { font-size: 18px; }
    .auth-hero-copy { margin-top: 42px; max-width: 290px; }
    .auth-kicker { padding: 6px 10px; font-size: 10px; }
    .auth-hero h1 { margin: 13px 0 9px; max-width: 270px; font-size: 32px; line-height: 1.03; }
    .auth-hero-copy > p { max-width: 270px; font-size: 11px; line-height: 1.5; }
    .auth-feature-row { display: none; }

    .auth-panel {
        min-height: auto;
        margin-top: -38px;
        padding: 0 14px 28px;
        background: transparent;
    }
    .auth-card { width: min(100%, 520px); padding: 19px; border-radius: 21px; }
    .auth-home-link { display: none; }
}

@media (max-width: 480px) {
    .auth-hero { height: 245px; min-height: 245px; padding: 18px 17px 0; }
    .auth-hero::before { background-size: 245px auto; background-position: 96% 56%; opacity: .80; }
    .auth-hero-copy { margin-top: 30px; max-width: 210px; }
    .auth-kicker { display: none; }
    .auth-hero h1 { font-size: 27px; max-width: 220px; margin-top: 0; }
    .auth-hero-copy > p { display: none; }
    .auth-panel { margin-top: -30px; padding-left: 10px; padding-right: 10px; }
    .auth-card { padding: 16px; border-radius: 19px; }
    .auth-tabs { margin-bottom: 20px; }
    .auth-tab { min-height: 43px; font-size: 13px; }
    .auth-card h2 { font-size: 23px; }
    .auth-subtitle { margin-bottom: 20px; }
    .auth-input-wrap input { height: 49px; }
    .auth-form-row { align-items: flex-start; }
    .auth-socials { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.auth-logo-orbit{overflow:hidden;background:#050817!important;padding:0!important}
.auth-logo-orbit img{width:100%;height:100%;object-fit:cover;display:block;transform:scale(1.06)}
