/* Custom CSS for TPULSE Login Page */

/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #2c2c2c 0%, #3a3a3a 25%, #2c2c2c 50%, #3a3a3a 75%, #2c2c2c 100%);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Background pattern overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 20%, rgba(225, 29, 115, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 70%, rgba(190, 24, 93, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Enhanced Navbar */
.navbar {
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(20px);
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  width: 100%;
  border-radius: 0;
  padding: 1rem 0;
}

.navbar:hover {
  background: rgba(0, 0, 0, 0.9) !important;
}

.navbar-brand {
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 1.3rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  background: linear-gradient(135deg, #e11d73, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0 4px;
  padding: 8px 16px !important;
}

.nav-link:hover,
.nav-link.active {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(225, 29, 115, 0.2), rgba(236, 72, 153, 0.1));
  transform: translateY(-1px);
}

.nav-link i {
  color: #e11d73 !important;
}

/* Main container */
.main-content {
  position: relative;
  z-index: 1;
  padding-top: 40px; /* Espaço para a navbar fixa */
}

.page-header {
  background-image: none !important;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px); /* Ajusta altura considerando navbar */
  padding: 2rem 0;
}

/* Login card container */
.login-container {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Enhanced card design */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 80px rgba(225, 29, 115, 0.1);
  transition: all 0.4s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.4),
    0 0 100px rgba(225, 29, 115, 0.15);
}

/* Card header with gradient */
.card-header {
  background: linear-gradient(135deg, #e11d73 0%, #be185d 50%, #9d174d 100%);
  padding: 2rem 1.5rem;
  margin: 0;
  border-radius: 20px 20px 0 0;
  position: relative;
  overflow: hidden;
}

.card-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

/* Logo container */
.logo-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.logo-circle {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.logo-circle:hover {
  transform: scale(1.1) rotate(5deg);
  background: rgba(255, 255, 255, 0.3);
}

.logo-circle i {
  font-size: 2rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Typography */
.card-header h4 {
  color: #fff;
  font-weight: 700;
  font-size: 1.8rem;
  margin: 0.5rem 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 2px;
}

.card-header p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-weight: 400;
  font-size: 0.9rem;
}

/* Card body */
.card-body {
  padding: 2rem 1.5rem;
  background: rgba(255, 255, 255, 0.98);
}

/* Form styles */
.input-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.input-group input {
  background: rgba(248, 250, 252, 0.8);
  border: 2px solid rgba(225, 29, 115, 0.1);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
  transition: all 0.3s ease;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.input-group input:focus {
  outline: none;
  border-color: #e11d73;
  background: #fff;
  box-shadow: 
    0 0 0 3px rgba(225, 29, 115, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* CORRIGIDO: Labels flutuantes */
.input-group label {
  position: absolute;
  left: 16px;
  top: 100%;
  transform: translateY(-50%);
  background: transparent;
  color: #64748b;
  font-size: 1rem;
  transition: all 0.3s ease;
  pointer-events: none;
  padding: 0 4px;
  border-radius: 12px;
  z-index: 50;
}



/* Checkbox */
.form-check {
  margin: 1.5rem 0;
}

.form-check-input {
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid #e11d73;
  border-radius: 4px;
  background: transparent;
  transition: all 0.3s ease;
}

.form-check-input:checked {
  background: linear-gradient(135deg, #e11d73, #be185d);
  border-color: #e11d73;
}

.form-check-label {
  color: #64748b;
  font-weight: 500;
  margin-left: 0.5rem;
}

/* Button */
.btn-login {
  background: linear-gradient(135deg, #e11d73 0%, #be185d 50%, #9d174d 100%);
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  width: 100%;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(225, 29, 115, 0.3);
}

.btn-login:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(225, 29, 115, 0.4);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-login::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-login:hover::before {
  left: 100%;
}

/* Spinner */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 2px;
}

/* Forgot password link */
.forgot-password {
  text-align: center;
  margin-top: 1.5rem;
}

.forgot-password a {
  color: #e11d73;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.forgot-password a:hover {
  color: #be185d;
  text-decoration: underline;
}

/* Alerts */
.alert {
  border: none;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.8));
  color: #fff;
  border-left: 4px solid #dc2626;
}

.alert-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(22, 163, 74, 0.8));
  color: #fff;
  border-left: 4px solid #16a34a;
}

.alert-info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.8));
  color: #fff;
  border-left: 4px solid #2563eb;
}

/* Footer */
.footer {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  padding: 1rem 0;
}

.footer .copyright {
  font-size: 0.875rem;
}

.nav-footer .nav-link {
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 0.875rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .login-container {
    padding: 0 0.5rem;
  }
  
  .card-body {
    padding: 1.5rem 1rem;
  }
  
  .card-header {
    padding: 1.5rem 1rem;
  }
  
  .navbar-brand {
    font-size: 1.1rem;
  }
  
  .navbar {
    padding: 0.75rem 0;
  }
  
  .main-content {
    padding-top: 70px;
  }
}

/* Animation classes */
.fadeIn3 {
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Input validation states */
.input-group input.is-invalid {
  border-color: #dc2626;
  background: rgba(239, 68, 68, 0.05);
}

.input-group input.is-valid {
  border-color: #16a34a;
  background: rgba(34, 197, 94, 0.05);
}

/* Loading state */
.loading .card {
  pointer-events: none;
}

.loading .card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(1px);
  z-index: 1;
}

/* Garantir que alertas fiquem acima do loading */
#alertContainer {
  position: relative;
  z-index: 100;
}