body, html {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
  overflow: hidden;
  font-size: 1rem;
}

.background-container {
  background: url("../img/tela-login.png") no-repeat center center fixed;
  background-size: cover;
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.logo-corner {
  position: absolute;
  top: 1.5rem;
  right: 1.875rem;
  z-index: 20;
}

.logo-corner img {
  max-width: 10rem;
  width: 15vw;
  min-width: 6.25rem;
  height: auto;
  display: block;
  transition: opacity 0.3s ease;
}

.logo-corner img:hover {
  opacity: 0.75;
}

.login-content-area {
  position: absolute;
  z-index: 10;
  top: 15vh;
  left: 50vw;
  width: 37vw;
  height: auto;
  max-height: 80vh;
  padding: 5vh 4vw;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: hidden;
  overflow-x: hidden;
}

.login-form-wrapper {
  width: 100%;
  box-sizing: border-box;
}

.login-form-wrapper h1 {
  font-size: min(max(1.2rem, 5vw), 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 0;
  letter-spacing: 0.03em;
  color: #ffffff;
}

.login-form-wrapper h1.mb-1 {
 margin-bottom: 0.25em !important;
}

.login-form-wrapper h1.mb-4 {
  margin-bottom: 2em !important;
}

.login-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.login-form .form-group {
   margin-bottom: 1.5em;
   width: 100%;
   max-width: 100%;
   box-sizing: border-box;
}

.login-form .form-group p {
    text-align: center;
    width: 100%;
    margin-top: 0.5em;
    margin-bottom: 0;
}

.input-custom {
  background-color: #333333 !important;
  color: #e0e0e0 !important;
  border: 1px solid #4f4f4f !important;
  border-radius: 0.5em !important;
  padding: 0.8em 1em;
  font-size: min(max(0.85rem, 2vw), 1rem);
  font-family: "Montserrat", sans-serif !important;
  line-height: 1.5;
  box-sizing: border-box;
  width: 100%;
}

.input-custom::placeholder {
  color: #828282 !important;
  font-weight: 400;
}

.form-control:focus {
  background-color: #404040 !important;
  border-color: #666666 !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

.btn-custom {
  max-width: 18.75em;
  background-color: #ab1111 !important;
  color: #ffffff !important;
  font-size: min(max(0.9rem, 2.5vw), 1.1rem);
  font-weight: 700;
  border: none;
  border-radius: 0.5em !important;
  padding: 0.8em 1em;
  margin-bottom: 1.8em;
  transition: background-color 0.3s ease, transform 0.1s ease;
  width: 100%;
  cursor: pointer;
}

.btn-custom.mt-3 {
  margin-top: 5% !important;
}

.btn-custom:hover {
  background-color: #c41414 !important;
}

.btn-custom:active {
  transform: scale(0.98);
}

.forgot-password {
    display: inline-block;
    color: #b0b0b0;
    text-decoration: none;
    font-size: min(max(0.75rem, 1.5vw), 0.9rem);
    transition: color 0.3s ease;
    padding: 0.5em;
}

.login-form h6 {
   width: 100%;
   max-width: 100%;
   box-sizing: border-box;
   text-align: center;
   margin-top: 0;
   margin-bottom: 0;
}

.create-account {
    display: inline-block;
    color: #ffffff;
    font-weight: 500;
    font-size: min(max(0.8rem, 1.8vw), 1rem);
    padding: 0.5em;
    text-align: center;
    text-decoration: none;
}

.forgot-password:hover, .create-account:hover {
  color: #ffffff;
}

@media(max-width:1350px){
  .login-content-area {
    width: 36%;
    padding: 4vh 3vw;
  }

  .login-form-wrapper h1 {
    font-size: min(max(1.1rem, 4.5vw), 1.5rem);
  }

  .input-custom {
    font-size: min(max(0.8rem, 2.2vw), 0.95rem);
    padding: 0.7em 0.9em;
  }

  .btn-custom {
    font-size: min(max(0.85rem, 2.3vw), 1rem);
    padding: 0.7em 0.9em;
    margin-bottom: 0em;
  }

  .btn-gestao-unificada {
    font-size: min(max(0.75rem, 2.1vw), 0.9rem);
    padding: 0.65em 1.3em;
    margin-top: 1em;
  }

  .forgot-password {
    font-size: min(max(0.7rem, 1.8vw), 0.85rem);
  }

  .create-account {
    font-size: min(max(0.75rem, 2vw), 0.9rem);
    margin-top: 1.3em;
  }

  .login-form .form-group {
    margin-bottom: 1.3em;
  }

  .logo-corner img {
    max-width: 9rem;
    width: 12vw;
    min-width: 5.5rem;
  }
}

/* ===== BOTÃO GESTÃO UNIFICADA - RESPONSIVO ===== */
.btn-gestao-unificada {
  background-color: transparent !important;
  border: 2px solid rgba(255, 255, 255, 0.6) !important;
  color: #ffffff !important;
  font-size: min(max(0.8rem, 2vw), 1rem);
  font-weight: 600;
  border-radius: 0.5em !important;
  margin-top: 1em;
  padding: 0.75em 1.5em;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 18.75em;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif !important;
  text-transform: none;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  box-sizing: border-box;
}

.btn-gestao-unificada:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.btn-gestao-unificada:active {
  transform: translateY(0);
}

.btn-gestao-unificada:focus {
  outline: none;
  border-color: #ffffff !important;
}

.btn-gestao-unificada i {
  font-size: 1em;
  opacity: 0.9;
}

@media (max-width: 480px) {
  body, html {
    overflow: auto;
  }

  .background-container {
    background: url("../img/BACKGROUND FAIXA.png") no-repeat center center;
    background-size: cover;
    height: auto;
    min-height: 100vh;
    overflow: auto;
    position: relative;
  }

  .logo-corner {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    text-align: center;
    padding: 1rem 0;
    z-index: 10;
  }

  .logo-corner img {
    max-width: 8rem;
    width: 50vw;
    min-width: 5rem;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .login-content-area {
    position: relative;
    top: auto;
    left: auto;
    width: 90%;
    max-width: 25rem;
    height: auto;
    min-height: auto;
    max-height: none;
    margin: 0 auto;
    padding: 1rem;
    box-sizing: border-box;
  }
  .login-form-wrapper {
    width: 100%;
  }

  .login-form-wrapper h1 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
  }

  .login-form-wrapper h1.mb-4 {
    margin-bottom: 1rem !important;
  }

  .input-custom {
    font-size: 0.875rem;
    padding: 0.75em 1em;
  }

  .btn-custom {
    font-size: 0.875rem;
    padding: 0.75em 1em;
    width: 100%;
    max-width: none;
    margin-top: 1rem;
  }

  .forgot-password {
    font-size: 0.8rem;
    padding: 0.5em;
  }

  .btn-gestao-unificada {
    font-size: 0.85rem;
    padding: 0.7em 1.2em;
    margin-top: 1rem;
    max-width: none;
    width: 100%;
    gap: 0.4em;
  }

  .create-account {
    font-size: 0.85rem;
    margin-top: 1rem;
    padding: 0.5em;
  }
}

/* ===== MODAL GESTÃO UNIFICADA ===== */
.modal-gestao {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(45, 53, 60, 0.9);
  backdrop-filter: blur(5px);
}

.modal-gestao.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content-gestao {
  background: #f8f9fa;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
  animation: modalFadeIn 0.3s ease-out;
  font-family: 'Open Sans', sans-serif;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header-gestao {
  background: #f8f9fa;
  color: #2d353c;
  padding: 30px 20px 20px;
  border-radius: 8px 8px 0 0;
  position: relative;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
}

.modal-title-gestao {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: #2d353c;
}

.close-gestao {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: #6c757d;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-gestao:hover {
  color: #2d353c;
  background-color: #e9ecef;
  border-radius: 50%;
}

.iframe-container {
  padding: 0;
  height: 550px;
  background: #f8f9fa;
}

.iframe-gestao {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0 0 8px 8px;
}

.loading-gestao {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 550px;
  flex-direction: column;
  color: #348fe2;
  background: #f8f9fa;
}

.spinner-gestao {
  width: 40px;
  height: 40px;
  border: 3px solid #e9ecef;
  border-top: 3px solid #348fe2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-gestao p {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
}