/* AWA Round7 (dual-write hotfix): auth pages (B2B/PF) visual refinement */

:is(body.b2b-auth-shell, body.b2b-account-login, body.b2b-account-forgotpassword, body.b2b-account-claim, body.b2b-register-index) {
    --awa-auth-primary: var(--primary-color, var(--awa-primary));
    --awa-auth-primary-hover: var(--primary-hover, var(--awa-primary-hover));
    --awa-auth-focus: 0 0 0 3px rgb(183 51 55 / 18%);
    --awa-auth-border: #dfe5ee;
    --awa-auth-border-strong: #c7d2e1;
    --awa-auth-text: var(--awa-gray-700);
    --awa-auth-muted: var(--awa-gray-450);
    --awa-auth-radius: 14px;
    --awa-auth-radius-lg: 18px;
    --awa-auth-shadow: 0 18px 44px rgb(15 23 42 / 10%);
    --awa-auth-soft: rgb(183 51 55 / 6%);
}

body.b2b-auth-shell .page_footer,
body.b2b-register-index.page-layout-empty .page_footer {
    display: none !important;
}

:is(body.b2b-auth-shell, body.b2b-register-index) .page.messages {
    position: relative;
    z-index: 2;
}

:is(body.b2b-auth-shell, body.b2b-register-index) .message {
    border-radius:var(--awa-radius-lg);
    border: 1px solid var(--awa-auth-border);
}

.b2b-login-page {
    font-family: var(--awa-font, 'Rubik', Arial, sans-serif);
    color: var(--awa-auth-text);
    background:
        radial-gradient(circle at 8% -8%, rgb(183 51 55 / 12%), transparent 42%),
        radial-gradient(circle at 92% 8%, rgb(142 38 41 / 10%), transparent 38%),
        linear-gradient(180deg, #f7f8fa 0%, #eef1f5 100%);
}

.b2b-login-logo {
    backdrop-filter: saturate(1.1) blur(2px);
    background: rgb(255 255 255 / 96%);
}

.b2b-login-card {
    border-radius: var(--awa-auth-radius-lg);
    border-color: var(--awa-auth-border);
}

.b2b-login-title {
    color: var(--awa-gray-920);
    letter-spacing: -0.02em;
}

.b2b-login-subtitle {
    color: var(--awa-auth-muted);
}

.b2b-field-label {
    color: var(--awa-gray-700);
    font-weight: var(--awa-weight-bold);
}

.b2b-field input {
    min-height: 48px;
    border-radius:var(--awa-radius-lg);
    border: 1px solid var(--awa-auth-border-strong);
    background: var(--awa-white);
    color: var(--awa-auth-text);
    padding-inline: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.b2b-field input::placeholder {
    color: var(--awa-gray-430);
}

.b2b-field input:hover {
    border-color: #b8c4d6;
}

.b2b-field input:focus,
.b2b-field input:focus-visible {
    border-color: var(--awa-auth-primary);
    outline: 0;
}

.b2b-field-note,
.b2b-login-forgot span {
    color: var(--awa-auth-muted);
}

.b2b-login-forgot a,
.b2b-login-footer a,
.b2b-register-page .terms-section .label a,
.b2b-register-page .actions-toolbar .secondary a,
.b2b-register-page a {
    color: var(--awa-auth-primary);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.14em;
}

.b2b-login-forgot a:hover,
.b2b-login-footer a:hover,
.b2b-register-page .terms-section .label a:hover,
.b2b-register-page .actions-toolbar .secondary a:hover,
.b2b-register-page a:hover {
    color: var(--awa-auth-primary-hover);
}

.b2b-password-wrap,
.b2b-register-password-wrap {
    border-radius:var(--awa-radius-lg);
}

.b2b-password-toggle,
.b2b-register-page .b2b-register-password-toggle {
    min-width: 44px;
    min-height: 44px;
    border-radius:var(--awa-radius-pill);
    color: var(--awa-auth-primary);
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.b2b-password-toggle:hover,
.b2b-register-page .b2b-register-password-toggle:hover {
    background: var(--awa-auth-soft);
    color: var(--awa-auth-primary-hover);
}

.b2b-password-toggle:focus-visible,
.b2b-register-page .b2b-register-password-toggle:focus-visible {
    outline: 0;
}

.b2b-login-actions,
.b2b-login-ctas {
    width: 100%;
}

.b2b-btn-entrar,
.b2b-btn-register,
.b2b-btn-claim,
.b2b-register-page .action.submit.primary.create-b2b-account {
    min-height: 48px;
    border-radius:var(--awa-radius-lg);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.b2b-btn-entrar,
.b2b-register-page .action.submit.primary.create-b2b-account {
    background: var(--awa-auth-primary);
    border-color: var(--awa-auth-primary);
    color: var(--awa-white);
}

.b2b-btn-entrar:hover,
.b2b-register-page .action.submit.primary.create-b2b-account:hover {
    background: var(--awa-auth-primary-hover);
    border-color: var(--awa-auth-primary-hover);
    transform: translateY(-1px);
}

.b2b-btn-register,
.b2b-btn-claim {
    border: 1px solid var(--awa-auth-border);
    background: var(--awa-white);
}

.b2b-btn-register:hover,
.b2b-btn-claim:hover {
    border-color: rgb(183 51 55 / 36%);
    background: rgb(183 51 55 / 4%);
    transform: translateY(-1px);
}

.b2b-btn-entrar:focus-visible,
.b2b-btn-register:focus-visible,
.b2b-btn-claim:focus-visible,
.b2b-login-whatsapp:focus-visible,
.b2b-register-page .action.submit.primary.create-b2b-account:focus-visible,
.b2b-register-page .b2b-benefits-toggle:focus-visible,
.b2b-register-page .progress-step:focus-visible,
.b2b-register-page .actions-toolbar .secondary a:focus-visible {
    outline: 0;
}

.b2b-login-whatsapp {
    border-radius:var(--awa-radius-lg);
    border: 1px solid rgb(37 211 102 / 18%);
    background: var(--awa-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.b2b-login-whatsapp:hover {
    border-color: rgb(37 211 102 / 34%);
    transform: translateY(-1px);
}

.b2b-register-page {
    font-family: var(--awa-font, 'Rubik', Arial, sans-serif);
}

html body .page-wrapper .b2b-register-page .b2b-register-container {
    border-radius: var(--awa-auth-radius-lg);
    border-color: var(--awa-auth-border);
}

html body .page-wrapper .b2b-register-page .register-header .register-title {
    color: var(--awa-gray-920);
    letter-spacing: -0.02em;
}

html body .page-wrapper .b2b-register-page .register-header .subtitle,
html body .page-wrapper .b2b-register-page .register-header .register-trust-note {
    color: var(--awa-auth-muted);
}

.b2b-register-page .register-meta__item {
    border-color: var(--awa-auth-border);
    border-radius:var(--awa-radius-lg);
}

.b2b-register-page .register-meta__item:hover {
    border-color: rgb(183 51 55 / 22%);
}

.b2b-register-page .b2b-benefits-toggle {
    min-height: 48px;
    border-radius: var(--awa-radius-md-lg);
    border-color: rgb(183 51 55 / 18%);
}

.b2b-register-page .b2b-benefits-toggle[aria-expanded='true'] {
    border-color: rgb(183 51 55 / 28%);
    background: linear-gradient(180deg, var(--awa-white), rgb(183 51 55 / 3%));
}

.b2b-register-page .b2b-register-form .field .input-text,
.b2b-register-page .b2b-register-form select,
.b2b-register-page .b2b-register-form textarea {
    min-height: 48px;
    border-radius:var(--awa-radius-lg);
    border-color: var(--awa-auth-border-strong);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.b2b-register-page .b2b-register-form textarea {
    min-height: 104px;
    padding-top: 12px;
    resize: vertical;
}

.b2b-register-page .b2b-register-form .field .input-text:focus,
.b2b-register-page .b2b-register-form .field .input-text:focus-visible,
.b2b-register-page .b2b-register-form select:focus,
.b2b-register-page .b2b-register-form select:focus-visible,
.b2b-register-page .b2b-register-form textarea:focus,
.b2b-register-page .b2b-register-form textarea:focus-visible {
    border-color: var(--awa-auth-primary);
    outline: 0;
}

.b2b-register-page .progress-step {
    min-height: 44px;
    border-radius:var(--awa-radius-full);
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.b2b-register-page .progress-step:hover {
    border-color: rgb(183 51 55 / 22%);
}

.b2b-register-page .progress-step.is-active,
.b2b-register-page .progress-step[aria-current='step'] {
    border-color: rgb(183 51 55 / 34%);
}

.b2b-register-page .progress-step__num {
    background: var(--awa-auth-primary);
    color: var(--awa-white);
}

.b2b-register-page .actions-toolbar {
    gap: var(--awa-gap-lg);
}

.b2b-register-page .actions-toolbar .secondary {
    border-radius:var(--awa-radius-lg);
    border: 1px solid var(--awa-auth-border);
    background: var(--awa-white);
    padding: 12px 14px;
}

.b2b-register-page .actions-toolbar .secondary a {
    font-weight: var(--awa-weight-semibold);
}

.b2b-register-page .terms-section .label {
    line-height: 1.45;
}

.b2b-register-page .terms-section .checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--awa-auth-primary);
}

.b2b-register-page .actions-primary-note {
    color: var(--awa-auth-muted);
}

:is(body.b2b-auth-shell, body.b2b-register-index) a:focus-visible {
    outline: 0;
    border-radius:var(--awa-radius-md);
}

/* AWA Round12: login/register conversion structure refinement */
.b2b-login-page {
    min-height: 100svh;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: clamp(20px, 3vw, 32px);
    padding:
        clamp(20px, 4vw, 40px)
        var(--awa-container-padding, 24px)
        calc(clamp(28px, 4vw, 40px) + env(safe-area-inset-bottom));
}

.b2b-login-logo,
.b2b-login-card,
.b2b-login-footer,
.b2b-register-shell-content {
    width: min(100%, 560px);
    margin-inline: auto;
}

.b2b-login-form {
    display: grid;
    gap: clamp(18px, 2vw, 24px);
}

.b2b-field {
    display: grid;
    gap: var(--awa-gap-sm);
}

.b2b-field.b2b-field-password .b2b-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.b2b-field.b2b-field-password .b2b-password-wrap input {
    width: 100%;
    padding-inline-end: 92px !important;
    padding-right: 92px !important;
}

.b2b-field.b2b-field-password .b2b-password-wrap .b2b-password-toggle {
    position: absolute;
    inset-inline-end: 6px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 82px;
    min-height: 38px;
    height: 38px;
    border-radius:var(--awa-radius-pill);
    font-size:var(--awa-font-size-12);
    font-weight: var(--awa-weight-bold);
}

.b2b-login-divider {
    display: flex;
    align-items: center;
    gap: var(--awa-gap-md);
    margin: 14px 0;
    color: var(--awa-auth-muted);
    font-size:var(--awa-font-size-xs);
    font-weight: var(--awa-weight-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.b2b-login-divider::before,
.b2b-login-divider::after {
    content: '';
    height: 1px;
    flex: 1 1 auto;
    background: var(--awa-auth-border);
}

.b2b-login-ctas {
    display: grid;
    gap: var(--awa-gap-md);
}

.b2b-login-ctas .b2b-btn-register,
.b2b-login-ctas .b2b-btn-claim {
    width: 100%;
    min-height: 46px;
    border-radius:var(--awa-radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.3;
    padding: 8px 12px;
}

.b2b-login-ctas .b2b-btn-register strong,
.b2b-login-ctas .b2b-btn-claim strong {
    margin-inline-start: 4px;
}

.b2b-login-footer {
    display: grid;
    gap: var(--awa-gap-sm);
    justify-items: center;
    text-align: center;
}

.b2b-login-footer-brand {
    color: var(--awa-gray-920);
    font-weight: var(--awa-weight-bold);
}

.b2b-login-footer-contact {
    color: var(--awa-auth-muted);
}

.b2b-login-form .mage-error {
    display: block;
    margin-top: 4px;
    color: #b91c1c;
    font-size:var(--awa-font-size-12);
    line-height: 1.3;
}

/* Keep auth conversion path clear: avoid floating chrome covering CTA/actions. */
:is(body.b2b-auth-shell, body.b2b-register-index) .awa-whatsapp-float,
:is(body.b2b-auth-shell, body.b2b-register-index) .awa-nav-overlay {
    display: none !important;
}

.b2b-login-card {
    padding: clamp(30px, 3.5vw, 40px) clamp(20px, 3.5vw, 32px) clamp(26px, 3vw, 34px);
    border-radius: 20px;
    box-shadow: 0 20px 48px rgb(15 23 42 / 10%);
}

.b2b-login-actions .b2b-btn-entrar {
    width: 100%;
    letter-spacing: 0.06em;
}

.b2b-login-forgot {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: baseline;
    gap: var(--awa-gap-sm);
}

@media (max-width: 767px) {
    .b2b-login-page {
        padding:
            14px
            var(--awa-container-padding, 12px)
            calc(24px + env(safe-area-inset-bottom));
        gap: var(--awa-gap-md);
    }

    .b2b-login-logo,
    .b2b-login-card,
    .b2b-login-footer,
    .b2b-register-shell-content {
        width: min(100%, 100%);
    }

    .b2b-login-card {
        margin-top: 18px;
        border-radius: var(--awa-radius-lg, 16px);
        padding: 24px 18px 22px;
    }

    .b2b-login-logo {
        padding: 14px 0 10px;
    }

    .b2b-login-forgot {
        justify-content: flex-start;
        margin-top: 2px;
    }

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

    .b2b-field.b2b-field-password .b2b-password-wrap .b2b-password-toggle {
        min-width: 76px;
        min-height: 36px;
        height: 36px;
        inset-inline-end: 4px;
    }

    .b2b-field.b2b-field-password .b2b-password-wrap input {
        padding-inline-end: 88px !important;
        padding-right: 88px !important;
    }

    .b2b-btn-register,
    .b2b-btn-claim,
    .b2b-btn-entrar,
    .b2b-register-page .action.submit.primary.create-b2b-account,
    .b2b-login-whatsapp,
    .b2b-register-page .b2b-benefits-toggle,
    .b2b-register-page .progress-step {
        min-height: 44px;
    }

    .b2b-register-page .register-meta {
        grid-template-columns: 1fr;
        gap: var(--awa-gap-sm);
    }

    .b2b-register-page .b2b-benefits {
        padding: 14px;
        border-radius: var(--awa-radius-md-lg);
        gap: var(--awa-gap-md);
    }

    html body .page-wrapper .b2b-register-page .b2b-register-container {
        border-radius: var(--awa-radius-lg, 16px);
    }

    .b2b-register-page .actions-toolbar .secondary {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .b2b-password-toggle,
    .b2b-register-page .b2b-register-password-toggle,
    .b2b-btn-entrar,
    .b2b-btn-register,
    .b2b-btn-claim,
    .b2b-login-whatsapp,
    .b2b-register-page .action.submit.primary.create-b2b-account,
    .b2b-register-page .progress-step,
    .b2b-register-page .benefit-item,
    .b2b-register-page .benefit-icon,
    .b2b-login-card,
    .b2b-register-page .register-meta__item {
        transition: none;
        animation: none;
    }
}

/* AWA-AUDIT:login-premium-2026-04-16:start */

/* Focus ring vermelho nos inputs */
.b2b-field input:focus,
.b2b-field input:focus-visible {
    box-shadow: var(--awa-auth-focus);
}

/* Card shell: sombra suave e borda mais visível */
.b2b-login-card {
    box-shadow: var(--awa-auth-shadow);
    border: 1px solid var(--awa-auth-border);
}

/* Labels: tamanho e peso padronizados */
.b2b-field-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Botão Entrar: width 100% e sombra vermelha */
.b2b-btn-entrar {
    width: 100%;
    box-shadow: 0 4px 12px rgba(183,51,55,0.22);
    font-size: 16px;
    font-weight: 700;
}

/* Links secundários: menor destaque visual */
.b2b-login-forgot {
    font-size: 13px;
    color: var(--awa-auth-muted);
}

.b2b-login-ctas .b2b-btn-register,
.b2b-login-ctas .b2b-btn-claim {
    font-size: 14px;
}

/* Centralizar container com max-width */
.b2b-login-page {
    max-width: 460px;
    margin-inline: auto;
}

/* AWA-AUDIT:login-premium-2026-04-16:end */
