/* ============================================
   SmartBiashara Auth - Layout Fix
   Center trust section + remove horizontal overflow
   ============================================ */

/* Prevent any horizontal scrolling on auth pages */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

body {
    position: relative !important;
}

/* Ensure main container doesn't cause overflow */
.auth-main,
main.auth-main {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* CENTER THE TRUST SECTION relative to the form/card */
.auth-trust {
    /* Reset positioning */
    margin-left: auto !important;
    margin-right: auto !important;

    /* Center the content within itself */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;

    /* Constrain width to match the form */
    max-width: 920px !important;
    width: 100% !important;

    /* Padding */
    padding: 24px 20px !important;

    /* Ensure box-sizing */
    box-sizing: border-box !important;
}

/* The trust section should match the form container width */
.reg-wrap .auth-trust,
.reg-card + .auth-trust,
form + .auth-trust,
main .auth-trust {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Avatar row centered */
.auth-trust-avatars {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 12px !important;
}

/* Trust text centered */
.auth-trust-text,
.auth-trust-sub {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Help link centered */
.auth-trust-help {
    margin: 8px auto 0 !important;
    display: inline-flex !important;
}

/* Form wrapper - ensure no overflow */
.reg-wrap {
    max-width: 920px !important;
    margin: 0 auto !important;
    padding: 16px 20px 32px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Card inside form - ensure no overflow */
.reg-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* prevent content from breaking out */
}

/* Form rows - prevent overflow */
.reg-section .reg-grid {
    max-width: 100% !important;
}

/* Form controls - prevent overflow */
.reg-card input,
.reg-card select,
.reg-card textarea {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Header banner inside card - prevent overflow */
.reg-header {
    overflow: hidden !important;
    word-wrap: break-word !important;
}

/* Body padding */
.reg-body {
    overflow-x: hidden !important;
}

/* Section transitions */
.reg-section {
    overflow: hidden !important;
}

/* Ensure flex rows don't overflow */
.reg-row,
.reg-grid {
    min-width: 0 !important;
    overflow: hidden !important;
}

/* Fix any flex children overflow */
.reg-row > *,
.reg-grid > * {
    min-width: 0 !important;
    max-width: 100% !important;
    flex-shrink: 1 !important;
    box-sizing: border-box !important;
}
