/* ============================
   LOGIN — TEMA AZUL CHRONOSBI
   ============================ */

body.login-page-blue {
  background: url("/images/background-image.jpg") no-repeat center center fixed;
  background-size: cover;
  position: relative;
}

body.login-page-blue::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);  /* overlay azul escuro leve */
  z-index: 0;
}

.login-wrap {
  min-height: 100vh;
  position: relative;
  z-index: 1; /* acima do overlay */
}

.login-card {
  width: 100%;
  max-width: 420px;
  border-radius: 18px;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.90); /* efeito vidro */
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 28px rgba(0,0,0,.15);
}

.login-header-blue {
  background: #1e3e73;             /* azul principal */
  padding: 14px 18px;
  color: #fff;
  border-radius: 18px 18px 0 0;
}

.login-header-blue .brand {
  font-size: 1.2rem;
  font-weight: 700;
}

.login-body {
  padding: 18px;
}

.login-body .form-control {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #cdd3dd;
}

.login-body .form-label {
  font-size: .95rem;
  color: #1e3e73;
  font-weight: 500;
}

.btn-primary {
  background-color: #1e3e73;
  border-color: #1e3e73;
  font-weight: 600;
}

.btn-primary:hover {
  background-color: #25498a;
}

.text-primary {
  color: #1e3e73 !important;
}

.container-narrow {
  padding: 0 20px;
}

/* ============================
   LOGIN — VERSÃO AZUL
   ============================ */

body.login-blue {
  background: url("/images/background-image.jpg") no-repeat center center fixed;
  background-size: cover;
  position: relative;
}

body.login-blue::before {
  /* overlay escuro por cima do wallpaper */
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 40, 0.40); /* azul-escuro translúcido */
  z-index: 0;
}

.login-container {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}



.login-header-blue {
  background: #194c99;       /* azul superior da barra */
  color: #fff;
  padding: 14px 20px;
}

.login-header-blue .brand {
  font-weight: 700;
  font-size: 1.2rem;
}

.login-body {
  padding: 22px;
}

.btn-login-blue {
  background: #1560ff;
  border-color: #1560ff;
  font-weight: 600;
}

.btn-login-blue:hover {
  background: #0e4bdd;
  border-color: #0e4bdd;
}

.login-body .form-control {
  padding: 12px;
  border-radius: 10px;
}

.login-body .form-label {
  color: #194c99;
  font-weight: 500;
}

.link-secondary {
  color: #666 !important;
  font-size: 0.9rem;
  text-decoration: underline;
}



.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff1;
}


.sidebar-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-link {
  display: block;
  padding: 12px 14px;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: 6px;
  transition: background 0.2s;
}

.sidebar-link:hover {
  background: #2c4f8f;
}


/* ===============================
   MAIN CONTENT
   =============================== */


.page-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: #1e3e73;
}




/* Sidebar container */
.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #15305b; /* azul bem escuro */
  width: 240px;
  height: 100vh;
  padding: 20px 0;
}

/* Itens do menu */
.menu-list li a {
  display: block;
  padding: 12px 24px;
  color: #ffffffcc; /* branco suave */
  text-decoration: none;
  font-size: 15px;
  transition: background .2s, color .2s;
}

.menu-list li a:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* BOTÃO SAIR FIXO NO RODAPÉ */
.logout-container {
  padding: 20px;
  margin-top: auto;
}

.logout-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  width: 100%;
  background: #0d2547;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, opacity .2s;
  border: 1px solid rgba(255,255,255,0.1);
}

.logout-link:hover {
  background: #112e57;
  opacity: 0.95;
}


/* ===============================
   BOTÃO SAIR — FIXO NO RODAPÉ
   =============================== */

.logout-wrapper {
  margin-top: auto;         /* empurra para baixo */
  padding-bottom: 10px;     /* deixa bem colado, mas não grudado */
}

.logout-button {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px;
  background: #10294d;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.1);
  transition: background .2s;
}

.logout-button:hover {
  background: #0a1f3a;
}


/* Mantém textos mais importantes sem quebrar */
.table th {
  white-space: nowrap;
}

/* Somente a coluna de ações deve encolher */
.table td.actions {
  white-space: nowrap;
  width: 1%;
}

/* Demais células podem quebrar para evitar layout quebrado */
.table td {
  white-space: normal;
}

.empresas-box {
  height: 200px;
  border-radius: 8px;
}




/* ============================
   PORTAL DO USUÁRIO — SIDEBAR
   ============================ */

.usuario-sidebar {
  width: 240px;
  background: #15305b;
  color: white;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 20px 0;
}


.usuario-sidebar-header img {
  max-width: 64px;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}


.usuario-sidebar-header h4 {
  font-size: 18px;
  margin-top: 10px;
  font-weight: 600;
}

.usuario-menu-list {
  list-style: none;
  padding-left: 0;
}

.usuario-menu-list li a {
  display: block;
  padding: 12px 24px;
  font-size: 15px;
  color: #ffffffcc;
  text-decoration: none;
  transition: .2s;
}

.usuario-menu-list li a:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.usuario-logout-wrapper {
  margin-top: auto;
  padding: 20px;
}

.usuario-logout-wrapper a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;

  padding: 12px 24px;
  background: #0d2547;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}


.usuario-logout-wrapper a:hover {
  background: #112e57;
}

/* ============================
   ÁREA DE CONTEÚDO DO PORTAL
   ============================ */
.portal-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: block;
}


.portal-welcome {
    text-align: center;
    font-size: 2.2rem;       /* deixa maior */
    font-weight: 600;
    color: #1e3e73;          /* azul do tema */
    margin-bottom: 25px;
}

.portal-footer {
    width: 100%;
    text-align: center;
    padding: 8px 10px;
    color: #5a6b85;
    font-size: 0.9rem;

    margin-top: 0px;       /* menor espaço */
    border-top: none;      /* REMOVE a linha */
}




/* ============================================================
   PORTAL — GRID RESPONSIVO (COM ORDEM DE LIBERADOS)
   ============================================================ */

.portal-card-container {
    display: grid;
    gap: 22px;
    padding: 20px 10px;
    justify-content: center;
    margin: 0 auto;
}


/* 6 colunas desktop */
@media (min-width: 1400px) {
    .portal-card-container {
        grid-template-columns: repeat(6, 1fr);
        max-width: 1600px;
    }
}

/* 4 colunas laptop */
@media (min-width: 992px) and (max-width: 1399px) {
    .portal-card-container {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1200px;
    }
}

/* 3 colunas tablet */
@media (min-width: 768px) and (max-width: 991px) {
    .portal-card-container {
        grid-template-columns: repeat(3, 1fr);
        max-width: 900px;
    }
}

/* 2 colunas mobile */
@media (min-width: 480px) and (max-width: 767px) {
    .portal-card-container {
        grid-template-columns: repeat(2, 1fr);
        max-width: 480px;
    }
}

/* 1 coluna mobile pequeno */
@media (max-width: 767px) {
    .portal-card-container {
        grid-template-columns: repeat(2, 1fr);
        max-width: 480px;
    }
}


/* ============================================================
   CARDS — BASE
   ============================================================ */

.portal-card {
    background: #182d4a;
    color: #fff;
    border-radius: 14px;
    padding: 22px 12px;

    width: 100%;
    max-width: 220px;
    min-height: 200px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    cursor: pointer;
    transition: transform .2s ease;
}


.portal-card:hover {
    transform: translateY(-4px);
}


.portal-card img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
    object-fit: contain;
}

/* ============================================================
   LIBERADO — aparece antes no grid (sem separar blocos)
   ============================================================ */
.portal-card-liberado {
    background: #182d4a !important;
    color: #fff !important;
    order: -1 !important;   /* força ir para frente */
}

/* ============================================================
   BLOQUEADO — depois
   ============================================================ */
.portal-card-bloqueada {
    background: #e5e5e5 !important;
    color: #777;
    cursor: not-allowed !important;
    filter: grayscale(100%);
    border: 1px solid #ccc;
    order: 1 !important;
}

.area-img-bloqueada {
    filter: grayscale(100%) brightness(0.7);
}

.area-text-bloqueada {
    color: #777 !important;
}






/* ============================
   TELA SELECIONAR EMPRESA
   ============================ */

.selecionar-empresa-container h2 {
  color: #1e3e73;
}

.empresa-card-btn {
  border: none;
  background: transparent;
  padding: 0;
  width: 100%;
}

.empresa-card {
  width: 190px;
  border-radius: 12px;
  background: #1e2d45;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
}

.empresa-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.empresa-card-logo {
  background: #24354f;
  height: 160px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empresa-logo {
  max-height: 90px;
  max-width: 90%;
}

.empresa-card-nome {
  padding: 12px;
  background: #1b283c;
  color: white;
  font-size: 15px;
  font-weight: 600;
}

/* Versão responsiva */
@media (max-width: 768px) {
  .empresa-card {
    width: 150px;
  }
  .empresa-card-logo {
    height: 130px;
  }
}

.empresa-item img {
  width: 90px !important;
  height: 90px !important;
  object-fit: contain;
}


/* --- CARTÕES DE SELEÇÃO DE EMPRESA --- */

.selecionar-card {
    background: #1f324e;
    padding: 25px 10px;
    border-radius: 14px;
    text-align: center;
    transition: 0.25s;
    cursor: pointer;
}

.selecionar-card:hover {
    background: #2a3f5e;
    transform: translateY(-3px);
}

.selecionar-card img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 12px;
}

.selecionar-card .titulo {
    color: #fff;
    font-size: 1.1rem;
}

/* ====== CARDS DAS ÁREAS ====== */

.area-card {
  width: 100%;
  max-width: 220px;
  min-height: 200px;

  border-radius: 14px;
  padding: 20px 10px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}


/* --- HABILITADO / LIBERADO --- */
.area-card.habilitado {
    background: #182d4a;
    color: white;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.area-card.habilitado:hover {
    transform: scale(1.05);
}

/* --- DESABILITADO / BLOQUEADO --- */
.area-card.desabilitado {
    background: #e5e8ee;
    color: #98a1b3; 
    cursor: not-allowed;
    border: 2px solid #d0d4dd;
    opacity: 1; /* mantém visível e destacado */
}

.area-card.desabilitado img {
    filter: grayscale(100%) brightness(0.6);
}

.area-card.desabilitado .area-nome {
    color: #9aa3b6;
}



.portal-card-liberado {
    background: #182d4a;
    color: white;
    cursor: pointer;
}

.portal-card-liberado:hover {
    transform: scale(1.05);
}

.portal-card-bloqueada {
    background: #e5e5e5 !important;
    color: #777;
    cursor: not-allowed !important;
    border-radius: 14px;
    opacity: 1 !important;
    filter: grayscale(100%);
    border: 1px solid #ccc;
}

.area-img-bloqueada {
    filter: grayscale(100%) brightness(0.7);
}

.area-text-bloqueada {
    color: #777 !important;
}



/* ============================
   SELECT CUSTOMIZADO
   ============================ */

.custom-select-wrapper {
    position: relative;
}

.custom-select-display {
    border: 1px solid #ced4da;
    padding: .47rem .75rem;
    border-radius: 6px;
    background: white;
    cursor: pointer;
}

.custom-select-list {
    display: none;
    position: absolute;
    width: 100%;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 6px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.custom-select-item {
    padding: 8px 10px;
    cursor: pointer;
}

.custom-select-item:hover {
    background: #e9ecef;
}

.custom-select-search {
    border: none;
    border-bottom: 1px solid #ddd;
    padding: 8px 10px;
    width: 100%;
    outline: none;
}


.autocomplete-wrapper {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-height: 250px;
    overflow-y: auto;
    display: none;
    z-index: 50;
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
}

.autocomplete-item:hover {
    background: #eef2ff;
}





/* ============================
   AJUSTE — FULLSCREEN RELATÓRIO
   ============================ */

.portal-content.portal-relatorio {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    height: 100vh !important;
    display: flex;
    flex-direction: column;
}

.portal-content.portal-relatorio #container-relatorio {
    flex: 1;
    overflow: hidden;
}

.portal-content.portal-relatorio iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

#container-relatorio iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;

    /* 🔥 ESSENCIAL para iOS */
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}


/* ================================
      POPUP DE MENSAGENS
================================ */

.mensagem-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.mensagem-card {
    background: #fff;
    padding: 28px;
    width: 92%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 14px;
    box-shadow: 0px 0px 20px rgba(0,0,0,0.20);
    animation: fadeInScale 0.25s ease;

    display: flex;
    flex-direction: column;
}


.mensagem-titulo {
    font-size: 22px;
    font-weight: 700;
    color: #003c8f;
    text-align: center; 
    width: 100%;
}

.mensagem-conteudo {
    margin-top: 12px;
    font-size: 16px;
    overflow-y: auto;
    max-height: calc(80vh - 180px);
    padding-right: 6px;
}

.mensagem-botoes {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}


@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}


.nav-tabs .nav-link {
    border: none;
    padding: 10px 18px;
    cursor: pointer;
}

.nav-tabs .nav-link.active {
    background: #003c8f;
    color: white;
    border-radius: 6px;
}



/* ===============================
   PORTAL — LISTA DE MÓDULOS
   =============================== */

/* ===============================
   GRID DE MÓDULOS — PORTAL PRINCIPAL
   =============================== */


/* DESKTOP GRANDE */
@media (min-width: 1400px) {
  .modulos-grid {
    grid-template-columns: repeat(6, 1fr);
    max-width: 1600px;
  }
}

/* DESKTOP / NOTEBOOK */
@media (min-width: 992px) and (max-width: 1399px) {
  .modulos-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px;
  }
}

/* TABLET */
@media (min-width: 768px) and (max-width: 991px) {
  .modulos-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 900px;
  }
}

/* MOBILE */
@media (max-width: 767px) {
  .modulos-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 480px;
  }
}




/* ===============================
   TÍTULO PADRÃO DO PORTAL
   (Módulos / Áreas / Mensagens)
   =============================== */
.portal-titulo {
  text-align: center;
  margin-bottom: 25px;
}


.portal-titulo h1 {
    margin: 0;
    font-size: 2.2rem;        /* mesmo tamanho do "Seja bem-vindo(a)" */
    font-weight: 600;
    color: #1e3e73;           /* azul padrão do portal */
}

.modulo-card {
  background: #182d4a;
  color: #fff;
  border-radius: 14px;

  width: 100%;
  max-width: 220px;
  min-height: 200px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
  text-decoration: none;
  cursor: pointer;

  transition: transform .2s ease;
}

.modulo-card:hover {
  transform: scale(1.05);
}



.modulo-icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 12px;
}

.modulo-nome {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}


.nenhum-item {
    background: #d2f2ff;
    padding: 20px;
    border-radius: 10px;
    width: 300px;
    margin: 20px auto;
    text-align: center;
}



/* ================================
   FIXAR TOPBAR NO TOPO DO PORTAL
   ================================ */

.portal-content.portal-topbar-enabled {
    padding: 0 !important;
    margin: 0 !important;
    overflow-y: auto;
}

/* ===============================
   CONTEÚDO PADRÃO DO PORTAL
   =============================== */
.conteudo-portal {
  padding: 30px 20px;
  max-width: none;
  margin: 0;
}


/* ===============================
   AJUSTE ESPECÍFICO — TELA DE MÓDULOS
   Reduz espaço entre topbar e título
   =============================== */
.portal-content.portal-content-has-topbar .conteudo-portal {
    padding-top: 20px; /* antes era 40px → causava espaço extra */
}



/* ===============================
   TOPBAR FIXA GLOBAL
   =============================== */
/* FIXO: Topbar com título à esquerda e logo à direita */
.topbar-portal-global {
    height: 45px;
    background: #15305b;
    color: #fff;

    display: flex !important;
    align-items: center;

    /* 🔑 layout correto */
    gap: 12px;
    padding: 0 25px;
    overflow: hidden;

    font-size: 1.80rem;
    font-weight: 600;
    flex-shrink: 0;
}



.topbar-left {
    display: flex;
    align-items: center;

    /* 🔑 permite encolher corretamente */
    flex: 1;
    min-width: 0;

    padding-top: 0;
    min-height: 45px;
    overflow: hidden;
}



.topbar-right {
    display: flex;
    align-items: center;
}

.topbar-logo {
    height: 26px;
    object-fit: contain;
    opacity: .95;
}


/* empurra o conteúdo para baixo da topbar */
.portal-content-has-topbar {
    margin-top: 45px !important;
}


.portal-layout {
    display: flex;
    height: 100vh;
    width: 100%;
}

.portal-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
}



/* ===========================
   BREADCRUMB (Portal) — FIXO
   =========================== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;

    flex: 1;            /* ocupa só o espaço disponível */
    min-width: 0;       /* 🔥 ESSENCIAL para ellipsis */
    overflow: hidden;

    font-size: 14px;
    color: #dce3f1;
    transform: translateY(7px);
}

.breadcrumb-item {
    color: #ffffffcc;
    text-decoration: none;
    font-weight: 500;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}


.breadcrumb-item:hover {
    color: white;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #9fb3d1;
    font-weight: 700;
    margin: 0 4px;
}


/* =========================================
   BREADCRUMB — OCULTA ÚLTIMO NÍVEL
   SOMENTE EM TELAS INTERMEDIÁRIAS
   ========================================= */

/* Tablets grandes e notebooks pequenos */
@media (min-width: 769px) and (max-width: 1279px) {

  /* Esconde apenas o último item */
  .breadcrumb-item:last-child {
    display: none;
  }

  /* Remove o separador antes dele */
  .breadcrumb-item:last-child + .breadcrumb-separator,
  .breadcrumb-separator:last-child {
    display: none;
  }
}




/* =========================================
   OCULTAR LOGO DA SIDEBAR
   (antes da empresa ser selecionada)
   ========================================= */
.tela-selecionar-empresa .usuario-sidebar-header img {
    display: none;
}


/* =========================================
   TOPBAR — SOMENTE LOGO (SELEÇÃO DE EMPRESA)
   ========================================= */
.topbar-only-logo {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 24px;
    height: 60px;
}

/* Logo nunca corta */
.topbar-only-logo .topbar-logo {
    max-height: 38px;
    width: auto;
    object-fit: contain;
}

/* Garante que nada extra apareça */
.topbar-only-logo * {
    background-image: none !important;
}


/* =====================================
   GRID PADRÃO COM SCROLL INTERNO
   ===================================== */

.grid-scroll-wrapper {
  max-height: calc(100vh - 340px);
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 6px;
}

/* Cabeçalho fixo */
.grid-scroll-table thead th {
  position: sticky;
  top: 0;
  background: #f8f9fa;
  z-index: 2;
}

/* Remove margem inferior da tabela */
.grid-scroll-table {
  margin-bottom: 0;
}

/* Scroll discreto */
.grid-scroll-wrapper::-webkit-scrollbar {
  width: 8px;
}

.grid-scroll-wrapper::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
}

.grid-scroll-wrapper::-webkit-scrollbar-track {
  background: transparent;
}


/* =====================================
   AJUSTE LOCAL — USUÁRIOS (GESTOR)
   ===================================== */

.portal-content .card .grid-scroll-wrapper {
  max-height: calc(100vh - 420px);
}


/* =====================================
   AJUSTE FINO – TELA DE MÓDULOS
   ===================================== */

.grid-scroll-modulos {
  max-height: calc(100vh - 300px);
}


/* =====================================================
   v0.10.5 — MENU RETRÁTIL MOBILE (PORTAL)
   ===================================================== */

/* BOTÃO MENU MOBILE */
.mobile-menu-btn {
  font-size: 26px;
  cursor: pointer;
  user-select: none;
  color: #fff;
}

/* Desktop: não mostra */
@media (min-width: 769px) {
  .mobile-menu-btn {
    display: none !important;
  }
}

/* Mobile: mostra */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: inline-block;
  }
}



/* =====================================================
   v0.10.5 — CORREÇÃO ÍCONES MENU RETRÁTIL
   ===================================================== */

@media (max-width: 768px) {

  /* ESCONDE SOMENTE TEXTO */
  .usuario-sidebar:not(.expanded) .usuario-menu-list .text,
  .usuario-sidebar:not(.expanded) .usuario-logout-wrapper .text {
    display: none !important;
  }

  /* ÍCONES SEMPRE VISÍVEIS */
  .usuario-sidebar .icon {
    font-size: 18px;
    line-height: 1;
  }

  /* CENTRALIZA ÍCONES QUANDO FECHADO */
  .usuario-sidebar:not(.expanded) .usuario-menu-list a,
  .usuario-sidebar:not(.expanded) .usuario-logout-wrapper a {
    justify-content: center;
    gap: 0;
  }

  /* BOTÃO ☰ SEMPRE VISÍVEL */
.mobile-menu-btn {
  font-size: 26px;
  color: #fff;
  cursor: pointer;
  user-select: none;
  line-height: 1;
}


}


@media (max-width: 768px) {

  .usuario-menu-list li a,
  .usuario-logout-wrapper a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
  }

}



/* MENU RETRÁIDO (mobile) */
@media (max-width: 768px) {
  .usuario-sidebar:not(.expanded) .usuario-sidebar-header img {
    max-width: 38px;
    max-height: 38px;
  }

  .usuario-sidebar:not(.expanded) .usuario-sidebar-header h4 {
    display: none;
  }
}


/* ===========================
   AJUSTE TÍTULOS — MOBILE
   =========================== */
@media (max-width: 768px) {

  .portal-welcome,
  .portal-titulo h1 {
    font-size: 1.4rem;
    line-height: 1.3;
    margin-bottom: 15px;
    padding: 0 10px;
    text-align: center;
  }

}


@media (max-width: 768px) {
  .breadcrumb {
    display: none;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: inline-block;
  }
}



/* ============================
   REMOVE BREADCRUMB NO MOBILE (DE VEZ)
   ============================ */
@media (max-width: 768px) {
  .topbar-portal-global .breadcrumb {
    display: none !important;
  }
}



@media (max-width: 768px) {

  .topbar-portal-global {
    justify-content: space-between;
    padding: 0 15px;
  }

  .topbar-right {
    margin-left: auto;
  }

}

.topbar-portal-global {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3000; /* MAIOR que a sidebar */
}


.sidebar-overlay {
  display: none;
}

@media (max-width: 768px) {
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1999; /* abaixo da sidebar, acima do conteúdo */
  }

}

/* TOPBAR — acompanha sidebar */
.topbar-portal-global {
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  z-index: 3000;
  transition: left 0.25s ease;
}

/* Quando sidebar retraída */
.portal-layout.sidebar-retrai .topbar-portal-global {
  left: 70px;
}


/* =====================================
   AJUSTE — MÓDULOS OCUPAM TODA A TELA
   ===================================== */
.portal-modulos .conteudo-portal {
  max-width: none !important;
}


/* =====================================
   PORTAL — MÓDULOS COM MESMO TAMANHO DAS ÁREAS
   ===================================== */

/* Remove o limitador só na tela de módulos */
.portal-modulos {
  max-width: none !important;
  margin: 0 !important;
  padding-left: 40px;
  padding-right: 40px;
}

/* Grid dos módulos ocupa largura real */
.portal-modulos .portal-card-container {
  max-width: none;
  justify-content: center;
}

/* Cards dos módulos iguais aos cards das áreas */
.portal-modulos .modulo-card {
  max-width: 240px;
  min-height: 220px;
  padding: 20px 10px;
}


/* =========================
   MENU FLUTUANTE — MOBILE
   ========================= */

.menu-mobile-float {
  position: fixed;
  top: 52px;               /* logo abaixo da topbar */
  left: 12px;
  width: 220px;

  background: #15305b;
  border-radius: 12px;
  padding: 10px 0;

  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  z-index: 4000;

  display: none;
  flex-direction: column;
}

.menu-mobile-float a {
  padding: 10px 16px;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
}

.menu-mobile-float a:hover {
  background: rgba(255,255,255,0.1);
}

.menu-mobile-float hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin: 6px 0;
}

.menu-mobile-float .sair {
  color: #ffdddd;
}

/* SOMENTE MOBILE */
@media (min-width: 769px) {
  .menu-mobile-float {
    display: none !important;
  }
}



@media (min-width: 769px) {
  .usuario-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    display: flex;
  }

  body:not(.tela-selecionar-empresa) .portal-main {
    margin-left: 240px;
  }
}


@media (max-width: 768px) {
  .usuario-sidebar {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-block;
  }
}


/* =========================================================
   AJUSTE — TOPBAR SEM SIDEBAR (TELA SELECIONAR EMPRESA)
   ========================================================= */
@media (min-width: 769px) {
  body.tela-selecionar-empresa .topbar-portal-global {
    left: 0 !important;   /* remove espaço da sidebar */
    right: 0;
  }
}


/* REMOVE qualquer sobra visual antes do rodapé em modo relatório */
.portal-content.portal-relatorio + .portal-footer {
    margin-top: 0 !important;
}






/* ================================
   TABELAS — MOBILE FRIENDLY
   ================================ */

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
}

/* largura mínima para forçar scroll */
.table-scroll table {
  min-width: 720px;
}

/* cabeçalho fixo */
.table-scroll thead th {
  position: sticky;
  top: 0;
  background: #f5f7fb;
  z-index: 2;
  font-size: 13px;
}

/* Ação principal destacada */
.btn-novo {
  font-weight: 600;
  padding: 12px;
}

.table-scroll::after {
  content: "⇆ Arraste para ver mais";
  display: block;
  text-align: right;
  font-size: 12px;
  color: #6c757d;
  margin-top: 6px;
}


/* ================================
   GRID SCROLL — ADMIN
   ================================ */

.grid-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
}

/* força scroll horizontal */
.grid-scroll-table {
  min-width: 1200px; /* pode testar 1100 / 1300 */
  white-space: nowrap;
}

/* cabeçalho fixo */
.grid-scroll-table thead th {
  position: sticky;
  top: 0;
  background: #f5f7fb;
  z-index: 3;
  font-size: 13px;
}

/* células mais compactas no mobile */
@media (max-width: 768px) {
  .grid-scroll-table td,
  .grid-scroll-table th {
    padding: 8px 10px;
    font-size: 13px;
  }
}




@media (max-width: 768px) {
  td.actions .d-flex {
    flex-wrap: wrap;
    gap: 6px;
  }

  td.actions .btn {
    font-size: 12px;
    padding: 4px 8px;
  }
}


@media (max-width: 768px) {

  /* 🔒 garante que o grid fique CONTIDO */
  .grid-scroll-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: 8px;
  }

.grid-scroll-table {
  min-width: 1200px;   /* controla quando aparece scroll */
  white-space: nowrap;
}

.grid-scroll-table thead th {
  position: sticky;
  top: 0;
  background: #f5f7fb;
  z-index: 2;
}
}


@media (max-width: 768px) {
  .form-control {
    padding: 6px 10px;
    font-size: 14px;
  }

  .form-label {
    font-size: 13px;
    margin-bottom: 2px;
  }
}

td.actions .btn {
  font-size: 12px;
  padding: 4px 8px;
}






@media (max-width: 768px) {

  .grid-scroll-wrapper {
    max-height: calc(100vh - 420px);
    overflow-y: auto;
    overflow-x: auto;
  }

}




/* ============================
   RODAPÉ — PORTAL (v0.10.8)
   ============================ */

.portal-footer {
  padding: 6px 20px;
  font-size: 0.85rem;
}

.portal-footer-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;

  font-weight: 400; /* normaliza tudo */
}

.footer-whatsapp {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #1e3e73;
  text-decoration: none;

  font-weight: 400; /* garante sem negrito */
}


/* ============================
   WHATSAPP — RODAPÉ (FIXO)
   ============================ */

.portal-footer .footer-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.portal-footer .footer-whatsapp img {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  object-fit: contain;
  flex-shrink: 0;
}

/* Mobile */
@media (max-width: 768px) {
  .portal-footer .footer-whatsapp img {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
  }
}


/* ============================
   AJUSTE GLOBAL — WHATSAPP
   ============================ */

/* Qualquer ícone de WhatsApp fora do rodapé */
img[src*="whatsapp"]:not([src=""]) {
  max-width: 56px;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
}


@media (max-width: 768px) {
  img[src*="whatsapp"] {
    max-width: 44px;
    max-height: 44px;
  }
}


/* ===============================
   RODAPÉ – PADRONIZAÇÃO DE CORES
   =============================== */

.portal-footer {
    color: #6c757d;
}

.portal-footer a,
.portal-footer a:visited,
.portal-footer a:hover,
.portal-footer a:active {
    color: #6c757d;
    text-decoration: none;
}

/* 🔹 Texto do WhatsApp herda cinza */
.footer-whatsapp span {
    color: #6c757d;
}

/* ✅ ÍCONE DO WHATSAPP MANTÉM COR ORIGINAL */
.footer-whatsapp img {
    filter: none;
    opacity: 1;
}


/* ============================
   v0.10.11 — ADMIN USUÁRIOS MOBILE
   ============================ */

.actions-inline {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

@media (max-width: 768px) {

  /* filtros mais compactos */
  .filtros-usuarios .form-label {
    font-size: 12px;
  }

  .filtros-usuarios .form-control {
    font-size: 13px;
    padding: 6px 8px;
  }

  /* botões de filtro sempre em linha */
  .botoes-filtro {
    flex-wrap: nowrap;
  }

  .botoes-filtro .btn {
    font-size: 12px;
    padding: 6px 4px;
  }

  /* ações SEM quebrar linha */
  td.actions .actions-inline {
    flex-wrap: nowrap;
  }

  td.actions .btn {
    font-size: 11px;
    padding: 4px 6px;
  }

}


/* v0.10.11 — ações horizontais no admin mobile */
.actions-inline {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

@media (max-width: 768px) {
  td.actions .btn {
    font-size: 11px;
    padding: 4px 6px;
  }
}



/* =====================================
   MENSAGENS – LAYOUT MOBILE (FINAL)
   ===================================== */

@media (max-width: 768px) {

  .mensagens-card {
    padding: 12px;
  }

  .mensagens-table thead {
    display: none;
  }

  /* Cada mensagem vira um bloco */
  .mensagens-table tbody tr {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
  }

  .mensagens-table tbody td {
    border: none;
    padding: 0;
  }

  /* ===== TÍTULO ===== */
  .mensagens-table tbody td:nth-child(1) {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
    word-break: break-word;
  }

  /* ===== DATA + STATUS (MESMA LINHA) ===== */
  .mensagens-table tbody tr {
    position: relative;
  }

  .mensagens-table tbody td:nth-child(2),
  .mensagens-table tbody td:nth-child(3) {
    font-size: 13px;
    color: #666;
  }

 /* Limpa floats antes do botão */
  .mensagens-table tbody td:nth-child(4) {
    clear: both;
    margin-top: 8px;
  }

  /* REMOVE efeito zebra (table-striped) nas mensagens mobile */
.mensagens-table.table-striped tbody tr {
  background: transparent !important;
}


  /* ===== BOTÃO ===== */
/* Botão Abrir – tamanho correto no mobile */
.msg-acao {
  display: flex;
  justify-content: center;
}

.msg-acao .btn-abrir {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ===== DATA + STATUS (MESMA LINHA, ALINHADOS) ===== */
.msg-info {
  display: flex;
  align-items: center;
  justify-content: space-between; /* data esquerda | status direita */
  width: 100%;
  font-size: 13px;
  margin-top: 4px;
}

/* Data à esquerda */
.msg-data {
  color: #6c757d;
}

/* Status à direita */
.msg-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}


/* Lida */
.msg-status.lida {
  background: #e0e0e0;
  color: #555;
}

/* Não lida */
.msg-status.nao-lida {
  background: #d1fae5;
  color: #065f46;
}



}


/* =====================================
   CORREÇÃO DEFINITIVA — MENSAGENS (PORTAL)
   ===================================== */

@media (max-width: 768px) {

  /* REMOVE regra global que força 1200px */
  .mensagens-table {
    min-width: 0 !important;
    width: 100% !important;
    white-space: normal !important;
  }

  .mensagens-table tbody,
  .mensagens-table tr,
  .mensagens-table td {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Botão respeita o card */
  .msg-acao {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .msg-acao .btn-abrir {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {

  /* REMOVE zebra do Bootstrap (especificidade máxima) */
  .mensagens-table.table-striped > tbody > tr:nth-of-type(odd),
  .mensagens-table.table-striped > tbody > tr:nth-of-type(even) {
    --bs-table-bg: transparent !important;
    background-color: transparent !important;
  }

}



@media (max-width: 768px) {

  .msg-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
  }

  .msg-data {
    font-size: 13px;
    color: #6c757d;
    white-space: nowrap;
  }

  .msg-status {
    flex-shrink: 0;
  }

}




@media (max-width: 768px) {

  .mensagens-table thead {
    display: none;
  }

  .mensagens-table tbody tr {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
  }

  .mensagens-table tbody td {
    border: none;
    padding: 0;
  }

  /* TÍTULO */
  .msg-titulo {
    font-weight: 600;
    font-size: 15px;
  }

  /* DATA + STATUS NA MESMA LINHA */
  .msg-data,
  .msg-status-col {
    display: inline-flex;
    align-items: center;
  }

  .msg-data {
    float: left;
    font-size: 13px;
    color: #6c757d;
  }

  .msg-status-col {
    float: right;
  }

  /* LIMPA FLOWS ANTES DO BOTÃO */
  .msg-acao {
    clear: both;
    margin-top: 8px;
  }

  /* BOTÃO */
  .btn-abrir {
    width: 100%;
  }
}

@media (max-width: 768px) {

  /* REMOVE zebra do Bootstrap apenas nas mensagens */
  .mensagens-table.table-striped > tbody > tr {
    background-color: transparent !important;
  }

}

@media (max-width: 768px) {
  .mensagens-table.table-striped tbody tr {
    background: transparent !important;
  }
}


@media (max-width: 768px) {

  /* DESATIVA scroll interno das mensagens */
  .mensagens-card .grid-scroll-wrapper {
    max-height: none !important;
    overflow: visible !important;
  }

}

@media (max-width: 768px) {

  .mensagens-card {
    display: block;
  }

}


/* =====================================
   MENSAGENS — STATUS COLORIDO (DESKTOP)
   ===================================== */

@media (min-width: 769px) {

  /* Base da célula de status */
  .mensagens-table td:nth-child(3) {
    font-weight: 600;
  }

  /* NÃO LIDA */
  .mensagens-table td:nth-child(3):has(.badge-nao-lida),
  .mensagens-table td:nth-child(3):contains("Não lida") {
    background: #e6f7ef;
    color: #0f5132;
  }

  /* LIDA */
  .mensagens-table td:nth-child(3):has(.badge-lida),
  .mensagens-table td:nth-child(3):contains("Lida") {
    background: #ededed;
    color: #555;
  }

}


@media (min-width: 769px) {

  .mensagens-table td.status-nao-lida {
    background: #e6f7ef;
    color: #0f5132;
    font-weight: 600;
  }

  .mensagens-table td.status-lida {
    background: #ededed;
    color: #555;
    font-weight: 600;
  }

}


@media (max-width: 768px) {
  .mensagens-table.table-striped tbody tr {
    background: transparent !important;
  }
}


/* =====================================
   MENSAGENS — CORREÇÃO FINAL
   ===================================== */

/* ===== DESKTOP ===== */
.msg-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Status Lida */
.msg-status.lida {
  background: #e0e0e0;
  color: #555;
}

/* Status Não Lida */
.msg-status.nao-lida {
  background: #d1fae5;
  color: #065f46;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

  /* REMOVE zebra SOMENTE no mobile */
  .mensagens-table.table-striped > tbody > tr {
    background: transparent !important;
  }

  /* Cada mensagem vira bloco */
  .mensagens-table tbody tr {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
  }

  .mensagens-table tbody td {
    border: none;
    padding: 0;
  }

  /* Data + Status na MESMA linha */
  .msg-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
  }

  /* Botão ocupa largura do card */
  .msg-acao {
    width: 100%;
  }

  .btn-abrir {
    width: 100%;
  }
}

/* ===== VISIBILIDADE POR DISPOSITIVO ===== */
.mensagens-mobile {
  display: none;
}

@media (max-width: 768px) {
  .mensagens-desktop {
    display: none;
  }
  .mensagens-mobile {
    display: block;
  }
}

/* ===== MOBILE CARDS ===== */
.msg-card {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.msg-titulo {
  font-weight: 600;
  margin-bottom: 6px;
}

.msg-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

/* ===== STATUS ===== */
.msg-status {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.msg-status.lida {
  background: #e0e0e0;
  color: #555;
}

.msg-status.nao-lida {
  background: #d1fae5;
  color: #065f46;
}

/* =====================================
   INPUT TELEFONE COM ÍCONE WHATSAPP
   (perfil + cadastro/edição usuário)
   ===================================== */

.input-telefone {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-telefone img,
.input-telefone .icone-whatsapp {
  width: 22px;          /* mesmo tamanho do rodapé */
  height: 22px;
  min-width: 22px;
  opacity: 0.85;
}

.input-telefone input {
  height: 38px;         /* igual aos outros inputs */
  line-height: 38px;
}


/* WhatsApp ativo (admin) */
.whatsapp-link {
  display: flex;
  align-items: center;
}

.whatsapp-link img {
  cursor: pointer;
}

/* WhatsApp desativado (sem telefone) */
.whatsapp-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Ajuste dos checkboxes no mobile */
@media (max-width: 768px) {
  .permissoes-usuario {
    flex-direction: column;
    gap: 10px;
  }

  .permissoes-usuario .form-check {
    display: flex;
    align-items: center;
  }
}


/* 🔒 Evita ícone de imagem quebrada */
img:not([src]),
img[src=""] {
  display: none !important;
}


/* Usuário bloqueado — destaque visual */
.btn-bloqueado {
  background-color: #fd7e14 !important; /* laranja */
  border-color: #fd7e14 !important;
  color: #000 !important;
  font-weight: 600;
}

.btn-bloqueado:hover {
  background-color: #e36b0a !important;
  border-color: #e36b0a !important;
}


/* BOTÃO INSTALAR PWA */
#btn-instalar {
  white-space: nowrap;

  background: transparent !important;
  color: #ffffff !important;
  border: 1.5px solid #ffffff !important;

  font-weight: 600;
  border-radius: 6px;
}

/* Hover */
#btn-instalar:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

/* Mobile: botão menor */
@media (max-width: 768px) {
  #btn-instalar {
    font-size: 12px;
    padding: 4px 8px;
  }
}

/* Garante que o botão não encolha na topbar */
#btn-instalar {
  flex-shrink: 0;
}



/* Logo na tela de login */
.login-logo {
  max-width: 220px;
  width: 100%;
  height: auto;
}

/* Mobile */
@media (max-width: 576px) {
  .login-logo {
    max-width: 180px;
  }
}


.admin-preview-bar {
  background: #ffc107; /* amarelo para NÃO confundir com topbar */
  color: #1f2937;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;

  display: flex;
  justify-content: space-between;
  align-items: center;

  border-radius: 8px;
  margin-right: 12px;
}

.admin-preview-back {
  color: #1f2937;
  font-weight: 600;
  text-decoration: none;
}

.admin-preview-back:hover {
  text-decoration: underline;
}




/* ===============================
   BOTÕES MOVER ÁREAS (PADRÃO)
   =============================== */

.btn-mover-area {
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
}


.btn-mover-area {
  font-size: 22px;
  font-weight: 700;
  width: 44px;
  height: 38px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* seta de voltar */
.btn-mover-voltar {
  transform: rotate(180deg);
}


/* ==============================
   FOOTER SUPORTE — LOGIN
============================== */
/* ==============================
   FOOTER SUPORTE — LOGIN
============================== */
.footer-suporte {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;

  background: rgba(13, 27, 74, 0.9);
  color: #ffffff !important;

  padding: 8px 10px;
  font-size: 12px;
  text-align: center;

  z-index: 10;
}

/* força branco em tudo */
.footer-suporte *,
.footer-suporte small,
.footer-suporte span,
.footer-suporte a {
  color: #ffffff !important;
}

.footer-suporte a {
  text-decoration: none;
  font-weight: 500;
}

.footer-suporte a:hover {
  text-decoration: underline;
}


/* =========================================================
   BOTÃO VERDE PADRÃO CHRONOS (IGUAL AO FILTRAR)
   ========================================================= */

.btn-success-chronos {
  background-color: #4f805d !important;
  border-color: #4f805d !important;
  color: #ffffff !important;
}

.btn-success-chronos:hover {
  background-color: #3f6b4c !important;
  border-color: #3f6b4c !important;
  color: #ffffff !important;
}

.btn-success-chronos:focus,
.btn-success-chronos:active {
  background-color: #3f6b4c !important;
  border-color: #3f6b4c !important;
  box-shadow: none !important;
  color: #ffffff !important;
}



/* =====================================
   v0.13.8 — FAROL DE ACESSOS (GESTOR)
   Corrige vazamento no mobile
   ===================================== */


.gestor-logins-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 380px);
  border-radius: 10px;
}

/* tabela larga → scroll interno */
.gestor-logins-scroll .grid-scroll-table {
  min-width: 900px;
  white-space: nowrap;
}

/* MOBILE */
@media (max-width: 768px) {

  body {
    overflow-x: hidden !important;
  }

  .gestor-logins-scroll {
    max-height: calc(100vh - 330px);
    -webkit-overflow-scrolling: touch;
  }

}


/* =========================================
   MODAL FAROL (ADMIN)
   ========================================= */
   
.modal-farol-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
}

.modal-farol-content {
  background: #fff;
  width: 95%;
  height: 95%;
  margin: auto;
  margin-top: 2%;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}

.modal-farol-header {
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-farol-body {
  padding: 16px;
  overflow: auto;
  flex: 1;
}



/* ===========================
   💬 TOOLTIP FAROL DE ACESSOS
=========================== */

.farol-help {
  position: relative;
}

.farol-help-icon {
  cursor: pointer;
  font-size: 16px;
  opacity: 0.8;
}

.farol-help-icon:hover {
  opacity: 1;
}

.farol-tooltip {
  display: none;
  position: absolute;
  top: 28px;
  right: 0;
  background: #ffffff;
  color: #333;
  padding: 14px 16px;
  border-radius: 10px;
  width: 340px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  z-index: 9999;
  font-size: 13px;
}

.farol-tooltip ul {
  padding-left: 16px;
  margin: 8px 0;
}

.farol-tooltip li {
  margin-bottom: 4px;
}

.farol-help:hover .farol-tooltip {
  display: block;
}

/* ===========================
   AJUSTE LEGIBILIDADE TOOLTIP FAROL (FIX FINAL)
=========================== */

.farol-legenda {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.farol-legenda li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.farol-legenda li .badge {
  white-space: nowrap;
  flex-shrink: 0;
}

.farol-legenda li .farol-texto {
  white-space: nowrap;
}


/* Mobile: permite quebra de linha */

@media (max-width: 768px) {
  .farol-tooltip {
    width: 280px;
  }

  .farol-legenda li .farol-texto {
    white-space: normal; /* mobile pode quebrar */
  }
}




/* =========================================
   BREADCRUMB — CONTROLE RESPONSIVO CORRETO
   ========================================= */

/* Mobile */
@media (max-width: 768px) {
  .breadcrumb {
    display: none !important;
  }
}

/* Tablets (ex: iPad, iPad Air, 9–11") */
@media (min-width: 769px) and (max-width: 1024px) {
  .breadcrumb {
    display: none !important;
  }
}




/* ==============================
   SIDEBAR RETRÁTIL — USUÁRIO
============================== */



.portal-layout.sidebar-retrai .usuario-sidebar {
  width: 70px;
}

.portal-layout.sidebar-retrai .usuario-sidebar img {
  max-width: 42px;
}

/* AJUSTE DO CONTEÚDO QUANDO RETRAI */
.usuario-sidebar {
  width: 240px;
  transition: width 0.25s ease;
}

.portal-main {
  margin-left: 240px;
  transition: margin-left 0.25s ease;
}

.portal-layout.sidebar-retrai .portal-main {
  margin-left: 70px;
}


/* Ícones centralizados */
.portal-layout.sidebar-retrai .usuario-menu-list a,
.portal-layout.sidebar-retrai .usuario-logout-wrapper a {
  justify-content: center;
}


/* BOTÃO ☰ NA SIDEBAR */
.sidebar-toggle-btn {
  font-size: 22px;
  color: #fff;
  cursor: pointer;
  margin-bottom: 10px;
  user-select: none;
}

.portal-layout.sidebar-retrai .sidebar-toggle-btn {
  text-align: center;
}


/* ============================
   SIDEBAR RETRÁTIL — USUÁRIO
============================ */

.portal-layout.sidebar-retrai .usuario-menu-list a,
.portal-layout.sidebar-retrai .usuario-logout-wrapper a {
  justify-content: center;
  font-size: 26px;
  padding: 14px 0;
}

/* Ajuste de espaçamento */
.portal-layout.sidebar-retrai .usuario-menu-list a {
  padding: 12px 0;
}


.usuario-menu-list a {
  display: flex;
  align-items: center;
  gap: 10px;
}


/* ===== MENU FECHADO: SÓ EMOJI ===== */
.portal-layout.sidebar-retrai .usuario-menu-list a,
.portal-layout.sidebar-retrai .usuario-logout-wrapper a {
  font-size: 26px;           /* emoji grande */
  justify-content: center;
  text-align: center;
}

/* esconde texto deixando só o primeiro caractere (emoji) */
.portal-layout.sidebar-retrai .usuario-menu-list a::after,
.portal-layout.sidebar-retrai .usuario-logout-wrapper a::after {
  content: "";
}

/* truque: limita largura e corta texto */
.portal-layout.sidebar-retrai .usuario-menu-list a,
.portal-layout.sidebar-retrai .usuario-logout-wrapper a {
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
}


/* BASE */
.usuario-sidebar {
  width: 240px;
  transition: width 0.25s ease;
}

.portal-main {
  margin-left: 240px;
  transition: margin-left 0.25s ease;
}

/* SIDEBAR FECHADA */
.portal-layout.sidebar-retrai .usuario-sidebar {
  width: 70px;
}

.portal-layout.sidebar-retrai .portal-main {
  margin-left: 70px;
}


/* ==============================
   SIDEBAR RETRÁTIL — TEXTO SOME
============================== */

.portal-layout.sidebar-retrai .usuario-menu-list a,
.portal-layout.sidebar-retrai .usuario-logout-wrapper a {
  font-size: 26px;
  justify-content: center;
  text-align: center;

  /* corta o texto */
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  max-width: 70px;
}


/* ==============================
   TOPBAR — ACOMPANHA SIDEBAR
============================== */

.topbar-portal-global {
  position: fixed !important;
  top: 0;
  left: 240px !important;
  right: 0;
  transition: left 0.25s ease;
  z-index: 3000;
}

/* quando sidebar fechada */
.portal-layout.sidebar-retrai .topbar-portal-global {
  left: 70px !important;
}


/* ===== MENU NORMAL ===== */
.usuario-menu-list a,
.usuario-logout-wrapper a {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== ÍCONE ===== */
.menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  font-size: 18px;
}

/* ===== TEXTO ===== */
.menu-text {
  white-space: nowrap;
}

/* ===== MENU RETRAÍDO ===== */
.portal-layout.sidebar-retrai .menu-text {
  display: none !important;
}

/* força o emoji a aparecer */
.portal-layout.sidebar-retrai .menu-icon {
  display: flex !important;
  font-size: 26px;
}

/* centraliza o link sem cortar o emoji */
.portal-layout.sidebar-retrai .usuario-menu-list a,
.portal-layout.sidebar-retrai .usuario-logout-wrapper a {
  justify-content: center;
  padding: 14px 0;
  overflow: visible;     /* 👈 ESSENCIAL */
}

.usuario-sidebar {
  width: 240px;
  transition: width 0.25s ease;
}

.portal-layout.sidebar-retrai .usuario-sidebar {
  width: 70px;
}


/* ==============================
   SIDEBAR RETRAÍDA — AJUSTE FINAL
============================== */

/* largura da sidebar */
.portal-layout.sidebar-retrai .usuario-sidebar {
  width: 72px;
}

/* esconde nome da empresa */
.portal-layout.sidebar-retrai .usuario-sidebar h4 {
  display: none !important;
}

/* mantém logo visível e centralizada */
.portal-layout.sidebar-retrai .usuario-sidebar-header img {
  max-width: 42px;
  margin: 0 auto;
  display: block;
}

/* ===== MENU ===== */
.portal-layout.sidebar-retrai .menu-text {
  display: none !important;
}

/* ícone (emoji) */
.portal-layout.sidebar-retrai .menu-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  font-size: 26px !important;
  line-height: 1;
  opacity: 1;
  visibility: visible;
}

/* links centralizados */
.portal-layout.sidebar-retrai .usuario-menu-list a,
.portal-layout.sidebar-retrai .usuario-logout-wrapper a {
  justify-content: center;
  padding: 14px 0;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* remove fundo/sombra estranha do sair */
.portal-layout.sidebar-retrai .usuario-logout-wrapper {
  background: transparent !important;
  box-shadow: none !important;
}

/* espaçamento vertical */
.portal-layout.sidebar-retrai .usuario-menu-list li,
.portal-layout.sidebar-retrai .usuario-logout-wrapper {
  margin: 10px 0;
}

/* ===== TOPBAR acompanha ===== */
.topbar-portal-global {
  left: 240px;
  transition: left 0.25s ease;
}

.portal-layout.sidebar-retrai .topbar-portal-global {
  left: 72px;
}


/* ==============================
   BLOQUEIA ANIMAÇÃO NO LOAD
============================== */
.portal-layout.no-transition *,
.portal-layout.no-transition {
  transition: none !important;
}



/* ==============================
   SIDEBAR HEADER — HORIZONTAL
============================== */

.usuario-sidebar-header {
  display: flex;
  align-items: center;

  padding: 52px 24px 16px; /* 👈 espaço extra no topo pro ☰ */
  gap: 12px;
}


/* ☰ fica acima, alinhado à esquerda */
.usuario-sidebar-header .sidebar-toggle-btn {
  position: absolute;
  top: 12px;
  left: 24px;

  font-size: 22px;
  cursor: pointer;
  color: #fff;
}

/* logo ocupa a coluna do ícone */
.usuario-sidebar-header img {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

/* nome ocupa a coluna do texto */
.usuario-sidebar-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #fff;

  /* 👇 CONTROLE DE TAMANHO */
  max-width: 160px;        /* ajuste fino se quiser */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ==============================
   SIDEBAR HEADER — MENU FECHADO
============================== */

.portal-layout.sidebar-retrai .usuario-sidebar-header {
  justify-content: center;

  /* 👇 RESERVA ESPAÇO PRO ☰ */
  padding: 52px 0 16px;
}


.portal-layout.sidebar-retrai .usuario-sidebar-header h4 {
  display: none;
}

.portal-layout.sidebar-retrai .usuario-sidebar-header img {
  width: 42px;
  height: 42px;
}

.portal-layout.sidebar-retrai .usuario-sidebar-header .sidebar-toggle-btn {
  left: 50%;
  transform: translateX(-50%);
}



/* ==============================
   MOBILE — SIDEBAR NÃO PARTICIPA
============================== */
@media (max-width: 768px) {

  /* sidebar sai do fluxo, mas layout continua flex */
  .usuario-sidebar {
    position: fixed !important;
    left: -100vw !important;
    top: 0;
    width: 240px;
    height: 100vh;
    display: block !important;
  }

  /* conteúdo ocupa tela inteira */
  .portal-main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* topbar ocupa 100% */
  .topbar-portal-global {
    left: 0 !important;
    width: 100% !important;
  }
}


.portal-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  margin-left: 0; /* 🔥 remove qualquer herança */
}


@media (max-width: 768px) {
  .topbar-portal-global {
    left: 0 !important;
    right: 0;
  }

  .portal-content-has-topbar {
    margin-top: 45px !important;
  }
}
