.auth-page .auth-page__title {
    font-size: 1.25rem;
    font-weight: 700;
}

.auth-card {
    border-radius: 1rem;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    padding: 1.25rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.04);
}

.auth-field {
    margin-bottom: 1.25rem;
}

.auth-field__label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.auth-field__wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    border: 1.5px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field__wrap:focus-within {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15);
}

.auth-field__wrap--invalid {
    border-color: var(--bs-danger);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-danger-rgb), 0.12);
}

.auth-field__icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    font-size: 1.1rem;
}

.auth-field__input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 1rem;
    padding: 0;
    min-width: 0;
    color: var(--bs-body-color);
}

.auth-field__input--ltr {
    direction: ltr;
    text-align: left;
}

.auth-field__input::placeholder {
    color: var(--bs-secondary-color);
    opacity: 0.75;
}

.auth-field__actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

.auth-field__action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--bs-secondary-color);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.auth-field__action-btn:hover {
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.08);
}

.auth-field__action-btn:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.auth-field__error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8125rem;
}

.auth-recaptcha {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.auth-recaptcha > div {
    border-radius: 0.5rem;
    overflow: hidden;
}

.auth-submit-btn {
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-weight: 600;
}

.auth-submit-btn--loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-btn-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-btn-spin 0.65s linear infinite;
    flex-shrink: 0;
}

.auth-submit-btn.btn-outline-primary .auth-btn-spinner,
.auth-submit-btn.btn-link .auth-btn-spinner {
    border-color: rgba(var(--bs-primary-rgb), 0.25);
    border-top-color: var(--bs-primary);
}

@keyframes auth-btn-spin {
    to { transform: rotate(360deg); }
}

.auth-validation-alert {
    scroll-margin-top: 1rem;
    border-radius: 0.75rem;
}

.auth-social {
    margin-top: 0.5rem;
}

.auth-social__divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 1.25rem;
    color: var(--bs-secondary-color);
    font-size: 0.8125rem;
}

.auth-social__divider::before,
.auth-social__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--bs-border-color);
}

.auth-social__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

@media (min-width: 480px) {
    .auth-social__list {
        grid-template-columns: 1fr 1fr;
    }
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.78rem 0.85rem;
    border-radius: 0.75rem;
    border: 1.5px solid transparent;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, background-color 0.2s ease;
}

.auth-social-btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.auth-social-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.auth-social-btn--google {
    background: #ffffff;
    border-color: rgba(60, 64, 67, 0.18);
    color: #3c4043;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

.auth-social-btn--google:hover {
    color: #202124;
    border-color: rgba(234, 67, 53, 0.45);
    box-shadow: 0 4px 14px rgba(234, 67, 53, 0.18);
}

.auth-social-btn--google .auth-social-btn__icon {
    color: #ea4335;
}

[data-bs-theme="dark"] .auth-social-btn--google {
    background: rgba(255, 255, 255, 0.96);
    color: #3c4043;
}

.auth-social-btn--github {
    background: #24292f;
    border-color: #24292f;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.auth-social-btn--github:hover {
    color: #ffffff;
    background: #1b1f23;
    border-color: #1b1f23;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.auth-social-btn--github .auth-social-btn__icon {
    color: #ffffff;
}

[data-bs-theme="dark"] .auth-social-btn--github {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    color: #f0f6fc;
}

[data-bs-theme="dark"] .auth-social-btn--github:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.auth-footer {
    margin-top: 1.75rem;
    text-align: center;
}

.auth-footer__prompt {
    font-size: 0.9375rem;
    color: var(--bs-secondary-color);
    margin-bottom: 1rem;
}

.auth-footer__link {
    color: var(--bs-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer__link:hover {
    text-decoration: underline;
}

.auth-footer__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 0.75rem;
    font-size: 0.8125rem;
}

.auth-footer__nav-link {
    color: var(--bs-secondary-color);
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-footer__nav-link:hover {
    color: var(--bs-primary);
}

.auth-footer__nav-sep {
    color: var(--bs-border-color);
    user-select: none;
}

/* --- Signup quick flow --- */
.auth-page--signup .auth-page__header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-page--signup .auth-page__title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    line-height: 1.4;
}

.auth-page--signup .auth-page__subtitle {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    margin: 0;
    line-height: 1.6;
}

.auth-page--signup .auth-card {
    padding: 1.5rem 1.35rem;
    border-radius: 1rem;
}

.auth-page--signup .auth-card .auth-field {
    margin-bottom: 1rem;
}

.auth-page--signup .auth-card .auth-field__label {
    text-align: right;
    margin-bottom: 0.55rem;
}

.auth-page--signup .auth-field__input--mixed {
    direction: rtl;
    text-align: right;
    unicode-bidi: plaintext;
}

.auth-page--signup .auth-field__input--mixed::placeholder {
    text-align: right;
    direction: rtl;
}

.auth-page--signup .auth-field__hint {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    text-align: right;
    line-height: 1.5;
}

.auth-page--signup .auth-field__hint-example {
    direction: ltr;
    display: inline-block;
    unicode-bidi: embed;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.01em;
}

.auth-page--signup .auth-submit-btn {
    margin-top: 0.25rem;
    min-height: 2.85rem;
    font-size: 0.9375rem;
}

.auth-page--signup .auth-social__divider {
    margin: 1.35rem 0 1rem;
}

.auth-page--signup .otp-sent-summary {
    text-align: right;
}

.auth-page--signup .signup-password-step .text-center {
    text-align: center !important;
}

@media (max-width: 576px) {
    .auth-page .row.my-5 {
        margin-top: 1.25rem !important;
        margin-bottom: 1.25rem !important;
    }

    .auth-page .auth-page__title {
        font-size: 1.15rem;
    }

    .auth-page--signup .auth-page__title {
        font-size: 1.2rem;
    }

    .auth-card {
        padding: 1.15rem;
    }

    .auth-page--signup .auth-card {
        padding: 1.25rem 1.1rem;
    }

    .auth-field__wrap {
        padding: 0.75rem 0.85rem;
    }

    .auth-field__input {
        font-size: 16px;
    }

    .auth-recaptcha {
        transform: scale(0.92);
        transform-origin: center top;
    }

    .auth-social__list {
        grid-template-columns: 1fr;
    }
}
