/* Modal de autenticación */
.modal {
  display: flex;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 0;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  animation: slideDown 0.3s ease-out;
}

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

.modal-header {
  background: linear-gradient(135deg, var(--iot-primary) 0%, var(--iot-primary-dark) 100%);
  color: white;
  padding: 20px 30px;
  border-radius: 15px 15px 0 0;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5em;
}

.modal-body {
  padding: 30px;
}

.modal-body p {
  margin-bottom: 15px;
  color: var(--gray-700);
  font-size: 1.1em;
}

.api-key-input {
  width: 100%;
  padding: 15px;
  border: 2px solid var(--iot-primary);
  border-radius: 8px;
  font-size: 1.1em;
  font-family: 'Courier New', monospace;
  background: var(--gray-50);
  color: var(--gray-800);
}

.api-key-input:focus {
  outline: none;
  border-color: var(--iot-primary-dark);
  box-shadow: 0 0 0 3px rgba(0, 168, 204, 0.15);
}

.auth-error {
  margin-top: 15px;
  padding: 12px;
  background: #fee;
  border: 1px solid var(--error);
  border-radius: 8px;
  color: var(--error);
  font-weight: 500;
}

.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid var(--gray-200);
  text-align: right;
}

.modal-footer button {
  padding: 12px 30px;
  font-size: 1.1em;
}
