/* Página Login - PIB do Brasil */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(-45deg, #1a1a2e, #16213e, #0f3460, #533483);
  background-size: 400% 400%;
  animation: animarBackground 15s ease infinite;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: white;
  overflow-x: hidden;
}

@keyframes animarBackground {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Container principal */
.main-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 2rem;
}

/* Container do logo */
.logo-container {
  text-align: center;
  animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  max-width: 320px;
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.02);
}

/* Container do login */
.login-container {
  animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Caixa de login */
.login-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 2.5rem 2rem;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.login-box:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}

.login-box h2 {
  margin: 0 0 2rem 0;
  font-size: 1.8rem;
  color: #2c3e50;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Formulário */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-group {
  position: relative;
}

.input-group input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #e1e8ed;
  border-radius: 12px;
  font-size: 1rem;
  background-color: #ffffff;
  color: #2c3e50;
  transition: all 0.3s ease;
  outline: none;
  font-weight: 500;
}

.input-group input:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
  transform: translateY(-2px);
}

.input-group input::placeholder {
  color: #7f8c8d;
  font-weight: 400;
}

/* Botão de login */
.btn-login {
  width: 100%;
  padding: 1rem 1.5rem;
  margin-top: 0.5rem;
  background: linear-gradient(135deg, #3498db, #2980b9);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.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%;
}

.btn-login:hover {
  background: linear-gradient(135deg, #2980b9, #1f5f8b);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

/* Footer do login */
.login-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ecf0f1;
}

.login-footer p {
  color: #7f8c8d;
  margin: 0;
  font-size: 0.95rem;
}

.login-footer a {
  color: #3498db;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.login-footer a:hover {
  color: #2980b9;
  text-decoration: underline;
}

/* Estilos para tema escuro */
[data-theme="dark"] .login-box {
  background: rgba(30, 30, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .login-box h2 {
  color: #ffffff;
}

[data-theme="dark"] .input-group input {
  background-color: #2c2c2c;
  color: #ffffff;
  border: 2px solid #404040;
}

[data-theme="dark"] .input-group input:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2);
}

[data-theme="dark"] .input-group input::placeholder {
  color: #888888;
}

[data-theme="dark"] .login-footer {
  border-top: 1px solid #404040;
}

[data-theme="dark"] .login-footer p {
  color: #cccccc;
}

[data-theme="dark"] .login-footer a {
  color: #3498db;
}

[data-theme="dark"] .login-footer a:hover {
  color: #5dade2;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #e74c3c;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  max-width: 250px;
}

.toast.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast.success {
  background: #28a745;
}

.toast.error {
  background: #e74c3c;
}

.toast p {
  margin: 0;
  font-weight: 500;
  line-height: 1.3;
}

/* Responsividade */
@media (max-width: 768px) {
  .main-container {
    padding: 1rem;
    gap: 1.5rem;
  }
  
  .logo {
    max-width: 280px;
  }
  
  .login-box {
    padding: 2rem 1.5rem;
    max-width: 350px;
  }
  
  .login-box h2 {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .main-container {
    padding: 0.5rem;
  }
  
  .logo {
    max-width: 240px;
  }
  
  .login-box {
    padding: 1.5rem 1rem;
    border-radius: 16px;
  }
  
  .login-box h2 {
    font-size: 1.4rem;
  }
  
  .input-group input {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }
  
  .btn-login {
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
  }
}