body:has(.signup-page),
.signup-page,
.signup-page input,
.signup-page button,
.signup-page label,
.signup-page a,
.signup-page p,
.signup-page h1,
.signup-page h2,
.signup-page h3,
.signup-page select,
.signup-page textarea {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body:has(.signup-page),
.signup-page,
.signup-page label,
.signup-page p,
.signup-page h1,
.signup-page h2,
.signup-page h3,
.signup-page a:not(.btn-show-suggestions):not(.btn-captcha-refresh):not(.btn-signup):not(.suggestion-item):not(.signup-terms-link) {
    color: #000;
}

body:has(.signup-page) {
    overflow: hidden;
    height: 100vh;
}

.signup-page {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    position: relative;
    background: #eef0f2 url('/icons/loginsales23.png') center left / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 3.25rem 4vw 2.5rem;
    box-sizing: border-box;
}

.signup-back-btn {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: #fff;
    border: 1px solid #d5dbe1;
    border-radius: 4px;
    color: #000;
    font-size: 0.85rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
}

.signup-back-btn:hover {
    color: #000;
    border-color: #514295;
}

.signup-right-panel {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 5.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
}

.signup-brand {
    text-align: center;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.signup-logo {
    display: block;
    width: 90px;
    height: auto;
    margin: 0 auto 0.35rem;
}

.signup-tagline {
    font-size: 0.92rem;
    font-weight: 500;
    color: #000;
    margin: 0;
    line-height: 1.2;
}

.signup-card {
    width: 100%;
    flex: 1;
    min-height: 0;
    max-height: calc(100vh - 10rem);
    overflow-x: hidden;
    overflow-y: auto;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    padding: 2.9rem 3.15rem 2rem;
    position: relative;
    border-right: 5px solid #514295;
    scrollbar-width: thin;
    scrollbar-color: #c5c9d0 transparent;
}

.signup-card::-webkit-scrollbar {
    width: 5px;
}

.signup-card::-webkit-scrollbar-thumb {
    background: #c5c9d0;
    border-radius: 4px;
}

.signup-field {
    position: relative;
    margin-bottom: 0.5rem;
}

.signup-field .form-control,
.signup-field .form-select {
    padding: 0.45rem 0.7rem;
    border: 1px solid #d5dbe1;
    border-radius: 4px;
    font-size: 0.82rem;
    height: 36px;
    background: #fff;
    color: #000;
}

.signup-field .form-control::placeholder {
    color: #000;
}

.signup-field .form-control:focus,
.signup-field .form-select:focus {
    border-color: #514295;
    box-shadow: none;
}

.signup-field.has-toggle .form-control {
    padding-right: 2.2rem;
}

.signup-field .toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #000;
    padding: 0;
    cursor: pointer;
    font-size: 0.9rem;
}

.signup-page .row.g-1 {
    --bs-gutter-y: 0.5rem;
    --bs-gutter-x: 0.5rem;
}

.company-code-block {
    margin-bottom: 0.5rem;
}

.company-code-row {
    display: flex;
    gap: 0.4rem;
    align-items: stretch;
}

.company-code-row .signup-field {
    flex: 1;
    margin-bottom: 0;
}

.btn-show-suggestions {
    height: 36px;
    padding: 0 0.6rem;
    background: #514295;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 0.72rem;
    white-space: nowrap;
    font-weight: 500;
}

.btn-show-suggestions:hover {
    background: #43367d;
    color: #fff;
}

.company-info-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: #000;
    font-size: 1rem;
    padding: 0;
    flex-shrink: 0;
}

.company-suggestions {
    margin-top: 0.35rem;
    padding: 0.45rem 0.55rem;
    background: #f8f9fb;
    border: 1px solid #d5dbe1;
    border-radius: 4px;
}

.company-suggestions-label {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    color: #000;
}

.company-suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.company-suggestions .suggestion-item {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border: 1px solid #d5dbe1;
    border-radius: 4px;
    background: #fff;
    font-size: 0.8rem;
    color: #000;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.company-suggestions .suggestion-item:hover,
.company-suggestions .suggestion-item:focus {
    background: #514295;
    border-color: #514295;
    color: #000;
    outline: none;
}

.company-suggestions-empty {
    font-size: 0.78rem;
    color: #000;
}

.phone-row {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.phone-row .country-select {
    width: 150px;
    min-width: 130px;
    flex-shrink: 0;
    height: 36px;
    font-size: 0.82rem;
    padding: 0.45rem 0.5rem;
}

.phone-row .signup-field {
    flex: 1;
    margin-bottom: 0;
}

.captcha-row {
    display: flex;
    gap: 0.4rem;
    align-items: stretch;
    margin-bottom: 0.5rem;
}

.captcha-row .signup-field {
    flex: 1;
    margin-bottom: 0;
}

.captcha-display {
    min-width: 82px;
    height: 36px;
    background: #514295;
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    user-select: none;
}

.signup-turnstile-wrap {
    margin: 0.75rem 0 1rem;
    height: 66px;
    max-height: 66px;
    overflow: hidden;
    position: relative;
}

.signup-turnstile-wrap #turnstile-widget {
    overflow: hidden;
}

/* White strip covers the Cloudflare test-key banner ("For testing only...") at the bottom */
.signup-turnstile-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 16px;
    background: #fff;
    pointer-events: none;
    z-index: 2;
}

.signup-autofill-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.btn-captcha-refresh {
    width: 36px;
    height: 36px;
    background: #514295;
    border: none;
    border-radius: 4px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.btn-captcha-refresh:hover {
    background: #43367d;
}

.signup-page .signup-terms,
.signup-page .signup-terms .form-check-label {
    color: #0d6efd !important;
}

.signup-page .signup-terms a,
.signup-page .signup-terms .signup-terms-link {
    color: #0d6efd !important;
    font-weight: 600;
    text-decoration: underline;
}

.signup-terms a:hover,
.signup-terms .signup-terms-link:hover {
    color: #0a58ca !important;
    text-decoration: underline;
}

.signup-terms {
    font-size: 0.78rem;
    margin: 0.35rem 0 0.65rem;
}

.signup-terms .form-check-input {
    margin-top: 0.1rem;
}

.signup-terms .form-check-label {
    font-weight: 600;
}

.btn-signup {
    width: 100%;
    height: 38px;
    background: #514295;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-signup:hover {
    background: #43367d;
    color: #fff;
}

.signup-alert {
    font-size: 0.78rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    padding: 0.45rem 0.65rem;
}

.signup-copyright {
    position: fixed;
    right: 1.25rem;
    bottom: 0.6rem;
    z-index: 3;
    font-size: 0.7rem;
    color: #000;
    margin: 0;
    pointer-events: none;
}

.company-code-wrap {
    position: relative;
    flex: 1;
}

@media (max-width: 991.98px) {
    .signup-page {
        justify-content: center;
        padding: 3.25rem 1rem 2.5rem;
        background-position: 20% center;
    }

    .signup-page::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(255, 255, 255, 0.5);
        pointer-events: none;
    }

    .signup-right-panel {
        max-height: calc(100vh - 5rem);
    }

    .signup-card {
        max-height: calc(100vh - 9.5rem);
    }

    .signup-copyright {
        position: fixed;
        right: 1rem;
        bottom: 0.5rem;
        text-align: right;
    }
}

@media (max-height: 720px) {
    .signup-logo {
        width: 75px;
    }

    .signup-tagline {
        font-size: 0.85rem;
    }

    .signup-card {
        max-height: calc(100vh - 8.5rem);
        padding: 0.75rem 1rem;
    }

    .signup-field .form-control,
    .signup-field .form-select,
    .btn-show-suggestions,
    .company-info-btn,
    .captcha-display,
    .btn-captcha-refresh,
    .phone-row .country-select {
        height: 34px;
    }

    .btn-signup {
        height: 36px;
    }
}

@media (max-width: 575.98px) {
    .signup-right-panel {
        max-width: 100%;
    }

    .company-code-row {
        flex-wrap: wrap;
    }

    .btn-show-suggestions {
        width: 100%;
    }

    .phone-row {
        flex-direction: column;
    }

    .phone-row .country-select {
        width: 100%;
    }
}

.btn-google-signup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    height: 42px;
    border: 1px solid #d5dbe1;
    border-radius: 4px;
    background: #fff;
    color: #000;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.btn-google-signup:hover {
    background: #f8f9fa;
    border-color: #c5ccd3;
    color: #222;
}

.signup-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.9rem 0;
    color: #000;
    font-size: 0.78rem;
}

.signup-divider::before,
.signup-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e4e8;
}

.signup-divider span {
    white-space: nowrap;
}

/* Auth flow components inside login shell */
.login-card .signup-flow-otp-notice {
    background: #f3f0fa;
    border: 1px solid #ddd6f3;
    color: #43367d;
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1rem;
}

.login-card .signup-flow-otp-email {
    display: block;
    font-weight: 700;
    margin-top: 0.25rem;
    color: #514295;
}

.login-card .signup-flow-otp-boxes {
    display: flex;
    justify-content: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.login-card .signup-flow-otp-box {
    width: 52px;
    height: 52px;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 600;
    border: 1px solid #d8dee6;
    border-radius: 8px;
    color: #1f2937;
}

.login-card .signup-flow-otp-box:focus {
    border-color: #514295;
    outline: none;
    box-shadow: 0 0 0 3px rgba(81, 66, 149, 0.12);
}

.login-card .btn-signup-resend {
    width: 100%;
    border: none;
    background: none;
    color: #514295;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.65rem;
    padding: 0.35rem 0;
}

.login-card .btn-signup-resend:disabled {
    color: #9aa3af;
}

.login-card .btn-signup-resend:hover:not(:disabled) {
    color: #43367d;
}

/* Legacy signup flow page (wizard still uses signup-page) */
.signup-flow-page {
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background-color: #eef0f2;
    background-image: none;
}

.signup-flow-page .signup-right-panel {
    margin-top: 0;
    gap: 1.25rem;
    max-height: none;
}

.signup-flow-page .signup-brand {
    margin-bottom: 0;
    margin-top: 0.5rem;
    padding-top: 0;
}

.signup-flow-page .signup-flow-card {
    flex: 0 0 auto;
    min-height: 0;
    margin-top: 0;
    max-height: none;
}

.signup-flow-card {
    padding: 1.75rem 1.5rem 1.35rem;
}

.signup-flow-title {
    font-size: 1.45rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 1.15rem;
    color: #111;
}

.signup-flow-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #222;
}

.btn-signup-next {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 4px;
    background: #514295;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.35rem;
    transition: background 0.2s;
}

.btn-signup-next:hover {
    background: #43367d;
    color: #fff;
}

.signup-flow-legal {
    margin: 0.85rem 0 1rem;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #000;
    text-align: center;
}

.signup-flow-legal a {
    color: #514295;
    font-weight: 600;
    text-decoration: none;
}

.signup-flow-divider {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 1rem 0;
    color: #000;
    font-size: 0.8rem;
    font-weight: 600;
}

.signup-flow-divider::before,
.signup-flow-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #dde1e6;
}

.signup-flow-back {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #514295;
    text-decoration: none;
    font-weight: 600;
}

.signup-flow-email-display {
    text-align: center;
    font-size: 0.85rem;
    color: #000;
    margin-bottom: 1rem;
}

.signup-flow-otp-notice {
    background: #e8f8ef;
    border: 1px solid #b8e6cc;
    color: #1e6f46;
    border-radius: 4px;
    padding: 0.7rem 0.85rem;
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 1rem;
}

.signup-flow-otp-email {
    display: block;
    font-weight: 700;
    margin-top: 0.2rem;
}

.signup-flow-otp-boxes {
    display: flex;
    justify-content: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.signup-flow-otp-box {
    width: 48px;
    height: 48px;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 600;
    border: 1px solid #d5dbe1;
    border-radius: 4px;
}

.signup-flow-otp-box:focus {
    border-color: #514295;
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(81, 66, 149, 0.15);
}

.btn-signup-resend {
    width: 100%;
    border: none;
    background: none;
    color: #514295;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.65rem;
}

.btn-signup-resend:disabled {
    color: #000;
}

.signup-flow-card .btn-google-signup {
    border-color: #222;
}

.signup-footer-links {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
    padding-top: 0.25rem;
}

.signup-footer-links a {
    display: block;
    color: #000;
    font-size: 0.82rem;
    text-decoration: none;
    padding: 0.2rem 0;
    line-height: 1.5;
}

.signup-footer-links a:hover {
    color: #000;
    text-decoration: underline;
}

.signup-app-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 1rem;
    padding-bottom: 0.25rem;
}

.signup-app-badges a {
    display: block;
    line-height: 0;
}

.signup-app-badges img {
    height: 36px;
    width: auto;
}
