html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-image: 
    linear-gradient(rgba(30, 60, 114, 0.85), rgba(42, 82, 152, 0.85)),
    url('https://images.unsplash.com/photo-1556761175-4b46a572b786?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Overlay com padrão sutil */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255,255,255,.01) 10px,
    rgba(255,255,255,.01) 20px
  );
  z-index: 1;
}

/* Container principal */
.login-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 450px;
  margin: 0 20px;
}

/* Título do sistema - Estilo melhorado */
.header-title {
  text-align: center;
  margin-bottom: 2.5rem;
  color: white;
  animation: fadeInDown 0.8s ease-out;
}

.header-title i {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: block;
  text-shadow: 
    0 2px 20px rgba(0,0,0,0.5),
    0 0 40px rgba(255,255,255,0.3);
  color: #fff;
}

.header-title h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  text-shadow: 
    2px 2px 4px rgba(0,0,0,0.5),
    0 0 20px rgba(0,0,0,0.3);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.header-title p {
  font-size: 1.2rem;
  opacity: 0.95;
  margin: 0;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Card de login - Design premium */
.form-signin {
  background: rgba(255, 255, 255, 0.98);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 
    0 15px 35px rgba(0,0,0,0.3),
    0 5px 15px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  animation: fadeInUp 0.8s ease-out;
  position: relative;
  overflow: hidden;
}

/* Detalhe decorativo no card */
.form-signin::before {
  /* content: ''; removido conforme solicitado */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Cabeçalho do formulário */
.form-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.form-header i {
  font-size: 3rem;
  color: #2a5298;
  margin-bottom: 1rem;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.form-header h2 {
  font-size: 1.6rem;
  color: #1e3c72;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Campos do formulário - Estilo moderno */
.form-floating {
  position: relative;
  margin-bottom: 1.2rem;
}

.form-control {
  border: 2px solid #e1e8ed;
  border-radius: 12px;
  font-size: 1rem;
  padding: 1rem 1rem 1rem 3rem;
  transition: all 0.3s ease;
  background-color: #f8fafb;
  height: auto;
}

.form-control:focus {
  border-color: #2a5298;
  background-color: white;
  box-shadow: 
    0 0 0 0.2rem rgba(42, 82, 152, 0.15),
    0 2px 8px rgba(42, 82, 152, 0.1);
  outline: none;
}

.form-floating label {
  color: #6c757d;
  position: absolute;
  pointer-events: none;
  left: 3rem;
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.3s ease;
  background: transparent;
  padding: 0 0.5rem;
}

.form-floating .form-control:focus ~ label,
.form-floating .form-control:not(:placeholder-shown) ~ label {
  top: -0.5rem;
  left: 1rem;
  font-size: 0.85rem;
  color: #2a5298;
  background: white;
}

.form-floating label i {
  position: absolute;
  left: -2rem;
  top: 50%;
  transform: translateY(-50%);
  color: #2a5298;
  transition: all 0.3s ease;
}

.form-floating .form-control:focus ~ label i {
  top: 0;
}

/* Botão de login - Premium */
.btn-primary {
  background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
  border: none;
  border-radius: 12px;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 15px rgba(42, 82, 152, 0.3),
    inset 0 1px 0 rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
  margin-top: 1.5rem;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(42, 82, 152, 0.4),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Mensagens de erro - Estilizadas */
.alert-danger {
  border-radius: 12px;
  border: none;
  background-color: #fee;
  color: #c33;
  padding: 1rem 1.5rem;
  margin-top: 1.5rem;
  box-shadow: 0 2px 8px rgba(204, 51, 51, 0.1);
  animation: shake 0.5s ease-in-out;
}

.alert-danger i {
  margin-right: 0.5rem;
}

/* Animações */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Elementos decorativos */
.form-signin::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #2a5298, transparent);
  opacity: 0.5;
}

/* Responsividade aprimorada */
@media (max-width: 576px) {
  .header-title h1 {
    font-size: 1.5rem;
  }
  
  .header-title p {
    font-size: 1rem;
    letter-spacing: 1px;
  }
  
  .form-signin {
    padding: 2rem;
    margin: 1rem;
  }
  
  .form-header i {
    font-size: 2.5rem;
  }
  
  .form-header h2 {
    font-size: 1.4rem;
  }
}

/* Efeito de vidro para navegadores que suportam */
@supports (backdrop-filter: blur(10px)) {
  .form-signin {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px) saturate(150%);
  }
}