
/* =========================================================
   CAMARAO 360 - MENU GLOBAL FINAL V1
   ========================================================= */

html body .imperial-sidebar-global,
html body .premium-sidebar.imperial-sidebar-global,
html body .dashboard-sidebar.imperial-sidebar-global {

  position:fixed !important;

  top:0 !important;
  left:0 !important;
  bottom:0 !important;

  width:208px !important;
  min-width:208px !important;
  max-width:208px !important;

  height:100vh !important;

  display:flex !important;
  flex-direction:column !important;

  margin:0 !important;
  padding:0 !important;

  overflow:visible !important;

  background:#ffffff !important;
  background-image:none !important;

  border:0 !important;
  border-right:1px solid #e7ebf0 !important;

  box-shadow:
    4px 0 18px rgba(15,23,42,.04) !important;

  color:#344054 !important;

  z-index:1000 !important;
}


/* remove fundos/decoracoes antigas */

html body .imperial-sidebar-global::before,
html body .imperial-sidebar-global::after {

  content:none !important;
  display:none !important;
}


/* =========================================================
   LOGO
   ========================================================= */

html body .imperial-sidebar-global
.sidebar-brand.c360-global-brand {

  position:relative !important;

  width:100% !important;

  height:78px !important;
  min-height:78px !important;
  max-height:78px !important;

  padding:8px 17px !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  background:#fff !important;
  background-image:none !important;

  border:0 !important;
  border-bottom:1px solid #f0f2f5 !important;

  box-shadow:none !important;

  overflow:visible !important;
}


html body .imperial-sidebar-global
.c360-global-logo {

  display:block !important;

  width:100% !important;
  max-width:168px !important;

  height:auto !important;
  max-height:56px !important;

  margin:0 auto !important;

  object-fit:contain !important;

  transform:none !important;
}


html body .imperial-sidebar-global
.c360-global-logo-mini {

  display:none !important;

  color:#ff7200 !important;

  font-size:17px !important;
  font-weight:900 !important;
}


/* qualquer marca antiga */

html body .imperial-sidebar-global
.premium-brand,

html body .imperial-sidebar-global
.premium-brand-icon,

html body .imperial-sidebar-global
.premium-brand-text,

html body .imperial-sidebar-global
.sidebar-brand-icon,

html body .imperial-sidebar-global
.sidebar-brand-text {

  display:none !important;
}


/* =========================================================
   BOTAO RECOLHER
   ========================================================= */

html body .imperial-sidebar-global
.c360-global-toggle {

  position:absolute !important;

  top:88px !important;
  right:-14px !important;

  z-index:99999 !important;

  width:28px !important;
  height:28px !important;

  padding:0 !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  border:1px solid #e2e8f0 !important;

  border-radius:50% !important;

  background:#fff !important;

  color:#64748b !important;

  font-size:19px !important;

  box-shadow:
    0 4px 12px rgba(15,23,42,.12) !important;

  cursor:pointer !important;
}


/* =========================================================
   MENU
   ========================================================= */

html body .imperial-sidebar-global
.sidebar-nav {

  flex:1 1 auto !important;

  width:100% !important;

  min-height:0 !important;

  margin:0 !important;

  padding:12px 8px 14px !important;

  overflow-y:auto !important;
  overflow-x:hidden !important;

  background:#fff !important;
  background-image:none !important;

  border:0 !important;

  box-shadow:none !important;
}


html body .imperial-sidebar-global
.sidebar-section {

  display:block !important;

  margin:15px 0 7px !important;

  padding:0 10px !important;

  color:#98a2b3 !important;

  background:none !important;

  font-size:8.5px !important;
  font-weight:800 !important;

  letter-spacing:.11em !important;
}


html body .imperial-sidebar-global
.sidebar-nav a {

  width:auto !important;

  min-height:38px !important;

  margin:2px 0 !important;

  padding:0 10px !important;

  display:flex !important;
  align-items:center !important;

  gap:9px !important;

  border:0 !important;

  border-radius:9px !important;

  background:transparent !important;
  background-image:none !important;

  color:#526171 !important;

  text-decoration:none !important;

  box-shadow:none !important;

  font-size:12px !important;
  font-weight:600 !important;

  white-space:nowrap !important;

  transform:none !important;
}


html body .imperial-sidebar-global
.sidebar-nav a:hover {

  background:#f7f8fa !important;

  color:#1f2937 !important;
}


html body .imperial-sidebar-global
.sidebar-nav a.active {

  background:#fff1e5 !important;

  color:#e86f00 !important;

  font-weight:700 !important;

  box-shadow:none !important;
}


html body .imperial-sidebar-global
.sidebar-nav-icon {

  width:21px !important;
  min-width:21px !important;

  flex:0 0 21px !important;

  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;

  font-size:14px !important;
}


html body .imperial-sidebar-global
.sidebar-nav-label {

  min-width:0 !important;

  overflow:hidden !important;

  text-overflow:ellipsis !important;
}


/* =========================================================
   RODAPE
   ========================================================= */

html body .imperial-sidebar-global
.sidebar-bottom {

  flex:0 0 auto !important;

  width:100% !important;

  padding:10px 10px 14px !important;

  background:#fff !important;
  background-image:none !important;

  border:0 !important;
  border-top:1px solid #f0f2f5 !important;

  box-shadow:none !important;
}


html body .imperial-sidebar-global
.c360-global-fazenda {

  min-height:52px !important;

  margin:0 0 7px !important;

  padding:9px 10px !important;

  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;

  background:#f8fafc !important;

  border:1px solid #e8edf2 !important;

  border-radius:10px !important;

  color:#344054 !important;
}


html body .imperial-sidebar-global
.c360-global-fazenda div {

  display:flex !important;
  flex-direction:column !important;
}


html body .imperial-sidebar-global
.c360-global-fazenda strong {

  color:#344054 !important;

  font-size:11px !important;
  font-weight:800 !important;
}


html body .imperial-sidebar-global
.c360-global-fazenda small {

  margin-top:2px !important;

  color:#98a2b3 !important;

  font-size:9px !important;
}


html body .imperial-sidebar-global
.sidebar-logout {

  width:100% !important;

  min-height:38px !important;

  padding:0 10px !important;

  display:flex !important;
  align-items:center !important;

  gap:9px !important;

  border:0 !important;

  border-radius:9px !important;

  background:transparent !important;

  color:#667085 !important;

  font-size:11px !important;
  font-weight:600 !important;

  cursor:pointer !important;
}


html body .imperial-sidebar-global
.sidebar-logout:hover {

  background:#fff2f0 !important;

  color:#d92d20 !important;
}


/* =========================================================
   RECOLHIDO
   ========================================================= */

html body .imperial-sidebar-global.c360-global-recolhido {

  width:64px !important;
  min-width:64px !important;
  max-width:64px !important;
}


html body .imperial-sidebar-global.c360-global-recolhido
.c360-global-logo {

  display:none !important;
}


html body .imperial-sidebar-global.c360-global-recolhido
.c360-global-logo-mini {

  display:block !important;
}


html body .imperial-sidebar-global.c360-global-recolhido
.c360-global-toggle {

  transform:rotate(180deg) !important;
}


html body .imperial-sidebar-global.c360-global-recolhido
.sidebar-section,

html body .imperial-sidebar-global.c360-global-recolhido
.sidebar-nav-label,

html body .imperial-sidebar-global.c360-global-recolhido
.c360-global-fazenda,

html body .imperial-sidebar-global.c360-global-recolhido
.sidebar-logout-label {

  display:none !important;
}


html body .imperial-sidebar-global.c360-global-recolhido
.sidebar-nav {

  padding:14px 7px !important;
}


html body .imperial-sidebar-global.c360-global-recolhido
.sidebar-nav a {

  width:48px !important;

  min-height:40px !important;

  margin:3px auto !important;

  padding:0 !important;

  justify-content:center !important;

  gap:0 !important;
}


html body .imperial-sidebar-global.c360-global-recolhido
.sidebar-nav-icon {

  width:auto !important;
  min-width:0 !important;

  flex:none !important;
}


/* =========================================================
   GARANTE ESPACO DO CONTEUDO
   ========================================================= */

html body.premium-layout-active
.premium-main-shell,
html body.premium-layout-active
.premium-content,
html body.premium-layout-active
.premium-page,
html body.premium-layout-active
main {

  margin-left:0 !important;
}


/* =========================================================
   CAMARAO360_LAYOUT_OFFSET_V2
   Corrige sobreposição do conteúdo com o menu lateral
   ========================================================= */

html body.premium-layout-active .premium-shell{
  display:flex !important;
  align-items:stretch !important;
}

/* A sidebar continua fixa */
html body.premium-layout-active .imperial-sidebar-global{
  width:208px !important;
  min-width:208px !important;
  max-width:208px !important;
}

/* A área principal precisa respeitar os 208px do menu */
html body.premium-layout-active .premium-area{
  margin-left:208px !important;
  width:calc(100% - 208px) !important;
  min-width:0 !important;
  max-width:none !important;
  flex:1 1 auto !important;
}

/* Estado recolhido */
html body.premium-layout-active .imperial-sidebar-global.c360-global-recolhido ~ .premium-area{
  margin-left:64px !important;
  width:calc(100% - 64px) !important;
}

/* Garante que o conteúdo interno use a largura correta */
html body.premium-layout-active .premium-area > main,
html body.premium-layout-active .premium-area .dashboard-area,
html body.premium-layout-active .premium-area .page-content,
html body.premium-layout-active .premium-area .content,
html body.premium-layout-active .premium-area .main-content{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin-left:0 !important;
}

/* Tabelas largas não podem quebrar layout */
html body.premium-layout-active .premium-area .table-responsive,
html body.premium-layout-active .premium-area .card-table,
html body.premium-layout-active .premium-area .table-wrapper,
html body.premium-layout-active .premium-area .lista-tabela{
  width:100% !important;
  max-width:100% !important;
  overflow-x:auto !important;
}

/* Segurança extra para páginas de listagem */
html body.premium-layout-active .premium-area table{
  width:100% !important;
  border-collapse:separate;
}

/* Topbar acompanha a largura disponível */
html body.premium-layout-active .premium-topbar,
html body.premium-layout-active .dashboard-topbar{
  width:100% !important;
  max-width:100% !important;
}

/* =========================================================
   CAMARAO360_PREMIUM_AREA_FINAL_V3
   ========================================================= */

html body.premium-layout-active .premium-area{
  margin-left:208px !important;
  width:calc(100% - 208px) !important;
  min-width:0 !important;
  max-width:none !important;
}

html body.premium-layout-active
.imperial-sidebar-global.c360-global-recolhido
~ .premium-area{
  margin-left:64px !important;
  width:calc(100% - 64px) !important;
}

html body.premium-layout-active .premium-area > main{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin-left:0 !important;
  left:auto !important;
  transform:none !important;
}


/* =========================================================
   CAMARAO360_SEM_FLASH_MENU_V1
   Esconde sidebar antiga até o menu novo ficar pronto
   ========================================================= */

html body:not(.c360-menu-pronto)
.premium-sidebar,

html body:not(.c360-menu-pronto)
.dashboard-sidebar,

html body:not(.c360-menu-pronto)
aside.sidebar {
  visibility:hidden !important;
}


/* Quando o menu correto terminar de montar */
html body.c360-menu-pronto
.imperial-sidebar-global {
  visibility:visible !important;
}



/* =========================================================
   CAMARAO360_SIDEBAR_ESTRUTURA_FIXA_V2
   Logo fixa + menu rolável + rodapé fixo
   ========================================================= */

html body .imperial-sidebar-global,
html body .premium-sidebar.imperial-sidebar-global,
html body .dashboard-sidebar.imperial-sidebar-global{

  display:flex !important;
  flex-direction:column !important;

  height:100vh !important;
  max-height:100vh !important;

  overflow:hidden !important;

  box-sizing:border-box !important;
}


/* LOGO SEMPRE VISÍVEL */

html body .imperial-sidebar-global
.sidebar-brand.c360-global-brand{

  display:flex !important;

  flex:0 0 78px !important;

  width:100% !important;

  height:78px !important;
  min-height:78px !important;
  max-height:78px !important;

  position:relative !important;

  overflow:visible !important;

  visibility:visible !important;
  opacity:1 !important;
}


html body .imperial-sidebar-global
.c360-global-logo{

  display:block !important;

  visibility:visible !important;
  opacity:1 !important;

  flex:none !important;
}


/* SOMENTE O CENTRO DO MENU ROLA */

html body .imperial-sidebar-global
.sidebar-nav{

  display:flex !important;
  flex-direction:column !important;

  flex:1 1 auto !important;

  min-height:0 !important;

  overflow-y:auto !important;
  overflow-x:hidden !important;

  overscroll-behavior:contain;

  scrollbar-width:thin;
}


/* RODAPÉ SEMPRE PRESO EMBAIXO */

html body .imperial-sidebar-global
.sidebar-bottom{

  display:block !important;

  flex:0 0 auto !important;

  width:100% !important;

  position:relative !important;

  margin-top:auto !important;

  overflow:hidden !important;

  background:#fff !important;

  z-index:5 !important;
}


/* NÃO DEIXA CSS ESPECÍFICO DE PÁGINAS SUMIR COM A MARCA */

html body.premium-layout-active
.imperial-sidebar-global
.sidebar-brand.c360-global-brand{

  display:flex !important;
}


/* MODO RECOLHIDO CONTINUA FUNCIONANDO */

html body .imperial-sidebar-global.c360-global-recolhido
.sidebar-brand.c360-global-brand{

  display:flex !important;
  flex:0 0 78px !important;
}



/* =========================================================
   CAMARAO360_SIDEBAR_ESTRUTURA_FIXA_V2
   Logo fixa + menu rolável + rodapé fixo
   ========================================================= */

html body .imperial-sidebar-global,
html body .premium-sidebar.imperial-sidebar-global,
html body .dashboard-sidebar.imperial-sidebar-global{

  display:flex !important;
  flex-direction:column !important;

  height:100vh !important;
  max-height:100vh !important;

  overflow:hidden !important;

  box-sizing:border-box !important;
}


/* LOGO SEMPRE VISÍVEL */

html body .imperial-sidebar-global
.sidebar-brand.c360-global-brand{

  display:flex !important;

  flex:0 0 78px !important;

  width:100% !important;

  height:78px !important;
  min-height:78px !important;
  max-height:78px !important;

  position:relative !important;

  overflow:visible !important;

  visibility:visible !important;
  opacity:1 !important;
}


html body .imperial-sidebar-global
.c360-global-logo{

  display:block !important;

  visibility:visible !important;
  opacity:1 !important;

  flex:none !important;
}


/* SOMENTE O CENTRO DO MENU ROLA */

html body .imperial-sidebar-global
.sidebar-nav{

  display:flex !important;
  flex-direction:column !important;

  flex:1 1 auto !important;

  min-height:0 !important;

  overflow-y:auto !important;
  overflow-x:hidden !important;

  overscroll-behavior:contain;

  scrollbar-width:thin;
}


/* RODAPÉ SEMPRE PRESO EMBAIXO */

html body .imperial-sidebar-global
.sidebar-bottom{

  display:block !important;

  flex:0 0 auto !important;

  width:100% !important;

  position:relative !important;

  margin-top:auto !important;

  overflow:hidden !important;

  background:#fff !important;

  z-index:5 !important;
}


/* NÃO DEIXA CSS ESPECÍFICO DE PÁGINAS SUMIR COM A MARCA */

html body.premium-layout-active
.imperial-sidebar-global
.sidebar-brand.c360-global-brand{

  display:flex !important;
}


/* MODO RECOLHIDO CONTINUA FUNCIONANDO */

html body .imperial-sidebar-global.c360-global-recolhido
.sidebar-brand.c360-global-brand{

  display:flex !important;
  flex:0 0 78px !important;
}

