:root {
    --hp-brand: #f50057;
    --hp-brand-dark: #d9004c;
    --hp-brand-soft: #fff0f5;
    --hp-ink: #141821;
    --hp-muted: #727b89;
    --hp-line: #e3e7ed;
    --hp-surface: #ffffff;
    --hp-page: #fffafb;
}

body.auth-bg {
    display: block;
    min-height: 100vh;
    background: var(--hp-page);
}

.auth-stage {
    width: 100%;
    margin: 0;
}

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

.auth-logo,
.auth-aux {
    display: none;
}

.hp-registration-page {
    min-height: 100vh;
    padding: 44px 22px 24px;
    color: var(--hp-ink);
    background: radial-gradient(circle at 88% 8%, rgba(245, 0, 87, .055), transparent 30rem), radial-gradient(circle at 5% 88%, rgba(245, 0, 87, .035), transparent 26rem), #fff;
}

.hp-register-shell {
    display: grid;
    width: min(1120px, 100%);
    margin: 0 auto;
    overflow: hidden;
    grid-template-columns: minmax(0, 1.18fr) minmax(340px, .82fr);
    border: 1px solid var(--hp-line);
    border-radius: 24px;
    background: var(--hp-surface);
    box-shadow: 0 24px 64px rgba(28, 35, 52, .10);
}

.hp-register-main {
    min-width: 0;
    padding: 38px 40px 34px;
}

.hp-brand {
    display: inline-flex;
    margin-bottom: 22px;
    align-items: center;
    text-decoration: none;
}

    .hp-brand img {
        width: auto;
        height: 42px;
    }

.hp-choice-copy h1,
.hp-form-title-row h1 {
    margin: 0;
    color: var(--hp-brand);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 850;
    letter-spacing: -.025em;
}

.hp-choice-copy p,
.hp-form-title-row p {
    margin: 8px 0 0;
    color: var(--hp-muted);
    font-size: 1rem;
    line-height: 1.55;
}

.hp-role-grid {
    display: grid;
    margin-top: 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.hp-role-tile {
    position: relative;
    display: flex;
    min-height: 168px;
    padding: 22px;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid var(--hp-line);
    border-radius: 16px;
    color: var(--hp-ink);
    background: #fff;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

    .hp-role-tile:hover,
    .hp-role-tile:focus-visible {
        color: var(--hp-ink);
        border-color: rgba(245, 0, 87, .42);
        box-shadow: 0 12px 28px rgba(31, 38, 53, .08);
        transform: translateY(-2px);
    }

    .hp-role-tile:focus-visible {
        outline: 3px solid rgba(245, 0, 87, .12);
        outline-offset: 3px;
    }

.hp-role-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 17px;
    place-items: center;
    border-radius: 50%;
    color: var(--hp-brand);
    background: var(--hp-brand-soft);
    font-size: 1.25rem;
}

.hp-role-tile strong {
    display: block;
    padding-right: 24px;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
}

.hp-role-tile small {
    display: block;
    margin-top: 8px;
    padding-right: 20px;
    color: var(--hp-muted);
    font-size: .84rem;
    line-height: 1.5;
}

.hp-role-arrow {
    position: absolute;
    right: 18px;
    bottom: 18px;
    color: #9aa2ae;
}

.hp-choice-login,
.hp-form-login {
    margin-top: 22px;
    color: var(--hp-muted);
    font-size: .9rem;
    text-align: center;
}

    .hp-choice-login a,
    .hp-form-login a,
    .hp-registration-context a,
    .hp-terms-row a,
    .hp-back-home {
        color: var(--hp-brand);
        font-weight: 700;
        text-decoration: none;
    }

        .hp-choice-login a:hover,
        .hp-form-login a:hover,
        .hp-registration-context a:hover,
        .hp-terms-row a:hover,
        .hp-back-home:hover {
            color: var(--hp-brand-dark);
            text-decoration: underline;
        }

.hp-promo-panel {
    display: flex;
    min-height: 100%;
    padding: 46px;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f5007a 0%, #e51d4e 100%);
}

.hp-promo-card {
    width: min(330px, 100%);
    padding: 30px 28px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 18px;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    text-align: center;
}

    .hp-promo-card h2 {
        margin: 0 0 12px;
        font-size: 1.8rem;
        font-weight: 850;
    }

    .hp-promo-card p {
        margin: 0;
        font-size: .96rem;
        line-height: 1.55;
    }

    .hp-promo-card span {
        display: block;
        margin-top: 20px;
        font-size: .82rem;
        font-weight: 700;
    }

.hp-back-home {
    display: flex;
    width: fit-content;
    margin: 18px auto 0;
    align-items: center;
    gap: 7px;
    font-size: .9rem;
}

.hp-form-main {
    padding-top: 30px;
}

    .hp-form-main .hp-brand {
        margin-bottom: 15px;
    }

        .hp-form-main .hp-brand img {
            height: 36px;
        }

.hp-form-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.hp-step-eyebrow {
    display: inline-block;
    margin-bottom: 5px;
    color: var(--hp-brand);
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.hp-form-title-row h1 {
    color: var(--hp-ink);
    font-size: clamp(1.65rem, 3vw, 2rem);
}

.hp-form-title-row p {
    margin-top: 5px;
    font-size: .91rem;
}

.hp-progress {
    display: flex;
    margin-top: 5px;
    align-items: center;
}

    .hp-progress span {
        display: grid;
        width: 28px;
        height: 28px;
        place-items: center;
        border: 1px solid #dfe3e8;
        border-radius: 50%;
        color: #8a93a0;
        background: #fff;
        font-size: .72rem;
        font-weight: 800;
    }

        .hp-progress span.is-active,
        .hp-progress span.is-complete {
            border-color: var(--hp-brand);
            color: #fff;
            background: var(--hp-brand);
        }

    .hp-progress i {
        width: 38px;
        height: 1px;
        background: #dfe3e8;
    }

.hp-registration-context {
    display: flex;
    margin: 18px 0 16px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hp-account-chip {
    display: inline-flex;
    min-height: 34px;
    padding: 7px 11px;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    color: var(--hp-brand-dark);
    background: var(--hp-brand-soft);
    font-size: .78rem;
    font-weight: 800;
}

.hp-registration-context a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
}

.hp-provider-block {
    margin-bottom: 16px;
}

.hp-provider-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.hp-provider-button {
    display: inline-flex;
    min-height: 42px;
    padding: 9px 12px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    color: var(--hp-ink);
    background: #fff;
    font-size: .8rem;
    font-weight: 750;
}

    .hp-provider-button:hover {
        border-color: #bfc5ce;
        background: #fafbfc;
    }

    .hp-provider-button.is-apple {
        border-color: #111;
        color: #fff;
        background: #111;
    }

.hp-divider {
    display: flex;
    margin: 11px 0 0;
    align-items: center;
    gap: 10px;
    color: #929aa6;
    font-size: .67rem;
    font-weight: 700;
    text-transform: uppercase;
}

    .hp-divider::before,
    .hp-divider::after {
        height: 1px;
        flex: 1;
        background: #e8ebef;
        content: "";
    }

.hp-step-panel {
    display: none;
}

    .hp-step-panel.is-active {
        display: block;
    }

.hp-panel-heading {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
    gap: 10px;
}

.hp-panel-number {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 9px;
    color: var(--hp-brand);
    background: var(--hp-brand-soft);
    font-size: .72rem;
    font-weight: 850;
}

.hp-panel-heading h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 850;
}

.hp-panel-heading p {
    margin: 2px 0 0;
    color: var(--hp-muted);
    font-size: .78rem;
}

.hp-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

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

.form-label {
    margin-bottom: 5px;
    color: #343b48;
    font-size: .79rem;
    font-weight: 750;
}

.required {
    color: var(--hp-brand);
}

.optional {
    margin-left: 4px;
    color: #8b94a0;
    font-size: .72rem;
    font-weight: 600;
}

.form-control,
.form-select {
    min-height: 47px;
    padding: .65rem .8rem;
    border-color: #dfe3e9;
    border-radius: 11px;
    color: var(--hp-ink);
    background-color: #fff;
    font-size: .86rem;
}

    .form-control::placeholder {
        color: #a2a9b3;
    }

    .form-control:focus,
    .form-select:focus {
        border-color: rgba(245, 0, 87, .62);
        box-shadow: 0 0 0 .18rem rgba(245, 0, 87, .09);
    }

    .form-control[readonly] {
        background: #f6f7f9;
    }

.iti {
    width: 100%;
}

    .iti .form-control {
        width: 100%;
    }

.hp-password-field {
    position: relative;
}

    .hp-password-field .form-control {
        padding-right: 44px;
    }

.hp-password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 8px;
    color: #737c89;
    background: transparent;
    transform: translateY(-50%);
}

    .hp-password-toggle:hover {
        color: var(--hp-brand);
        background: var(--hp-brand-soft);
    }

.hp-upload-control {
    position: relative;
}

.hp-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.hp-upload-box {
    display: grid;
    min-height: 76px;
    margin: 0;
    padding: 11px 12px;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px dashed #cdd3dc;
    border-radius: 11px;
    cursor: pointer;
    background: #fbfcfd;
}

    .hp-upload-box:hover,
    .hp-upload-box.has-file {
        border-color: rgba(245, 0, 87, .54);
        background: #fff9fb;
    }

.hp-upload-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 9px;
    color: var(--hp-brand);
    background: var(--hp-brand-soft);
}

.hp-upload-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

    .hp-upload-copy strong {
        font-size: .77rem;
        font-weight: 800;
    }

    .hp-upload-copy small {
        color: #7c8591;
        font-size: .66rem;
    }

.hp-upload-file-name {
    overflow: hidden;
    color: #4f5866;
    font-size: .68rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hp-upload-button {
    padding: 6px 10px;
    border: 1px solid #f2b6c7;
    border-radius: 8px;
    color: var(--hp-brand-dark);
    background: #fff;
    font-size: .69rem;
    font-weight: 800;
}

.hp-terms-row {
    margin-top: 14px;
    padding: 11px 12px;
    border: 1px solid #e4e8ed;
    border-radius: 10px;
    background: #fafbfc;
}

    .hp-terms-row .form-check {
        margin: 0;
    }

    .hp-terms-row .form-check-label {
        color: #596271;
        font-size: .75rem;
        line-height: 1.45;
    }

.form-check-input:checked {
    border-color: var(--hp-brand);
    background-color: var(--hp-brand);
}

.hp-step-actions {
    display: flex;
    margin-top: 15px;
    justify-content: flex-end;
    gap: 10px;
}

.hp-step-actions--split {
    justify-content: space-between;
}

.hp-primary-action,
.hp-secondary-action {
    display: inline-flex;
    min-height: 45px;
    padding: 10px 18px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 800;
}

.hp-primary-action {
    min-width: 190px;
    border: 1px solid var(--hp-brand);
    color: #fff;
    background: linear-gradient(90deg, #f50073, #e91e50);
    box-shadow: 0 8px 18px rgba(245, 0, 87, .17);
}

    .hp-primary-action:hover {
        border-color: var(--hp-brand-dark);
        background: linear-gradient(90deg, #df0068, #d61949);
    }

.hp-secondary-action {
    border: 1px solid #dfe3e8;
    color: #596271;
    background: #fff;
}

    .hp-secondary-action:hover {
        color: var(--hp-brand);
        border-color: #efb2c3;
    }

.hp-connected-provider {
    display: flex;
    margin: 15px 0;
    padding: 10px 12px;
    align-items: center;
    gap: 10px;
    border: 1px solid #dceee4;
    border-radius: 10px;
    color: #285d42;
    background: #f4faf6;
}

    .hp-connected-provider div {
        display: flex;
        min-width: 0;
        flex-direction: column;
    }

    .hp-connected-provider strong {
        font-size: .78rem;
    }

    .hp-connected-provider span {
        overflow: hidden;
        color: #5a7665;
        font-size: .71rem;
        text-overflow: ellipsis;
    }

.validation-summary-valid {
    display: none;
}

.validation-summary-errors,
.hp-alert {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #fecbd7;
    border-radius: 10px;
    color: #9b1237;
    background: #fff4f7;
    font-size: .78rem;
}

    .validation-summary-errors ul {
        margin: 0;
        padding-left: 18px;
    }

.field-validation-error {
    display: block;
    margin-top: 4px;
    font-size: .7rem;
}

@media (max-width: 900px) {
    .hp-register-shell {
        width: min(680px, 100%);
        grid-template-columns: 1fr;
    }

    .hp-promo-panel {
        display: none;
    }

    .hp-register-main {
        padding: 34px;
    }
}

@media (max-width: 620px) {
    .hp-registration-page {
        padding: 12px;
    }

    .hp-register-shell {
        border-radius: 18px;
    }

    .hp-register-main {
        padding: 24px 18px 22px;
    }

    .hp-brand {
        margin-bottom: 17px;
    }

        .hp-brand img {
            height: 36px;
        }

    .hp-choice-copy h1,
    .hp-form-title-row h1 {
        font-size: 1.65rem;
    }

    .hp-choice-copy p,
    .hp-form-title-row p {
        font-size: .88rem;
    }

    .hp-role-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hp-role-tile {
        min-height: 0;
        padding: 16px;
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .hp-role-icon {
        width: 44px;
        height: 44px;
        margin: 0;
        flex: 0 0 44px;
    }

    .hp-role-tile small {
        margin-top: 4px;
        padding-right: 8px;
    }

    .hp-role-arrow {
        position: static;
        margin-left: auto;
        flex: 0 0 auto;
    }

    .hp-form-title-row {
        gap: 10px;
    }

    .hp-progress i {
        width: 22px;
    }

    .hp-registration-context {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .hp-provider-grid,
    .hp-fields-grid {
        grid-template-columns: 1fr;
    }

    .hp-field--full {
        grid-column: auto;
    }

    .hp-upload-box {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .hp-upload-button {
        display: none;
    }

    .hp-step-actions,
    .hp-step-actions--split {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .hp-primary-action,
    .hp-secondary-action {
        width: 100%;
    }

    .hp-back-home {
        margin-top: 14px;
    }
}

/* Two-step validation refinements */
.hp-step-panel > .hp-fields-grid:first-child {
    margin-top: 0;
}

.hp-upload-preview {
    display: block;
    width: 44px;
    height: 44px;
    object-fit: cover;
    border: 1px solid #e2e6eb;
    border-radius: 9px;
    background: #fff;
}

    .hp-upload-preview[hidden] {
        display: none;
    }

.hp-upload-box.has-preview {
    grid-template-columns: 44px minmax(0, 1fr) auto;
}

.hp-primary-action.is-loading {
    cursor: wait;
    opacity: .82;
}

@media (max-width: 640px) {
    .hp-upload-preview {
        width: 40px;
        height: 40px;
    }

    .hp-upload-box.has-preview {
        grid-template-columns: 40px minmax(0, 1fr);
    }
}


/* Professional upload preview layout: preview + upload area on one row */
.hp-upload-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

    .hp-upload-control.has-preview {
        grid-template-columns: 68px minmax(0, 1fr);
    }

.hp-upload-preview-slot {
    position: relative;
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
}

    .hp-upload-preview-slot[hidden] {
        display: none !important;
    }

.hp-upload-preview {
    display: block;
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 1px solid #dde2e9;
    background: #fff;
    box-shadow: 0 4px 12px rgba(17, 32, 58, .08);
}

.hp-upload-preview--person {
    border-radius: 50%;
}

.hp-upload-preview--logo {
    padding: 4px;
    object-fit: contain;
    border-radius: 12px;
}

.hp-upload-preview--document {
    border-radius: 10px;
}

.hp-upload-preview-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    display: grid;
    width: 22px;
    height: 22px;
    padding: 0;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: var(--hp-brand);
    box-shadow: 0 3px 8px rgba(245, 0, 87, .24);
    font-size: .62rem;
    line-height: 1;
}

    .hp-upload-preview-remove:hover {
        background: var(--hp-brand-dark);
    }

.hp-document-preview-card {
    display: flex;
    width: 60px;
    height: 60px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 1px solid #ffd1dc;
    border-radius: 11px;
    color: #d9254d;
    background: #fff5f7;
    box-shadow: 0 4px 12px rgba(17, 32, 58, .07);
}

    .hp-document-preview-card i {
        font-size: 1.45rem;
    }

    .hp-document-preview-card strong {
        font-size: .62rem;
        letter-spacing: .04em;
    }

.hp-document-preview-card--generic {
    color: #5f6978;
    border-color: #dfe4ea;
    background: #f8fafc;
}

/* The preview now sits outside the uploader, so disable the old in-label preview grid. */
.hp-upload-box.has-preview,
.hp-upload-box--picture.has-preview {
    grid-template-columns: 36px minmax(0, 1fr) auto;
}

.hp-upload-box .hp-upload-preview {
    display: none !important;
}

@media (max-width: 640px) {
    .hp-upload-control.has-preview {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 10px;
    }

    .hp-upload-preview-slot {
        width: 54px;
        height: 54px;
    }

    .hp-upload-preview,
    .hp-document-preview-card {
        width: 52px;
        height: 52px;
    }

    .hp-upload-preview-remove {
        width: 20px;
        height: 20px;
        top: -4px;
        right: -4px;
    }
}
