/* ═══════════════════════════════════════════════════════════════════════════
   B2B AUTH SSOT LOCK — flat corporativo, grid 12 col, spacing 4–16px
   Final-wins sobre login.css / register.css legado.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Cards flat — sem sombra/lift */
body#html-body.b2b-auth-shell :is(.b2b-login-card, #b2b-register-shell.b2b-login-card, .success-card.b2b-login-card) {
    border: 1px solid var(--awa-border, #e5e7eb) !important;
    border-radius: var(--b2b-auth-radius-card, 8px) !important;
    box-shadow: none !important;
    background: var(--awa-bg, #fff) !important;
}

body#html-body.b2b-auth-shell:not(.b2b-register-index) .b2b-login-card {
    width: min(100%, var(--b2b-auth-card-max, 440px)) !important;
    max-width: var(--b2b-auth-card-max, 440px) !important;
    padding: var(--b2b-auth-card-pad-y, 16px) var(--b2b-auth-card-pad-x, 16px) !important;
}

body#html-body.b2b-auth-shell.b2b-register-index #b2b-register-shell.b2b-login-card {
    padding: var(--b2b-auth-card-pad-y, 16px) var(--b2b-auth-card-pad-x, 16px) !important;
}

body#html-body.b2b-auth-shell.b2b-register-success .success-card.b2b-login-card {
    padding: var(--b2b-auth-card-pad-y, 16px) var(--b2b-auth-card-pad-x, 16px) !important;
}

/* CTAs — sem lift */
body#html-body.b2b-auth-shell :is(.b2b-btn-entrar, .b2b-btn-register, .b2b-btn-claim, .create-b2b-account, .b2b-register-step-next):hover,
body#html-body.b2b-auth-shell :is(.b2b-btn-entrar, .b2b-btn-register, .b2b-btn-claim, .create-b2b-account, .b2b-register-step-next):active {
    transform: none !important;
    box-shadow: none !important;
}

/* Login compacto — hierarquia corporativa */
body#html-body.b2b-auth-shell .b2b-login-title {
    font-family: var(--awa-font-heading, "Rubik", system-ui, sans-serif) !important;
    font-weight: 600 !important;
    font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem) !important;
    letter-spacing: -0.01em !important;
}

body#html-body.b2b-auth-shell .b2b-login-form {
    gap: var(--b2b-auth-gap-md, 12px) !important;
}

body#html-body.b2b-auth-shell .b2b-field .label {
    margin-bottom: var(--b2b-auth-gap-xs, 4px) !important;
    font-size: var(--b2b-auth-font-label, 0.8125rem) !important;
    font-weight: 600 !important;
}

/* Register — grid 12 col terminal */
body#html-body.b2b-auth-shell.b2b-register-index .field-row:not(.field-row--ie) {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    gap: var(--b2b-auth-gap-md, 12px) !important;
    align-items: end !important;
}

body#html-body.b2b-auth-shell.b2b-register-index .field-row--ie {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: var(--b2b-auth-gap-md, 12px) !important;
    align-items: end !important;
}

body#html-body.b2b-auth-shell.b2b-register-index .field-row--ie .field {
    grid-column: auto !important;
}

body#html-body.b2b-auth-shell.b2b-register-index .field-row .field:not(.field-narrow):not(.field-wide):not(.field-uf) {
    grid-column: span 6 !important;
}

body#html-body.b2b-auth-shell.b2b-register-index .field-row .field.field-wide {
    grid-column: span 8 !important;
}

body#html-body.b2b-auth-shell.b2b-register-index .field-row .field.field-narrow,
body#html-body.b2b-auth-shell.b2b-register-index .field-row--locality .field.field-uf,
body#html-body.b2b-auth-shell.b2b-register-index .field-row--locality .field:not(.field-uf) {
    grid-column: span 4 !important;
}

@media (max-width: 575px) {
    body#html-body.b2b-auth-shell.b2b-register-index .field-row .field,
    body#html-body.b2b-auth-shell.b2b-register-index .field-row--locality .field {
        grid-column: span 12 !important;
    }

    body#html-body.b2b-auth-shell.b2b-register-index .field-row--ie {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* Register shell — 920px */
body#html-body.b2b-auth-shell.b2b-register-index .b2b-register-page-shell.b2b-login-page {
    max-width: var(--b2b-auth-register-max, min(100%, 920px)) !important;
    gap: var(--b2b-auth-gap-md, 12px) !important;
}

body#html-body.b2b-auth-shell.b2b-register-index .page-main {
    max-width: min(100%, calc(var(--b2b-auth-register-max, 920px) + 32px)) !important;
    padding-inline: clamp(12px, 3vw, 16px) !important;
    padding-block: clamp(12px, 2vh, 16px) !important;
}

/* Progress + step-nav — separador único */
body#html-body.b2b-auth-shell.b2b-register-index .b2b-register-progress {
    margin: 0 0 var(--b2b-auth-gap-sm, 8px) !important;
    padding: 0 0 var(--b2b-auth-gap-sm, 8px) !important;
    border: 0 !important;
    border-bottom: 0 !important;
}

body#html-body.b2b-auth-shell.b2b-register-index .b2b-register-step-nav {
    margin: 0 0 var(--b2b-auth-gap-sm, 8px) !important;
    padding: 0 0 var(--b2b-auth-gap-sm, 8px) !important;
    border-bottom: 1px solid var(--awa-border-subtle, #eee) !important;
}

/* Login terminal lock — campos, CTAs e suporte alinhados ao card. */
body#html-body.b2b-auth-shell.b2b-account-login .page-wrapper .b2b-login-card {
    display: grid !important;
    gap: var(--b2b-auth-gap-md, 12px) !important;
    background: var(--awa-bg, #fff) !important;
}

body#html-body.b2b-auth-shell.b2b-account-login .page-wrapper .b2b-login-form,
body#html-body.b2b-auth-shell.b2b-account-login .page-wrapper .b2b-login-ctas {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: var(--b2b-auth-gap-sm, 8px) !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body#html-body.b2b-auth-shell.b2b-account-login .page-wrapper .b2b-field {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: var(--b2b-auth-gap-xs, 4px) !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

body#html-body.b2b-auth-shell.b2b-account-login .page-wrapper .b2b-field :is(input, #b2b-email, #b2b-pass) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
}

body#html-body.b2b-auth-shell.b2b-account-login .page-wrapper .b2b-password-wrap {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
}

body#html-body.b2b-auth-shell.b2b-account-login .page-wrapper #b2b-pass {
    padding-right: 52px !important;
}

body#html-body.b2b-auth-shell.b2b-account-login .page-wrapper .b2b-password-toggle {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    transform: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 !important;
    border: 1px solid var(--awa-color-border, #d1d5db) !important;
    border-radius: 8px !important;
    background: var(--awa-bg-surface, #fff) !important;
}

body#html-body.b2b-auth-shell.b2b-account-login .page-wrapper .b2b-login-divider {
    display: flex !important;
    align-items: center !important;
    gap: var(--b2b-auth-gap-sm, 8px) !important;
    width: 100% !important;
    margin: 0 !important;
}

body#html-body.b2b-auth-shell.b2b-account-login .page-wrapper .b2b-login-divider::before,
body#html-body.b2b-auth-shell.b2b-account-login .page-wrapper .b2b-login-divider::after {
    content: "" !important;
    flex: 1 1 auto !important;
    height: 1px !important;
    background: var(--awa-color-border, #e5e5e5) !important;
}

body#html-body.b2b-auth-shell.b2b-account-login .page-wrapper .b2b-login-divider span {
    color: var(--awa-text-muted, #666) !important;
    font-size: var(--b2b-auth-font-label, 13px) !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

body#html-body.b2b-auth-shell.b2b-account-login .page-wrapper :is(.b2b-btn-register, .b2b-btn-claim) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 44px !important;
    padding: 0 var(--b2b-auth-gap-md, 12px) !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    line-height: 1.3 !important;
    text-align: center !important;
    text-decoration: none !important;
}

body#html-body.b2b-auth-shell.b2b-account-login .page-wrapper .b2b-login-footer {
    display: block !important;
    width: min(100%, var(--b2b-auth-card-max, 440px)) !important;
    max-width: var(--b2b-auth-card-max, 440px) !important;
    margin-inline: auto !important;
}

body#html-body.b2b-auth-shell.b2b-account-login .page-wrapper .b2b-login-whatsapp {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: var(--b2b-auth-gap-xs, 4px) !important;
    width: 100% !important;
    min-height: 44px !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    line-height: 1.3 !important;
}
