.theme-auth-panel {
    display: grid;
    width: min(480px, 100%);
    gap: 18px;
    margin: 24px auto 0;
}

.theme-auth-switch {
    margin: 0;
}

.theme-auth-switch {
    color: var(--color-body);
    font-size: 13px;
}

.theme-auth-card {
    display: grid;
    gap: 20px;
    border-radius: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

html[data-color-scheme="ink"] .theme-auth-card {
    border-color: transparent;
}

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

.theme-auth-form label:not(.theme-auth-check) {
    display: grid;
    gap: 6px;
    margin: 0;
    border-bottom: 1px solid var(--color-hairline-strong);
    padding: 0 0 9px;
    transition: border-color 160ms ease;
}

.theme-auth-form label:not(.theme-auth-check) span {
    color: var(--color-body);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.theme-auth-form label:not(.theme-auth-check) input {
    min-height: 34px;
    border: 0;
    border-radius: 0;
    background: transparent;
    caret-color: var(--color-ink);
    color: var(--color-ink);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 15px;
    padding: 0;
}

.theme-auth-form label:not(.theme-auth-check) input:focus {
    border-color: transparent;
    outline: 0;
}

.theme-auth-form label:not(.theme-auth-check) input:-webkit-autofill,
.theme-auth-form label:not(.theme-auth-check) input:-webkit-autofill:hover,
.theme-auth-form label:not(.theme-auth-check) input:-webkit-autofill:focus {
    background-color: transparent;
    background-clip: text;
    box-shadow: 0 0 0 1000px transparent inset;
    caret-color: var(--color-ink);
    -webkit-background-clip: text;
    -webkit-box-shadow: 0 0 0 1000px transparent inset;
    -webkit-text-fill-color: var(--color-ink);
    transition: background-color 999999s ease-out, color 999999s ease-out;
}

.theme-auth-form label:not(.theme-auth-check) input:autofill {
    background-color: transparent;
    background-clip: text;
    box-shadow: 0 0 0 1000px transparent inset;
    caret-color: var(--color-ink);
    -webkit-box-shadow: 0 0 0 1000px transparent inset;
    -webkit-text-fill-color: var(--color-ink);
}

.theme-auth-form .theme-edge-button {
    width: fit-content;
}

.theme-auth-form .theme-auth-submit,
.theme-auth-form-register .theme-auth-submit {
    width: 100%;
}

.theme-auth-form-row {
    display: grid;
    gap: 12px;
    align-items: end;
}

.theme-auth-email-code-row {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
}

.theme-auth-form-register {
    grid-template-columns: 1fr;
}

.theme-auth-form-register .theme-auth-submit {
    grid-column: 1 / -1;
}

.theme-auth-form-login {
    gap: 20px;
}

.theme-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--color-muted);
    font-size: 13px;
}

.theme-auth-options a,
.theme-auth-switch a {
    color: var(--color-ink);
    font-weight: 500;
}

.theme-auth-check {
    display: inline-flex;
    width: fit-content;
    min-height: 24px;
    align-items: center;
    gap: 8px;
    color: var(--color-muted);
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
}

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

.theme-auth-switch {
    text-align: center;
}

@media (max-width: 720px) {
    .theme-auth-panel {
        margin-top: 0;
    }

    .theme-auth-card {
        padding-top: 4px;
    }

    .theme-auth-email-code-row,
    .theme-auth-form-register {
        grid-template-columns: 1fr;
    }

    .theme-auth-options {
        align-items: flex-start;
        flex-direction: column;
    }
}
