/**
 * B2B Registration — premium corporate onboarding
 */

:root {
    --reg-bg: #eef1f6;
    --reg-surface: #ffffff;
    --reg-text: #0f172a;
    --reg-muted: #64748b;
    --reg-border: #e2e8f0;
    --reg-border-focus: var(--primary-color, #313f51);
    --reg-radius: 12px;
    --reg-radius-lg: 16px;
    --reg-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 16px 48px rgba(15, 23, 42, 0.08);
    --reg-font: "Inter", "Segoe UI", system-ui, sans-serif;
}

html body.bg-full-screen-image.b2b-reg-page {
    background: var(--reg-bg) !important;
    background-image: none !important;
}

.b2b-reg {
    min-height: 100vh;
    display: flex;
    font-family: var(--reg-font);
    -webkit-font-smoothing: antialiased;
}

.b2b-reg__brand {
    display: none;
    flex: 0 0 44%;
    max-width: 44%;
    position: relative;
    overflow: hidden;
    background: #111827;
}

@media (min-width: 992px) {
    .b2b-reg__brand {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 40px 48px 48px;
    }
}

.b2b-reg__brand-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.75) 40%, rgba(49, 63, 81, 0.85) 100%),
        linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, transparent 50%);
    z-index: 1;
}

.b2b-reg__brand-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

.b2b-reg__brand-top,
.b2b-reg__brand-content {
    position: relative;
    z-index: 2;
}

.b2b-reg__brand-logo {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.b2b-reg__brand-badge {
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.b2b-reg__brand-content h2 {
    font-size: clamp(1.75rem, 2.5vw, 2.125rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 14px;
    letter-spacing: -0.025em;
    color: #fff;
}

.b2b-reg__brand-content > p {
    font-size: 15px;
    line-height: 1.65;
    margin: 0 0 32px;
    color: rgba(255, 255, 255, 0.82);
    max-width: 380px;
}

.b2b-reg__brand-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.b2b-reg__brand-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.b2b-reg__brand-features li i {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 16px;
    color: #6ee7b7;
}

.b2b-reg__main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px 32px;
    overflow-y: auto;
}

@media (min-width: 992px) {
    .b2b-reg__main {
        padding: 32px 40px;
    }
}

.b2b-reg__panel {
    width: 100%;
    max-width: 640px;
    background: var(--reg-surface);
    border-radius: var(--reg-radius-lg);
    box-shadow: var(--reg-shadow);
    border: 1px solid var(--reg-border);
    overflow: hidden;
}

.b2b-reg__panel-top {
    padding: 24px 28px 0;
}

@media (min-width: 768px) {
    .b2b-reg__panel-top {
        padding: 32px 36px 0;
    }
}

.b2b-reg__panel-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.b2b-reg__logo img {
    height: 38px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

.b2b-reg__step-badge {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--reg-muted);
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid var(--reg-border);
    border-radius: 999px;
}

.b2b-reg__step-badge span {
    color: var(--reg-text);
}

.b2b-reg__progress {
    height: 3px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 24px;
}

.b2b-reg__progress-fill {
    height: 100%;
    width: 33.33%;
    background: linear-gradient(90deg, var(--primary-color, #313f51), #1a2332);
    border-radius: 999px;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.b2b-reg__alert {
    margin: 0 28px 16px;
    padding: 12px 16px;
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    border-radius: 0 var(--reg-radius) var(--reg-radius) 0;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .b2b-reg__alert {
        margin: 0 36px 16px;
    }
}

.b2b-reg__title-block {
    padding: 0 28px 4px;
}

@media (min-width: 992px) {
    .b2b-reg__title-block--mobile-only {
        display: none;
    }
}

@media (min-width: 768px) {
    .b2b-reg__title-block {
        padding: 0 36px 4px;
    }
}

.b2b-reg__title-block h1 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--reg-text);
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}

.b2b-reg__title-block p {
    font-size: 13px;
    color: var(--reg-muted);
    margin: 0;
    line-height: 1.5;
}

.b2b-reg__steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 28px 20px;
    border-bottom: 1px solid var(--reg-border);
}

@media (min-width: 768px) {
    .b2b-reg__steps {
        padding: 0 36px 24px;
        gap: 12px;
    }
}

.b2b-reg__step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--reg-radius);
    background: #f8fafc;
    border: 1px solid transparent;
    opacity: 0.55;
    transition: opacity 0.2s, background 0.2s, border-color 0.2s;
}

.b2b-reg__step.is-active {
    opacity: 1;
    background: #fff;
    border-color: var(--reg-border);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.b2b-reg__step.is-done {
    opacity: 1;
    background: rgba(49, 63, 81, 0.04);
}

.b2b-reg__step-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e2e8f0;
    color: var(--reg-muted);
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.b2b-reg__step.is-active .b2b-reg__step-icon,
.b2b-reg__step.is-done .b2b-reg__step-icon {
    background: var(--primary-color, #313f51);
    color: #fff;
}

.b2b-reg__step-text {
    min-width: 0;
}

.b2b-reg__step-num {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--reg-muted);
    line-height: 1;
    margin-bottom: 2px;
}

.b2b-reg__step.is-active .b2b-reg__step-num {
    color: var(--primary-color, #313f51);
}

.b2b-reg__step-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--reg-text);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 575px) {
    .b2b-reg__step-text {
        display: none;
    }

    .b2b-reg__step {
        justify-content: center;
        padding: 8px;
    }
}

.b2b-reg__body {
    padding: 24px 28px 28px;
}

@media (min-width: 768px) {
    .b2b-reg__body {
        padding: 28px 36px 32px;
    }
}

.b2b-reg__page-intro {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--reg-border);
}

.b2b-reg__page-intro h2 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--reg-text);
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}

.b2b-reg__page-intro p {
    font-size: 13px;
    color: var(--reg-muted);
    margin: 0;
    line-height: 1.5;
}

.b2b-reg__grid.row {
    margin-left: -8px;
    margin-right: -8px;
}

.b2b-reg__grid > [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
}

.b2b-reg__section {
    width: 100%;
    margin: 4px 0 12px;
    padding-top: 4px;
}

.b2b-reg__section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--reg-muted);
    margin: 0 0 8px;
}

.b2b-reg__section-line {
    display: none;
}

.b2b-reg__panel .form-group,
.b2b-reg__panel .form-label-group {
    margin-bottom: 14px;
}

.b2b-reg__panel .form-label-group label {
    display: none;
}

.b2b-reg__panel .form-control,
.b2b-reg__panel select.form-control {
    height: 46px;
    font-size: 14px;
    font-weight: 400;
    border: 1px solid var(--reg-border);
    border-radius: var(--reg-radius);
    padding: 10px 14px;
    color: var(--reg-text);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.b2b-reg__panel .form-control:hover:not(:focus),
.b2b-reg__panel select.form-control:hover:not(:focus) {
    border-color: #cbd5e1;
}

.b2b-reg__panel .form-control::placeholder {
    color: #94a3b8;
}

.b2b-reg__panel .form-control:focus,
.b2b-reg__panel select.form-control:focus {
    border-color: var(--reg-border-focus);
    box-shadow: 0 0 0 3px rgba(49, 63, 81, 0.14);
    outline: none;
}

.b2b-reg__panel textarea.form-control {
    height: auto;
    min-height: 96px;
    resize: vertical;
    line-height: 1.5;
}

.b2b-reg__panel .invalid-feedback {
    font-size: 12px;
    margin-top: 4px;
}

.b2b-reg__panel .invalid-feedback strong {
    font-weight: 500;
    color: #dc2626;
}

.b2b-reg__panel .custom-file {
    height: auto;
}

.b2b-reg__panel .custom-file-input {
    height: 100%;
    cursor: pointer;
}

.b2b-reg__panel .custom-file-label {
    display: flex;
    align-items: center;
    min-height: 72px;
    line-height: 1.4;
    border: 1.5px dashed #cbd5e1;
    border-radius: var(--reg-radius);
    background: #f8fafc;
    font-size: 13px;
    font-weight: 500;
    color: var(--reg-muted);
    padding: 16px 110px 16px 16px;
    transition: border-color 0.15s, background 0.15s;
}

.b2b-reg__panel .custom-file-input:focus ~ .custom-file-label,
.b2b-reg__panel .custom-file-label:hover {
    border-color: var(--reg-border-focus);
    background: #f1f5f9;
}

.b2b-reg__panel .custom-file-label::after {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    height: 36px;
    line-height: 36px;
    padding: 0 16px;
    border-radius: 8px;
    background: var(--primary-color, #313f51);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    border: none;
    content: "Browse";
}

.b2b-reg__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--reg-border);
}

.b2b-reg__actions > .col-md-6 {
    flex: 1 1 calc(50% - 5px);
    max-width: calc(50% - 5px);
    padding: 0;
}

@media (max-width: 575px) {
    .b2b-reg__actions > .col-md-6 {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

.b2b-reg__panel .btn_next,
.b2b-reg__panel .btn_login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: var(--reg-radius);
    border: none;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    text-decoration: none;
}

.b2b-reg__actions .col-md-6:first-child:not(:empty) .btn_next {
    background: #fff;
    color: #475569;
    border: 1px solid var(--reg-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.b2b-reg__actions .col-md-6:first-child:not(:empty) .btn_next:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: var(--reg-text);
    text-decoration: none;
}

.b2b-reg__actions .col-md-6:last-child .btn_next,
.b2b-reg__actions .btn_login {
    background: var(--primary-color, #313f51);
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(49, 63, 81, 0.25);
}

.b2b-reg__actions .col-md-6:last-child .btn_next:hover,
.b2b-reg__actions .btn_login:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 14px rgba(49, 63, 81, 0.3);
    color: #fff !important;
    text-decoration: none;
}

.b2b-reg__footer {
    padding: 16px 28px 24px;
    text-align: center;
    font-size: 13px;
    color: var(--reg-muted);
    background: #f8fafc;
    border-top: 1px solid var(--reg-border);
}

@media (min-width: 768px) {
    .b2b-reg__footer {
        padding: 18px 36px 28px;
    }
}

.b2b-reg__footer .link_login {
    color: var(--primary-color, #313f51);
    font-weight: 600;
    margin-left: 4px;
    text-decoration: none;
}

.b2b-reg__footer .link_login:hover {
    text-decoration: underline;
}

.b2b-reg-page .app-content .content-overlay,
.b2b-reg-page .app-content .header-navbar-shadow {
    display: none;
}

.b2b-reg-page .content-wrapper,
.b2b-reg-page .content-body {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

.b2b-reg-page .card.my-5,
.b2b-reg-page .card.rounded-0 {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

html[data-textdirection="rtl"] .b2b-reg__alert {
    border-left: none;
    border-right: 3px solid #ef4444;
    border-radius: var(--reg-radius) 0 0 var(--reg-radius);
}

html[data-textdirection="rtl"] .b2b-reg__footer .link_login {
    margin-left: 0;
    margin-right: 4px;
}

html[data-textdirection="rtl"] .b2b-reg__panel .custom-file-label {
    padding: 16px 16px 16px 110px;
}

html[data-textdirection="rtl"] .b2b-reg__panel .custom-file-label::after {
    right: auto;
    left: 12px;
}
