@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --primary: 222.2 47.4% 11.2%;
  --primary-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 222.2 84% 4.9%;
  --radius: 0.75rem;
  --muted-foreground: 215.4 16.3% 46.9%;
  --secondary: 210 40% 96%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --gradient-primary: linear-gradient(135deg, hsl(222.2 47.4% 11.2%) 0%, hsl(217.2 91.2% 60%) 100%);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background: linear-gradient(135deg, rgb(10, 29, 66) 0%, rgb(25, 50, 100) 100%);
  color: hsl(var(--foreground));
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.logo-container {
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.logo-img {
  width: 140px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

.login-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  width: 100%;
  max-width: 400px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  transition: box-shadow 0.3s ease;
}

.login-container:hover {
  box-shadow: var(--shadow-hover);
}

.logo {
  text-align: center;
  margin-bottom: 1.75rem;
}

.logo h1 {
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.logo p {
  font-size: 0.95rem;
  color: hsl(var(--muted-foreground));
  font-weight: 400;
}

.login-form {
  width: 100%;
  margin-top: 1.25rem;
}

.form-group {
  margin-bottom: 1.25rem;
  width: 100%;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  color: hsl(var(--primary));
  margin-bottom: 0.5rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid hsl(var(--input));
  border-radius: var(--radius);
  font-size: 0.9rem;
  background-color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
  color: hsl(var(--foreground));
}

.form-group input:focus {
  outline: none;
  border-color: hsl(var(--primary));
  background-color: white;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.form-group input::placeholder {
  color: hsl(var(--muted-foreground) / 0.6);
}

.login-button {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: var(--gradient-primary);
  color: hsl(var(--primary-foreground));
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

.login-button::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 ease;
}

.login-button:hover::before {
  left: 100%;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.secondary-button {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: transparent;
  color: hsl(var(--primary));
  border: 2px solid hsl(var(--border));
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  text-align: center;
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

.secondary-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
  z-index: -1;
}

.secondary-button:hover::before {
  width: 100%;
}

.secondary-button:hover {
  color: hsl(var(--primary-foreground));
  border-color: transparent;
  transform: translateY(-1px);
}

.forgot-password {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.875rem;
}

.forgot-password a {
  color: hsl(var(--primary));
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.forgot-password a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 50%;
  background: var(--gradient-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.forgot-password a:hover::after {
  width: 100%;
}

.forgot-password a:hover {
  color: hsl(var(--primary) / 0.8);
}

/* Estilo de erros */
.alert {
  margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  animation: slideIn 0.3s ease;
}

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

.alert-danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: 1px solid #fca5a5;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.alert ul {
  padding-left: 1.25rem;
  margin: 0;
}

.alert li {
  margin-bottom: 0.25rem;
}

.alert li:last-child {
  margin-bottom: 0;
}

/* Divisor */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  width: 100%;
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  font-weight: 500;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, hsl(var(--border)), transparent);
}

.divider::before {
  margin-right: 0.75rem;
}

.divider::after {
  margin-left: 0.75rem;
}

/* Responsividade */
@media (max-width: 480px) {
  body {
    padding: 1rem;
  }

  .logo-container {
    margin-bottom: 1.5rem;
  }

  .logo-img {
    width: 120px;
  }

  .login-container {
    padding: 2rem 1.5rem;
    max-width: 360px;
    backdrop-filter: blur(10px);
  }

  .logo h1 {
    font-size: 1.5rem;
  }

  .logo p {
    font-size: 0.875rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .form-group input {
    padding: 0.75rem 0.875rem;
    font-size: 0.85rem;
  }

  .login-button,
  .secondary-button {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .forgot-password {
    font-size: 0.8rem;
  }
}

@media (max-width: 360px) {
  .login-container {
    padding: 1.75rem 1.25rem;
    max-width: 320px;
  }

  .logo h1 {
    font-size: 1.4rem;
  }

  body::before {
    background: radial-gradient(circle at 50% 50%, rgba(120, 119, 198, 0.2) 0%, transparent 70%);
  }
}