/* ✅ CORREÇÃO ADICIONAL: Layout responsivo fixo */
html, body {
  height: 100%;
  overflow-x: hidden;
}

.container-fluid {
  height: 100vh;
  padding: 0;
}

.row {
  height: 100vh;
  margin: 0;
}

.bg-SescSenac{
    background-color: #142661 !important;
}

/* ✅ CORREÇÃO: Coluna da esquerda sempre visível */
.logo-section {
  position: relative;
  height: 100vh;
  padding: 2rem;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.logo-section img {
  max-width: 400px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ✅ CORREÇÃO: Coluna da direita com altura fixa */
.right {
  height: 100vh;
  overflow-y: auto;
  padding: 1rem;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ✅ CORREÇÃO: Container interno */
.right .container {
  width: 100%;
  max-width: 100%;
  padding: 0;
}

.right .row {
  height: auto;
  min-height: auto;
}

/* ✅ CORREÇÃO: Card responsivo */
.card {
  max-width: 100%;
  width: 100%;
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.card-body {
  padding: 1.5rem;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
}

/* ✅ CORREÇÃO: Validação de senha mais compacta */
#validacao-senha {
  max-height: 180px;
  overflow: hidden;
}

#validacao-senha .card {
  border: 1px solid #dee2e6;
  box-shadow: none;
}

#validacao-senha .card-body {
  padding: 0.75rem;
  max-height: none;
  overflow: visible;
}

#validacao-senha ul li {
  font-size: 0.8rem;
  line-height: 1.3;
  margin-bottom: 0.2rem;
  padding: 0.1rem 0;
}

#validacao-senha .bi {
  font-size: 0.7rem;
  margin-right: 0.5rem;
}

/* ✅ CORREÇÃO: Alertas mais compactos */
.alert {
  margin-bottom: 1rem;
  padding: 0.75rem;
  font-size: 0.9rem;
}

.alert ul {
  margin-bottom: 0;
  padding-left: 1rem;
}

.alert li {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

/* ✅ CORREÇÃO: Botão fixo no final */
.btn-submit-container {
  position: sticky;
  bottom: 0;
  background: white;
  padding: 1rem 0 0 0;
  margin-top: 1rem;
  border-top: 1px solid #f8f9fa;
  z-index: 10;
}

/* ✅ CORREÇÃO: Inputs com validação */
.input-group {
  position: relative;
}

.form-control.is-valid,
.form-control.is-invalid {
  background-position: right 2.5rem center;
}

.input-group .form-control.is-valid ~ .valid-feedback,
.input-group .form-control.is-invalid ~ .invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
}

/* ✅ CORREÇÃO: Responsividade aprimorada */
@media (max-width: 768px) {
  .container-fluid {
      height: 100vh;
  }
    
  .row {
      height: 100vh;
      flex-direction: column;
  }
    
  .logo-section {
      height: 30vh;
      min-height: 30vh;
      max-height: 30vh;
      padding: 1rem;
  }
    
  .logo-section img {
      max-width: 250px;
      max-height: 150px;
  }
    
  .right {
      height: 70vh;
      min-height: 70vh;
      max-height: 70vh;
      padding: 0.5rem;
  }
    
  .card-body {
      padding: 1rem;
      max-height: calc(70vh - 2rem);
  }
    
  #validacao-senha {
      max-height: 140px;
  }
    
  .btn-submit-container {
      position: relative;
      bottom: auto;
      border-top: none;
      padding: 0.5rem 0 0 0;
  }
}

@media (max-width: 576px) {
  .logo-section {
      height: 25vh;
      min-height: 25vh;
      max-height: 25vh;
      padding: 0.5rem;
  }
    
  .logo-section img {
      max-width: 200px;
      max-height: 120px;
  }
    
  .right {
      height: 75vh;
      min-height: 75vh;
      max-height: 75vh;
      padding: 0.25rem;
  }
    
  .card-body {
      padding: 0.75rem;
      max-height: calc(75vh - 1.5rem);
  }
    
  .form-control {
      font-size: 16px; /* Evita zoom no iOS */
  }
    
  #validacao-senha {
      max-height: 120px;
  }
    
  #validacao-senha ul li {
      font-size: 0.75rem;
      line-height: 1.2;
  }
}

/* ✅ CORREÇÃO: Scroll personalizado */
.card-body::-webkit-scrollbar {
  width: 4px;
}

.card-body::-webkit-scrollbar-track {
  background: transparent;
}

.card-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.card-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* ✅ CORREÇÃO: Transições suaves */
.form-control,
.btn {
  transition: all 0.2s ease-in-out;
}

.alert {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(-5px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* ✅ CORREÇÃO: Melhorar legibilidade */
.validation-compact {
  font-size: 0.8rem !important;
  line-height: 1.2 !important;
}

.validation-compact .bi {
  font-size: 0.7rem !important;
  width: 12px;
  display: inline-block;
}

/* ✅ CORREÇÃO: Garantir que o layout não quebre */
.col-md-6 {
  flex: 0 0 50%;
  max-width: 50%;
}

@media (max-width: 768px) {
  .col-md-6 {
      flex: 0 0 100%;
      max-width: 100%;
  }
}

/* ✅ CORREÇÃO: Evitar overflow horizontal */
* {
  box-sizing: border-box;
}

.container-fluid,
.row,
.col-md-6 {
  overflow-x: hidden;
}