.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--pb-space-8) var(--pb-space-4);

    background:
            radial-gradient(
                    ellipse at 50% 0%,
                    rgba(45, 212, 191, 0.09),
                    transparent 55%
            ),
            var(--pb-bg);
}

.auth-container {
    width: 100%;
    max-width: 440px;
    margin: auto;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--pb-space-3);
    margin-bottom: var(--pb-space-8);
}

.auth-card {
    padding: var(--pb-space-8);
    background: var(--pb-surface);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-xl);
    box-shadow: var(--pb-shadow-card);
}

.auth-heading {
    margin-bottom: var(--pb-space-8);
}

.auth-eyebrow {
    display: inline-block;
    margin-bottom: var(--pb-space-3);
    color: var(--pb-primary);
    font-size: var(--pb-text-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
}

.auth-heading h1 {
    font-size: var(--pb-text-3xl);
}

.auth-heading p {
    margin-top: var(--pb-space-2);
    color: var(--pb-text-secondary);
    font-size: var(--pb-text-sm);
    line-height: 1.6;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--pb-space-5);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--pb-space-2);
}

.form-group label {
    color: var(--pb-text);
    font-size: var(--pb-text-sm);
    font-weight: 500;
}

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--pb-space-3);
}

.form-group input {
    width: 100%;
    min-height: 46px;
    padding: 0 var(--pb-space-4);
    color: var(--pb-text);
    background: var(--pb-bg);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-md);
    outline: none;
    transition:
            border-color var(--pb-transition-fast),
            box-shadow var(--pb-transition-fast);
}

.form-group input::placeholder {
    color: var(--pb-text-muted);
}

.form-group input:focus {
    border-color: var(--pb-primary);
    box-shadow: 0 0 0 3px var(--pb-primary-muted);
}

.auth-link {
    color: var(--pb-primary);
    font-size: var(--pb-text-sm);
    font-weight: 500;
}

.auth-link:hover {
    color: var(--pb-primary-hover);
}

.auth-link-muted {
    color: var(--pb-text-secondary);
    font-size: var(--pb-text-xs);
}

.auth-submit {
    width: 100%;
    min-height: 48px;
    margin-top: var(--pb-space-2);
}

.auth-submit span {
    margin-left: auto;
    font-size: 1.1rem;
}

.auth-error {
    padding: var(--pb-space-3) var(--pb-space-4);
    margin-bottom: var(--pb-space-5);
    color: var(--pb-danger);
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: var(--pb-radius-md);
    font-size: var(--pb-text-sm);
}

.auth-footer {
    padding-top: var(--pb-space-6);
    margin-top: var(--pb-space-6);
    border-top: 1px solid var(--pb-border-light);
    color: var(--pb-text-secondary);
    font-size: var(--pb-text-sm);
    text-align: center;
}

.auth-footer .auth-link {
    margin-left: 4px;
}

.auth-legal {
    margin-top: var(--pb-space-6);
    color: var(--pb-text-muted);
    font-size: var(--pb-text-xs);
    text-align: center;
}

@media (max-width: 480px) {
    .auth-card {
        padding: var(--pb-space-6);
    }

    .auth-heading h1 {
        font-size: var(--pb-text-2xl);
    }
}


.auth-consent {
    display: flex;
    align-items: flex-start;
    gap: var(--pb-space-3);
    color: var(--pb-text-secondary);
    font-size: var(--pb-text-xs);
    line-height: 1.6;
    cursor: pointer;
}

.auth-consent input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--pb-primary);
    cursor: pointer;
}

.auth-consent a {
    font-size: inherit;
}


/* ==========================================================================
   Mobile readability v2 (2026-11-20) – phones only, desktop unchanged
   ========================================================================== */
@media (max-width: 768px) {
    /* 16px stops iOS Safari from zooming into the field on focus. */
    .auth-page .form-group input {
        min-height: 48px;
        font-size: 16px;
    }

    .auth-page .form-group label {
        font-size: 15px;
    }

    .auth-eyebrow {
        font-size: 12.5px;
    }

    .auth-heading p,
    .auth-footer,
    .auth-error {
        font-size: 15px;
    }

    .auth-page .text-xs,
    .auth-link-muted,
    .auth-legal,
    .auth-consent {
        font-size: 13.5px;
    }

    .auth-link-muted {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
    }

    .auth-footer .auth-link {
        display: inline-block;
        padding: 8px 0;
    }

    .auth-consent input {
        width: 22px;
        height: 22px;
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    /* Start the card near the top instead of centring it under the keyboard. */
    .auth-page {
        align-items: flex-start;
        padding: var(--pb-space-6) var(--pb-space-4) var(--pb-space-8);
    }

    .auth-brand {
        margin-bottom: var(--pb-space-6);
    }

    .auth-card {
        padding: var(--pb-space-6) var(--pb-space-5);
    }

    .auth-heading {
        margin-bottom: var(--pb-space-6);
    }
}

/* Brand mark: these classes live in layout.css, which auth pages do not load,
   so the logo rendered as plain "P PodBalance" text. Scoped copy for auth. */
.auth-brand .brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: var(--pb-radius-md);
    background: var(--pb-primary-muted);
    color: var(--pb-primary);
    font-family: var(--pb-font-heading);
    font-weight: 700;
    font-size: var(--pb-text-xl);
}

.auth-brand .brand-name {
    font-family: var(--pb-font-heading);
    font-size: var(--pb-text-xl);
    font-weight: 700;
    letter-spacing: -0.05em;
}

.auth-brand .brand-name span {
    color: var(--pb-primary);
}
