:root {
    --pbse-title-size: clamp(1.8rem, 3.5vw, 2.5rem);
    --pbse-body-size: 1.125rem;
    --pbse-form-size: 1.125rem;
    --pbse-button-size: 1.125rem;
    --pbse-small-body-size: 1rem;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background-color: var(--white) !important;
    color: #1a1b22;
}

.form-section {
    padding: 4rem 2rem;
    text-align: center;
    background-color: var(--white);
}

/* Reusable flow page shell */
.flow-page,
.signup-page {
    min-height: 100vh;
    padding: 8.1rem 1.5rem 2.3rem;
    background: linear-gradient(180deg, #dfe2f0 0%, #eaebf5 100%);
}

.flow-shell {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
}

.flow-card,
.signup-card {
    width: 100%;
    margin: 0;
    border-radius: 18px;
    border: 1px solid #dedee8;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(22, 26, 44, 0.09);
    color: #1a1b22;
    padding: 2rem 4.2rem 2rem;
}

.signup-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2.2rem;
}

.signup-progress-dot {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 4px solid #bfc0c4;
    background: #bfc0c4;
    flex-shrink: 0;
}

.signup-progress-dot.is-active {
    border-color: #5b6ef7;
    background: #5b6ef7;
}

.signup-progress-dot.is-current {
    border-color: #5b6ef7;
    background: #ffffff;
}

.signup-progress-line {
    width: 38px;
    height: 5px;
    background: #bfc0c4;
    border-radius: 999px;
    margin: 0 2px;
}

.signup-progress-line.is-active {
    background: #5b6ef7;
}

.signup-title {
    margin: 0;
    color: #5b6ef7;
    font-size: var(--pbse-title-size);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.signup-copy {
    margin: 1.15rem 0 0;
    font-size: var(--pbse-body-size);
    color: #23242b;
    line-height: 1.4;
}

#signup_form {
    margin-top: 1.35rem;
}

.signup-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.1rem;
    row-gap: 0;
}

.signup-field-group {
    margin-bottom: 0.72rem;
}

.signup-input {
    width: 100%;
    border-radius: 12px;
    border: 2px solid #4f5157;
    background: #ececef;
    color: #1a1b22;
    font-size: var(--pbse-form-size);
    line-height: 1.25;
    padding: 0.94rem 1.28rem;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.signup-input::placeholder {
    color: #21242c;
    opacity: 1;
}

.signup-input:focus {
    outline: 0;
    border-color: #5b6ef7;
    box-shadow: 0 0 0 3px rgba(91, 110, 247, 0.2);
}

.signup-input.signup-field-valid {
    border-color: #198754;
    box-shadow: none;
}

.signup-input.signup-field-invalid {
    border-color: #dc3545;
    box-shadow: none;
}

.signup-field-errors {
    margin-top: 0.35rem;
    color: #b21a2b;
    font-size: 0.9rem;
    text-align: left;
}

.signup-field-errors p {
    margin: 0.2rem 0 0;
}

.signup-error-banner {
    border: 1px solid #dc3545;
    background: #fbe8eb;
    color: #a51c30;
    border-radius: 10px;
    padding: 0.68rem 0.95rem;
    margin-bottom: 1rem;
}

.signup-error-banner p {
    margin: 0;
}

.signup-strength-row {
    display: flex;
    align-items: center;
    gap: 0.62rem;
    margin: -0.1rem 0 0.72rem;
}

.signup-strength-label {
    font-size: 0.98rem;
    font-weight: 700;
    color: #1f2026;
    white-space: nowrap;
}

#pw-strength {
    flex: 1;
    max-width: 470px;
    height: 10px;
    border-radius: 2px;
    overflow: hidden;
    background: #d1d2d8;
}

#pw-strength .progress-bar {
    display: block;
    width: 0%;
    height: 100%;
    background: #dc3545;
    transition:
        width 0.3s ease,
        background-color 0.3s ease;
}

.signup-password-requirements {
    margin-top: 0.5rem;
    margin-bottom: 0.9rem;
    padding: 0.75rem 1rem;
    background: #f7f8fc;
    border-radius: 8px;
    border: 1px solid #d8dbea;
}

.signup-password-requirements ul {
    margin: 0;
    padding-left: 1.25rem;
    color: #4a4d5a;
    font-size: 0.9rem;
    line-height: 1.5;
}

.signup-password-requirements li {
    margin-top: 0.35rem;
}

.signup-password-requirements li:first-child {
    margin-top: 0;
}

.signup-password-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.02rem;
    cursor: pointer;
    font-size: 1.04rem;
    font-weight: 700;
    color: #21232b;
}

.signup-password-toggle .form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.signup-confirmation-note {
    margin: 1rem 0 0;
    font-size: var(--pbse-body-size);
    font-weight: 700;
    color: #1f2026;
}

.signup-actions {
    margin-top: 1.35rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.6rem;
}

.signup-back-link {
    color: #151720;
    text-decoration: none;
    font-size: var(--pbse-button-size);
    font-weight: 500;
    letter-spacing: 0.03em;
}

.signup-back-link:hover,
.signup-back-link:focus-visible {
    color: #5b6ef7;
    text-decoration: underline;
}

.signup-next-btn {
    min-width: 158px;
    border: 0;
    border-radius: 999px;
    background: #5b6ef7;
    color: #ffffff;
    font-size: var(--pbse-button-size);
    font-weight: 700;
    padding: 0.52rem 1.55rem;
    letter-spacing: 0.01em;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.signup-next-btn:not(:disabled):hover {
    transform: translateY(-1px);
    background: #4c5fe9;
    box-shadow: 0 8px 18px rgba(91, 110, 247, 0.3);
}

.signup-next-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.signup-signin-link {
    margin: 0.95rem 0 0;
    text-align: center;
    font-size: var(--pbse-body-size);
    color: #2a2c35;
}

.signup-signin-link a {
    color: #5b6ef7;
}

.verify-email-action {
    display: flex;
    align-items: center;
    margin-top: 1.4rem;
}

.verify-email-btn {
    margin-top: 1.4rem;
}

.flow-powered-by,
.signup-powered-by {
    margin-top: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #1f2230;
    font-size: 0.95rem;
    font-weight: 500;
}

.flow-powered-by img,
.signup-powered-by img {
    height: 22px;
    width: auto;
    display: block;
}

.flow-support-contact {
    margin: 1rem 0 0;
    color: #1f2230;
    font-size: var(--pbse-small-body-size);
    line-height: 1.35;
    text-align: center;
}

.flow-support-copy-btn {
    margin-left: 0.45rem;
    border: 1px solid #c6c8d2;
    border-radius: 999px;
    background: #ffffff;
    color: #1f2230;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    vertical-align: text-bottom;
}

.flow-support-copy-btn:hover,
.flow-support-copy-btn:focus-visible {
    border-color: #5b6ef7;
    color: #2f42cf;
}

.flow-support-copy-icon {
    width: 0.95rem;
    height: 0.95rem;
    fill: currentColor;
}

.flow-support-copy-feedback {
    margin-left: 0.45rem;
    color: #1f2230;
    font-weight: 500;
}

.flow-support-copy-feedback.is-error {
    color: #a51c30;
}

.nav-link-plain {
    background: transparent;
    color: var(--white) !important;
    padding: 0.5rem 0;
    border-radius: 0;
    font-weight: 500;
}

.nav-link-plain:hover,
.nav-link-plain:focus-visible {
    color: var(--primary-blue) !important;
}

.nav-home-btn {
    min-width: 118px;
    justify-content: center;
    letter-spacing: 0.4px;
}

/* Reusable flow content styles */
.flow-title {
    margin: 0;
    color: #5b6ef7;
    font-size: var(--pbse-title-size);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.flow-copy {
    margin: 1.2rem 0 0;
    font-size: var(--pbse-body-size);
    color: #23242b;
    line-height: 1.4;
}

.flow-text {
    margin: 2rem 0 0;
    font-size: var(--pbse-body-size);
    color: #21232a;
    line-height: 1.35;
    max-width: 820px;
}

.flow-disclaimer {
    font-size: var(--pbse-small-body-size);
}

.flow-link-stack {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: flex-start;
}

.flow-link-stack a {
    color: #20242f;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-size: var(--pbse-body-size);
}

.pending-email-progress {
    margin-bottom: 2rem;
}

.flow-form {
    margin-top: 1.4rem;
    max-width: 840px;
}

.flow-form .flow-text {
    margin-top: 0.7rem;
}

.flow-actions {
    margin-top: 1.35rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.flow-back-link {
    color: #151720;
    text-decoration: none;
    font-size: var(--pbse-button-size);
    font-weight: 500;
    letter-spacing: 0.03em;
}

.flow-back-link:hover,
.flow-back-link:focus-visible {
    color: #5b6ef7;
    text-decoration: underline;
}

.flow-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    border: 0;
    border-radius: 999px;
    background: #5b6ef7;
    color: #fff;
    font-size: var(--pbse-button-size);
    font-weight: 700;
    padding: 0.58rem 1.6rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.flow-primary-btn:hover,
.flow-primary-btn:focus-visible {
    transform: translateY(-1px);
    background: #4c5fe9;
    box-shadow: 0 8px 18px rgba(91, 110, 247, 0.3);
    color: #fff;
    text-decoration: none;
}

.flow-inline-link {
    color: #5b6ef7;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.flow-inline-link:hover,
.flow-inline-link:focus-visible {
    color: #4558df;
}

.flow-error-banner {
    border: 1px solid #dc3545;
    background: #fbe8eb;
    color: #a51c30;
    border-radius: 10px;
    padding: 0.68rem 0.95rem;
    margin: 1rem 0 0;
}

.flow-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.flow-header-row .flow-copy {
    margin-top: 0.95rem;
    max-width: 720px;
}

.flow-env-select {
    min-width: 140px;
    border: 1px solid #8a8d99;
    border-radius: 10px;
    background: #f7f7fa;
    color: #1f2230;
    padding: 0.35rem 0.6rem;
}

.flow-term-grid {
    margin-top: 1.15rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem;
    max-width: 760px;
}

.flow-term-btn {
    width: 100%;
    border-radius: 12px;
    border: 2px solid #4f5157;
    background: #ececef;
    color: #1a1b22;
    font-size: var(--pbse-form-size);
    font-weight: 500;
    padding: 0.94rem 1.2rem;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.flow-term-btn:hover,
.flow-term-btn:focus-visible {
    border-color: #5b6ef7;
    box-shadow: 0 0 0 3px rgba(91, 110, 247, 0.18);
}

.flow-term-btn.is-selected {
    border-color: #5b6ef7;
    background: #e7ebff;
    color: #2f42cf;
}

.flow-term-result {
    margin-top: 1rem;
    display: none;
    max-width: 760px;
    border: 1px solid #d8dbea;
    border-radius: 12px;
    background: #eceef7;
    color: #202331;
    padding: 0.9rem 1.05rem;
    font-size: var(--pbse-body-size);
    line-height: 1.35;
}

.term-selection-content {
    max-width: 760px;
    margin: 0 auto;
}

.pending-term-progress {
    margin-bottom: 1.55rem;
}

.pending-term-progress .signup-progress-dot.is-current {
    border-color: #bfc0c4;
    background: #5b6ef7;
}

.term-selection-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #191d28;
    font-size: var(--pbse-body-size);
    font-weight: 700;
    line-height: 1;
}

.term-selection-verified-icon {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    background: #5b6ef7;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.term-selection-title {
    margin-top: 1.15rem;
    font-size: var(--pbse-title-size);
}

.term-selection-grid {
    margin-top: 1.45rem;
    gap: 0.65rem;
    max-width: none;
}

.term-selection-btn {
    border-radius: 10px;
    border-width: 1px;
    background: #fff;
    color: #171921;
    font-size: var(--pbse-button-size);
    font-weight: 500;
    line-height: 1.2;
    padding: 1rem 1.2rem;
}

.term-selection-btn:hover,
.term-selection-btn:focus-visible {
    border-color: #5b6ef7;
    box-shadow: none;
}

.term-selection-btn.is-selected {
    border-color: #5b6ef7;
    background: #5b6ef7;
    color: #fff;
}

.term-selection-result {
    margin-top: 0.95rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #171921;
    font-size: var(--pbse-body-size);
    font-weight: 700;
    line-height: 1.35;
    padding: 0;
}

.term-selection-actions {
    margin-top: 1.65rem;
    gap: 2.35rem;
}

.term-selection-actions .flow-back-link {
    font-size: var(--pbse-button-size);
}

.term-selection-actions .flow-primary-btn {
    min-width: 182px;
    font-size: var(--pbse-button-size);
    padding: 0.65rem 1.8rem;
}

.pending-kyc-progress {
    margin-bottom: 1.55rem;
}

.pending-kyc-content {
    max-width: 760px;
    margin: 0 auto;
}

.pending-kyc-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.pending-kyc-selected {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #191d28;
    font-size: var(--pbse-body-size);
    font-weight: 700;
    line-height: 1;
}

.pending-kyc-selected-icon {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    background: #5b6ef7;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.pending-kyc-title {
    margin-top: 1.1rem;
}

.pending-kyc-env {
    margin-left: auto;
}

.pending-kyc-copy {
    margin-top: 1.1rem;
}

.pending-kyc-need-title {
    margin: 0.75rem 0 0;
    color: #1d1f2a;
    font-size: var(--pbse-body-size);
    font-weight: 700;
}

.pending-kyc-list {
    margin: 0.35rem 0 0;
    padding-left: 1.55rem;
    color: #1f2230;
    font-size: var(--pbse-body-size);
    line-height: 1.35;
}

.pending-kyc-list li {
    margin-top: 0.18rem;
}

.pending-kyc-veriff-root {
    margin-top: 1.15rem;
    display: flex;
    justify-content: center;
}

.pending-kyc-veriff-root > button,
.pending-kyc-veriff-root button,
.pending-kyc-veriff-root input[type="button"],
.pending-kyc-veriff-root [role="button"] {
    min-width: 285px;
    border-radius: 999px;
    border: 0 !important;
    background: #5b6ef7 !important;
    color: #fff !important;
    font-size: var(--pbse-button-size);
    font-weight: 700;
    line-height: 1.1;
    padding: 0.72rem 1.7rem;
    text-transform: uppercase;
}

.pending-kyc-veriff-root a {
    border: 0;
    border-radius: 0;
    background: transparent;
    min-width: 0;
    padding: 0;
    text-transform: none;
}

.pending-kyc-veriff-root iframe {
    width: 100%;
    border-radius: 12px;
    border: 0;
    background: #fff;
}

.pending-kyc-note {
    margin-top: 1.2rem;
}

.pending-kyc-actions {
    margin-top: 1.7rem;
}

.pending-kyc-actions-back-only {
    justify-content: center;
}

.first-name-mismatch-progress {
    margin-bottom: 1.55rem;
}

.first-name-mismatch-content {
    max-width: 760px;
    margin: 0 auto;
}

.first-name-mismatch-title {
    margin-top: 0;
}

.first-name-mismatch-copy {
    margin-top: 0.85rem;
    max-width: 700px;
}

.first-name-mismatch-form {
    margin-top: 0.95rem;
    max-width: none;
}

.first-name-mismatch-options {
    margin: 0;
    padding: 0;
    border: 0;
}

.first-name-mismatch-legend {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.first-name-mismatch-option {
    margin-top: 0.95rem;
}

.first-name-mismatch-option:first-of-type {
    margin-top: 0;
}

.first-name-mismatch-option-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #191d28;
    font-size: var(--pbse-body-size);
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.first-name-mismatch-option-label.is-disabled {
    color: #737783;
    cursor: not-allowed;
}

.first-name-mismatch-radio {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    accent-color: #5b6ef7;
}

.first-name-mismatch-option-icon {
    color: #aeb3be;
    font-size: 1rem;
    line-height: 1;
}

.first-name-mismatch-value {
    min-height: 60px;
    border-radius: 10px;
    border: 1px solid #c6c8d2;
    background: #ececef;
    color: #1a1b22;
    font-size: var(--pbse-form-size);
    line-height: 1.28;
    padding: 0.95rem 1.15rem;
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.first-name-mismatch-input {
    margin-top: 0.5rem;
    width: 100%;
    min-height: 60px;
    border-width: 1px;
    border-radius: 10px;
    font-size: var(--pbse-form-size);
    padding: 0.95rem 1.15rem;
}

.first-name-mismatch-error {
    margin: 1.2rem 0 0;
    color: #dc3545;
    font-size: var(--pbse-body-size);
    line-height: 1.35;
}

.first-name-mismatch-note {
    margin-top: 1rem;
}

.first-name-mismatch-actions {
    margin-top: 1.5rem;
    gap: 2.2rem;
}

.first-name-mismatch-actions .flow-primary-btn {
    min-width: 182px;
}

.kyc-declined-content {
    max-width: 760px;
    margin: 0 auto;
}

.kyc-declined-title {
    margin-top: 0;
}

.kyc-declined-copy {
    margin-top: 1rem;
}

.kyc-declined-note {
    margin-top: 1rem;
}

.kyc-declined-need-title {
    margin: 1rem 0 0;
    color: #1d1f2a;
    font-size: var(--pbse-body-size);
    font-weight: 700;
}

.kyc-declined-list {
    margin: 0.35rem 0 0;
    padding-left: 1.55rem;
    color: #1f2230;
    font-size: var(--pbse-body-size);
    line-height: 1.35;
}

.kyc-declined-list li {
    margin-top: 0.18rem;
}

.kyc-declined-actions {
    margin-top: 1.2rem;
}

.kyc-declined-actions .flow-primary-btn {
    min-width: 285px;
}

.phone-entry-progress {
    margin-bottom: 1.55rem;
}

.phone-entry-content {
    max-width: 760px;
    margin: 0 auto;
}

.phone-entry-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #191d28;
    font-size: var(--pbse-body-size);
    font-weight: 700;
    line-height: 1;
}

.phone-entry-verified-icon {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    background: #5b6ef7;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.phone-entry-title {
    margin-top: 1.1rem;
}

.phone-entry-copy {
    margin-top: 1rem;
}

.phone-entry-form {
    margin-top: 0.95rem;
    max-width: none;
}

.phone-entry-input-group {
    margin-top: 0;
    max-width: none;
}

.phone-entry-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.phone-entry-input {
    border-width: 1px;
    border-radius: 10px;
    font-size: var(--pbse-form-size);
    padding: 0.94rem 1.15rem;
}

.phone-entry-help {
    margin: 0.65rem 0 0;
    color: #1f2230;
    font-size: var(--pbse-body-size);
    line-height: 1.3;
}

.phone-entry-note {
    margin: 1rem 0 0;
    color: #1d1f2a;
    font-size: var(--pbse-body-size);
    font-weight: 700;
    line-height: 1.3;
}

.phone-entry-actions {
    margin-top: 1.45rem;
    gap: 2.2rem;
}

.phone-entry-actions .flow-primary-btn {
    min-width: 182px;
}

.phone-pin-progress {
    margin-bottom: 1.55rem;
}

.phone-pin-content {
    max-width: 760px;
    margin: 0 auto;
}

.phone-pin-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #191d28;
    font-size: var(--pbse-body-size);
    font-weight: 700;
    line-height: 1;
}

.phone-pin-verified-icon {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    background: #5b6ef7;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.phone-pin-title {
    margin-top: 1.1rem;
}

.phone-pin-copy {
    margin-top: 1rem;
}

.phone-pin-form {
    margin-top: 0.95rem;
    max-width: none;
}

.phone-pin-input-group {
    margin-top: 0;
    max-width: none;
}

.phone-pin-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.phone-pin-input {
    border-width: 1px;
    border-radius: 10px;
    font-size: var(--pbse-form-size);
    padding: 0.94rem 1.15rem;
}

.phone-pin-note {
    margin: 1.2rem 0 0;
    color: #1f2230;
    font-size: var(--pbse-body-size);
    line-height: 1.35;
}

.phone-pin-actions {
    margin-top: 1.45rem;
    gap: 2.2rem;
}

.phone-pin-actions .flow-primary-btn {
    min-width: 182px;
}

.pbse-submission-progress {
    margin-bottom: 1.55rem;
}

.pbse-submission-content {
    max-width: 760px;
    margin: 0 auto;
}

.pbse-submission-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #191d28;
    font-size: var(--pbse-body-size);
    font-weight: 700;
    line-height: 1;
}

.pbse-submission-verified-icon {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    background: #5b6ef7;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.pbse-submission-title {
    margin-top: 1.1rem;
}

.pbse-submission-copy {
    margin-top: 1rem;
}

.pbse-review-grid {
    margin-top: 1.15rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem 1.05rem;
}

.pbse-review-field {
    min-width: 0;
}

.pbse-review-field-full {
    grid-column: 1 / -1;
}

.pbse-review-label {
    display: block;
    margin: 0 0 0.35rem;
    color: #1d1f2a;
    font-size: var(--pbse-body-size);
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
}

.pbse-review-value {
    min-height: 60px;
    border-radius: 10px;
    border: 1px solid #c6c8d2;
    background: #ececef;
    color: #1a1b22;
    font-size: var(--pbse-form-size);
    line-height: 1.28;
    padding: 0.95rem 1.15rem;
    display: flex;
    align-items: center;
}

.pbse-submit-form {
    margin-top: 1.55rem;
    max-width: none;
}

.pbse-submission-actions {
    margin-top: 0;
    gap: 2.25rem;
}

.pbse-submission-actions .flow-primary-btn {
    min-width: 182px;
}

.my-account-page .flow-shell {
    max-width: 930px;
}

.my-account-card {
    padding-top: 3.1rem;
    padding-bottom: 2.2rem;
}

.my-account-content {
    max-width: 760px;
    margin: 0 auto;
}

.my-account-title {
    margin-top: 0;
}

.my-account-copy {
    margin-top: 1rem;
}

.my-account-registration-note {
    margin-top: 1.15rem;
    border: 1px solid #cfd2e8;
    border-radius: 12px;
    background: #eceef9;
    padding: 0.95rem 1rem;
}

.my-account-registration-note-title {
    margin: 0;
    color: #2f42cf;
    font-size: var(--pbse-body-size);
    font-weight: 700;
    line-height: 1.25;
}

.my-account-registration-note-copy {
    margin: 0.45rem 0 0;
    color: #1f2230;
    font-size: var(--pbse-body-size);
    line-height: 1.35;
}

.my-account-registration-actions {
    margin-top: 0.9rem;
}

.my-account-registration-actions .flow-primary-btn {
    min-width: 260px;
}

.my-account-grid {
    margin-top: 1.3rem;
}

.my-account-actions {
    margin-top: 2.2rem;
}

.my-account-actions .flow-primary-btn {
    min-width: 334px;
}

.my-account-powered-by {
    margin-top: 1.2rem;
}

.flow-input-group {
    margin-top: 1rem;
    max-width: 540px;
}

.flow-input-label {
    display: block;
    margin-bottom: 0.45rem;
    color: #1d1f2a;
    font-size: var(--pbse-body-size);
    font-weight: 700;
    text-align: left;
}

.flow-input {
    width: 100%;
    border-radius: 12px;
    border: 2px solid #4f5157;
    background: #ececef;
    color: #1a1b22;
    font-size: var(--pbse-form-size);
    line-height: 1.25;
    padding: 0.88rem 1.15rem;
}

.flow-input:focus {
    outline: 0;
    border-color: #5b6ef7;
    box-shadow: 0 0 0 3px rgba(91, 110, 247, 0.2);
}

.flow-status-panel {
    margin-top: 0.95rem;
}

.flow-status-panel .flow-text {
    margin-top: 1.05rem;
}

.flow-veriff-root {
    margin: 1rem auto 0;
}

.confirm-email-content .flow-copy {
    margin-top: 1.05rem;
}

.confirm-email-address {
    margin: 0.95rem 0 0;
    font-size: clamp(1.02rem, 2.1vw, 1.85rem);
    line-height: 1.2;
}

.confirm-email-note {
    margin: 1.1rem 0 0;
    color: #1f2230;
    font-size: var(--pbse-body-size);
    line-height: 1.35;
}

.confirm-email-content .flow-form {
    margin-top: 1rem;
}

.login-flow-content {
    max-width: 760px;
    margin: 0 auto;
}

.login-flow-content.is-authenticated {
    max-width: 980px;
}

.login-flow-content > .flow-title,
.login-flow-content > .flow-copy {
    text-align: center;
}

.already-logged-in-state {
    text-align: center;
}

.already-logged-in-title {
    margin: 0;
}

.already-logged-in-copy {
    margin: 1.15rem 0 0;
    font-size: var(--pbse-body-size);
    color: #23242b;
    line-height: 1.35;
}

.already-logged-in-actions {
    margin-top: 1.65rem;
}

.already-logged-in-btn {
    min-width: 330px;
    padding: 0.68rem 2.25rem;
}

.login-flow-form {
    margin: 1.15rem auto 0;
    max-width: 520px;
}

.login-flow-form input[type="text"],
.login-flow-form input[type="email"],
.login-flow-form input[type="password"] {
    width: 100%;
    border-radius: 12px;
    border: 2px solid #4f5157;
    background: #ececef;
    color: #1a1b22;
    font-size: var(--pbse-form-size);
    line-height: 1.25;
    padding: 0.88rem 1.15rem;
}

.login-flow-form input[type="text"]:focus,
.login-flow-form input[type="email"]:focus,
.login-flow-form input[type="password"]:focus {
    outline: 0;
    border-color: #5b6ef7;
    box-shadow: 0 0 0 3px rgba(91, 110, 247, 0.2);
}

.login-flow-remember {
    margin-top: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #1f2230;
    font-size: var(--pbse-body-size);
    cursor: pointer;
}

.login-flow-remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.flow-field-errors {
    margin-top: 0.35rem;
    color: #b21a2b;
    font-size: 0.9rem;
    text-align: left;
}

.flow-field-errors p {
    margin: 0.18rem 0 0;
}

.flow-error-banner p {
    margin: 0.12rem 0 0;
}

.flow-error-banner p:first-child {
    margin-top: 0;
}

.login-flow-links {
    margin: 0.7rem 0 0;
    color: #2a2c35;
    font-size: var(--pbse-body-size);
}

.unknown-route-page .flow-shell {
    max-width: 900px;
}

.unknown-route-card {
    padding-top: 3rem;
    padding-bottom: 2.35rem;
}

.unknown-route-title {
    margin-top: 0;
}

.unknown-route-copy {
    margin-top: 1rem;
}

.unknown-route-path {
    margin: 1.2rem auto 0;
    max-width: 680px;
    text-align: center;
    font-size: var(--pbse-small-body-size);
}

.unknown-route-path code {
    display: inline-block;
    border-radius: 8px;
    background: #eceef7;
    color: #212431;
    font-size: 0.95em;
    padding: 0.22rem 0.45rem;
}

.unknown-route-actions {
    margin-top: 1.55rem;
    gap: 2rem;
}

.new-reg-content {
    max-width: 840px;
    margin: 0 auto;
}

.new-reg-list {
    margin: 0.6rem 0 0;
    padding-left: 1.55rem;
    color: #20232f;
    font-size: var(--pbse-body-size);
    line-height: 1.35;
}

.new-reg-list li {
    margin-top: 0.18rem;
}

.new-reg-terms {
    margin-top: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.58rem;
    color: #20232f;
    font-size: var(--pbse-small-body-size);
    line-height: 1.42;
}

.new-reg-terms input[type="checkbox"] {
    margin-top: 0.23rem;
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.new-reg-legal-link {
    color: #d1643d;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.new-reg-legal-link:hover,
.new-reg-legal-link:focus-visible {
    color: #bb502c;
}

.new-reg-actions {
    margin-top: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.8rem;
}

.new-reg-cancel {
    color: #d1643d;
    text-decoration: none;
    font-size: var(--pbse-button-size);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.new-reg-cancel:hover,
.new-reg-cancel:focus-visible {
    color: #bb502c;
    text-decoration: underline;
}

.flow-primary-btn.new-reg-begin {
    min-width: 140px;
    font-size: var(--pbse-button-size);
    padding: 0.56rem 1.5rem;
}

.flow-primary-btn.is-disabled,
.flow-primary-btn.new-reg-begin.is-disabled {
    background: #8e8f93;
    box-shadow: none;
    pointer-events: none;
    cursor: not-allowed;
}

.flow-primary-btn.is-disabled:hover,
.flow-primary-btn.new-reg-begin.is-disabled:hover,
.flow-primary-btn.new-reg-begin.is-disabled:focus-visible {
    transform: none;
    background: #8e8f93;
    box-shadow: none;
}

.new-reg-support-copy {
    margin: 1.5rem 0 0;
    color: #20232f;
    font-size: var(--pbse-body-size);
    line-height: 1.35;
    text-align: center;
}

.new-reg-resource-btn {
    margin-top: 0.7rem;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 2px solid #4f5157;
    background: transparent;
    color: #20232f;
    text-decoration: none;
    font-size: var(--pbse-button-size);
    font-weight: 500;
    padding: 0.82rem 1.1rem;
}

.new-reg-resource-btn:hover,
.new-reg-resource-btn:focus-visible {
    border-color: #5b6ef7;
    color: #2f42cf;
    text-decoration: none;
}

.new-reg-resources-grid {
    margin: 0.7rem auto 0;
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    max-width: 420px;
}

.new-reg-resource-card {
    flex: 1;
    max-width: 196px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e8e9ed;
    padding: 1rem 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.new-reg-resource-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d0d1d8;
}

.new-reg-resource-card a {
    display: block;
    width: 100%;
    text-decoration: none;
}

.new-reg-resource-logo {
    max-width: 100%;
    max-height: 56px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Styles for login form alignment */
.login {
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

.login .form-row-flex {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    margin-bottom: 0.75rem;
    justify-content: center;
}

.login .form-label-col {
    flex: 0 0 160px;
    max-width: 160px;
    text-align: right;
    padding-right: 20px;
}

.login .form-label-col label {
    display: inline-block;
}

.login .form-input-col {
    flex-grow: 1;
    text-align: left;
}

.login .form-input-col input[type="text"],
.login .form-input-col input[type="password"],
.login .form-input-col input[type="email"] {
    width: 100%;
    box-sizing: border-box;
    display: inline-block;
}

.login .remember-me-row .form-label-col {
    flex: 0 0 0;
    max-width: 0;
    padding-right: 0;
}

.login .remember-me-input-col {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login .remember-me-input-col label {
    margin-right: 5px;
}

.login .form-footer-links {
    margin-top: 10px;
}

@media (max-width: 991px) {
    .flow-page,
    .signup-page {
        padding-top: 7rem;
    }

    .flow-card,
    .signup-card {
        padding: 1.6rem 1.7rem 1.55rem;
    }

    .flow-text {
        margin-top: 1.4rem;
    }

    .signup-progress-dot {
        width: 16px;
        height: 16px;
        border-width: 3px;
    }

    .signup-progress-line {
        width: 22px;
        height: 4px;
    }

    .flow-term-grid {
        gap: 0.75rem;
    }

    .term-selection-verified {
        font-size: var(--pbse-body-size);
    }

    .term-selection-actions .flow-back-link {
        font-size: var(--pbse-button-size);
    }

    .term-selection-actions .flow-primary-btn {
        font-size: var(--pbse-button-size);
    }

    .pending-kyc-need-title,
    .pending-kyc-list {
        font-size: var(--pbse-body-size);
    }

    .kyc-declined-need-title,
    .kyc-declined-list {
        font-size: var(--pbse-body-size);
    }

    .phone-entry-note {
        font-size: var(--pbse-body-size);
    }

    .phone-pin-note {
        font-size: var(--pbse-body-size);
    }

    .pbse-review-label {
        font-size: var(--pbse-body-size);
    }

    .pbse-review-value {
        font-size: var(--pbse-form-size);
    }

    .my-account-card {
        padding-top: 2.4rem;
    }

    .new-reg-cancel,
    .flow-primary-btn.new-reg-begin {
        font-size: var(--pbse-button-size);
    }

    .unknown-route-card {
        padding-top: 2.35rem;
    }
}

@media (max-width: 680px) {
    .flow-page,
    .signup-page {
        background: var(--white);
        padding-top: 6.5rem;
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }

    .flow-shell {
        max-width: none;
    }

    .flow-card,
    .signup-card {
        background: transparent;
        border: 0;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
    }

    .signup-field-grid {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .signup-strength-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    #pw-strength {
        width: 100%;
    }

    .signup-actions {
        gap: 1.15rem;
    }

    .flow-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .flow-primary-btn,
    .flow-back-link {
        text-align: center;
        width: 100%;
    }

    .already-logged-in-btn {
        min-width: 0;
    }

    .flow-term-grid {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .term-selection-content {
        max-width: none;
    }

    .term-selection-actions {
        gap: 0.85rem;
    }

    .term-selection-actions .flow-back-link,
    .term-selection-actions .flow-primary-btn {
        font-size: var(--pbse-button-size);
    }

    .pending-kyc-meta {
        align-items: flex-start;
    }

    .pending-kyc-env {
        margin-left: 0;
        width: 100%;
    }

    .pending-kyc-env .flow-env-select {
        width: 100%;
    }

    .pending-kyc-veriff-root {
        justify-content: stretch;
    }

    .pending-kyc-veriff-root > button,
    .pending-kyc-veriff-root button,
    .pending-kyc-veriff-root input[type="button"],
    .pending-kyc-veriff-root [role="button"] {
        width: 100%;
        min-width: 0;
    }

    .kyc-declined-actions .flow-primary-btn {
        width: 100%;
        min-width: 0;
    }

    .phone-entry-actions {
        gap: 0.85rem;
    }

    .phone-entry-actions .flow-primary-btn {
        width: 100%;
        min-width: 0;
    }

    .phone-pin-actions {
        gap: 0.85rem;
    }

    .phone-pin-actions .flow-primary-btn {
        width: 100%;
        min-width: 0;
    }

    .first-name-mismatch-actions {
        gap: 0.85rem;
    }

    .first-name-mismatch-actions .flow-primary-btn {
        width: 100%;
        min-width: 0;
    }

    .pbse-review-grid {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .pbse-review-field-full {
        grid-column: auto;
    }

    .pbse-submission-actions {
        gap: 0.85rem;
    }

    .pbse-submission-actions .flow-primary-btn {
        width: 100%;
        min-width: 0;
    }

    .my-account-actions .flow-primary-btn {
        min-width: 0;
        width: 100%;
    }

    .new-reg-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.9rem;
    }

    .new-reg-cancel,
    .flow-primary-btn.new-reg-begin {
        width: 100%;
        font-size: var(--pbse-button-size);
        text-align: center;
    }

    .signup-back-link {
        font-size: var(--pbse-button-size);
    }

    .signup-next-btn {
        min-width: 146px;
        padding: 0.56rem 1.3rem;
        font-size: var(--pbse-button-size);
    }

    .new-reg-resources-grid {
        flex-direction: row;
        gap: 0.7rem;
        max-width: 420px;
    }

    .new-reg-resource-card {
        max-width: 196px;
        padding: 1rem 0.7rem;
    }
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
    flex-direction: column;
    padding: 1rem 0;
}

.mobile-nav-link {
    display: block;
    padding: 1rem 2rem;
    color: #1a1b22;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.mobile-nav-link:hover {
    background-color: #f5f5f7;
}

.mobile-nav form {
    margin: 0;
}

.mobile-nav form .mobile-nav-link {
    border-bottom: none;
}

/* Hide mobile nav on desktop */
@media (min-width: 993px) {
    .mobile-nav {
        display: none !important;
    }
    .mobile-menu-btn {
        display: none !important;
    }
}

/* Show mobile menu button and hide desktop nav on mobile */
@media (max-width: 992px) {
    .desktop-nav {
        display: none !important;
    }
    .mobile-menu-btn {
        display: block !important;
        background: none;
        border: none;
        color: var(--white, #ffffff);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
    }
}

/* Account Dropdown Styles */
.account-dropdown {
    position: relative;
    display: inline-block;
}

.account-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-primary, #ffffff);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    min-height: 44px;
    font-family: "Inter", sans-serif;
    transition: color 0.3s;
}

.account-dropdown-toggle:hover {
    color: var(--primary-blue, #5b6ef7);
}

.account-dropdown-toggle:focus-visible {
    outline: 2px solid var(--primary-blue, #5b6ef7);
    outline-offset: 4px;
}

.dropdown-caret {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.account-dropdown-toggle[aria-expanded="true"] .dropdown-caret {
    transform: rotate(180deg);
}

.account-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    min-width: 160px;
    background: white;
    border: 1px solid #dedee8;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1000;
}

.account-dropdown-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-dropdown-menu .dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    color: #1a1b22;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.account-dropdown-menu .dropdown-item:hover {
    background-color: #f5f5f7;
}

.account-dropdown-menu .dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.account-dropdown-menu .dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.account-dropdown-menu form {
    margin: 0;
    padding: 0;
    display: block;
}

.account-dropdown-menu form .dropdown-item {
    border-top: 1px solid #e8e9ed;
}
