/* ============================================================
   login.css — Estilos da tela de login OnClick Digital Signage
   Função:
   - Criar um layout moderno com dois lados
   - Aplicar a identidade visual do site
   - Responsivo para todos os tamanhos
   - Animações elegantes e feedbacks visuais
============================================================ */

/* ============================================================
   CORPO DA PÁGINA DE LOGIN
============================================================ */
.pagina-login {
  height: 100vh;
  overflow: hidden;
}

/* ============================================================
   CONTAINER PRINCIPAL
============================================================ */
.login-container {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* ============================================================
   LADO ESQUERDO - VÍDEO E INFORMAÇÕES
============================================================ */
.login-lado-esquerdo {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-width: 400px;
  background: var(--azul-profundo);
}

.video-fundo-login {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.overlay-login {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 18, 38, 0.65);
  z-index: 2;
}

.conteudo-lado-esquerdo {
  position: relative;
  z-index: 3;
  text-align: center;
  color: white;
  animation: fadeInLeft 0.8s ease-out;
}

.logo-login-area {
  margin-bottom: 30px;
}

.logo-login {
  width: 420px;
  height: 320px;
  filter: drop-shadow(0 0 20px rgba(109, 255, 0, 0.3));
  animation: pulse-glow 3s ease-in-out infinite;
}

.titulo-lado-esquerdo {
  font-size: 2.5rem;
  color: var(--verde-onclick);
  margin-bottom: 15px;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(109, 255, 0, 0.3);
}

.subtitulo-lado-esquerdo {
  font-size: 1.1rem;
  color: var(--texto-suave);
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* ============================================================
   LADO DIREITO - FORMULÁRIO
============================================================ */
.login-lado-direito {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  padding: 40px;
  min-width: 400px;
}

.formulario-login-wrapper {
  width: 100%;
  max-width: 400px;
  animation: fadeInRight 0.8s ease-out;
}

/* ============================================================
   CABEÇALHO DO FORMULÁRIO
============================================================ */
.login-header {
  margin-bottom: 40px;
  text-align: center;
}

.login-header h1 {
  font-size: 2rem;
  color: var(--azul-profundo);
  margin-bottom: 8px;
  font-weight: 700;
}

.login-header p {
  color: #999;
  font-size: 0.95rem;
}

/* ============================================================
   FORMULÁRIO DE LOGIN
============================================================ */
.formulario-login {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Grupos de formulário */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--azul-profundo);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  background: white;
  color: var(--azul-profundo);
}

.form-input:focus {
  outline: none;
  border-color: var(--verde-onclick);
  box-shadow: 0 0 0 3px rgba(109, 255, 0, 0.1);
}

.form-input::placeholder {
  color: #ccc;
}

/* Wrapper para campo de senha com ícone */
.input-senha-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-senha-wrapper .form-input {
  width: 100%;
  padding-right: 45px;
}

.btn-mostrar-senha {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.btn-mostrar-senha:hover {
  transform: scale(1.1);
}

/* ============================================================
   OPÇÕES DO FORMULÁRIO
============================================================ */
.form-opcoes {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
  font-size: 0.9rem;
}

/* Checkbox customizado */
.checkbox-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox-custom input {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.checkbox-custom input:checked + .checkmark {
  background: var(--verde-onclick);
  border-color: var(--verde-onclick);
}

.checkbox-custom input:checked + .checkmark::after {
  content: '✓';
  color: var(--azul-profundo);
  font-size: 0.9rem;
  font-weight: bold;
}

.texto-checkbox {
  color: #666;
}

/* Link recuperar senha */
.link-recuperar {
  color: var(--verde-onclick);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.link-recuperar:hover {
  color: var(--amarelo-onclick);
}

/* ============================================================
   MENSAGENS DE ERRO
============================================================ */
.erro-mensagem {
  font-size: 0.8rem;
  color: #e74c3c;
  display: none;
  margin-top: -6px;
}

.erro-mensagem.ativo {
  display: block;
}

.alert-erro {
  background: #fee;
  border: 1px solid #fcc;
  color: #c00;
  padding: 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  display: none;
  text-align: center;
}

.alert-erro.ativo {
  display: block;
  animation: shake 0.5s ease-out;
}

.alert-sucesso {
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  color: #2e7d32;
  padding: 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  display: none;
  text-align: center;
}

.alert-sucesso.ativo {
  display: block;
  animation: slideInUp 0.4s ease-out;
}

/* ============================================================
   BOTÃO ENTRAR
============================================================ */
.btn-entrar {
  padding: 14px;
  background: linear-gradient(135deg, var(--verde-onclick), #5ad400);
  color: var(--azul-profundo);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(109, 255, 0, 0.2);
}

.btn-entrar:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(109, 255, 0, 0.3);
}

.btn-entrar:active:not(:disabled) {
  transform: translateY(0);
}

.btn-entrar:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.texto-botao {
  display: flex;
  align-items: center;
}

.loader-botao {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(7, 18, 38, 0.2);
  border-top-color: var(--azul-profundo);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-botao.ativo {
  display: block;
}

/* ============================================================
   SEPARADOR
============================================================ */
.separador-login {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
  color: #ccc;
}

.separador-login::before,
.separador-login::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

.separador-login span {
  font-size: 0.9rem;
  font-weight: 500;
}

/* ============================================================
   RODAPÉ DO LOGIN
============================================================ */
.login-footer {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

.login-footer p {
  margin: 0;
}

.link-criar-conta {
  color: var(--verde-onclick);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.link-criar-conta:hover {
  color: var(--amarelo-onclick);
}

/* ============================================================
   ANIMAÇÕES
============================================================ */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(109, 255, 0, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 30px rgba(109, 255, 0, 0.6));
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   RESPONSIVO - TABLETS E MOBILE
============================================================ */
@media (max-width: 1024px) {
  .login-lado-esquerdo {
    min-width: 300px;
  }

  .login-lado-direito {
    min-width: 350px;
    padding: 30px;
  }

  .titulo-lado-esquerdo {
    font-size: 2rem;
  }

  .logo-login {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
  }

  .login-lado-esquerdo {
    min-width: auto;
    height: 30vh;
    order: 2;
  }

  .login-lado-direito {
    min-width: auto;
    height: 70vh;
    order: 1;
    padding: 25px;
  }

  .formulario-login-wrapper {
    max-width: 100%;
  }

  .titulo-lado-esquerdo {
    font-size: 1.5rem;
  }

  .logo-login {
    width: 180px;
    height: 130px;
  }

  .login-header h1 {
    font-size: 1.5rem;
  }

  .form-opcoes {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .login-lado-direito {
    padding: 20px;
  }

  .formulario-login-wrapper {
    max-width: 100%;
  }

  .login-header {
    margin-bottom: 25px;
  }

  .login-header h1 {
    font-size: 1.3rem;
  }

  .login-header p {
    font-size: 0.85rem;
  }

  .form-input {
    padding: 11px 14px;
    font-size: 16px; /* Evita zoom em iOS */
  }

  .btn-entrar {
    padding: 12px;
    font-size: 0.9rem;
  }

  .formulario-login {
    gap: 15px;
  }
}
