:root {
    --bg: #040609;
    --panel: rgba(10, 15, 22, .88);
    --panel-soft: rgba(255, 255, 255, .035);
    --line: rgba(255, 255, 255, .105);
    --line-strong: rgba(132, 214, 255, .25);
    --text: #f7faff;
    --muted: #96a5b8;
    --blue: #4ea9ff;
    --blue-2: #8be7ff;
    --blue-deep: #176fff;
    --danger: #ff7878;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --shadow: 0 38px 110px rgba(0, 0, 0, .48);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; overflow-x: hidden; background: var(--bg); }
body {
    min-width: 320px;
    min-height: 100svh;
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 10%, rgba(23,111,255,.12), transparent 30rem),
        radial-gradient(circle at 92% 88%, rgba(139,231,255,.08), transparent 32rem),
        linear-gradient(145deg, #030507, #070a0f 48%, #040609);
    font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { color: #061321; background: var(--blue-2); }

.skip-link {
    position: fixed;
    z-index: 9999;
    top: .75rem;
    left: .75rem;
    transform: translateY(-160%);
    border-radius: .8rem;
    padding: .8rem 1rem;
    color: #05111e;
    background: var(--blue-2);
    font-weight: 800;
    transition: transform .2s ease;
}
.skip-link:focus { transform: none; }

.icon { width: 1.15rem; height: 1.15rem; flex: none; }
.icon--medium { width: 1.35rem; height: 1.35rem; }
.icon--large { width: 1.65rem; height: 1.65rem; }

.auth-ambient { position: fixed; z-index: -2; inset: 0; overflow: hidden; pointer-events: none; }
.auth-glow { position: absolute; border-radius: 50%; filter: blur(25px); opacity: .95; }
.auth-glow--left {
    top: 4%;
    left: -18rem;
    width: 38rem;
    height: 50rem;
    background: radial-gradient(ellipse, rgba(23,111,255,.28), rgba(73,168,255,.075) 46%, transparent 71%);
    animation: glow-left 12s ease-in-out infinite;
}
.auth-glow--right {
    right: -19rem;
    bottom: -8rem;
    width: 42rem;
    height: 46rem;
    background: radial-gradient(circle, rgba(139,231,255,.2), rgba(73,168,255,.055) 48%, transparent 72%);
    animation: glow-right 14s ease-in-out infinite;
}
.auth-rail { position: absolute; top: 10%; bottom: 8%; width: 1px; opacity: .65; }
.auth-rail::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(73,168,255,.82), rgba(255,255,255,.5), rgba(139,231,255,.72), transparent);
    box-shadow: 0 0 24px rgba(73,168,255,.65), 0 0 70px rgba(73,168,255,.25);
}
.auth-rail--left { left: max(1.25rem, calc((100vw - 1500px) / 2)); }
.auth-rail--right { right: max(1.25rem, calc((100vw - 1500px) / 2)); }
.auth-orbit { position: absolute; border: 1px solid rgba(73,168,255,.1); border-radius: 50%; }
.auth-orbit--one { top: 16%; left: 50%; width: 46rem; height: 46rem; transform: translateX(-50%); }
.auth-orbit--two { top: 23%; left: 50%; width: 31rem; height: 31rem; transform: translateX(-50%); border-color: rgba(139,231,255,.075); }
@keyframes glow-left { 50% { transform: translate(3rem, 1.5rem) scale(1.05); } }
@keyframes glow-right { 50% { transform: translate(-2.5rem, -2rem) scale(.96); } }

.auth-header { position: relative; z-index: 10; padding: 1rem 1rem 0; }
.auth-header__shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: min(1180px, 100%);
    min-height: 66px;
    margin: auto;
    padding: .55rem .65rem .55rem 1rem;
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    background: rgba(7,9,13,.72);
    box-shadow: 0 18px 50px rgba(0,0,0,.24);
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
}
.brand { display: inline-flex; align-items: center; gap: .85rem; min-width: 0; }
.brand__mark {
    display: grid;
    place-items: center;
    width: 2.85rem;
    height: 2.85rem;
    flex: none;
    overflow: hidden;
    border: 1px solid rgba(73,168,255,.23);
    border-radius: .9rem;
    background: linear-gradient(145deg, rgba(73,168,255,.16), rgba(139,231,255,.045));
    box-shadow: inset 0 0 18px rgba(73,168,255,.05), 0 0 28px rgba(73,168,255,.06);
}
.brand__mark img { width: 1.8rem; height: 1.8rem; object-fit: contain; }
.brand__copy { min-width: 0; }
.brand__copy strong {
    display: block;
    font-family: "Space Grotesk", sans-serif;
    font-size: .92rem;
    letter-spacing: .08em;
    line-height: 1.05;
    text-transform: uppercase;
}
.brand__copy small {
    display: block;
    overflow: hidden;
    margin-top: .25rem;
    color: var(--muted);
    font-size: .59rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}
.auth-header__actions { display: flex; align-items: center; gap: .75rem; }
.header-link, .header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 2.85rem;
    border-radius: .85rem;
    padding: 0 1rem;
    font-size: .75rem;
    font-weight: 800;
    transition: transform .25s var(--ease), border-color .25s ease, background .25s ease;
}
.header-link { border: 1px solid var(--line); color: rgba(255,255,255,.7); background: rgba(255,255,255,.035); }
.header-link:hover { transform: translateY(-2px); border-color: rgba(73,168,255,.34); color: #fff; }
.header-cta { color: #061321; background: linear-gradient(135deg, var(--blue), var(--blue-2)); box-shadow: 0 14px 38px rgba(73,168,255,.15); }
.header-cta:hover { transform: translateY(-2px); }

.auth-main { position: relative; z-index: 2; min-height: calc(100svh - 83px); padding: clamp(2.5rem, 7vw, 6.5rem) 1rem 2rem; }
.auth-stage { position: relative; width: min(960px, 100%); margin: auto; text-align: center; }
.auth-stage__halo {
    position: absolute;
    z-index: -1;
    top: 13rem;
    left: 50%;
    width: min(760px, 90vw);
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(73,168,255,.14), rgba(23,111,255,.045) 52%, transparent 72%);
    filter: blur(22px);
    transform: translateX(-50%);
}
.auth-stage__grid {
    position: absolute;
    z-index: -2;
    top: 4rem;
    left: 50%;
    width: min(860px, 92vw);
    height: 710px;
    transform: translateX(-50%);
    opacity: .34;
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, #000 0, transparent 72%);
}
.auth-intro { max-width: 780px; margin: 0 auto 2.4rem; animation: intro-in .75s var(--ease) both; }
@keyframes intro-in { from { opacity: 0; transform: translateY(16px); } }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    color: rgba(255,255,255,.58);
    font-size: .66rem;
    font-weight: 850;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.eyebrow i { width: .48rem; height: .48rem; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 7px rgba(73,168,255,.08), 0 0 24px rgba(73,168,255,.7); }
.eyebrow--blue { color: var(--blue-2); }
.auth-intro h1 {
    margin: 1.15rem 0 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(3.1rem, 7vw, 6.2rem);
    font-weight: 600;
    line-height: .9;
    letter-spacing: -.07em;
}
.auth-intro h1 span {
    color: transparent;
    background: linear-gradient(105deg, #fff 4%, var(--blue) 45%, var(--blue-2) 76%, #fff 100%);
    background-size: 210% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: title-shimmer 7s linear infinite;
}
@keyframes title-shimmer { to { background-position: 210% center; } }
.auth-intro p { max-width: 650px; margin: 1.4rem auto 0; color: var(--muted); font-size: clamp(.98rem, 1.6vw, 1.12rem); line-height: 1.75; }

.auth-card {
    position: relative;
    width: min(540px, 100%);
    margin: auto;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 2rem;
    padding: clamp(1.35rem, 4vw, 2.4rem);
    text-align: left;
    background:
        radial-gradient(circle at 85% 0%, rgba(73,168,255,.13), transparent 31%),
        linear-gradient(145deg, rgba(15,22,32,.93), rgba(7,11,17,.93));
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.025), 0 0 70px rgba(73,168,255,.055);
    backdrop-filter: blur(24px) saturate(135%);
    -webkit-backdrop-filter: blur(24px) saturate(135%);
    animation: card-in .8s .08s var(--ease) both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(20px) scale(.99); } }
.auth-card__topline {
    position: absolute;
    top: 0;
    right: 12%;
    left: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--blue), #fff, var(--blue-2), transparent);
    box-shadow: 0 0 18px rgba(73,168,255,.65);
}
.auth-card__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.6rem; }
.auth-card__icon {
    display: grid;
    place-items: center;
    width: 3.4rem;
    height: 3.4rem;
    flex: none;
    border: 1px solid rgba(73,168,255,.24);
    border-radius: 1.05rem;
    color: var(--blue-2);
    background: rgba(73,168,255,.08);
    box-shadow: inset 0 0 22px rgba(73,168,255,.05), 0 0 30px rgba(73,168,255,.08);
}
.auth-card h2 { margin: .38rem 0 0; font-family: "Space Grotesk", sans-serif; font-size: clamp(1.75rem, 4vw, 2.35rem); line-height: 1; letter-spacing: -.045em; }

.alert { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1.2rem; border-radius: 1rem; padding: .9rem 1rem; font-size: .84rem; line-height: 1.55; }
.alert--error { border: 1px solid rgba(255,120,120,.25); color: #ffd0d0; background: rgba(255,90,90,.08); }
.alert__icon { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; flex: none; border-radius: 50%; color: #0d0808; background: var(--danger); font-size: .75rem; font-weight: 900; }

.login-form { display: grid; gap: 1rem; }
.form-field label { display: block; margin-bottom: .48rem; color: rgba(255,255,255,.85); font-size: .73rem; font-weight: 800; }
.form-field__label-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.form-field__label-row span { color: var(--muted); font-size: .64rem; }
.input-shell { position: relative; }
.input-shell__icon { position: absolute; top: 50%; left: 1rem; color: #6f8093; transform: translateY(-50%); pointer-events: none; transition: color .25s ease; }
.input-shell input {
    width: 100%;
    height: 3.6rem;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 1rem;
    outline: none;
    padding: 0 3.3rem 0 3rem;
    color: #fff;
    background: rgba(255,255,255,.035);
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.input-shell input::placeholder { color: #68788a; }
.input-shell:focus-within .input-shell__icon { color: var(--blue-2); }
.input-shell input:focus { border-color: rgba(73,168,255,.56); background: rgba(73,168,255,.045); box-shadow: 0 0 0 4px rgba(73,168,255,.08), 0 0 28px rgba(73,168,255,.07); }
.password-toggle { position: absolute; top: 50%; right: .65rem; display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border: 0; border-radius: .75rem; color: #8391a2; background: transparent; transform: translateY(-50%); cursor: pointer; }
.password-toggle:hover { color: var(--blue-2); background: rgba(73,168,255,.07); }

.submit-button, .register-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    width: 100%;
    min-height: 3.7rem;
    border-radius: 1rem;
    padding: 0 1.2rem;
    font-size: .82rem;
    font-weight: 850;
    cursor: pointer;
    transition: transform .28s var(--ease), border-color .25s ease, box-shadow .28s ease, background .25s ease;
}
.submit-button {
    position: relative;
    overflow: hidden;
    margin-top: .3rem;
    border: 0;
    color: #061321;
    background: linear-gradient(135deg, var(--blue), #79c9ff 58%, var(--blue-2));
    box-shadow: 0 18px 48px rgba(73,168,255,.16);
}
.submit-button::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 24%, rgba(255,255,255,.65) 49%, transparent 72%); transform: translateX(-130%); transition: transform .75s var(--ease); }
.submit-button:hover { transform: translateY(-3px); box-shadow: 0 24px 60px rgba(73,168,255,.23); }
.submit-button:hover::before { transform: translateX(130%); }
.submit-button > * { position: relative; z-index: 1; }
.submit-button__arrow { transition: transform .25s ease; }
.submit-button:hover .submit-button__arrow { transform: translateX(.25rem); }
.submit-button:disabled { cursor: wait; opacity: .8; transform: none; }
.submit-button__loader { display: none; width: 1rem; height: 1rem; border: 2px solid rgba(6,19,33,.25); border-top-color: #061321; border-radius: 50%; animation: spin .7s linear infinite; }
.submit-button.is-loading .submit-button__arrow { display: none; }
.submit-button.is-loading .submit-button__loader { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.account-divider { display: flex; align-items: center; gap: .8rem; margin: 1.35rem 0; color: var(--muted); font-size: .67rem; font-weight: 700; }
.account-divider::before, .account-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.register-button { border: 1px solid rgba(255,255,255,.115); color: #fff; background: rgba(255,255,255,.035); }
.register-button:hover { transform: translateY(-2px); border-color: rgba(73,168,255,.35); background: rgba(73,168,255,.06); }
.security-note { display: flex; gap: .8rem; align-items: flex-start; margin-top: 1.2rem; border: 1px solid rgba(255,255,255,.075); border-radius: 1rem; padding: .85rem; background: rgba(255,255,255,.025); }
.security-note__icon { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; flex: none; border-radius: .8rem; color: var(--blue-2); background: rgba(73,168,255,.07); }
.security-note p { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.55; }
.security-note strong { color: rgba(255,255,255,.88); }

.account-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; width: min(760px, 100%); margin: 1rem auto 0; }
.account-benefits article { display: flex; align-items: center; gap: .8rem; min-width: 0; border: 1px solid rgba(255,255,255,.075); border-radius: 1rem; padding: .85rem; text-align: left; background: rgba(255,255,255,.025); backdrop-filter: blur(14px); }
.account-benefits article > span { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; flex: none; border-radius: .8rem; color: var(--blue-2); background: rgba(73,168,255,.07); }
.account-benefits strong { display: block; font-size: .72rem; }
.account-benefits small { display: block; margin-top: .2rem; overflow: hidden; color: var(--muted); font-size: .61rem; text-overflow: ellipsis; white-space: nowrap; }
.auth-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; width: min(760px, 100%); margin: 1.5rem auto 0; color: rgba(255,255,255,.38); font-size: .64rem; }
.auth-footer nav { display: flex; gap: 1rem; }
.auth-footer a:hover { color: var(--blue-2); }

@media (max-width: 700px) {
    .auth-header { padding: .7rem .7rem 0; }
    .auth-header__shell { padding: .5rem; border-radius: 1rem; }
    .brand__copy small { display: none; }
    .header-link span { display: none; }
    .header-link { width: 2.85rem; padding: 0; }
    .header-cta { padding-inline: .85rem; }
    .auth-main { padding: 2.8rem .75rem 1.2rem; }
    .auth-intro { margin-bottom: 1.6rem; }
    .auth-intro h1 { font-size: clamp(2.7rem, 13vw, 4.2rem); }
    .auth-intro p { font-size: .94rem; line-height: 1.65; }
    .auth-card { border-radius: 1.5rem; }
    .auth-card__head { align-items: flex-start; }
    .account-benefits { grid-template-columns: 1fr; }
    .account-benefits article { justify-content: flex-start; }
    .auth-footer { flex-direction: column; }
    .auth-orbit { display: none; }
}

@media (max-width: 420px) {
    .brand__mark { width: 2.6rem; height: 2.6rem; }
    .brand__copy strong { font-size: .78rem; }
    .header-cta { font-size: .68rem; }
    .auth-intro h1 { font-size: 2.65rem; }
    .auth-card { padding: 1.1rem; }
    .auth-card__icon { width: 3rem; height: 3rem; }
    .auth-card h2 { font-size: 1.65rem; }
}

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