/* Reset e configurações básicas */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif, -apple-system,
    BlinkMacSystemFont, "San Francisco", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar img {
  height: 40px;
  width: auto;
  max-width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #ddd;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 4px;
}

.nav-toggle-icon {
  display: block;
  width: 20px;
  height: 2px;
  background-color: #333;
  position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 2px;
  background-color: #333;
  left: 0;
}

.nav-toggle-icon::before {
  top: -6px;
}

.nav-toggle-icon::after {
  top: 6px;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.nav-link {
  text-decoration: none;
  color: #007bff;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: background-color 0.3s;
  font-size: clamp(14px, 3vw, 16px);
}

.nav-link:hover {
  background-color: #e9ecef;
}

/* Container principal */
.container {
  max-width: 400px;
  margin: 100px auto 2rem;
  padding: 0 1rem;
  flex: 1;
  width: 100%;
}

/* Título */
h2 {
  text-align: center;
  color: #333;
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 5vw, 2rem);
}

hr {
  border: 0;
  height: 1px;
  background: #ddd;
  margin-bottom: 2rem;
}

/* Card */
.card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
  overflow: hidden;
  width: 100%;
}

.card-body {
  padding: clamp(1rem, 4vw, 1.5rem);
}

/* Formulário */
.form-row {
  margin-bottom: 1rem;
}

.form-group {
  width: 100%;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
  font-size: clamp(14px, 3vw, 16px);
}

.form-control {
  width: 100%;
  padding: clamp(0.6rem, 3vw, 0.75rem);
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  font-size: clamp(14px, 3vw, 16px);
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Alertas */
.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 0.75rem;
  border: 1px solid #f5c6cb;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
  font-size: clamp(13px, 3vw, 14px);
}

/* Links */
.text-link {
  color: #17a2b8;
  text-decoration: none;
  font-size: clamp(13px, 3vw, 14px);
}

.text-link:hover {
  text-decoration: underline;
}

/* Botão */
.btn-submit {
  width: 100%;
  max-width: 400px;
  background-color: #28a745;
  color: white;
  border: none;
  padding: clamp(0.6rem, 3vw, 0.75rem) 1.5rem;
  border-radius: 0.25rem;
  font-size: clamp(14px, 3vw, 16px);
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-submit:hover {
  background-color: #218838;
}

/* ===== PASSWORD ===== */
.input-group.password-group input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 16px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.toggle-password:hover {
    color: #9743d7;
}

/* reCAPTCHA */
.g-recaptcha {
  margin-bottom: 1rem;
  transform: scale(0.9);
  transform-origin: center;
}

/* Responsividade Aprimorada */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
  }

  .nav-menu.active {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    padding: 1rem;
  }

  .container {
    margin: 80px auto 1rem;
    padding: 0 0.5rem;
  }

  .card-body {
    padding: 1rem;
  }

  .g-recaptcha {
    transform: scale(0.85);
  }
}

@media (max-width: 480px) {
  .container {
    margin: 70px auto 1rem;
    padding: 0 0.5rem;
  }

  .card {
    margin-bottom: 1rem;
  }

  .form-control {
    padding: 0.5rem;
  }

  .g-recaptcha {
    transform: scale(0.8);
  }
}

@media (max-width: 320px) {
  .container {
    padding: 0 0.25rem;
  }

  .card-body {
    padding: 0.75rem;
  }
}

/* Para orientação landscape em mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .container {
    margin: 60px auto 1rem;
  }

  .navbar {
    position: relative;
  }
}

/* Para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 450px;
  }
}
