:root {
    color-scheme: dark;
    --auth-bg: #05070d;
    --auth-panel: rgba(13, 16, 27, 0.92);
    --auth-panel-soft: rgba(17, 20, 34, 0.76);
    --auth-line: rgba(150, 128, 255, 0.18);
    --auth-line-strong: rgba(139, 92, 246, 0.48);
    --auth-text: #f8f7ff;
    --auth-muted: #a8a5b8;
    --auth-purple: #7c3aed;
    --auth-purple-light: #a855f7;
    --auth-danger: #fb7185;
    --auth-success: #4ade80;
    --auth-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--auth-bg);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--auth-text);
    background:
        radial-gradient(circle at 12% 12%, rgba(124, 58, 237, 0.18), transparent 34rem),
        radial-gradient(circle at 88% 78%, rgba(109, 40, 217, 0.13), transparent 30rem),
        linear-gradient(145deg, #05070d 0%, #080a12 45%, #05060b 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

.auth-page {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    min-height: 100vh;
    overflow: hidden;
}

.auth-page::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to right, black, transparent 68%);
    content: "";
    pointer-events: none;
}

.auth-brand-panel,
.auth-form-panel {
    position: relative;
    z-index: 1;
}

.auth-brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    padding: clamp(28px, 5vw, 72px);
    border-right: 1px solid rgba(255, 255, 255, 0.055);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    color: #fff;
    font-size: 1.18rem;
    font-weight: 780;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.auth-brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: linear-gradient(145deg, #9f5cff, #6517ed);
    box-shadow: 0 0 32px rgba(124, 58, 237, 0.44);
    color: #fff;
    font-size: 1rem;
    font-weight: 850;
}

.auth-story {
    max-width: 670px;
    margin: auto 0;
    padding: clamp(56px, 8vw, 110px) 0;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 22px;
    padding: 8px 12px;
    border: 1px solid var(--auth-line);
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.08);
    color: #c9b4ff;
    font-size: 0.76rem;
    font-weight: 760;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-story h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(3rem, 6.4vw, 6.8rem);
    line-height: 0.96;
    letter-spacing: -0.072em;
}

.auth-gradient-text {
    background: linear-gradient(110deg, #c59cff 12%, #9552ff 48%, #6b35ff 88%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-story-copy {
    max-width: 600px;
    margin: 28px 0 0;
    color: var(--auth-muted);
    font-size: clamp(1rem, 1.5vw, 1.14rem);
    line-height: 1.75;
}

.auth-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    margin-top: 34px;
    color: #cbc8d8;
    font-size: 0.82rem;
}

.auth-proof span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.auth-proof span::before {
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.09);
    color: var(--auth-success);
    content: "✓";
    font-size: 0.68rem;
    font-weight: 800;
}

.auth-brand-footer {
    color: #777487;
    font-size: 0.78rem;
}

.auth-form-panel {
    display: grid;
    min-height: 100vh;
    padding: 28px clamp(26px, 5vw, 74px);
    place-items: center;
    background: linear-gradient(180deg, rgba(12, 14, 24, 0.82), rgba(5, 7, 13, 0.96));
}

.auth-card {
    width: min(100%, 470px);
    padding: clamp(28px, 4vw, 46px);
    border: 1px solid var(--auth-line);
    border-radius: 28px;
    background:
        linear-gradient(160deg, rgba(22, 25, 40, 0.94), rgba(9, 11, 19, 0.94));
    box-shadow: var(--auth-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(20px);
}

.auth-card-header {
    margin-bottom: 30px;
}

.auth-card-kicker {
    margin: 0 0 10px;
    color: #a778ff;
    font-size: 0.76rem;
    font-weight: 780;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-card h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.7rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.auth-card-subtitle {
    margin: 12px 0 0;
    color: var(--auth-muted);
    line-height: 1.6;
}

.auth-alert {
    margin: 0 0 22px;
    padding: 14px 16px;
    border: 1px solid rgba(251, 113, 133, 0.28);
    border-radius: 14px;
    background: rgba(251, 113, 133, 0.08);
    color: #fecdd3;
    font-size: 0.86rem;
    line-height: 1.5;
}

.auth-alert--success {
    border-color: rgba(74, 222, 128, 0.24);
    background: rgba(74, 222, 128, 0.08);
    color: #bbf7d0;
}

.auth-alert strong {
    display: block;
    margin-bottom: 4px;
    color: #fff;
}

.auth-alert ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.auth-form {
    display: grid;
    gap: 19px;
}

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-field label {
    color: #e7e4ee;
    font-size: 0.84rem;
    font-weight: 680;
}

.auth-input-wrap {
    position: relative;
}

.auth-input {
    width: 100%;
    min-height: 52px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 13px;
    outline: none;
    background: rgba(4, 6, 12, 0.68);
    color: #fff;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-input::placeholder {
    color: #686575;
}

.auth-input:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.auth-input:focus {
    border-color: var(--auth-line-strong);
    background: rgba(8, 10, 18, 0.92);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.13), 0 0 26px rgba(124, 58, 237, 0.08);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--auth-muted);
    font-size: 0.83rem;
    cursor: pointer;
}

.auth-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--auth-purple);
}

.auth-link {
    color: #b995ff;
    font-size: 0.84rem;
    font-weight: 680;
    text-decoration: none;
}

.auth-link:hover {
    color: #d4c1ff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.auth-submit {
    display: inline-flex;
    min-height: 53px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 13px;
    background: linear-gradient(110deg, #7c3aed, #6d28d9 55%, #8b5cf6);
    box-shadow: 0 12px 34px rgba(109, 40, 217, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 780;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 38px rgba(109, 40, 217, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    filter: brightness(1.06);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 25px 0 20px;
    color: #6f6b7d;
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    height: 1px;
    flex: 1;
    background: rgba(255, 255, 255, 0.075);
    content: "";
}

.auth-secondary-action {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
    color: #e4e1eb;
    font-size: 0.87rem;
    font-weight: 680;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease;
}

.auth-secondary-action:hover {
    border-color: var(--auth-line-strong);
    background: rgba(124, 58, 237, 0.07);
}

.auth-footnote {
    margin: 22px 0 0;
    color: #777483;
    font-size: 0.74rem;
    line-height: 1.55;
    text-align: center;
}

@media (max-width: 980px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 26px clamp(24px, 7vw, 64px) 44px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .auth-story {
        padding: 72px 0 24px;
    }

    .auth-story h1 {
        max-width: 760px;
        font-size: clamp(3rem, 10vw, 5.8rem);
    }

    .auth-brand-footer {
        display: none;
    }

    .auth-form-panel {
        min-height: auto;
        padding: 56px 24px 72px;
    }
}

@media (max-width: 560px) {
    .auth-brand-panel {
        padding: 22px 20px 34px;
    }

    .auth-story {
        padding-top: 54px;
    }

    .auth-story h1 {
        font-size: clamp(2.75rem, 14vw, 4.4rem);
    }

    .auth-proof {
        display: grid;
    }

    .auth-form-panel {
        padding: 32px 14px 50px;
    }

    .auth-card {
        padding: 26px 20px;
        border-radius: 21px;
    }

    .auth-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

.auth-google-action {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 13px;
    background: #fff;
    color: #202124;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-google-action:hover {
    transform: translateY(-1px);
    background: #f8f9fa;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.auth-google-action:focus-visible {
    outline: 3px solid rgba(66, 133, 244, 0.42);
    outline-offset: 3px;
}

.auth-google-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.auth-secondary-action--button {
    width: 100%;
    cursor: pointer;
    font: inherit;
}
