/* ============================
   Estilos del Componente Login
   ============================ */

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  font-family: var(--font-main, "Inter", system-ui, -apple-system, sans-serif);
}

.login-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  position: relative;
}

.login-header {
  background: linear-gradient(90deg, #1976d2, #1565c0);
  color: white;
  text-align: center;
  padding: 32px 24px;
}

.login-logo {
  height: 64px;
  width: auto;
  margin-bottom: 16px;
}

.login-header h1 {
  margin: 0 0 8px 0;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-subtitle {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: 400;
}

.login-form {
  padding: 32px 24px;
}

/* Alertas */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.alert-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

/* Form groups */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background-color: #ffffff;
}

.form-group input:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-group input.error {
  border-color: #dc2626;
  background-color: #fef2f2;
}

/* Password input container */
.password-input-container {
  position: relative;
}

.password-input-container input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  color: #6b7280;
}

.password-toggle:hover {
  background-color: #f3f4f6;
  color: #374151;
}

/* Error messages */
.error-message {
  color: #dc2626;
  font-size: 0.8rem;
  margin-top: 4px;
  font-weight: 500;
}

/* Login button */
.login-button {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(90deg, #1976d2, #1565c0);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.login-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(25, 118, 210, 0.3);
}

.login-button:active:not(:disabled) {
  transform: translateY(0);
}

.login-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Loading spinner */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Footer */
.login-footer {
  padding: 20px 24px;
  background-color: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.help-text {
  margin: 0;
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 480px) {
  .login-container {
    padding: 10px;
  }
  
  .login-card {
    max-width: 100%;
  }
  
  .login-header {
    padding: 24px 20px;
  }
  
  .login-form {
    padding: 24px 20px;
  }
  
  .login-footer {
    padding: 16px 20px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .login-card {
    background-color: #1f2937;
    color: #f9fafb;
  }
  
  .form-group input {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
  }
  
  .form-group input:focus {
    border-color: #1976d2;
  }
  
  .login-footer {
    background-color: #111827;
    border-top-color: #374151;
  }
  
  .help-text {
    color: #9ca3af;
  }
}
