/* Rodapé institucional Kurupira — fosco off-black, borda cinza, texto off-white */

.b2b-legal-footer,
.b2b-legal-footer.b2b-legal-footer--panel,
.b2b-legal-footer.b2b-legal-footer--login,
.b2b-legal-footer.b2b-legal-footer--site,
.b2b-legal-footer.b2b-legal-footer--legal,
.b2b-panel-page .b2b-legal-footer,
.b2b-panel-page--dashboard .b2b-legal-footer,
.b2b-login-page .b2b-legal-footer,
.b2b-legal-shell .b2b-legal-footer {
    flex-shrink: 0;
    width: 100%;
    margin: 0;
    padding: 12px 16px;
    border: none !important;
    border-top: 1px solid #3a3a3a !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 40%),
        #121212 !important;
    color: #e8e8e8 !important;
    font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 12px;
    line-height: 1.45;
    box-sizing: border-box;
    text-align: center;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.b2b-legal-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0 8px;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    color: #e8e8e8 !important;
}

.b2b-legal-footer__name,
.b2b-panel-page .b2b-legal-footer__name,
.b2b-panel-page--dashboard .b2b-legal-footer__name,
.b2b-login-page .b2b-legal-footer__name {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #f0f0f0 !important;
}

.b2b-legal-footer__cnpj,
.b2b-legal-footer__copy,
.b2b-legal-footer__sep,
.b2b-panel-page .b2b-legal-footer__cnpj,
.b2b-panel-page .b2b-legal-footer__copy,
.b2b-panel-page .b2b-legal-footer__sep,
.b2b-panel-page--dashboard .b2b-legal-footer__cnpj,
.b2b-panel-page--dashboard .b2b-legal-footer__copy,
.b2b-panel-page--dashboard .b2b-legal-footer__sep,
.b2b-login-page .b2b-legal-footer__cnpj,
.b2b-login-page .b2b-legal-footer__copy,
.b2b-login-page .b2b-legal-footer__sep {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    color: #d4d4d4 !important;
    font-variant-numeric: tabular-nums;
}

.b2b-legal-footer__cnpj,
.b2b-legal-footer__copy {
    white-space: nowrap;
}

.b2b-legal-footer__sep {
    user-select: none;
    opacity: 0.7;
    color: #9a9a9a !important;
}

.b2b-legal-footer__nav {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0 8px;
}

.b2b-legal-footer__link,
.b2b-panel-page .b2b-legal-footer__link,
.b2b-panel-page--dashboard .b2b-legal-footer__link,
.b2b-login-page .b2b-legal-footer__link {
    color: #f0f0f0 !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.b2b-legal-footer__link:hover,
.b2b-legal-footer__link:focus-visible,
.b2b-panel-page .b2b-legal-footer__link:hover,
.b2b-panel-page--dashboard .b2b-legal-footer__link:hover,
.b2b-login-page .b2b-legal-footer__link:hover {
    color: #ffffff !important;
    text-decoration: underline;
    outline: none;
    opacity: 0.92;
}

/* --------------------------------------------------------------------------
   Layout do painel (posição) — sem mudar cores
   -------------------------------------------------------------------------- */
.b2b-panel-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.b2b-panel-page > .b2b-app-shell,
.b2b-panel-page > .dash-container.b2b-app-shell {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

.b2b-panel-page > .b2b-legal-footer,
.b2b-panel-page .b2b-legal-footer--panel {
    position: relative;
    z-index: 5; /* abaixo do menu inferior (z-index ~10018) */
    margin-top: auto;
}

/*
 * Desktop: footer fica no fundo da página — NÃO acompanhar o dock elevado.
 * Mobile: só no painel do revendedor o rodapé ganha padding para o texto ficar acima do tabbar.
 */
@media (max-width: 767px) {
    .b2b-panel-page:not(.b2b-panel-page--admin) > .b2b-legal-footer,
    .b2b-panel-page:not(.b2b-panel-page--admin) .b2b-legal-footer--panel {
        padding-top: 8px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        padding-bottom: calc(76px + 10px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .b2b-panel-page--admin > .b2b-legal-footer,
    .b2b-panel-page--admin .b2b-legal-footer--panel {
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .b2b-legal-footer__inner {
        gap: 2px 6px;
        row-gap: 4px;
    }

    .b2b-legal-footer__nav {
        justify-content: center;
        max-width: 100%;
        gap: 0 6px;
    }

    .b2b-legal-footer__name,
    .b2b-legal-footer__cnpj,
    .b2b-legal-footer__link,
    .b2b-legal-footer__sep {
        white-space: normal;
        font-size: 11px;
    }

    /* Login mobile: compacto, largura total */
    .b2b-login-page > .b2b-legal-footer,
    .b2b-login-page > .b2b-legal-footer.b2b-legal-footer--login {
        padding-top: 8px !important;
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

@media (min-width: 768px) {
    .b2b-panel-page .b2b-main:not(.b2b-main--dashboard) {
        padding-bottom: calc(108px + 36px);
    }
}

/* --------------------------------------------------------------------------
   Layout do login — página termina exatamente no rodapé (largura total)
   -------------------------------------------------------------------------- */
.b2b-login-page {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.b2b-login-page__stage {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto; /* só se teclado/virtual keyboard apertar demais */
    -webkit-overflow-scrolling: touch;
    padding-top: calc(max(8px, env(safe-area-inset-top, 0px)) + clamp(4px, 1.2vh, 16px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    padding-bottom: clamp(8px, 1.5vh, 16px);
    padding-left: max(12px, env(safe-area-inset-left, 0px));
}

.b2b-login-page__stage .login-container {
    margin-top: 0;
    margin-bottom: 0;
    max-height: 100%;
}

.b2b-login-page > .b2b-legal-footer,
.b2b-login-page > .b2b-legal-footer.b2b-legal-footer--login {
    flex: 0 0 auto;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    align-self: stretch;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    z-index: 2;
    padding-top: 6px !important;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    padding-left: max(12px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(12px, env(safe-area-inset-right, 0px)) !important;
}

/* --------------------------------------------------------------------------
   Páginas /institucional/*
   -------------------------------------------------------------------------- */
body.b2b-legal-page {
    margin: 0;
    background: #f8fafc;
    color: #0f172a;
    font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.b2b-legal-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 18px 20px;
    box-sizing: border-box;
}

.b2b-legal-shell__header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 22px;
}

.b2b-legal-shell__brand {
    text-decoration: none;
    color: inherit;
}

.b2b-legal-shell__brand strong {
    display: block;
    font-size: 14px;
    color: #0f172a;
}

.b2b-legal-shell__brand span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #64748b;
}

.b2b-legal-shell__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.b2b-legal-shell__nav a {
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.b2b-legal-shell__nav a:hover {
    color: #0f172a;
    text-decoration: underline;
}

.b2b-legal-shell__eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.b2b-legal-shell__main h1 {
    margin: 0 0 8px;
    font-size: clamp(1.45rem, 2.8vw, 1.85rem);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.b2b-legal-shell__lead {
    margin: 0 0 18px;
    font-size: 14px;
    color: #475569;
    max-width: 40rem;
}

.b2b-legal-shell__body {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    padding: 18px 18px 6px;
}

.b2b-legal-shell__body h2 {
    margin: 1rem 0 0.4rem;
    font-size: 1rem;
}

.b2b-legal-shell__body p,
.b2b-legal-shell__body li {
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
}

.b2b-legal-shell__body a {
    color: #2563eb;
}

.b2b-legal-shell .b2b-legal-footer {
    margin-top: auto;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
}

@media (max-width: 640px) {
    .b2b-legal-footer,
    .b2b-legal-footer.b2b-legal-footer--panel,
    .b2b-legal-footer.b2b-legal-footer--login,
    .b2b-legal-footer.b2b-legal-footer--site,
    .b2b-legal-footer.b2b-legal-footer--legal {
        padding-left: 12px;
        padding-right: 12px;
    }

    .b2b-legal-footer__inner {
        gap: 4px 8px;
    }

    .b2b-legal-shell__body {
        padding: 14px 12px 4px;
        border-radius: 10px;
    }
}
