Quantum Complementarity Approach to Device-Independent Security