.auth-page {
    min-height: 100vh;
    background: var(--color-bg);
}

.auth-page .site-shell,
.auth-page .site-main {
    min-height: 100vh;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.auth-visual {
    position: relative;
    display: flex;
    overflow: hidden;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: 34px 44px 40px;
    background: var(--color-dark);
    color: #ffffff;
}

.auth-visual__canvas,
.auth-visual__veil {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.auth-visual__canvas {
    display: block;
}

.auth-visual__veil {
    background:
        radial-gradient(760px 460px at 62% 32%, rgb(94 224 161 / 11%), transparent 62%),
        linear-gradient(180deg, rgb(10 14 19 / 25%), rgb(10 14 19 / 78%));
    pointer-events: none;
}

.auth-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 11px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.1875rem;
    font-weight: 600;
    text-decoration: none;
}

.auth-brand img {
    width: 26px;
    height: 26px;
}

.auth-brand:focus-visible,
.auth-mode-switch a:focus-visible,
.auth-switch-prompt a:focus-visible {
    border-radius: var(--radius-sm);
    outline: 3px solid rgb(94 224 161 / 32%);
    outline-offset: 3px;
}

.auth-visual__content {
    position: relative;
    z-index: 1;
    width: min(100%, 430px);
}

.auth-kicker {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 9px;
    margin: 0 0 24px;
    border: 1px solid rgb(94 224 161 / 28%);
    border-radius: 999px;
    background: rgb(94 224 161 / 6%);
    color: #8ef0c0;
    font-family: var(--font-mono);
    font-size: 0.71875rem;
    padding: 5px 12px;
}

.auth-kicker span {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--color-accent);
    animation: auth-pulse 2.4s ease-in-out infinite;
}

.auth-visual h2 {
    max-width: 420px;
    margin: 0 0 16px;
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 600;
    line-height: 1.1;
}

.auth-visual__content > p:not(.auth-kicker) {
    margin: 0 0 28px;
    color: #aeb9c1;
    font-size: 0.96875rem;
    line-height: 1.6;
}

.auth-benefits {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    color: #cbd4db;
    font-size: 0.875rem;
    list-style: none;
}

.auth-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.auth-benefits li span {
    color: var(--color-accent);
    font-weight: 600;
}

.auth-endpoints {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: #7f8b95;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.auth-endpoints code {
    font: inherit;
}

.auth-endpoints span {
    color: var(--color-accent);
}

.auth-form-panel {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding: 44px 32px;
    background: var(--color-bg);
}

.auth-form-panel__inner {
    width: min(100%, 400px);
}

.auth-mode-switch {
    display: flex;
    gap: 3px;
    margin: 0 0 30px;
    border: 1px solid #e4e7ea;
    border-radius: 11px;
    padding: 4px;
    background: var(--color-surface-muted);
}

.auth-mode-switch a {
    display: flex;
    min-width: 0;
    min-height: 37px;
    flex: 1;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.auth-mode-switch a:hover {
    color: var(--color-text);
}

.auth-mode-switch a.is-active {
    background: var(--color-surface);
    box-shadow: 0 1px 3px rgb(16 24 32 / 10%);
    color: var(--color-text);
}

.auth-form-header {
    margin: 0 0 26px;
}

.auth-form-header h1 {
    margin: 0 0 8px;
    font-family: var(--font-heading);
    font-size: 1.6875rem;
    font-weight: 600;
    line-height: 1.2;
}

.auth-form-header p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.90625rem;
}

.auth-context,
.auth-error {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 9px;
    margin: -4px 0 18px;
    border: 1px solid #bfebd5;
    border-radius: var(--radius-lg);
    background: var(--color-success-soft);
    color: var(--color-success);
    padding: 11px 12px;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.auth-error {
    border-color: #e6a99f;
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

.auth-context svg,
.auth-error svg {
    width: 17px;
    height: 17px;
    margin-top: 1px;
}

.auth-context p,
.auth-error p {
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.auth-field > span {
    color: #374049;
    font-size: 0.8125rem;
    font-weight: 600;
}

.auth-field input {
    width: 100%;
    min-height: 45px;
    border: 1px solid #e0e3e6;
    border-radius: 10px;
    outline: none;
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.90625rem;
    padding: 11px 13px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-field input::placeholder {
    color: #a2abb3;
}

.auth-field input:hover {
    border-color: #c9d0d6;
}

.auth-field input:focus-visible {
    border-color: var(--color-accent-strong);
    box-shadow: 0 0 0 3px rgb(94 224 161 / 20%);
    outline: none;
}

.auth-field input[aria-invalid="true"] {
    border-color: var(--color-danger);
}

.auth-submit {
    width: 100%;
    min-height: 46px;
    margin-top: 2px;
    border: 0;
    border-radius: 10px;
    background: var(--color-text);
    color: #ffffff;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 11px 16px;
    transition: background-color 150ms ease, box-shadow 150ms ease;
}

.auth-submit:hover {
    background: #000000;
}

.auth-submit:focus-visible {
    box-shadow: 0 0 0 3px rgb(94 224 161 / 38%);
    outline: none;
}

.auth-switch-prompt {
    margin: 22px 0 0;
    color: var(--color-text-muted);
    font-size: 0.84375rem;
    text-align: center;
}

.auth-switch-prompt a {
    color: var(--color-accent-strong);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch-prompt a:hover {
    color: #0c6444;
}

.auth-plan-note {
    margin: 20px 0 0;
    color: #8a939b;
    font-family: var(--font-mono);
    font-size: 0.71875rem;
    line-height: 1.6;
    text-align: center;
}

@keyframes auth-pulse {
    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

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

    .auth-visual {
        min-height: auto;
        padding: 24px;
    }

    .auth-visual__content {
        margin: 72px 0 64px;
    }

    .auth-endpoints {
        display: none;
    }

    .auth-form-panel {
        min-height: 620px;
        padding: 48px 24px 64px;
    }
}

@media (max-width: 520px) {
    .auth-visual {
        padding: 20px 18px 24px;
    }

    .auth-visual__content {
        margin: 56px 0 32px;
    }

    .auth-kicker {
        margin-bottom: 18px;
    }

    .auth-visual h2 {
        font-size: 1.75rem;
    }

    .auth-benefits {
        display: none;
    }

    .auth-form-panel {
        min-height: 0;
        padding: 38px 18px 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-kicker span {
        animation: none;
    }

    .auth-mode-switch a,
    .auth-field input,
    .auth-submit {
        transition: none;
    }
}
