/* ==========================================================================
   B2B Login Page - Estilo Forceline
   ========================================================================== */

/* Route-level shell reset (only B2B auth pages) */
body.b2b-account-login .page-main.container,
body.b2b-account-forgotpassword .page-main.container,
body.b2b-account-claim .page-main.container,
body.b2b-register-index .page-main.container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.b2b-account-login,
body.b2b-account-forgotpassword,
body.b2b-account-claim,
body.b2b-auth-shell,
body.b2b-register-index {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
}

html body.b2b-auth-shell .page-wrapper,
html body.b2b-register-index .page-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

body.b2b-account-login .page-wrapper,
body.b2b-account-forgotpassword .page-wrapper,
body.b2b-account-claim .page-wrapper,
body.b2b-register-index .page-wrapper,
body.b2b-account-login #maincontent,
body.b2b-account-forgotpassword #maincontent,
body.b2b-account-claim #maincontent,
body.b2b-register-index #maincontent,
body.b2b-account-login .page-main.container,
body.b2b-account-forgotpassword .page-main.container,
body.b2b-account-claim .page-main.container,
body.b2b-register-index .page-main.container,
body.b2b-account-login .columns,
body.b2b-account-forgotpassword .columns,
body.b2b-account-claim .columns,
body.b2b-register-index .columns,
body.b2b-account-login .column.main,
body.b2b-account-forgotpassword .column.main,
body.b2b-account-claim .column.main,
body.b2b-register-index .column.main {
    min-width: 0 !important;
}

body.b2b-account-login .columns,
body.b2b-account-forgotpassword .columns,
body.b2b-account-claim .columns,
body.b2b-register-index .columns {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

body.b2b-account-login .column.main,
body.b2b-account-forgotpassword .column.main,
body.b2b-account-claim .column.main,
body.b2b-register-index .column.main {
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

/* Hardening final against Ayo global containers/columns causing mobile clipping */
:is(body.b2b-auth-shell, body.b2b-account-login, body.b2b-account-forgotpassword, body.b2b-account-claim, body.b2b-register-index) #maincontent,
:is(body.b2b-auth-shell, body.b2b-account-login, body.b2b-account-forgotpassword, body.b2b-account-claim, body.b2b-register-index) .page-main,
:is(body.b2b-auth-shell, body.b2b-account-login, body.b2b-account-forgotpassword, body.b2b-account-claim, body.b2b-register-index) .page-main.container,
:is(body.b2b-auth-shell, body.b2b-account-login, body.b2b-account-forgotpassword, body.b2b-account-claim, body.b2b-register-index) .page-main > .columns,
:is(body.b2b-auth-shell, body.b2b-account-login, body.b2b-account-forgotpassword, body.b2b-account-claim, body.b2b-register-index) .page-main .column.main {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

:is(body.b2b-auth-shell, body.b2b-account-login, body.b2b-account-forgotpassword, body.b2b-account-claim, body.b2b-register-index) #maincontent,
:is(body.b2b-auth-shell, body.b2b-account-login, body.b2b-account-forgotpassword, body.b2b-account-claim, body.b2b-register-index) .page-main,
:is(body.b2b-auth-shell, body.b2b-account-login, body.b2b-account-forgotpassword, body.b2b-account-claim, body.b2b-register-index) .page-main > .columns {
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: clip;
}

:is(body.b2b-auth-shell, body.b2b-account-login, body.b2b-account-forgotpassword, body.b2b-account-claim, body.b2b-register-index) .page-main > .columns {
    display: block !important;
}

body.b2b-account-login .page.messages,
body.b2b-account-forgotpassword .page.messages,
body.b2b-account-claim .page.messages,
body.b2b-register-index .page.messages {
    max-width: 760px;
    margin: 18px auto 0;
    padding: 0 16px;
}

/* Hard isolate auth/register shells from theme header/footer/mobile nav/newsletter leftovers */
body.b2b-auth-shell #header,
body.b2b-auth-shell .header-container,
body.b2b-auth-shell .header-wrapper-sticky,
body.b2b-auth-shell .header-control.header-nav,
body.b2b-auth-shell .topbar-container,
body.b2b-auth-shell .nav-sections,
body.b2b-auth-shell .navigation,
body.b2b-auth-shell .topmenu-mobile,
body.b2b-auth-shell .mobile-bottom-nav,
body.b2b-auth-shell .fixed-right,
body.b2b-auth-shell .newsletterpopup,
body.b2b-auth-shell #newsletter_pop_up,
body.b2b-auth-shell .newsletter-popup-modal,
body.b2b-auth-shell .modals-wrapper .modal-popup.newsletter-popup-modal {
    display: none !important;
}

body.b2b-auth-shell .page-title-wrapper,
body.b2b-account-login .page-title-wrapper,
body.b2b-account-forgotpassword .page-title-wrapper,
body.b2b-account-claim .page-title-wrapper,
body.b2b-register-index .page-title-wrapper,
body.b2b-auth-shell nav.fixed-bottom,
body.b2b-account-login nav.fixed-bottom,
body.b2b-account-forgotpassword nav.fixed-bottom,
body.b2b-account-claim nav.fixed-bottom,
body.b2b-register-index nav.fixed-bottom,
body.b2b-auth-shell .fixed-bottom,
body.b2b-account-login .fixed-bottom,
body.b2b-account-forgotpassword .fixed-bottom,
body.b2b-account-claim .fixed-bottom,
body.b2b-register-index .fixed-bottom,
body.b2b-auth-shell .link-on-bottom,
body.b2b-account-login .link-on-bottom,
body.b2b-account-forgotpassword .link-on-bottom,
body.b2b-account-claim .link-on-bottom,
body.b2b-register-index .link-on-bottom,
body.b2b-auth-shell .mobile-bottom-link,
body.b2b-account-login .mobile-bottom-link,
body.b2b-account-forgotpassword .mobile-bottom-link,
body.b2b-account-claim .mobile-bottom-link,
body.b2b-register-index .mobile-bottom-link {
    display: none !important;
}

/* Page Layout */
.b2b-login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    background: linear-gradient(180deg, #f7f8fa 0%, #eef1f5 100%);
    padding: 0;
    margin: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #1f2937;
    overflow-x: clip;
    box-sizing: border-box;
}

/* Logo */
.b2b-login-logo {
    padding: 20px 0 14px;
    text-align: center;
    background: #fff;
    width: 100%;
    border-bottom: 1px solid #e5e7eb;
}

.b2b-login-logo a {
    display: inline-block;
}

.b2b-login-logo img {
    max-width: 200px;
    max-height: 60px;
    height: auto;
}

/* Red Bar */
.b2b-login-header {
    width: 100%;
}

.b2b-login-bar {
    height: 4px;
    background: #b73337;
    width: 100%;
}

/* Card */
.b2b-login-card {
    background: #fff;
    width: 100%;
    max-width: 600px;
    padding: 42px 40px 34px;
    margin: 26px auto 0;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    min-width: 0;
}

/* Title */
.b2b-login-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.b2b-login-subtitle {
    font-size: 14px;
    color: #4b5563;
    text-align: center;
    margin: 0 0 28px;
    line-height: 1.55;
    max-width: 460px;
}

.b2b-login-subtitle strong {
    color: #1f2937;
    font-weight: 700;
}

/* Form */
.b2b-login-form {
    width: 100%;
    max-width: 440px;
    min-width: 0;
}

.b2b-field {
    margin-bottom: 12px;
}

.b2b-field-label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    line-height: 1.35;
}

.b2b-field-note {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

.b2b-field-note strong {
    color: #374151;
    font-weight: 600;
}

.b2b-field-password .b2b-password-wrap {
    position: relative;
}

.b2b-field input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    line-height: 1.35;
}

.b2b-field-password input {
    padding-right: 96px;
}

.b2b-field input:focus {
    outline: none;
    border-color: #b73337;
    box-shadow: 0 0 0 2px rgba(183, 51, 55, 0.1);
}

.b2b-field input[aria-invalid="true"] {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.08);
}

.b2b-field input:focus-visible {
    outline: 2px solid #8e2629;
    outline-offset: 2px;
}

.b2b-field input::placeholder {
    color: #999;
}

.b2b-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.b2b-password-toggle:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #1f2937;
}

.b2b-password-toggle:focus-visible {
    outline: 2px solid #8e2629;
    outline-offset: 2px;
}

/* Forgot Password */
.b2b-login-forgot {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    text-align: right;
    margin: 4px 0 20px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.b2b-login-forgot a {
    color: #b73337;
    text-decoration: underline;
    font-weight: 500;
}

.b2b-login-forgot a:hover {
    color: #8e2629;
}

/* Entrar Button */
.b2b-btn-entrar {
    display: block;
    width: 100%;
    max-width: 440px;
    min-height: 52px;
    background: #b73337;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.07em;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-transform: uppercase;
    line-height: 1.2;
    padding: 0 14px;
}

.b2b-btn-entrar:hover {
    background: #8e2629;
}

.b2b-btn-entrar:focus-visible,
.b2b-btn-register:focus-visible,
.b2b-btn-claim:focus-visible,
.b2b-btn-claim-submit:focus-visible,
.b2b-claim-back:focus-visible,
.b2b-login-whatsapp:focus-visible,
.b2b-login-forgot a:focus-visible {
    outline: 2px solid #8e2629;
    outline-offset: 2px;
}

.b2b-btn-entrar:active {
    transform: scale(0.99);
}

.b2b-btn-entrar.is-loading,
.b2b-btn-claim-submit.is-loading {
    opacity: 0.9;
    cursor: wait;
}

.b2b-btn-entrar.is-loading span,
.b2b-btn-claim-submit.is-loading span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.b2b-btn-entrar.is-loading span::after,
.b2b-btn-claim-submit.is-loading span::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: b2bAuthSpin 0.7s linear infinite;
}

/* Divider */
.b2b-login-divider {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 440px;
    margin: 28px 0;
    gap: 16px;
}

.b2b-login-divider::before,
.b2b-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ccc;
}

.b2b-login-divider span {
    font-size: 13px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
}

/* CTA Buttons */
.b2b-login-ctas {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.b2b-btn-register,
.b2b-btn-claim {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.2s ease;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.3;
    padding: 8px 14px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.b2b-btn-register {
    background: #b73337;
    color: #fff;
    border: none;
}

.b2b-btn-register:hover {
    background: #8e2629;
    color: #fff;
    text-decoration: none;
}

/* Hardening against inherited/theme overrides on auth route */
body.b2b-account-login .b2b-btn-entrar,
body.b2b-account-login .b2b-btn-register,
body.b2b-account-forgotpassword .b2b-btn-entrar,
body.b2b-account-forgotpassword .b2b-btn-register,
body.b2b-account-claim .b2b-btn-claim-submit,
body.b2b-register-index .create-b2b-account {
    color: #fff !important;
}

body.b2b-account-login .b2b-btn-entrar span,
body.b2b-account-login .b2b-btn-register span,
body.b2b-account-login .b2b-btn-register strong,
body.b2b-account-forgotpassword .b2b-btn-entrar span,
body.b2b-account-forgotpassword .b2b-btn-register span,
body.b2b-account-forgotpassword .b2b-btn-register strong,
body.b2b-account-claim .b2b-btn-claim-submit span,
body.b2b-register-index .create-b2b-account span {
    color: inherit !important;
}

body.b2b-account-login .b2b-btn-entrar:hover,
body.b2b-account-login .b2b-btn-register:hover,
body.b2b-account-login .b2b-btn-entrar:focus,
body.b2b-account-login .b2b-btn-register:focus,
body.b2b-account-forgotpassword .b2b-btn-entrar:hover,
body.b2b-account-forgotpassword .b2b-btn-register:hover,
body.b2b-account-forgotpassword .b2b-btn-entrar:focus,
body.b2b-account-forgotpassword .b2b-btn-register:focus,
body.b2b-account-claim .b2b-btn-claim-submit:hover,
body.b2b-account-claim .b2b-btn-claim-submit:focus,
body.b2b-register-index .create-b2b-account:hover,
body.b2b-register-index .create-b2b-account:focus {
    color: #fff !important;
}

.b2b-btn-claim {
    background: transparent;
    color: #333;
    border: 2px solid #333;
}

.b2b-btn-claim:hover {
    background: #333;
    color: #fff;
    text-decoration: none;
}

.b2b-btn-register strong,
.b2b-btn-claim strong {
    margin-left: 4px;
    text-decoration: underline;
    font-weight: 700;
}

/* Footer */
.b2b-login-footer {
    padding: 28px 16px 30px;
    text-align: center;
    width: 100%;
    max-width: 640px;
    box-sizing: border-box;
}

.b2b-login-footer-brand {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin: 0 0 4px;
}

.b2b-login-footer-contact {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* Magento Messages Override (inside empty layout) */
.b2b-login-page ~ .messages,
.page-wrapper .messages {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

body.b2b-account-login .page.messages .message,
body.b2b-account-forgotpassword .page.messages .message,
body.b2b-account-claim .page.messages .message {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
}

body.b2b-account-login .page.messages .message-error,
body.b2b-account-forgotpassword .page.messages .message-error,
body.b2b-account-claim .page.messages .message-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

body.b2b-account-login .page.messages .message-success,
body.b2b-account-forgotpassword .page.messages .message-success,
body.b2b-account-claim .page.messages .message-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

/* Validation Errors */
.b2b-login-form .mage-error {
    font-size: 12px;
    color: #b73337;
    margin-top: 4px;
}

.b2b-field input.mage-error {
    border-color: #b73337;
}

.b2b-login-form .mage-error {
    display: block;
    line-height: 1.35;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
    .b2b-login-logo {
        padding: 16px 0 12px;
    }

    .b2b-login-card {
        padding: 30px 16px 24px;
        margin-top: 14px;
        border-radius: 12px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
        width: calc(100% - 16px);
    }

    .b2b-login-title {
        font-size: 24px;
        margin-bottom: 6px;
    }

    .b2b-login-subtitle {
        font-size: 13px;
        margin-bottom: 22px;
    }

    .b2b-login-logo img {
        max-width: 160px;
    }

    .b2b-field input {
        min-height: 48px;
        font-size: 16px;
    }

    .b2b-field-label {
        font-size: 12px;
        margin-bottom: 5px;
    }

    .b2b-field-note {
        font-size: 11px;
    }

    .b2b-field-password input {
        padding-right: 88px;
    }

    .b2b-password-toggle {
        min-height: 32px;
        padding: 0 9px;
        font-size: 11px;
    }

    .b2b-login-forgot {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 2px;
        margin-bottom: 16px;
    }

    .b2b-btn-register,
    .b2b-btn-claim {
        font-size: 12px;
        min-height: 48px;
        padding-inline: 10px;
    }

    .b2b-btn-entrar,
    .b2b-btn-claim-submit {
        min-height: 48px;
        font-size: 14px;
    }

    .b2b-login-divider {
        margin: 22px 0;
    }

    .b2b-login-whatsapp {
        width: 100%;
        max-width: 360px;
        box-sizing: border-box;
        font-size: 12px;
    }

    .b2b-login-footer {
        padding-top: 22px;
        padding-bottom: 24px;
    }
}

@keyframes b2bAuthSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Claim Account Page (reuses same CSS)
   ========================================================================== */

.b2b-claim-description {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin: 0 0 28px;
    line-height: 1.6;
    max-width: 440px;
}

.b2b-btn-claim-submit {
    display: block;
    width: 100%;
    max-width: 440px;
    height: 50px;
    background: #b73337;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-transform: uppercase;
    margin-top: 8px;
}

.b2b-btn-claim-submit:hover {
    background: #8e2629;
}

.b2b-claim-back {
    display: inline-block;
    margin-top: 20px;
    font-size: 14px;
    color: #b73337;
    text-decoration: none;
    font-weight: 500;
}

.b2b-claim-back:hover {
    text-decoration: underline;
    color: #8e2629;
}

/* WhatsApp Link */
.b2b-login-whatsapp {
    display: inline-block;
    margin-bottom: 16px;
    padding: 10px 24px;
    background: #25D366;
    color: #fff;
    border-radius: 24px;
    font-size: 13px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.b2b-login-whatsapp:hover {
    background: #1da851;
    color: #fff;
    text-decoration: none;
}

.b2b-login-whatsapp strong {
    font-weight: 700;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .b2b-btn-entrar,
    .b2b-btn-register,
    .b2b-btn-claim,
    .b2b-btn-claim-submit,
    .b2b-field input {
        transition: none;
    }
}
