/* =================== 1. ESTILOS GERAIS E DA PÁGINA PRINCIPAL =================== */

/* Estilos que se aplicam a TODAS as páginas */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100%;
}

html {
  margin: 0;
  padding: 0;
  width: 100%;
}

.pagina-principal {
  min-height: 100vh;
  background-image: url("../imagens/imagem.fundo.conecte-se.png");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}

/* --- BARRA 1: Faixa Superior (com o logo) --- */
.top-bar {
  background-color: #53068f;
  padding: 6px 30px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.container-logo {
  justify-self: start;
}

.top-bar img {
  width: 150px;
  height: auto;
  display: block;
}

/* Título centralizado de verdade */
.titulo-topo {
  justify-self: center;
  text-align: center;
  color: #fff;
  font-size: 30px;
  font-weight: 600;
  margin: 0;
}

/* Espaço "fantasma" para equilibrar o centro */
.topbar-spacer {
  width: 150px;
}

/* --- BARRA 2: Faixa de Navegação Principal --- */
.main-nav {
  background-color: #6c07b0;
  text-align: center;
  padding: 8px 0;
}

.main-nav a,
.dropdown-btn {
  display: inline-block;
  color: white;
  text-decoration: none;
  font-size: 13px;
  margin: 0 10px;
  padding: 10px 10px;
  border-radius: 6px;
  transition: transform .18s ease, background-color .18s ease;
  will-change: transform;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.main-nav a:hover,
.dropdown:hover .dropdown-btn {
  background-color: #331c72;
  transform: translateY(-2px);
  font-weight: 600;
}

/* --- ESTILOS DO DROPDOWN --- */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-family: Arial, sans-serif;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #ffffff;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  text-align: left;
  border-radius: 5px;
}

.dropdown-content a {
  color: rgb(54, 54, 54);
  padding: 12px 16px;
  display: block;
  margin: 0;
  font-size: 11px;
  transition: transform .18s ease, background-color .18s ease;
}

.dropdown-content a:hover {
  background-color: #cf96fa;
  transform: translateY(-5px);
}

.dropdown.open .dropdown-content {
  display: block;
}

/* Seta menu "Operações" */
.dropdown-btn::after {
  content: "▾";
  font-size: 11px;
  margin-left: 6px;
  display: inline-block;
  transition: transform 0.25s ease;
}

.dropdown:hover .dropdown-btn::after {
  transform: rotate(180deg);
}

/* --- ESTILOS DO CONTEÚDO PRINCIPAL (Tag <main>) --- */
main {
  padding: 50px 20px;
  text-align: center;
}

main p {
  color: #333;
  font-size: 21px;
}

main a {
  color: #53068f;
  font-size: 21px;
}


/* =================================================================== */
/* =================== 2. ESTILOS DA PÁGINA DE LOGIN =================== */
/* =================================================================== */

/* Fundo exclusivo da página de login */
.pagina-login {
  min-height: 100vh;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0d001f;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66zm0-2l26-15V18L28 2 2 18v30L28 64z' fill='%23945ccc' fill-opacity='0.07'/%3E%3C/svg%3E");
  overflow: hidden;
}

.pagina-login .login {
  margin: 0;
  position: relative;
  z-index: 1;
}

/* A caixa roxa do formulário */
.login {
  background-color: #945ccc;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 450px;
  width: 100%;
  
}

/* O título "Login" dentro do formulário */
.login h1 {
  color: #ffffff;
  font-size: 30px;
  text-align: center;
  margin-top: 0;
  margin-bottom: 30px;
}

/* Campo de "E-mail" e "Senha" */
.input-group input {
  background-color: #7a4db3;
  margin-bottom: 25px;
  color: #ffffff;
  font-weight: bold;
  width: 100%;
  height: 35px;
  padding: 8px;
  border: 1px solid #b9bdba;
  border-radius: 6px;
  box-sizing: border-box;
}

/* Escrita de "E-mail" e "Senha" */
.input-group label {
  color: white;
  font-size: 13px;
}

.login button {
  display: block;
  padding: 16px;
  width: 190px;
  font-size: 16px;
  background: linear-gradient(135deg, #6a0dad, #8e44ad);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin: 10px auto;
  transition: all 0.3s ease;
}

.login button:hover {
  transform: translateY(-7px);
  box-shadow: 0 8px 18px rgba(255, 255, 255, 0.7);
}

.login button:active {
  transform: scale(0.90);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.7);
}

/* Campo Senha */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 42px;
}

/* OLHO SOLTO (sem caixa) */
.toggle-password {
  position: absolute;
  right: 12px;
  top: 30%;
  transform: translateY(-50%);
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  cursor: pointer;
  opacity: 0.9;
}

.toggle-password:hover {
  opacity: 1;
}

.icon-eye {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* padrão: senha escondida => mostrar olho fechado */
.eye-open {
  display: none;
}

.toggle-password.showing .eye-open {
  display: block;
}

.toggle-password.showing .eye-closed {
  display: none;
}

.toggle-password:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-50%) scale(1.03);
}

/* confirmação de senha */
.msg-erro {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #ffd1d1;
}

.input-error {
  border: 1px solid #ff6b6b !important;
  outline: none;
}

.input-ok {
  border: 1px solid #5dff9a !important;
  outline: none;
}

.btn-secundario {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  transition: 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

.btn-secundario:hover {
  color: white;
  text-decoration: underline;
}

.divisor {
  color: rgba(255, 255, 255, 0.6);
  line-height: 1;
}

.dropdown-container {
  position: relative;
  width: 100%;
}

.dropdown-header {
  background-color: #7a4db3;
  color: white;
  width: 100%;
  height: 35px;
  padding: 8px 35px 8px 8px;
  border: 1px solid #b9bdba;
  border-radius: 6px;
  box-sizing: border-box;
  cursor: pointer;
}

.dropdown-list {
  display: none;
  position: absolute;
  bottom: 100%;
  width: 100%;
  background-color: #7a4db3;
  border: 1px solid #b9bdba;
  border-radius: 6px;
  margin-top: 5px;
  max-height: 180px;
  overflow-y: auto;
  padding: 10px;
  z-index: 10;
}

.dropdown-list label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  color: white;
  font-size: 14px;
  margin: 0;
  padding: 6px 8px;
}

.dropdown-list input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

/* Seta no "Seletor Operações" */
.dropdown-header::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: white;
  pointer-events: none;
}

.selecionadas {
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.input-group select {
  background-color: #7a4db3;
  margin-bottom: 15px;
  color: #ffffff;
  width: 100%;
  height: 35px;
  padding: 8px;
  border: 1px solid #b9bdba;
  border-radius: 6px;
  box-sizing: border-box;
}

/* "Info de erro" - "Insira pelo menos uma operação" */
.erro-operacoes {
  background-color: #e23d3d;
  color: #fdfdfd;
  font-size: 12px;
  margin-top: 10px;
  padding: 2px 2px;
  border-radius: 2px;
  font-weight: 600;
  display: none;
}

.erro-operacoes::before {
  content: "⚠ ";
}

.botao-sair {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: white;
  color: #6a0dad;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: 0.3s ease;
}

.botao-sair:hover {
  background-color: #e6d6f7;
}

/* Texto descritivo da página de recuperação */
.descricao-recuperacao {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  text-align: center;
  margin-bottom: 20px;
}

/* Placeholder da página de recuperação */
#email::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Mensagem de retorno (sucesso/erro) */
.mensagem-recuperacao {
  color: white;
  font-size: 13px;
  text-align: center;
  margin-top: 15px;
}

/* Link voltar para o login */
.voltar-login {
  text-align: center;
  margin-top: 25px;
}

/* Link esqueci minha senha */
.esqueci-senha-link {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 8px 0 8px 20px;
  cursor: pointer;
  transition: 0.2s ease;
}

.esqueci-senha-link:hover {
  color: white;
  text-decoration: underline;
}

/* Lembrar de mim + Esqueci minha senha */
.lembrar-esqueci {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -15px;
  margin-bottom: 15px;
}

.lembrar-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  cursor: pointer;
}

.lembrar-label input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
  accent-color: #6a0dad;
}

/* Monitor grande — tela acima de 1440px */
@media (min-width: 1440px) {
  .login {
    max-width: 600px;
    padding: 50px;
  }

  .login h1 {
    font-size: 38px;
  }

  .input-group input {
    height: 45px;
    font-size: 15px;
  }

  .login button {
    width: 250px;
    font-size: 18px;
  }
}