@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* 🔹 Estilo Global */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #0a192f;
  margin: 0;
  padding: 0;
  padding-top: 80px;
  text-align: center;
  color: #ffffff;
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

h1 {
  background: linear-gradient(90deg, #007BFF, #3866ff);
  color: rgb(73, 60, 253);
  margin: 0;
  padding: 20px;
  font-size: 1.7em;
  letter-spacing: 1px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  max-width: 100%;
  overflow-wrap: break-word;
}

/* 🔹 Links fixos (desktop) */
a#linkSala.desktop-link {
  position: fixed;
  top: 100px;
  left: 80px;
  color: #00aaff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.2em;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 12px;
  border-radius: 8px;
  transition: 0.3s ease;
  z-index: 1000;
}

a#linkSala.desktop-link::before {
  content: "Turma selecionada: ";
  color: #ffffff;
  font-weight: 500;
  margin-right: 4px;
}

a#linkSala.desktop-link:hover {
  background: rgba(0, 0, 0, 0.35);
  transform: scale(1.05);
}

/* 🔹 Logo */
.logo {
  position: absolute;
  top: 15px;
  left: 50px;
  height: 50px;
  border-radius: 8px;
  z-index: 1001;
}

@media (max-width: 768px) {
  /* 🔹 Logo menor e bem posicionado */
  .logo,
  .header-logo img {
    height: 45px;
    width: 45px;
    top: 10px;
    left: 10px;
  }

  /* 🔹 Cabeçalho mais limpo e centralizado */
  .top-header {
    padding: 10px 15px;
  }

  .header-content {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .header-title {
    font-size: 1.2em;
    text-align: center;
    margin: 0;
  }

  /* 🔹 Botão do menu mais visível */
  .menu-toggle {
    display: flex;
    position: fixed;
    top: 12px;
    right: 12px;
    width: 45px;
    height: 45px;
    background: #00aaff;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 26px;
    cursor: pointer;
    z-index: 1001;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
   
  }
  .menu-toggle {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-clip: padding-box !important;
  }
  button.menu-toggle {
    -webkit-tap-highlight-color: transparent !important; /* remove flash branco no mobile */
  }
  

  .menu-toggle:hover {
    background: #0080ff;
  }
}

/* 🔹 Cabeçalho fixo */
.top-header {
  background-color: rgba(30, 30, 30, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo img {
  height: 50px;
  width: 50px;
  border-radius: 50%;
}

.header-title {
  font-size: 1.5em;
  font-weight: bold;
  color: #00aaff;
  margin-left: 20px;
  flex-grow: 1;
}

.header-nav {
  display: flex;
  gap: 15px;
}

.header-nav a {
  display: inline-block;
  padding: 8px 12px;
  color: #00aaff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.header-nav a:hover {
  color: #ffffff;
}

/* 🔹 Remove fundo cinza e ajusta conteúdo */
#inicioTurma h2,
#inicioTurma,
body > h1,
body > div:first-of-type {
  background: none !important;
  box-shadow: none !important;
}

#inicioTurma {
  margin-top: 120px;
  position: relative;
}

/* 🔹 Menu Mobile (somente celular) */
.menu-toggle,
.nav-menu {
  display: none;
}

@media (max-width: 768px) {
  /* 🔸 Botão hambúrguer */
  .menu-toggle {
    display: flex;
    position: fixed;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: #333;
    color: rgb(255, 255, 255);
    border: none;
    border-radius: 8px;
    font-size: 28px;
    cursor: pointer;
    z-index: 1001;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.265);
  }

  /* 🔸 Menu lateral */
  .nav-menu {
    display: flex;
    position: fixed;
    top: 0%; /* desce um pouco */
    right: -100%;
    width: 280px;
    height: 70vh; /* ocupa 70% da altura da tela */
    background-color: #14273f;
    flex-direction: column;
    padding: 120px 0px 25px;
    border-radius: 16px 0 0 16px; /* cantos arredondados */
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.4);
    transition: right 0.3s ease;
    z-index: 1002;
    overflow-y: auto;
  }
  
  .nav-menu.active {
    right: 0; /* abre da direita */
  }
  

  .nav-menu.active {
    right: 0;
  }

  .nav-menu li {
    list-style: none;
    margin: 10px 0;
  }
  .nav-menu li a {
    color: #ffffff;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    background: #0a192f; /* azul escuro */
    display: block;
    transition: all 0.3s ease;
    border: none;          /* remove borda */
    outline: none;         /* remove contorno de foco */
    box-shadow: none !important;  /* remove sombra interna/branca */
  }
  
  .nav-menu li a:hover {
    background: rgba(18, 1, 110, 0.15);
  }


  /* 🔸 Esconde o link de desktop */
  .desktop-link {
    display: none;
  }
  /* 🔹 Mostra a turma no mobile */
#linkSala.desktop-link {
  display: block !important;
  position: fixed;
  top: 85px; 
  right: 15px;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 1rem;
  color: #ffffff;
  z-index: 2000;
}

/* Antes mostrava "Turma selecionada:", agora deixei mais simples */
/* Se quiser remover isso, me avise */
#linkSala.desktop-link::before {
  content: "Turma: ";
}


  /* 🔸 Esconde navegação principal no mobile */
  .header-nav {
    display: none;
  }

  /* 🔸 Ajusta header */
  .header-content {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .header-title {
    margin-left: 0;
    text-align: center;
  }
    /* 🔹 Ajuste da tabela e botão no modo mobile */
    #tabelaHistorico {
      width: 100%;
      border-collapse: collapse;
      text-align: center;
    }
  
    #tabelaHistorico th,
    #tabelaHistorico td {
      text-align: center;
      vertical-align: middle;
      padding: 8px;
      font-size: 0.9em; /* texto um pouco menor para caber */
    }
  
    /* 🔹 Faz as colunas terem largura igual */
    #tabelaHistorico th,
    #tabelaHistorico td {
      width: 25%;
    }
  
    /* 🔹 Centraliza o botão “Baixar histórico em Excel” */
    #btnBaixarHistorico {
      display: block;
      margin: 12px auto;
      width: 90%;              /* botão ocupa quase toda a largura */
      text-align: center;
      font-size: 0.95em;
    }
  
}

/* 🔹 Formulários */
form {
  margin: 20px auto;
  padding: 15px;
  background: #ffffff;
  color: #333;
  border-radius: 12px;
  width: 95%;
  max-width: 600px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

input {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1em;
}

input:focus {
  outline: none;
  border-color: #007BFF;
  box-shadow: 0 0 5px #007BFF;
}

button {
  background: linear-gradient(90deg, #007BFF, #6c757d);
  color: white;
  font-weight: bold;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 10px;
  transition: 0.3s;
}

button:hover {
  background: linear-gradient(90deg, #0056b3, #5a6268);
  transform: scale(1.03);
}

/* 🔹 Outros elementos */
#painel {
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  color: #333;
  border-radius: 12px;
  width: 95%;
  max-width: 600px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

li {
  margin: 5px;
  padding: 10px;
  border-radius: 6px;
  border-left: 5px solid #062a50;
}

.timer {
  font-size: 3em;
  font-weight: bold;
  background: linear-gradient(90deg, #007BFF, #6c757d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 20px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th, td {
  border: 1px solid #ccc;
  padding: 8px;
}

th {
  background: linear-gradient(90deg, #007BFF, #6c757d);
  color: white;
}

.demorado {
  color: red;
  font-weight: bold;
  background-color: #ffe6e6 !important;
}

#alerta {
  width: 100%;
  color: red;
  font-weight: bold;
  text-align: center;
  margin-top: 8px;
  display: none;
}

.header-nav {
  padding-right: 25px;
}

.header-nav a {
  display: inline-block;
  padding: 8px 14px;
  margin-right: 5px;
  color: #00aaff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.header-nav a:hover {
  color: #ffffff;
}

/* 🔹 Ajuste para o formulário de nome (Fila do Banheiro) */
#formFila {
  display: flex;
  flex-direction: column; /* empilha o título, input e botão */
  align-items: center;    /* centraliza no meio */
  justify-content: center;
  gap: 10px;              /* espaço entre os elementos */
}

#formFila h2 {
  color: #00aaff;
  margin: 0;
  text-align: center;
}
.nav-menu li a,
.nav-menu li button {
  background-color: #0a192f !important; /* azul escuro sólido */
  color: #ffffff !important; /* texto branco */
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  padding: 12px 20px !important;
  border-radius: 8px !important;
  display: block !important;
}

/* 🔹 Garante que o hover não traga de volta a borda */
.nav-menu li a:hover,
.nav-menu li button:hover {
  background-color: #102b4e !important; /* azul um pouco mais claro */
  box-shadow: none !important;
  border: none !important;
}

/* 🔹 Remove contorno de foco no clique */
.nav-menu li a:focus,
.nav-menu li button:focus {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}
/* MOBILE — substituir "Turma selecionada" por "Turma" */
@media (max-width: 768px) {
  #linkSala::before {
    content: "Turma:" !important;
  }
}
.menu-toggle {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background-clip: padding-box !important;
}
button.menu-toggle {
  -webkit-tap-highlight-color: transparent !important; /* remove flash branco no mobile */
}
.menu-toggle {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: none !important;
  -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
  -webkit-focus-ring-color: rgba(0,0,0,0) !important;
}
.menu-toggle:focus,
.menu-toggle:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}
