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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: #fdf6e3 url('/static/usuarios/img/bg_home_1200.webp') repeat-y top center;
  background-size: cover;
  color: #3e3e3e;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

h1 {
  font-family: 'Caveat', cursive;
  font-size: 2.8rem;
  color: #1e6091;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  text-align: center;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.05);
  position: relative;
}

h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background-color: #1e6091;
  margin: 0.3rem auto 0;
  border-radius: 2px;
}

p.slogan {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: #5e5e5e;
  text-align: center;
  font-style: italic;
}

.cadastro-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 900px;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(1px);
  border-left: 5px solid #8ecae6;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
  margin: 20px;
}

.cadastro-image {
  width: 100%;
  background-color: #e6f2fb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  max-width: 100%; /* Garante que a imagem ocupe todo o topo */
}
.cadastro-image img {
  width: 100%; /* Faz a imagem ocupar toda a largura */
  max-width: 400px; /* Tamanho máximo da imagem */
  height: auto;
  border-radius: 8px;
}

.cadastro-form form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.bloco-inicial,
.bloco-usuario,
.bloco-empresa {
  background: #f9f9f9;
  border-left: 4px solid #8ecae6;
  border-radius: 10px;
  padding: 1.2rem;
  margin-top: 1.5rem;
}

.bloco-usuario h2,
.bloco-empresa h2 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: #1e6091;
  font-weight: bold;
}

.form-group-usuario,
.form-group-empresa {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

input,
select {
  padding: 0.7rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fffaf0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
select:focus {
  border-color: #1e6091;
  outline: none;
  box-shadow: 0 0 0 2px #cce3f2;
}

.senha-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.senha-wrapper input {
  flex: 1;
}

.btn-toggle-senha {
  background: none;
  border: none;
  position: absolute;
  right: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  color: #444;
  padding: 0;
}

.required {
  color: #ef476f;  /* Cor vermelha para destacar */
  font-weight: bold;
  margin-left: 0.2rem;
}

/* Estilo para o campo obrigatórios da empresa */
.form-group-empresa label .required {
  font-size: 1.2rem; /* Tamanho do asterisco */
}

.form-erros {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
}

button[type='submit'] {
  padding: 0.9rem;
  background-color: #ef476f;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

button[type='submit']:hover {
  background-color: #d43f63;
  transform: scale(1.02);
}

.cadastro-links {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.95rem;
}

.cadastro-links a {
  color: #1e6091;
  text-decoration: none;
  transition: color 0.3s;
}

.cadastro-links a:hover {
  color: #ef476f;
  text-decoration: underline;
}

/* Estilo para o upload de logo */
.logo-upload input[type="file"] {
  display: none;
}

.logo-upload label {
  background-color: #1e6091;
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 1rem;
}

.logo-upload label:hover {
  background-color: #164f72;
}

.logo-preview {
  margin-top: 1rem;
}

/* Estilo para a pré-visualização do logo */
.logo-preview img {
  width: 100px;  /* Tamanho ajustável */
  height: auto;
  border-radius: 6px;
  border: 2px solid #ccc;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .cadastro-wrapper {
    flex-direction: row;
  }

  .cadastro-image,
  .cadastro-form {
    flex: 1;
  }

  .cadastro-image {
    padding: 2rem;
  }

  .cadastro-form {
    padding: 3rem;
  }

  h1 {
    font-size: 3rem;
  }

  .slogan {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .cadastro-wrapper {
    margin: 20px;
    max-width: 100%;
    flex-direction: column;
  }

  .cadastro-image {
    max-height: 200px;
    overflow: hidden;
  }

  .cadastro-image img {
    max-width: 90%;
    height: auto;
  }

  h1 {
    font-size: 2rem;
  }

  .cadastro-form {
    padding: 1.5rem;
  }

  input,
  select,
  textarea {
    width: 100%;
  }

  button[type='submit'] {
    width: 100%;
  }
}
