:root {
    --auth-primary: var(--brand-primary);
    --auth-text: #27272a;
    --auth-muted: #71717a;
    --auth-border: #e4e4e7;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: hidden;
}

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: #f7f7f5;
    color: var(--auth-text);
}

.auth-shell {
    display: flex;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 16px;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 380px;
}

.auth-back {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--auth-muted);
    font-size: 0.6875rem;
    font-weight: 500;
    text-decoration: none;
}

.auth-back:hover,
.auth-link:hover {
    color: var(--auth-primary);
    text-decoration: underline;
}

.auth-card {
    width: 100%;
    padding: 28px;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    background: #fff;
}

.auth-brand {
    display: inline-flex;
    flex-direction: column;
    color: var(--auth-primary);
    line-height: 1;
}

.auth-brand strong {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.auth-brand small {
    margin-top: 4px;
    color: #a1a1aa;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-heading {
    margin-top: 24px;
}

.auth-title {
    margin: 0;
    color: #18181b;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.auth-description {
    margin: 6px 0 0;
    color: var(--auth-muted);
    font-size: 0.6875rem;
    line-height: 1.55;
}

.auth-alert {
    margin-top: 16px;
    padding: 10px 12px;
    border-radius: 7px;
    font-size: 0.6875rem;
    line-height: 1.5;
}

.auth-alert--success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.auth-alert--error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.auth-google {
    display: flex;
    width: 100%;
    height: 42px;
    margin-top: 20px;
    padding: 0 14px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid #d4d4d8;
    border-radius: 7px;
    background: #fff;
    color: #3f3f46;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.auth-google:hover {
    border-color: #a1a1aa;
    background: #fafafa;
}

.auth-google svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.auth-separator {
    display: flex;
    margin: 18px 0;
    align-items: center;
    gap: 10px;
    color: #a1a1aa;
    font-size: 0.625rem;
}

.auth-separator::before,
.auth-separator::after {
    height: 1px;
    flex: 1;
    background: #e4e4e7;
    content: '';
}

.auth-form {
    display: grid;
    margin-top: 0;
    gap: 16px;
}

.auth-field label {
    display: block;
    margin-bottom: 6px;
    color: #3f3f46;
    font-size: 0.6875rem;
    font-weight: 600;
}

.auth-required {
    color: #dc2626;
}

.auth-control {
    display: block;
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d4d4d8;
    border-radius: 7px;
    background: #fff;
    color: #18181b;
    font: inherit;
    font-size: 0.75rem;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-control::placeholder {
    color: #a1a1aa;
}

.auth-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 2px rgb(138 0 0 / 0.09);
}

.auth-help {
    margin: 5px 0 0;
    color: #a1a1aa;
    font-size: 0.625rem;
    line-height: 1.4;
}

.auth-submit {
    width: 100%;
    height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 7px;
    background: var(--auth-primary);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
}

.auth-submit:hover {
    background: var(--brand-primary-hover);
}

.auth-submit:disabled {
    cursor: wait;
    opacity: 0.65;
}

.auth-footer {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #f4f4f5;
    color: var(--auth-muted);
    font-size: 0.6875rem;
    text-align: center;
}

.auth-link {
    color: var(--auth-primary);
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 480px) {
    .auth-shell {
        padding: 14px 12px 20px;
        align-items: flex-start;
    }

    .auth-card {
        padding: 22px 18px;
    }

    .auth-heading {
        margin-top: 20px;
    }

    .auth-form {
        gap: 14px;
    }
}
