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

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

body,
.login-body {
  font-family: 'Noto Sans', 'Helvetica Neue', Arial, sans-serif;
}

.login-body {
  height: 100vh;
  overflow: hidden;
  border: 2px solid #333;
}

/* Container principal */
.login-container {
  display: flex;
  height: 100vh;
}

/* Lado Esquerdo - Ilustração */
.login-left {
  flex: 0 0 60%;
  background: linear-gradient(135deg, #FAF9FF 0%, #FAF9FF 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.welcome-text {
  text-align: center;
  margin-bottom: 40px;
}

.welcome-subtitle {
  font-size: 24px;
  font-weight: medium;
  color: #333;
  margin-bottom: 8px;
  font-weight: 400;
}

.welcome-title {
  font-size: 50px;
  color: #EDA804;
  font-weight: bold;
  margin: 0;
  line-height: 1.2;
}

/* Ilustração */
.illustration {
  flex: 1;
  background-image: url('../img/login-illustration.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  min-height: 551px;
  max-height: 551px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

/* Redes Sociais */
.social-media {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s ease;
  text-decoration: none;
}

.social-icon:hover {
  transform: scale(1.1);
  text-decoration: none;
  color: white;
}

.social-icon.facebook {
  background: #1877f2;
}

.social-icon.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon.linkedin {
  background: #0077b5;
}

.social-icon.youtube {
  background: #ff0000;
}

.social-icon.globe {
  background: #25d366;
}

/* Copyright */
.copyright {
  text-align: center;
}

.copyright p {
  font-size: 12px;
  color: #333;
  margin: 0;
}

/* Lado Direito - Formulário */
.login-right {
  flex: 0 0 40%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-form-container {
  width: 100%;
  max-width: 350px;
}

/* Logo da empresa */
.company-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 100px;
}

.company-logo img {
  max-width: 329px;
  height: auto;
}

/* Títulos do formulário */
.form-title {
  font-size: 36px;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.2;
}

.form-subtitle {
  font-size: 20px;
  font-weight: medium;
  color: #666;
  margin-bottom: 40px;
  line-height: 1.4;
}

/* Formulário */
.form-signin {
  width: 100%;
}

.form-signin .form-group {
  margin-bottom: 15px;
}

.form-signin label {
  display: none;
}

/* Input Group com ícone */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group-icon {
  position: absolute;
  left: 16px;
  color: #999;
  font-size: 16px;
  z-index: 5;
  pointer-events: none;
}

.form-signin .form-control {
  width: 100%;
  height: 40px;
  padding: 12px 16px 12px 48px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid #ddd;
  border-radius: 4px !important;
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  -webkit-border-radius: 4px !important;
  -moz-border-radius: 4px !important;
}

.form-signin .form-control:focus {
  outline: none;
  border-color: #EDA804;
  box-shadow: 0 0 0 3px rgba(237, 168, 4, 0.1);
}

.form-signin .input-group:has(.form-control:focus) .input-group-icon {
  color: #EDA804;
}

/* Botão de login */
.form-signin .btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  background: #EDA804;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.form-signin .btn:hover {
  background: #e55a2b;
  transform: translateY(-1px);
}

.form-signin .btn:active {
  transform: translateY(0);
}

/* Campo de senha com ícone */
.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 36%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Alertas */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.alert-warning {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.alert ul {
  margin: 0;
  padding-left: 20px;
}

.alert li {
  margin-bottom: 4px;
}

.alert .close {
  background: none;
  border: none;
  font-size: 18px;
  font-weight: bold;
  color: #856404;
  cursor: pointer;
  float: right;
  margin-left: 10px;
}

/* Responsividade */
@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
  }
  
  .login-left {
    display: none; /* Oculta todo o lado esquerdo no mobile */
  }
  
  .login-right {
    flex: 1;
    padding: 20px;
  }
  
  .form-title {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .login-left {
    display: none; /* Garante que está oculto */
  }
  
  .login-right {
    padding: 15px;
  }
  
  .form-title {
    font-size: 24px;
  }
  
  .form-subtitle {
    font-size: 16px;
  }
  
  .company-logo img {
    max-width: 200px;
  }
}

/* Floating label com ícone */
.form-group.floating {
  position: relative;
  width: 100%;
}

.form-group.floating .input-group {
  position: relative;
}

.form-group.floating .form-control {
  height: 40px;
  padding: 12px 16px 12px 48px; /* padding consistente com inputs normais */
  box-sizing: border-box;
  background: #ffffff !important;
  border-radius: 4px !important;
  -webkit-border-radius: 4px !important;
  -moz-border-radius: 4px !important;
}

.form-group.floating label {
  position: absolute;
  left: 48px; /* alinhado com o texto do input, após o ícone */
  top: 50%;
  transform: translateY(-50%);
  padding: 0 6px;
  background: #ffffff;
  font-size: 14px;
  color: #999;
  line-height: 1;
  pointer-events: none;
  transition: all 0.2s ease;
  display: block;
  z-index: 10; /* garante que fica na frente do input */
}

.form-group.floating .form-control:focus + label,
.form-group.floating .form-control:not(:placeholder-shown) + label,
.form-group.floating .form-control.has-value + label,
.form-group.floating .form-control:-webkit-autofill + label {
  top: 0;
  left: 12px; /* move para a esquerda quando sobe */
  transform: translateY(-50%) scale(0.85);
  color: #EDA804;
  font-weight: 500;
  background: #ffffff;
  padding: 0 8px;
  z-index: 10;
}

/* Disparadores para capturar autofill do Chrome via animationstart */
@keyframes autofillStart {}
@keyframes autofillCancel {}

.form-group.floating .form-control:-webkit-autofill {
  animation-name: autofillStart;
  animation-duration: 0s;
}

.form-group.floating .form-control:not(:-webkit-autofill) {
  animation-name: autofillCancel;
  animation-duration: 0s;
}

/* Ajuste do ícone para floating label */
.form-group.floating .input-group-icon {
  z-index: 5;
}

/* Espaço para botão "olho" à direita */
.input-group.password-field .form-control {
  padding-right: 48px;
}

.input-group.password-field .password-toggle {
  position: absolute;
  right: 12px;
  top: 36%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  z-index: 10;
  color: #999;
  font-size: 16px;
}

.input-group.password-field .password-toggle:hover {
  color: #EDA804;
}
