/* ChatTrade Front Sidebar - esconder/exibir com cookie */
:root {
    --ct-front-sidebar-width: 270px;
}

.ct-front-sidebar-toggle {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 16px;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
    cursor: pointer;
    transition: .2s ease;
}

.ct-front-sidebar-toggle:hover {
    background: rgba(0, 198, 255, .16);
    transform: translateY(-1px);
}

.ct-front-sidebar-toggle .material-symbols-outlined {
    font-size: 25px;
    transition: transform .2s ease;
}

.sidebar.front-sidebar {
    display: block !important;
    position: fixed;
    left: 0;
    top: 76px;
    width: var(--ct-front-sidebar-width);
    height: calc(100vh - 76px);
    padding: 24px;
    overflow-y: auto;
    background: rgba(15, 23, 42, .98);
    border-right: 1px solid rgba(255, 255, 255, .08);
    z-index: 5000;
    transform: translateX(0);
    transition: transform .25s ease, box-shadow .25s ease;
}

.sidebar.front-sidebar .menu-item {
    color: inherit;
    text-decoration: none;
}

body.front-sidebar-collapsed .sidebar.front-sidebar {
    transform: translateX(calc(-1 * var(--ct-front-sidebar-width)));
    box-shadow: none;
}

body.front-sidebar-collapsed .ct-front-sidebar-toggle .material-symbols-outlined {
    transform: rotate(180deg);
}

body:not(.front-sidebar-collapsed) .content {
    width: min(1440px, calc(100% - var(--ct-front-sidebar-width) - 32px));
    margin-left: calc(var(--ct-front-sidebar-width) + 16px);
    margin-right: 16px;
}

body.front-sidebar-collapsed .content {
    width: min(1440px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 991px) {
    .sidebar.front-sidebar {
        top: 0;
        height: 100vh;
        z-index: 7000;
        box-shadow: 24px 0 80px rgba(0, 0, 0, .42);
    }

    body:not(.front-sidebar-collapsed)::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 6500;
        background: rgba(2, 6, 23, .58);
        backdrop-filter: blur(3px);
    }

    body:not(.front-sidebar-collapsed) .sidebar.front-sidebar {
        z-index: 7001;
    }

    body:not(.front-sidebar-collapsed) .content,
    body.front-sidebar-collapsed .content {
        width: min(100% - 24px, 1440px);
        margin-left: auto;
        margin-right: auto;
    }

    .ct-front-sidebar-toggle {
        order: -1;
    }
}

@media (max-width: 575px) {
    .ct-front-sidebar-toggle {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }
}


/* Correção: botão de expandir sempre visível quando menu está escondido */
.sidebar-restore-button {
    position: fixed;
    left: 14px;
    bottom: 18px;
    z-index: 9000;
}

body.front-sidebar-collapsed .sidebar-restore-button {
    display: grid !important;
}

@media (max-width: 991px) {
    .sidebar-restore-button {
        left: auto;
        right: 14px;
        bottom: 18px;
    }
}


/* =========================================================
   FIX FINAL - sidebar + centralização do conteúdo
   Corrige:
   1) conteúdo centralizado quando o menu lateral fecha
   2) botão abrir/fechar sempre visível
   3) menu lateral sem scroll estranho
========================================================= */
:root {
    --ct-front-sidebar-width: 270px;
    --ct-front-topbar-height: 76px;
    --ct-front-page-max: 1220px;
}

body {
    overflow-x: hidden !important;
}

/* Content padrão: quando o menu está aberto, ocupa a área livre e centraliza nela */
body:not(.front-sidebar-collapsed) .content {
    width: min(var(--ct-front-page-max), calc(100vw - var(--ct-front-sidebar-width) - 56px)) !important;
    margin-left: calc(var(--ct-front-sidebar-width) + ((100vw - var(--ct-front-sidebar-width) - min(var(--ct-front-page-max), calc(100vw - var(--ct-front-sidebar-width) - 56px))) / 2)) !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Ao fechar o menu: centraliza na tela inteira, não encosta à esquerda */
body.front-sidebar-collapsed .content {
    width: min(var(--ct-front-page-max), calc(100vw - 56px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.content > .hero,
.client-page-center,
.front-chat-shell,
.market-hero,
.company-grid,
.empty-state {
    width: 100% !important;
    max-width: var(--ct-front-page-max) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.sidebar.front-sidebar {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    width: var(--ct-front-sidebar-width) !important;
    height: calc(100dvh - var(--ct-front-topbar-height)) !important;
    overflow: hidden !important;
    padding: 18px 22px !important;
}

.sidebar.front-sidebar .logo-area {
    flex: 0 0 auto !important;
    margin-bottom: 22px !important;
}

.sidebar.front-sidebar .menu-item {
    flex: 0 0 auto !important;
    min-height: 58px !important;
    margin-bottom: 10px !important;
    padding: 13px 16px !important;
}

.sidebar.front-sidebar .sidebar-divider {
    flex: 0 0 auto !important;
    margin: 6px 0 8px !important;
}

.sidebar-toggle-bottom {
    flex: 0 0 46px !important;
    width: 100% !important;
    min-height: 46px !important;
    margin-top: auto !important;
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sidebar-restore-button {
    position: fixed !important;
    left: 14px !important;
    bottom: 18px !important;
    z-index: 99999 !important;
    width: 46px !important;
    height: 46px !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
}

body.front-sidebar-collapsed .sidebar-restore-button {
    display: inline-flex !important;
}

@media (max-width: 991px) {
    body:not(.front-sidebar-collapsed) .content,
    body.front-sidebar-collapsed .content {
        width: min(100% - 24px, var(--ct-front-page-max)) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .sidebar.front-sidebar {
        top: var(--ct-front-topbar-height) !important;
        width: min(var(--ct-front-sidebar-width), 82vw) !important;
        height: calc(100dvh - var(--ct-front-topbar-height)) !important;
        padding: 14px 16px !important;
        overflow: hidden !important;
    }

    .sidebar.front-sidebar .logo-area {
        margin-bottom: 14px !important;
    }

    .sidebar.front-sidebar .menu-item {
        min-height: 52px !important;
        margin-bottom: 8px !important;
        padding: 11px 14px !important;
        border-radius: 16px !important;
    }

    .sidebar-toggle-bottom {
        min-height: 44px !important;
        flex-basis: 44px !important;
    }

    .sidebar-restore-button {
        left: 12px !important;
        right: auto !important;
        bottom: 14px !important;
    }
}

@media (max-width: 575px) {
    :root {
        --ct-front-topbar-height: 72px;
    }

    .content > .hero {
        padding: 26px 18px !important;
        border-radius: 24px !important;
    }

    .content > .hero h1 {
        font-size: clamp(28px, 8vw, 42px) !important;
        line-height: 1.08 !important;
    }

    .sidebar.front-sidebar .menu-item {
        min-height: 48px !important;
        font-size: 15px !important;
    }
}


/* =========================================================
   AJUSTE DIEGO - MENU LATERAL
   1) Remove área de logomarca duplicada no menu lateral
   2) Coloca botão expandir/fechar no topo
   3) Evita scroll estranho no menu
   4) Centraliza as boxes corretamente quando o menu fecha
========================================================= */

:root {
    --ct-front-sidebar-width: 270px;
    --ct-front-topbar-height: 76px;
    --ct-front-page-max: 1220px;
}

body {
    overflow-x: hidden !important;
}

.sidebar.front-sidebar {
    top: var(--ct-front-topbar-height) !important;
    height: calc(100dvh - var(--ct-front-topbar-height)) !important;
    width: var(--ct-front-sidebar-width) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 18px 22px !important;
    overflow: hidden !important;
}

.sidebar.front-sidebar .logo-area,
.sidebar.front-sidebar .logo {
    display: none !important;
}

.sidebar-toggle-top,
.sidebar-toggle-bottom,
.sidebar-restore-button {
    width: 100% !important;
    min-height: 46px !important;
    height: 46px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255,255,255,.16) !important;
    background: rgba(255,255,255,.07) !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

.sidebar-toggle-top {
    flex: 0 0 46px !important;
    margin: 0 0 10px 0 !important;
}

.sidebar-toggle-bottom {
    display: none !important;
}

.sidebar.front-sidebar .menu-item {
    min-height: 56px !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
}

.sidebar.front-sidebar .sidebar-divider {
    flex: 0 0 auto !important;
    margin: 4px 0 !important;
}

body:not(.front-sidebar-collapsed) .content {
    width: min(var(--ct-front-page-max), calc(100vw - var(--ct-front-sidebar-width) - 56px)) !important;
    margin-left: calc(var(--ct-front-sidebar-width) + ((100vw - var(--ct-front-sidebar-width) - min(var(--ct-front-page-max), calc(100vw - var(--ct-front-sidebar-width) - 56px))) / 2)) !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.front-sidebar-collapsed .content {
    width: min(var(--ct-front-page-max), calc(100vw - 56px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.content > .hero,
.client-page-center,
.front-chat-shell,
.market-hero,
.company-grid,
.empty-state {
    width: 100% !important;
    max-width: var(--ct-front-page-max) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.sidebar-restore-button {
    position: fixed !important;
    left: 18px !important;
    top: calc(var(--ct-front-topbar-height) + 18px) !important;
    bottom: auto !important;
    z-index: 99999 !important;
    width: 52px !important;
    min-width: 52px !important;
    display: none !important;
}

body.front-sidebar-collapsed .sidebar-restore-button {
    display: inline-flex !important;
}

@media (max-width: 991px) {
    .sidebar.front-sidebar {
        width: min(var(--ct-front-sidebar-width), 82vw) !important;
        padding: 14px 16px !important;
        overflow: hidden !important;
    }

    body:not(.front-sidebar-collapsed) .content,
    body.front-sidebar-collapsed .content {
        width: min(100% - 24px, var(--ct-front-page-max)) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .sidebar.front-sidebar .menu-item {
        min-height: 50px !important;
        padding: 10px 14px !important;
        border-radius: 16px !important;
    }

    .sidebar-restore-button {
        left: 14px !important;
        top: calc(var(--ct-front-topbar-height) + 14px) !important;
    }
}

@media (max-height: 720px) {
    .sidebar.front-sidebar {
        gap: 7px !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }

    .sidebar.front-sidebar .menu-item {
        min-height: 46px !important;
        padding-top: 9px !important;
        padding-bottom: 9px !important;
    }

    .sidebar-toggle-top {
        min-height: 42px !important;
        height: 42px !important;
        flex-basis: 42px !important;
        margin-bottom: 6px !important;
    }
}


/* =========================================================
   AJUSTE DIEGO - SIDEBAR MOBILE COM ROLAGEM E AUTO-FECHAR
========================================================= */

.sidebar-toggle-top {
    display: none !important;
}

.sidebar.front-sidebar {
    height: calc(100dvh - 76px) !important;
    max-height: calc(100dvh - 76px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding-bottom: 96px !important;
    scrollbar-width: thin;
}

.sidebar.front-sidebar .menu-item {
    min-height: 58px;
}

@media (max-width: 1199px) {
    .sidebar.front-sidebar {
        top: 0 !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        padding-top: 90px !important;
        overflow-y: auto !important;
        z-index: 6500 !important;
    }

    body.front-sidebar-open .sidebar.front-sidebar {
        transform: translateX(0) !important;
    }

    body.front-sidebar-collapsed .sidebar.front-sidebar {
        transform: translateX(calc(-1 * var(--ct-front-sidebar-width))) !important;
    }
}

@media (max-width: 768px) {
    :root {
        --ct-front-sidebar-width: min(280px, 86vw);
    }

    .sidebar.front-sidebar {
        padding-left: 16px !important;
        padding-right: 16px !important;
        padding-bottom: 120px !important;
    }

    .sidebar.front-sidebar .menu-item {
        min-height: 54px;
        border-radius: 16px;
    }

    .sidebar-restore-button {
        display: none !important;
    }
}


/* =========================================================
   AJUSTE FINAL - APENAS UM BOTÃO E MENU COM ROLAGEM
========================================================= */

.ct-front-sidebar-toggle,
.topbar-sidebar-toggle,
.sidebar-toggle-top {
    display: none !important;
}

.sidebar-restore-button:not(.topbar-sidebar-restore) {
    display: none !important;
}

.sidebar.front-sidebar {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: calc(100dvh - 76px) !important;
    max-height: calc(100dvh - 76px) !important;
    padding-bottom: 120px !important;
    scrollbar-width: thin;
}

@media (max-width: 1199px) {
    .sidebar.front-sidebar {
        top: 0 !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        padding-top: 24px !important;
        padding-bottom: 120px !important;
        overflow-y: auto !important;
        z-index: 6500 !important;
    }
}


/* =========================================================
   FIX FINAL DIEGO - SEM EMBAÇADO E COM BOTÃO VISÍVEL
========================================================= */

/* Remove o embaçado/overlay no responsivo */
body:not(.front-sidebar-collapsed)::after,
body.front-sidebar-open::after,
body.sidebar-open::after {
    display: none !important;
    content: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: transparent !important;
}

body:not(.front-sidebar-collapsed) .content,
body.front-sidebar-open .content,
body.sidebar-open .content {
    filter: none !important;
    -webkit-filter: none !important;
    opacity: 1 !important;
}

.sidebar.front-sidebar {
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-bottom: 120px !important;
}

/* esconde qualquer botão duplicado antigo e mantém só o botão do topo */
.sidebar-toggle-top,
.ct-front-sidebar-toggle.topbar-sidebar-toggle,
.sidebar-restore-button:not(.topbar-sidebar-restore) {
    display: none !important;
}

#frontSidebarRestore.topbar-sidebar-restore {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@media (max-width: 1199px) {
    .sidebar.front-sidebar {
        top: 0 !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        padding-top: 24px !important;
        overflow-y: auto !important;
        z-index: 6500 !important;
    }

    body.front-sidebar-collapsed .sidebar.front-sidebar {
        transform: translateX(calc(-1 * var(--ct-front-sidebar-width))) !important;
    }

    body:not(.front-sidebar-collapsed) .sidebar.front-sidebar,
    body.front-sidebar-open .sidebar.front-sidebar {
        transform: translateX(0) !important;
    }
}


/* =========================================================
   FIX DEFINITIVO DIEGO - SIDEBAR SEM BLUR E COM AUTO FECHAR
========================================================= */

body::after,
body.front-sidebar-open::after,
body:not(.front-sidebar-collapsed)::after,
body.sidebar-open::after {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.front-sidebar-open .content,
body:not(.front-sidebar-collapsed) .content,
.content {
    filter: none !important;
    -webkit-filter: none !important;
    opacity: 1 !important;
}

.sidebar.front-sidebar {
    top: 76px !important;
    height: calc(100dvh - 76px) !important;
    max-height: calc(100dvh - 76px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-bottom: 120px !important;
    z-index: 8500 !important;
}

.sidebar-restore-button,
.ct-front-sidebar-toggle,
.sidebar-toggle-top,
.topbar-sidebar-restore {
    display: none !important;
}

@media (max-width: 1280px) {
    .sidebar.front-sidebar {
        top: 0 !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        padding-top: 20px !important;
        z-index: 8500 !important;
    }

    body.front-sidebar-collapsed .sidebar.front-sidebar {
        transform: translateX(calc(-1 * var(--ct-front-sidebar-width))) !important;
    }

    body:not(.front-sidebar-collapsed) .sidebar.front-sidebar,
    body.front-sidebar-open .sidebar.front-sidebar {
        transform: translateX(0) !important;
    }
}


/* =========================================================
   FIX FINAL - BOTÃO DENTRO DO MENU LATERAL
========================================================= */

.sidebar.front-sidebar {
    position: fixed !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-top: 14px !important;
    padding-bottom: 120px !important;
}

.front-sidebar-header {
    width: 100%;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin-bottom: 12px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
    background: rgba(15, 23, 42, .98) !important;
    padding-bottom: 8px !important;
}

.front-sidebar-toggle-button {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 16px !important;
    color: #fff !important;
    background: rgba(255, 255, 255, .10) !important;
    border: 1px solid rgba(255, 255, 255, .18) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,.22) !important;
    cursor: pointer !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.front-sidebar-toggle-button:hover {
    background: rgba(0, 198, 255, .18) !important;
}

.front-sidebar-toggle-button .material-symbols-outlined {
    font-size: 26px !important;
    line-height: 1 !important;
}

body.front-sidebar-collapsed .front-sidebar-toggle-button .material-symbols-outlined {
    transform: rotate(180deg) !important;
}

.sidebar-restore-button,
.ct-front-sidebar-toggle,
.sidebar-toggle-top,
.topbar-sidebar-toggle-button,
.topbar-sidebar-restore {
    display: none !important;
}

/* Quando fechado, deixa uma alça pequena visível para reabrir */
body.front-sidebar-collapsed .sidebar.front-sidebar {
    transform: translateX(calc(-1 * var(--ct-front-sidebar-width) + 64px)) !important;
    overflow: hidden !important;
}

body.front-sidebar-collapsed .sidebar.front-sidebar .menu-item,
body.front-sidebar-collapsed .sidebar.front-sidebar .sidebar-divider {
    opacity: 0 !important;
    pointer-events: none !important;
}

body.front-sidebar-collapsed .front-sidebar-header {
    justify-content: flex-end !important;
    padding-right: 0 !important;
}

/* Sem blur */
body::after,
body.front-sidebar-open::after,
body:not(.front-sidebar-collapsed)::after,
body.sidebar-open::after {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.content {
    filter: none !important;
    -webkit-filter: none !important;
    opacity: 1 !important;
}

@media (max-width: 1280px) {
    .sidebar.front-sidebar {
        top: 0 !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        z-index: 8500 !important;
    }
}


/* =========================================================
   FIX FINAL v39 - BOTÃO FUNCIONAL DENTRO DO MENU LATERAL
========================================================= */

.sidebar.front-sidebar {
    position: fixed !important;
    top: 76px !important;
    left: 0 !important;
    width: var(--ct-front-sidebar-width) !important;
    height: calc(100dvh - 76px) !important;
    max-height: calc(100dvh - 76px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-top: 14px !important;
    padding-bottom: 120px !important;
    z-index: 8500 !important;
    transition: transform .25s ease !important;
}

.front-sidebar-header {
    width: 100% !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    margin-bottom: 12px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 5 !important;
    background: rgba(15, 23, 42, .98) !important;
    padding-bottom: 8px !important;
}

.front-sidebar-toggle-button {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 16px !important;
    color: #fff !important;
    background: rgba(255,255,255,.12) !important;
    border: 1px solid rgba(255,255,255,.20) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,.22) !important;
    cursor: pointer !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.front-sidebar-toggle-button:hover {
    background: rgba(0,198,255,.20) !important;
}

.front-sidebar-toggle-button .material-symbols-outlined {
    font-size: 26px !important;
    line-height: 1 !important;
    transition: transform .2s ease !important;
}

body.front-sidebar-collapsed .front-sidebar-toggle-button .material-symbols-outlined {
    transform: rotate(180deg) !important;
}

.sidebar-restore-button,
.ct-front-sidebar-toggle,
.sidebar-toggle-top,
.topbar-sidebar-toggle-button,
.topbar-sidebar-restore {
    display: none !important;
}

/* Aberto */
body:not(.front-sidebar-collapsed) .sidebar.front-sidebar,
body.front-sidebar-open .sidebar.front-sidebar {
    transform: translateX(0) !important;
}

/* Fechado: mantém 64px visíveis com o botão clicável */
body.front-sidebar-collapsed .sidebar.front-sidebar {
    transform: translateX(calc(-1 * var(--ct-front-sidebar-width) + 64px)) !important;
    overflow: hidden !important;
}

body.front-sidebar-collapsed .front-sidebar-header {
    justify-content: flex-end !important;
}

body.front-sidebar-collapsed .sidebar.front-sidebar .menu-item,
body.front-sidebar-collapsed .sidebar.front-sidebar .sidebar-divider {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* conteúdo centralizado com a alça lateral */
body.front-sidebar-collapsed .content {
    width: min(var(--ct-front-page-max, 1220px), calc(100vw - 88px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* sem blur */
body::after,
body.front-sidebar-open::after,
body:not(.front-sidebar-collapsed)::after,
body.sidebar-open::after {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.content {
    filter: none !important;
    -webkit-filter: none !important;
    opacity: 1 !important;
}

@media (max-width: 1320px) {
    .sidebar.front-sidebar {
        top: 0 !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
    }
}


/* =========================================================
   FIX FINAL - BOTÃO PERMANECE NA BARRA LATERAL FECHADA
========================================================= */

:root {
    --ct-front-sidebar-collapsed-width: 72px;
}

.sidebar.front-sidebar {
    width: var(--ct-front-sidebar-width) !important;
    min-width: var(--ct-front-sidebar-width) !important;
    transform: translateX(0) !important;
    transition: width .24s ease, min-width .24s ease, transform .24s ease !important;
}

.front-sidebar-header {
    display: flex !important;
    justify-content: flex-end !important;
    padding-right: 0 !important;
}

.front-sidebar-toggle-button {
    position: relative !important;
    z-index: 10 !important;
    display: inline-flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Aberto */
body:not(.front-sidebar-collapsed) .sidebar.front-sidebar,
body.front-sidebar-open .sidebar.front-sidebar {
    width: var(--ct-front-sidebar-width) !important;
    min-width: var(--ct-front-sidebar-width) !important;
    transform: translateX(0) !important;
}

/* Fechado: não some da tela; vira uma barra lateral pequena com o botão para reabrir */
body.front-sidebar-collapsed .sidebar.front-sidebar {
    width: var(--ct-front-sidebar-collapsed-width) !important;
    min-width: var(--ct-front-sidebar-collapsed-width) !important;
    transform: translateX(0) !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
}

body.front-sidebar-collapsed .front-sidebar-header {
    justify-content: center !important;
    width: 100% !important;
    padding: 0 0 8px 0 !important;
}

body.front-sidebar-collapsed .front-sidebar-toggle-button {
    margin: 0 auto !important;
}

body.front-sidebar-collapsed .sidebar.front-sidebar .menu-item,
body.front-sidebar-collapsed .sidebar.front-sidebar .sidebar-divider {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* Conteúdo respeita a barrinha fechada */
body.front-sidebar-collapsed .content {
    width: min(var(--ct-front-page-max, 1220px), calc(100vw - var(--ct-front-sidebar-collapsed-width) - 32px)) !important;
    margin-left: calc(var(--ct-front-sidebar-collapsed-width) + ((100vw - var(--ct-front-sidebar-collapsed-width) - min(var(--ct-front-page-max, 1220px), calc(100vw - var(--ct-front-sidebar-collapsed-width) - 32px))) / 2)) !important;
    margin-right: auto !important;
}

@media (max-width: 900px) {
    body.front-sidebar-collapsed .content {
        width: calc(100vw - var(--ct-front-sidebar-collapsed-width) - 16px) !important;
        margin-left: var(--ct-front-sidebar-collapsed-width) !important;
        margin-right: 0 !important;
    }
}


/* =========================================================
   FIX DEFINITIVO v41 - MENU FECHADO COM BOTÃO VISÍVEL
   Corrige conflito de cookie/estado antigo
========================================================= */

:root {
    --ct-front-sidebar-width: 270px;
    --ct-front-sidebar-collapsed-width: 72px;
}

.sidebar.front-sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 76px !important;
    width: var(--ct-front-sidebar-width) !important;
    min-width: var(--ct-front-sidebar-width) !important;
    height: calc(100dvh - 76px) !important;
    max-height: calc(100dvh - 76px) !important;
    transform: translateX(0) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 14px 16px 120px !important;
    z-index: 8500 !important;
    transition: width .24s ease, min-width .24s ease !important;
}

.front-sidebar-header {
    width: 100% !important;
    min-height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 20 !important;
    padding: 0 0 10px !important;
    margin-bottom: 10px !important;
    background: rgba(15, 23, 42, .98) !important;
}

.front-sidebar-toggle-button {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 16px !important;
    color: #fff !important;
    background: rgba(255,255,255,.12) !important;
    border: 1px solid rgba(255,255,255,.20) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,.22) !important;
    cursor: pointer !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 30 !important;
}

.front-sidebar-toggle-button .material-symbols-outlined {
    font-size: 26px !important;
    line-height: 1 !important;
}

/* remove botões antigos/flutuantes */
.sidebar-restore-button,
.ct-front-sidebar-toggle,
.sidebar-toggle-top,
.topbar-sidebar-toggle-button,
.topbar-sidebar-restore {
    display: none !important;
}

/* aberto */
body:not(.front-sidebar-collapsed) .sidebar.front-sidebar,
body.front-sidebar-open .sidebar.front-sidebar {
    width: var(--ct-front-sidebar-width) !important;
    min-width: var(--ct-front-sidebar-width) !important;
    transform: translateX(0) !important;
}

/* fechado: vira uma barra lateral, NÃO desaparece */
body.front-sidebar-collapsed .sidebar.front-sidebar {
    width: var(--ct-front-sidebar-collapsed-width) !important;
    min-width: var(--ct-front-sidebar-collapsed-width) !important;
    transform: translateX(0) !important;
    overflow: hidden !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
}

body.front-sidebar-collapsed .front-sidebar-header {
    width: 100% !important;
    justify-content: center !important;
    padding: 0 0 10px !important;
}

body.front-sidebar-collapsed .front-sidebar-toggle-button {
    margin: 0 auto !important;
}

body.front-sidebar-collapsed .front-sidebar-toggle-button .material-symbols-outlined {
    transform: rotate(180deg) !important;
}

body.front-sidebar-collapsed .sidebar.front-sidebar .menu-item,
body.front-sidebar-collapsed .sidebar.front-sidebar .sidebar-divider {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* conteúdo respeita a barra fechada */
body.front-sidebar-collapsed .content {
    width: min(var(--ct-front-page-max, 1220px), calc(100vw - var(--ct-front-sidebar-collapsed-width) - 32px)) !important;
    margin-left: calc(var(--ct-front-sidebar-collapsed-width) + ((100vw - var(--ct-front-sidebar-collapsed-width) - min(var(--ct-front-page-max, 1220px), calc(100vw - var(--ct-front-sidebar-collapsed-width) - 32px))) / 2)) !important;
    margin-right: auto !important;
}

/* sem blur/overlay */
body::after,
body.front-sidebar-open::after,
body:not(.front-sidebar-collapsed)::after,
body.sidebar-open::after {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.content {
    filter: none !important;
    -webkit-filter: none !important;
    opacity: 1 !important;
}

@media (max-width: 1400px) {
    .sidebar.front-sidebar {
        top: 0 !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
    }
}

@media (max-width: 900px) {
    body.front-sidebar-collapsed .content {
        width: calc(100vw - var(--ct-front-sidebar-collapsed-width) - 16px) !important;
        margin-left: var(--ct-front-sidebar-collapsed-width) !important;
        margin-right: 0 !important;
    }
}


/* FIX: menu frontal não desaparece totalmente; recolhe em trilho visível */
body.front-sidebar-collapsed .sidebar.front-sidebar {
    transform: translateX(0) !important;
    width: 78px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    overflow: hidden !important;
}

body.front-sidebar-collapsed .sidebar.front-sidebar .menu-item {
    justify-content: center !important;
    gap: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    font-size: 0 !important;
}

body.front-sidebar-collapsed .sidebar.front-sidebar .menu-item .material-symbols-outlined {
    font-size: 26px !important;
}

body.front-sidebar-collapsed .sidebar.front-sidebar .sidebar-divider {
    margin-left: 6px !important;
    margin-right: 6px !important;
}

body.front-sidebar-collapsed .front-sidebar-header {
    justify-content: center !important;
}

body.front-sidebar-collapsed .content {
    width: min(var(--ct-front-page-max), calc(100vw - 104px)) !important;
    margin-left: 94px !important;
    margin-right: auto !important;
}

body:not(.front-sidebar-collapsed) .sidebar.front-sidebar {
    transform: translateX(0) !important;
}

@media (max-width: 991px) {
    body.front-sidebar-collapsed .sidebar.front-sidebar {
        width: 68px !important;
    }

    body.front-sidebar-collapsed .content {
        width: min(100% - 92px, var(--ct-front-page-max)) !important;
        margin-left: 80px !important;
        margin-right: 12px !important;
    }

    body:not(.front-sidebar-collapsed)::after {
        display: none !important;
    }
}


/* FIX v92: menu frontal sem cookie e sem sumir totalmente */
body .sidebar.front-sidebar {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
}
body.front-sidebar-collapsed .sidebar.front-sidebar {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 78px !important;
    min-width: 78px !important;
    transform: translateX(0) !important;
}
body.front-sidebar-collapsed .front-sidebar-toggle-button {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}
body.front-sidebar-collapsed .sidebar.front-sidebar .menu-item {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    justify-content: center !important;
    font-size: 0 !important;
}
body.front-sidebar-collapsed .sidebar.front-sidebar .menu-item .material-symbols-outlined {
    font-size: 26px !important;
}


/* FIX v94 centraliza conteúdo quando o menu frontal está minimizado */
body.front-sidebar-collapsed .content,
body.front-sidebar-collapsed main.content,
body.front-sidebar-collapsed .front-content {
    width: min(var(--ct-front-page-max, 1220px), calc(100vw - 112px)) !important;
    max-width: var(--ct-front-page-max, 1220px) !important;
    margin-left: calc(78px + ((100vw - 78px - min(var(--ct-front-page-max, 1220px), calc(100vw - 112px))) / 2)) !important;
    margin-right: auto !important;
}
body.front-sidebar-collapsed .sidebar.front-sidebar {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}
@media (max-width: 991px) {
    body.front-sidebar-collapsed .content,
    body.front-sidebar-collapsed main.content,
    body.front-sidebar-collapsed .front-content {
        width: calc(100vw - 92px) !important;
        margin-left: 80px !important;
        margin-right: 12px !important;
    }
}

/* =========================================================
   FIX v100 - Toggle do menu frontal com uma única fonte de verdade
   - Evita menu sumir sem botão para reabrir
   - Estado aberto/fechado controlado por front-sidebar-toggle.js
   - Corrige conflitos de regras antigas acumuladas neste arquivo
========================================================= */
:root {
    --ct-front-sidebar-width: 270px;
    --ct-front-sidebar-collapsed-width: 78px;
    --ct-front-topbar-height: 76px;
    --ct-front-page-max: 1220px;
}

#frontSidebar.sidebar.front-sidebar {
    position: fixed !important;
    left: 0 !important;
    top: var(--ct-front-topbar-height) !important;
    z-index: 6500 !important;
    display: flex !important;
    flex-direction: column !important;
    width: var(--ct-front-sidebar-width) !important;
    min-width: var(--ct-front-sidebar-width) !important;
    height: calc(100dvh - var(--ct-front-topbar-height)) !important;
    max-height: calc(100dvh - var(--ct-front-topbar-height)) !important;
    padding: 18px 22px 96px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    transform: translateX(0) !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-sizing: border-box !important;
    scrollbar-width: thin !important;
    transition: width .22s ease, min-width .22s ease, padding .22s ease, box-shadow .22s ease !important;
}

#frontSidebar .front-sidebar-header {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    padding: 0 0 12px !important;
    margin: 0 !important;
}

#frontSidebarRestore.front-sidebar-toggle-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 46px !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    padding: 0 !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    background: rgba(255,255,255,.10) !important;
    color: inherit !important;
    cursor: pointer !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 2 !important;
}

#frontSidebarRestore.front-sidebar-toggle-button:hover {
    background: rgba(0,198,255,.18) !important;
    transform: translateY(-1px) !important;
}

#frontSidebarRestore.front-sidebar-toggle-button .material-symbols-outlined {
    font-size: 26px !important;
    line-height: 1 !important;
    transform: none !important;
}

body.front-sidebar-collapsed #frontSidebar.sidebar.front-sidebar {
    width: var(--ct-front-sidebar-collapsed-width) !important;
    min-width: var(--ct-front-sidebar-collapsed-width) !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    transform: translateX(0) !important;
    box-shadow: none !important;
}

body.front-sidebar-collapsed #frontSidebar .front-sidebar-header {
    justify-content: center !important;
}

body.front-sidebar-collapsed #frontSidebar .menu-item {
    justify-content: center !important;
    gap: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    font-size: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

body.front-sidebar-collapsed #frontSidebar .menu-item .material-symbols-outlined {
    font-size: 26px !important;
}

body.front-sidebar-collapsed #frontSidebar .sidebar-divider {
    margin-left: 6px !important;
    margin-right: 6px !important;
    opacity: .55 !important;
    visibility: visible !important;
}

body:not(.front-sidebar-collapsed) #frontSidebar .menu-item {
    font-size: inherit !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

body:not(.front-sidebar-collapsed) .content {
    width: min(var(--ct-front-page-max), calc(100vw - var(--ct-front-sidebar-width) - 56px)) !important;
    margin-left: calc(var(--ct-front-sidebar-width) + ((100vw - var(--ct-front-sidebar-width) - min(var(--ct-front-page-max), calc(100vw - var(--ct-front-sidebar-width) - 56px))) / 2)) !important;
    margin-right: auto !important;
}

body.front-sidebar-collapsed .content {
    width: min(var(--ct-front-page-max), calc(100vw - var(--ct-front-sidebar-collapsed-width) - 34px)) !important;
    margin-left: calc(var(--ct-front-sidebar-collapsed-width) + ((100vw - var(--ct-front-sidebar-collapsed-width) - min(var(--ct-front-page-max), calc(100vw - var(--ct-front-sidebar-collapsed-width) - 34px))) / 2)) !important;
    margin-right: auto !important;
}

body::after,
body.front-sidebar-open::after,
body:not(.front-sidebar-collapsed)::after,
body.front-sidebar-collapsed::after {
    display: none !important;
    content: none !important;
}

@media (max-width: 1199px) {
    :root {
        --ct-front-sidebar-width: min(280px, 86vw);
        --ct-front-sidebar-collapsed-width: 68px;
    }

    #frontSidebar.sidebar.front-sidebar {
        top: 0 !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        padding-top: 22px !important;
        padding-bottom: 120px !important;
    }

    body:not(.front-sidebar-collapsed) .content {
        width: calc(100vw - var(--ct-front-sidebar-width) - 16px) !important;
        margin-left: var(--ct-front-sidebar-width) !important;
        margin-right: 8px !important;
    }

    body.front-sidebar-collapsed .content {
        width: calc(100vw - var(--ct-front-sidebar-collapsed-width) - 16px) !important;
        margin-left: var(--ct-front-sidebar-collapsed-width) !important;
        margin-right: 8px !important;
    }
}
