/* ==========================================================================
   Google Gemini UI Inspired Login - High Fidelity Complete Sheet
   ========================================================================== */

/* 1. BASE SYSTEM & VIEWPORT RESET */
html, body {
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Master background container combining the application image with Gemini graphics */
.login-body {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100vh !important;
  background-image: url('../img/bkground_porto.webp') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  position: relative !important;
  z-index: 1;
}

/* Gemini Dynamic Blue Animation Overlay - Smooth and soft tint to keep background perfectly readable */
.login-body::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(125deg, rgba(11, 47, 97, 0.45) 0%, rgba(26, 115, 232, 0.45) 40%, rgba(13, 71, 161, 0.45) 70%, rgba(21, 87, 176, 0.45) 100%) !important;
  background-size: 300% 300% !important;
  animation: moving-gemini 16s ease infinite !important;
  z-index: -1 !important;
}

/* 2. MAIN GRID STRUCTURE (FLOATING CARD CONTEXT WITH LAYERED OPACITY & 3D VOLUME) */
.login-body > div {
  position: relative !important;
  z-index: 10 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 440px !important; /* Fixed smartphone aspect profile structure */
  padding: 1.5rem !important;
}

/* The Floating Card Window with Advanced 3D Shading */
.login-left {
  width: 100% !important;
  border-radius: 28px !important; /* Pure Gemini rounding curvature */
  padding: 2.25rem 2rem !important;
  
  /* ESTADO INICIAL: Opacidade geral em 1 para não limitar os filhos, mas FUNDO translúcido em 75% */
  background: rgba(255, 255, 255, 0.75) !important;
  opacity: 1 !important; 
  
  /* BORDA INTEGRAL COM EMULAÇÃO DE RELEVO 3D */
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  border-top: 2px solid rgba(255, 255, 255, 1) !important;  /* Luz brilhando no topo */
  border-bottom: 2px solid rgba(0, 0, 0, 0.15) !important;    /* Sombra de apoio na base */
  
  /* MULTI-SHADOW 3D: Camadas realistas de sombreamento físico */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08),     
              0 15px 35px rgba(0, 0, 0, 0.18),    
              0 30px 60px rgba(11, 47, 97, 0.25) !important; 
  
  /* Transições coordenadas e lineares para suavizar a entrada e saída do efeito */
  transition: background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  
  transform: perspective(1000px) translateZ(0) !important; 
}

/* COMPORTAMENTO INTERATIVO DO CARD: Torna o fundo do card sólido e eleva o bloco */
.login-left:hover,
.login-left:focus-within {
  background: rgba(255, 255, 255, 0.99) !important; /* Fundo do card fica sólido */
  
  /* Simulação de aproximação física da lente em direção à tela */
  transform: perspective(1000px) scale(1.02) translateY(-4px) !important;
  
  /* Fortalecimento das sombras devido ao efeito de proximidade */
  border-top: 2px solid rgba(255, 255, 255, 1) !important;
  border-bottom: 2px solid rgba(0, 0, 0, 0.2) !important;
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.12),
              0 25px 55px rgba(0, 0, 0, 0.28), 
              0 40px 90px rgba(11, 47, 97, 0.38) !important;
}

/* Stripping legacy Bulma framework container overrides safely */
.login-form-container.box {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

/* 3. BRANDING & BRAND-LOGO CONTAINER */
.login-header {
  text-align: center !important;
  margin-bottom: 1.25rem !important;
}

.login-brand {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.25rem !important;
  margin-bottom: 0.5rem !important;
}

/* Strict scaling block enforcing proper proportions on your application logo */
.login-logo {
  max-height: 85px !important;
  width: auto !important;
  object-fit: contain !important;
  margin: 0 auto 0.25rem auto !important;
  display: block !important;
}

.login-title {
  font-size: 1.6rem !important;
  font-weight: 700 !important;
  color: var(--google-text-primary, #202124) !important;
  letter-spacing: -0.02em !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.login-subheader {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0.5rem !important;
  margin-top: 0.25rem !important;
}

.login-subtitle {
  font-size: 0.85rem !important;
  color: var(--google-text-secondary, #5f6368) !important;
  font-weight: 400 !important;
  margin: 0 !important;
}

/* 4. MODERN PILL LANGUAGE SWITCHER & BRIDGE */
.login-locale-wrapper {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  margin-top: 0.25rem !important;
}

.stip-locale-pills {
  display: inline-flex !important;
  background-color: #f1f3f4 !important;
  padding: 3px !important;
  border-radius: 20px !important;
  border: 1px solid #dadce0 !important;
  gap: 2px !important;
  align-items: center !important;
}

.locale-pill {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  color: #5f6368 !important;
  padding: 4px 14px !important;
  border-radius: 16px !important;
  border: none !important;
  background: transparent !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
  line-height: 1.2 !important;
}

.locale-pill:hover {
  color: #202124 !important;
  background-color: rgba(0, 0, 0, 0.04) !important;
}

.locale-pill.is-active {
  background-color: #ffffff !important;
  color: var(--google-blue, #1a73e8) !important;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15) !important;
}

.hidden-locale-select {
  display: none !important;
}

/* 5. INPUT FORM FIELDS CONTROLS WITH REAL INDEPENDENT TRANSPARENCY */
.login-form {
  margin-top: 1.25rem !important;
}

/* CAMPOS DE INPUT: Agora controlados de forma isolada a 50% (Opacidade real) */
.login-input-group {
  margin-bottom: 0.75rem !important;
  opacity: 0.5 !important; /* Força 50% de transparência inicial */
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Quando o card principal receber hover ou foco, os inputs sobem para 100% opacos e limpos */
.login-left:hover .login-input-group,
.login-left:focus-within .login-input-group {
  opacity: 1 !important;
}

.login-input-wrapper {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}

/* Rounded, padded inputs modeled directly after Material Design input density */
.login-input.input {
  height: 3rem !important;
  border-radius: 14px !important;
  padding-left: 2.75rem !important;
  padding-right: 2.75rem !important;
  border: 1px solid var(--google-border, #dadce0) !important;
  background-color: #f8f9fa !important;
  font-size: 0.95rem !important;
  color: var(--google-text-primary, #202124) !important;
  box-shadow: none !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  width: 100% !important;
}

.login-input.input:hover {
  border-color: var(--google-text-secondary, #5f6368) !important;
  background-color: #f1f3f4 !important;
}

.login-input.input:focus {
  background-color: #ffffff !important;
  border-color: var(--google-blue, #1a73e8) !important;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2) !important;
}

.login-input-icon {
  position: absolute !important;
  left: 1rem !important;
  color: var(--google-text-secondary, #5f6368) !important;
  font-size: 1rem !important;
  z-index: 5 !important;
  pointer-events: none !important;
  display: flex !important;
  align-items: center !important;
}

.password-toggle {
  position: absolute !important;
  right: 1rem !important;
  background: transparent !important;
  border: none !important;
  color: var(--google-text-secondary, #5f6368) !important;
  cursor: pointer !important;
  z-index: 5 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.password-toggle:hover {
  color: var(--google-text-primary, #202124) !important;
}

/* 6. FORM ACTION SUBMIT BUTTON WITH REAL INDEPENDENT TRANSPARENCY */
.login-btn.button.is-primary.is-fullwidth {
  height: 3rem !important;
  border-radius: 14px !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  letter-spacing: 0.01em !important;
  background-color: #00d1b2 !important; /* Cor identitária verde-turquesa sTIP */
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(0, 209, 178, 0.25) !important;
  margin-top: 1rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  
  /* ESTADO INICIAL DO BOTÃO: 50% de opacidade independente real */
  opacity: 0.5 !important;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* Quando o card recebe interação, o botão também assume opacidade total e limpa o efeito */
.login-left:hover .login-btn.button.is-primary.is-fullwidth,
.login-left:focus-within .login-btn.button.is-primary.is-fullwidth {
  opacity: 1 !important;
}

.login-btn.button.is-primary.is-fullwidth:hover {
  background-color: #00bfa5 !important;
  box-shadow: 0 6px 16px rgba(0, 209, 178, 0.4) !important;
}

/* 7. FOOTER LINKS & FOOTNOTE TYPOGRAPHY */
.login-links {
  text-align: center !important;
  margin-top: 1.5rem !important;
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
}

.login-link {
  color: var(--google-blue, #1a73e8) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.login-link:hover {
  text-decoration: underline !important;
  color: var(--google-blue-hover, #1557b0) !important;
}

.login-footer {
  text-align: center !important;
  margin-top: 1.5rem !important;
  font-size: 0.75rem !important;
  color: var(--google-text-disabled, #9aa0a6) !important;
  border-top: 1px solid var(--google-border-light, #e8eaed) !important;
  padding-top: 0.85rem !important;
}

.login-right {
  display: none !important;
}

/* 8. TRANSLATION & MOTION KEYFRAMES */
@keyframes moving-gemini {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Responsive configurations for small phone screens */
@media (max-width: 480px) {
  .login-body > div {
    padding: 0 !important;
    max-width: 100% !important;
  }
  .login-left {
    border-radius: 0 !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    border: none !important;
    background: #ffffff !important;
    transform: none !important; 
  }
  .login-left:hover {
    transform: none !important;
    box-shadow: none !important;
  }
  /* Força elementos a ficarem 100% opacos no mobile automaticamente */
  .login-input-group,
  .login-btn.button.is-primary.is-fullwidth {
    opacity: 1 !important;
  }
}