/**
 * Login Page Styles
 * Guardapáramos Junior v2.0
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Nunito", sans-serif;
  overflow: hidden;
  background: #0d2818;
}

/* Fractal Background Canvas */
#fractalCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Login Container */
.login-container {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

/* Login Card */
.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo */
.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo img {
  max-width: 200px;
  height: auto;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Title */
.login-card h1 {
  text-align: center;
  color: #1a472a;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

.subtitle {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin-bottom: 30px;
}

/* Form */
.login-form {
  width: 100%;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #333;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 15px;
  font-family: "Nunito", sans-serif;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #2d7a4a;
  box-shadow: 0 0 0 3px rgba(45, 122, 74, 0.1);
}

/* Login Button */
.login-button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2d7a4a 0%, #1a472a 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(45, 122, 74, 0.3);
}

.login-button:active {
  transform: translateY(0);
}

.login-button.loading {
  background: #999;
  cursor: not-allowed;
  position: relative;
}

.login-button.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 3px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error/Success Message */
.error-message {
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  animation: slideDown 0.3s ease-out;
}

.error-message.error {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.error-message.success {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Links */
.login-links {
  text-align: center;
  margin-top: 20px;
}

.forgot-password {
  color: #2d7a4a;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: #1a472a;
  text-decoration: underline;
}

/* Institutional Logos */
.institutional-logos {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 1;
}

.institutional-logos img {
  max-width: 120px;
  height: auto;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.institutional-logos img:hover {
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .login-card {
    padding: 30px 20px;
  }

  .login-card h1 {
    font-size: 24px;
  }

  .institutional-logos {
    padding: 0 20px;
  }

  .institutional-logos img {
    max-width: 80px;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 25px 15px;
  }

  .login-logo img {
    max-width: 150px;
  }

  .institutional-logos {
    flex-direction: column;
    gap: 15px;
    bottom: 10px;
  }

  .institutional-logos img {
    max-width: 100px;
  }
}
