:root {
    color-scheme: light;
    --auth-bg: #fff;
    --auth-text: #111827;
    --auth-muted: #4b5563;
    --auth-field: #fff;
    --auth-border: #d1d5db;
    --auth-rule: #e5e7eb;
    --auth-focus: #3b82f6;
}

:root.dark {
    color-scheme: dark;
    --auth-bg: #09090b;
    --auth-text: #fff;
    --auth-muted: #a1a1aa;
    --auth-field: #18181b;
    --auth-border: #3f3f46;
    --auth-rule: #27272a;
}

body {
    margin: 0;
    background: var(--auth-bg);
    color: var(--auth-text);
    font: 500 16px/1.5 Manrope, system-ui, sans-serif;
}

.auth-page {
    width: min(calc(100% - 40px), 344px);
    margin-inline: auto;
    padding-block: clamp(32px, 8vh, 88px) 40px;
}

.auth-brand {
    display: block;
    width: 124px;
    margin: 0 auto 24px;
    padding-block: 6px;
}

.auth-brand img {
    display: block;
    width: 100%;
    height: auto;
}

.dark .auth-brand img { filter: invert(1); }

.auth-page h1 { margin: 0 0 28px; }

.auth-form, .auth-field, .auth-providers { display: grid; }
.auth-form { gap: 16px; }
.auth-field { gap: 6px; }

.auth-field label {
    font-size: 14px;
    font-weight: 600;
}

.auth-field input, .auth-field select {
    min-width: 0;
    border-color: var(--auth-border);
    background: var(--auth-field);
    color: var(--auth-text);
}

.auth-field select:invalid, .auth-field small { color: var(--auth-muted); }
.auth-field small { font-size: 12px; }

.auth-page a:focus-visible {
    outline: 2px solid var(--auth-focus);
    outline-offset: 2px;
}

.auth-submit {
    --tw-ring-offset-color: var(--auth-bg);
    margin-top: 4px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-block: 16px;
    color: var(--auth-muted);
    font-size: 13px;
}

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

.auth-providers { gap: 8px; }

.auth-provider {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 20px;
    align-items: center;
    column-gap: 8px;
    min-height: 40px;
    border-color: var(--auth-border);
    background: transparent;
    color: var(--auth-muted);
    cursor: not-allowed;
    opacity: 1;
}

.auth-provider-icon {
    width: 20px;
    height: 20px;
}

.auth-provider-yandex {
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e8322c;
    color: #fff;
    font-size: 14px;
    line-height: 1;
}

.auth-switch {
    margin: 28px 0 0;
    color: var(--auth-muted);
    text-align: center;
    font-size: 14px;
}

.auth-switch a {
    color: var(--auth-text);
    font-weight: 600;
    text-underline-offset: 3px;
}

.auth-switch a:hover { text-decoration: underline; }
