/* Reset e estilo base */
body {
  margin: 0;
  font-family: Verdana, Arial, sans-serif;
  height: 100vh;
  overflow: hidden;
}

/* Mapa ocupa a área entre navbar e footer */
#map {
  position: absolute;
  top: 40px;
  bottom: 20px;
  width: 100%;
}
/* modal - CSS para alinhar os botões */
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .modal-controls {
    display: flex;
    align-items: center;
  }
  .modal-controls button {
    padding: 0.25rem 0.5rem;
    line-height: 1;
  }
  .modal-medium {
	max-width: 95vw !important;
    max-height: 82vw !important;
    width: 95vw !important;
    height: 80vh !important;
  }
  .modal-maximized {
    max-width: 95vw !important;
   /* max-height: 82vw !important;*/
    width: 95vw !important;
    height: 80% !important;
     margin: 1rem auto !important;
  }
.modal-header {
  user-select: none;          /* Padrão moderno */
  -webkit-user-select: none;  /* Safari antigo */
  -moz-user-select: none;     /* Firefox antigo */
  cursor: grab;               /* Mostra a “mãozinha” indicando arrastar */
}
/* Estilo para a camada de sobreposição */
	.overlay {
		overflow: hidden;
		position: fixed; /* Fixa a camada na tela */
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background-color: rgba(0, 0, 0, 0.2); /* Fundo semi-transparente */
		backdrop-filter: blur(5px); /* Aplica o desfoque ao fundo */
		z-index: 2000; /* Garante que a camada fique acima de todo o conteúdo */
		pointer-events: auto; /* Bloqueia todos os eventos do mouse */
		user-select: none; /* Impede a seleção de texto */
		-webkit-user-select: none; /* Para compatibilidade com navegadores baseados em WebKit */
		-moz-user-select: none; /* Para compatibilidade com Firefox */
		-ms-user-select: none; /* Para compatibilidade com Internet Explorer/Edge */
	}
/* Estilo para o fundo do informativo de carregamento */
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            z-index: 2000;
            pointer-events: auto;
			display = 'flex';
        }

        /* Estilo para o spinner animado */
        .loading-spinner {
            border: 4px solid rgba(255, 255, 255, 0.3);
            border-top: 4px solid #ffffff;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
        }

        /* Texto do informativo */
        .loading-overlay p {
            color: white;
            margin-top: 10px;
            font-size: 18px;
        }

        /* Animação do spinner */
        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }
/* Estilo para o conteúdo desfocado */
body.blur-background {
    overflow: hidden; /* Impede a rolagem da página */
}
#alert-container {
	z-index: 2002;
	 position: absolute;
}
        /* Centralizar a modal */
        #loginModal {
			z-index: 2001;
			width: 100%;
			overflow: hidden;
           
        } /* Centralizar a modal */
        #loginModal .modal-dialog {
			
            display: flex;
            align-items: center;
            min-height: calc(100% - 1rem);
        }

        #loginModal .modal-content {
            margin: auto;
        }
.navbar {
  background: linear-gradient(to right, rgba(51,51,51,0.8), rgba(51,51,51,0.5));
  z-index: 1000;
  height: 40px;
  display: flex;
  align-items: center;
  margin-left: 0;
}
.ui-autocomplete {
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
}
.dropdown-menu {
	z-index: 1000;
}

.footer {
  background: linear-gradient(to right, rgba(51,51,51,0.8), rgba(51,51,51,0.5));
  z-index: 1000;
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 20px;
}

/* Botão do sidebarToggle e espaçamento do input */
#sidebarToggle {
  width: 24px;
  height: 24px;
  padding: 0px;
  margin-left: 0;
  font-size: 16px;
}
.navbar input#searchInput {
	font-size: 16px;
	max-width: 300px; 
	max-height: 30px;
	margin-left: 10px;
}

/* Sidebar lateral (abas) */
.sidebar {
  position: fixed;
  top: 40px;
  left: -40px; /* Oculto por padrão */
  width: 40px;
  height: calc(100vh - 60px); /* desconta navbar (40px) e footer (20px) */
  background: rgba(51,51,51,1);
  z-index: 1000;
  box-shadow: 18px 0 18px rgba(0,0,0,0.1);
  transition: left 0.9s ease;
}
.sidebar.active {
  left: 0;
}

/* Painel lateral de conteúdo (menu) */
.sidebar_menu {
  position: fixed;
  top: 50px;
  left: -300px; /* Oculto por padrão */
  width: 300px;
  height: calc(100vh - 80px);
  background: rgba(51,51,51,0.8);
  z-index: 1000;
  box-shadow: 5px 0 5px rgba(0,0,0,0.1);
  transition: left 0.5s ease;
}
.sidebar_menu.active {
  left: 55px;
}

/* Cabeçalho do painel lateral com título e botão fechar */
.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background: rgba(0,0,0,0.2);
  color: #fff;
}
.menu-header h1 {
  font-size: 1.2em;
  margin: 0;
}
.menu-close {
  cursor: pointer;
}

/* Conteúdo do painel lateral */
.menu-content {
  padding: 20px;
  color: #fff;
  overflow-y: auto;
  height: calc(100% - 50px);
}

/* Estilo das abas da sidebar */
.sidebar-tabs {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}
.sidebar-tabs ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-tabs li {
  margin: 10px 0;
}

.order-bottom {
  order: 999; /* Valor alto para garantir que fique por último */
}
.sidebar-tabs a {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 10px;
  text-align: center;
  cursor: pointer;
}
.sidebar-tabs a:hover,
.sidebar-tabs a.active {
  background: rgba(255,255,255,0.1);
}

/* Conteúdo oculto (referência para abas) */
.sidebar-pane {
  display: none;
}
.sidebar-pane p {
  margin: 0;
}

  /* Classe para marcar elementos que contêm conteúdo sensível */
  .SensivelData {
    transition: all 0.3s ease;
  }

/* Controles personalizados para o mapa */
.map-controls {
  position: absolute;
  right: 10px;
  top: 60px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.map-controls button {
  background: rgba(51,51,51,0.8);
  border: none;
  color: #fff;
  padding: 8px;
  cursor: pointer;
  font-size: 16px;
  border-radius: 4px;
}
.map-controls button:hover {
  background: rgba(51,51,51,1);
}
.card-custom {
            border-radius: 15px;
            margin-bottom: 15px;
        }

/* Classe base para o avatar */
.avatar {
  display: inline-flex;       /* Mantém o avatar em linha, mas com flex para centralizar conteúdo */
  align-items: center;        /* Centraliza verticalmente */
  justify-content: center;    /* Centraliza horizontalmente */
  border-radius: 50%;         /* Formato circular */
  overflow: hidden;           /* Garante que imagens maiores fiquem contidas */
  background-color: #ccc;     /* Cor de fundo caso use letras em vez de imagem */
  color: #fff;                /* Cor da fonte para as iniciais */
  font-weight: 600;
  text-transform: uppercase;  
  vertical-align: middle;     /* Alinha verticalmente com outros elementos de texto */
  text-align: center;         /* Centraliza texto (caso use iniciais) */
  font-family: sans-serif;    /* Ajuste para sua fonte preferida */
}

/* Caso use imagem dentro do avatar, esta classe garante que a imagem ocupe todo o espaço */
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;          /* Ajusta a imagem para cobrir todo o círculo sem distorcer */
}

/* Se quiser que a imagem tenha bordas arredondadas mesmo fora do .avatar */
.rounded-circle {
  border-radius: 50% !important;
}

/* Tamanhos dos Avatares */
.avatar-xxl {
  width: 100px;
  height: 100px;
  font-size: 24px;
}

.avatar-xl {
  width: 80px;
  height: 80px;
  font-size: 20px;
}

.avatar-lg {
  width: 60px;
  height: 60px;
  font-size: 16px;
}

.avatar-md {
  width: 48px;
  height: 48px;
  font-size: 14px;
}

.avatar {
  width: 40px;  /* Padrão, caso não use .avatar-md */
  height: 40px;
  font-size: 14px;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.avatar-xs {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

/* Exemplo de classe para avatares baseados em texto (iniciais) */
.avatar-title {
  display: inline-block;
  width: 100%;
  text-align: center;
  line-height: 1.2; /* Ajuste para verticalmente centralizar o texto */
}

/* Layout responsivo para dispositivos móveis */
@media (max-width: 768px) {
  /* Input de pesquisa com largura menor */
  .navbar input#searchInput {
	font-size: 16px;
	max-height: 28px;
    max-width: 180px;
  }
  /* Reduz tamanho da sidebar e painel lateral */
  .sidebar {
    width: 40px;
  }
  .sidebar_menu {
    width: 250px;
  }
  .sidebar_menu.active {
    left: 40px;
  }
  /* Ajuste dos botões dos controles do mapa */
  .map-controls button {
    padding: 6px;
    font-size: 14px;
  }
  
  .navbar-brand {
	  display:  none;
  }
  #navbarDropdownDados {
	  display:  none;
  }
  #navbarDropdownConta span {
	    display:  none;
  }
}
.badge-relacao {
  position: absolute;
  top: -10px;
  right: -6%;             /* deixa 10% de margem para não encostar no canto */
  /*max-width: 10%;          ocupa no máximo 10% da largura do card */
  white-space: nowrap;    /* impede quebra de linha */
  /*overflow: hidden;        esconde o excesso de texto */
  /*text-overflow: ellipsis; adiciona "..." se passar do limite */
  font-size: 0.75rem;     /* deixa o texto menor para caber melhor */
}
.card-add-ocupante {
  border: 3px dashed #28a745;
  cursor: pointer;
  transition: all 0.3s ease;
}
.card-add-ocupante:hover {
  background: #f8fff8;
}

 /* Botão flutuante (FAB) */
  #fabAdd {
    position: fixed;
    right: 50px;
    bottom: calc(80px + env(safe-area-inset-bottom, 0));
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    outline: none;
    background: #0d6efd;              /* azul Bootstrap */
    color: #fff;
    box-shadow: 0 10px 25px rgba(13,110,253,.35), 0 6px 10px rgba(0,0,0,.12);
    display: grid;
    place-items: center;
    z-index: 1055;                     /* acima de quase tudo */
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    animation: fabFloat 2.8s ease-in-out infinite;
  }
  #fabAdd i { font-size: 20px; line-height: 1; }

  #fabAdd:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 14px 30px rgba(13,110,253,.45), 0 8px 14px rgba(0,0,0,.16);
  }
  #fabAdd:active { transform: translateY(0) scale(.98); }

  /* micro-onda ao aparecer */
  @keyframes fabFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
  }

  /* respeita usuários que preferem menos animação */
  @media (prefers-reduced-motion: reduce) {
    #fabAdd { animation: none; transition: none; }
  }

  /* estado “carregando” */
  #fabAdd[disabled] {
    opacity: .8;
    cursor: not-allowed;
  }
  #fabAdd[disabled] i { display: none; }
  #fabAdd[disabled]::after{
    content: "";
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }