:root {
    --ink: #0a1733;
    --navy: #0e1e47;
    --electric: #3b6ff6;
    --electric-bright: #6094ff;
    --cyan: #36d8f2;
    --surface: #ffffff;
    --surface-2: #f4f7fc;
    --line: #e4e9f4;
    --line-strong: #d3dbec;
    --text: #0b1733;
    --muted: #5c6b8c;
    --muted-2: #8b97b0;
    --ease: cubic-bezier(.22,.61,.36,1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
}

.ev-auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    color: var(--text);
    background:
        radial-gradient(1100px 700px at 18% -10%, #eaf0ff 0%, transparent 55%),
        radial-gradient(900px 600px at 100% 110%, #e7fbff 0%, transparent 50%),
        #eef2f9;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.ev-auth-showcase {
    width: 100%;
    max-width: 820px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
}

.ev-device-desktop {
    width: 800px;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid rgba(10, 23, 51, .06);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 40px 90px -40px rgba(10, 23, 51, .45), 0 2px 0 rgba(255, 255, 255, .6) inset;
}

.ev-login-layout {
    display: grid;
    grid-template-columns: 1fr 1.06fr;
    min-height: 500px;
}

.ev-brand-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 30px 34px;
    color: #fff;
    background:
        radial-gradient(120% 80% at 80% 0%, #18306e 0%, transparent 60%),
        linear-gradient(160deg, var(--navy) 0%, var(--ink) 70%);
}

.ev-brand-panel::before,
.ev-phone-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .5;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(80% 70% at 50% 40%, #000 0%, transparent 80%);
    z-index: -1;
}

.ev-orb,
.ev-mobile-orb {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(60px);
}

.ev-orb-a {
    width: 360px;
    height: 360px;
    top: -120px;
    right: -80px;
    background: #2e5bff;
    opacity: .55;
}

.ev-orb-b {
    width: 300px;
    height: 300px;
    bottom: -110px;
    left: -90px;
    background: #19c7e6;
    opacity: .4;
}

.ev-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .3px;
}

.ev-logo-mark {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: linear-gradient(150deg, var(--electric-bright), var(--electric));
    box-shadow: 0 8px 22px -6px rgba(59, 111, 246, .8), 0 0 0 1px rgba(255, 255, 255, .12) inset;
}

.ev-logo-mark svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

.ev-spark-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
}

.ev-bolt-wrap {
    position: relative;
    width: 134px;
    height: 172px;
    display: grid;
    place-items: center;
}

.ev-bolt-glow,
.ev-bolt-main {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.ev-bolt-glow {
    filter: blur(26px);
    opacity: .85;
    animation: ev-pulse 3.6s var(--ease) infinite;
}

.ev-bolt-glow svg {
    width: 92px;
    height: 128px;
    fill: #5b8dff;
}

.ev-bolt-main svg {
    width: 134px;
    height: 172px;
    fill: url(#ev-bolt-gradient);
    filter: drop-shadow(0 16px 24px rgba(49, 115, 255, .28));
}

.ev-bolt-main svg path,
.ev-mobile-bolt-main svg path {
    fill: #5b8dff;
    stroke: rgba(255, 255, 255, .55);
    stroke-width: .3;
}

.ev-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(108, 160, 255, .28);
    border-radius: 50%;
}

.ev-ring-1 {
    width: 146px;
    height: 146px;
    animation: ev-breathe 5s ease-in-out infinite;
}

.ev-ring-2 {
    width: 208px;
    height: 208px;
    border-color: rgba(108, 160, 255, .16);
    animation: ev-breathe 5s ease-in-out infinite .6s;
}

.ev-brand-panel h2 {
    max-width: 15ch;
    margin-bottom: 12px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -.4px;
}

.ev-brand-panel p {
    max-width: 34ch;
    color: #b6c4e6;
    font-size: 12.75px;
    line-height: 1.55;
}

.ev-secure-pill {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    color: #d8e2f8;
    font-size: 11.75px;
    font-weight: 600;
}

.ev-secure-pill svg {
    width: 14px;
    height: 14px;
    color: #9fb2dc;
}

.ev-form-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 32px 40px;
    background: #fff;
}

.ev-lang {
    position: absolute;
    top: 24px;
    right: 32px;
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
}

.ev-lang a {
    padding: 5px 11px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    transition: .18s var(--ease);
}

.ev-lang a.active {
    background: #fff;
    color: var(--electric);
    box-shadow: 0 2px 8px -3px rgba(10, 23, 51, .18);
}

.ev-lang a:hover:not(.active) {
    color: var(--text);
}

.ev-eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 36px 0 10px;
    color: var(--electric);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.4px;
    text-transform: uppercase;
}

.ev-eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--electric);
}

.ev-form-panel h1 {
    margin-bottom: 10px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -1px;
}

.ev-subtitle {
    max-width: 38ch;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.ev-login-alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 13px;
    background: #fff1f2;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 600;
}

.ev-field {
    margin-bottom: 14px;
}

.ev-field label {
    display: block;
    margin-bottom: 8px;
    color: #33405e;
    font-size: 12px;
    font-weight: 600;
}

.ev-control {
    height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1.5px solid var(--line);
    border-radius: 13px;
    background: var(--surface-2);
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}

.ev-control:focus-within {
    border-color: var(--electric);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 111, 246, .13);
}

.ev-control-invalid {
    border-color: #f87171;
}

.ev-control-icon {
    width: 17px;
    height: 17px;
    flex: none;
    color: var(--muted-2);
    transition: color .18s var(--ease);
}

.ev-control:focus-within .ev-control-icon {
    color: var(--electric);
}

.ev-control input {
    width: 100%;
    height: 100%;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: 500 14px "Plus Jakarta Sans", system-ui, sans-serif;
    letter-spacing: .2px;
}

.ev-control input::placeholder {
    color: var(--muted-2);
    font-weight: 400;
}

.ev-reveal {
    flex: none;
    display: grid;
    place-items: center;
    padding: 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted-2);
    cursor: pointer;
}

.ev-reveal:hover,
.ev-reveal.is-visible {
    color: var(--electric);
}

.ev-reveal svg {
    width: 17px;
    height: 17px;
}

.ev-login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 20px;
}

.ev-check {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    cursor: pointer;
    font-size: 12.75px;
    user-select: none;
}

.ev-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ev-check-box {
    width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    border: 1.5px solid var(--line-strong);
    border-radius: 6px;
    background: #fff;
    transition: .16s var(--ease);
}

.ev-check-box svg {
    width: 12px;
    height: 12px;
    color: #fff;
    opacity: 0;
    transform: scale(.6);
    transition: .16s var(--ease);
}

.ev-check input:checked + .ev-check-box {
    border-color: var(--electric);
    background: var(--electric);
}

.ev-check input:checked + .ev-check-box svg {
    opacity: 1;
    transform: scale(1);
}

.ev-forgot {
    color: var(--electric);
    font-size: 12.75px;
    font-weight: 600;
    text-decoration: none;
}

.ev-forgot:hover {
    text-decoration: underline;
}

.ev-submit {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(120deg, var(--electric) 0%, #4f84ff 55%, var(--cyan) 130%);
    box-shadow: 0 16px 30px -12px rgba(59, 111, 246, .65);
    cursor: pointer;
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .2px;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}

.ev-submit svg {
    width: 18px;
    height: 18px;
    transition: transform .2s var(--ease);
}

.ev-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 38px -12px rgba(59, 111, 246, .7);
}

.ev-submit:hover svg {
    transform: translateX(4px);
}

.ev-submit::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-18deg);
    transition: left .55s var(--ease);
}

.ev-submit:hover::after {
    left: 130%;
}

.ev-help {
    margin-top: 18px;
    color: var(--muted-2);
    font-size: 12px;
    text-align: center;
}

.ev-help a {
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
}

.ev-help a:hover {
    color: var(--electric);
}

.ev-device-phone {
    display: none;
    width: min(100%, 420px);
    flex: none;
    overflow: hidden;
    border: 1px solid rgba(10, 23, 51, .06);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: 0 32px 78px -36px rgba(10, 23, 51, .45), 0 2px 0 rgba(255, 255, 255, .72) inset;
}

.ev-phone-screen {
    position: relative;
    overflow: hidden;
    min-height: 720px;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(120% 60% at 80% 0%, #18306e 0%, transparent 55%),
        linear-gradient(170deg, var(--navy) 0%, var(--ink) 75%);
}

.ev-phone-screen::before {
    opacity: .4;
    background-size: 30px 30px;
    mask-image: radial-gradient(90% 50% at 50% 12%, #000, transparent 75%);
}

.ev-mobile-orb-a {
    width: 240px;
    height: 240px;
    top: -90px;
    right: -70px;
    background: #2e5bff;
    opacity: .5;
}

.ev-mobile-orb-b {
    width: 220px;
    height: 220px;
    bottom: -90px;
    left: -70px;
    background: #19c7e6;
    opacity: .32;
}

.ev-mobile-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 28px 0;
}

.ev-logo-mobile {
    color: #fff;
    font-size: 14px;
}

.ev-logo-mobile .ev-logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
}

.ev-logo-mobile .ev-logo-mark svg {
    width: 15px;
    height: 15px;
}

.ev-lang-mobile {
    position: static;
    gap: 3px;
    padding: 3px;
    border-color: rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .07);
}

.ev-lang-mobile a {
    padding: 5px 10px;
    color: #9fb2dc;
    font-size: 10px;
}

.ev-mobile-hero {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 22px 24px 12px;
    color: #fff;
    text-align: center;
}

.ev-mobile-bolt {
    position: relative;
    width: 74px;
    height: 74px;
    margin-bottom: 14px;
}

.ev-mobile-bolt-glow,
.ev-mobile-bolt-main {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.ev-mobile-bolt-glow {
    filter: blur(16px);
    opacity: .9;
    animation: ev-pulse 3.6s var(--ease) infinite;
}

.ev-mobile-bolt-glow svg {
    width: 50px;
    height: 46px;
    fill: #5b8dff;
}

.ev-mobile-bolt-main svg {
    width: 74px;
    height: 74px;
}

.ev-mobile-eyebrow {
    margin-bottom: 8px;
    color: #7fb0ff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 2.2px;
    text-transform: uppercase;
}

.ev-mobile-hero h2 {
    margin-bottom: 8px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.6px;
}

.ev-mobile-hero p {
    max-width: 30ch;
    color: #aebee0;
    font-size: 12.75px;
    line-height: 1.5;
}

.ev-mobile-card {
    position: relative;
    z-index: 2;
    margin: 44px 24px 24px;
    padding: 24px 22px 22px;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 -10px 40px -20px rgba(0, 0, 0, .5);
}

.ev-mobile-card .ev-field {
    margin-bottom: 15px;
}

.ev-mobile-card .ev-control {
    height: 48px;
}

.ev-mobile-card .ev-submit {
    height: 46px;
    margin-top: 6px;
}

.ev-mobile-row {
    margin: 2px 0 20px;
}

@media (max-width: 1380px) {
    .ev-device-desktop { order: 1; }
    .ev-device-phone { order: 2; }
}

@media (max-width: 760px) {
    .ev-auth-body {
        align-items: stretch;
        padding: 0;
        background:
            radial-gradient(720px 420px at 88% -8%, rgba(46, 91, 255, .28) 0%, transparent 62%),
            linear-gradient(170deg, var(--navy) 0%, var(--ink) 72%);
    }

    .ev-auth-showcase {
        min-height: 100vh;
        min-height: 100dvh;
        align-items: stretch;
    }

    .ev-device-desktop {
        display: none;
    }

    .ev-device-phone {
        display: block;
        width: 100%;
        max-width: none;
        min-height: 100vh;
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .ev-phone-screen {
        min-height: 100vh;
        min-height: 100dvh;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
        background: transparent;
    }

    .ev-phone-screen::before {
        opacity: .24;
    }

    .ev-mobile-top {
        padding: max(22px, env(safe-area-inset-top)) 22px 0;
    }

    .ev-mobile-card {
        width: calc(100% - 32px);
        max-width: 430px;
        margin: 28px auto 0;
        padding: 26px 20px 24px;
        border-radius: 28px;
        box-shadow: 0 18px 44px -24px rgba(0, 0, 0, .55);
    }

    .ev-mobile-card .ev-control {
        min-width: 0;
    }

    .ev-mobile-row {
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

@keyframes ev-pulse {
    0%, 100% {
        opacity: .7;
        transform: scale(.96);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes ev-breathe {
    0%, 100% { opacity: .5; }
    50% { opacity: 1; }
}
