:root {
    --bg: #030810;
    --panel: rgba(6, 16, 32, .55);
    --text: #e8f4ff;
    --muted: #7a9bb5;
    --green: #00d4ff;
    --green-2: #7de8ff;
    --dark: #031018;
    --line: rgba(0, 212, 255, .16);
    --glow: rgba(0, 212, 255, .35);
}

* {
    box-sizing: border-box;
}

body.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

a {
    color: inherit;
}

.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 20%, rgba(0, 212, 255, .18), transparent 28rem),
        radial-gradient(circle at 85% 80%, rgba(34, 111, 255, .16), transparent 26rem),
        linear-gradient(145deg, #030810 0%, #071428 48%, #040a14 100%);
}

.auth-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 180, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 180, 255, .05) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at center, #000 35%, transparent 85%);
    opacity: .45;
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: .55;
    animation: auth-float 14s ease-in-out infinite;
}

.auth-orb-1 {
    width: 320px;
    height: 320px;
    top: -80px;
    left: -60px;
    background: rgba(0, 212, 255, .2);
}

.auth-orb-2 {
    width: 280px;
    height: 280px;
    right: -40px;
    bottom: 10%;
    background: rgba(34, 111, 255, .16);
    animation-delay: -4s;
}

.auth-orb-3 {
    width: 180px;
    height: 180px;
    left: 42%;
    top: 58%;
    background: rgba(0, 212, 255, .14);
    animation-delay: -8s;
}

@keyframes auth-float {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(0, -18px, 0) scale(1.04); }
}

.auth-page {
    position: relative;
    z-index: 1;
    width: min(1040px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    place-items: center;
    padding: 40px 0;
}

.auth-shell {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 32px;
    overflow: hidden;
    background: rgba(6, 16, 32, .42);
    backdrop-filter: blur(18px);
    box-shadow:
        0 0 32px rgba(0, 180, 255, .1),
        0 28px 90px rgba(0, 0, 0, .48),
        inset 0 1px 0 rgba(255, 255, 255, .08);
    animation: auth-rise .7s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes auth-rise {
    from {
        opacity: 0;
        transform: translateY(22px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-hero {
    display: none;
    padding: 42px 38px;
    background:
        linear-gradient(160deg, rgba(0, 212, 255, .14), rgba(6, 16, 32, .2)),
        rgba(4, 14, 28, .72);
    border-right: 1px solid var(--line);
}

.auth-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 255, .28);
    background: rgba(0, 212, 255, .08);
    color: var(--green-2);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.auth-hero-kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green-2);
    box-shadow: 0 0 12px var(--green-2);
    animation: auth-pulse 2s ease-in-out infinite;
}

@keyframes auth-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .55; transform: scale(.85); }
}

.auth-hero h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 36px);
    line-height: 1.15;
    letter-spacing: -.03em;
}

.auth-hero p {
    margin: 0 0 28px;
    color: var(--muted);
    line-height: 1.7;
    max-width: 34ch;
}

.auth-feature-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
    color: #d8ebff;
    font-size: 14px;
    font-weight: 600;
}

.auth-feature-list li span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 212, 255, .18), rgba(34, 111, 255, .12));
    font-size: 16px;
}

.auth-card {
    width: 100%;
    padding: 36px 34px 32px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -.03em;
    text-decoration: none;
    transition: transform .25s ease, opacity .25s ease;
}

.brand:hover {
    transform: translateY(-1px);
    opacity: .92;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--dark);
    background: linear-gradient(135deg, var(--green-2), var(--green));
    font-weight: 900;
    box-shadow: 0 10px 28px rgba(0, 212, 255, .28);
}

h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 5vw, 34px);
    letter-spacing: -.03em;
}

.muted {
    margin: 0 0 26px;
    color: var(--muted);
    line-height: 1.6;
}

.field {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #b8cfe0;
    font-weight: 700;
    font-size: 14px;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #7a9bb5;
    font-size: 18px;
    line-height: 1;
    pointer-events: none;
}

input {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid rgba(0, 212, 255, .16);
    border-radius: 16px;
    outline: none;
    background: rgba(4, 14, 28, .58);
    color: var(--text);
    font: inherit;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.input-wrap input {
    padding-left: 44px;
}

.input-wrap.has-toggle input {
    padding-right: 48px;
}

input::placeholder {
    color: #6a8aa5;
}

input:focus {
    border-color: rgba(125, 211, 255, .55);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, .12);
    background: rgba(4, 14, 28, .78);
}

.input-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #8ea8c4;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 18px;
    transition: color .2s ease, background .2s ease;
}

.input-toggle:hover {
    color: var(--green-2);
    background: rgba(255, 255, 255, .05);
}

.field-security label {
    color: #b8b4d4;
    font-weight: 600;
}

.field-security input {
    border-color: rgba(168, 85, 247, .42);
    background: rgba(10, 8, 24, .62);
}

.field-security input::placeholder {
    color: #7d7a96;
}

.field-security input:focus {
    border-color: rgba(192, 132, 252, .62);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, .14);
    background: rgba(10, 8, 24, .82);
}

.btn {
    position: relative;
    width: 100%;
    min-height: 52px;
    margin-top: 6px;
    border: 0;
    border-radius: 999px;
    color: var(--dark);
    background: linear-gradient(135deg, var(--green-2), var(--green));
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(0, 212, 255, .24);
    transition: transform .2s ease, box-shadow .2s ease;
}

.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .55s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(0, 212, 255, .32);
}

.btn:hover::after {
    transform: translateX(120%);
}

.btn:active {
    transform: translateY(0);
}

.alert {
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.alert-info {
    border: 1px solid rgba(125, 211, 255, .35);
    background: rgba(0, 212, 255, .1);
    color: #d8ebff;
}

.alert-error {
    color: #ffd7d7;
    background: rgba(255, 80, 80, .12);
    border: 1px solid rgba(255, 80, 80, .28);
}

.alert-success {
    color: #c8ecff;
    background: rgba(0, 212, 255, .12);
    border: 1px solid rgba(0, 212, 255, .28);
}

.switch {
    margin-top: 22px;
    color: var(--muted);
    text-align: center;
    font-size: 14px;
}

.switch a {
    color: var(--green-2);
    font-weight: 800;
    text-decoration: none;
}

.switch a:hover {
    text-decoration: underline;
}

@media (min-width: 900px) {
    .auth-shell {
        grid-template-columns: 1.05fr .95fr;
    }

    .auth-hero {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .auth-card {
        padding: 42px 38px;
    }
}

@media (max-width: 520px) {
    .auth-page {
        width: min(100% - 20px, 1040px);
        padding: 20px 0;
    }

    .auth-shell {
        border-radius: 24px;
    }

    .auth-card {
        padding: 26px 18px 22px;
    }

    .brand {
        font-size: 20px;
    }
}
