@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  display: flex;
  background: linear-gradient(to bottom, #0a0f1a, #0e172a);

  color: #f0f0f0;
}

#carregando {
  position: fixed;
  inset: 0;
  background-color: #212125;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.custom-loader {
  width: 50px;
  height: 50px;
  display: grid;
  animation: s4 2s infinite;
}

.custom-loader::before,
.custom-loader::after {
  content: "";
  grid-area: 1/1;
  border: 8px solid;
  border-radius: 50%;
  animation: s4 1s infinite linear;
}

.custom-loader::before {
  border-color: #00d9ff #00d9ff #00d9ff transparent;
  animation-delay: 0.15s;
}

.custom-loader::after {
  border-color: #E4E4ED transparent #E4E4ED #E4E4ED;
}

@keyframes s4 {
  100% {
    transform: rotate(1turn);
  }
}

#conteudo-principal {
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* Exibe o menu normalmente em telas grandes */

.menu-lateral {

  width: 280px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  height: 100vh;
  justify-content: space-between;


  display: flex;
  flex-direction: column;
  position: fixed;
  z-index: 100;
  overflow: hidden;
}

.logo img {
  display: block;
  height: 120px;
  width: 260px;
  margin: 20px auto 10px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
}

.menu-scrollable {
  flex: 1;
  overflow-y: auto;
  padding-right: 5px;
  padding-left: 20px;
}

.menu-scrollable::-webkit-scrollbar {
  width: 6px;
}

.menu-scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.menu-scrollable::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}



.menu-links {
  display: flex;
  flex-direction: column;
  margin-left: 15px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
 
}

.menu-links a {
  color: #fff;
  text-decoration: none;
  padding: 11px 10px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  transition: 0.3s;
  font-size: 17px;
  gap: 15px;
  margin-right: 12px;

}

.menu-links a:hover,
.menu-links a.ativo {
  background-color: rgba(255, 255, 255, 0.1);
  color: #00d9ff;
  transform: scale(1.05);
}

/* Lateral - imagem do bot */
.menu-bot-selector {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(355deg, rgba(2, 0, 36, 1) 0%, rgba(0, 212, 255, 1) 100%);
  color: #fff;
  padding: 10px 15px;
  border-radius: 20px;
  margin: 10px;
}

.menu-bot-selector h3 {
  overflow: hidden;
}

.menu-bot-selector img {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 65px;
  height: 65px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.menu-bot-selector img:hover {
  transform: scale(1.05);
}

/* Modal */
.modal-bot {
  position: fixed;
  inset: 0;
  display: none;
  /* seu JS troca para "flex" ao abrir */
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgb(0 0 0 / 70%);
  backdrop-filter: blur(2px);
  z-index: 9999;
}

/* Card do modal */
.modal-conteudo {
  width: min(450px, 92vw);
  max-height: 82vh;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  color: #eaeaea;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Cabeçalho */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

/* Botão fechar (usa o mesmo id do seu JS) */
.modal-fechar {
  inline-size: 36px;
  block-size: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: transform .15s ease, background .15s ease;
}

.modal-fechar:hover {
  transform: translateY(-1px);
  background: #c62828;
}

/* Corpo com rolagem */
.modal-body {
  padding: 14px 12px;
  overflow: auto;
  /* lista grande não estoura o modal */
}

/* Lista de bots (mantém .lista-bots e #listaBots) */
.lista-bots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.lista-bots li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .05);
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.lista-bots li::before {
  content: "🤖";
  font-size: 18px;
}

.lista-bots li:hover {
  background: rgba(0, 217, 255, .12);
  border-color: rgba(0, 217, 255, .45);
  transform: translateY(-1px);
}

/* Scrollbar suave (opcional) */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .25);
  border-radius: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

/* Responsivo — em mobile vira tela cheia */
@media (max-width: 520px) {
  .modal-conteudo {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }

  .modal-header {
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(2px);
  }
}


.logout {
  display: flex;
  flex-direction: column;

  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);

  height: 150px;
  border-radius: 10px 10px 0px 0px;

}

.email {

  flex-direction: column;
  align-content: center;
  margin-left: 10px;
  margin-top: 15px;
  font-size: 14px;

}

.sair {
  margin-top: 15px;
  display: flex;
  justify-content: flex-end;
  margin-right: 25px;
}


.perfil-container {
  display: flex;
  align-items: center;
  gap: 5px;
}

.perfil-container img {

  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  margin-top: 4px;
}

.perfil-container .info {
  font-size: 12px;
  line-height: 1.4;

}

.Btn-log {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition-duration: .3s;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.199);
  background-color: rgb(255, 65, 65);
}

/* plus sign */
.sign {
  width: 100%;
  transition-duration: .3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sign svg {
  width: 17px;
}

.sign svg path {
  fill: white;
}

/* text */
.text {
  position: absolute;
  right: 0%;
  width: 0%;
  opacity: 0;
  color: white;
  font-size: 1.2em;
  font-weight: 600;
  transition-duration: .3s;
}

/* hover effect on button width */
.Btn-log:hover {
  width: 125px;
  border-radius: 40px;
  transition-duration: .3s;
}

.Btn-log:hover .sign {
  width: 30%;
  transition-duration: .3s;
  padding-left: 20px;
}

/* hover effect button's text */
.Btn-log:hover .text {
  opacity: 1;
  width: 70%;
  transition-duration: .3s;
  padding-right: 10px;
}

/* button click effect*/
.Btn-log:active {
  transform: translate(2px, 2px);
}

.notificacao {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 12px 24px;
  background-color: #2e7d32;
  /* verde */
  color: white;
  font-weight: bold;
  text-align: center;
  z-index: 9999;
  display: none;
}

.notificacao.erro {
  background-color: #c62828;
  /* vermelho */
}

.notificacao.visivel {
  display: block;
}










.menu-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  font-size: 26px;
  z-index: 1001;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  display: none;
  /* mostra só no mobile */
}

@media (max-width: 768px) {

  /* Mostrar botão do menu só no mobile */
  .menu-toggle {
    display: block;
  }

  /* Ocultar menu lateral por padrão */
  .menu-lateral {
    position: fixed;
    top: 0;
    left: -100%;
    width: 240px;
    height: 100vh;
    background-color: #1a1a1a;
    z-index: 999;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding-top: 80px;
  }

  /* Quando ativo, o menu aparece */
  .menu-lateral.ativo {
    left: 0;
  }

  /* Reduzir espaço da logo */
  .logo img {
    width: 200px;
    height: auto;
    margin: 10px auto;
  }

  .menu-bot-selector {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .menu-bot-selector img {
    width: 55px;
    height: 55px;
  }

  .menu-links a {
    font-size: 15px;
    padding: 10px;
  }

  .modal-conteudo {
    width: 90%;
    padding: 20px;
  }

  .logout {
    height: auto;
    padding: 15px;
    margin-top: 20px;
  }

  .Btn-log {
    margin: 0 auto;
  }

  #conteudo-principal {
    margin-left: 0 !important;
    padding: 20px 10px;
  }


  main {
    padding-left: 0 !important;
  }

  /* Corrigir botão toggle */
  #toggle-menu {
    display: block;
    z-index: 1001;
  }
}


/* Esconde totalmente o menu e o botão hamburger nas telas públicas (login/registro) */
body.ocultar-menu .menu-lateral { 
  display: none !important; 
}
body.ocultar-menu .menu-toggle { 
  display: none !important; 
}

/* Garante que o conteúdo ocupe 100% quando o menu estiver oculto */
body.ocultar-menu main,
body.ocultar-menu #conteudo-principal {
  margin-left: 0 !important;
}

/* Segurança extra no mobile: mesmo que tenha ficado .ativo, some */
body.ocultar-menu .menu-lateral.ativo {
  left: -100% !important;
}
