@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

body {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif !important;
  background: #0f172a;
  min-height: 100vh;
  display: flex !important;
  flex-direction: column;
}

* {
  font-family: 'Outfit', sans-serif;
  box-sizing: border-box;
}

section#login {
  flex: 1;
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: calc(100vh - 60px);
  background: linear-gradient(135deg, #193264 0%, #0F2146 100%);
  position: relative;
  overflow: hidden;
}

section#login::before, section#login::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  z-index: 0;
  opacity: 0.6;
  filter: blur(80px);
}

section#login::before {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 70%);
}

section#login::after {
  bottom: -10%;
  right: -10%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 70%);
}

section#login > * {
  z-index: 1;
}

/* Left Side - Images */
.secao-imgs {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #193264;
  padding: 2rem;
  clip-path: polygon(0 0, 100% 0, 93% 100%, 0% 100%);
  box-shadow: 10px 0 30px rgba(0,0,0,0.4);
}

.img-container {
  max-width: 500px;
  text-align: center;
  animation: fadeIn 1s ease-out;
}

.img-firsthrh img {
  max-width: 250px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
  transition: transform 0.3s ease;
}

.img-firsthrh img:hover {
  transform: scale(1.05);
}

.outras-imagens {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
  background: rgba(0,0,0,0.03);
  padding: 1.5rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,0.05);
}

.outras-imagens img {
  max-width: 80px;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.img-Connecting img {
  max-width: 140px !important; /* Compensa a proporção super horizontal desta logo */
}

.outras-imagens img:hover {
  opacity: 1;
  transform: translateY(-5px);
}

.img-container h1 {
  margin-top: 3rem;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  color: #193264;
  text-transform: uppercase;
}

.titulo-mobile {
  display: none !important;
}

/* Right Side - Form */
#login > div:nth-child(2) {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

#loginForm {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 3.5rem;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.6);
  border: 1px solid rgba(255, 255, 255, 0.4);
  width: 100%;
  max-width: 440px;
  animation: slideUp 0.8s ease-out;
}

#loginForm label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#loginForm .form-control {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
  font-family: 'Outfit', sans-serif !important;
  color: #1e293b;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  box-sizing: border-box;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
  height: auto;
}

#loginForm .form-control:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.15);
  transform: translateY(-1px);
}

.senha-e-botao {
  position: relative;
}

button#loginButton.btn.btn-secondary {
  width: 100%;
  padding: 1rem !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: white !important;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3) !important;
  margin-top: 1rem !important;
  display: block !important;
  font-family: 'Outfit', sans-serif !important;
  height: auto;
}

button#loginButton.btn.btn-secondary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(37,99,235,0.4) !important;
}

button#recuperarButton.btn.btn-secondary {
  width: 100%;
  background: transparent !important;
  color: #64748b !important;
  box-shadow: none !important;
  border: 2px solid #e2e8f0 !important;
  font-size: 0.9rem !important;
  margin-top: 1.5rem !important;
  padding: 0.8rem !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  font-family: 'Outfit', sans-serif !important;
}

button#recuperarButton.btn.btn-secondary:hover {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

/* Footer */
section#rodape {
  background: white;
  padding: 1.5rem;
  text-align: center;
  display: flex !important;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #64748b;
  border-top: 1px solid #e2e8f0;
  z-index: 10;
}

section#rodape a {
  color: #64748b;
  text-decoration: none;
  font-family: 'Outfit', sans-serif !important;
  transition: color 0.3s;
}

section#rodape a:hover {
  color: #2563eb;
}

section#rodape div, section#rodape span {
  font-family: 'Outfit', sans-serif !important;
}

/* Destination div for alerts */
#destino {
  margin-top: 1.5rem;
  width: 100%;
}

.alertaErros {
  width: 100% !important;
  max-width: 440px !important;
  border-radius: 12px !important;
  font-family: 'Outfit', sans-serif !important;
  margin-left: auto;
  margin-right: auto;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  section#login {
    flex-direction: column;
    overflow: visible;
  }

  .secao-imgs {
    clip-path: none;
    flex-direction: column;
    padding: 3rem 1.5rem 2rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    z-index: 10;
  }

  .img-container {
    width: 100%;
  }

  .img-container h1 {
    display: none;
  }

  .outras-imagens {
    margin-top: 1.5rem;
    gap: 1rem;
    padding: 1.2rem;
  }

  .outras-imagens img {
    max-width: 65px;
  }

  .img-Connecting img {
    max-width: 110px !important; /* Compensa a proporção super horizontal desta logo no celular */
  }

  .titulo-mobile {
    display: block !important;
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    color: #193264;
    margin-top: 1.5rem;
    width: 100%;
    line-height: 1.1;
  }

  #login > div:nth-child(2) {
    padding: 2rem 1.5rem 4rem 1.5rem;
    align-items: center;
    justify-content: flex-start;
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  #loginForm {
    padding: 2.5rem 1.5rem;
    width: 100%;
    max-width: 440px;
  }
}

/* =========================================
   MODAL DE PRIMEIRO ACESSO E RECUPERACAO
========================================= */

.blackScreenModal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  background: rgba(15, 23, 42, 0.7) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 9998 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.primeiroAcesso, .novaSenha, .recuperarSenha {
  width: 90%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-radius: 24px !important;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  padding: 2.5rem !important;
  z-index: 9999 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
  font-family: 'Outfit', sans-serif !important;
  animation: slideUp 0.4s ease-out !important;
  position: relative !important;
  margin: 0 !important;
  transform: none !important;
}

.recuperarSenha, .novaSenha {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

/* O botão X de fechar (Apenas no Primeiro Acesso) */
.primeiroAcesso > div:first-of-type {
  position: absolute !important;
  top: 20px !important;
  right: 25px !important;
  font-size: 1.5rem !important;
  font-weight: bold !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  padding: 5px !important;
  line-height: 1 !important;
  z-index: 10 !important;
}

.primeiroAcesso > div:first-of-type:hover {
  color: #ef4444 !important;
  transform: scale(1.1) !important;
}

/* Titulo: Seja bem vindo */
.primeiroAcesso > div:nth-of-type(2) {
  font-size: 1.4rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  text-align: center !important;
  margin-top: 5px !important;
  line-height: 1.2 !important;
}

/* Subtitulo: Preencha cuidadosamente... */
.primeiroAcesso > div:nth-of-type(3) {
  font-size: 0.9rem !important;
  color: #64748b !important;
  text-align: center !important;
  margin-bottom: 0.5rem !important;
  padding: 0 10px !important;
}

/* RECUPERAR SENHA CUSTOM STYLES */
.recuperarSenha > div {
  color: #64748b !important;
  text-align: center !important;
  font-weight: 600 !important;
  margin-bottom: 10px !important;
}

.recuperarSenha > div:first-of-type {
  font-size: 1.2rem !important;
  color: #1e293b !important;
  font-weight: 800 !important;
  margin-bottom: 1.5rem !important;
}

.primeiroAcesso form, .recuperarSenha form {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.2rem !important;
  background: none !important;
}

.primeiroAcesso label, .recuperarSenha label {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
  margin-bottom: 0.5rem !important;
  text-transform: uppercase !important;
  display: block !important;
  text-align: left !important;
}

.primeiroAcesso input.form-control, .recuperarSenha input.form-control {
  width: 100% !important;
  padding: 0.8rem 1.2rem !important;
  font-size: 1rem !important;
  font-family: 'Outfit', sans-serif !important;
  color: #1e293b !important;
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-sizing: border-box !important;
  transition: all 0.3s ease !important;
  height: auto !important;
  margin-bottom: 0.8rem !important;
}

.primeiroAcesso input.form-control:focus, .recuperarSenha input.form-control:focus {
  outline: none !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.15) !important;
}

.primeiroAcesso button.btn-success, .recuperarSenha button {
  width: 100% !important;
  padding: 1rem !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: white !important;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(16,185,129,0.3) !important;
  margin-top: 0.5rem !important;
  font-family: 'Outfit', sans-serif !important;
}

.primeiroAcesso button.btn-success:hover, .recuperarSenha button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(16,185,129,0.4) !important;
}

#retornoPrimeiroAcesso, #destino {
  text-align: center !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  margin-top: 1rem !important;
  color: #1e293b !important;
}

#destino:empty {
  display: none !important;
}
