:root {
    color-scheme: dark;
    font-family:
        "Geist", "Inter Tight", ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #ffffff;
    background: #0a0a0f;
    line-height: 1.5;
    --auth-panel: rgba(44, 44, 50, 0.94);
    --auth-card: rgba(255, 255, 255, 0.05);
    --auth-border: rgba(255, 255, 255, 0.12);
    --auth-border-strong: rgba(255, 255, 255, 0.2);
    --auth-text: #ffffff;
    --auth-muted: rgba(255, 255, 255, 0.65);
    --auth-dim: rgba(255, 255, 255, 0.42);
    --auth-accent: #6366f1;
    --auth-hover: rgba(255, 255, 255, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    min-width: 20rem;
    min-height: 100dvh;
    margin: 0;
    background:
        radial-gradient(circle at 25% 10%, rgba(99, 102, 241, 0.16), transparent 36rem),
        radial-gradient(circle at 80% 90%, rgba(124, 58, 237, 0.12), transparent 32rem),
        #0a0a0f;
}

button,
input {
    font: inherit;
}

.auth-shell {
    display: grid;
    width: min(calc(100% - 2rem), 26.25rem);
    min-height: 100dvh;
    margin-inline: auto;
    place-items: center;
    padding-block: 1.25rem;
}

.auth-card {
    width: 100%;
    padding: 1.75rem;
    overflow: hidden;
    border: 1px solid var(--auth-border);
    border-radius: 1.125rem;
    background: var(--auth-panel);
    box-shadow: 0 2.5rem 5rem rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(1.125rem);
}

.auth-header {
    display: flex;
    align-items: center;
    margin-block-end: 1rem;
    color: var(--auth-text);
    font-size: 0.9375rem;
    gap: 0.625rem;
}

.auth-header strong {
    font-weight: 650;
}

.auth-mark {
    display: grid;
    width: 1.625rem;
    height: 1.625rem;
    flex: none;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.4375rem;
    background: linear-gradient(150deg, #a5b4fc 0%, var(--auth-accent) 58%, #4f46e5 100%);
    box-shadow:
        0 0.375rem 1rem rgba(79, 70, 229, 0.28),
        inset 0 1px rgba(255, 255, 255, 0.28);
}

.auth-mark svg {
    width: 1.0625rem;
    height: 1.0625rem;
    stroke: #ffffff;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.55;
}

.auth-card h1 {
    margin: 0;
    color: var(--auth-text);
    font-size: 1.25rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.lead {
    margin: 0.35rem 0 1.25rem;
    color: var(--auth-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.note,
small {
    color: var(--auth-muted);
}

.note {
    font-size: 0.8125rem;
}

form,
label {
    display: grid;
}

form {
    gap: 0.75rem;
}

label {
    color: var(--auth-muted);
    font-size: 0.75rem;
    font-weight: 550;
    gap: 0.375rem;
}

input {
    width: 100%;
    min-height: 2.5rem;
    border: 1px solid var(--auth-border);
    border-radius: 0.5625rem;
    background: var(--auth-card);
    color: var(--auth-text);
    font-size: 0.875rem;
    padding-inline: 0.75rem;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

input:focus {
    border-color: rgba(165, 180, 252, 0.42);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    outline: none;
}

.checkbox {
    display: flex;
    align-items: center;
    color: var(--auth-muted);
    font-weight: 500;
    gap: 0.625rem;
}

.checkbox input {
    width: 1rem;
    min-height: 1rem;
    accent-color: var(--auth-accent);
}

button,
.button {
    display: inline-flex;
    min-height: 2.625rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(165, 180, 252, 0.26);
    border-radius: 0.625rem;
    background: linear-gradient(150deg, var(--auth-accent) 0%, #4f46e5 100%);
    box-shadow: 0 0.625rem 1.75rem rgba(79, 70, 229, 0.28);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 650;
    padding-inline: 1rem;
    text-decoration: none;
    transition:
        border-color 160ms ease,
        background 160ms ease,
        transform 160ms ease;
}

button:hover,
.button:hover {
    background: linear-gradient(150deg, #7375f2 0%, #574edf 100%);
    transform: translateY(-1px);
}

.button-secondary {
    width: 100%;
    border-color: var(--auth-border);
    background: var(--auth-card);
    box-shadow: none;
    color: var(--auth-text);
    font-weight: 550;
    gap: 0.625rem;
}

.button-secondary:hover {
    border-color: var(--auth-border-strong);
    background: var(--auth-hover);
}

.google-icon {
    width: 1rem;
    height: 1rem;
    flex: none;
}

.button-link {
    margin-block-start: 0.25rem;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: var(--auth-muted);
}

.button-link:hover {
    background: var(--auth-hover);
    color: var(--auth-text);
}

:where(button, .button, a, input):focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 2px;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-block-start: 1.125rem;
    color: var(--auth-muted);
    font-size: 0.78125rem;
    gap: 0.75rem 1rem;
    text-align: center;
}

a {
    color: var(--auth-text);
    font-weight: 600;
    text-underline-offset: 0.2em;
}

.divider {
    display: flex;
    align-items: center;
    margin: 1rem 0 0.875rem;
    color: var(--auth-dim);
    font-size: 0.6875rem;
    gap: 0.625rem;
    text-transform: uppercase;
}

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

.alert {
    margin-block-end: 1rem;
    border: 1px solid transparent;
    border-radius: 0.625rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    padding: 0.65rem 0.75rem;
}

.alert ul {
    margin-block: 0;
    padding-inline-start: 1.2rem;
}

.alert-error {
    border-color: rgba(248, 113, 113, 0.26);
    background: rgba(127, 29, 29, 0.24);
    color: #fecaca;
}

.alert-success {
    border-color: rgba(74, 222, 128, 0.24);
    background: rgba(20, 83, 45, 0.28);
    color: #bbf7d0;
}

@media (max-width: 30rem) {
    .auth-shell {
        width: min(calc(100% - 1rem), 26.25rem);
        padding-block: 0.5rem;
    }

    .auth-card {
        padding: 1.4rem;
    }
}

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